/* COZYART · the cozy UI kit (batch 4): river paper and cloth. Built by tools/ui/build_kit.py from tools/ui/tokens.json.
   Load after the page's own <style>: <link rel="stylesheet" href="ui/kit.css">. README.md has the spec. */


:root {
  --ck-paper: #fbf4e4;
  --ck-paper-deep: #f2e6cd;
  --ck-paper-edge: #e2cfac;
  --ck-ink: #35281f;
  --ck-ink-soft: #6b5546;
  --ck-hinoki: #d4a873;
  --ck-hinoki-deep: #a0754a;
  --ck-timber: #6a4b37;
  --ck-jade: #217f75;
  --ck-jade-deep: #17635b;
  --ck-jade-soft: #d3ebe4;
  --ck-jade-ink: #0f4a44;
  --ck-sakura: #ef8fb1;
  --ck-sakura-soft: #fbe3eb;
  --ck-sakura-deep: #b54771;
  --ck-lantern: #efa236;
  --ck-lantern-soft: #ffe5ad;
  --ck-lantern-glow: #ffcf6e;
  --ck-vermilion: #c5472e;
  --ck-vermilion-deep: #9a3420;
  --ck-leaf-soft: #d6ebcb;
  --ck-river: #3aa5bd;
  --ck-stone: #e4ded2;
  --ck-stone-light: #fbf8f1;
  --ck-stone-deep: #b9b0a0;
  --ck-sumi: #2a211b;
  --ck-cream-text: #fffaf0;
  --ck-focus: #c2462c;
  --ck-leaf: #4f9e50;
  --ck-leaf-deep: #407f41;
  --ck-noren-player: #217f75;
  --ck-noren-sakura: #bf4776;
  --ck-noren-nami: #c8452f;
  --ck-noren-luna: #1b7d7a;
  --ck-noren-default: #217f75;
  /* (COZY: the kit's own three faces wait on Raven's call; the playtosta families, from /fonts, stand in) */
  --ck-font-display: "Fredoka", system-ui, sans-serif;
  --ck-font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ck-font-hand: "Fredoka", system-ui, sans-serif;
  --ck-size-2xs: 11px;
  --ck-size-xs: 12px;
  --ck-size-sm: 13.5px;
  --ck-size-md: 16px;
  --ck-size-lg: 18px;
  --ck-size-xl: 21px;
  --ck-size-2xl: 26px;
  --ck-size-3xl: 34px;
  --ck-radius-sm: 10px;
  --ck-radius-md: 14px;
  --ck-radius-lg: 20px;
  --ck-radius-pill: 999px;
  --ck-space-1: 4px;
  --ck-space-2: 8px;
  --ck-space-3: 12px;
  --ck-space-4: 16px;
  --ck-space-5: 20px;
  --ck-space-6: 24px;
  --ck-tap: 44px;
  --ck-scale: 1;
  --ck-shade: 53, 40, 30;   /* (rgb of the shadows: rgba(var(--ck-shade), a)) */
  --ck-lift: 0 2px 0 rgba(var(--ck-shade), .14), 0 10px 22px -12px rgba(var(--ck-shade), .55);
  /* the bridge: the game's own variables, pointed at the kit */
  --ink: var(--ck-ink); --muted: var(--ck-ink-soft); --cream: var(--ck-paper); --soft: var(--ck-paper-deep);
  --line: rgba(160, 117, 74, .28); --coral: var(--ck-vermilion); --coral-ink: var(--ck-focus); --gold: var(--ck-lantern);
  --leaf: var(--ck-leaf); --shadow: var(--ck-shade);
}
@media (min-width: 900px) and (pointer: fine) { :root { --ck-scale: 1.1; } }

/* ── the components: COZY's own class names, restyled (load kit.css after the page's <style>) ─────────────────── */
body { font-family: Inter, system-ui, sans-serif; color: var(--ck-ink); }   /* (--ck-font-ui) */
button { font-family: Inter, system-ui, sans-serif; }
.ck-paper { background: url(img/washi.png) 0 0 / 128px 128px, var(--ck-paper); }

/* ── the HUD: an andon (paper lamp) for the time, a paper chip for the pebbles, river stones for sound and menu ── */
.hud { gap: 8px; padding: max(10px, env(safe-area-inset-top)) 10px 0; }
.pill { border-radius: 14px; background: url(img/washi.png) 0 0 / 128px 128px, var(--ck-paper);
  box-shadow: var(--ck-lift); padding: 4px 6px 4px 12px; }
