/* Shared shell: sidebar on desktop, bottom tab bar on mobile. Used by every page. */
@font-face { font-family: 'Lato'; src: url('/fonts/lato-400.woff2?v=1') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Hurricane'; src: url('/fonts/hurricane.woff2?v=1') format('woff2'); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: 'Lato'; src: url('/fonts/lato-700.woff2?v=1') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
:root { --bg: #FBF7F0; --panel: #FFFDF8; --text: #1d1a17; --muted: #7a6f63; --line: #E6DCCB; --accent: #F1641E; --accent-ink: #B8410C; --font: 'Lato', Helvetica, Arial, sans-serif; --gutter: 24px; --side: 220px; --hover: rgba(0,0,0,.04); --tint: rgba(241,100,30,.12); --dash: #b9ab98; --dim: #b3a692; --overlay: rgba(251,247,240,.95); --shadow: rgba(60,40,10,.12); }
:root[data-theme="dark"] { --bg: #14110f; --panel: #1c1916; --text: #f3ede4; --muted: #a89c8d; --line: #2e2a26; --accent: #FF7A3D; --accent-ink: #FF8F5C; --hover: rgba(255,255,255,.06); --tint: rgba(255,122,61,.16); --dash: #6a6054; --dim: #5d544a; --overlay: rgba(20,17,15,.95); --shadow: rgba(0,0,0,.5); }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.6; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }

.shell { display: flex; min-height: 100vh; }
.side { width: var(--side); flex: none; border-right: 1px solid var(--line); padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin: 0 0 22px 6px; border-radius: 10px; }
.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
:root[data-theme="dark"] .logo { background: #FBF7F0; padding: 3px; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; font-size: 18px; transition: background .15s, color .15s; }
.side nav a:hover { background: var(--hover); }
.side nav a[aria-current="page"] { background: var(--tint); color: var(--accent-ink); font-weight: 700; }
.side nav svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.theme { position: fixed; top: 14px; right: 16px; z-index: 6; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 50%; cursor: pointer; transition: color .15s, border-color .15s; }
.theme:hover { color: var(--accent); border-color: var(--accent); }
.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.theme .sun, :root[data-theme="dark"] .theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
.page { flex: 1; min-width: 0; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 48px var(--gutter) 64px; display: flex; flex-direction: column; align-items: center; text-align: center; }

.btn { font: inherit; font-weight: 700; font-size: 20px; letter-spacing: .02em; padding: 18px 56px; border-radius: 12px; cursor: pointer; border: 0; background: var(--text); color: var(--bg); transition: background .15s, transform .08s; display: inline-block; }
.btn:hover { background: var(--accent); }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .35; cursor: default; background: var(--text); }

@media (max-width: 700px) {
  :root { --gutter: 18px; }
  /* One column that is exactly the visible screen: logo on top, page in the middle, tab bar at the bottom.
     dvh = the height you can actually see (browser toolbars excluded), so nothing hides behind them. */
  body { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  .shell { flex-direction: column; height: 100%; min-height: 0; }
  .side { display: contents; }
  .logo { margin: 14px 0 0 var(--gutter); flex: none; }
  .side nav { order: 3; flex: none; flex-direction: row; gap: 0; background: var(--panel); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
  .side nav a { flex: 1; flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 12px; text-align: center; }
  .page { order: 2; flex: 1; min-height: 0; overflow-y: auto; }
  .page { scrollbar-width: none; }
  .page::-webkit-scrollbar { display: none; }
  main { padding-top: 24px; }
  h1 { font-size: 28px; }
}
