/* Pocket Lake. Chrome colours and type come from tokens.css (the house theme). The lake palette below is scene colour: the day's sky tints the painting, and the theme darkens it. */
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3 { line-height: var(--leading-tight); }
html { background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: var(--text-body); line-height: var(--leading-body); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }
a { color: var(--accent); }
button { font: inherit; color: inherit; min-height: var(--hit-touch); min-width: var(--hit-touch); padding: 0 var(--space-md); border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface); cursor: pointer; transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
button:hover { border-color: var(--accent); }
button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button:disabled { opacity: 0.55; cursor: default; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--space-md); top: -100px; background: var(--surface); color: var(--ink); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); z-index: 10; }
.skip:focus { top: var(--space-md); }

.top { min-height: 60px; display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); align-items: baseline; padding: var(--space-xs) var(--space-md); border-bottom: 1px solid var(--border); background: var(--surface); }
.wordmark { display: inline-flex; align-items: center; min-height: var(--hit-touch); font-size: var(--text-title3); font-weight: var(--weight-title3); text-decoration: none; color: var(--ink); letter-spacing: 0.02em; }
.today { margin: 0; flex: 1 1 200px; min-width: 0; color: var(--ink-muted); font-size: var(--text-footnote); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.links { display: flex; gap: var(--space-sm); margin-left: auto; }
.links a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--hit-touch); min-width: var(--hit-touch); padding: 0 var(--space-2xs); }

.main { flex: 1; display: flex; flex-direction: column; width: 100%; min-height: calc(100dvh - 60px); } /* the lake page fills the first screen; the footer sits below the fold */
.stage { position: relative; flex: 1 1 auto; min-height: max(240px, 52dvh); background: var(--lake-water-bottom); overflow: hidden; }
.lake { position: absolute; inset: 0; width: 100%; height: 100%; display: block; color: var(--lake-line); touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: pointer; }
.hint { pointer-events: none; position: absolute; left: 50%; bottom: var(--space-md); transform: translateX(-50%); margin: 0; padding: var(--space-2xs) var(--space-md); border-radius: var(--radius-full); background: var(--surface); color: var(--ink); font-size: var(--text-callout); font-weight: var(--weight-headline); white-space: nowrap; box-shadow: var(--shadow); pointer-events: none; opacity: 0.92; }
.catch { pointer-events: none; position: absolute; left: 50%; top: var(--space-md); transform: translateX(-50%); width: max-content; max-width: calc(100% - 2 * var(--space-md)); padding: var(--space-xs) var(--space-md); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); text-align: center; box-shadow: var(--shadow); pointer-events: none; }
.catch[hidden] { display: none; }
.catch-name { margin: 0; line-height: var(--leading-tight); font-size: var(--text-title2); font-weight: var(--weight-title2); }
.catch-detail { margin: 0; color: var(--ink-muted); font-size: var(--text-subheadline); font-variant-numeric: tabular-nums; }

.status { margin: 0; min-height: 1.5em; padding: var(--space-2xs) var(--space-md); color: var(--ink-muted); font-size: var(--text-subheadline); font-variant-numeric: tabular-nums; }
.status.warn { color: var(--warning); }
.status.good { color: var(--success); }
.status.bad { color: var(--danger); }