.hud > .pill:first-child { border-radius: 12px; padding: 7px 16px 7px 15px;
  background: linear-gradient(90deg, transparent 33.1%, rgba(212, 168, 115, .28) 33.1% 33.6%, transparent 33.6% 66.4%, rgba(212, 168, 115, .28) 66.4% 66.9%, transparent 66.9%),
    radial-gradient(120% 150% at 50% 42%, #fffbf2 0%, #fcf1d8 55%, #f2deb3 100%);
  box-shadow: inset 0 3px 0 var(--ck-timber), inset 0 -3px 0 var(--ck-timber), inset 2.5px 0 0 var(--ck-hinoki-deep),
    inset -2.5px 0 0 var(--ck-hinoki-deep), var(--ck-lift); }
html.night .hud > .pill:first-child { box-shadow: inset 0 3px 0 var(--ck-timber), inset 0 -3px 0 var(--ck-timber),
    inset 2.5px 0 0 var(--ck-hinoki-deep), inset -2.5px 0 0 var(--ck-hinoki-deep), 0 0 22px 4px rgba(255, 207, 110, .5), var(--ck-lift); }
.when { padding: 0; line-height: 1.12; }
.clock { font: 500 calc(17px * var(--ck-scale)) var(--ck-font-display); letter-spacing: .01em; }
.date { font: 700 calc(12px * var(--ck-scale)) var(--ck-font-ui); color: var(--ck-ink-soft); margin-top: 2px; }
.hud > .pill:last-child { background: none; box-shadow: none; padding: 0; gap: 8px; }
.purse { font: 500 calc(17px * var(--ck-scale)) var(--ck-font-display); gap: 7px; min-height: 44px; padding: 0 13px 0 10px; border-radius: 14px;
  background: url(img/washi.png) 0 0 / 128px 128px, var(--ck-paper); box-shadow: var(--ck-lift); }
.purse i { width: 19px; height: 15px; border-radius: 52% 48% 46% 54% / 58% 56% 44% 42%;
  background: radial-gradient(circle at 34% 30%, #fbfaf6, var(--ck-stone-deep) 64%, #8a8273); box-shadow: inset 0 -1.5px 1.5px rgba(0, 0, 0, .18); }

/* river stones: the round buttons (sound, menu, close) */
.btn.round, .close { width: 44px; height: 44px; min-width: 44px; padding: 0; border: 0; color: var(--ck-ink);
  border-radius: 47% 53% 50% 50% / 55% 50% 50% 45%;
  background: radial-gradient(120% 120% at 34% 28%, var(--ck-stone-light) 0%, var(--ck-stone) 52%, var(--ck-stone-deep) 100%);
  box-shadow: 0 2px 0 rgba(var(--ck-shade), .3), 0 6px 12px -6px rgba(var(--ck-shade), .45), inset 0 -2px 3px rgba(var(--ck-shade), .14);
  display: inline-grid; place-items: center; font-size: 0; }
.btn.round:active, .close:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(var(--ck-shade), .3), inset 0 -1px 2px rgba(var(--ck-shade), .14); }
.btn.round[aria-pressed="true"] { background: radial-gradient(120% 120% at 34% 28%, #f1fbf7 0%, var(--ck-jade-soft) 52%, #9fcfc3 100%); color: var(--ck-jade-ink); }
#menu::before, #sound::before, .close::before { content: ""; width: 22px; height: 22px; background: currentColor; }
#menu::before { -webkit-mask: url(icons/glyphs/menu.svg) center / contain no-repeat; mask: url(icons/glyphs/menu.svg) center / contain no-repeat; }
#sound::before { -webkit-mask: url(icons/glyphs/sound-off.svg) center / contain no-repeat; mask: url(icons/glyphs/sound-off.svg) center / contain no-repeat; }
#sound[aria-pressed="true"]::before { -webkit-mask-image: url(icons/glyphs/sound.svg); mask-image: url(icons/glyphs/sound.svg); }
.close::before { width: 20px; height: 20px; -webkit-mask: url(icons/glyphs/close.svg) center / contain no-repeat; mask: url(icons/glyphs/close.svg) center / contain no-repeat; }

/* the hint (top): a sumi capsule; done, it turns leaf green with a check */
.hint { top: calc(max(10px, env(safe-area-inset-top)) + 64px); background: rgba(42, 33, 27, .86); color: var(--ck-cream-text);
  font: 700 calc(13.5px * var(--ck-scale)) var(--ck-font-ui); padding: 8px 15px; border-radius: 999px; box-shadow: var(--ck-lift); }
.hint.done { background: var(--ck-leaf-deep); }
.hint.done::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; background: currentColor;
  -webkit-mask: url(icons/glyphs/check.svg) center / contain no-repeat; mask: url(icons/glyphs/check.svg) center / contain no-repeat; }

/* ── the toolbar: a runner of jade tenugui cloth (the wave print, a stitched edge) with paper places ──────────────── */
.toolbar { gap: 7px; padding: 8px 9px; border-radius: 20px;
  background: url(img/seigaiha-jade.svg) 0 0 / 32px 16px, var(--ck-jade);
  box-shadow: inset 0 0 0 1.5px rgba(255, 250, 240, .16), 0 3px 0 var(--ck-jade-deep), 0 14px 24px -12px rgba(var(--ck-shade), .6); }
.toolbar::before { content: ""; position: absolute; inset: 4px; border: 1.5px dashed rgba(255, 250, 240, .42); border-radius: 16px; pointer-events: none; }
.tool { width: 48px; height: 48px; border-radius: 13px; background: url(img/washi.png) 0 0 / 128px 128px, var(--ck-paper);
  box-shadow: inset 0 -3px 0 rgba(var(--ck-shade), .1), 0 2px 0 rgba(15, 74, 68, .55); transition: transform .12s, box-shadow .12s; }
.tool canvas { width: 34px; height: 34px; }
.tool[aria-pressed="true"] { background: var(--ck-lantern-soft); transform: translateY(-3px);
  box-shadow: inset 0 0 0 3px var(--ck-lantern), 0 5px 0 rgba(15, 74, 68, .55), 0 0 0 3px rgba(239, 162, 54, .28); }
.tool[aria-pressed="true"]::after { content: ""; position: absolute; top: -12px; left: 50%; width: 15px; height: 15px; margin-left: -7.5px;
  background: var(--ck-sakura); -webkit-mask: url(icons/glyphs/blossom.svg) center / contain no-repeat; mask: url(icons/glyphs/blossom.svg) center / contain no-repeat;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .25)); }
.tool .n, .cell .n { right: 2px; bottom: 2px; min-width: 18px; text-align: center; font: 700 calc(11.5px * var(--ck-scale)) var(--ck-font-ui); color: var(--ck-ink);
  background: var(--ck-stone-light); border-radius: 8px; padding: 0 4px; box-shadow: 0 1px 0 rgba(var(--ck-shade), .3); }
.tool .k { left: 4px; top: 2px; font: 700 calc(9.5px * var(--ck-scale)) var(--ck-font-ui); color: var(--ck-ink-soft); }
.tool.nudge { box-shadow: inset 0 0 0 3px var(--ck-lantern-glow), 0 2px 0 rgba(15, 74, 68, .55), 0 0 0 4px rgba(255, 207, 110, .55); }
@keyframes ck-nudge { 50% { box-shadow: inset 0 0 0 3px var(--ck-lantern-glow), 0 2px 0 rgba(15, 74, 68, .55), 0 0 0 8px rgba(255, 207, 110, .2); } }
html:not(.still) .tool.nudge { animation: ck-nudge 1.6s ease-in-out infinite; }

/* the prompt (the action in front of you): a paper slip, the verb on a jade tab; the toast: a note with a lantern edge */
.prompt { background: url(img/washi.png) 0 0 / 128px 128px, var(--ck-paper); border-radius: 12px; padding: 7px 14px 7px 7px;
  font: 700 calc(14.5px * var(--ck-scale)) var(--ck-font-ui); color: var(--ck-ink); box-shadow: var(--ck-lift); bottom: calc(max(10px, env(safe-area-inset-bottom)) + 76px); }
.prompt b { font: 500 calc(14.5px * var(--ck-scale)) var(--ck-font-display); background: var(--ck-jade); color: var(--ck-cream-text);
  border-radius: 8px; padding: 2px 9px 3px; margin-right: 7px; display: inline-block; }
.toast { background: url(img/washi.png) 0 0 / 128px 128px, var(--ck-paper); color: var(--ck-ink); border-radius: 12px;
  border-left: 5px solid var(--ck-lantern); padding: 10px 16px 10px 13px; font: 700 calc(14.5px * var(--ck-scale)) var(--ck-font-ui);
  box-shadow: var(--ck-lift); bottom: calc(max(10px, env(safe-area-inset-bottom)) + 122px); }

/* ── panels: washi with a hinoki line inside the edge; the header is a band of the jade cloth ─────────────────── */
dialog { background: url(img/washi.png) 0 0 / 128px 128px, var(--ck-paper); color: var(--ck-ink); border-radius: 20px;
  box-shadow: 0 0 0 1.5px rgba(160, 117, 74, .3), 0 30px 60px -22px rgba(var(--ck-shade), .65); overflow: visible; }
dialog::before { content: ""; position: absolute; inset: 5px; border: 1.5px solid rgba(212, 168, 115, .5); border-radius: 16px; pointer-events: none; }
dialog::backdrop { background: rgba(26, 34, 32, .36); }
dialog:focus { outline: none; }   /* (the container, focused on open: its buttons keep their rings) */
#panel .dhead { position: relative; margin: 0; padding: 11px 11px 13px 20px; border-radius: 20px 20px 0 0; color: var(--ck-cream-text);
  background: url(img/seigaiha-jade.svg) 0 0 / 32px 16px, var(--ck-jade); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .1); }
