:root {
  color-scheme: light dark;
  --bg: #f2f2ef;
  --surface: #fbfbf8;
  --surface-2: #e9e9e4;
  --surface-3: #deded8;
  --ink: #0b0c0c;
  --ink-2: #3f4241;
  --ink-3: #696d6a;
  --line: rgba(11, 12, 12, .12);
  --line-strong: rgba(11, 12, 12, .24);
  --accent: #087c72;
  --accent-bright: #31d7c6;
  --accent-soft: rgba(8, 124, 114, .12);
  --accent-ink: #034c46;
  --danger: #8c2f2f;
  --shadow: 0 14px 38px rgba(10, 15, 14, .055), 0 2px 7px rgba(10, 15, 14, .035);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-scale: 1;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

html[data-theme="dark"] {
  --bg: #0b0c0c;
  --surface: #131514;
  --surface-2: #1b1e1d;
  --surface-3: #272b29;
  --ink: #f4f5f1;
  --ink-2: #c5c8c4;
  --ink-3: #8e9490;
  --line: rgba(244, 245, 241, .12);
  --line-strong: rgba(244, 245, 241, .25);
  --accent: #31d7c6;
  --accent-bright: #5ae5d8;
  --accent-soft: rgba(49, 215, 198, .12);
  --accent-ink: #8bf0e6;
  --danger: #ff9d9d;
  --shadow: 0 18px 52px rgba(0, 0, 0, .28), 0 2px 9px rgba(0, 0, 0, .15);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --bg: #0b0c0c;
    --surface: #131514;
    --surface-2: #1b1e1d;
    --surface-3: #272b29;
    --ink: #f4f5f1;
    --ink-2: #c5c8c4;
    --ink-3: #8e9490;
    --line: rgba(244, 245, 241, .12);
    --line-strong: rgba(244, 245, 241, .25);
    --accent: #31d7c6;
    --accent-bright: #5ae5d8;
    --accent-soft: rgba(49, 215, 198, .12);
    --accent-ink: #8bf0e6;
    --danger: #ff9d9d;
    --shadow: 0 18px 52px rgba(0, 0, 0, .28), 0 2px 9px rgba(0, 0, 0, .15);
  }
}

html[data-text-scale="large"] { --font-scale: 1.12; }

