[hidden] { display: none !important; }
button:disabled { opacity: .5; cursor: not-allowed; }
input:disabled, select:disabled { color: #52615e; background: #f1f4ef; opacity: 1; }
#account-controls { display: flex; align-items: center; gap: 14px; }
#sync-account { font-size: 12px; color: var(--muted); max-width: 240px; }
#account-controls button { min-height: 35px; padding: 7px 11px; font-size: 12px; }
.collaboration { display: flex; justify-content: space-between; gap: 18px; align-items: center; background: white; border: 1px solid var(--line); border-top: 1px solid #edf0ec; border-radius: 0 0 10px 10px; padding: 14px 22px; position: sticky; top: 0; z-index: 20; box-shadow: 0 4px 8px #24323804; }
.sync-feedback { display: flex; align-items: center; gap: 10px; min-width: 0; }
#sync-status { font-size: 12px; margin: 0; color: var(--muted); line-height: 1.7; overflow-wrap: anywhere; }
.state-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; border-radius: 5px; padding: 5px 8px; background: #eef1ec; color: #66757c; flex-shrink: 0; }
.state-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.collaboration[data-state=shared] .state-chip { background: #e8f4ed; color: #087f75; }
.collaboration[data-state=draft] .state-chip, .collaboration[data-state=empty] .state-chip { background: #fff3db; color: #956215; }
.collaboration[data-state=error] .state-chip { background: #fceeea; color: #ae3827; }
.sync-error { color: #ae3827 !important; }
.sync-actions { align-items: center; flex-shrink: 0; }
.sync-actions > button { font-size: 13px; }
#more-actions { position: relative; }
#more-actions > summary { list-style: none; border: 1px solid var(--line); border-radius: 7px; padding: 11px 12px; font-size: 13px; min-height: 42px; white-space: nowrap; }
#more-actions > summary::-webkit-details-marker { display: none; }
#more-actions[open] > summary { background: #f1f5f2; }
.more-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; padding: 12px; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 8px 32px #2432381a; max-height: 65vh; overflow: auto; }
.more-menu button { width: 100%; display: block; text-align: left; border: 0; font-size: 13px; }
.menu-label { display: block; color: var(--muted); font-size: 11px; padding: 5px 12px 8px; }
.more-menu .hint { padding: 0 10px; font-size: 12px; }
.more-menu .metadata summary { padding: 0 10px; }
dialog { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 60px #24323826; padding: 26px; max-width: min(720px, 94vw); width: 100%; max-height: 90vh; color: var(--ink); }
dialog::backdrop { background: #24323866; }
dialog h2 { margin-bottom: 12px; }
dialog label { margin-bottom: 12px; }
dialog .buttons { flex-wrap: wrap; margin-top: 16px; }
dialog input, dialog select { margin-top: 6px; }
dialog table small { color: var(--muted); }
dialog .member-active { display: flex; align-items: center; gap: 8px; }
dialog .member-active input { width: 18px; min-height: 18px; }
#login-status, #member-status { color: #ae3827; font-size: 13px; }
#history-list, #members-list { margin: 14px 0; max-height: 42vh; overflow: auto; }
@media (max-width: 1100px) {
  .collaboration { gap: 12px; }
  .sync-feedback { flex-wrap: wrap; gap: 5px; }
}
@media (max-width: 760px) {
  #account-controls { gap: 6px; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
  #sync-account { font-size: 10px; max-width: 135px; text-align: right; }
  #account-controls button { font-size: 11px; padding: 5px 8px; min-height: 32px; }
  #account-controls .buttons { gap: 5px; }
  .collaboration { position: fixed; top: auto; bottom: 0; left: 0; right: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); display: block; box-shadow: 0 -4px 20px #24323808; }
  .sync-feedback { flex-wrap: nowrap; gap: 8px; margin-bottom: 8px; align-items: flex-start; }
  .state-chip { font-size: 10px; padding: 3px 6px; }
  #sync-status { font-size: 11px; max-height: 72px; overflow: auto; }
  .sync-actions { display: flex; gap: 7px; }
  .sync-actions > button { font-size: 12px; padding: 10px 9px; }
  .sync-actions > .primary { flex: 1; }
  #more-actions > summary { font-size: 12px; padding: 11px 10px; }
  .more-menu { top: auto; bottom: calc(100% + 10px); width: min(280px, calc(100vw - 32px)); max-height: 55vh; }
  dialog { padding: 20px; }
}