#panel .dhead::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; border-bottom: 1.5px dashed rgba(255, 250, 240, .42); }
#panel .dhead h2 { font: 500 calc(21px * var(--ck-scale)) / 1.2 var(--ck-font-display); color: var(--ck-cream-text); text-shadow: 0 1px 0 rgba(0, 0, 0, .18); }
.dbody { padding: 12px 18px 16px; }
.dfoot { gap: 8px; padding: 2px 18px 18px; }
.tabs { gap: 6px; padding: 12px 18px 2px; }
.tabs button { min-height: 40px; border-radius: 12px; padding: 7px 15px; background: var(--ck-paper-deep); color: var(--ck-ink-soft);
  font: 700 calc(14px * var(--ck-scale)) var(--ck-font-ui); box-shadow: inset 0 0 0 1.5px rgba(160, 117, 74, .22); }
.tabs button[aria-selected="true"] { background: url(img/seigaiha-jade.svg) 0 0 / 32px 16px, var(--ck-jade); color: var(--ck-cream-text);
  box-shadow: 0 2px 0 var(--ck-jade-deep); }

/* the talk sheet: the speaker's name on a noren (a rod, a split) in their colour (--ck-noren), the portrait in a stone ring */
#talk .dhead { padding: 18px 18px 4px; gap: 12px; align-items: center; }
.face { width: 58px; height: 58px; box-shadow: 0 0 0 3px var(--ck-stone-light), 0 0 0 4.5px rgba(160, 117, 74, .45), 0 5px 12px -4px rgba(var(--ck-shade), .45); }
.who { gap: 5px; }
.who b { position: relative; align-self: flex-start; font: 500 calc(19px * var(--ck-scale)) / 1.2 var(--ck-font-display); color: var(--ck-cream-text);
  background: var(--ck-noren, var(--ck-noren-default)); padding: 5px 17px 10px; border-radius: 3px 3px 9px 9px; box-shadow: 0 3px 6px -3px rgba(var(--ck-shade), .5); }
