:root {
  color-scheme: light;
  --ink: #273442;
  --muted: #64748b;
  --surface: #f4f6f8;
  --panel: #fff;
  --line: #d9e0e7;
  --navy: #27394c;
  --slate: #4a5c71;
  --blue-gray: #8093a9;
  --success: #547c6c;
  --warning: #ad7842;
  --danger: #b44b45;
  --shadow: 0 12px 34px rgb(39 52 66 / 8%);
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--surface); color: var(--ink); }

body { min-height: 100dvh; }

button, select { font: inherit; }

button { cursor: pointer; }

button:focus-visible, select:focus-visible { outline: 3px solid rgb(74 92 113 / 28%); outline-offset: 2px; }

.app-shell { min-height: 100dvh; }

.topbar {
  min-height: 84px;
  padding: 12px clamp(16px, 3vw, 38px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: white;
  background: var(--navy);
  border-bottom: 4px solid #a9b6c3;
}

.brand-block { display: flex; align-items: center; gap: 12px; min-width: 0; }
.jelly-logo { width: 54px; height: 54px; flex: 0 0 auto; }
.back-home { display: inline-block; margin-bottom: 3px; color: #c7d0da; font-size: 9px; font-weight: 800; letter-spacing: .08em; line-height: 1; text-decoration: none; text-transform: uppercase; }
.back-home:hover { color: white; text-decoration: underline; }
.back-home:focus-visible { outline: 3px solid rgb(255 255 255 / 35%); outline-offset: 3px; }
.eyebrow { font-size: 10px; letter-spacing: .16em; opacity: .72; font-weight: 800; }
h1 { margin: 1px 0 0; font-size: clamp(23px, 3vw, 31px); line-height: 1; letter-spacing: .09em; }

.executive-summary { display: flex; align-items: center; justify-content: flex-end; gap: 22px; text-align: right; }
.summary-item { display: grid; gap: 2px; }
.summary-label { color: #c7d0da; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; font-weight: 750; }
.summary-value { font-weight: 780; font-variant-numeric: tabular-nums; }
.rank-summary { max-width: 310px; }

.primary-tabs {
  height: 48px;
  padding: 0 clamp(16px, 3vw, 38px);
  display: flex;
  align-items: end;
  gap: 4px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  min-height: 43px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 760;
}

.tab-button:hover { color: var(--ink); background: #f7f9fa; }
.tab-button.active { color: var(--navy); border-bottom-color: var(--navy); }
.count-pill { margin-left: 5px; min-width: 20px; padding: 2px 6px; border-radius: 999px; background: #e8edf2; font-size: 10px; }

.workspace { display: grid; grid-template-columns: minmax(290px, 360px) 1fr; min-height: calc(100dvh - 136px); }
.task-column { padding: 24px 18px 40px clamp(16px, 3vw, 38px); border-right: 1px solid var(--line); background: #eef2f5; }
.main-panel { min-width: 0; padding: 24px clamp(18px, 3vw, 42px) 60px; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h2, .panel-heading h2 { margin: 0; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; }
.section-heading p, .panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.tiny-label { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }

.task-list { display: grid; gap: 10px; }
.task-card {
  position: relative;
  width: 100%;
  padding: 14px;
  text-align: left;
  color: inherit;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue-gray);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 2px 8px rgb(39 52 66 / 4%);
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.task-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.task-card.selected { border-color: var(--slate); border-left-color: var(--navy); box-shadow: 0 0 0 2px rgb(74 92 113 / 10%); }
.task-card.due-soon { border-left-color: var(--warning); }
.task-card.danger { border-color: var(--danger); border-left-color: var(--danger); animation: deadline-wobble 4s ease-in-out infinite; }
.task-card.in_progress { border-left-color: var(--success); }
.task-title-row { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.task-title { font-size: 14px; font-weight: 800; line-height: 1.25; }
.timer { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 800; }
.danger .timer { color: var(--danger); }
.task-brief { display: block; margin: 7px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #f8fafb; font-size: 10px; font-weight: 760; }
.chip.money { color: var(--success); background: #f3f8f6; }
.chip.warning { color: var(--warning); background: #fff9f0; border-color: #e7d1b7; }
.chip.danger { color: var(--danger); background: #fff5f4; border-color: #e5c0bd; animation: none; }
.chip.dark { color: white; background: var(--slate); border-color: var(--slate); }
.task-progress { display: block; height: 5px; margin-top: 11px; overflow: hidden; background: #e8edf1; border-radius: 10px; }
.task-progress > span { display: block; height: 100%; background: var(--success); border-radius: inherit; }
.task-worker { margin-top: 8px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }

.pinned-task { position: sticky; top: 0; z-index: 5; margin: -24px calc(clamp(18px, 3vw, 42px) * -1) 20px; padding: 13px clamp(18px, 3vw, 42px); display: flex; align-items: center; justify-content: space-between; gap: 18px; color: white; background: #35495e; box-shadow: 0 6px 16px rgb(39 52 66 / 15%); }
.pinned-task strong { display: block; max-width: 70ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.pinned-task .tiny-label { color: #bdc8d3; }
.pinned-copy { min-width: 0; }
.pinned-brief { display: none; }
.pinned-money { white-space: nowrap; font-weight: 800; }

.panel-heading { display: flex; justify-content: space-between; align-items: start; gap: 18px; margin-bottom: 18px; }
.filters { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: thin; }
.filter-button { flex: 0 0 auto; min-height: 35px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: white; font-size: 12px; font-weight: 750; }
.filter-button.active { color: white; border-color: var(--slate); background: var(--slate); }

.candidate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.candidate-card { position: relative; min-height: 132px; padding: 14px 42px 14px 86px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 2px 9px rgb(39 52 66 / 4%); }
.candidate-card:hover { border-color: #acb8c4; box-shadow: var(--shadow); }
.candidate-card.unavailable { background: #f3f5f6; opacity: .82; }
.candidate-main { width: 100%; padding: 0; border: 0; text-align: left; color: inherit; background: transparent; }
.candidate-name { display: block; font-weight: 820; line-height: 1.2; }
.candidate-handle { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.candidate-bio { margin: 8px 0 7px; color: #506174; font-size: 12px; line-height: 1.4; }
.candidate-signal { color: var(--muted); font-size: 11px; }
.candidate-signal strong { color: var(--ink); font-weight: 850; }
.profile-signals { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.profile-signal { display: inline-flex; align-items: center; min-height: 21px; padding: 2px 7px; border: 1px solid #d5dde4; border-radius: 6px; color: #56677a; background: #f4f7f9; font-size: 9px; letter-spacing: .015em; }
.profile-signal.positive { color: #426b5b; border-color: #bdd4ca; background: #f1f7f4; }
.profile-signal.warning { color: #8a5a2e; border-color: #dfc5a7; background: #fff8ee; }
.recommended-badge { display: inline-block; margin-left: 7px; padding: 2px 6px; vertical-align: 1px; border-radius: 999px; color: white; background: var(--success); font-size: 8px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.recommendation-note { margin: -2px 0 13px; padding: 10px 12px; border-left: 3px solid var(--success); color: var(--muted); background: #f2f7f5; font-size: 11px; line-height: 1.45; }
.favorite-button { position: absolute; top: 9px; right: 9px; width: 34px; height: 34px; padding: 0; border: 0; color: #8794a2; background: transparent; font-size: 22px; line-height: 1; }
.favorite-button.saved { color: var(--warning); }

.avatar-wrap { position: absolute; left: 13px; top: 15px; width: 60px; height: 60px; }
.avatar { width: 100%; height: 100%; border-radius: 50%; border: 1px solid #cbd4dc; background: linear-gradient(145deg, var(--avatar-a, #e1e7ed), var(--avatar-b, #98a9bb)); object-fit: cover; filter: saturate(var(--avatar-sat, .55)) hue-rotate(var(--avatar-hue, 0deg)); }
.avatar-status { position: absolute; right: -4px; bottom: -4px; width: 23px; height: 23px; padding: 2px; border-radius: 50%; background: white; border: 1px solid var(--line); }
.avatar-fbi { position: absolute; left: 50%; bottom: -3px; width: 34px; transform: translateX(-50%); filter: none; }
.small-avatar { position: relative; width: 25px; height: 25px; flex: 0 0 auto; }
.small-avatar .avatar { width: 25px; height: 25px; }
.small-avatar .avatar-status { width: 14px; height: 14px; }

.profile-backdrop { position: fixed; inset: 0; z-index: 20; background: rgb(25 37 49 / 40%); backdrop-filter: blur(2px); }
.profile-sheet { position: fixed; z-index: 21; top: 0; right: 0; width: min(520px, 100%); height: 100dvh; overflow-y: auto; padding: 26px clamp(20px, 4vw, 36px) 60px; background: white; box-shadow: -18px 0 60px rgb(20 32 44 / 22%); animation: slide-in 180ms ease-out; }
.profile-sheet.profile-steady { animation: none; }
.close-button { width: 40px; height: 40px; margin-left: auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: white; font-size: 21px; }
.profile-identity { display: grid; grid-template-columns: 104px 1fr; gap: 18px; align-items: center; margin: 18px 0 22px; }
.profile-avatar { position: relative; width: 104px; height: 104px; }
.profile-avatar .avatar-status { width: 29px; height: 29px; }
.profile-identity h2 { margin: 0 0 2px; font-size: 23px; }
.profile-handle { color: var(--muted); font-size: 13px; }
.rating { margin-top: 8px; color: var(--warning); font-size: 13px; font-weight: 800; }
.profile-section { padding: 18px 0; border-top: 1px solid var(--line); }
.profile-section h3 { margin: 0 0 9px; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; }
.profile-section p { margin: 0; color: #4d5e70; line-height: 1.6; }
.profile-section .signal-disclaimer { margin-top: 8px; font-size: 11px; color: var(--muted); }
.profile-task-context { margin: 0 0 18px; padding: 15px; border: 1px solid #c7d2dc; border-left: 4px solid var(--navy); border-radius: 10px; background: #f2f6f8; }
.profile-task-context h3 { margin: 5px 0 7px; font-size: 16px; line-height: 1.3; }
.profile-task-context p { margin: 0 0 11px; color: #4d5e70; font-size: 12px; line-height: 1.5; }
.quote-box { margin-top: 14px; padding: 16px; border: 1px solid #cdd6de; border-radius: var(--radius); background: #f5f8fa; }
.quote-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.quote-price strong { font-size: 25px; }
.quote-meta { margin: 8px 0 14px; color: var(--muted); font-size: 12px; }
.margin-positive { color: var(--success); }
.margin-negative { color: var(--danger); }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.button { min-height: 42px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; font-size: 12px; font-weight: 800; }
.button:hover:not(:disabled) { border-color: var(--slate); }
.button.primary { color: white; border-color: var(--navy); background: var(--navy); }
.button.subtle { color: var(--muted); background: #f5f7f8; }
.button.warning { color: #78491f; border-color: #d7b58d; background: #fff8ec; }
.button.danger { color: var(--danger); border-color: #dab1ae; background: #fff7f6; }
.button:disabled { cursor: not-allowed; opacity: .48; }

.empty-state { padding: 42px 24px; text-align: center; border: 1px dashed #bfc9d3; border-radius: var(--radius); color: var(--muted); background: rgb(255 255 255 / 50%); }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); }

.team-list, .history-list { display: grid; gap: 9px; }
.team-row, .result-card, .career-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 2px 9px rgb(39 52 66 / 4%); }
.team-row { display: grid; grid-template-columns: 54px minmax(150px, 1fr) auto; gap: 12px; align-items: center; }
.team-row .avatar-wrap { position: relative; inset: auto; width: 50px; height: 50px; }
.team-row h3 { margin: 0; font-size: 14px; }
.team-row p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.status-copy { text-transform: capitalize; }

.career-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 14px; align-items: start; }
.career-card h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.career-card p { color: var(--muted); line-height: 1.5; font-size: 13px; }
.objective-card { margin-bottom: 16px; padding: clamp(18px, 3vw, 26px); overflow: hidden; border: 1px solid #d7a7a4; border-radius: var(--radius); background: linear-gradient(135deg, #fff 0%, #fff7f6 100%); box-shadow: var(--shadow); }
.objective-copy { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.objective-copy h3 { margin: 4px 0 5px; font-size: clamp(20px, 3vw, 28px); }
.objective-copy p { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.5; }
.objective-amount { flex: 0 0 auto; text-align: right; }
.objective-amount span { display: block; color: var(--danger); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.objective-amount strong { display: block; margin-top: 3px; font-size: 18px; white-space: nowrap; }
.objective-progress { height: 17px; margin-top: 19px; padding: 3px; overflow: hidden; border: 1px solid #d8aaa7; border-radius: 999px; background: #f3dedd; }
.objective-progress span { display: block; min-width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8f3935, var(--danger)); transition: width 240ms ease; }
.objective-milestones { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.objective-milestones .done { color: var(--success); }
.merit-track { height: 9px; overflow: hidden; border-radius: 20px; background: #e4e9ed; }
.merit-track span { display: block; height: 100%; background: var(--success); }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; }
.metric { padding: 10px; border-radius: 8px; background: #f3f6f8; }
.metric strong { display: block; font-size: 18px; }
.metric span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.control-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 12px 0; }
.control-line select { min-height: 38px; max-width: 180px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; }
.switch { min-height: 36px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: #edf1f4; font-weight: 800; font-size: 11px; }
.switch.on { color: white; border-color: var(--success); background: var(--success); }
.result-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; }
.result-card h3 { margin: 0; font-size: 14px; }
.result-card p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.result-amount { font-weight: 850; white-space: nowrap; }
.result-card.success { border-left: 4px solid var(--success); }
.result-card.failed, .result-card.busted, .result-card.expired { border-left: 4px solid var(--danger); }
.settings-heading { margin-top: 24px; }
.settings-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.settings-card h3 { margin-bottom: 4px; }
.settings-card p { margin: 0; max-width: 720px; }
.settings-card .button { flex: 0 0 auto; }

.away-banner { margin-bottom: 16px; padding: 14px 42px 14px 16px; position: relative; border: 1px solid #cbd5de; border-radius: var(--radius); background: #edf3f6; }
.away-banner h3 { margin: 0 0 5px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.away-banner ul { margin: 5px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.away-banner .dismiss { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border: 0; background: transparent; color: var(--muted); }

.dialog-backdrop { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 18px; background: rgb(24 35 46 / 72%); }
.onboarding, .finale, .reset-dialog { width: min(720px, calc(100vw - 36px)); max-width: calc(100vw - 36px); max-height: calc(100dvh - 36px); overflow: auto; overflow-wrap: anywhere; border-radius: 16px; background: white; box-shadow: 0 25px 90px rgb(0 0 0 / 32%); }
.onboarding { padding: clamp(24px, 6vw, 52px); }
.onboarding .eyebrow { color: var(--slate); }
.onboarding h2 { margin: 8px 0; font-size: clamp(30px, 7vw, 54px); letter-spacing: .08em; }
.onboarding .tagline { margin: 0 0 28px; font-size: 18px; color: var(--muted); font-style: italic; }
.onboarding-objective { margin: 20px 0 8px; padding: 15px 17px; border: 1px solid #d7a7a4; border-left: 5px solid var(--danger); border-radius: 9px; background: #fff7f6; }
.onboarding-objective > strong { display: block; margin: 4px 0; font-size: 17px; }
.onboarding-objective p { margin: 0; color: #526274; font-size: 13px; line-height: 1.5; }
.onboarding-list { margin: 24px 0; padding: 0; list-style: none; counter-reset: guide; }
.onboarding-list li { counter-increment: guide; padding: 12px 0 12px 42px; position: relative; border-top: 1px solid var(--line); line-height: 1.4; }
.onboarding-list li::before { content: counter(guide); position: absolute; left: 0; top: 9px; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--slate); font-size: 12px; font-weight: 800; }
.finale { display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; }
.finale-art { min-height: 480px; display: grid; place-items: center; padding: 30px; background: #dce4e9; }
.finale-art img { width: min(100%, 300px); max-height: 450px; }
.finale-copy { padding: 42px 34px; align-self: center; }
.finale-copy h2 { margin: 5px 0 15px; font-size: 34px; }
.dialogue { padding-left: 0; list-style: none; color: var(--muted); line-height: 1.55; }
.dialogue li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.reset-dialog { width: min(520px, calc(100vw - 36px)); padding: clamp(24px, 5vw, 40px); }
.reset-dialog h2 { margin: 6px 0 10px; font-size: clamp(24px, 5vw, 34px); }
.reset-dialog p { margin: 0 0 24px; color: var(--muted); line-height: 1.6; }

.toasts { position: fixed; z-index: 60; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: min(360px, calc(100% - 32px)); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 12px 14px; border-left: 4px solid var(--slate); border-radius: 8px; color: var(--ink); background: white; box-shadow: 0 12px 35px rgb(25 37 49 / 22%); font-size: 12px; animation: toast-in 180ms ease-out; }
.toast.success { border-left-color: var(--success); }
.toast.warning, .toast.promotion { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }

@keyframes slide-in { from { transform: translateX(25px); opacity: .7; } }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }
@keyframes deadline-wobble { 0%, 91%, 100% { transform: rotate(0); } 93% { transform: rotate(-.35deg); } 95% { transform: rotate(.35deg); } 97% { transform: rotate(0); } }

@media (max-width: 780px) {
  .topbar { min-height: 72px; padding: 9px 14px; align-items: center; }
  .brand-block { flex: 0 1 210px; overflow: hidden; }
  .jelly-logo { width: 45px; height: 45px; }
  .eyebrow { font-size: 8px; }
  h1 { font-size: 21px; }
  .executive-summary { flex: 0 0 86px; min-width: 86px; gap: 0; }
  .executive-summary .summary-item { display: none; }
  .executive-summary .summary-item:nth-child(2) { display: grid; }
  .summary-label { font-size: 8px; }
  .summary-value { font-size: 12px; }
  .primary-tabs { position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; height: calc(60px + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); align-items: stretch; justify-content: space-around; border-top: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -4px 20px rgb(39 52 66 / 9%); }
  .tab-button { flex: 1; min-width: 0; min-height: 56px; padding: 4px; border-top: 3px solid transparent; border-bottom: 0; font-size: 11px; }
  .tab-button.active { border-top-color: var(--navy); border-bottom: 0; }
  .count-pill { display: none; }
  .workspace { display: block; min-height: calc(100dvh - 72px); }
  .task-column, .main-panel { padding: 16px 13px 90px; border: 0; }
  .task-column.mobile-hidden, .main-panel.mobile-hidden { display: none; }
  .pinned-task { position: static; margin: -16px -13px 16px; padding: 13px; align-items: start; }
  .pinned-task strong { max-width: none; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; }
  .pinned-brief { display: block; margin-top: 5px; max-width: 48ch; color: #d3dce4; font-size: 11px; line-height: 1.4; }
  .pinned-money { padding-top: 13px; font-size: 11px; }
  .candidate-grid { grid-template-columns: 1fr; }
  .candidate-card { min-height: 126px; }
  .profile-sheet { top: auto; bottom: 0; height: min(86dvh, 760px); width: 100%; border-radius: 18px 18px 0 0; animation: sheet-up 180ms ease-out; padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .profile-identity { grid-template-columns: 84px 1fr; }
  .profile-avatar { width: 84px; height: 84px; }
  .career-grid { grid-template-columns: 1fr; }
  .settings-card { display: block; }
  .settings-card .button { margin-top: 16px; width: 100%; }
  .objective-copy { display: block; }
  .objective-amount { margin-top: 14px; text-align: left; }
  .objective-milestones { font-size: 8px; }
  .team-row { grid-template-columns: 50px minmax(0, 1fr); }
  .team-actions { grid-column: 1 / -1; }
  .finale { grid-template-columns: 1fr; }
  .finale-art { min-height: 260px; padding: 20px; }
  .finale-art img { max-height: 250px; }
  .finale-copy { padding: 26px 22px; }
  .toasts { top: calc(80px + env(safe-area-inset-top)); bottom: auto; right: 10px; width: min(360px, calc(100% - 20px)); }
  @keyframes sheet-up { from { transform: translateY(30px); opacity: .7; } }
}

@media (max-width: 420px) {
  .onboarding { padding: 28px 22px; }
  .onboarding h2 { font-size: 38px; }
  .onboarding-list li { padding-left: 40px; font-size: 14px; }
}

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