* { box-sizing: border-box; }
html {
  min-height: 100%;
  background: var(--bg);
  font-size: calc(16px * var(--font-scale));
  scroll-behavior: smooth;
  scroll-padding-top: calc(76px + var(--safe-top));
}
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, textarea, select, input { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
textarea { resize: vertical; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 999;
  left: 16px;
  top: -100px;
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
}
.skip-link:focus { top: calc(10px + var(--safe-top)); }

.boot-screen, .fatal-screen, .no-script {
  min-height: 100dvh;
  padding: 28px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
}
.boot-screen p { margin: 0; color: var(--ink-2); font-weight: 650; }
.fatal-screen h1, .no-script h1 { margin: 4px 0 0; font-size: 2rem; letter-spacing: -.05em; }
.fatal-screen p, .no-script p { max-width: 460px; margin: 0; color: var(--ink-2); line-height: 1.5; }
.fatal-screen button { min-height: 48px; margin-top: 10px; padding: 0 18px; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 750; }

.sign-in-screen {
  min-height: 100dvh;
  padding: max(24px, var(--safe-top)) 18px max(24px, var(--safe-bottom));
  display: grid;
  place-items: center;
}
.sign-in-card {
  width: min(100%, 470px);
  padding: clamp(24px, 6vw, 38px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.sign-in-brand { margin-bottom: 44px; display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.03em; }
.sign-in-card h1 { margin: 8px 0 12px; font-size: clamp(2.45rem, 11vw, 4.15rem); line-height: .94; letter-spacing: -.065em; }
.sign-in-intro { margin: 0 0 26px; color: var(--ink-2); line-height: 1.5; }
.sign-in-form { display: grid; }
.sign-in-form label { margin: 0 0 8px; color: var(--ink-2); font-size: .82rem; font-weight: 760; }
.sign-in-form label:not(:first-child) { margin-top: 16px; }
.sign-in-form input {
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: var(--bg);
}
.sign-in-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sign-in-form .primary-action { margin-top: 22px; }
.sign-in-error { margin: 14px 2px -3px; color: var(--danger); font-size: .86rem; line-height: 1.4; }
.sign-in-boundary { margin: 20px 0 0; color: var(--ink-3); font-size: .76rem; line-height: 1.45; }

.mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  background: #e4ecf5;
}
.mark img { width: 100%; height: 100%; object-fit: cover; }

.app-shell { min-height: 100dvh; padding-bottom: calc(96px + var(--safe-bottom)); }
.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  min-height: calc(64px + var(--safe-top));
  padding: calc(8px + var(--safe-top)) max(16px, calc((100vw - 900px) / 2)) 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.brand-button, .profile-button { min-height: 46px; background: transparent; display: flex; align-items: center; }
.brand-button { gap: 10px; padding: 0; }
.brand-name { font-size: .95rem; font-weight: 780; letter-spacing: -.03em; }
.profile-button {
  gap: 8px;
  padding: 5px 7px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.profile-button-copy { display: none; min-width: 58px; text-align: left; }
.profile-button-copy strong, .profile-button-copy small { display: block; }
.profile-button-copy strong { font-size: .77rem; letter-spacing: -.01em; }
.profile-button-copy small { margin-top: 1px; color: var(--ink-3); font-size: .72rem; }
.sync-dot { display: inline-block; width: 5px; height: 5px; margin: 0 5px 1px 0; border-radius: 50%; background: var(--ink-3); }
.sync-dot.synced { background: var(--accent); }
.sync-dot.error { background: var(--danger); }
.sync-dot.saving { animation: pulse 1s infinite alternate; }

.avatar { display: grid; place-items: center; background: var(--surface-2); font-size: .76rem; font-weight: 820; letter-spacing: .035em; }
.avatar.small { width: 34px; height: 34px; border-radius: 9px; }
.avatar.large { width: 68px; height: 68px; border-radius: 18px; font-size: 1rem; }

.app-main { width: min(100%, 760px); margin: 0 auto; }
.screen { padding: 22px 18px 44px; animation: enter 220ms var(--ease-out); }
.screen-intro { margin: 4px 2px 20px; }
.screen-intro h1 {
  max-width: 650px;
  margin: 6px 0 10px;
  font-size: clamp(2.2rem, 8.8vw, 4.65rem);
  line-height: .98;
  letter-spacing: -.058em;
  font-weight: 760;
}
.screen-intro > p:last-child { max-width: 590px; margin: 0; color: var(--ink-2); font-size: .98rem; line-height: 1.48; }
.screen-intro.compact h1 { font-size: clamp(2.12rem, 8vw, 4.05rem); }
.greeting { margin: 0; color: var(--ink-2); font-weight: 680; }
.eyebrow { margin: 0; color: var(--ink-3); font-size: .76rem; font-weight: 820; letter-spacing: .105em; text-transform: uppercase; }


.resume-card {
  min-height: 82px;
  margin: -8px 0 14px;
  padding: 13px 13px 13px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 15px;
  background: var(--surface);
}
.resume-copy { min-width: 0; }
.resume-copy span, .resume-copy strong, .resume-copy small { display: block; }
.resume-copy span { color: var(--ink-3); font-size: .75rem; font-weight: 760; }
.resume-copy strong { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.resume-copy small { margin-top: 4px; color: var(--ink-3); font-size: .74rem; line-height: 1.3; }
.resume-actions { display: flex; align-items: center; gap: 5px; }
.resume-primary, .resume-dismiss { min-height: 44px; border-radius: 11px; font-weight: 760; }
.resume-primary { padding: 0 14px; background: var(--ink); color: var(--bg); }
.resume-dismiss { width: auto; min-width: 44px; padding: 0 10px; display: grid; place-items: center; background: transparent; color: var(--ink-3); font-size: .72rem; }

.start-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.start-card label, .modal-form label { display: block; margin: 0 0 8px; color: var(--ink-2); font-size: .82rem; font-weight: 760; }
.start-card textarea, .modal-form textarea, .modal-form select {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  padding: 15px 16px;
  outline: none;
  font-size: 1.08rem;
  line-height: 1.46;
}
.start-card textarea { min-height: 88px; max-height: 190px; }
.start-card textarea::placeholder, .modal-form textarea::placeholder { color: var(--ink-3); }
.start-card textarea:focus, .modal-form textarea:focus, .modal-form select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.primary-action, .secondary-action {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 13px;
  font-weight: 780;
  letter-spacing: -.015em;
  transition: transform 150ms var(--ease-out), background 150ms ease;
}
.primary-action { margin-top: 12px; background: var(--ink); color: var(--bg); }
.secondary-action { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.primary-action:not(:disabled):active, .secondary-action:active, .quick-grid button:active, .cannot-choose:active, .choice-row:active, .today-card button:active { transform: scale(.985); }
.text-action { min-height: 46px; padding: 8px 12px; background: transparent; color: var(--ink-2); font-weight: 700; }
.danger-text { color: var(--danger); }
.privacy-line { margin: 10px 0 0; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--ink-3); font-size: .78rem; }

.quick-section { margin-top: 20px; }
.section-heading { min-height: 32px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-heading h2 { margin: 0; font-size: 1rem; letter-spacing: -.025em; }
.section-heading > span { color: var(--ink-3); font-size: .78rem; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.quick-grid button {
  min-height: 72px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
  font-weight: 720;
  line-height: 1.18;
  transition: transform 150ms var(--ease-out), border-color 150ms ease;
}
.quick-grid button:hover { border-color: var(--line-strong); }
.quick-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.cannot-choose {
  width: 100%;
  min-height: 60px;
  margin: 9px 0 18px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  color: var(--ink-2);
  text-align: left;
}
.cannot-choose > span { min-width: 0; display: flex; align-items: center; gap: 11px; }
.cannot-choose > span > span { min-width: 0; display: grid; gap: 3px; }
.cannot-choose strong { color: var(--ink); font-size: .94rem; }
.cannot-choose small { color: var(--ink-3); font-size: .76rem; line-height: 1.3; }
.gentle-boundary { max-width: 510px; margin: 26px auto 0; color: var(--ink-3); font-size: .78rem; line-height: 1.48; text-align: center; }

.bottom-nav {
  position: fixed;
  z-index: 40;
  left: 12px;
  right: 12px;
  bottom: calc(10px + var(--safe-bottom));
  height: 68px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  box-shadow: 0 18px 55px rgba(8, 14, 13, .14);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.bottom-nav button {
  position: relative;
  min-width: 0;
  min-height: 56px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 3px;
  border-radius: 15px;
  background: transparent;
  color: var(--ink-3);
}
.bottom-nav button span { font-size: .71rem; font-weight: 730; }
.bottom-nav button.active { background: var(--ink); color: var(--bg); }
.bottom-nav button.active::after { content: ""; position: absolute; top: 8px; right: calc(50% - 17px); width: 5px; height: 5px; border-radius: 50%; background: var(--accent-bright); }

/* Today */
.today-list { display: grid; gap: 10px; }
.today-card {
  min-height: 96px;
  padding: 12px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.today-card.done { border-color: var(--line-strong); background: var(--surface-2); }
.today-card.empty { grid-template-columns: 44px minmax(0, 1fr) auto; }
.today-icon, .today-check { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); }
.today-check { border: 1px solid var(--line); }
.today-check:not(:empty) { background: var(--ink); color: var(--bg); }
.today-copy { min-width: 0; min-height: 58px; padding: 4px 0; display: block; background: transparent; text-align: left; }
.today-copy span, .today-copy strong, .today-copy small, .today-card.empty div span, .today-card.empty div strong, .today-card.empty div small { display: block; }
.today-copy span, .today-card.empty div span { margin-bottom: 4px; color: var(--ink-3); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .075em; }
.today-copy strong, .today-card.empty div strong { overflow-wrap: anywhere; font-size: .98rem; line-height: 1.23; letter-spacing: -.018em; }
.today-copy small, .today-card.empty div small { margin-top: 5px; color: var(--ink-3); font-size: .76rem; line-height: 1.35; }
.start-small, .today-card.empty > button {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--bg);
  font-size: .76rem;
  font-weight: 770;
}
.today-card.empty > button { display: flex; align-items: center; gap: 5px; background: var(--surface-2); color: var(--ink); }
.plain-note { margin-top: 22px; padding: 18px; border-left: 3px solid var(--accent); background: var(--surface-2); }
.plain-note strong { display: block; margin-bottom: 5px; }
.plain-note p { margin: 0; color: var(--ink-2); font-size: .9rem; line-height: 1.48; }
.shutdown-card {
  width: 100%;
  min-height: 78px;
  margin-top: 12px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}
.shutdown-card > svg { width: 38px; height: 38px; padding: 8px; border-radius: 11px; background: var(--surface-2); color: var(--ink-2); }
.shutdown-card span, .shutdown-card strong, .shutdown-card small { display: block; }
.shutdown-card strong { font-size: .92rem; }
.shutdown-card small { margin-top: 4px; color: var(--ink-3); font-size: .76rem; line-height: 1.35; }
.shutdown-card.closed { grid-template-columns: 40px minmax(0, 1fr) auto; border-left: 3px solid var(--accent); }
.shutdown-card.closed > div > span { color: var(--ink-3); font-size: .71rem; font-weight: 810; letter-spacing: .075em; text-transform: uppercase; }
.shutdown-card.closed > div > strong { margin-top: 4px; line-height: 1.32; }
.shutdown-card.closed > button { min-height: 44px; padding: 0 12px; border-radius: 11px; background: var(--surface-2); font-size: .76rem; font-weight: 760; }

/* Together */
.together-actions { display: grid; gap: 9px; }
.together-actions .secondary-action { margin-top: 0; }
.request-section { margin-top: 30px; }
.request-section.mine { margin-top: 25px; }
.request-list { display: grid; gap: 10px; }
.request-card {
  padding: 15px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.request-card > .avatar { width: 42px; height: 42px; border-radius: 11px; }
.request-type { display: block; margin-bottom: 3px; color: var(--ink-3); font-size: .72rem; font-weight: 820; letter-spacing: .085em; text-transform: uppercase; }
.request-copy strong, .request-copy p, .request-copy small { display: block; }
.request-copy p { margin: 5px 0 7px; color: var(--ink-2); font-size: .91rem; line-height: 1.43; }
.request-copy small { color: var(--ink-3); font-size: .75rem; line-height: 1.35; }
.request-join, .request-close { min-height: 44px; border-radius: 11px; font-size: .78rem; font-weight: 780; }
.request-join { padding: 0 12px; background: var(--ink); color: var(--bg); }
.request-close { width: 44px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.request-close span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.joined-label { padding: 11px 2px; color: var(--accent); font-size: .76rem; font-weight: 800; }
.empty-state { padding: 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); color: var(--ink-2); }
.empty-state strong { color: var(--ink); }
.empty-state p { margin: 5px 0 0; line-height: 1.45; }
.privacy-card, .sync-card {
  margin-top: 22px;
  padding: 18px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.privacy-card svg, .sync-card svg { color: var(--accent); }
.privacy-card strong, .sync-card strong { display: block; margin-bottom: 4px; }
.privacy-card p, .sync-card p { margin: 0; color: var(--ink-2); font-size: .85rem; line-height: 1.46; }

/* Me */
.profile-hero { margin: 8px 0 32px; display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 16px; }
.profile-hero h1 { margin: 3px 0 4px; font-size: clamp(2.2rem, 9vw, 4.4rem); line-height: .95; letter-spacing: -.065em; }
.profile-hero > div > p:last-child { margin: 0; color: var(--ink-3); font-size: .78rem; }
.settings-section { margin-top: 28px; }
.choice-list { display: grid; gap: 8px; }
.choice-row {
  min-height: 74px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
}
.choice-row.selected { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.choice-row strong, .choice-row small { display: block; }
.choice-row strong { font-size: .92rem; }
.choice-row small { margin-top: 4px; color: var(--ink-3); font-size: .78rem; line-height: 1.38; }
.choice-row i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--surface-2); color: var(--accent); font-style: normal; }
.segmented, .mini-segmented { display: grid; gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.segmented.four { grid-template-columns: repeat(4, 1fr); }
.segmented button, .mini-segmented button { min-height: 44px; padding: 0 8px; border-radius: 9px; background: transparent; color: var(--ink-2); font-size: .76rem; font-weight: 750; }
.segmented button.selected, .mini-segmented button.selected { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.setting-note { margin: 9px 3px 0; color: var(--ink-3); font-size: .78rem; line-height: 1.45; }
.setting-card {
  min-height: 72px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--surface);
}
.setting-card:first-of-type { border-radius: 14px 14px 0 0; }
.setting-card:last-of-type { border-bottom: 1px solid var(--line); border-radius: 0 0 14px 14px; }
.setting-card > div:first-child strong, .setting-card > div:first-child small { display: block; }
.setting-card > div:first-child strong { font-size: .88rem; }
.setting-card > div:first-child small { margin-top: 3px; color: var(--ink-3); font-size: .76rem; }
.mini-segmented { display: flex; flex: 0 0 auto; }
.mini-segmented button { min-width: 50px; }
.install-action { margin-top: 9px; }
.privacy-copy { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.privacy-copy p { margin: 0; color: var(--ink-2); font-size: .86rem; line-height: 1.5; }
.privacy-copy p + p { margin-top: 10px; }
.danger-zone { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.danger-zone button, .danger-zone a { min-height: 48px; display: flex; align-items: center; gap: 9px; background: transparent; color: var(--danger); font-size: .8rem; font-weight: 730; text-decoration: none; }

/* Plan runner */
.runner-shell {
  --runner-bg: var(--bg);
  --runner-surface: var(--surface);
  --runner-surface-2: var(--surface-2);
  --runner-ink: var(--ink);
  --runner-ink-2: var(--ink-2);
  --runner-ink-3: var(--ink-3);
  --runner-line: var(--line);
  min-height: 100dvh;
  background: var(--runner-bg);
  color: var(--runner-ink);
}
.runner-header {
  min-height: calc(70px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) max(14px, calc((100vw - 1120px) / 2)) 10px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--runner-line);
  background: color-mix(in srgb, var(--runner-bg) 95%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.round-button { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--runner-line); border-radius: 14px; background: var(--runner-surface); color: var(--runner-ink); }
.runner-header-copy { min-width: 0; text-align: center; }
.runner-header-copy span, .runner-header-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runner-header-copy span { color: var(--runner-ink-3); font-size: .75rem; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.runner-header-copy strong { margin-top: 3px; font-size: .91rem; }
.runner-progress { height: 3px; background: var(--runner-surface-2); }
.runner-progress i { display: block; height: 100%; background: var(--accent); transition: width 320ms var(--ease-out); }
.runner-main { width: min(100%, 1120px); min-height: calc(100dvh - 70px - var(--safe-top)); margin: 0 auto; }
.step-stage { min-height: calc(100dvh - 70px - var(--safe-top)); padding: 24px 18px calc(26px + var(--safe-bottom)); display: flex; flex-direction: column; }
.runner-explainer { max-width: 590px; margin: 0 auto 18px; color: var(--runner-ink-2); font-size: .93rem; line-height: 1.48; text-align: center; }
.step-card {
  width: min(100%, 720px);
  min-height: 270px;
  margin: auto;
  padding: clamp(24px, 7vw, 52px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--runner-line);
  border-radius: 24px;
  background: var(--runner-surface);
  box-shadow: var(--shadow);
}
.step-card.is-smaller { border-color: color-mix(in srgb, var(--accent) 58%, var(--runner-line)); box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
.step-kicker { margin-bottom: 14px; color: var(--accent); font-size: .76rem; font-weight: 820; letter-spacing: .105em; text-transform: uppercase; }
.step-card h1 { max-width: 680px; margin: 0; font-size: clamp(2.2rem, 9vw, 4.65rem); line-height: .98; letter-spacing: -.058em; font-weight: 760; text-wrap: balance; }
.step-card p { max-width: 570px; margin: 18px 0 0; color: var(--runner-ink-2); font-size: .94rem; line-height: 1.5; }
.runner-actions { width: min(100%, 720px); margin: 20px auto 0; }
.runner-done { background: var(--runner-ink); color: var(--runner-bg); }
.runner-secondary { margin-top: 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 7px; }
.runner-secondary button {
  min-height: 50px;
  padding: 7px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--runner-line);
  border-radius: 12px;
  background: var(--runner-surface);
  color: var(--runner-ink-2);
  font-size: .76rem;
  font-weight: 700;
}
.quiet-offer {
  width: min(100%, 720px);
  min-height: 68px;
  margin: 16px auto -6px;
  padding: 11px 13px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--runner-line);
  border-radius: 15px;
  background: var(--runner-surface);
  color: var(--runner-ink);
  text-align: left;
}
.quiet-offer > svg:first-child { width: 38px; height: 38px; padding: 9px; border-radius: 11px; background: var(--runner-surface-2); color: var(--accent); }
.quiet-offer strong, .quiet-offer small { display: block; }
.quiet-offer strong { font-size: .92rem; letter-spacing: -.012em; }
.quiet-offer small { margin-top: 4px; color: var(--runner-ink-3); font-size: .76rem; line-height: 1.35; }
.return-note {
  width: min(100%, 720px);
  margin: 14px auto -4px;
  padding: 12px 10px 12px 13px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--runner-line);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  background: var(--runner-surface);
}
.return-note > svg { color: var(--accent); }
.return-note span, .return-note strong, .return-note small { display: block; }
.return-note span { color: var(--runner-ink-3); font-size: .71rem; font-weight: 810; letter-spacing: .075em; text-transform: uppercase; }
.return-note strong { margin-top: 3px; font-size: .88rem; line-height: 1.32; }
.return-note small { margin-top: 3px; color: var(--runner-ink-3); font-size: .74rem; line-height: 1.34; }
.return-note button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; background: var(--runner-surface-2); color: var(--runner-ink-3); }

/* Protected attention pocket */
.quiet-shell {
  --quiet-bg: var(--bg);
  --quiet-surface: var(--surface);
  --quiet-surface-2: var(--surface-2);
  --quiet-ink: var(--ink);
  --quiet-ink-2: var(--ink-2);
  --quiet-ink-3: var(--ink-3);
  --quiet-line: var(--line);
  min-height: 100dvh;
  background: var(--quiet-bg);
  color: var(--quiet-ink);
}
.quiet-header {
  min-height: calc(70px + var(--safe-top));
  padding: calc(10px + var(--safe-top)) max(14px, calc((100vw - 960px) / 2)) 10px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--quiet-line);
  background: color-mix(in srgb, var(--quiet-bg) 95%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.quiet-header > div { min-width: 0; text-align: center; }
.quiet-header span, .quiet-header strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiet-header span { color: var(--quiet-ink-3); font-size: .72rem; font-weight: 820; letter-spacing: .08em; text-transform: uppercase; }
.quiet-header strong { margin-top: 3px; font-size: .9rem; }
.header-spacer { width: 46px; height: 46px; }
.quiet-main {
  width: min(100%, 780px);
  min-height: calc(100dvh - 70px - var(--safe-top));
  margin: 0 auto;
  padding: clamp(28px, 7vw, 64px) 18px calc(34px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.quiet-intention { text-align: center; }
.quiet-intention .eyebrow { color: var(--quiet-ink-3); }
.quiet-intention h1 {
  max-width: 740px;
  margin: 10px auto 0;
  font-size: clamp(2.55rem, 10.8vw, 5.45rem);
  line-height: .96;
  letter-spacing: -.062em;
  font-weight: 760;
  text-wrap: balance;
}
.quiet-surface {
  width: min(100%, 600px);
  margin: 24px auto 0;
  padding: 13px 15px;
  border: 1px solid var(--quiet-line);
  border-radius: 13px;
  background: var(--quiet-surface);
  text-align: left;
}
.quiet-surface span, .quiet-surface strong { display: block; }
.quiet-surface span { color: var(--quiet-ink-3); font-size: .71rem; font-weight: 810; letter-spacing: .075em; text-transform: uppercase; }
.quiet-surface strong { margin-top: 4px; font-size: .88rem; line-height: 1.36; }
.quiet-clock-card {
  width: min(100%, 600px);
  margin: 20px auto 0;
  padding: 18px;
  border: 1px solid var(--quiet-line);
  border-radius: 18px;
  background: var(--quiet-surface);
  text-align: center;
}
.quiet-clock-card.running { border-color: color-mix(in srgb, var(--accent) 42%, var(--quiet-line)); box-shadow: inset 0 3px 0 var(--accent); }
.quiet-clock-card.ended { border-color: var(--line-strong); }
.quiet-clock-card > span { display: block; color: var(--quiet-ink-3); font-size: .73rem; font-weight: 820; letter-spacing: .08em; text-transform: uppercase; }
.quiet-clock-card > strong { display: block; margin-top: 5px; font-size: clamp(2.6rem, 13vw, 4.8rem); line-height: 1; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.quiet-clock-card > p { max-width: 470px; margin: 9px auto 0; color: var(--quiet-ink-2); font-size: .82rem; line-height: 1.42; }
.quiet-primary-actions { width: min(100%, 600px); margin: 16px auto 0; display: grid; gap: 8px; }
.quiet-primary-actions .primary-action { margin: 0; }
.quiet-primary-actions .secondary-action { margin: 0; background: transparent; }
.quiet-secondary-actions {
  width: min(100%, 600px);
  margin: 10px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.quiet-secondary-actions button {
  min-height: 54px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--quiet-line);
  border-radius: 12px;
  background: var(--quiet-surface);
  color: var(--quiet-ink-2);
  font-size: .75rem;
  font-weight: 730;
  line-height: 1.2;
  text-align: left;
}
.quiet-house-action {
  width: min(100%, 600px);
  min-height: 46px;
  margin: 8px auto 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--quiet-ink-3);
  font-size: .76rem;
  font-weight: 720;
}
.quiet-house-action:hover { color: var(--quiet-ink-2); }
.quiet-parking-summary {
  width: min(100%, 600px);
  margin: 14px auto 0;
  padding: 11px 13px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  border-top: 1px solid var(--quiet-line);
  color: var(--quiet-ink-3);
}
.quiet-parking-summary svg { margin-top: 1px; }
.quiet-parking-summary p { margin: 0; font-size: .76rem; line-height: 1.42; }
.break-main { justify-content: center; }
.break-copy { max-width: 590px; margin: 18px auto 0; color: var(--quiet-ink-2); font-size: .96rem; line-height: 1.52; }

.plan-map { padding: 10px 18px calc(30px + var(--safe-bottom)); }
.plan-map-heading { width: min(100%, 720px); margin: 0 auto 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plan-map-heading span { font-weight: 770; }
.plan-map-heading small { color: var(--runner-ink-3); font-size: .75rem; }
.plan-map ol { width: min(100%, 720px); margin: 0 auto; padding: 0; list-style: none; display: grid; gap: 8px; }
.plan-map li button {
  width: 100%;
  min-height: 64px;
  padding: 10px 13px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border: 1px solid var(--runner-line);
  border-radius: 13px;
  background: var(--runner-surface);
  color: var(--runner-ink-2);
  text-align: left;
}
.plan-map li button > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--runner-surface-2); font-size: .76rem; font-weight: 800; }
.plan-map li p { margin: 0; font-size: .88rem; line-height: 1.38; }
.plan-map li.current button { border-color: var(--accent); color: var(--runner-ink); box-shadow: inset 3px 0 0 var(--accent); }
.plan-map li.current button > span { background: var(--accent); color: var(--bg); }
.plan-map li.done button { color: var(--runner-ink-3); background: var(--runner-surface-2); }

.completion-shell { min-height: 100dvh; padding: calc(30px + var(--safe-top)) 18px calc(30px + var(--safe-bottom)); display: grid; place-items: center; background: var(--bg); color: var(--ink); }
.completion-card { width: min(100%, 560px); text-align: center; }
.completion-mark { position: relative; width: 66px; height: 66px; margin: 0 auto 22px; display: grid; place-items: center; border-radius: 20px; background: var(--ink); color: var(--bg); }
.completion-mark::before { content: ""; position: absolute; inset: -11px; border: 1px solid color-mix(in srgb, var(--accent) 58%, transparent); border-radius: 27px; animation: contact-ring 900ms var(--ease-out) both; }
.completion-card .eyebrow { color: var(--ink-3); }
.completion-card h1 { margin: 7px 0 12px; font-size: clamp(3rem, 14vw, 5.8rem); line-height: .92; letter-spacing: -.068em; }
.completion-card > p:not(.eyebrow) { max-width: 470px; margin: 0 auto; color: var(--ink-2); font-size: 1rem; line-height: 1.5; }
.outcome-actions { margin-top: 26px; display: grid; gap: 12px; }
.outcome-actions .primary-action { background: var(--ink); color: var(--bg); }
.completion-alternatives { padding-top: 6px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 6px; color: var(--ink-3); }
.completion-alternatives > span { width: 100%; margin-bottom: 2px; font-size: .78rem; }
.completion-alternatives .text-action { min-height: 44px; color: var(--ink-2); font-size: .79rem; }
.completion-back { min-height: 46px; margin-top: 4px; padding: 8px 14px; background: transparent; color: var(--ink-3); font-size: .78rem; font-weight: 700; }

/* Modal */
.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  padding: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade 170ms ease;
}
.modal-sheet {
  width: min(100%, 620px);
  max-height: min(88dvh, 820px);
  overflow: auto;
  padding: 8px 18px calc(20px + var(--safe-bottom));
  border: 1px solid var(--line);
  border-radius: 24px 24px 16px 16px;
  background: var(--surface);
  box-shadow: 0 32px 110px rgba(0,0,0,.35);
  animation: sheet-in 240ms var(--ease-out);
}
.modal-handle { width: 38px; height: 4px; margin: 0 auto 12px; border-radius: 3px; background: var(--line-strong); }
.modal-sheet > header { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: start; gap: 12px; }
.modal-sheet > header h2 { margin: 0; font-size: 1.45rem; line-height: 1.08; letter-spacing: -.045em; }
.modal-sheet > header p { max-width: 480px; margin: 7px 0 0; color: var(--ink-2); font-size: .83rem; line-height: 1.43; }
.modal-sheet > header > button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); }
.modal-body { margin-top: 20px; }
.profile-list { display: grid; gap: 8px; }
.profile-choice {
  min-height: 66px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 28px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  text-align: left;
}
.profile-choice.selected { border-color: var(--accent); }
.profile-choice .avatar { width: 42px; height: 42px; border-radius: 11px; }
.profile-choice strong, .profile-choice small { display: block; }
.profile-choice small { margin-top: 3px; color: var(--ink-3); font-size: .77rem; }
.modal-form label:not(:first-child) { margin-top: 15px; }
.modal-form select { appearance: none; background-image: none; }
.modal-choices { padding-bottom: 2px; }
.action-list { display: grid; gap: 8px; }
.action-list button {
  min-height: 72px;
  padding: 12px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 20px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
}
.action-list button > svg:first-child { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); }
.action-list strong, .action-list small { display: block; }
.action-list strong { font-size: .91rem; }
.action-list small { margin-top: 3px; color: var(--ink-3); font-size: .77rem; line-height: 1.38; }
.duration-fieldset { margin: 16px 0 0; padding: 0; border: 0; }
.duration-fieldset legend { margin-bottom: 8px; color: var(--ink-2); font-size: .82rem; font-weight: 760; }
.duration-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.duration-options label { margin: 0 !important; }
.duration-options input { position: absolute; opacity: 0; pointer-events: none; }
.duration-options span {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--bg);
  color: var(--ink-2);
  font-size: .78rem;
  font-weight: 750;
  cursor: pointer;
}
.duration-options input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.duration-options input:focus-visible + span { outline: 3px solid var(--accent-bright); outline-offset: 3px; }
.quiet-protection-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.quiet-protection-summary > div { display: grid; gap: 3px; }
.quiet-protection-summary span {
  color: var(--ink-2);
  font-size: .69rem;
  font-weight: 820;
  letter-spacing: .075em;
  text-transform: uppercase;
}
.quiet-protection-summary strong { font-size: .88rem; line-height: 1.36; }
.quiet-customize-toggle {
  justify-self: start;
  min-height: 44px;
  margin: -2px 0 -8px -10px;
  padding: 8px 10px;
  background: transparent;
  color: var(--ink-2);
  font-size: .78rem;
  font-weight: 760;
}
.quiet-custom-fields { display: grid; }
.quiet-custom-fields .quiet-customize-toggle { margin-top: 4px; }
.ritual-card, .parked-list {
  margin-top: 15px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}
.ritual-card > span, .parked-list > span { display: block; color: var(--ink-3); font-size: .71rem; font-weight: 820; letter-spacing: .075em; text-transform: uppercase; }
.ritual-card ul, .parked-list ul { margin: 8px 0 0; padding-left: 19px; color: var(--ink-2); font-size: .82rem; line-height: 1.5; }
.ritual-card li + li, .parked-list li + li { margin-top: 3px; }
.ritual-card.compact > span { color: var(--ink-2); }
.ritual-card.compact p { margin: 7px 0 0; color: var(--ink-2); font-size: .8rem; line-height: 1.45; }
.quiet-continue { margin-top: 8px; }
.wrong-guide-action { width: 100%; margin-top: 10px; color: var(--ink-2); }
.cannot-modal > p { margin: 0 0 18px; color: var(--ink-2); line-height: 1.48; }
.urgent-support { display: grid; gap: 12px; }
.urgent-support > p { margin: 0; color: var(--ink-2); line-height: 1.48; }
.urgent-callout {
  padding: 14px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--danger);
  border-radius: 13px;
  background: var(--surface-2);
}
.urgent-callout svg { margin-top: 1px; color: var(--danger); }
.urgent-callout p { margin: 0; line-height: 1.48; }
.urgent-support .primary-action, .urgent-support .secondary-action { margin-top: 2px; }
.urgent-support .text-action { justify-self: center; }
.confirm-actions { display: grid; gap: 8px; }
.confirm-actions .secondary-action { margin: 0; }
.confirm-actions .danger-text { width: 100%; }

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: calc(92px + var(--safe-bottom));
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  padding: 12px 15px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  background: #101211;
  color: #f5f6f2;
  box-shadow: 0 16px 50px rgba(0,0,0,.28);
  font-size: .82rem;
  font-weight: 720;
  text-align: center;
  animation: toast-in 230ms var(--ease-out);
}
.runner-shell ~ .toast, .completion-shell ~ .toast, .quiet-shell ~ .toast { bottom: calc(20px + var(--safe-bottom)); }

@media (min-width: 620px) {
  .profile-button-copy { display: block; }
  .screen { padding-left: 24px; padding-right: 24px; }
  .bottom-nav { width: 430px; left: 50%; right: auto; transform: translateX(-50%); }
  
  .start-card { padding: 22px; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .quick-grid button { min-height: 94px; flex-direction: column; align-items: flex-start; justify-content: space-between; }
  .runner-secondary button { font-size: .78rem; }
}

@media (min-width: 900px) {
  .app-shell { padding-bottom: 0; }
  .app-header { padding-left: 30px; padding-right: 30px; }
  .app-main { width: min(100%, 920px); padding-left: 110px; }
  .screen { padding: 48px 34px 80px; }
  .bottom-nav {
    top: 50%;
    bottom: auto;
    left: max(20px, calc((100vw - 1120px) / 2));
    width: 76px;
    height: auto;
    transform: translateY(-50%);
    grid-template-columns: 1fr;
    border-radius: 22px;
  }
  .bottom-nav button { min-height: 64px; }
  .bottom-nav button.active::after { top: 10px; right: 12px; }
  .home-intro { margin-top: 32px; }
  .runner-main { display: grid; grid-template-columns: minmax(0, 1fr); }
  .runner-shell.with-map .runner-main { grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); }
  .quiet-main { padding-left: 30px; padding-right: 30px; }
  .step-stage { padding: 44px 36px; }
  .plan-map { padding: 34px 26px; border-left: 1px solid var(--runner-line); }
  .plan-map-heading, .plan-map ol { width: 100%; }
  .step-card { min-height: 360px; }
  .modal-backdrop { align-items: center; }
  .modal-sheet { border-radius: 24px; }
  .modal-handle { display: none; }
}

@media (max-width: 520px) {
  .request-card { grid-template-columns: 42px minmax(0, 1fr); }
  .request-card > button, .request-card > .joined-label { grid-column: 2; width: 100%; }
}

@media (max-width: 370px) {
  .screen { padding-left: 14px; padding-right: 14px; }
  .screen-intro h1 { font-size: 2.08rem; }
  .quick-grid button { min-height: 66px; padding: 10px; }
  .quick-icon { width: 30px; height: 30px; }
  .runner-secondary { grid-template-columns: 1fr; }
  .runner-secondary button { justify-content: flex-start; padding-left: 14px; }
  .quiet-secondary-actions { grid-template-columns: 1fr; }
  .quiet-secondary-actions button { justify-content: flex-start; padding-left: 14px; }
  .quiet-intention h1 { font-size: 2.35rem; }
  .duration-options { grid-template-columns: 1fr 1fr; }
  .step-card { min-height: 238px; padding: 22px; }
  .step-card h1 { font-size: 2.05rem; }
  .today-card { grid-template-columns: 40px minmax(0,1fr); }
  .today-card .start-small, .today-card.empty > button { grid-column: 2; width: 100%; }
  .request-card { grid-template-columns: 40px minmax(0,1fr); }
  .request-card > button, .request-card > .joined-label { grid-column: 2; }
  .segmented.four { grid-template-columns: 1fr 1fr; }
  .setting-card { align-items: flex-start; flex-direction: column; }
  .mini-segmented { width: 100%; }
  .mini-segmented button { flex: 1; }
  html[data-text-scale="large"] .quick-grid { grid-template-columns: 1fr; }
  html[data-text-scale="large"] .resume-card { align-items: stretch; flex-direction: column; }
  html[data-text-scale="large"] .resume-copy strong { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
  html[data-text-scale="large"] .resume-actions { width: 100%; }
  html[data-text-scale="large"] .resume-primary { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
html[data-motion="reduced"] { scroll-behavior: auto; }
html[data-motion="reduced"] *, html[data-motion="reduced"] *::before, html[data-motion="reduced"] *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }

@media (prefers-reduced-transparency: reduce) {
  .app-header, .bottom-nav, .modal-backdrop, .runner-header, .quiet-header { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .app-header { background: var(--bg); }
  .bottom-nav { background: var(--surface); }
}

@media (prefers-contrast: more) {
  :root { --line: rgba(11,12,12,.34); --line-strong: rgba(11,12,12,.62); }
  html[data-theme="dark"], html[data-resolved-theme="dark"] { --line: rgba(255,255,255,.36); --line-strong: rgba(255,255,255,.66); }
  .app-header, .bottom-nav { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@keyframes enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(28px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pulse { from { opacity: .35; } to { opacity: 1; } }
@keyframes contact-ring { from { opacity: 0; transform: scale(.74); } 45% { opacity: 1; } to { opacity: 0; transform: scale(1.08); } }

@media print {
  .app-header, .bottom-nav, .modal-backdrop { display: none !important; }
  body, html { background: white !important; color: black !important; }
  .app-main { padding: 0; }
}