.who b::before { content: ""; position: absolute; left: -7px; right: -7px; top: -4px; height: 5px; border-radius: 3px;
  background: linear-gradient(var(--ck-hinoki-deep), var(--ck-timber)); box-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.who b::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 3px; height: 9px; margin-left: -1.5px; background: var(--ck-paper); border-radius: 2px 2px 0 0; }
.who span { font: 700 calc(12.5px * var(--ck-scale)) var(--ck-font-ui); color: var(--ck-ink-soft); }
.hearts { color: var(--ck-sakura-deep); letter-spacing: 2px; font-size: calc(15px * var(--ck-scale)); }
.line { font: 500 calc(18px * var(--ck-scale)) / 1.5 var(--ck-font-ui); color: var(--ck-ink); min-height: 3em; }
.line.stage { color: var(--ck-ink-soft); }

/* ── buttons: paper (secondary), lacquered jade (primary); they press down onto their lip ─────────────────────── */
.btn { min-height: 40px; height: auto; border-radius: 14px; padding: 0 15px; background: var(--ck-paper-deep); color: var(--ck-ink);
  font: 700 calc(15px * var(--ck-scale)) var(--ck-font-ui); box-shadow: inset 0 0 0 1.5px rgba(160, 117, 74, .34), 0 2px 0 rgba(var(--ck-shade), .2); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 0 0 1.5px rgba(160, 117, 74, .34), 0 1px 0 rgba(var(--ck-shade), .2); }
