:root {
  color-scheme: dark;
  --sea: #0d1719;
  --panel: #172628;
  --line: #385150;
  --gold: #e9bd79;
  --ink: #f4ebd9;
  --muted: #afc6c1;
  font: 100%/1.5 system-ui, -apple-system, sans-serif;
  background: var(--sea);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, input, select {
  border: 1px solid var(--line);
  border-radius: 12px;
  min-height: 48px;
  color: var(--ink);
  background: var(--panel);
}
button { cursor: pointer; padding: 9px 14px; touch-action: manipulation; }
button:hover { border-color: var(--muted); }
button:active { filter: brightness(1.15); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
input, select { padding: 9px 12px; width: 100%; }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; accent-color: var(--gold); }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; line-height: 1.15; margin: 0; overflow-wrap: anywhere; }
p { margin: 0; overflow-wrap: anywhere; }
.app { width: min(100%, 660px); margin: 0 auto; padding: 0 18px 24px; }
@supports (padding: max(0px)) {
  .app { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}
.app-header { background: var(--sea); position: sticky; top: 0; z-index: 1; padding: 8px 0 6px; padding-top: max(8px, env(safe-area-inset-top)); }
nav, .bar, .row, .group-title, .journal-header { display: flex; align-items: center; gap: 8px; }
nav > *, .grow { flex: 1; min-width: 0; }
nav > button { padding-inline: 5px; font-size: .9rem; }
.account-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-left: 4px; }
.account-bar button { min-height: 42px; }
.public-items { padding-left: 22px; }
.public-items li + li { margin-top: 8px; }
.public-items small { display: block; }
nav [aria-current="page"], .primary { color: var(--sea); background: var(--gold); font-weight: 650; border-color: var(--gold); }
#screen { padding-top: 6px; }
#screen.shopping { touch-action: pan-y pinch-zoom; }
#screen > * + * { margin-top: 8px; }
.banner { position: relative; height: clamp(124px, 33vw, 196px); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.banner > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pennant { --flag: #743c3b; display: grid; place-items: start center; padding-top: 10px; color: var(--gold); background: var(--flag); border: 1px solid var(--gold); clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%); position: absolute; right: 16px; top: 0; width: 42px; height: 54px; font: bold 23px Georgia, serif; }
.cover { text-align: center; padding: 2px 0 6px; }
.cover h1 { font-size: clamp(27px, 7vw, 34px); }
.eyebrow { color: var(--gold); font-size: .75rem; letter-spacing: .13em; text-transform: uppercase; }
.cover .eyebrow { margin-top: 5px; }
.wide { width: 100%; }
.square { flex: 0 0 48px; width: 48px; padding: 0; font-size: 1.35rem; }
.panel, .group { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--panel); }
.group { padding: 8px 10px 10px; }
.group-title h2 { font-size: 1.18rem; }
.group-title img, .choice img { width: 24px; height: 24px; flex: 0 0 24px; }
.small { color: var(--muted); font-size: .9rem; }
.progress-panel progress { display: block; width: 100%; height: 10px; border: 0; border-radius: 9px; margin-top: 4px; overflow: hidden; background: var(--line); color: var(--gold); accent-color: var(--gold); }
progress::-webkit-progress-bar { background: var(--line); border-radius: 9px; }
progress::-webkit-progress-value { background: var(--gold); border-radius: 9px; }
progress::-moz-progress-bar { background: var(--gold); border-radius: 9px; }
.completion { margin-top: 5px; color: var(--gold); font: bold 1.05rem/1.35 Georgia, serif; }
.row { margin-top: 7px; border: 1px solid var(--line); border-radius: 12px; padding: 3px 6px; background: var(--sea); }
.row label { min-height: 48px; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.row label span { overflow-wrap: anywhere; }
.row input { margin: 0 0 0 3px; flex: 0 0 20px; }
.row input:checked + span { text-decoration: line-through; color: var(--muted); }
.ungrouped { font-size: 1.18rem; padding-top: 7px; }
.journal-header img { height: 66px; width: 66px; }
.journal-title { margin-top: 5px; }
.quote h2 { margin: 5px 0 10px; font-size: 1.45rem; }
.quote p { white-space: pre-line; font-size: 1.05rem; }
.notice { color: var(--gold); padding: 8px 0; }
footer { margin-top: 12px; text-align: center; }
.quiet { font-size: .875rem; border-color: transparent; background: transparent; color: var(--muted); }
dialog { position: fixed; inset: 0; margin: auto; width: min(calc(100% - 30px), 480px); max-height: 86vh; max-height: 86dvh; overflow: auto; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 15px; padding: 18px; }
dialog::backdrop { background: #060b0bd9; }
dialog.fallback { z-index: 3; box-shadow: 0 0 0 100vmax #060b0bd9; }
dialog h2 { margin-bottom: 12px; font-size: 1.35rem; }
form label { display: block; margin: 9px 0; color: var(--muted); font-size: .9rem; }
form label > * { display: block; margin-top: 4px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.danger { color: #ffcab3; }
.choice { width: 100%; display: flex; align-items: center; text-align: left; gap: 10px; margin-bottom: 7px; }
.choice strong, .choice small { display: block; }
.choice small { color: var(--muted); }
.choice[aria-current] { border-color: var(--gold); color: var(--gold); }
.form-error { margin: 7px 0; color: #ffcab3; }
