/* «Мой путь» — тёплый личный дневник, который умеет считать. */
:root {
    --paper: #F5EFE4;
    --paper-deep: #EEE5D7;
    --paper-card: #FFF9F0;
    --ink: #332820;
    --ink-soft: #6D5A4F;
    --ink-faint: #806F63;
    --rule: #D8CABB;
    --rule-strong: #A99381;
    --red: #B85745;
    --red-deep: #914132;
    --blue: #47708A;
    --green: #48705A;
    --amber: #C27A3A;
    --bg: var(--paper);
    --bg-elev: var(--paper-deep);
    --bg-card: var(--paper-card);
    --bg-card-2: var(--paper-deep);
    --border: var(--rule);
    --text: var(--ink);
    --text-dim: var(--ink-soft);
    --text-mute: var(--ink-faint);
    --accent: var(--amber);
    --accent-2: var(--blue);
    --accent-soft: rgba(194, 122, 58, .14);
    --income: var(--green);
    --expense: var(--red-deep);
    --warn: var(--amber);
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 12px 30px rgba(73, 49, 32, .07);
    --font: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Spectral', Georgia, serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink);
    font-family: var(--font); font-size: 15px; line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; }
::selection { background: rgba(194, 122, 58, .25); }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
h1, h2, h3 { margin: 0 0 .45em; font-family: var(--font-display); font-weight: 600; line-height: 1.12; }
h1 { font-size: clamp(2rem, 4vw, 3.15rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; color: var(--ink-soft); }
code { font-family: var(--font-mono); font-size: .86em; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; scroll-margin-top: 88px; }
.skip-link {
    position: absolute; left: -9999px; top: 10px; z-index: 100;
    padding: 10px 16px; background: var(--ink); color: var(--paper-card); border-radius: 8px; font-weight: 600;
}
.skip-link:focus { left: 10px; }
main:focus { outline: none; }

/* Shell */
.topbar {
    position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 26px;
    min-height: 72px; padding: 12px max(20px, calc((100vw - 1180px) / 2));
    background: rgba(245, 239, 228, .95); border-bottom: 1px solid var(--rule); backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; font-family: var(--font-display); font-size: 1.18rem; font-weight: 700; }
.brand-mark { position: relative; width: 28px; height: 28px; flex: none; background: var(--amber); border-radius: 9px 9px 9px 3px; transform: rotate(-4deg); }
.brand-mark::after { content: ''; position: absolute; inset: 7px; border: 2px solid var(--paper-card); border-radius: 50%; }
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a, .subnav a {
    display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 8px 13px;
    border-radius: 9px; color: var(--ink-soft); font-size: .9rem; font-weight: 600; transition: background .16s, color .16s;
}
.topnav a:hover, .subnav a:hover { color: var(--ink); background: var(--paper-deep); }
.topnav a.active, .subnav a.active { color: var(--ink); background: var(--paper-card); box-shadow: inset 0 -3px 0 var(--amber); }
.topbar-right { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.user-chip { padding: 7px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-card); font-size: .86rem; font-weight: 600; }
.mobile-nav { display: none; }

.page { width: min(1180px, 100%); margin: 0 auto; padding: 42px 28px 100px; }
.page-wide { width: min(1320px, 100%); }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-header > div:first-child { max-width: 700px; }
.page-kicker, .eyebrow, .mono-label {
    display: block; margin-bottom: 9px; color: var(--amber); font-family: var(--font-mono);
    font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.page-title { margin-bottom: 8px; }
.page-intro { max-width: 620px; margin: 0; font-size: 1.03rem; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.sticky-panel { position: sticky; top: 94px; }
.section { margin-top: 68px; }
.section-head, .card-title {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-bottom: 18px;
}
.section-head { padding-bottom: 13px; border-bottom: 1px solid var(--rule); }
.section-head h2, .card-title h2 { margin: 0; }
.section-lead { max-width: 600px; margin: -4px 0 24px; }
.section-center { text-align: center; }
.section-center .section-lead { margin-inline: auto; }

/* Surfaces and roles */
.card, .section-card {
    padding: 24px; background: var(--paper-card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad-lg { padding: 32px; }
.primary-card { border-color: rgba(194, 122, 58, .48); background: #F8EBDD; }
.working-card { background: var(--paper-card); }
.reference-card { background: rgba(255, 249, 240, .62); box-shadow: none; }
.card-title { padding-bottom: 13px; border-bottom: 1px solid var(--rule); }
.card-title h2 { font-size: 1.3rem; }
.muted, .dim { color: var(--ink-faint); }
.error-text { color: var(--red-deep) !important; }
.label { color: var(--ink-soft); font-size: .78rem; font-weight: 600; }

/* Actions */
.btn, .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 17px;
    border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 700; text-align: center;
    transition: transform .16s, background .16s, border-color .16s, color .16s; 
}
.btn { background: var(--amber); border-color: var(--amber); color: #2E1D12; box-shadow: 0 5px 12px rgba(194, 122, 58, .2); }
.btn:hover { background: #AD642B; border-color: #AD642B; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--rule-strong); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-deep); border-color: var(--ink-soft); }
.btn-danger { background: var(--red); border-color: var(--red); color: #FFF9F0; }
.btn-danger:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-accent2 { background: var(--blue); border-color: var(--blue); color: #FFF9F0; }
.btn-accent2:hover { background: #375A70; border-color: #375A70; }
.btn-sm { min-height: 34px; padding: 7px 12px; font-size: .84rem; }
.btn-block { width: 100%; }

/* Stats and Today */
.stat { min-width: 0; padding: 17px 18px; background: var(--paper-card); border: 1px solid var(--rule); border-radius: var(--radius-sm); }
.stat .label { display: block; }
.stat .value { margin-top: 7px; font-family: var(--font-mono); font-size: clamp(1.35rem, 2.4vw, 2rem); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.stat .value.pos { color: var(--green); }
.stat .value.neg { color: var(--red-deep); }
.today-summary { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(140px, .8fr)); gap: 12px; align-items: stretch; }
.today-total { padding: 25px; background: var(--ink); color: var(--paper-card); border-radius: var(--radius); }
.today-total .label, .today-total p { color: #E9DCCB; }
.today-total .value { display: block; margin: 7px 0; font-family: var(--font-mono); font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1; font-variant-numeric: tabular-nums; }
.today-total p { margin: 0; font-size: .91rem; }
.today-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: 22px; align-items: start; }
.action-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 250px; }
.action-card .action-copy { max-width: 360px; }
.action-card .action-copy p { margin-bottom: 0; }

/* Timer */
.timer-wrap { text-align: center; }
.timer-display { color: var(--ink); font-family: var(--font-mono); font-size: clamp(3rem, 10vw, 5.7rem); font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: .03em; }
.timer-display.running { color: var(--red-deep); }
.timer-hint { min-height: 28px; margin: 14px 0 20px; color: var(--ink-soft); }
.timer-controls { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.timer-big-btn { min-height: 50px; padding: 13px 25px; font-size: 1rem; }
.timer-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

/* Timeline and rows */
.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ''; position: absolute; top: 12px; bottom: 12px; left: 10px; width: 2px; background: var(--rule); }
.timeline-item { position: relative; display: grid; grid-template-columns: 30px 72px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-dot { z-index: 1; width: 12px; height: 12px; margin-left: 5px; border: 3px solid var(--paper-card); border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 1px var(--rule-strong); }
.timeline-time, .row-time, .row-amount { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.timeline-time { color: var(--ink-faint); font-size: .8rem; }
.timeline-title { min-width: 0; font-weight: 600; }
.timeline-title small { display: block; overflow: hidden; color: var(--ink-faint); font-size: .82rem; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.timeline-duration { color: var(--ink-soft); font-size: .86rem; }
.entry-day { margin-bottom: 28px; }
.entry-day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.entry-day-head .date { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.entry-day-head .total { color: var(--amber); font-family: var(--font-mono); font-weight: 600; }
.row-item { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 13px 4px; border-bottom: 1px solid var(--rule); }
.row-item:hover { background: rgba(238, 229, 215, .5); }
.row-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; }
.row-icon { width: 28px; flex: none; text-align: center; font-size: 1.15rem; }
.row-main { min-width: 0; flex: 1; }
.row-main .title { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.row-main .sub { overflow: hidden; color: var(--ink-faint); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.row-time, .row-amount { flex: none; color: var(--ink-soft); font-size: .86rem; }
.row-amount { font-weight: 700; }
.row-amount.income { color: var(--green); }
.row-amount.expense { color: var(--red-deep); }
.row-actions form { display: inline; }
.icon-btn { min-width: 32px; min-height: 32px; padding: 5px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-faint); cursor: pointer; }
.icon-btn:hover { background: rgba(184, 87, 69, .12); color: var(--red-deep); }

/* Forms */
.field { margin-bottom: 15px; }
.field label { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: .84rem; font-weight: 700; }
.field small, .field-hint { display: block; margin-top: 5px; color: var(--ink-faint); font-size: .8rem; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm); background: #FFFDF8; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #8D7E72; }
input:focus, select:focus, textarea:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
textarea { min-height: 90px; resize: vertical; }
input[type="search"] { font-family: var(--font); }
input[type="color"] { min-height: 44px; padding: 4px; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > * { min-width: 120px; flex: 1; }
.inline-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.inline-form .field { flex: 1; min-width: 140px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; padding: 14px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--paper-deep); }
.checkbox-row input { width: 20px; min-height: 20px; margin-top: 3px; flex: none; }
.checkbox-row .meta { flex: 1; }
.checkbox-row .meta b { display: block; }

/* Chips, tabs, progress, charts */
.chip, .tag { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 4px 9px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-deep); color: var(--ink-soft); font-size: .75rem; font-weight: 700; }
.tag { border-radius: 7px; font-family: var(--font-mono); font-size: .68rem; }
.tabs { display: inline-flex; overflow: hidden; border: 1px solid var(--rule-strong); border-radius: 10px; }
.tabs a, .tabs label { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 7px 13px; border-right: 1px solid var(--rule); color: var(--ink-soft); font-size: .84rem; font-weight: 700; cursor: pointer; }
.tabs a:last-child, .tabs label:last-child { border-right: 0; }
.tabs a.active, .tabs label:has(input:checked) { background: var(--ink); color: var(--paper-card); }
.tabs label:has(input:focus-visible) { outline: 3px solid var(--amber); outline-offset: -3px; }
.progress { height: 9px; overflow: hidden; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-deep); }
.progress > span { display: block; height: 100%; min-width: 3px; border-radius: inherit; background: var(--amber); }
.donut-wrap { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.donut { width: 200px; height: 200px; flex: none; }
.legend { min-width: 240px; flex: 1; }
.legend-item { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.legend-item:last-child { border-bottom: 0; }
.legend-dot { width: 11px; height: 11px; flex: none; border-radius: 50%; }
.legend-name { min-width: 0; flex: 1; }
.legend-val, .legend-pct { font-family: var(--font-mono); font-size: .83rem; font-variant-numeric: tabular-nums; }
.legend-val { font-weight: 700; }
.legend-pct { width: 48px; color: var(--ink-faint); text-align: right; }

/* Flash and empty */
.flash { width: min(900px, calc(100% - 40px)); margin: 14px auto 0; padding: 12px 16px; border: 1px solid var(--rule); border-left: 4px solid var(--amber); border-radius: 10px; background: var(--paper-card); font-weight: 600; }
.flash-success { border-left-color: var(--green); color: var(--green); }
.flash-error { border-left-color: var(--red); color: var(--red-deep); }
.empty { padding: 42px 20px; color: var(--ink-faint); text-align: center; }
.empty .ico { margin-bottom: 10px; font-size: 2rem; }
.empty p { max-width: 430px; margin: 0 auto 16px; }
.errors { margin: 0 0 18px; padding: 12px 16px; border: 1px solid rgba(184, 87, 69, .4); border-left: 4px solid var(--red); border-radius: 10px; background: rgba(184, 87, 69, .08); list-style: none; }
.errors li { color: var(--red-deep); font-size: .88rem; }

/* Subnavigation */
.subnav { display: flex; gap: 4px; margin-bottom: 29px; padding: 4px; border: 1px solid var(--rule); border-radius: 12px; background: rgba(255, 249, 240, .55); width: fit-content; }
.subnav a { min-height: 36px; padding: 7px 12px; font-size: .83rem; }

/* Landing */
.hero { padding: 25px 0 4px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .82fr); gap: 54px; align-items: center; }
.hero h1 { max-width: 650px; margin-bottom: 19px; font-size: clamp(2.8rem, 6vw, 5.2rem); }
.hero h1 .mark { color: var(--amber); }
.hero .lead { max-width: 580px; font-size: 1.15rem; line-height: 1.65; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.ledger { padding: 21px; border: 1px solid var(--rule); border-radius: 22px 22px 22px 6px; background: var(--paper-card); box-shadow: var(--shadow); transform: rotate(1deg); }
.ledger-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); color: var(--ink-soft); font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.ledger-head .live { color: var(--red-deep); }
.ledger-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.ledger-row .t, .ledger-row .d { font-family: var(--font-mono); font-size: .78rem; font-variant-numeric: tabular-nums; }
.ledger-row .t, .ledger-row .k { color: var(--ink-faint); }
.ledger-row .k { font-size: .7rem; }
.ledger-row .d { color: var(--ink-soft); text-align: right; }
.ledger-row.tick .d, .ledger-row.tick .a { color: var(--red-deep); }
.ledger-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 15px; font-family: var(--font-mono); }
.ledger-total .lbl { color: var(--amber); font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.ledger-total .val { color: var(--ink); font-size: 1.2rem; font-weight: 700; }
.ledger-total small { display: block; margin-top: 3px; color: var(--ink-faint); font-size: .65rem; font-weight: 400; text-align: right; }
.features, .steps, .faq { overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-card); box-shadow: var(--shadow); }
.features { display: grid; grid-template-columns: repeat(4, 1fr); }
.feature { padding: 25px 22px; border-right: 1px solid var(--rule); }
.feature:last-child { border-right: 0; }
.feature .ico { margin-bottom: 12px; font-size: 1.5rem; }
.feature h3 { margin-bottom: 7px; }
.feature p { margin: 0; font-size: .9rem; }
.quote { max-width: 800px; margin: 0 auto; padding: 30px 34px; border: 1px solid var(--rule); border-left: 5px solid var(--amber); border-radius: 5px 18px 18px 5px; background: var(--paper-card); box-shadow: var(--shadow); }
.quote p { margin-bottom: 10px; color: var(--ink); font-family: var(--font-display); font-size: 1.35rem; font-style: italic; line-height: 1.5; }
.quote cite { color: var(--ink-faint); font-size: .9rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.step { padding: 27px 24px; border-right: 1px solid var(--rule); text-align: left; }
.step:last-child { border-right: 0; }
.step::before { display: block; margin-bottom: 13px; counter-increment: step; content: '0' counter(step); color: var(--amber); font-family: var(--font-mono); font-weight: 700; }
.step b { display: block; margin-bottom: 6px; font-family: var(--font-display); font-size: 1.1rem; }
.step p { margin: 0; font-size: .92rem; }
.cta-band { padding: 48px 32px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--ink); color: var(--paper-card); text-align: center; box-shadow: var(--shadow); }
.cta-band h2 { color: var(--paper-card); }
.cta-band p { max-width: 520px; margin: 0 auto 22px; color: #E9DCCB; }
.cta-band .hero-cta { justify-content: center; }
.faq { max-width: 800px; margin: 0 auto; }
.faq-item { padding: 4px 20px; border-bottom: 1px solid var(--rule); }
.faq-item:last-child { border-bottom: 0; }
.faq-item[open] { background: var(--paper-deep); }
.faq-item summary { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; cursor: pointer; font-weight: 700; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--amber); font-family: var(--font-mono); font-size: 1.1rem; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin: 0 0 14px; font-size: .92rem; }

/* Auth */
.auth-wrap { width: min(440px, 100%); margin: 30px auto; }
.auth-wrap .card { padding: 32px; }
.auth-switch { margin-top: 18px; color: var(--ink-faint); text-align: center; }
.auth-switch a { color: var(--red-deep); font-weight: 700; }

@media (max-width: 900px) {
    .hero-grid, .today-layout, .content-layout { grid-template-columns: 1fr; }
    .sticky-panel { position: static; }
    .today-summary { grid-template-columns: 1fr 1fr; }
    .today-total { grid-column: 1 / -1; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .feature:nth-child(2) { border-right: 0; }
    .feature:nth-child(-n + 2) { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 700px) {
    html { scroll-behavior: auto; }
    .topbar { min-height: 62px; padding: 10px 16px; }
    .topnav { display: none; }
    .user-chip { display: none; }
    .page { padding: 28px 16px 100px; }
    .page-header { align-items: start; flex-direction: column; gap: 14px; margin-bottom: 24px; }
    .grid-2, .grid-3, .grid-4, .reference-grid { grid-template-columns: 1fr; }
    .today-summary { grid-template-columns: 1fr; }
    .today-total { grid-column: auto; }
    .card, .card-pad-lg { padding: 20px; }
    .timeline-item { grid-template-columns: 24px 58px minmax(0, 1fr); }
    .timeline-duration { grid-column: 3; grid-row: 2; }
    .features, .steps { grid-template-columns: 1fr; }
    .feature, .step { border-right: 0; border-bottom: 1px solid var(--rule); }
    .feature:last-child, .step:last-child { border-bottom: 0; }
    .ledger { transform: none; }
    .hero h1 { font-size: clamp(2.6rem, 14vw, 4rem); }
    .hero-cta .btn, .hero-cta .btn-ghost { flex: 1; }
    .subnav { width: 100%; overflow-x: auto; }
    .subnav a { white-space: nowrap; }
    .mobile-nav {
        position: fixed; right: 0; bottom: 0; left: 0; z-index: 60; display: grid; grid-template-columns: repeat(4, 1fr);
        padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: rgba(255, 249, 240, .97); backdrop-filter: blur(12px);
    }
    .mobile-nav a { display: flex; min-height: 48px; align-items: center; justify-content: center; color: var(--ink-faint); font-size: .72rem; font-weight: 700; text-align: center; }
    .mobile-nav a.active { color: var(--amber); }
    .mobile-nav a span { display: block; }
    .mobile-nav a span:first-child { margin-bottom: 2px; font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
