/* Nordic Minimal Design System — Base */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300;1,8..60,400&display=swap');
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
/* Skip link */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 10000; padding: 8px 16px; background: var(--ink); color: var(--surface); font-family: var(--fb); font-size: 14px; text-decoration: none; border-radius: 0 0 6px 0; }
.skip-link:focus { left: 0; }
/* Sync status */
.sync-status { width: 8px; height: 8px; border-radius: 50%; display: inline-block; vertical-align: middle; margin-left: 8px; transition: background .3s; }
.sync-synced  { background: var(--green, #4a7a5a); }
.sync-syncing { background: var(--accent, #7a5c38); animation: sync-pulse .8s infinite alternate; }
.sync-error   { background: var(--red, #9a4040); }
@keyframes sync-pulse { from { opacity: 1; } to { opacity: .4; } }
/* Offline banner */
.offline-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; background: var(--red, #9a4040); color: #fff; text-align: center; padding: 6px 16px; font-family: var(--fb); font-size: 13px; animation: slide-down .3s ease; }
.offline-banner.online { background: var(--green, #4a7a5a); }
@keyframes slide-down { from { transform: translateY(-100%); } to { transform: translateY(0); } }
/* Loading skeletons */
.skeleton { background: linear-gradient(90deg, var(--surface2, #ece7de) 25%, var(--surface, #faf7f2) 50%, var(--surface2, #ece7de) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 4px; min-height: 1em; }
.skeleton-text { width: 60%; height: 16px; margin: 6px 0; }
.skeleton-value { width: 80px; height: 32px; margin: 4px 0; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
:root {
  --bg: #f2ede6; --surface: #faf7f2; --surface2: #ece7de;
  --border: #dfd8cc; --border2: #ccc2b0;
  --ink: #2a2318; --ink2: #5a4e3a; --muted: #9a8c78;
  --accent: #7a5c38; --accent2: #b87d3e;
  --green: #4a7a5a; --red: #9a4040; --blue: #3a5a7a; --gold: #c9943c;
  --fd: 'DM Serif Display', Georgia, serif;
  --fb: 'Source Serif 4', Georgia, serif;
  --nav-h: 66px; --r: 16px;
  --sh:  0 1px 4px rgba(42,35,24,.06), 0 4px 16px rgba(42,35,24,.06);
  --sh2: 0 2px 8px rgba(42,35,24,.08), 0 8px 32px rgba(42,35,24,.10);
}
body { background: var(--bg); color: var(--ink); font-family: var(--fb); min-height: 100dvh; line-height: 1.5; }
/* App shell */
.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; padding-bottom: var(--nav-h); }
@media (min-width: 860px) {
  .app { max-width: none; display: grid; grid-template-columns: 210px minmax(0, 750px); grid-template-rows: auto 1fr; padding-bottom: 0; min-height: 100dvh; }
  .app-header     { grid-column: 2; }
  .app-header .logo { display: none; }
  .app-sidebar    { display: flex !important; grid-row: 1 / -1; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
  .app-bottom-nav { display: none !important; }
  .app-content    { overflow-y: auto; }
  .d-hide  { display: none !important; }
  .d-show  { display: block !important; }
  .d-grid2 { display: grid !important; grid-template-columns: 1fr 1fr; gap: 14px; }
  .d-grid3 { display: grid !important; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
}
.m-show { display: none; }
@media (max-width: 859px) {
  .app-sidebar { display: none !important; }
  .app-header  { position: sticky; top: 0; z-index: 40; background: var(--surface); padding: 14px 22px; border-radius: 0 0 14px 14px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
  .m-hide { display: none !important; }
  .m-show { display: block !important; }
}
/* Header */
.app-header { padding: 14px 22px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
@media (min-width: 860px) { .app-header { padding: 22px 32px 0; } }
.logo { font-family: var(--fd); font-size: 22px; color: var(--ink); letter-spacing: -.3px; text-decoration: none; }
.logo em { font-style: italic; color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; }
.header-meta { text-align: right; }
.header-date { font-family: var(--fb); font-size: 12px; font-style: italic; color: var(--muted); line-height: 1.3; }
.header-stat { font-family: var(--fb); font-size: 11px; color: var(--accent2); margin-top: 1px; }
.home-link { font-family: var(--fb); font-size: 12px; font-style: italic; color: var(--muted); text-decoration: none; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); transition: color .15s, border-color .15s; white-space: nowrap; }
.home-link:hover { color: var(--ink); border-color: var(--border2); }
/* Sidebar */
.app-sidebar { padding: 28px 14px 20px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; background: var(--surface); }
.sb-title { font-family: var(--fd); font-size: 20px; color: var(--ink); text-align: center; padding: 0 12px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); letter-spacing: -.3px; }
.sb-label { font-family: var(--fb); font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); font-style: italic; padding: 6px 12px 3px; margin-top: 4px; }
.sb-btn { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 11px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--ink2); font-family: var(--fb); font-size: 13px; text-align: left; transition: all .15s; text-decoration: none; width: 100%; }
.sb-btn:hover { color: var(--ink); background: var(--bg); }
.sb-btn.active { background: var(--bg); border-color: var(--border); color: var(--ink); box-shadow: var(--sh); }
.sb-icon    { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }
.sb-divider { height: 1px; background: var(--border); margin: 6px 0; }
.sb-spacer  { flex: 1; }
/* Content */
.app-content { padding: 16px 22px 28px; }
@media (min-width: 860px) { .app-content { padding: 24px 32px 36px; } }
/* Bottom nav */
.app-bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: var(--nav-h); background: var(--surface); border-top: 1px solid var(--border); display: flex; align-items: stretch; z-index: 50; }
.nav-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: none; background: none; cursor: pointer; color: var(--muted); font-family: var(--fb); font-size: 9px; font-style: italic; transition: color .15s; padding: 0; }
.nav-tab.active { color: var(--ink); }
.nav-tab svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--sh); }
.card + .card { margin-top: 12px; }
.card-title { font-family: var(--fd); font-size: 15px; color: var(--ink); margin-bottom: 12px; }
/* Hero card — light theme: light bg with dark text */
.hero-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 22px 20px 18px; box-shadow: var(--sh2); position: relative; overflow: hidden; --chart-line: #4a7a5a; --chart-line-dim: rgba(74,122,90,.4); --chart-dot: #4a7a5a; --chart-dot-stroke: rgba(42,35,24,.25); --chart-grid: rgba(42,35,24,.06); }
.hero-card::after { content: ''; position: absolute; top: -40px; right: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(122,92,56,.03); pointer-events: none; }
.nw-chart-label { fill: var(--muted); }
#dailyNWChart { margin-top: 16px; }
#dailyNWChart svg { display: block; width: 100%; }
.hero-eyebrow { font-family: var(--fb); font-size: 10px; font-style: italic; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 6px; }
.hero-value { font-family: var(--fd); font-size: 52px; color: var(--ink); line-height: 1; letter-spacing: -1.5px; }
.hero-value.green { color: var(--green); }
.hero-value.red   { color: var(--red); }
.hero-sub { font-family: var(--fb); font-size: 12px; font-style: italic; color: var(--muted); margin-top: 7px; }
.hero-sub.pos { color: var(--green); }
.hero-sub.neg { color: var(--red); }
/* Stat grid */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats.two   { grid-template-columns: repeat(2, 1fr); }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 8px; text-align: center; box-shadow: var(--sh); }
.stat-v { font-family: var(--fd); font-size: 22px; color: var(--ink); line-height: 1; letter-spacing: -.5px; }
.stat-v.green { color: var(--green); }
.stat-v.red   { color: var(--red); }
.stat-l { font-family: var(--fb); font-size: 10px; font-style: italic; color: var(--muted); margin-top: 4px; }
/* Section label */
.sl { font-family: var(--fb); font-size: 11px; font-style: italic; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 10px; }
/* Progress bar */
.bar-wrap { height: 4px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
.bar-fill  { height: 100%; background: var(--accent); border-radius: 99px; transition: width .5s ease; }
.bar-fill.green { background: var(--green); }
.bar-fill.red   { background: var(--red); }
.bar-fill.gold  { background: var(--gold); }
.bar-meta { display: flex; justify-content: space-between; margin-top: 5px; font-family: var(--fb); font-size: 11px; font-style: italic; color: var(--muted); }
/* List rows */
.row-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-top: 1px solid var(--border); }
.row-item:first-child { border-top: 0; padding-top: 4px; }
.row-item:hover { background: rgba(122,92,56,.04); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 8px; }
.check { width: 27px; height: 27px; border-radius: 8px; border: 1.5px solid var(--border2); background: var(--surface2); flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 13px; transition: all .15s; color: transparent; }
.check.done { border-color: var(--accent); background: rgba(122,92,56,.1); color: var(--accent); }
.item-info { flex: 1; min-width: 0; }
.item-name { font-family: var(--fd); font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-name.done { text-decoration: line-through; color: var(--muted); }
.item-name.expanded { white-space: normal; }
.item-note { font-family: var(--fb); font-size: 12px; color: var(--muted); margin-top: 4px; font-style: italic; }
.item-meta { font-family: var(--fb); font-size: 11px; font-style: italic; color: var(--muted); margin-top: 1px; }
.item-right { flex-shrink: 0; font-family: var(--fb); font-size: 12px; color: var(--muted); }
/* Delete buttons */
.del-btn { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 18px; padding: 4px 6px; flex-shrink: 0; border-radius: 6px; transition: background .15s, color .15s; line-height: 1; }
.del-btn:hover { background: rgba(154,64,64,.1); color: var(--red); }
/* Tags / badges */
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-family: var(--fb); font-size: 10px; font-style: italic; background: var(--surface2); color: var(--muted); border: 1px solid var(--border); }
.tag.high   { background: rgba(154,64,64,.08);  color: var(--red);     border-color: rgba(154,64,64,.15); }
.tag.medium { background: rgba(184,125,62,.08); color: var(--accent2); border-color: rgba(184,125,62,.15); }
.tag.green  { background: rgba(74,122,90,.08);  color: var(--green);   border-color: rgba(74,122,90,.15); }
.streak { font-family: var(--fb); font-size: 11px; font-style: italic; color: var(--accent2); background: var(--surface2); border: 1px solid var(--border); border-radius: 7px; padding: 3px 8px; white-space: nowrap; }
/* Buttons */
.btn { padding: 12px 20px; background: var(--ink); color: var(--surface); border: none; border-radius: 11px; font-family: var(--fd); font-size: 15px; cursor: pointer; transition: opacity .2s; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { opacity: .85; }
.btn.ghost { background: none; color: var(--muted); border: 1px solid var(--border); font-family: var(--fb); font-size: 13px; font-style: italic; padding: 9px 16px; }
.btn.ghost:hover { color: var(--ink); border-color: var(--border2); }
.btn.accent { background: var(--accent); }
.btn.full   { width: 100%; justify-content: center; margin-top: 12px; }
.btn.sm     { padding: 8px 14px; font-size: 13px; }
/* FAB */
.fab { position: fixed; right: 20px; bottom: calc(var(--nav-h) + 14px); width: 50px; height: 50px; border-radius: 999px; background: var(--ink); color: var(--surface); border: none; font-size: 24px; cursor: pointer; box-shadow: var(--sh2); display: flex; align-items: center; justify-content: center; z-index: 40; transition: opacity .2s; }
.fab:hover { opacity: .85; }
@media (min-width: 860px) { .fab { display: none !important; } }
/* Modals */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.35); backdrop-filter: blur(3px); display: flex; pointer-events: none; z-index: 90; padding: 16px; align-items: flex-end; justify-content: center; }
.modal.open { pointer-events: auto; }
.modal-box { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px 20px; max-height: calc(100dvh - 80px); overflow-y: auto; position: relative; box-shadow: var(--sh2); }
@media (min-width: 860px) { .modal { align-items: center; } }
.modal-title { font-family: var(--fd); font-size: 18px; color: var(--ink); margin-bottom: 16px; padding-right: 36px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface2); color: var(--ink2); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; }
/* Form fields */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-family: var(--fb); font-size: 11px; font-style: italic; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.field input, .field select, .field textarea { padding: 11px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 11px; color: var(--ink); font-family: var(--fb); font-size: 14px; outline: none; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: none; min-height: 90px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); font-style: italic; }
/* Toggle group */
.toggle-row { display: flex; background: var(--surface2); border: 1px solid var(--border); border-radius: 11px; overflow: hidden; margin-bottom: 14px; }
.toggle-btn { flex: 1; padding: 10px; border: none; background: none; font-family: var(--fb); font-size: 13px; font-style: italic; color: var(--muted); cursor: pointer; transition: all .15s; }
.toggle-btn.active { background: var(--ink); color: var(--surface); font-style: normal; }
/* Filter row */
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn { padding: 7px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-family: var(--fb); font-size: 12px; font-style: italic; cursor: pointer; transition: all .15s; }
.filter-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(122,92,56,.07); }
/* Divider / spacing / utilities */
.div       { height: 1px; background: var(--border); margin: 12px 0; }
.div.heavy { height: 2px; background: var(--border2); }
.gap       { height: 14px; }
.gap.sm    { height: 8px; }
.gap.lg    { height: 20px; }
.flex-row  { display: flex; align-items: center; justify-content: space-between; }
.pos { color: var(--green); }
.neg { color: var(--red); }
/* Toast */
.toast { position: fixed; bottom: calc(var(--nav-h) + 16px); left: 50%; transform: translateX(-50%) translateY(160px); background: var(--ink); color: var(--surface); padding: 10px 20px; border-radius: 999px; font-family: var(--fb); font-size: 13px; font-style: italic; transition: transform .3s ease; z-index: 100; white-space: nowrap; box-shadow: var(--sh2); pointer-events: none; }
.toast.show { transform: translateX(-50%) translateY(0); pointer-events: auto; }
@media (min-width: 860px) { .toast { bottom: 24px; } }
/* Empty state */
.empty { text-align: center; padding: 32px 20px; color: var(--muted); font-family: var(--fb); font-size: 14px; font-style: italic; line-height: 1.7; }
.empty-icon { font-size: 36px; margin-bottom: 10px; }
/* Activity grid base */
.ag-wrap   { overflow-x: auto; padding-bottom: 10px; }
.ag-months { display: flex; font-family: var(--fb); font-size: 9px; font-style: italic; color: var(--muted); margin-bottom: 4px; }
.ag-months span { min-width: 13px; }
.ag-body { display: flex; gap: 3px; }
.ag-col  { display: flex; flex-direction: column; gap: 3px; }
.ag-cell { width: 10px; height: 10px; border-radius: 2px; background: var(--surface2); }
.ag-1 { background: rgba(122,92,56,.22); }
.ag-2 { background: rgba(122,92,56,.45); }
.ag-3 { background: rgba(122,92,56,.68); }
.ag-4 { background: var(--accent); }
/* Login page */
body.login { display: flex; align-items: center; justify-content: center; padding: 24px; }
body.login::before { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse 60% 50% at 20% 30%, rgba(122,92,56,.04) 0%, transparent 70%), radial-gradient(ellipse 50% 60% at 80% 70%, rgba(184,125,62,.03) 0%, transparent 70%); pointer-events: none; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 40px 36px 36px; box-shadow: var(--sh2); }
.login-name { font-family: var(--fd); font-size: 38px; color: var(--ink); letter-spacing: -1.5px; line-height: 1; margin-bottom: 6px; }
.login-name em { font-style: italic; color: var(--accent); }
.login-sub { font-family: var(--fb); font-size: 13px; font-style: italic; color: var(--muted); margin-bottom: 36px; }
.login-divider { height: 1px; background: var(--border); margin-bottom: 28px; }
.login-btn { width: 100%; padding: 14px; background: var(--ink); color: var(--surface); border: none; border-radius: 12px; font-family: var(--fd); font-size: 17px; cursor: pointer; transition: opacity .2s; margin-top: 4px; }
.login-btn:hover   { opacity: .85; }
.login-btn:active  { opacity: .75; }
.login-btn:disabled { opacity: .45; cursor: not-allowed; }
.login-err { font-family: var(--fb); font-size: 12px; font-style: italic; color: var(--red); min-height: 18px; margin-top: 10px; text-align: center; }
.login-footer { margin-top: 28px; text-align: center; font-family: var(--fb); font-size: 11px; font-style: italic; color: var(--muted); opacity: .7; }
@media (min-width: 600px) { .login-card { padding: 48px 44px 40px; } .login-name { font-size: 46px; } }
/* Modal actions */
.modal-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.btn.danger { background: var(--red, #c0392b); color: #fff; border: none; }
.btn.danger:hover { opacity: .85; }
/* Switch toggle */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--border); border-radius: 20px; transition: .2s; }
.switch-slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; bottom: 2px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .switch-slider { background: var(--green); }
.switch input:checked + .switch-slider::before { transform: translateX(16px); }
/* Dark mode */
[data-theme="dark"] {
  --bg: #1a1a1a; --surface: #242424; --surface2: #2e2e2e;
  --border: #3a3a3a; --border2: #4a4a4a;
  --ink: #e8e0d4; --ink2: #b8a898; --muted: #888070;
  --accent: #c9943c; --accent2: #d4a44c;
  --green: #6aaa7a; --red: #c06060; --blue: #5a8aba; --gold: #d4a44c;
  --sh:  0 1px 4px rgba(0,0,0,.2), 0 4px 16px rgba(0,0,0,.15);
  --sh2: 0 2px 8px rgba(0,0,0,.25), 0 8px 32px rgba(0,0,0,.2);
}
[data-theme="dark"] .hero-card { background: #2a2a2a; border-color: #3a3a3a; --chart-line: #8fd4a8; --chart-line-dim: rgba(143,212,168,.4); --chart-dot: #8fd4a8; --chart-dot-stroke: rgba(255,255,255,.4); --chart-grid: rgba(255,255,255,.06); }
[data-theme="dark"] .hero-card::after { background: rgba(255,255,255,.02); }
[data-theme="dark"] .hero-eyebrow { color: rgba(255,255,255,.35); }
[data-theme="dark"] .hero-value { color: #fff; }
[data-theme="dark"] .hero-value.green { color: #8fd4a8; }
[data-theme="dark"] .hero-value.red { color: #d49090; }
[data-theme="dark"] .hero-sub { color: rgba(255,255,255,.35); }
[data-theme="dark"] .hero-sub.pos { color: #8fd4a8; }
[data-theme="dark"] .hero-sub.neg { color: #d49090; }
[data-theme="dark"] .nw-chart-label { fill: rgba(255,255,255,.35); }
[data-theme="dark"] .login-card { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .scan-card { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .landing .l-group-card { background: var(--surface); }
[data-theme="dark"] img, [data-theme="dark"] video { opacity: .92; }
[data-theme="dark"] body.login::before { background: radial-gradient(ellipse 60% 50% at 20% 30%, rgba(201,148,60,.06) 0%, transparent 70%), radial-gradient(ellipse 50% 60% at 80% 70%, rgba(201,148,60,.04) 0%, transparent 70%); }
/* Focus rings */
.btn:focus-visible, .nav-tab:focus-visible, .filter-btn:focus-visible, .sb-btn:focus-visible, .theme-btn:focus-visible, .mood-btn:focus-visible, .check:focus-visible, .l-group-card:focus-visible, .l-quick-btn:focus-visible, .l-footer-btn:focus-visible, .preset-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Form grid */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 860px) { .form-grid { grid-template-columns: 1fr 1fr; gap: 0 16px; } }
/* Install banner */
.install-banner { position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%); width: calc(100% - 32px); max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--sh2); display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 100; animation: slideUp .3s ease; }
@keyframes slideUp { from { transform: translateX(-50%) translateY(20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
.install-banner-text { display: flex; flex-direction: column; gap: 2px; }
.install-banner-text strong { font-family: var(--fd); font-size: 14px; color: var(--ink); }
.install-banner-text span { font-family: var(--fb); font-size: 11px; font-style: italic; color: var(--muted); }
.install-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
/* Landing footer button */
.l-footer-btn { background: none; border: none; cursor: pointer; font-family: var(--fb); font-size: 12px; font-style: italic; color: var(--red); padding: 0; text-decoration: none; transition: color .15s; }
.l-footer-btn:hover { opacity: .7; }
/* Settings page */
.settings-page { max-width: 560px; margin: 0 auto; padding: 24px 22px 48px; min-height: 100dvh; }
.settings-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.settings-title { font-family: var(--fd); font-size: 24px; color: var(--ink); }
.settings-back { font-family: var(--fb); font-size: 12px; font-style: italic; color: var(--muted); text-decoration: none; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); transition: color .15s, border-color .15s; }
.settings-back:hover { color: var(--ink); border-color: var(--border2); }
.settings-section { margin-bottom: 24px; }
.theme-toggle { display: flex; gap: 6px; }
.theme-btn { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); cursor: pointer; font-family: var(--fb); font-size: 13px; color: var(--ink2); transition: all .15s; text-align: center; }
.theme-btn:hover { border-color: var(--border2); color: var(--ink); }
.theme-btn.active { background: var(--surface); border-color: var(--accent); color: var(--ink); box-shadow: var(--sh); }
.data-actions { display: flex; flex-direction: column; gap: 10px; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-family: var(--fb); font-size: 13px; }
.info-row + .info-row { border-top: 1px solid var(--border); }
.info-label { color: var(--muted); font-style: italic; }
.info-value { color: var(--ink); }
.settings-footer { text-align: center; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
/* Tablet breakpoint */
@media (min-width: 600px) and (max-width: 859px) { .app { max-width: 600px; } .form-grid { grid-template-columns: 1fr 1fr; gap: 0 16px; } .l-groups { grid-template-columns: 1fr 1fr; } .micro-stats { grid-template-columns: repeat(3, 1fr); } }
/* Responsive typography */
.hero-value { font-size: clamp(2rem, 8vw, 3.25rem); }
.l-name     { font-size: clamp(1.75rem, 6vw, 2.625rem); }
/* Smooth modal transitions */
.modal { visibility: hidden; opacity: 0; transition: visibility 0s .2s, opacity .2s ease; }
.modal.open { visibility: visible; opacity: 1; transition: visibility 0s, opacity .2s ease; }
.modal-box { transform: translateY(20px) scale(.98); transition: transform .2s ease; }
.modal.open .modal-box { transform: translateY(0) scale(1); }
@media (max-width: 859px) { .modal-box { transform: translateY(40px); } .modal.open .modal-box { transform: translateY(0); } }
