:root {
  color-scheme: light dark;
  --paper: #f4f0e8;
  --surface: #fffdf8;
  --surface-strong: #ffffff;
  --ink: #17221d;
  --muted: #667069;
  --line: #ddd8ce;
  --jade: #1f6b55;
  --jade-dark: #124a3a;
  --jade-soft: #dcebe3;
  --amber: #9a6327;
  --amber-soft: #f4e8d6;
  --red: #9d453f;
  --shadow: 0 20px 52px rgba(37, 47, 42, .08);
  --radius: 22px;
  --header-h: 72px;
  --nav-h: 76px;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101713;
    --surface: #17201b;
    --surface-strong: #1d2922;
    --ink: #edf4ef;
    --muted: #a2afa7;
    --line: #334138;
    --jade: #73c6a4;
    --jade-dark: #8dd5b8;
    --jade-soft: #213d31;
    --amber: #dfad70;
    --amber-soft: #3b2f21;
    --red: #ef9187;
    --shadow: 0 22px 58px rgba(0, 0, 0, .24);
  }
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 90% -5%, rgba(82, 143, 115, .14), transparent 30rem),
    var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, dialog:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--jade) 50%, transparent);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 16px;
  top: -60px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface-strong);
}
.skip-link:focus { top: 16px; }

.network-banner {
  position: fixed;
  z-index: 90;
  inset: 0 0 auto;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  background: var(--amber);
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.network-banner:not([hidden]) ~ .app-shell .app-header {
  top: calc(31px + env(safe-area-inset-top));
}

.app-shell { min-height: 100dvh; }
.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding: calc(12px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.25);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--jade) 42%, var(--line));
  border-radius: 13px;
  background: var(--surface);
  color: var(--jade-dark);
  font-family: "Songti SC", serif;
  font-size: 22px;
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--jade-soft) 45%, transparent);
}
.brand strong { display: block; font-family: "Songti SC", serif; font-size: 20px; letter-spacing: .12em; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.header-actions { display: flex; align-items: center; gap: 7px; }
.icon-button, .profile-chip, .install-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}
.icon-button { min-width: 42px; padding: 6px 11px; font-size: 22px; line-height: 1; }
.install-button { padding: 7px 11px; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 750; }
.profile-chip { max-width: 140px; padding: 7px 11px; display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 750; }
.profile-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--jade); box-shadow: 0 0 0 4px var(--jade-soft); }

main {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 28px 18px calc(var(--nav-h) + 38px + env(safe-area-inset-bottom));
}
.app-view { animation: view-in .26s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--jade-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 690px; margin-bottom: 10px; font-family: "Songti SC", serif; font-size: clamp(30px, 7vw, 54px); line-height: 1.14; letter-spacing: -.025em; }
.hero-row p, .page-heading p { max-width: 620px; margin-bottom: 0; color: var(--muted); line-height: 1.75; font-size: 14px; }
h2 { margin-bottom: 0; font-size: 19px; letter-spacing: -.015em; }
.page-heading { margin: 8px 0 24px; }
.page-heading h1 { margin-bottom: 10px; font-size: clamp(30px, 6vw, 45px); }