.btn.primary, .btn[aria-pressed="true"]:not(.round), .swatches .btn[aria-checked="true"] { background: linear-gradient(180deg, #288c81, var(--ck-jade));
  color: var(--ck-cream-text); box-shadow: 0 3px 0 var(--ck-jade-deep), inset 0 1px 0 rgba(255, 255, 255, .16); }
.btn.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ck-jade-deep), inset 0 1px 0 rgba(255, 255, 255, .16); }
.btn:disabled { opacity: .5; transform: none; }
.menu .btn { height: auto; min-height: 52px; border-radius: 14px; padding: 0 16px; }
/* settings: a row a setting, its switch on the right */
/* the goal ladder's rungs */
.dbody h3.lad { margin: 12px 0 4px; font: 700 calc(12px * var(--ck-scale)) / 1.2 var(--ck-font-ui); letter-spacing: .07em; text-transform: uppercase; color: var(--ck-ink-soft); }
.dbody h3.lad:first-child { margin-top: 2px; }
#hint.lad { cursor: pointer; pointer-events: auto; }   /* (a goal in the pill: a tap opens the ladder) */
.settings { display: flex; flex-direction: column; gap: 8px; }
.setting { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 253, 247, .62); box-shadow: inset 0 0 0 1.5px rgba(160, 117, 74, .22); }
.setting .what { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.setting b { font: 600 calc(15px * var(--ck-scale)) / 1.25 var(--ck-font-ui); color: var(--ck-ink); }
.setting small { font: 500 calc(12.5px * var(--ck-scale)) / 1.3 var(--ck-font-ui); color: var(--ck-ink-soft); }
.switch { position: relative; flex: none; width: 56px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.switch::before { content: ""; position: absolute; left: 4px; right: 4px; top: 10px; bottom: 10px; border-radius: 12px; background: rgba(160, 117, 74, .3); transition: background .15s; }
.switch .knob { position: absolute; left: 6px; top: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--ck-paper, #fffaf0); box-shadow: 0 1px 3px rgba(53, 40, 30, .35); transition: transform .15s; }
.switch[aria-checked="true"]::before { background: var(--ck-jade, #2a8f7f); }
.switch[aria-checked="true"] .knob { transform: translateX(24px); }
html.still .switch::before, html.still .switch .knob { transition: none; }
html.bigtext { --ck-scale: 1.18; }
@media (min-width: 900px) and (pointer: fine) { html.bigtext { --ck-scale: 1.28; } }
.row .btn { min-height: 38px; font-size: calc(14px * var(--ck-scale)); padding: 0 12px; }
.btn:focus-visible, .tool:focus-visible, .cell:focus-visible, .tabs button:focus-visible, dialog button:focus-visible, dialog [tabindex]:focus-visible {
  outline: 3px solid var(--ck-focus); outline-offset: 2px; }
/* a touch screen: no rings until a key is pressed (a panel's main button has the focus for keyboards, not for thumbs) */
html.touch :is(.btn, .tool, .cell, .tabs button, dialog button, dialog [tabindex], .ib-cell, .bag-cell, .swatch, .skip):focus-visible { outline: none; }

/* rows, the item grid, details */
.rows { gap: 7px; }
.row { gap: 11px; padding: 7px 9px; border-radius: 14px; background: rgba(255, 253, 247, .62); box-shadow: inset 0 0 0 1.5px rgba(160, 117, 74, .22); }
.row .nm { font: 700 calc(15px * var(--ck-scale)) var(--ck-font-ui); }
.row .nm small { font: 500 calc(12.5px * var(--ck-scale)) var(--ck-font-ui); color: var(--ck-ink-soft); }
.grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.cell { border-radius: 14px; background: var(--ck-paper-deep);
  box-shadow: inset 0 2px 4px rgba(var(--ck-shade), .12), inset 0 0 0 1.5px rgba(160, 117, 74, .2); }
.cell canvas { width: 66%; height: 66%; }
.cell[aria-pressed="true"] { background: var(--ck-lantern-soft); box-shadow: inset 0 0 0 3px var(--ck-lantern), 0 0 0 3px rgba(239, 162, 54, .25); }
.cell.unknown { background: #e9dcc0; }
.detail { border-radius: 14px; background: rgba(255, 253, 247, .62); box-shadow: inset 0 0 0 1.5px rgba(160, 117, 74, .22);
  font: 500 calc(14.5px * var(--ck-scale)) / 1.5 var(--ck-font-ui); }
.detail b, .summary h3, .project h3 { font-family: Fredoka, system-ui, sans-serif; font-weight: 500; }   /* (--ck-font-display) */
.summary p, .summary li, .goals li { font-family: Inter, system-ui, sans-serif; }
.empty { font: 500 calc(14px * var(--ck-scale)) var(--ck-font-ui); color: var(--ck-ink-soft); }
.reveal h3 { font: 500 calc(26px * var(--ck-scale)) var(--ck-font-display); }
.reveal p { font: 500 calc(15px * var(--ck-scale)) var(--ck-font-ui); color: var(--ck-ink-soft); }
/* the goals: a bud that blooms when it's done */
.goals li::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 9px; vertical-align: -2px; background: var(--ck-ink-soft);
  -webkit-mask: url(icons/glyphs/bud.svg) center / contain no-repeat; mask: url(icons/glyphs/bud.svg) center / contain no-repeat; }
.goals li.done { color: var(--ck-ink-soft); text-decoration-color: rgba(107, 85, 70, .5); }
.goals li.done::before { background: var(--ck-sakura-deep); -webkit-mask-image: url(icons/glyphs/blossom.svg); mask-image: url(icons/glyphs/blossom.svg); }
/* progress: a groove in the paper, filling leaf to jade */
.bar { height: 10px; background: var(--ck-paper-deep); box-shadow: inset 0 1.5px 2px rgba(var(--ck-shade), .2), inset 0 0 0 1px rgba(160, 117, 74, .2); }
.bar i, .catchbar i { background: linear-gradient(180deg, rgba(255, 255, 255, .22), transparent 55%), linear-gradient(90deg, var(--ck-leaf), var(--ck-jade)); }
/* the hanko stamp ("new", "sold") */
.stamp { font: 500 calc(12.5px * var(--ck-scale)) var(--ck-font-display); color: var(--ck-cream-text); background: var(--ck-vermilion);
  border-radius: 6px; padding: 3px 8px; transform: rotate(-6deg); box-shadow: inset 0 0 0 1.5px var(--ck-vermilion), inset 0 0 0 3px rgba(255, 250, 240, .8); }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 3px var(--ck-paper), 0 0 0 5.5px var(--ck-jade); }

/* ── fishing: a paper panel, the tension ring on a paper track, a lacquered stone to reel ─────────────────────── */
.fish, .decor { border-radius: 20px; background: url(img/washi.png) 0 0 / 128px 128px, var(--ck-paper);
  box-shadow: 0 0 0 1.5px rgba(160, 117, 74, .3), 0 14px 26px -12px rgba(var(--ck-shade), .6); }
.ring circle:first-child { stroke: var(--ck-paper-deep); }
.ring .say { font: 500 calc(12.5px * var(--ck-scale)) var(--ck-font-display); }
.catchbar { height: 14px; background: var(--ck-paper-deep); box-shadow: inset 0 1.5px 2px rgba(var(--ck-shade), .2), inset 0 0 0 1px rgba(160, 117, 74, .2); }
.fishtext { font: 600 calc(13px * var(--ck-scale)) var(--ck-font-ui); color: var(--ck-ink-soft); }
.reel { width: 74px; height: 74px; border-radius: 48% 52% 50% 50% / 53% 50% 50% 47%; color: var(--ck-cream-text);
  font: 500 calc(16px * var(--ck-scale)) var(--ck-font-display);
  background: radial-gradient(120% 120% at 34% 28%, #ea7558 0%, var(--ck-vermilion) 55%, var(--ck-vermilion-deep) 100%);
  box-shadow: 0 4px 0 #7f2a19, 0 10px 18px -8px rgba(var(--ck-shade), .55), inset 0 -3px 4px rgba(0, 0, 0, .15); }
.reel.on { transform: translateY(3px); background: radial-gradient(120% 120% at 34% 28%, #d9614a 0%, var(--ck-vermilion-deep) 70%); box-shadow: 0 1px 0 #7f2a19; }
.decor span { font: 700 calc(14px * var(--ck-scale)) var(--ck-font-ui); }

/* the stick (phones): a ring of paper and a stone knob; running, a lantern ring */
#stick { background: rgba(251, 244, 228, .2); box-shadow: inset 0 0 0 2px rgba(255, 250, 240, .62), 0 6px 18px rgba(var(--ck-shade), .25); }
#stick > i { background: radial-gradient(120% 120% at 34% 28%, var(--ck-stone-light), var(--ck-stone) 55%, var(--ck-stone-deep));
  box-shadow: 0 3px 6px rgba(var(--ck-shade), .35), inset 0 -2px 3px rgba(var(--ck-shade), .15); }
#stick.run > i { background: radial-gradient(120% 120% at 34% 28%, #fff4d6, var(--ck-lantern-soft) 55%, #f2c56f);
  box-shadow: inset 0 0 0 2.5px var(--ck-lantern), 0 3px 6px rgba(var(--ck-shade), .35); }

/* touch: every target at least 44 px */
@media (pointer: coarse) {
  .btn, .tabs button, .row .btn, .menu .btn { min-height: 44px; min-width: 44px; }
  .tool .k { display: none; }
}
/* small phones: the HUD's lamp, chip and two stones in one row (they need ~360 px at full size) */
@media (max-width: 380px) {
  .hud { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .hud > .pill:first-child { padding: 6px 11px; }
  .clock { font-size: 15px; } .date { font-size: 11px; }
  .purse { font-size: 15.5px; padding: 0 10px 0 8px; gap: 6px; }
  .hud > .pill:last-child { gap: 6px; }
}
@media (max-width: 359px) {
  .hud { gap: 5px; padding-left: 6px; padding-right: 6px; }
  .hud > .pill:last-child { gap: 5px; }
  .btn.round { width: 40px; height: 40px; min-width: 40px; }
}
/* phones: seven places in one row. 44 px wide from 360 px screens up (every current phone); under 360 px (a 320 px
   phone can't hold 7 × 44) they step down to 40, above the game's own 38 px floor */
@media (max-width: 420px) {
  .toolbar { gap: 4px; padding: 6px; }
  .tool { width: 44px; height: 46px; }
  .tool canvas { width: 31px; height: 31px; }
}
@media (max-width: 359px) {
  .toolbar { gap: 3px; padding: 5px; }
  .toolbar::before { inset: 3px; }
  .tool { width: 40px; height: 44px; }
  .tool canvas { width: 28px; height: 28px; }
}
/* reduced motion and Capture Mode: no transitions of ours either */
html.still .tool, html[data-capture-mode="1"] .tool { transition: none; }
@media (prefers-reduced-motion: reduce) { .tool { transition: none; } }


/* ── glyphs on anything: class="ck-glyph ck-glyph-<name>" (an icon-only button keeps its aria-label) ── */
.ck-glyph::before { content: ""; display: inline-block; width: 22px; height: 22px; background: currentColor; vertical-align: middle;
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat; }
.btn.round.ck-glyph, .close.ck-glyph { font-size: 0; }
.ck-glyph-bag::before { -webkit-mask-image: url(icons/glyphs/bag.svg); mask-image: url(icons/glyphs/bag.svg); }
.ck-glyph-bed::before { -webkit-mask-image: url(icons/glyphs/bed.svg); mask-image: url(icons/glyphs/bed.svg); }
.ck-glyph-blossom::before { -webkit-mask-image: url(icons/glyphs/blossom.svg); mask-image: url(icons/glyphs/blossom.svg); }
.ck-glyph-board::before { -webkit-mask-image: url(icons/glyphs/board.svg); mask-image: url(icons/glyphs/board.svg); }
.ck-glyph-bud::before { -webkit-mask-image: url(icons/glyphs/bud.svg); mask-image: url(icons/glyphs/bud.svg); }
.ck-glyph-check::before { -webkit-mask-image: url(icons/glyphs/check.svg); mask-image: url(icons/glyphs/check.svg); }
.ck-glyph-chevron-left::before { -webkit-mask-image: url(icons/glyphs/chevron-left.svg); mask-image: url(icons/glyphs/chevron-left.svg); }
.ck-glyph-chevron-right::before { -webkit-mask-image: url(icons/glyphs/chevron-right.svg); mask-image: url(icons/glyphs/chevron-right.svg); }
.ck-glyph-clock::before { -webkit-mask-image: url(icons/glyphs/clock.svg); mask-image: url(icons/glyphs/clock.svg); }
.ck-glyph-close::before { -webkit-mask-image: url(icons/glyphs/close.svg); mask-image: url(icons/glyphs/close.svg); }
.ck-glyph-cloud::before { -webkit-mask-image: url(icons/glyphs/cloud.svg); mask-image: url(icons/glyphs/cloud.svg); }
.ck-glyph-critter::before { -webkit-mask-image: url(icons/glyphs/critter.svg); mask-image: url(icons/glyphs/critter.svg); }
.ck-glyph-fish::before { -webkit-mask-image: url(icons/glyphs/fish.svg); mask-image: url(icons/glyphs/fish.svg); }
.ck-glyph-gift::before { -webkit-mask-image: url(icons/glyphs/gift.svg); mask-image: url(icons/glyphs/gift.svg); }
.ck-glyph-hand::before { -webkit-mask-image: url(icons/glyphs/hand.svg); mask-image: url(icons/glyphs/hand.svg); }
.ck-glyph-home::before { -webkit-mask-image: url(icons/glyphs/home.svg); mask-image: url(icons/glyphs/home.svg); }
.ck-glyph-journal::before { -webkit-mask-image: url(icons/glyphs/journal.svg); mask-image: url(icons/glyphs/journal.svg); }
.ck-glyph-leaf::before { -webkit-mask-image: url(icons/glyphs/leaf.svg); mask-image: url(icons/glyphs/leaf.svg); }
.ck-glyph-lock::before { -webkit-mask-image: url(icons/glyphs/lock.svg); mask-image: url(icons/glyphs/lock.svg); }
.ck-glyph-map::before { -webkit-mask-image: url(icons/glyphs/map.svg); mask-image: url(icons/glyphs/map.svg); }
.ck-glyph-menu::before { -webkit-mask-image: url(icons/glyphs/menu.svg); mask-image: url(icons/glyphs/menu.svg); }
.ck-glyph-minus::before { -webkit-mask-image: url(icons/glyphs/minus.svg); mask-image: url(icons/glyphs/minus.svg); }
.ck-glyph-moon::before { -webkit-mask-image: url(icons/glyphs/moon.svg); mask-image: url(icons/glyphs/moon.svg); }
.ck-glyph-pebble::before { -webkit-mask-image: url(icons/glyphs/pebble.svg); mask-image: url(icons/glyphs/pebble.svg); }
.ck-glyph-plus::before { -webkit-mask-image: url(icons/glyphs/plus.svg); mask-image: url(icons/glyphs/plus.svg); }
.ck-glyph-rain::before { -webkit-mask-image: url(icons/glyphs/rain.svg); mask-image: url(icons/glyphs/rain.svg); }
.ck-glyph-settings::before { -webkit-mask-image: url(icons/glyphs/settings.svg); mask-image: url(icons/glyphs/settings.svg); }
.ck-glyph-shop::before { -webkit-mask-image: url(icons/glyphs/shop.svg); mask-image: url(icons/glyphs/shop.svg); }
.ck-glyph-snow::before { -webkit-mask-image: url(icons/glyphs/snow.svg); mask-image: url(icons/glyphs/snow.svg); }
.ck-glyph-sound::before { -webkit-mask-image: url(icons/glyphs/sound.svg); mask-image: url(icons/glyphs/sound.svg); }
.ck-glyph-sound-off::before { -webkit-mask-image: url(icons/glyphs/sound-off.svg); mask-image: url(icons/glyphs/sound-off.svg); }
.ck-glyph-sparkle::before { -webkit-mask-image: url(icons/glyphs/sparkle.svg); mask-image: url(icons/glyphs/sparkle.svg); }
.ck-glyph-sprout::before { -webkit-mask-image: url(icons/glyphs/sprout.svg); mask-image: url(icons/glyphs/sprout.svg); }
.ck-glyph-star::before { -webkit-mask-image: url(icons/glyphs/star.svg); mask-image: url(icons/glyphs/star.svg); }
.ck-glyph-sun::before { -webkit-mask-image: url(icons/glyphs/sun.svg); mask-image: url(icons/glyphs/sun.svg); }
.ck-glyph-talk::before { -webkit-mask-image: url(icons/glyphs/talk.svg); mask-image: url(icons/glyphs/talk.svg); }
.ck-glyph-wind::before { -webkit-mask-image: url(icons/glyphs/wind.svg); mask-image: url(icons/glyphs/wind.svg); }