.hud { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-xs); margin: 0; padding: 0 var(--space-md); }
.hud div { min-width: 0; border-top: 1px solid var(--border); padding-top: var(--space-2xs); }
.hud dt { font-size: var(--text-caption1); color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.hud dd { margin: 0; font-size: var(--text-headline); font-weight: var(--weight-headline); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.bar { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; padding: var(--space-sm) var(--space-md) max(var(--space-sm), env(safe-area-inset-bottom)); }
.thumb { flex: 1 1 160px; min-height: calc(var(--hit-touch) + var(--space-sm)); background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: var(--weight-headline); touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.thumb:hover { border-color: var(--ink); }
.thumb.live { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.kit { width: min(100% - 2 * var(--space-md), 480px); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: var(--space-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.kit::backdrop { background: var(--shadow-ink); }
.kit h2 { margin: 0 0 var(--space-xs); font-size: var(--text-title2); }
.kit-coins { margin: 0 0 var(--space-md); color: var(--ink-muted); font-size: var(--text-subheadline); font-variant-numeric: tabular-nums; }
.kit-status { margin: 0 0 var(--space-sm); min-height: 1.5em; color: var(--success); font-size: var(--text-subheadline); font-variant-numeric: tabular-nums; }
.kit-list { list-style: none; margin: 0 0 var(--space-md); padding: 0; font-variant-numeric: tabular-nums; }
.kit-list li { display: grid; grid-template-columns: 1fr; gap: var(--space-2xs); padding: var(--space-sm) 0; border-top: 1px solid var(--border); }
.kit-list .kname { font-weight: var(--weight-headline); }
.kit-list .kwhat { color: var(--ink-muted); font-size: var(--text-footnote); }
.kit-list .klevel { display: flex; gap: 3px; margin-top: var(--space-2xs); }
.kit-list .klevel i { display: block; width: 18px; height: 6px; border-radius: var(--radius-full); background: var(--border-strong); }
.kit-list .klevel i.on { background: var(--accent); }
.kit-list button { justify-self: start; margin-top: var(--space-xs); white-space: nowrap; }

.foot { padding: var(--space-md); border-top: 1px solid var(--border); color: var(--ink-muted); font-size: var(--text-footnote); }
.foot p { margin: 0 0 var(--space-xs); max-width: 72ch; }

@media (max-width: 599.98px) {
  .top { align-items: center; row-gap: 0; }
  .today { order: 3; flex-basis: 100%; }
  .links { margin-left: auto; }
}
@media (max-width: 379.98px) {
  .hud { grid-template-columns: repeat(2, 1fr); }
  .kit { padding: var(--space-md); }
}
@media (min-width: 900px) {
  .main { padding: var(--space-lg) var(--space-lg) 0; gap: var(--space-sm); }
  .stage { flex: 0 0 auto; align-self: center; width: min(100%, calc(70vh * 1.6)); aspect-ratio: 16 / 10; max-height: 70vh; min-height: 420px; border-radius: var(--radius-xl); box-shadow: var(--shadow); }
  .status, .hud, .bar { width: min(100%, calc(70vh * 1.6)); align-self: center; padding-left: 0; padding-right: 0; }
}

/* Lake palette. Scene colour for the painting, keyed by today's sky and darkened by the theme. Not UI chrome. */
:root, [data-sky="clear"] { --lake-sky-top: #5aa0dc; --lake-sky-bottom: #cfe8fa; --lake-water-top: #3e8ac4; --lake-water-bottom: #1e4f7a; --lake-hill: #5f8a6a; --lake-sun: #fff1b0; --lake-sun-alpha: 1; } /* house-theme: allow (lake scene) */
[data-sky="dawn"] { --lake-sky-top: #d98aa6; --lake-sky-bottom: #f8d3b0; --lake-water-top: #5f8fb0; --lake-water-bottom: #2b4d66; --lake-hill: #7a6f93; --lake-sun: #ffd27a; --lake-sun-alpha: 1; } /* house-theme: allow (lake scene) */
[data-sky="overcast"] { --lake-sky-top: #8e99a3; --lake-sky-bottom: #c9d0d6; --lake-water-top: #6a8290; --lake-water-bottom: #34495a; --lake-hill: #6d7a7a; --lake-sun: #d7dde2; --lake-sun-alpha: 0.5; } /* house-theme: allow (lake scene) */
[data-sky="dusk"] { --lake-sky-top: #4a3f7a; --lake-sky-bottom: #f08a4b; --lake-water-top: #4a5f8c; --lake-water-bottom: #1f2d4a; --lake-hill: #3f3550; --lake-sun: #ffb060; --lake-sun-alpha: 1; } /* house-theme: allow (lake scene) */
[data-sky="fog"] { --lake-sky-top: #c7ccd1; --lake-sky-bottom: #e4e7ea; --lake-water-top: #9aa9b3; --lake-water-bottom: #5a6c78; --lake-hill: #b0b8be; --lake-sun: #e8ebee; --lake-sun-alpha: 0.35; } /* house-theme: allow (lake scene) */
[data-sky="storm"] { --lake-sky-top: #3e4a5a; --lake-sky-bottom: #7a8794; --lake-water-top: #3b5566; --lake-water-bottom: #1a2a36; --lake-hill: #2f3a44; --lake-sun: #8a96a3; --lake-sun-alpha: 0.25; } /* house-theme: allow (lake scene) */
[data-theme="dark"], [data-theme="dark"][data-sky="clear"] { --lake-sky-top: #1d3f63; --lake-sky-bottom: #4f7ea6; --lake-water-top: #1f4a6d; --lake-water-bottom: #0d2638; --lake-hill: #2e4a38; --lake-sun: #e8dca0; } /* house-theme: allow (lake scene) */
[data-theme="dark"][data-sky="dawn"] { --lake-sky-top: #5a3a4e; --lake-sky-bottom: #a9707a; --lake-water-top: #2f4d66; --lake-water-bottom: #13232f; --lake-hill: #3b3449; --lake-sun: #e6b86a; } /* house-theme: allow (lake scene) */
[data-theme="dark"][data-sky="overcast"] { --lake-sky-top: #3a424a; --lake-sky-bottom: #6a747d; --lake-water-top: #34444e; --lake-water-bottom: #16202a; --lake-hill: #333c3c; --lake-sun: #8d959b; } /* house-theme: allow (lake scene) */
[data-theme="dark"][data-sky="dusk"] { --lake-sky-top: #22193a; --lake-sky-bottom: #9a5230; --lake-water-top: #263350; --lake-water-bottom: #0e1526; --lake-hill: #1f1a2a; --lake-sun: #e09a50; } /* house-theme: allow (lake scene) */
[data-theme="dark"][data-sky="fog"] { --lake-sky-top: #5a6168; --lake-sky-bottom: #7f878e; --lake-water-top: #55646e; --lake-water-bottom: #2a353d; --lake-hill: #666e74; --lake-sun: #9aa1a7; } /* house-theme: allow (lake scene) */
[data-theme="dark"][data-sky="storm"] { --lake-sky-top: #1c232c; --lake-sky-bottom: #3d4852; --lake-water-top: #1f2f3a; --lake-water-bottom: #0b141b; --lake-hill: #171e25; --lake-sun: #4e5862; } /* house-theme: allow (lake scene) */
:root { --lake-dock: #6b4e2e; --lake-dock-dark: #4a3520; --lake-weed: #2f5e3a; --lake-float-top: #e23a2a; --lake-float-bottom: #f3efe4; --lake-line: #e8e6df; --lake-shade: rgba(8, 28, 40, 0.38); --lake-rain: rgba(230, 236, 240, 0.35); --lake-fog: rgba(236, 238, 240, 0.45); --lake-ripple: rgba(255, 255, 255, 0.32); --lake-meter: rgba(255, 255, 255, 0.85); --lake-meter-track: rgba(0, 0, 0, 0.35); } /* house-theme: allow (lake scene) */
[data-theme="dark"] { --lake-dock: #4a3520; --lake-dock-dark: #2e2014; --lake-weed: #1f3f28; --lake-float-top: #c9302a; --lake-float-bottom: #d9d5ca; --lake-line: #b8b6ae; --lake-shade: rgba(0, 0, 0, 0.45); --lake-rain: rgba(200, 210, 220, 0.3); --lake-fog: rgba(120, 128, 136, 0.45); --lake-ripple: rgba(255, 255, 255, 0.22); } /* house-theme: allow (lake scene) */

@media (prefers-reduced-motion: reduce) {
  .hint, button { transition: none; }
}

/* Field guide (/log/) */
.guide { width: 100%; max-width: 1040px; margin: 0 auto; padding: var(--space-md); }
.guide h1 { margin: 0 0 var(--space-xs); font-size: var(--text-title1); font-weight: var(--weight-title1); }
.summary { margin: 0 0 var(--space-md); color: var(--ink-muted); max-width: 72ch; font-variant-numeric: tabular-nums; }
.filters button { font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: 0 0 var(--space-md); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-sm); }
.card { display: grid; grid-template-columns: 112px 1fr; gap: var(--space-2xs) var(--space-sm); align-items: start; padding: var(--space-sm); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); min-width: 0; }
.card canvas { grid-row: 1 / span 3; width: 112px; height: 64px; display: block; }
.card h2 { margin: 0; font-size: var(--text-headline); font-weight: var(--weight-headline); overflow-wrap: anywhere; }
.card .meta { margin: 0; color: var(--ink-muted); font-size: var(--text-footnote); font-variant-numeric: tabular-nums; }
.card .got { margin: 0; font-size: var(--text-subheadline); font-variant-numeric: tabular-nums; }
.card.uncaught h2 { color: var(--ink-muted); }
.badge { display: inline-block; padding: 0 var(--space-2xs); border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-ink); font-size: var(--text-caption1); font-weight: var(--weight-headline); vertical-align: middle; margin-left: var(--space-2xs); }
.card[hidden] { display: none; }
.prose { width: 100%; max-width: 72ch; box-sizing: border-box; min-width: 0; margin: 0 auto; padding: var(--space-lg) var(--space-md); overflow-wrap: anywhere; }
.prose h1 { font-size: var(--text-title1); font-weight: var(--weight-title1); }
.prose h2 { font-size: var(--text-title3); margin-top: var(--space-xl); }
.prose pre { overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: var(--space-sm); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: var(--text-subheadline); }
.prose code { font-family: var(--font-mono); }
.prose table { border-collapse: collapse; width: 100%; }
.prose td, .prose th { text-align: left; padding: var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--border); vertical-align: top; }
.prose kbd { font-family: var(--font-mono); font-size: var(--text-footnote); padding: 0 var(--space-2xs); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