.primary-action, .secondary-action, .small-action, .text-button, .filter {
  min-height: 44px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
}
.primary-action {
  border: 1px solid var(--jade-dark);
  padding: 12px 18px;
  background: var(--jade-dark);
  color: var(--paper);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--jade-dark) 22%, transparent);
}
.primary-action:hover { transform: translateY(-1px); }
.primary-action:disabled { opacity: .5; cursor: wait; transform: none; }
.primary-action.full { width: 100%; }
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  padding: 10px 13px;
  background: transparent;
  font-size: 13px;
}
.small-action { border: 1px solid var(--line); padding: 8px 12px; background: var(--surface); color: var(--jade-dark); }
.text-button { border: 0; padding: 6px 2px; background: transparent; color: var(--jade-dark); font-size: 13px; }
.hero-action { flex: 0 0 auto; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  box-shadow: var(--shadow);
}
.role-protocol { margin-top: 26px; padding: 20px; }
.role-protocol-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.role-protocol-heading .eyebrow { margin: 0; }
.role-protocol-heading h2 { font-family: "Songti SC", serif; }
.role-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.role-chip { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.role-chip strong, .role-chip span { display: block; }
.role-chip strong { font-size: 14px; }
.role-chip span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.role-claude { border-top: 3px solid #b7794b; }
.role-gpt { border-top: 3px solid var(--jade); }
.role-deepseek { border-top: 3px solid #5679a6; }
.role-protocol p { margin: 14px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.today-card { position: relative; overflow: hidden; margin-top: 28px; padding: 22px; }
.today-card::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: -98px;
  top: -104px;
  border: 38px solid color-mix(in srgb, var(--jade-soft) 75%, transparent);
  border-radius: 50%;
}
.card-kicker { position: relative; z-index: 1; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.transit-row { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.transit-pillar { padding: 12px; border-radius: 16px; background: var(--jade-soft); }
.transit-pillar small { display: block; color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.transit-pillar strong { display: block; margin-top: 5px; font-family: "Songti SC", serif; font-size: 25px; }
.today-note { position: relative; z-index: 1; margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.today-consult { position: relative; z-index: 2; margin-top: 14px; }
.skeleton-row { display: flex; gap: 10px; margin: 18px 0 10px; }
.skeleton-row span { width: 90px; height: 54px; border-radius: 14px; background: var(--jade-soft); animation: pulse 1.4s ease infinite alternate; }
@keyframes pulse { to { opacity: .42; } }
.muted { color: var(--muted); }

.section-block { margin-top: 34px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-heading .eyebrow { margin-bottom: 5px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-card {
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}
.quick-card:hover { border-color: var(--jade); background: var(--jade-soft); }
.quick-card span { display: block; font-family: "Songti SC", serif; font-size: 20px; font-weight: 700; }
.quick-card small { display: block; margin-top: 23px; color: var(--muted); font-size: 11px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.feature-card { min-height: 128px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-content: start; gap: 6px 10px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-align: left; cursor: pointer; }
.feature-card:hover { border-color: var(--jade); background: color-mix(in srgb, var(--jade-soft) 58%, var(--surface)); }
.feature-card strong { align-self: center; font-size: 14px; }
.feature-card small { grid-column: 1 / -1; margin-top: 14px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.feature-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; background: var(--jade-soft); color: var(--jade-dark); font-family: "Songti SC", serif; font-weight: 800; }
.compact-list, .profile-list, .record-list { display: grid; gap: 10px; }
.empty-state { padding: 24px 16px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); text-align: center; font-size: 13px; line-height: 1.7; }

.form-card { display: grid; gap: 19px; padding: 20px; }
.field { display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 720; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 13px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
}
.field textarea { min-height: 86px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--jade); }
.field-hint, .optional { color: var(--muted); font-size: 11px; font-weight: 500; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.segmented-field, .outcome-grid { margin: 0; padding: 0; border: 0; }
.segmented-field legend, .outcome-grid legend { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 720; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 15px; background: var(--paper); }
.segmented label { cursor: pointer; }
.segmented input, .outcome-grid input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { min-height: 42px; display: grid; place-items: center; border-radius: 12px; font-size: 13px; font-weight: 750; }
.segmented input:checked + span { background: var(--surface-strong); color: var(--jade-dark); box-shadow: 0 3px 14px rgba(30, 60, 48, .08); }
.privacy-line { display: flex; gap: 8px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.research-status { padding: 11px 13px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--jade-soft) 55%, transparent); color: var(--muted); font-size: 11px; line-height: 1.6; }
.research-status strong { color: var(--jade-dark); }
.form-error { padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red); font-size: 12px; }
.notice { display: grid; gap: 7px; margin-bottom: 14px; padding: 15px; border-radius: 16px; font-size: 13px; }
.notice.warning { border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); background: var(--amber-soft); }

.progress-card { margin-top: 18px; padding: 18px; display: flex; align-items: center; gap: 15px; }
.progress-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.orb { width: 42px; height: 42px; flex: 0 0 auto; border: 4px solid var(--jade-soft); border-top-color: var(--jade); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

.prediction-card { margin-top: 18px; overflow: hidden; }
.prediction-head { padding: 18px; background: linear-gradient(135deg, var(--jade-soft), transparent); }
.prediction-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.lock-badge, .status-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 999px; background: var(--surface); color: var(--jade-dark); font-weight: 800; }
.prediction-question { margin: 12px 0 8px; color: var(--muted); font-size: 12px; }
.prediction-conclusion { margin: 0; font-family: "Songti SC", serif; font-size: clamp(20px, 4.5vw, 28px); line-height: 1.55; }
.prediction-body { display: grid; gap: 18px; padding: 18px; }
.confidence-row { display: flex; align-items: center; gap: 12px; }
.confidence-track { height: 7px; flex: 1; overflow: hidden; border-radius: 99px; background: var(--line); }
.confidence-track span { display: block; height: 100%; border-radius: inherit; background: var(--jade); }
.confidence-row strong { min-width: 54px; font-size: 13px; }
.snapshot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.snapshot-panel { padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--paper) 70%, transparent); }
.snapshot-panel h3 { margin: 0 0 9px; font-size: 13px; }
.snapshot-panel ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.role-analysis { padding: 16px; border: 1px solid color-mix(in srgb, var(--jade) 30%, var(--line)); border-radius: 18px; background: color-mix(in srgb, var(--jade-soft) 32%, transparent); }
.role-analysis-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.role-analysis-heading h3 { margin: 0; font-size: 14px; }
.role-analysis-heading span { color: var(--jade-dark); font-size: 10px; font-weight: 800; }
.role-analysis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.role-analysis-card { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.role-analysis-card strong { display: block; font-size: 12px; }
.role-analysis-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.role-analysis-card ul { margin: 9px 0 0; padding-left: 16px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.arbitration-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.protocol-warning { padding: 12px; border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); border-radius: 14px; background: var(--amber-soft); color: var(--muted); font-size: 11px; line-height: 1.65; }
.snapshot-details { border-top: 1px solid var(--line); padding-top: 13px; }
.snapshot-details summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 700; }
.snapshot-details dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; margin-bottom: 0; color: var(--muted); font-size: 11px; word-break: break-all; }
.snapshot-details dt { font-weight: 750; }

.filter-row { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; }
.filter { min-width: 78px; border: 1px solid var(--line); padding: 8px 13px; background: var(--surface); color: var(--muted); }
.filter.is-active { border-color: var(--jade); background: var(--jade-soft); color: var(--jade-dark); }
.record-card { overflow: hidden; }
.record-summary { display: grid; gap: 9px; padding: 16px; }
.record-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.record-category { color: var(--jade-dark); font-size: 11px; font-weight: 850; letter-spacing: .08em; }
.record-date { color: var(--muted); font-size: 10px; }
.record-question { font-size: 14px; font-weight: 750; line-height: 1.55; }
.record-conclusion { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.record-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 5px; }
.review-outcome { color: var(--muted); font-size: 12px; font-weight: 750; }

.profile-row { width: 100%; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.profile-row.is-active { border-color: var(--jade); background: var(--jade-soft); }
.profile-main { min-width: 0; }
.profile-main strong { display: block; font-size: 14px; }
.profile-main small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-row-actions { display: flex; gap: 6px; }
.profile-row-actions button { min-height: 40px; border: 1px solid var(--line); border-radius: 12px; padding: 7px 10px; background: var(--surface); cursor: pointer; font-size: 11px; font-weight: 750; }
.form-title-row { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.form-title-row h2 { margin-top: 2px; }
.research-editor { padding: 16px; border: 1px solid color-mix(in srgb, var(--jade) 28%, var(--line)); border-radius: 18px; background: color-mix(in srgb, var(--jade-soft) 38%, var(--surface)); }
.research-editor h3 { margin: 0; font-size: 16px; }
.research-editor p { margin: 10px 0 15px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.research-title-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.research-title-row .eyebrow { margin-bottom: 4px; }
.research-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 13px; }
.research-actions .secondary-action { padding: 10px 13px; background: var(--surface); }

.stats-card, .settings-card { padding: 18px; }
.stats-overview { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sample-ring { width: 76px; height: 76px; display: grid; place-items: center; flex: 0 0 auto; border: 8px solid var(--jade-soft); border-top-color: var(--jade); border-radius: 50%; font-size: 12px; font-weight: 800; }
.stats-copy strong { display: block; font-family: "Songti SC", serif; font-size: 24px; }
.stats-copy p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.stat-groups { display: grid; gap: 8px; margin-top: 15px; }
.stat-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 12px; }
.stat-row span:last-child { color: var(--muted); }
.stat-detail { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.stat-detail summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 750; }
.stat-detail .stat-groups { margin-top: 5px; }
.settings-card { margin-top: 34px; }
.settings-card h2 { margin-bottom: 8px; }
.settings-card p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.bottom-nav {
  position: fixed;
  z-index: 60;
  inset: auto 0 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 8px max(12px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(12px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(20px) saturate(1.3);
}
.nav-item { position: relative; min-height: 58px; display: grid; place-items: center; align-content: center; gap: 2px; border: 0; border-radius: 15px; background: transparent; color: var(--muted); cursor: pointer; }
.nav-item > span { font-size: 21px; line-height: 1; }
.nav-item small { font-size: 10px; font-weight: 750; }
.nav-item.is-active { background: var(--jade-soft); color: var(--jade-dark); }
.nav-item b { position: absolute; top: 5px; left: 55%; min-width: 18px; height: 18px; padding: 2px 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 9px; }

.modal { width: min(calc(100% - 24px), 520px); max-height: calc(100dvh - 30px); overflow: auto; border: 1px solid var(--line); border-radius: 24px; padding: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 90px rgba(0, 0, 0, .25); }
.modal::backdrop { background: rgba(8, 16, 12, .56); backdrop-filter: blur(5px); }
.modal form { display: grid; gap: 17px; }
.small-modal { max-width: 430px; }
.small-modal p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.outcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.outcome-grid legend { grid-column: 1 / -1; }
.outcome-grid span { min-height: 45px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; font-size: 12px; font-weight: 750; }
.outcome-grid input:checked + span { border-color: var(--jade); background: var(--jade-soft); color: var(--jade-dark); }
.modal-note { margin: -6px 0 0; color: var(--muted); text-align: center; font-size: 10px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 32px); padding: 11px 15px; border-radius: 13px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow); font-size: 12px; text-align: center; }

@media (min-width: 760px) {
  main { padding: 46px 30px 120px; }
  .bottom-nav { left: 50%; right: auto; bottom: 18px; width: 460px; height: 68px; padding: 6px; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
  .app-header { padding-left: max(30px, calc((100% - 980px) / 2)); padding-right: max(30px, calc((100% - 980px) / 2)); }
  .form-card { padding: 28px; }
  .prediction-body, .prediction-head { padding: 24px; }
}

@media (max-width: 620px) {
  .brand small { display: none; }
  .hero-row { align-items: start; flex-direction: column; }
  .hero-action { width: 100%; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .role-protocol-heading { align-items: start; flex-direction: column; }
  .role-strip, .role-analysis-grid { grid-template-columns: 1fr; }
  .quick-card { min-height: 94px; }
  .field-grid, .snapshot-grid { grid-template-columns: 1fr; }
  .profile-chip { max-width: 118px; }
  .prediction-meta { align-items: start; flex-direction: column; }
}

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