:root {
--paper: #f3efe6;
--card: #fbf9f4;
--ink: #1c2830;
--muted: #55626a;
--line: #cdc4b4;
--water: #a9cbd9;
--water-deep: #4f84a0;
--stone: #7b6f60;
--barge: #a94a22;
--accent: #1d5a75;
--accent-ink: #ffffff;
--warn: #8a2c12;
--serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
:root {
--paper: #11171b;
--card: #1a2228;
--ink: #ebe6db;
--muted: #a3aeb4;
--line: #34424b;
--water: #2a5367;
--water-deep: #7db4cc;
--stone: #a99b86;
--barge: #e3804d;
--accent: #8cc5dc;
--accent-ink: #0d1418;
--warn: #f0a07a;
}
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
margin: 0;
background: var(--paper);
color: var(--ink);
font: 16px/1.45 var(--sans);
min-height: 100vh;
}
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 480px; margin: 0 auto; padding: 0 12px; }
.top { display: flex; align-items: center; gap: 8px; padding: 10px 0 6px; border-bottom: 1px solid var(--line); }
.top .brand { flex: 1; min-width: 0; }
.top h1 { margin: 0; font: 600 19px/1.15 var(--serif); letter-spacing: 0.01em; }
.top h1 a { color: inherit; text-decoration: none; }
.lede { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.icon-btn {
width: 44px; height: 44px; flex: none; border-radius: 22px; border: 1px solid var(--line);
background: var(--card); color: var(--ink); font: 600 18px/1 var(--sans); cursor: pointer;
display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.puzzle-head { padding: 8px 0 2px; }
.puzzle-head h2 { margin: 0; font: 600 20px/1.2 var(--serif); }
.puzzle-head .num { font-variant-numeric: tabular-nums; color: var(--muted); }
.puzzle-head .date { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.fresh { margin: 6px 0 0; }
.fresh a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.tag { display: inline-block; padding: 0 6px; border: 1px solid var(--muted); border-radius: 4px; font-size: 12px; }
.gauges { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; margin: 6px 0 4px; }
.gauge { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 5px 8px; }
.gauge b { display: block; font: 700 24px/1.05 var(--serif); font-variant-numeric: tabular-nums; }
.gauge > span { display: block; font-size: 12px; line-height: 1.25; color: var(--muted); white-space: nowrap; }
.gauge.low b { color: var(--warn); }
.gauge.low b::after { content: " low"; font: 600 12px var(--sans); }
.map { position: relative; width: 100%; margin: 4px 0; user-select: none; -webkit-user-select: none; }
.water { position: absolute; inset: 0; width: 100%; height: 100%; }
.cut { stroke: var(--water); stroke-width: 9; stroke-linecap: round; }
.pound { fill: var(--water); stroke: var(--water-deep); stroke-width: 1.5; }
.pound.summit { stroke-width: 3; }
.place { font: 600 11px var(--sans); fill: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.queued { fill: var(--barge); opacity: 0.55; }
.lock {
position: absolute; transform: translate(-50%, -50%);
width: 46px; height: 46px; padding: 0; border-radius: 8px;
border: 2px solid var(--stone); background: var(--card); color: var(--ink);
cursor: pointer; overflow: visible; touch-action: manipulation;
}
.lock .chamber { position: absolute; inset: 4px; border-radius: 4px; overflow: hidden; }
.lock .fill { position: absolute; left: 0; right: 0; bottom: 0; height: 24%; background: var(--water); border-top: 2px solid var(--water-deep); transition: height 0.35s ease; }
.lock.full .fill { height: 74%; }
.lock .letter { position: relative; font: 700 19px/1 var(--serif); }
.lock.hidden { border-style: dashed; }
.lock .badge, .lock .cost {
position: absolute; min-width: 22px; height: 20px; padding: 0 5px; border-radius: 10px;
font: 700 12px/20px var(--sans); white-space: nowrap; pointer-events: none;
}
.lock .badge { top: -9px; right: -9px; background: var(--ink); color: var(--paper); }
.lock .cost { bottom: -9px; right: -9px; background: var(--accent); color: var(--accent-ink); }
.lock.beside { border-color: var(--accent); border-width: 3px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.lock.closed .chamber { background: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--stone) 45%, transparent) 5px 7px); }
.lock.selected { outline: 3px dashed var(--ink); outline-offset: 4px; }
.barge {
position: absolute; width: 48px; height: 16px; transform: translate(-50%, -50%);
transition: left 0.45s ease, top 0.45s ease; pointer-events: none;
}
.barge svg { width: 100%; height: 100%; display: block; overflow: visible; }
.barge .hull { fill: var(--barge); stroke: var(--ink); stroke-width: 1.2; }
.barge .cabin { fill: var(--card); stroke: var(--ink); stroke-width: 0.8; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 8px 0; }
.panel.idle .note { margin: 0; }
.panel.dock { position: sticky; bottom: 0; z-index: 4; margin-bottom: 0; border-radius: 12px 12px 0 0; box-shadow: 0 -6px 18px rgba(10, 16, 20, 0.10); }
.sel { display: flex; gap: 10px; align-items: flex-start; }
.sel-letter { flex: none; width: 36px; height: 36px; border-radius: 8px; border: 2px solid var(--stone); display: grid; place-items: center; font: 700 19px var(--serif); }
.rule { margin: 0; font: 600 16px/1.3 var(--serif); }
.sub { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.note { margin: 8px 0 0; font-size: 14px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.btn {
min-height: 50px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line);
background: var(--paper); color: var(--ink); font: 600 16px/1.15 var(--sans); cursor: pointer;
display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.btn small { font-weight: 500; font-size: 12px; color: inherit; opacity: 0.85; margin-top: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:disabled { cursor: not-allowed; background: transparent; color: var(--muted); border-style: dashed; }
.btn.primary:disabled { border-color: var(--line); }
.result-title { margin: 0 0 8px; font: 600 17px/1.3 var(--serif); }
.bignums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bignums div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--paper); }
.bignums b { display: block; font: 700 40px/1 var(--serif); font-variant-numeric: tabular-nums; }
.bignums span { font-size: 13px; color: var(--muted); }
.card { margin: 10px 0 0; padding: 10px; border-radius: 8px; border: 1px dashed var(--line); font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; user-select: text; -webkit-user-select: text; }
.share-note { min-height: 1.4em; margin: 8px 0 0; font-size: 14px; }
.next { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.next b { color: var(--ink); font-variant-numeric: tabular-nums; }
.logbook { margin: 8px 0; }
.logbook summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.logbook ol { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.logbook li { padding: 4px 0; border-top: 1px solid var(--line); }
.logbook .mv { display: inline-block; min-width: 2.2em; color: var(--muted); font-variant-numeric: tabular-nums; }
.ad-slot {
width: 320px; max-width: 100%; height: 100px; margin: 20px auto 8px; overflow: hidden;
border: 1px dashed var(--line); border-radius: 6px; display: flex; align-items: flex-start; justify-content: flex-end;
}
.ad-slot span { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 3px 6px; }
.foot { border-top: 1px solid var(--line); margin-top: 16px; padding: 12px 0 28px; font-size: 13px; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 2px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.foot p { margin: 6px 8px 0; }
.page h1 { font: 600 26px/1.2 var(--serif); margin: 18px 0 8px; }
.page h2 { font: 600 18px/1.25 var(--serif); margin: 20px 0 6px; }
.page p, .page li { max-width: 62ch; }
.page dl div { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.page dt { color: var(--muted); }
.page dd { margin: 0; overflow-wrap: anywhere; }
.page .play { display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; margin: 8px 0; }
dialog {
width: min(460px, calc(100vw - 20px)); max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: 14px;
background: var(--card); color: var(--ink); padding: 0;
}
dialog::backdrop { background: rgba(10, 16, 20, 0.45); }
dialog .dlg { padding: 6px 16px 16px; }
dialog .dlg-top { display: flex; justify-content: flex-end; position: sticky; top: 0; padding-top: 8px; background: var(--card); }
dialog h2 { font: 600 21px/1.2 var(--serif); margin: 0 0 8px; }
dialog h3 { font: 600 15px var(--sans); margin: 16px 0 6px; }
.rules { padding-left: 1.2em; margin: 0; }
.rules li { margin: 6px 0; }
.legend { margin: 0; }
.legend div { display: grid; grid-template-columns: 3em 1fr; gap: 8px; padding: 3px 0; border-top: 1px solid var(--line); font-size: 14px; }
.legend dt { font-weight: 700; text-align: center; }
.legend dd { margin: 0; }
.keys, .fiction { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.statnums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.statnums b { display: block; font: 700 28px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.statnums span { font-size: 12px; color: var(--muted); }
.dist { list-style: none; padding: 0; margin: 0; }
.dist li { display: grid; grid-template-columns: 6.5em 1fr; align-items: center; gap: 6px; margin: 4px 0; font-size: 13px; }
.dist .bar { display: block; background: var(--water); border: 1px solid var(--water-deep); border-radius: 4px; text-align: right; padding: 0 6px; min-width: 2em; }
.archive { list-style: none; padding: 0; margin: 0 0 8px; }
.arch { display: flex; justify-content: space-between; gap: 8px; min-height: 44px; align-items: center; padding: 0 4px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.arch span:last-child { color: var(--muted); }
@media (max-width: 380px) {
.gauge b { font-size: 23px; }
.bignums b { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
* { transition: none !important; animation: none !important; }
}
.brand-link { display: inline-flex; align-items: center; min-height: 44px; font: 600 19px/1.15 var(--serif); color: inherit; text-decoration: none; }