:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f9fafc;
  --ink: #172231;
  --muted: #697789;
  --line: #e3e8f0;
  --accent: #e3532f;
  --accent-dark: #bc3f21;
  --nav: #102637;
  --nav-2: #17384c;
  --teal: #147f78;
  --green: #16765c;
  --red: #b63d3d;
  --blue: #316fa8;
  --shadow: 0 18px 45px rgba(25, 39, 62, .08);
  --shadow-strong: 0 24px 80px rgba(11, 31, 49, .18);
  --radius: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 0%, rgba(227, 83, 47, .10), transparent 28rem),
    radial-gradient(circle at 92% 10%, rgba(20, 127, 120, .12), transparent 24rem),
    var(--bg);
}

.build-banner {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 10px 14px;
  color: #593800;
  background: #fff1b8;
  border-bottom: 1px solid #e0bc58;
  text-align: center;
  font-size: .875rem;
  font-weight: 800;
}

button, input, textarea { font: inherit; }
button, a, input, textarea { outline-offset: 4px; }
button {
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: .875rem;
  font-weight: 700;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
    background-color .18s var(--ease), border-color .18s var(--ease),
    color .18s var(--ease), opacity .18s var(--ease);
}
button:hover:not(:disabled) { transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(0) scale(.99); }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(37, 168, 170, .38);
}
a { color: var(--teal); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.55rem, 2vw, 2.25rem); line-height: 1.2; margin-bottom: 10px; }
h2 { font-size: 1.1rem; margin-bottom: 8px; }
h3 { font-size: 1rem; }
p { line-height: 1.75; }

