/* Account page: identity, mode, queues, drafts. Account sheets: schedule, check, settings. */

.acc-head { display: grid; gap: 20px; }
.acc-id { display: flex; align-items: center; gap: 16px; }
.acc-id h1 { font-size: 2.125rem; overflow-wrap: anywhere; }
.acc-sub { font-size: 0.8125rem; font-weight: 500; color: var(--text-2); margin-bottom: 4px; }
.acc-sub .sep { margin: 0 6px; color: var(--text-3); }
.acc-id .badge { align-self: flex-start; margin-top: 6px; }

.mode-card {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--surface);
}
.mode-card.test { background: color-mix(in srgb, var(--warn-soft) 70%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 18%, transparent); }
.mode-card.live { background: color-mix(in srgb, var(--ok-soft) 70%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 18%, transparent); }
.mode-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mode-card.test .mode-ic { color: var(--warn); }
.mode-card.live .mode-ic { color: var(--ok); }
.mode-title { font-weight: 600; margin-bottom: 2px; }
.mode-card .small { max-width: 60ch; }
.mode-toggle .switch { display: inline-block; }
.mode-toggle { display: inline-flex; align-items: center; gap: 12px; flex: none; cursor: pointer; font-size: 0.8125rem; font-weight: 550; color: var(--text); }
.mode-toggle:has(input:focus-visible) .switch { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 999px; }

.meter { display: inline-block; width: 96px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: var(--accent-text); transition: width var(--t-slow) var(--ease-out); }

/* rows */
.item.post { padding: 12px 14px 12px 16px; }
.item.post .grow { min-width: 0; }
.post-note { margin-top: 4px; }
/* status sits as a badge on wide screens and as the first word of the meta line on phones */
.meta-status { display: none; font-weight: 600; }
.meta-status.bad { color: var(--danger); }
.meta-status.live { color: var(--ok); }
.meta-status.warn { color: var(--warn); }
.row-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.handle {
  appearance: none; border: 0; padding: 0; background: transparent;
  display: grid; place-items: center; width: 26px; height: 38px; margin: 0 -6px; border-radius: 8px; flex: none;
  color: var(--text-3); cursor: grab; touch-action: none; user-select: none;
  transition: color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.handle:hover { color: var(--text); background: var(--surface-2); }
.handle:focus-visible { outline-offset: 0; color: var(--accent-text); }
.pos { width: 18px; text-align: center; font-size: 0.8125rem; font-weight: 600; color: var(--text-3); flex: none; }
.queue .item { transition: box-shadow var(--t-fast) ease; }
.queue.sorting .item { box-shadow: 0 -1px 0 var(--line); }
.item.dragging { z-index: 5; border-radius: var(--r-sm); box-shadow: var(--shadow-lg), 0 0 0 1px var(--line-strong) !important; }
.item.dragging .handle { cursor: grabbing; color: var(--accent-text); }

/* schedule sheet */
.choice {
  appearance: none; display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; cursor: pointer;
  border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.choice:hover { border-color: var(--accent-text); background: var(--accent-soft); }
.choice .grow { display: grid; gap: 2px; }
.choice-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent-text); }
.divider-label { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 0.75rem; font-weight: 500; }
.divider-label::before, .divider-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* settings sheet */
.sched { gap: 10px; }
.sched > .field { margin-top: 8px; }
.add-time { display: inline-flex; align-items: center; gap: 6px; }
.add-time .input { min-width: 0; width: 132px; }
.sched .chip.num { cursor: default; padding-right: 8px; }
.sched .chip.num:hover { background: var(--accent-soft); }
.sched .chip .x { appearance: none; border: 0; padding: 0; background: transparent; cursor: pointer; width: 22px; height: 22px; margin-right: -2px; transition: background-color var(--t-fast) ease, color var(--t-fast) ease; }
.sched .chip .x:hover { background: var(--surface-3); color: var(--text); }
.sched .chip .x:focus-visible { outline-offset: 0; border-radius: 50%; }
.chip.day { min-width: 46px; justify-content: center; padding: 0 10px; }
.danger-zone { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); }
.danger-zone > .grow { flex-basis: 260px; display: grid; gap: 2px; }

@media (max-width: 640px) {
  .acc-id { align-items: center; gap: 14px; }
  .acc-id .pglyph { --pg: 44px; }
  .acc-id h1 { font-size: 1.625rem; }
  .acc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .acc-actions .btn.primary { grid-column: 1 / -1; min-height: 44px; }
  .wide-only { display: none; }
  .mode-card { flex-wrap: wrap; align-items: flex-start; padding: 16px; }
  .mode-card > .grow { flex-basis: calc(100% - 54px); }
  .mode-toggle { flex-basis: 100%; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line); }
  /* a row: grip, picture, text; then status and actions on their own line */
  .item.post { flex-wrap: wrap; row-gap: 8px; gap: 12px; padding: 12px 12px 12px 14px; }
  .item.post > .grow { flex: 1 1 0; }
  .item.post .pos { display: none; }
  .item.post .item-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .item.post .item-meta { white-space: normal; }
  .row-actions { flex-basis: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .row-actions > .badge { display: none; }
  .meta-status { display: inline; }
  .meter { display: none; }
  .chips.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  .chip.day { min-width: 0; padding: 0; }
}
