/* H-7 · industrial calm: drawing-ink navy, galvanized gray, one safety-yellow tag for the next thing to do. */

@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/barlow-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/barlow-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/barlow-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/barlow-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/barlow-semi-condensed-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/barlow-semi-condensed-latin-700-normal.woff2) format('woff2'); }

:root {
  --paper: #EDF0F3;
  --sheet: #FFFFFF;
  --ink: #14263A;
  --ink-2: #4E6175;
  --ink-3: #7B8C9D;
  --rule: #D6DDE4;
  --rule-strong: #BCC7D2;
  --tag: #FFCC1F;
  --tag-ink: #14263A;
  --tag-deep: #E0A800;
  --p1: #D3243A;
  --p2: #E2741A;
  --p3: #2D6BD8;
  --p4: #8E9DAD;
  --ok: #23845A;
  --focus: #2D6BD8;
  --scrim: rgba(14, 22, 33, 0.42);
  --f-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, 'Vazirmatn', Tahoma, sans-serif;
  --f-display: 'Barlow Semi Condensed', 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tab-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0E1621; --sheet: #142030; --ink: #E6ECF2; --ink-2: #A0B1C3; --ink-3: #6F8397;
    --rule: #223248; --rule-strong: #30445E; --p1: #FF5165; --p2: #FF9B45; --p3: #5D93FF; --p4: #7E90A4; --ok: #3DB37C;
    --focus: #FFCC1F; --scrim: rgba(3, 8, 14, 0.62); color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #0E1621; --sheet: #142030; --ink: #E6ECF2; --ink-2: #A0B1C3; --ink-3: #6F8397;
  --rule: #223248; --rule-strong: #30445E; --p1: #FF5165; --p2: #FF9B45; --p3: #5D93FF; --p4: #7E90A4; --ok: #3DB37C;
  --focus: #FFCC1F; --scrim: rgba(3, 8, 14, 0.62); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.4 var(--f-body); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.lg { width: 24px; height: 24px; }

.boot { display: grid; place-items: center; height: 100vh; font: 700 28px var(--f-display); color: var(--ink-3); }

/* ---------- shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: calc(var(--safe-t) + 10px) 16px 10px; background: var(--paper);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font: 700 21px/1 var(--f-display); letter-spacing: 0.01em; text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: var(--tag); color: var(--tag-ink); font: 700 14px/1 var(--f-display); }
.topbar .spacer { flex: 1; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--ink-2); }
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); opacity: 0; transition: opacity .3s; }
.sync-dot.offline { opacity: 1; background: var(--p2); }

.main { padding: 0 0 calc(var(--tab-h) + var(--safe-b) + 88px); max-width: 760px; }
.lane-head { padding: 6px 16px 14px; }
.lane-title { margin: 0; display: flex; align-items: baseline; gap: 10px; font: 700 36px/1.05 var(--f-display); letter-spacing: -0.005em; }
.lane-title .count { color: var(--ink-3); font-weight: 600; }
.lane-sub { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }

/* ---------- tab bar (phone) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--sheet) 94%, transparent); border-top: 1px solid var(--rule);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); font: 600 12px/1 var(--f-body); text-decoration: none; }
.tab[aria-current='page'] { color: var(--ink); }
.tab .n { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rule); color: var(--ink); font: 700 11px/18px var(--f-body); text-align: center; }
.tab .n.hot { background: var(--tag); color: var(--tag-ink); }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); z-index: 25;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--ink); color: var(--paper); box-shadow: 0 6px 18px rgba(14, 22, 33, 0.28);
}
.fab:active { transform: scale(0.96); }

/* ---------- sidebar (laptop) ---------- */
.sidebar { display: none; }
@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); }
  .shell.with-detail { grid-template-columns: 232px minmax(0, 1fr) minmax(380px, 440px); }
  .sidebar {
    display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
    padding: 20px 14px; border-right: 1px solid var(--rule);
  }
  .sidebar .brand { padding: 4px 8px 18px; }
  .nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
  .nav:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); color: var(--ink); }
  .nav[aria-current='page'] { background: var(--sheet); color: var(--ink); box-shadow: 0 0 0 1px var(--rule); }
  .nav .n { margin-left: auto; color: var(--ink-3); font-size: 14px; }
  .nav .n.hot { color: var(--tag-ink); background: var(--tag); border-radius: 6px; padding: 1px 7px; }
  .sidebar .grow { flex: 1; }
  .sidebar .hint { padding: 8px 10px; color: var(--ink-3); font-size: 13px; }
  .topbar, .tabbar, .fab { display: none; }
  .main { padding: 18px 28px 60px; max-width: none; }
  .main-inner { max-width: 780px; }
  .lane-head { padding: 10px 0 16px; }
  .detail-col { position: sticky; top: 0; height: 100vh; overflow: auto; border-left: 1px solid var(--rule); background: var(--sheet); }
}