.muted { color: var(--muted); font-size: .94rem; margin-bottom: 0; }
.small, .field-help, .fine-print { font-size: .8125rem; color: var(--muted); line-height: 1.7; }
.field-help { margin: -10px 0 20px; }
.fine-print { margin: 18px 0; }
.full { width: 100%; }
.mobile-only { display: none; }

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #f07538);
  box-shadow: 0 10px 22px rgba(227, 83, 47, .22);
}
.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-dark), #df542e);
  box-shadow: 0 14px 28px rgba(227, 83, 47, .28);
}
.secondary { background: #fff; border: 1px solid var(--line); color: var(--ink); box-shadow: 0 8px 20px rgba(30, 45, 65, .05); }
.quiet { background: #eef3f6; color: #465868; }
.danger-outline { background: transparent; border: 1px solid #efc8c8; color: var(--red); }
.text-button { padding: 0; color: inherit; background: none; text-align: left; border-radius: 0; }
.text-button:hover:not(:disabled) { transform: none; color: var(--accent); }
.icon-button { padding: 8px 10px; background: transparent; color: inherit; font-size: 1.2rem; }

.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand strong { font-size: 1.2rem; letter-spacing: .5px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 40px;
  border-radius: 12px 12px 12px 4px;
  color: #fff;
  background: linear-gradient(145deg, #ff6b3f, #d84423);
  box-shadow: 0 10px 20px rgba(227, 83, 47, .25);
  font-size: 1.1rem;
  font-weight: 900;
}
.edition {
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: .75rem;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 32px;
}
.auth-card {
  width: 100%;
  max-width: 470px;
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(16px);
  animation: cardEnter .42s var(--ease) both;
}
.auth-card > .brand { margin-bottom: 34px; }
.auth-card h1 { font-size: 1.55rem; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin: 24px 0;
  border-radius: 10px;
  background: #edf2f6;
}
.auth-tabs button { border-radius: 7px; background: transparent; color: var(--muted); }
.auth-tabs button.selected { background: #fff; color: var(--accent); box-shadow: 0 7px 16px rgba(31, 46, 66, .08); }

label { display: block; margin-bottom: 20px; font-size: .875rem; font-weight: 700; }
.friend-pick-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: end; }
.friend-pick-row label { margin-bottom: 0; }
.friend-pick-row button { margin-bottom: 0; white-space: nowrap; }
input, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  padding: 12px 13px;
  border: 1px solid #d7e0e8;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  line-height: 1.5;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease);
}
textarea { resize: vertical; }
input:focus, textarea:focus { border-color: rgba(20, 127, 120, .72); box-shadow: 0 0 0 4px rgba(20, 127, 120, .12); }
input::placeholder, textarea::placeholder { color: #8492a1; font-weight: 400; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; line-height: 1.7; font-size: .8125rem; }
.check input { width: 16px; height: 16px; flex: none; margin: 4px 0; accent-color: var(--teal); }
.auth-foot { margin: 25px 0 0; text-align: center; color: var(--muted); font-size: .75rem; }
.error { color: var(--red); font-size: .875rem; background: #fff0ef; padding: 10px; border-radius: 8px; }
.setup-card { max-width: 720px; }
.setup-form { margin-top: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 160px; gap: 14px; }
.cookie-guide { margin: 14px 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.cookie-guide ol { margin: 8px 0 0; padding-left: 22px; }
.cookie-guide li { margin: 4px 0; }
.state-import textarea { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8125rem; }
.import-wizard { scroll-margin-top: 76px; }
.pairing-box { margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.pairing-code { margin: 14px 0 8px; padding: 12px; border: 1px dashed var(--accent); border-radius: 8px; color: var(--accent); background: #fff; font: 800 1.6rem ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0; text-align: center; }

.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 30px 18px 18px;
  color: #f4f8fb;
  background: linear-gradient(180deg, var(--nav), #0b1d2b);
  box-shadow: inset -1px 0 rgba(255, 255, 255, .05);
}
.sidebar > .brand { padding: 0 12px; margin-bottom: 46px; }
.sidebar-caption { padding: 0 14px; margin-bottom: 14px; color: #87a0b2; font-size: .75rem; }
.sidebar nav { display: grid; gap: 8px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  text-align: left;
  color: #b9cbd8;
  background: transparent;
  border-radius: 9px;
  font-weight: 600;
}
.nav-item > span { width: 18px; font-size: 1.05rem; text-align: center; }
.nav-item:hover:not(:disabled) { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(227, 83, 47, .26), rgba(255, 255, 255, .07));
  box-shadow: inset 3px 0 var(--accent);
}
.sidebar-bottom { margin-top: auto; display: grid; gap: 16px; padding: 20px 10px 0; }
.sidebar-bottom > .small { color: #88a0b0; }
.sidebar-bottom > .text-button { color: #b9cbd8; font-size: .75rem; font-weight: 500; }
.user-line { display: flex; align-items: center; gap: 9px; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 20px; }
.user-line > div:nth-child(2) { min-width: 0; }
.user-line strong { display: block; max-width: 118px; overflow: hidden; text-overflow: ellipsis; font-size: .875rem; }
.user-line .small { display: block; color: #a8bfcd; font-size: .75rem; }
.user-line .icon-button { margin-left: auto; }
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  color: #d8e9ef;
  background: rgba(255, 255, 255, .06);
}

.workspace { min-width: 0; width: 100%; max-width: 1480px; margin: auto; padding: 0 38px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  height: 84px;
  border-bottom: 1px solid rgba(227, 232, 240, .86);
  color: var(--muted);
  font-size: .8125rem;
  background: rgba(246, 247, 251, .82);
  backdrop-filter: blur(14px);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar .quiet { padding: 7px 12px; background: rgba(255, 255, 255, .65); border: 1px solid rgba(227, 232, 240, .9); }

.view { padding-top: 32px; min-height: calc(100dvh - 148px); }
.page-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 0 0 28px; }
.title-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.eyebrow { margin-bottom: 10px; color: var(--teal); font-size: .6875rem; letter-spacing: 2px; font-weight: 900; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stats article {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 23px;
  border: 1px solid rgba(227, 232, 240, .9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 30px rgba(25, 39, 62, .05);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.stats article:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(20, 127, 120, .2); }
.stats article > span { color: var(--muted); font-size: .8125rem; }
.stats strong { font-size: 2rem; font-weight: 750; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stats small { color: #84919e; font-size: .6875rem; line-height: 1.5; }
.stats .attention-stat strong { color: var(--accent); }

.account-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px 22px;
  border: 1px solid #d4e7e7;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #eaf6f5, #f8fbfb);
  box-shadow: 0 12px 32px rgba(16, 56, 72, .05);
}
.account-symbol {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--nav), var(--nav-2));
  font-size: 1.3rem;
}
.account-copy { min-width: 0; flex: 1; }
.account-copy > strong { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .9rem; }
.account-copy p { margin-top: 5px; font-size: .8125rem; }

.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 6px;
  background: #eef2f6;
  color: #617284;
  font-size: .6875rem;
  line-height: 1.45;
  font-weight: 700;
  white-space: nowrap;
}
.badge.ok { color: var(--green); background: #ddf2eb; }
.badge.warn { color: #a75b17; background: #fff0d9; }
.badge.bad { color: var(--red); background: #ffebe9; }
.badge.info { color: var(--blue); background: #e6f0fb; }

.panel {
  overflow: hidden;
  border: 1px solid rgba(227, 232, 240, .95);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 42px rgba(25, 39, 62, .055);
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 23px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fbfcfd);
}
.panel-heading h2 { margin-bottom: 6px; }
.panel-heading .small { font-size: .75rem; }
.task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: var(--surface-soft); }
.task-name { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.task-name strong { overflow-wrap: anywhere; font-size: 1rem; }
.task-message { margin: 8px 0 12px; color: var(--muted); font-size: .875rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: .75rem; }
.task-meta .time { color: var(--ink); font-weight: 700; }
.task-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; max-width: 330px; }
.task-actions button { padding: 8px 10px; font-size: .75rem; }
.task-actions .delete { color: var(--red); }
.toggle { border: 1px solid #ccd9e2; background: #eef3f6; color: #5b6d7d; }
.toggle.enabled { border-color: #b9ddcc; background: #e5f4ec; color: var(--green); }

.empty { padding: 48px 24px; text-align: center; }
.empty-symbol {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 17px;
  border-radius: 14px;
  color: #7891a1;
  background: #f0f4f7;
  font-size: 1.7rem;
}
.empty h3 { margin-bottom: 8px; }
.empty p { max-width: 460px; margin: 0 auto 20px; color: var(--muted); font-size: .875rem; }
.empty button { font-size: .8125rem; }

.notice {
  margin-top: 22px;
  padding: 14px 18px;
  border: 1px solid #f0d8b4;
  border-radius: 10px;
  color: #80562a;
  background: #fff7eb;
  font-size: .8125rem;
  line-height: 1.7;
}
.notice.compact { margin: 0 0 18px; padding: 12px; }
.notice code { display: inline-block; margin: 10px 15px; overflow-wrap: anywhere; font-size: 1rem; }
#new-invite { margin: -5px 0 20px; }

.prose { max-width: 860px; padding: 28px; }
.prose p { color: #607284; font-size: .9375rem; line-height: 1.85; }
.prose h2:not(:first-child), .prose h3:not(:first-child) { margin-top: 24px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }

.log-row {
  display: grid;
  grid-template-columns: 145px 135px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 19px 24px;
  border-bottom: 1px solid var(--line);
  font-size: .8125rem;
}
.log-row:last-child { border: 0; }
.log-time { color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.log-detail { margin: 0; overflow-wrap: anywhere; line-height: 1.7; }

.user-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
}
.user-row:last-child { border: 0; }
.user-row .user-info { flex: 1; min-width: 0; }
.user-info strong { overflow-wrap: anywhere; }
.user-info p { margin: 5px 0 0; color: var(--muted); font-size: .75rem; }
.user-row button { font-size: .75rem; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 25px 0;
  color: #91a0aa;
  font-size: .6875rem;
}

dialog {
  width: min(510px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 26px;
  border: 1px solid rgba(227, 232, 240, .95);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--shadow-strong);
}
dialog[open] { animation: modalIn .22s var(--ease) both; }
dialog::backdrop { background: rgba(11, 31, 49, .48); backdrop-filter: blur(4px); }
.login-dialog-wide { width: min(96vw, 1120px); max-width: 1120px; }
.remote-login { margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #0c1117; }
.remote-login-actions { display: flex; align-items: center; gap: 12px; margin: 12px 0; flex-wrap: wrap; }
.remote-login-actions a { text-decoration: none; }
.remote-login iframe { display: block; width: 100%; height: min(62vh, 720px); min-height: 430px; border: 0; background: #111827; }
.remote-login .small { margin: 0; padding: 9px 12px; color: #d7e0e8; background: #172231; }
.remote-login code { color: #fff; }
.login-snapshot { margin: 12px 0; }
.login-snapshot summary { cursor: pointer; color: var(--teal); font-weight: 800; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 20px; }
.dialog-heading h2 { margin: 0; font-size: 1.125rem; }
.dialog-heading .icon-button { padding: 0 6px; font-size: 1.5rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
dialog > p { color: var(--muted); font-size: .875rem; }
dialog .prose { padding: 0; }
.qr-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f6f8fa;
}
.qr-area img { width: 100%; max-width: 260px; height: auto; object-fit: contain; }
.qr-area p { margin: 15px 0 0; color: var(--muted); text-align: center; font-size: .8125rem; }
.login-progress { margin: 14px 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.login-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 8px; color: var(--muted); font-size: .8125rem; }
.login-progress-row strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.login-progress progress { width: 100%; height: 10px; overflow: hidden; border: 0; border-radius: 999px; background: #e8edf3; }
.login-progress progress::-webkit-progress-bar { background: #e8edf3; border-radius: 999px; }
.login-progress progress::-webkit-progress-value { background: linear-gradient(90deg, var(--accent), #f5a15d); border-radius: 999px; }
.login-progress progress::-moz-progress-bar { background: linear-gradient(90deg, var(--accent), #f5a15d); border-radius: 999px; }

.toast {
  position: fixed;
  z-index: 10;
  top: 20px;
  left: 50%;
  max-width: min(560px, 90vw);
  padding: 13px 22px;
  border-radius: 10px;
  color: #fff;
  background: #173342;
  box-shadow: 0 18px 40px rgba(24, 51, 69, .18);
  transform: translateX(-50%);
  font-size: .875rem;
  line-height: 1.7;
  animation: toastIn .18s var(--ease) both;
}
.toast.error-toast { background: #a43b33; }
[hidden] { display: none !important; }

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes enter {
  from { opacity: .35; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: no-preference) {
  .view { animation: enter .22s var(--ease) both; }
  .task-row, .stats article, .account-strip, .panel { will-change: transform; }
}

@media (min-width: 1500px) {
  .workspace { padding: 0 54px; }
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .workspace { padding: 0 24px; }
  .stats { gap: 12px; }
  .stats article { padding: 18px 16px; }
  .task-row { grid-template-columns: 1fr; }
  .task-actions { max-width: none; justify-content: flex-start; }
}

@media (max-width: 760px) {
  body { background: var(--bg); }
  .app-shell { display: block; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 4;
    height: auto;
    padding: 14px 16px 10px;
    gap: 14px;
  }
  .sidebar > .brand { margin: 0; padding: 0; }
  .sidebar-caption, .sidebar-bottom { display: none; }
  .sidebar nav {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .nav-item { flex: 0 0 auto; padding: 10px 12px; font-size: .8125rem; }
  .nav-item > span { display: none; }
  .nav-item.active { box-shadow: inset 0 -3px var(--accent); }
  .workspace { padding: 0 16px; }
  .topbar {
    height: 62px;
    top: 111px;
    margin-inline: -16px;
    padding-inline: 16px;
  }
  #breadcrumb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-right { gap: 6px; }
  .topbar .quiet { padding: 7px 10px; font-size: .75rem; }
  .mobile-only { display: inline-flex; }
  .view { min-height: 65dvh; padding-top: 24px; }
  .page-title { align-items: flex-start; gap: 12px; margin-bottom: 22px; }
  .page-title .primary { flex: none; white-space: nowrap; padding: 10px 12px; font-size: .75rem; }
  .eyebrow { font-size: .625rem; }
  .muted { font-size: .8125rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
  .stats article { padding: 17px; }
  .stats strong { font-size: 1.65rem; }
  .account-strip { flex-wrap: wrap; gap: 12px; padding: 16px; margin-bottom: 18px; }
  .account-copy { flex-basis: calc(100% - 60px); }
  .account-strip > button { margin-left: 58px; font-size: .75rem; }
  .panel-heading, .task-row { padding: 20px 17px; }
  .panel-heading { align-items: flex-start; }
  .task-name strong { font-size: .9375rem; }
  .task-actions { gap: 7px; }
  .log-row { grid-template-columns: 1fr auto; gap: 8px; padding: 18px; }
  .log-detail { grid-column: 1 / -1; }
  .prose { padding: 22px; }
  .user-row { align-items: flex-start; padding: 18px; }
  .auth-shell { padding: 20px; }
  .auth-card { padding: 26px; }
  .auth-card > .brand { margin-bottom: 30px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  footer { flex-direction: column; gap: 6px; font-size: .625rem; }
  dialog { padding: 22px; }
  .dialog-actions { justify-content: stretch; }
  .dialog-actions button { flex: 1; }
  .qr-area { min-height: 200px; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .page-title { display: grid; }
  .page-title .primary { width: 100%; }
  .task-actions button { flex: 1 1 calc(50% - 8px); }
  .account-strip > button { width: calc(100% - 58px); }
}
