:root {
  color-scheme: light;
  --bg: #f3f0e9;
  --bg-deep: #e7e1d8;
  --ink: #151416;
  --muted: #6c6964;
  --faint: #9b9790;
  --line: rgba(21, 20, 22, 0.11);
  --line-strong: rgba(21, 20, 22, 0.17);
  --surface: rgba(255, 255, 255, 0.58);
  --surface-strong: rgba(255, 255, 255, 0.86);
  --surface-soft: rgba(255, 255, 255, 0.36);
  --surface-solid: #faf8f4;
  --accent: #5b4bff;
  --accent-hot: #8c5cff;
  --accent-soft: rgba(91, 75, 255, 0.11);
  --accent-ink: #3f31c3;
  --control: rgba(21, 20, 22, 0.07);
  --control-hover: rgba(21, 20, 22, 0.11);
  --primary: #17161a;
  --primary-ink: #fff;
  --success: #258255;
  --warning: #9a620b;
  --danger: #a54239;
  --shadow: rgba(37, 31, 25, 0.13);
  --shadow-heavy: rgba(24, 20, 18, 0.23);
  --top-glow: rgba(128, 98, 255, 0.19);
  --bottom-glow: rgba(255, 134, 82, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  font-synthesis: none;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d10;
  --bg-deep: #151419;
  --ink: #f5f2ed;
  --muted: #aaa6a0;
  --faint: #737078;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.18);
  --surface: rgba(31, 30, 36, 0.7);
  --surface-strong: rgba(39, 37, 45, 0.9);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --surface-solid: #1b1a1f;
  --accent: #9f8cff;
  --accent-hot: #c078ff;
  --accent-soft: rgba(159, 140, 255, 0.15);
  --accent-ink: #c8bcff;
  --control: rgba(255, 255, 255, 0.08);
  --control-hover: rgba(255, 255, 255, 0.13);
  --primary: #f3efe9;
  --primary-ink: #161519;
  --success: #67c995;
  --warning: #e0a548;
  --danger: #ef8177;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-heavy: rgba(0, 0, 0, 0.52);
  --top-glow: rgba(102, 70, 255, 0.25);
  --bottom-glow: rgba(217, 91, 57, 0.1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ink);
  background: var(--bg);
  overscroll-behavior-y: none;
}
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 75% -4%, var(--top-glow), transparent min(45vw, 33rem)),
    radial-gradient(circle at 8% 96%, var(--bottom-glow), transparent min(50vw, 30rem)),
    var(--bg);
  pointer-events: none;
}
button, input { font: inherit; }
button { cursor: pointer; }
svg { display: block; }

