:root {
  color-scheme: dark;
  --bg: #101018;
  --side: #15141e;
  --panel: #191823;
  --panel-hover: #201d2d;
  --field: #13121c;
  --line: #2d2a3b;
  --line-strong: #3e3751;
  --text: #f4f0fa;
  --muted: #b3adbf;
  --subtle: #a39ab0;
  --accent: #d2b8fa;
  --accent-strong: #dbc4ff;
  --aqua: #a2ddd5;
  --display: Georgia, 'Times New Roman', serif;
  --ui: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --sidebar-width: 232px;
  font-family: var(--ui);
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  font-size: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex="0"]:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
::selection { color: #fff; background: #654f83; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -.027em; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 12px; left: 16px; padding: 10px 16px; z-index: 20; border-radius: 8px; color: #251b34; background: var(--accent); }

.sidebar { position: fixed; z-index: 3; inset: 0 auto 0 0; width: var(--sidebar-width); padding: 28px 16px 16px; border-right: 1px solid #282534; background: var(--side); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; margin: 0 7px 42px; width: fit-content; }
.brand strong { font-size: .94rem; font-weight: 650; line-height: 1.22; letter-spacing: -.015em; }
.brand-icon { display: grid; place-items: center; background: #332648; color: #e1c9ff; width: 40px; height: 40px; border: 1px solid #4f3b68; border-radius: 12px; flex: none; }
.brand-icon .icon { width: 23px; height: 23px; }
.mobile-brand { display: none; }
.navigation { display: flex; flex: 1; flex-direction: column; justify-content: space-between; }
.nav-main, .nav-bottom { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; font-size: .94rem; font-weight: 520; border: 1px solid transparent; border-radius: 9px; color: var(--muted); transition: background .18s, color .18s, border-color .18s; }
.nav-link .icon { width: 19px; height: 19px; }
.nav-link:hover { background: #211c2c; color: var(--text); }
.nav-link.current { border-color: #3b3150; background: #2b233c; color: #e1cbff; }
.local-notice { display: flex; align-items: center; gap: 7px; margin: 14px 6px 0; padding: 15px 3px 2px; border-top: 1px solid #2c2839; font-size: .77rem; white-space: nowrap; color: var(--subtle); }
.local-notice .icon { width: 15px; height: 15px; color: #b3a0ca; }
.workspace { margin-left: var(--sidebar-width); }
.topbar { height: 73px; border-bottom: 1px solid #252231; background: #13121b; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1248px; height: 100%; margin: 0 auto; padding: 0 36px; }
.top-label { display: flex; gap: 9px; align-items: center; color: #e3ddeb; font-size: .93rem; font-weight: 620; }
.top-label .icon { width: 17px; height: 17px; color: var(--accent); }
a.top-label:hover { color: var(--accent); }
.content { max-width: 1248px; margin: 0 auto; padding: 33px 36px 46px; outline: none; }
.inner-content { max-width: 1120px; }

.button { display: inline-flex; width: fit-content; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; min-height: 42px; border: 1px solid transparent; border-radius: 9px; font-size: .91rem; line-height: 1.25; font-weight: 650; text-align: center; transition: background .18s, border-color .18s, color .18s, transform .18s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button .icon { width: 17px; height: 17px; }
.primary { background: var(--accent); color: #241a32; box-shadow: 0 5px 17px #0002; }
.primary:hover { background: #e5ceff; }
.secondary { border-color: var(--line-strong); background: #252033; color: #e9dbf7; }
.secondary:hover { border-color: #6e5c86; background: #312740; }
.text-button { border-color: transparent; background: transparent; color: var(--accent); }
.text-button:hover { background: #29213a; color: #e4ceff; }
.danger { border-color: #693848; background: #4a2536; color: #ffd3de; }
.danger:hover { background: #613044; }
.danger-text { color: #e9a8bb; }
.icon-button { background: transparent; border: 1px solid var(--line); border-radius: 8px; width: 37px; min-height: 37px; padding: 0; display: grid; place-items: center; color: var(--muted); transition: background .18s; }
.icon-button:hover { background: var(--panel-hover); color: var(--text); }
.icon-button .icon { width: 17px; height: 17px; }

.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 294px; overflow: hidden; padding: 35px 39px; border: 1px solid #413351; border-radius: 21px; background: radial-gradient(ellipse at 0 100%, #241a37, #1a1428 72%); }
.hero-art { position: absolute; z-index: -1; inset: 0; background: url('./paths.jpg') no-repeat right 48%; background-size: min(86%, 970px) auto; opacity: .92; }
.hero-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #1c152c 3%, #1c152c 22%, #1c152cde 36%, #1c152c3d 61%, #1c152c00 78%); }
.hero-copy { max-width: 575px; }
.hero-label { display: flex; align-items: center; gap: 8px; margin-bottom: 17px; font-size: .78rem; font-weight: 700; letter-spacing: .125em; text-transform: uppercase; color: #dbc2fc; }
.hero-label .icon { width: 17px; height: 17px; }
.hero h1 { font: 400 clamp(2.5rem, 4.55vw, 4.45rem)/.99 var(--display); letter-spacing: -.049em; color: #fbf4ff; text-wrap: balance; }
.hero h1 em { display: block; color: #d6b5ff; font-weight: inherit; }
.hero p { max-width: 365px; margin-top: 20px; color: #d4c9e0; line-height: 1.55; }
.home-modes { margin-top: 29px; }
.home-modes h2 { margin-bottom: 13px; }
.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mode { position: relative; isolation: isolate; min-width: 0; min-height: 112px; padding: 17px 16px; display: flex; align-items: center; gap: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; text-align: left; background: var(--panel); transition: border-color .2s, transform .2s, background .2s; }
.mode:hover { transform: translateY(-2px); border-color: var(--mode-border); background: var(--panel-hover); }
.mode:active { transform: translateY(0); }
.mode::after { content: ''; position: absolute; inset: 0 0 0 auto; width: 152px; z-index: -1; opacity: .34; background: repeating-radial-gradient(ellipse at 115% 130%, transparent 0 13px, var(--mode-border) 14px, transparent 15px 23px); mask-image: linear-gradient(90deg, transparent, #000); }
.mode-quick { --mode-border: #416660; --mode-color: #a9e3d9; --mode-tone: #203633; }
.mode-deep { --mode-border: #6a4e89; --mode-color: #e0c7fa; --mode-tone: #332647; }
.mode-icon { display: grid; place-items: center; width: 45px; height: 45px; flex: none; color: var(--mode-color); background: var(--mode-tone); border: 1px solid var(--mode-border); border-radius: 12px; }
.mode-icon .icon { width: 22px; height: 22px; }
.mode-text { min-width: 0; flex: 1; display: grid; gap: 5px; }
.mode-text strong { font-size: 1.03rem; font-weight: 680; line-height: 1.23; letter-spacing: -.018em; }
.mode-text > span { font-size: .88rem; color: var(--muted); line-height: 1.4; }
.mode-tag { padding: 5px 8px; border-radius: 6px; background: var(--mode-tone); color: var(--mode-color); border: 1px solid color-mix(in srgb, var(--mode-border), transparent 30%); white-space: nowrap; font-size: .75rem; font-weight: 650; align-self: flex-start; }

.home-records { margin-top: 29px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { display: flex; align-items: center; gap: 9px; }
.count { font: 650 .82rem/1 var(--ui); color: var(--accent); background: #30253f; border-radius: 20px; padding: 5px 8px; }
.segments { display: flex; flex-wrap: wrap; gap: 4px; width: fit-content; border: 1px solid #2a2635; padding: 3px; background: #15141e; border-radius: 9px; margin-bottom: 12px; }
.segments button { background: transparent; border: 1px solid transparent; border-radius: 6px; min-height: 34px; padding: 5px 11px; font-size: .85rem; color: var(--muted); transition: background .18s, color .18s; }
.segments button:hover { color: var(--text); }
.segments button[aria-pressed="true"] { background: #2b233a; border-color: #413250; color: #e3cafa; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 193px; padding: 21px 16px; border: 1px dashed #393247; border-radius: 15px; background: radial-gradient(ellipse at 50% 0, #1a1725 0%, #15141e 75%); }
.empty-symbol { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 13px; background: #282035; border: 1px solid #433450; color: #d8b8f5; margin-bottom: 3px; }
.empty-symbol .icon { width: 21px; height: 21px; }
.empty h3 { font-size: 1rem; font-weight: 680; }
.empty p { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.empty .button { margin-top: 1px; min-height: 34px; padding: 6px 11px; font-size: .86rem; }
.search-box { display: flex; gap: 6px; align-items: center; padding: 0 9px; color: var(--subtle); border: 1px solid var(--line); border-radius: 8px; background: var(--field); }
.search-box .icon { width: 16px; height: 16px; }
.search-box input { padding: 6px 0; width: min(24vw, 150px); min-width: 0; border: none; color: var(--text); background: transparent; font-size: .9rem; }
.record-list { display: grid; gap: 8px; }
.record-row { display: flex; align-items: center; min-width: 0; gap: 13px; border: 1px solid var(--line); background: var(--panel); padding: 12px 14px; border-radius: 11px; transition: border .18s, background .18s; }
.record-row:hover { border-color: #594568; background: var(--panel-hover); }
.record-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 9px; background: #322645; color: #dfc4ff; }
.record-icon.quick { background: #223630; color: var(--aqua); }
.record-icon .icon { width: 18px; height: 18px; }
.record-copy { display: grid; gap: 3px; flex: 1; min-width: 0; }
.record-copy strong, .record-copy > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-copy strong { font-size: .98rem; font-weight: 680; }
.record-copy > span { color: var(--muted); font-size: .86rem; }
.record-meta { display: grid; justify-items: end; gap: 4px; flex: none; }
.status { width: fit-content; display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; background: #2f2840; color: #e0c6fa; font-size: .78rem; font-weight: 600; line-height: 1.25; }
.status.accepted { background: #243932; color: #bce4d5; }
.status.reviewed { background: #292f43; color: #c1d1f4; }
.record-date { color: var(--subtle); font-size: .77rem; display: flex; align-items: center; gap: 5px; }
.record-date .icon { width: 13px; height: 13px; }
.record-date.due { color: #d7b5f8; }

.page-intro { margin: 3px 0 24px; }
.page-intro h1, .edit-title h1 { font: 400 clamp(2.25rem, 4.2vw, 3.55rem)/1.08 var(--display); color: #f9f1fc; letter-spacing: -.037em; overflow-wrap: anywhere; }
.page-intro p { max-width: 650px; margin-top: 10px; font-size: 1rem; line-height: 1.55; color: var(--muted); }
.page-section + .page-section { margin-top: 25px; }
.page-section h2 { margin-bottom: 12px; }
.panel { border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.editor-panel { padding: 23px; }
.editor-panel + .editor-panel { margin-top: 14px; }
.panel-intro { margin-bottom: 18px; }
.panel-intro p { margin-top: 5px; color: var(--muted); line-height: 1.5; }
.edit-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 20px; }
.edit-title { min-width: 0; }
.edit-title h1 { margin-top: 10px; }
.edit-attributes, .edit-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mode-indicator { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--accent); }
.mode-indicator.quick { color: var(--aqua); }
.mode-indicator .icon { width: 17px; height: 17px; }
.step-list { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--side); }
.step-list a { display: inline-flex; align-items: center; border: 1px solid transparent; border-radius: 7px; min-height: 40px; padding: 7px 12px; color: var(--muted); font-size: .92rem; white-space: nowrap; }
.step-list a:hover { color: var(--text); background: #211d2c; }
.step-list a[aria-current] { background: #2d233c; color: #e4c9ff; border-color: #423353; }
.field-stack { display: grid; gap: 14px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 15px 14px; }
.field.full { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span:first-child, .rating legend { color: #eee7f5; font-size: .91rem; font-weight: 600; line-height: 1.35; }
.field input, .field textarea, .field select { width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid #3a334b; border-radius: 8px; background: var(--field); color: var(--text); line-height: 1.45; }
.field input:disabled, .field textarea:disabled, .field select:disabled { color: #d6cede; opacity: .79; }
.field textarea { min-height: 84px; resize: vertical; }
.field :is(input, textarea)::placeholder { color: #a099ae; opacity: 1; }
.field :is(input, textarea, select):focus { border-color: #9176b1; outline-offset: 1px; }
.select-wrap { position: relative; display: grid; }
.select-wrap select { appearance: none; padding-right: 37px; }
.select-wrap .icon { position: absolute; top: 50%; right: 11px; width: 16px; height: 16px; color: var(--accent); transform: translateY(-50%); pointer-events: none; }
.rating { min-width: 0; padding: 0; margin: 0; border: 0; }
.rating legend { padding: 0; margin-bottom: 7px; }
.rate-buttons, .rate-labels { display: flex; gap: 5px; max-width: 300px; }
.rate-buttons button { flex: 1; min-height: 43px; border: 1px solid #3a334b; background: var(--field); border-radius: 8px; color: #d3cadd; font-size: .94rem; }
.rate-buttons button:not(:disabled):hover { background: #2b2139; border-color: #765c92; }
.rate-buttons button[aria-pressed="true"] { color: #22182c; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.rate-buttons button:disabled { cursor: default; }
.rate-labels { justify-content: space-between; margin-top: 6px; color: var(--subtle); font-size: .78rem; }
.accordion { min-width: 0; background: #171520; border: 1px solid #332e41; border-radius: 9px; }
.accordion > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; min-height: 44px; color: #e5daf0; font-weight: 600; font-size: .92rem; list-style: none; cursor: pointer; }
.accordion > summary::-webkit-details-marker { display: none; }
.accordion > summary:hover { color: var(--accent-strong); }
.accordion > summary .icon { width: 17px; height: 17px; color: var(--accent); transition: transform .18s; }
.accordion[open] > summary .icon { transform: rotate(180deg); }
.accordion-body { padding: 2px 12px 13px; }
.actions { margin-top: 17px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.option-tabs, .choice-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 14px; }
.option-tabs button:not(.button) { max-width: 100%; padding: 7px 10px; min-height: 36px; border: 1px solid var(--line-strong); border-radius: 7px; background: #1a1725; color: var(--muted); font-size: .87rem; overflow-wrap: anywhere; }
.option-tabs button[aria-pressed="true"] { color: #ebd6ff; background: #342746; border-color: #6a527e; }
.option-tabs button:not(.button):hover { border-color: #826298; color: var(--text); }
.option-tabs .button, .choice-chips .button { min-height: 36px; padding: 6px 9px; }
.choice-chips { margin: -4px 0 0; }
.choice-chip { max-width: 100%; overflow-wrap: anywhere; }
.option-name-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.option-name-row .icon-button { min-height: 43px; width: 43px; }
.comparison { min-width: 0; overflow-x: auto; border: 1px solid var(--line-strong); border-radius: 9px; }
.comparison table { width: 100%; border-spacing: 0; font-size: .92rem; }
.comparison :is(td, th) { min-width: 174px; max-width: 310px; padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.comparison thead th { color: #ead4fa; background: #2b223a; }
.comparison th:first-child { position: sticky; left: 0; z-index: 1; }
.comparison tbody th { background: #211d2e; color: #e6dcec; font-weight: 600; }
.comparison td { color: #d9d0e0; background: #171520; }
.comparison .blank { color: var(--subtle); }
.comparison tr > :last-child { border-right: 0; }
.comparison tbody tr:last-child > * { border-bottom: 0; }
.callout { display: flex; gap: 11px; padding: 15px; border-radius: 10px; border: 1px solid #46365a; background: #261e35; color: #e4caf9; }
.callout > .icon { margin-top: 2px; width: 20px; height: 20px; }
.callout strong { font-size: .98rem; }
.callout p { color: #d0c3dd; margin-top: 4px; line-height: 1.5; }
.content > .callout { margin-bottom: 14px; }
.summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 16px 0 7px; gap: 10px; }
.summary-item { background: #15131f; padding: 10px 11px; border: 1px solid #2f293c; border-radius: 8px; min-width: 0; }
.summary-item dt { color: var(--subtle); font-size: .84rem; }
.summary-item dd { margin: 4px 0 0; color: #eee6f3; white-space: pre-wrap; overflow-wrap: anywhere; }
.snapshot .button { margin: 3px 0 -7px; }

.metric-grid, .data-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.metric, .data-panel { padding: 16px; }
.metric-icon { display: grid; place-items: center; width: 39px; height: 39px; margin-bottom: 9px; color: #dfc6f4; background: #312442; border: 1px solid #503960; border-radius: 10px; }
.metric-icon .icon { width: 19px; height: 19px; }
.metric h2, .data-panel h2 { font-size: 1rem; }
.metric strong { display: block; margin: 5px 0 3px; font: 400 2.5rem/1.06 var(--display); color: #ead6fd; }
.metric p, .data-panel p { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.data-panel p { margin: 4px 0 12px; }
.account-panel { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 14px; }
.account-panel .metric-icon { flex: none; }
.account-panel .actions { margin-top: 11px; }
.account-panel p.account-email { margin-bottom: 4px; color: var(--text); overflow-wrap: anywhere; }
.account-panel p.account-status { margin-bottom: 0; color: var(--accent); }
.account-panel p.account-error { color: #ffd7cf; }
.chart-panel { margin-top: 12px; }
.chart-empty { display: grid; place-items: center; min-height: 115px; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); text-align: center; }
.chart-layout { display: flex; gap: 8px; }
.chart-scale { flex: none; display: grid; align-content: space-between; height: 122px; margin: 0; padding: 0; list-style: none; font-size: .78rem; color: var(--subtle); }
.chart-scroll { overflow-x: auto; flex: 1; }
.chart-bars { width: max-content; min-width: 100%; display: flex; gap: 13px; list-style: none; margin: 0; padding: 0 12px; background: repeating-linear-gradient(to top, #342b43 0 1px, transparent 1px 24px) 0 8px / 100% 120px no-repeat; }
.chart-bars li { display: grid; text-align: center; width: 61px; }
.chart-tower { height: 128px; display: flex; align-items: end; justify-content: center; }
.chart-bar { width: 29px; height: calc(var(--rating) * 24px); display: grid; justify-content: center; align-content: start; padding: 3px; border: 1px solid #ba9cd6; border-radius: 6px 6px 0 0; color: #241a32; background: linear-gradient(#d9bbed, #a88cc9); font-size: .8rem; font-weight: 700; }
.chart-date { color: var(--muted); padding: 5px 0; font-size: .77rem; white-space: nowrap; }

.warning { margin-bottom: 14px; padding: 10px 12px; border: 1px solid #7b5652; border-radius: 8px; background: #3e292a; color: #ffd7cf; line-height: 1.5; }
.toast { position: fixed; z-index: 5; bottom: 18px; right: 20px; max-width: calc(100vw - 40px); padding: 11px 14px; border: 1px solid #705784; border-radius: 8px; background: #2a2137; color: #f4e9fb; font-size: .92rem; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.visible { opacity: 1; transform: translateY(0); }
dialog { width: min(640px, calc(100% - 24px)); max-height: calc(100% - 26px); color: var(--text); border: 1px solid #564367; border-radius: 15px; background: var(--panel); box-shadow: 0 24px 90px #0009; padding: 19px; }
dialog::backdrop { background: #0d0a14bd; backdrop-filter: blur(3px); }
dialog p { color: var(--muted); line-height: 1.55; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.dialog-head .icon-button { flex: none; }

@media (max-width: 1050px) {
  :root { --sidebar-width: 208px; }
  .topbar-inner { padding: 0 27px; }
  .content { padding-right: 27px; padding-left: 27px; }
  .mode { align-items: flex-start; }
  .mode-tag { position: absolute; right: 11px; bottom: 8px; }
  .mode-text { padding-bottom: 15px; }
}
@media (max-width: 760px) {
  .sidebar { inset: auto 0 0; width: auto; height: auto; max-height: 100%; padding: 4px 5px max(4px, env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); background: #171521; }
  .sidebar .brand, .local-notice { display: none; }
  .navigation { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; width: 100%; }
  .nav-main, .nav-bottom { display: contents; }
  .nav-link { gap: 4px; min-height: 48px; padding: 3px 1px; flex-direction: column; justify-content: center; font-size: .72rem; white-space: nowrap; }
  .nav-link .icon { width: 18px; height: 18px; }
  .workspace { margin-left: 0; }
  .topbar { height: 63px; }
  .topbar-inner { padding: 0 15px; gap: 8px; }
  .mobile-brand { display: grid; width: 34px; height: 34px; border-radius: 9px; }
  .mobile-brand .icon { width: 19px; height: 19px; }
  .top-label { flex: 1; font-size: .88rem; }
  .top-label .icon { display: none; }
  .new-button { padding: 7px 9px; min-height: 37px; gap: 4px; font-size: .8rem; }
  .new-button .icon { width: 15px; height: 15px; }
  .content { padding: 19px 15px calc(75px + env(safe-area-inset-bottom)); }
  .hero { min-height: 255px; padding: 24px 21px; border-radius: 15px; }
  .hero h1 { font-size: clamp(2.65rem, 7.1vw, 4rem); }
  .hero-art { background-size: auto 115%; background-position: 71% 50%; opacity: .74; }
  .hero-art::after { background: linear-gradient(90deg, #1c152cee 1%, #1c152ca6 35%, #1c152c33 85%); }
  .hero-label { font-size: .73rem; letter-spacing: .095em; }
  .hero p { margin-top: 13px; }
  .home-modes, .home-records { margin-top: 23px; }
  .editor-panel { padding: 15px; }
  .toast { bottom: calc(62px + env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) {
  .mode-grid, .data-grid, .field-grid { grid-template-columns: 1fr; gap: 8px; }
  .mode { min-height: 77px; align-items: center; padding: 10px; gap: 8px; }
  .mode-icon { width: 37px; height: 37px; border-radius: 9px; }
  .mode-icon .icon { width: 18px; height: 18px; }
  .mode-text { gap: 4px; padding: 0; }
  .mode-text strong { font-size: .94rem; }
  .mode-text > span { font-size: .79rem; }
  .mode-tag { position: static; align-self: center; padding: 4px 5px; font-size: .68rem; }
  .field-grid { gap: 12px; }
  .summary { grid-template-columns: 1fr; gap: 6px; }
  .step-list { flex-wrap: nowrap; overflow-x: auto; }
  .step-list a { padding: 6px 9px; font-size: .84rem; }
  .segments { gap: 1px; }
  .segments button { font-size: .77rem; padding: 4px 6px; }
  .comparison :is(td, th) { min-width: 150px; }
  .comparison tr > :first-child { min-width: 113px; max-width: 113px; padding-right: 7px; padding-left: 7px; }
  .metric-grid { gap: 7px; }
  .metric { padding: 10px; }
  .metric h2 { overflow-wrap: anywhere; }
  .record-row { gap: 7px; padding: 9px; }
  .record-icon { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