/* ---------- quick add ---------- */
.add-inline { display: none; }
@media (min-width: 960px) {
  .add-inline { display: block; margin-bottom: 14px; }
}
.add-box { display: flex; align-items: center; gap: 10px; padding: 0 8px 0 14px; height: 52px; border-radius: 12px; background: var(--sheet); border: 1px solid var(--rule); }
.add-box:focus-within { border-color: var(--ink-2); }
.add-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 17px; }
.add-box input::placeholder { color: var(--ink-3); }
.parse { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; padding: 8px 2px 0; }
.parse:empty { display: none; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 5px; font: 600 12.5px/1 var(--f-body); color: var(--ink-2); background: color-mix(in srgb, var(--ink) 7%, transparent); white-space: nowrap; }
.chip.p1 { color: var(--p1); background: color-mix(in srgb, var(--p1) 13%, transparent); }
.chip.p2 { color: var(--p2); background: color-mix(in srgb, var(--p2) 14%, transparent); }
.chip.p3 { color: var(--p3); background: color-mix(in srgb, var(--p3) 12%, transparent); }
.chip.p4 { color: var(--ink-2); }
.chip.now { color: var(--tag-ink); background: var(--tag); }

/* ---------- strips (list rows) ---------- */
.list { background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
@media (min-width: 600px) { .list { border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; } }
.group-label { margin: 22px 16px 8px; color: var(--ink-2); font: 600 15px/1.2 var(--f-body); }
@media (min-width: 960px) { .group-label { margin: 24px 2px 8px; } }

.swipe { position: relative; overflow: hidden; }
.swipe + .swipe { border-top: 1px solid var(--rule); }
.swipe-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-weight: 700; color: #fff; }
.swipe-bg.right { background: var(--ok); }
.swipe-bg.left { background: var(--tag); color: var(--tag-ink); justify-content: flex-end; }
.strip {
  position: relative; display: grid; grid-template-columns: 4px 48px minmax(0, 1fr) auto; align-items: center;
  min-height: 68px; background: var(--sheet); touch-action: pan-y; transition: transform .22s ease, opacity .22s ease;
}
.strip.dragging { transition: none; }
.strip.selected { background: color-mix(in srgb, var(--p3) 7%, var(--sheet)); }
.strip.kb { box-shadow: inset 0 0 0 2px var(--focus); }
.rail { align-self: stretch; background: var(--pc, var(--p4)); }
.rail.hazard { width: 6px; background: repeating-linear-gradient(-45deg, var(--tag) 0 6px, var(--ink) 6px 12px); background-size: 17px 17px; animation: hazard 1.4s linear infinite; }
@keyframes hazard { to { background-position: 0 17px; } }
.check { justify-self: center; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--rule-strong); color: transparent; transition: background .15s, border-color .15s; }
.check:hover { border-color: var(--ok); color: var(--ok); }
.check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.strip-body { min-width: 0; padding: 12px 0; text-align: left; }
.strip-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; font-size: 16.5px; line-height: 1.3; unicode-bidi: plaintext; }
.strip.done .strip-title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; color: var(--ink-2); font-size: 13.5px; line-height: 1.3; }
.meta > span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.meta .src { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.due.late { color: var(--p1); font-weight: 600; }
.due.urgent { color: var(--tag-ink); background: var(--tag); padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.due.soon { color: var(--p2); font-weight: 600; }
.answer { color: var(--ok); font-weight: 600; }
.answer.no { color: var(--p1); }
.strip-act { padding: 0 12px 0 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--rule-strong); font: 600 14px/1 var(--f-body); white-space: nowrap; text-decoration: none; color: var(--ink); background: var(--sheet); }
.pill:hover { border-color: var(--ink-2); }
.kind-label { display: none; }
@media (min-width: 600px) { .kind-label { display: inline; } }

/* ---------- the tag: next thing to do ---------- */
.tag-card {
  position: relative; margin: 0 16px 18px; padding: 16px 16px 16px 30px; border-radius: 6px;
  background: var(--tag); color: var(--tag-ink);
}
@media (min-width: 960px) { .tag-card { margin: 0 0 20px; padding: 20px 22px 20px 38px; } }
.tag-card::before { /* the tag's eyelet */
  content: ''; position: absolute; left: 11px; top: 22px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 0 0 2px var(--tag-deep);
}
@media (min-width: 960px) { .tag-card::before { left: 15px; top: 27px; width: 12px; height: 12px; } }
.tag-card.alarm { background-image: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(20, 38, 58, 0.07) 14px 28px); }
.tag-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-weight: 600; font-size: 14px; }
.tag-top .chip { background: rgba(20, 38, 58, 0.1); color: var(--tag-ink); }
.tag-title { margin: 8px 0 0; font: 700 26px/1.12 var(--f-display); letter-spacing: -0.005em; unicode-bidi: plaintext; cursor: pointer; }
@media (min-width: 960px) { .tag-title { font-size: 30px; } }
.tag-detail { margin: 8px 0 0; font-size: 15px; line-height: 1.4; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; unicode-bidi: plaintext; }
.tag-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.tag-actions > :first-child { grid-column: 1 / -1; }
@media (min-width: 600px) { .tag-actions { display: flex; flex-wrap: wrap; } }
.tag-actions .btn { border-color: rgba(20, 38, 58, 0.25); background: transparent; color: var(--tag-ink); }
.tag-actions .btn.primary { background: var(--tag-ink); color: var(--tag); border-color: var(--tag-ink); }

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--rule-strong); background: var(--sheet); color: var(--ink); font: 600 15px/1 var(--f-body); text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.yellow { background: var(--tag); color: var(--tag-ink); border-color: var(--tag); }
.btn.danger { color: var(--p1); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; }
.btn.block { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }

.field { display: grid; gap: 6px; margin: 14px 0; }
.field > span { font-weight: 600; font-size: 14px; color: var(--ink-2); }
.input, .field input:not([type='checkbox']), .field textarea, .field select {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--rule-strong);
  background: var(--paper); font-size: 16px; line-height: 1.4; outline: 0;
}
.field textarea { min-height: 120px; resize: vertical; unicode-bidi: plaintext; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ink-2); background: var(--sheet); }
.help { margin: 2px 0 0; color: var(--ink-3); font-size: 13.5px; }

.seg { display: flex; padding: 3px; gap: 3px; border-radius: 10px; background: var(--paper); border: 1px solid var(--rule); }
.seg button { flex: 1; height: 34px; border-radius: 7px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button[aria-pressed='true'] { background: var(--sheet); color: var(--ink); box-shadow: 0 0 0 1px var(--rule-strong); }
.seg button.p1[aria-pressed='true'] { color: var(--p1); }
.seg button.p2[aria-pressed='true'] { color: var(--p2); }
.seg button.p3[aria-pressed='true'] { color: var(--p3); }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.switch + .switch { border-top: 1px solid var(--rule); }
.switch input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 50px; height: 30px; border-radius: 15px; background: var(--rule-strong); transition: background .2s; cursor: pointer; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(20px); }
.switch b { display: block; font-weight: 600; }
.switch small { display: block; color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }

/* ---------- detail (sheet on phone, panel on laptop) ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); animation: fade .18s ease; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 92vh; max-height: 92dvh; overflow: auto;
  background: var(--sheet); border-radius: 16px 16px 0 0; padding: 8px 18px calc(var(--safe-b) + 20px);
  animation: rise .26s cubic-bezier(.2, .8, .2, 1); overscroll-behavior: contain;
}
.sheet:focus { outline: none; }
.sheet .grab { width: 40px; height: 5px; margin: 2px auto 10px; border-radius: 3px; background: var(--rule-strong); }
@keyframes rise { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.panel { padding: 22px 24px 40px; }
.d-top { display: flex; align-items: center; gap: 8px; }
.d-top .grow { flex: 1; }
.d-title { margin: 10px 0 0; font: 700 26px/1.15 var(--f-display); letter-spacing: -0.005em; unicode-bidi: plaintext; }
.d-title-input { width: 100%; font: 700 24px/1.2 var(--f-display); padding: 6px 8px; border: 1px solid var(--rule-strong); border-radius: 8px; background: var(--paper); }
.d-src { margin-top: 8px; color: var(--ink-2); font-size: 14.5px; }
.d-src a { color: var(--p3); }
.d-sec { margin-top: 22px; }
.d-sec > h3 { margin: 0 0 8px; font: 600 15px/1.2 var(--f-body); color: var(--ink-2); }
.d-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.5; unicode-bidi: plaintext; }
.d-text a { color: var(--p3); }
.draft { width: 100%; min-height: 160px; padding: 12px; border-radius: 10px; border: 1px solid var(--rule-strong); background: var(--paper); font-size: 16px; line-height: 1.5; unicode-bidi: plaintext; resize: vertical; }
.email-head { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin-bottom: 10px; font-size: 15px; }
.email-head dt { color: var(--ink-3); }
.email-head dd { margin: 0; overflow-wrap: anywhere; }
.options { display: grid; gap: 8px; }
.options .btn { justify-content: flex-start; height: auto; min-height: 48px; padding: 12px 14px; text-align: left; white-space: normal; line-height: 1.3; }
.response { padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ink); }
.response.no { background: color-mix(in srgb, var(--p1) 10%, transparent); }
.history { margin: 0; padding: 0; list-style: none; color: var(--ink-3); font-size: 13.5px; }
.history li { padding: 4px 0; }
.edit-grid { display: grid; gap: 12px; }
.snooze-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.snooze-grid .btn { justify-content: flex-start; height: 56px; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 12px; }
.snooze-grid .btn small { color: var(--ink-3); font-weight: 500; font-size: 13px; }

/* ---------- empty states, banners, toast ---------- */
.empty { margin: 8px 16px; padding: 28px 20px; border-radius: 14px; border: 1px dashed var(--rule-strong); color: var(--ink-2); }
@media (min-width: 960px) { .empty { margin: 0; } }
.empty h2 { margin: 0 0 6px; font: 700 22px/1.2 var(--f-display); color: var(--ink); }
.empty p { margin: 0 0 14px; }
.banner { display: flex; gap: 12px; align-items: flex-start; margin: 0 16px 16px; padding: 14px; border-radius: 12px; background: var(--sheet); border: 1px solid var(--rule); }
@media (min-width: 960px) { .banner { margin: 0 0 16px; } }
.banner-title { display: block; font-weight: 700; }
.banner p { margin: 4px 0 10px; color: var(--ink-2); font-size: 14.5px; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 16px); z-index: 60; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 12px 14px 12px 16px; border-radius: 12px;
  background: var(--ink); color: var(--paper); font-weight: 600; box-shadow: 0 8px 24px rgba(14, 22, 33, 0.3); animation: rise .2s ease;
}
@media (min-width: 960px) { .toast { bottom: 24px; } }
.toast button { color: var(--tag); font-weight: 700; padding: 4px 6px; }

/* ---------- auth & settings pages ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { margin: 22px 0 6px; font: 700 34px/1.1 var(--f-display); }
.auth-card p { color: var(--ink-2); margin: 0 0 8px; }
.auth .brand { font-size: 26px; }
.auth .brand-mark { width: 40px; height: 40px; font-size: 18px; border-radius: 9px; }
.err { color: var(--p1); font-weight: 600; margin: 8px 0; }
.steps { margin: 12px 0; padding-left: 22px; }
.steps li { margin: 8px 0; }
.codebox { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--rule-strong); font-size: 14px; overflow-wrap: anywhere; }
.codebox code { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

.settings { padding: 0 16px; }
@media (min-width: 960px) { .settings { padding: 0; max-width: 720px; } }
.set-sec { margin: 0 0 18px; padding: 6px 16px 10px; border-radius: 14px; background: var(--sheet); border: 1px solid var(--rule); }
.set-sec > h2 { margin: 12px 0 2px; font: 700 21px/1.2 var(--f-display); }
.set-sec > p { margin: 0 0 6px; color: var(--ink-2); font-size: 14.5px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); font-size: 15px; }
.kv:first-of-type { border-top: 0; }
.kv span:last-child { color: var(--ink-2); text-align: right; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.kbd-help { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14.5px; }
kbd { display: inline-block; min-width: 22px; padding: 2px 6px; border-radius: 5px; border: 1px solid var(--rule-strong); border-bottom-width: 2px; font: 600 12.5px/1.3 var(--f-body); text-align: center; background: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