.app-frame {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
}
.side-rail {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding: max(26px, env(safe-area-inset-top, 0px)) 18px max(22px, env(safe-area-inset-bottom, 0px));
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(28px) saturate(1.25);
}
.app-stage { min-width: 0; }
.content-shell {
  width: min(calc(100% - 72px), 1080px);
  margin: 0 auto;
  padding: max(34px, env(safe-area-inset-top, 0px)) 0 max(64px, env(safe-area-inset-bottom, 0px));
}
.mobile-header { display: none; }
.page { min-height: calc(100svh - 68px); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 690;
  letter-spacing: -.015em;
}
.brand-tile, .dialog-tile, .auth-mark {
  display: block;
  flex: 0 0 auto;
  background: linear-gradient(145deg, var(--accent-hot), var(--accent));
  box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 30%, transparent);
  transform: rotate(-5deg);
}
.brand-tile, .dialog-tile { width: 20px; height: 20px; border-radius: 6px; }
.rail-brand { min-height: 42px; padding: 0 10px; }
.side-nav { display: grid; gap: 6px; margin-top: 52px; }
.side-nav a, .rail-action {
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 13px;
  color: var(--muted);
  background: transparent;
  text-decoration: none;
  font-size: 14px;
  font-weight: 620;
  text-align: left;
}
.side-nav a:hover, .rail-action:hover { color: var(--ink); background: var(--surface-soft); }
.side-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-strong); box-shadow: 0 8px 24px var(--shadow); }
.side-nav svg, .rail-action svg, .bottom-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rail-footer { display: grid; gap: 4px; margin-top: auto; }
.presence {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  margin-bottom: 7px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 650;
  overflow: hidden;
}
.presence span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presence-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--faint); }
.presence[data-state="engaged"] .presence-dot { background: #35b978; }
.presence[data-state="attending"] .presence-dot { background: #dc942d; }
.presence[data-state="away"] .presence-dot { background: #8f8c86; }
.theme-symbol::before { content: "◐"; display: block; width: 20px; text-align: center; font-size: 18px; line-height: 1; }
:root[data-theme="dark"] .theme-symbol::before { content: "☀︎"; }

.auth-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(30px, env(safe-area-inset-top, 0px)) 22px max(30px, env(safe-area-inset-bottom, 0px));
}
.auth-card {
  width: min(100%, 650px);
  padding: clamp(34px, 7vw, 72px);
  border: 1px solid var(--line);
  border-radius: clamp(30px, 5vw, 48px);
  background: var(--surface);
  box-shadow: 0 36px 110px var(--shadow), inset 0 1px color-mix(in srgb, var(--ink) 7%, transparent);
  backdrop-filter: blur(28px) saturate(1.2);
}
.auth-mark { width: 54px; height: 54px; margin-bottom: 48px; border-radius: 17px; }
.auth-card h1 { max-width: 560px; font-size: clamp(48px, 9vw, 82px); }
.auth-copy { max-width: 520px; margin: 28px 0 32px; color: var(--muted); font-size: clamp(17px, 2.3vw, 21px); line-height: 1.45; letter-spacing: -.02em; }
.auth-button { min-width: 190px; }
.auth-button:disabled { cursor: wait; opacity: .58; transform: none; }
.field { width: min(100%, 390px); margin: -6px 0 18px; }
.field label, .passkey-add label { display: block; margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 650; }
.field input, .passkey-add input { width: 100%; min-height: 52px; padding: 0 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }

.setup-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0 -4px;
  padding: 14px 16px 14px 19px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 17px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 13px;
}
.setup-nudge strong { color: var(--ink); }
.setup-nudge button { min-height: 34px; border: 0; border-radius: 11px; padding: 0 12px; color: white; background: #5b4bff; font-size: 12px; font-weight: 720; }

.hero { min-height: calc(100svh - 70px); display: flex; flex-direction: column; justify-content: center; padding: 72px 0 64px; }
.eyebrow { margin: 0 0 17px; color: var(--accent); font-size: 11px; font-weight: 780; letter-spacing: .11em; text-transform: uppercase; }
h1 { max-width: 900px; margin: 0; font-size: clamp(52px, 8vw, 112px); line-height: .92; letter-spacing: -.068em; font-weight: 720; }
.lede { margin: 27px 0 36px; color: var(--muted); font-size: clamp(18px, 2vw, 23px); letter-spacing: -.025em; }
.capture {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: min(100%, 790px);
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 23px;
  background: var(--surface);
  box-shadow: 0 22px 65px var(--shadow), inset 0 1px color-mix(in srgb, var(--ink) 7%, transparent);
  backdrop-filter: blur(22px) saturate(1.2);
}
input { min-width: 0; min-height: 58px; padding: 0 18px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 18px; letter-spacing: -.02em; }
input::placeholder { color: var(--faint); }
.primary, .secondary {
  min-height: 54px;
  padding: 0 23px;
  border: 0;
  border-radius: 16px;
  font-weight: 710;
  letter-spacing: -.015em;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.primary { color: var(--primary-ink); background: var(--primary); box-shadow: 0 8px 18px var(--shadow); }
.primary:hover { transform: translateY(-1px); box-shadow: 0 11px 25px var(--shadow-heavy); }
.primary:active { transform: translateY(1px) scale(.99); }
.secondary { color: var(--ink); background: var(--control); }
.secondary:hover { background: var(--control-hover); }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 42%, transparent); outline-offset: 3px; }
.hint { min-height: 20px; margin: 15px 0 0 9px; color: var(--muted); font-size: 13px; }
.running h1 { max-width: 860px; font-size: clamp(43px, 7vw, 88px); }
.elapsed { margin: 34px 0 44px; color: var(--accent); font-size: clamp(64px, 11vw, 138px); line-height: .85; letter-spacing: -.07em; font-variant-numeric: tabular-nums; font-weight: 700; }
.actions, .dialog-actions, .section-heading { display: flex; align-items: center; justify-content: space-between; }
.actions { width: min(100%, 350px); justify-content: flex-start; gap: 10px; }
.review-note { margin: -25px 0 28px; color: var(--warning); font-size: 14px; font-weight: 650; }

.today { padding: 52px 0 0; border-top: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.section-heading > span { color: var(--muted); font-size: 13px; }
.timeline { margin: 26px 0 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 92px 1fr auto; gap: 16px; align-items: baseline; padding: 18px 2px; border-top: 1px solid var(--line); }
.timeline time, .timeline .duration { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.timeline strong { font-size: 16px; font-weight: 610; }

.page-intro { padding: clamp(80px, 11vw, 132px) 0 66px; }
.page-intro h1 { max-width: 940px; font-size: clamp(55px, 8vw, 104px); }
.page-intro > p:last-child { max-width: 680px; margin: 30px 0 0; color: var(--muted); font-size: clamp(18px, 2.1vw, 23px); line-height: 1.45; letter-spacing: -.025em; }
.profile-intro { padding-bottom: 58px; }
.summary-legend { display: flex; flex-wrap: wrap; gap: 22px; padding: 17px 0; border-block: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 620; }
.summary-legend i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 3px; }
.confirmed-dot { background: var(--accent); }
.observed-dot { border: 1px solid var(--muted); background: repeating-linear-gradient(135deg, transparent 0 2px, var(--muted) 2px 3px); }
.gap-dot { border: 1px dashed var(--faint); }
.week { border-bottom: 1px solid var(--line); }
.day-card { padding: 25px 0 27px; border-top: 1px solid var(--line); }
.day-card:first-child { border-top: 0; }
.day-card header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.day-card header div { display: flex; align-items: baseline; gap: 12px; }
.day-card header span { color: var(--accent); font-size: 12px; font-weight: 740; text-transform: uppercase; letter-spacing: .07em; }
.day-card header strong { font-size: 23px; letter-spacing: -.035em; }
.day-card header small { color: var(--muted); font-size: 12px; }
.summary-lane { display: grid; grid-template-columns: 90px 1fr; gap: 15px; margin-top: 8px; }
.lane-label { padding-top: 8px; color: var(--muted); font-size: 11px; font-weight: 720; text-transform: uppercase; letter-spacing: .06em; }
.lane-content { display: flex; flex-wrap: wrap; gap: 7px; min-height: 33px; }
.lane-content > span { padding: 8px 11px; border-radius: 11px; font-size: 12px; font-weight: 620; }
.summary-lane.confirmed .lane-content > span:not(.lane-empty) { color: var(--accent-ink); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }
.summary-lane.observed .lane-content > span:not(.lane-empty) { color: var(--muted); background: repeating-linear-gradient(135deg, var(--control) 0 5px, transparent 5px 10px); border: 1px solid var(--line); font-weight: 560; }
.lane-content .lane-empty { width: 100%; color: var(--faint); border: 1px dashed var(--line-strong); background: transparent; font-weight: 520; }
.summary-note { max-width: 620px; margin: 28px 0 70px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.settings-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: center;
  margin-top: 13px;
  padding: clamp(25px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: inset 0 1px color-mix(in srgb, var(--ink) 7%, transparent);
  backdrop-filter: blur(18px) saturate(1.15);
}
.appearance-card { border-color: color-mix(in srgb, var(--accent) 20%, var(--line)); }
.settings-copy .eyebrow { margin-bottom: 9px; }
.settings-copy h2 { margin: 0; font-size: clamp(28px, 4vw, 39px); letter-spacing: -.045em; }
.settings-copy > p:not(.eyebrow) { max-width: 590px; margin: 13px 0 0; color: var(--muted); line-height: 1.45; }
.settings-copy .privacy-line { font-size: 12px; }
.settings-action { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 145px; }
.state-pill { align-self: end; padding: 7px 10px; border-radius: 999px; color: var(--muted); background: var(--control); font-size: 11px; font-weight: 720; }
.state-pill[data-state="ready"] { color: var(--success); background: color-mix(in srgb, var(--success) 13%, transparent); }
.state-pill[data-state="denied"], .state-pill[data-state="error"] { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.compact { min-height: 42px; padding: 0 16px; border-radius: 13px; font-size: 13px; }
.theme-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; min-width: 232px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: var(--control); }
.theme-choice button { min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 680; }
.theme-choice button[aria-pressed="true"] { color: var(--ink); background: var(--surface-strong); box-shadow: 0 5px 16px var(--shadow); }
.security { margin-top: 36px; padding: 58px 0 30px; border-top: 1px solid var(--line); }
.security-heading { align-items: end; gap: 30px; }
.security-heading .eyebrow { margin-bottom: 10px; }
.security-heading h2 { margin: 0; font-size: 38px; letter-spacing: -.05em; }
.security-heading > span { max-width: 300px; text-align: right; line-height: 1.4; }
.passkey-add { width: min(100%, 620px); margin: 38px 0 30px; }
.passkey-add-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.passkey-add-row .secondary { min-height: 52px; }
.passkey-table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
.passkey-table { width: 100%; border-collapse: collapse; text-align: left; }
.passkey-table th { padding: 15px 12px 12px 0; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.passkey-table td { padding: 20px 12px 20px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; vertical-align: middle; }
.passkey-table td:first-child { min-width: 210px; color: var(--ink); }
.passkey-table td:last-child { padding-right: 0; text-align: right; }
.passkey-table strong { display: inline-block; font-size: 15px; }
.passkey-table small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.current-badge { display: inline-block; margin-left: 8px; padding: 3px 7px; border-radius: 999px; color: var(--success); background: color-mix(in srgb, var(--success) 13%, transparent); font-size: 10px; font-weight: 750; vertical-align: 2px; }
.remove-passkey { padding: 8px 10px; border: 0; border-radius: 10px; color: var(--danger); background: transparent; font-size: 12px; font-weight: 700; }
.remove-passkey:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.remove-passkey:disabled { color: var(--faint); cursor: not-allowed; }
.status { min-height: 20px; margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.profile-lock { min-height: 44px; margin-top: 22px; padding-inline: 17px; font-size: 13px; }

dialog { width: min(calc(100% - 32px), 430px); padding: 30px; border: 1px solid var(--line); border-radius: 28px; color: var(--ink); background: var(--surface-solid); box-shadow: 0 30px 100px var(--shadow-heavy); }
dialog::backdrop { background: rgba(5, 4, 7, .32); backdrop-filter: blur(4px); }
dialog h2 { margin: 26px 0 8px; font-size: 35px; letter-spacing: -.045em; }
dialog p:not(.eyebrow) { margin: 0 0 25px; color: var(--muted); }
.dialog-actions { justify-content: flex-start; gap: 9px; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 12px)); transform: translate(-50%, 20px); padding: 11px 15px; border-radius: 999px; color: #fff; background: rgba(17,17,19,.92); box-shadow: 0 12px 30px var(--shadow-heavy); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity 180ms ease, transform 180ms ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.bottom-nav { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 760px) {
  .app-frame { display: block; }
  .side-rail { display: none; }
  .app-stage { min-height: 100svh; }
  .mobile-header {
    position: sticky;
    z-index: 15;
    top: 0;
    min-height: calc(58px + env(safe-area-inset-top, 0px));
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: max(12px, env(safe-area-inset-top, 0px)) 18px 10px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: blur(28px) saturate(1.35);
  }
  .icon-button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 14px; color: var(--ink); background: var(--control); }
  .icon-button .theme-symbol::before { width: auto; }
  .content-shell { width: 100%; padding: 0 18px calc(88px + env(safe-area-inset-bottom, 0px)); }
  .page { min-height: calc(100svh - 62px - env(safe-area-inset-top, 0px)); }
  .bottom-nav {
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    min-height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 6px 12px max(6px, env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    box-shadow: 0 -10px 32px var(--shadow);
    backdrop-filter: blur(30px) saturate(1.4);
  }
  .bottom-nav a { min-height: 51px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 13px; color: var(--muted); text-decoration: none; font-size: 10px; font-weight: 680; }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
  .setup-nudge { align-items: flex-start; margin: 16px 0 0; }
  .hero { min-height: calc(100svh - 146px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); padding: 48px 0 42px; }
  h1 { font-size: clamp(50px, 15vw, 70px); }
  .lede { margin: 22px 0 28px; font-size: 18px; }
  .capture { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 6px; border-radius: 19px; }
  .capture input { min-height: 52px; padding: 0 12px; font-size: 16px; }
  .capture .primary { min-height: 52px; padding: 0 17px; border-radius: 14px; }
  .running h1 { font-size: 44px; }
  .elapsed { font-size: 18vw; margin: 30px 0 38px; }
  .today { padding-top: 38px; }
  .timeline li { grid-template-columns: 68px 1fr; gap: 12px; }
  .timeline .duration { grid-column: 2; }
  .page-intro { padding: 58px 0 44px; }
  .page-intro h1 { font-size: 14.5vw; }
  .page-intro > p:last-child { margin-top: 22px; font-size: 18px; }
  .summary-legend { gap: 12px 18px; }
  .summary-lane { grid-template-columns: 1fr; gap: 6px; margin-top: 15px; }
  .lane-label { padding-top: 0; }
  .day-card header { align-items: start; }
  .day-card header div { flex-direction: column; gap: 3px; }
  .settings-card { grid-template-columns: 1fr; gap: 24px; padding: 25px 21px; border-radius: 23px; }
  .settings-action { min-width: 0; }
  .state-pill { align-self: start; }
  .theme-choice { min-width: 0; width: 100%; }
  .security { padding-top: 46px; }
  .security-heading { align-items: start; flex-direction: column; gap: 10px; }
  .security-heading > span { text-align: left; }
  .passkey-add { margin-top: 30px; }
  .passkey-add-row { grid-template-columns: 1fr; }
  .passkey-table-wrap { border-top: 0; overflow: visible; }
  .passkey-table, .passkey-table tbody { display: block; }
  .passkey-table thead { display: none; }
  .passkey-table tr { display: grid; grid-template-columns: 1fr auto; align-items: center; margin-top: 9px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
  .passkey-table td { display: none; padding: 0; border: 0; }
  .passkey-table td:first-child, .passkey-table td:last-child { display: block; min-width: 0; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); max-width: calc(100% - 36px); text-align: center; }
}

@media (max-width: 355px) {
  .capture { grid-template-columns: 1fr; }
  .capture .primary { width: 100%; }
}

@media (min-width: 761px) and (max-width: 980px) {
  .app-frame { grid-template-columns: 86px minmax(0, 1fr); }
  .side-rail { padding-inline: 13px; }
  .rail-brand > span:last-child, .side-nav span, .rail-action span, .presence span:last-child { display: none; }
  .rail-brand, .side-nav a, .rail-action { justify-content: center; padding-inline: 0; }
  .presence { justify-content: center; padding-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@supports not (backdrop-filter: blur(1px)) {
  .side-rail, .mobile-header, .bottom-nav { background: var(--bg); }
  .capture, .settings-card, .auth-card { background: var(--surface-solid); }
}
