@font-face { font-family: Inter; src: url("../fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url("../fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url("../fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Noto Serif"; src: url("../fonts/NotoSerif-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Serif"; src: url("../fonts/NotoSerif-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

html[data-palette="a"] {
  --bg: #f7f6f2;
  --bg-2: #f3f1eb;
  --paper: #fffefb;
  --ink: #24312e;
  --muted: #5a635f;
  --line: #e4e2dc;
  --brand: #3e6b5c;
  --brand-2: #2f5649;
  --on-brand: #fffefb;
  --accent: #7a6238;
  --accent-soft: #f6f1e6;
  --mint: #eef3ef;
  --income: #2f6a56;
  --income-soft: #e7f0ea;
  --expense: #8a4552;
  --expense-soft: #f8eeed;
  --alert: #8e2f2a;
  --amber: #7a6238;
  --amber-soft: #f6f1e6;
  --wash-1: #fffefb;
  --wash-2: #e7f0ea;
  --wash-3: #f3ead6;
  --card-line: #e4e2dc;
  --story: #3e6b5c;
}
:root,
html[data-palette="b"] {
  --bg: #f7f8f6;
  --bg-2: #f1f4f2;
  --paper: #ffffff;
  --ink: #1e2a28;
  --muted: #4e625c;
  --line: #e3e8e5;
  --brand: #3d6e62;
  --brand-2: #2f574e;
  --on-brand: #ffffff;
  --accent: #6e5a8a;
  --accent-soft: #f3f0f7;
  --mint: #eef6f4;
  --income: #2e6b5c;
  --income-soft: #e7f3ef;
  --expense: #8e4e58;
  --expense-soft: #f8eeee;
  --alert: #8e2f2a;
  --amber: #7a6238;
  --amber-soft: #f6f1e6;
  --wash-1: #f4faf7;
  --wash-2: #d9efe8;
  --wash-3: #ebe4f2;
  --card-line: #d5e4df;
  --story: #3d6e62;
  --shadow: none;
  --radius: 18px;
  --serif: "Noto Serif", Georgia, serif;
  --sans: Inter, "Segoe UI", sans-serif;
  --nav: 76px;
  color-scheme: light;
}
html[data-palette="c"] {
  --bg: #f4f4f3;
  --bg-2: #eeeae6;
  --paper: #fbfbf9;
  --ink: #24302e;
  --muted: #5c6562;
  --line: #e3e3e0;
  --brand: #3a6b60;
  --brand-2: #2c554c;
  --on-brand: #fbfbf9;
  --accent: #2c554c;
  --accent-soft: #e7f0ec;
  --mint: #eef2f0;
  --income: #2e6658;
  --income-soft: #e7f0ec;
  --expense: #8e5344;
  --expense-soft: #f8f1ee;
  --alert: #8e2f2a;
  --amber: #8a6232;
  --amber-soft: #f8f1e8;
  --wash-1: #f7f7f6;
  --wash-2: #e6eeeb;
  --wash-3: #f6e8e2;
  --card-line: #e0e4e2;
  --story: #3a6b60;
}
html[data-palette="a"][data-theme="dark"] {
  --bg: #1c211f;
  --bg-2: #242a28;
  --paper: #262c29;
  --ink: #f6f4ef;
  --muted: #c9c3b8;
  --line: #3a403d;
  --brand: #c5d5cc;
  --brand-2: #dce7e1;
  --on-brand: #1c211f;
  --accent: #d4bc8e;
  --accent-soft: #3a3428;
  --mint: #2a3330;
  --income: #c5d9ce;
  --income-soft: #24312c;
  --expense: #e4b8b6;
  --expense-soft: #3a2c2c;
  --alert: #f0b0aa;
  --amber: #d4bc8e;
  --amber-soft: #3a3428;
  --wash-1: #2a3330;
  --wash-2: #24302c;
  --wash-3: #322e28;
  --card-line: #3a403d;
  --story: #c5d5cc;
  color-scheme: dark;
}
html[data-palette="b"][data-theme="dark"] {
  --bg: #1a2220;
  --bg-2: #222b28;
  --paper: #232c29;
  --ink: #f4f7f5;
  --muted: #c5d0cb;
  --line: #35403c;
  --brand: #b7d0c6;
  --brand-2: #d5e6df;
  --on-brand: #1a2220;
  --accent: #d4cce4;
  --accent-soft: #2c2836;
  --mint: #24302c;
  --income: #c5ddd4;
  --income-soft: #1e2c28;
  --expense: #e7c0c4;
  --expense-soft: #3a2c30;
  --alert: #f0b0aa;
  --amber: #e2c9a0;
  --amber-soft: #3a3228;
  --wash-1: #24302c;
  --wash-2: #1e2e2c;
  --wash-3: #2a2834;
  --card-line: #35403c;
  --story: #b7d0c6;
  color-scheme: dark;
}
html[data-palette="c"][data-theme="dark"] {
  --bg: #1e2221;
  --bg-2: #262b29;
  --paper: #282d2b;
  --ink: #f5f4f1;
  --muted: #c9c6c0;
  --line: #3a3f3c;
  --brand: #c3d4ce;
  --brand-2: #dce6e2;
  --on-brand: #1e2221;
  --accent: #c3d4ce;
  --accent-soft: #2a3330;
  --mint: #2a312f;
  --income: #c9dcd4;
  --income-soft: #24302c;
  --expense: #e8c4b6;
  --expense-soft: #3a302c;
  --alert: #f0b0aa;
  --amber: #e2c9a0;
  --amber-soft: #3a3228;
  --wash-1: #2a312f;
  --wash-2: #26302e;
  --wash-3: #332e2b;
  --card-line: #3a3f3c;
  --story: #c3d4ce;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  min-height: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.press { transition: transform .16s ease, background .16s ease; }
.press:active { transform: scale(.98); }

.boot, .auth-bg {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 20px 48px;
  background: var(--bg);
}
.auth-card, .boot-card {
  width: min(440px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 22px 24px;
  animation: rise .45s cubic-bezier(.16,.84,.32,1);
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand);
  font-family: var(--serif); font-size: 22px;
}
html[data-theme="dark"] .mark { background: var(--brand); color: var(--on-brand); }
.brand h1, .panel h2, .top h1 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.03em; margin: 0; }
.brand p, .lede { color: var(--muted); margin: 4px 0 0; }
.field { display: grid; gap: 6px; margin-top: 12px; }
.field span, .kicker { font-size: 13px; color: var(--muted); }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
input, select, textarea {
  width: 100%; min-height: 48px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--paper); padding: 10px 12px;
}
input[type="checkbox"], input[type="radio"], input[type="range"], input[type="file"] {
  width: auto; min-height: 0; padding: 0; accent-color: var(--brand);
}
textarea { min-height: 80px; resize: vertical; }
.row-2 { display: grid; gap: 10px; }
@media (min-width: 560px) { .row-2 { grid-template-columns: 1fr 1fr; } }
.field-hint, .help, .error { font-size: 13px; color: var(--muted); }
.field-hint { margin: 0; }
.recovery-code {
  font-family: var(--serif); font-size: 22px; line-height: 1.45; letter-spacing: 0.03em;
  text-align: center; margin: 18px 0 8px; padding: 16px 10px;
  background: var(--mint); border-radius: 16px; word-break: break-word;
}
.notice {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0; padding: 12px 14px; border-radius: 16px;
  background: var(--accent-soft); color: var(--ink); font-size: 14px;
}
.notice button { border: 0; background: transparent; color: var(--accent); padding: 0; min-height: 0; }
.check { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 14px; }
.error { color: var(--alert); }
.warn-box {
  margin-top: 14px; padding: 12px 14px; border-radius: 16px;
  background: var(--amber-soft); color: var(--ink); font-size: 14px;
}
.btn {
  border: 0; border-radius: 999px; min-height: 48px; padding: 0 16px;
  background: var(--paper); border: 1px solid var(--line);
}
.btn.primary { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--expense-soft); color: var(--expense); border-color: transparent; }
.btn.block { width: 100%; margin-top: 14px; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.users { display: flex; gap: 8px; overflow: auto; padding-bottom: 4px; margin: 8px 0; }
.users button { border-radius: 999px; border: 1px solid var(--line); background: var(--paper); padding: 8px 12px; white-space: nowrap; }

.shell { min-height: 100dvh; }
.rail { display: none; }
.main { min-height: 100dvh; }
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px 10px;
  background: var(--bg);
}
.top h1 { font-size: 28px; }
.icon-btn, .tabbar a, .rail a {
  display: grid; place-items: center; gap: 4px;
  text-decoration: none; color: var(--muted); background: transparent; border: 0;
}
.icon-btn { width: 44px; height: 44px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.icon-btn svg, .tabbar svg, .rail svg, .item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.view { padding: 8px 22px calc(var(--nav) + 96px); display: grid; gap: 28px; }
.view.enter { animation: rise .42s cubic-bezier(.16,.84,.32,1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.month-nav { display: flex; align-items: center; justify-content: space-between; }
.month-nav button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: transparent; font-size: 22px; color: var(--muted); }
.month-nav span { font-size: 15px; }
.balance {
  background: linear-gradient(160deg, var(--wash-1) 0%, var(--wash-2) 46%, var(--wash-3) 100%);
  border: 1px solid var(--card-line); border-radius: var(--radius); padding: 28px 22px 22px;
}
.hero-num { font-family: var(--serif); font-size: clamp(40px, 12vw, 56px); line-height: 1.05; margin: 8px 0 22px; letter-spacing: -0.03em; }
.balance-month { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.month-num { font-family: var(--serif); font-size: 28px; margin: 4px 0 0; }
.pair { display: flex; gap: 18px; font-size: 14px; }
.panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px;
}
.panel h2 { font-size: 18px; font-weight: 600; }
.more-links { display: grid; }
.more-links a, .panel header a { padding: 16px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--accent); }
.panel header a { padding: 0; border: 0; font-size: 14px; }
.alert-line { margin: 0; color: var(--alert); font-size: 14px; }
.alert-line a { color: var(--alert); }
.panel header, .split { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--bg); border-radius: 16px; padding: 10px; }
.stat b { display: block; font-family: var(--serif); font-size: 18px; margin-top: 4px; }
.in { color: var(--income); }
.out { color: var(--expense); }
.chart { width: 100%; height: auto; display: block; }
.chart text { font-size: 20px; fill: var(--muted); font-family: var(--sans); }
.bar.in { fill: var(--income); }
.bar.out { fill: var(--expense); }
.chart-col { transform-box: fill-box; transform-origin: center bottom; animation: risebar .7s cubic-bezier(.2,.8,.2,1) both; }
.chart-projected { opacity: .45; }
@keyframes risebar { from { transform: scaleY(.08); opacity: 0; } }
.chart.line .area { fill: color-mix(in srgb, var(--brand) 25%, transparent); }
.chart.line .stroke { fill: none; stroke: var(--brand); stroke-width: 3; }
.chart.line circle { fill: var(--brand); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.swatch { width: 10px; height: 10px; border-radius: 99px; display: inline-block; margin-right: 6px; }
.donut { width: 132px; height: 132px; }
.donut-hole { fill: var(--paper); }
.item > strong { white-space: nowrap; }
.cat-row, .item, .menu-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  width: 100%; text-align: left; background: transparent; border: 0; padding: 8px 0;
}
.menu-row { padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.menu-row.on strong { color: var(--brand); }
.dot { width: 12px; height: 12px; border-radius: 99px; }
.track { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.track i { display: block; height: 100%; background: var(--brand); border-radius: inherit; transform-origin: left; animation: grow .7s both; }
.track.over i { background: var(--alert); }
@keyframes grow { from { transform: scaleX(.05); } }
.empty { padding: 8px 0 4px; }
.empty h3 { margin: 0 0 4px; font-size: 18px; }
.thumb, .shot {
  width: 54px; height: 70px; border-radius: 12px; object-fit: cover; background: var(--bg); border: 0; padding: 0;
}
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 12px; background: var(--bg); color: var(--muted); margin: 2px 4px 2px 0; }
.badge.warn { background: var(--amber-soft); color: var(--ink); }
.badge.ok { background: var(--mint); color: var(--brand-2); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border-radius: 999px; border: 1px solid var(--line); background: var(--paper); padding: 8px 12px; white-space: nowrap; }
.chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.period-label { margin: 0; text-align: center; color: var(--muted); font-weight: 600; }
.pills { display: flex; gap: 8px; }
.pill {
  flex: 1; min-height: 44px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); font-weight: 650; padding: 0 8px;
}
.pill.on { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  border: 1px solid var(--line); background: var(--paper); color: inherit;
  border-radius: 22px; padding: 14px 12px 12px; text-align: left;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--ink) 6%, transparent);
  animation: tile-in .45s cubic-bezier(.16,.84,.32,1) both;
}
.tile:nth-child(2) { animation-delay: .04s; }
.tile:nth-child(3) { animation-delay: .08s; }
.tile:nth-child(4) { animation-delay: .12s; }
.tile:nth-child(5) { animation-delay: .16s; }
.tile:nth-child(6) { animation-delay: .2s; }
.tile:nth-child(7) { animation-delay: .24s; }
.tile:nth-child(8) { animation-delay: .28s; }
.tile:nth-child(9) { animation-delay: .32s; }
.tile:nth-child(10) { animation-delay: .36s; }
.tile:active { transform: scale(.97); }
.tile b { display: block; font-family: var(--serif); font-size: 1.2rem; line-height: 1.15; font-weight: 700; }
.tile small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; font-weight: 600; }
.tile-ico {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: var(--mint); font-size: 20px; margin-bottom: 8px;
}
.cat-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat-pick {
  display: flex; align-items: center; gap: 8px; min-height: 52px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--paper);
  padding: 8px 10px; text-align: left; font-weight: 600;
}
.cat-pick span { font-size: 22px; line-height: 1; }
.cat-pick.on { background: var(--mint); border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.cat-pick:active, .pill:active { transform: scale(.97); }
.cheer {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}
.cheer-card {
  width: min(360px, 100%); text-align: center; padding: 28px 22px 22px;
  border-radius: 28px; border: 1px solid var(--card-line);
  background: linear-gradient(180deg, var(--paper), var(--wash-2));
  animation: tile-in .4s cubic-bezier(.16,.84,.32,1) both;
}
.cheer-glow {
  width: 96px; height: 96px; margin: 0 auto 4px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, var(--paper) 0%, var(--wash-2) 42%, var(--mint) 68%, transparent 74%);
  animation: cheer-beat 2.4s ease-in-out infinite;
}
.cheer-msg { font-family: var(--serif); font-style: italic; font-size: 28px; line-height: 1.3; margin: 8px 0 18px; }
@keyframes tile-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cheer-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.drop {
  border: 1px dashed var(--line);
  border-radius: 18px; padding: 28px 18px; text-align: center; background: var(--paper);
}
.drop.over { transform: scale(1.01); background: var(--mint); }
.manage {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.stack { display: grid; gap: 8px; margin-top: 8px; }
.bulk {
  position: sticky; bottom: calc(var(--nav) + 8px); z-index: 4;
  display: flex; gap: 8px; flex-wrap: wrap; padding: 10px; border-radius: 18px;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-top: 1px solid var(--line);
}
.tabbar a { font-size: 11px; }
.tabbar a.on, .rail a.on { color: var(--brand); }
.fab {
  position: fixed; right: 18px; bottom: calc(var(--nav) + 16px + env(safe-area-inset-bottom));
  z-index: 7; width: 58px; height: 58px; border-radius: 20px; border: 0;
  background: var(--brand); color: var(--on-brand); font-size: 32px;
}
.fab.open { transform: rotate(45deg); }
.fab-menu {
  position: fixed; right: 18px; bottom: calc(var(--nav) + 84px + env(safe-area-inset-bottom));
  z-index: 7; display: grid; gap: 8px; width: min(240px, calc(100% - 36px));
  animation: rise .28s cubic-bezier(.16,.84,.32,1);
}
.fab-menu button { justify-content: flex-start; display: flex; gap: 8px; align-items: center; background: var(--paper); }
.scrim { position: fixed; inset: 0; background: rgba(18, 24, 22, .28); z-index: 6; }
.sheet, .viewer, .story, .tour {
  position: fixed; z-index: 8; left: 0; right: 0; bottom: 0;
  background: var(--paper); border-radius: 28px 28px 0 0; padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow); animation: sheet .35s cubic-bezier(.16,.84,.32,1);
  max-height: min(92dvh, 820px); overflow: auto;
}
@keyframes sheet { from { transform: translateY(24px); opacity: .6; } }
.viewer-back, .story-back, .tour-back {
  position: fixed; inset: 0; z-index: 8;
  background: rgba(18, 22, 20, .55);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: fade .25s ease;
}
@keyframes fade { from { opacity: 0; } }
.viewer, .story { top: 4dvh; bottom: 4dvh; left: 12px; right: 12px; border-radius: 28px; display: flex; flex-direction: column; padding: 12px; }
.stage { flex: 1; min-height: 220px; background: #161c19; border-radius: 20px; overflow: hidden; touch-action: none; display: grid; place-items: center; position: relative; }
.stage img { max-width: 100%; max-height: 100%; transform-origin: center; }
.zoombar { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.zoombar button { width: 42px; height: 42px; border-radius: 14px; border: 0; background: rgba(255,255,255,.9); color: #16332c; }
.meta { padding: 12px 6px 4px; display: grid; gap: 8px; }
.meta b { font-family: var(--serif); font-size: 28px; }
.story { background: transparent; box-shadow: none; padding: 0; }
.story-top { position: absolute; left: 16px; right: 16px; top: 12px; z-index: 2; display: grid; gap: 8px; }
.segs { display: flex; gap: 4px; }
.segs i { display: block; height: 3px; border-radius: 99px; background: color-mix(in srgb, var(--on-brand) 55%, transparent); transform-origin: left; transform: scaleX(0); }
.segs i.on { transform: scaleX(1); transition: transform .4s linear; }
.story-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 28px; }
.story-track::-webkit-scrollbar { display: none; }
.story-card {
  min-width: 100%; scroll-snap-align: center; padding: 72px 28px 32px;
  background: var(--story);
  color: var(--on-brand); display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
}
.story-card h2 { font-family: var(--serif); font-size: 34px; margin: 0; }
.story-card .kicker, .story-card p { color: color-mix(in srgb, var(--on-brand) 82%, transparent); }
.story-card .big { font-family: var(--serif); font-size: 42px; }
.tour { top: auto; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav) + 24px); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 999px; z-index: 9;
  animation: rise .3s ease; max-width: calc(100% - 28px);
}
.toast-actions {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center;
  border-radius: 18px; width: min(360px, calc(100% - 32px));
  bottom: calc(var(--nav) + 86px); text-align: left;
}
.toast-actions span { flex: 1 0 100%; }
.toast-actions button { border: 0; background: transparent; color: #fff; font-weight: 700; padding: 0; min-height: 0; }
.year-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.year-table th, .year-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.year-table th:first-child, .year-table td:first-child { text-align: left; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.progress-note { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress-note i { display: block; height: 100%; width: 40%; background: var(--brand); animation: load 1s ease infinite; }
@keyframes load { 50% { margin-left: 60%; } }

@media (min-width: 980px) {
  .rail {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; inset: 0 auto 0 0; width: 232px; padding: 22px 14px;
    background: var(--paper); border-right: 1px solid var(--line);
  }
  .rail a { grid-template-columns: 24px 1fr; justify-content: start; padding: 10px 12px; border-radius: 12px; font-size: 15px; }
  .rail a.on { background: var(--mint); }
  .main { margin-left: 232px; }
  .tabbar { display: none; }
  .view { padding-bottom: 40px; }
  .fab { bottom: 24px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .dash { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; }
  .dash .span { grid-column: 1 / -1; }
  .viewer { left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%); width: min(920px, calc(100% - 48px)); height: min(640px, calc(100% - 48px)); display: grid; grid-template-columns: 1.15fr .85fr; padding: 12px; }
  .story { left: 50%; right: auto; width: min(420px, calc(100% - 48px)); transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
