/* Gentle Harvest prototype. Colours follow Gentle Mahjong's palette: an
   evening (dark) table by default and a daylight (light) one. */
:root, body[data-theme="evening"] {
  --paper: #14201c; --panel: #1f302a; --panel-strong: #29403a; --ink: #f8f2e7; --muted: #c3cec8;
  --card: #fffdf6; --card-ink: #24302b; --card-muted: #56625b; --edge: #b99a62;
  --accent: #62cfb5; --accent-ink: #10201b; --focus: #fff1a8; --shadow: rgba(0, 0, 0, .45);
  color-scheme: dark;
}
body[data-theme="daylight"] {
  --paper: #f4ecdc; --panel: #fffaf0; --panel-strong: #efe4cd; --ink: #24302b; --muted: #56625b;
  --card: #fffdf6; --card-ink: #24302b; --card-muted: #56625b; --edge: #c8ad7f;
  --accent: #176b5b; --accent-ink: #ffffff; --focus: #bd4b26; --shadow: rgba(50, 43, 31, .2);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink);
  font: 17px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3 { font-family: Georgia, serif; line-height: 1.2; }
main { max-width: 1440px; margin: 0 auto; padding: 16px 16px 48px; }
button, select, input { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; padding: 10px 16px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 800; z-index: 10; }
.skip-link:focus { top: 12px; }

.topbar { position: relative; max-width: 1120px; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 8px 0 16px; }
.topbar h1 { margin: 0; font-size: clamp(30px, 5vw, 40px); }
.eyebrow { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.harvest-seasonal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-left: auto; }
/* Harvest follows Mahjong's dialog-based More menu: one calm sheet with a
   proper heading and Close control, not a second floating toolbar. */
.harvest-menu-dialog { width: min(480px, calc(100vw - 32px)); }
.harvest-menu-dialog::backdrop { background: rgba(10, 16, 14, .6); backdrop-filter: blur(3px); }
.harvest-menu-sheet { gap: 14px; }
.harvest-menu-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.harvest-menu-actions .round-button { width: 100%; min-height: 46px; padding-inline: 10px; }
.gentle-games-dialog { width: min(560px, calc(100vw - 32px)); }
.gentle-games-list { display: grid; gap: 10px; }
.gentle-game-choice { display: grid; gap: 3px; min-height: 74px; padding: 13px 15px; border: 2px solid var(--accent); border-radius: 14px; color: var(--ink); background: color-mix(in srgb, var(--accent) 7%, var(--panel)); text-decoration: none; }
.gentle-game-choice strong { font-size: 18px; }
.gentle-game-choice span { color: var(--muted); font-size: 14px; }
.gentle-game-choice--active:hover { background: color-mix(in srgb, var(--accent) 16%, var(--panel)); }
.gentle-game-choice--coming { border-color: color-mix(in srgb, var(--muted) 58%, transparent); color: var(--muted); background: color-mix(in srgb, var(--panel) 80%, var(--paper)); }
/* Seasonal spaces stay visible beside Menu on a wide screen rather than
   repeating inside the sheet. Phones use the same sheet for all actions. */
.harvest-menu-actions #recipeBookButton, .harvest-menu-actions #todayButton, .harvest-menu-actions #kitchenButton { display: none; }
.mobile-menu-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border: 2px solid var(--accent); border-radius: 999px; color: var(--ink); background: var(--panel); font: inherit; font-weight: 700; }
.mobile-menu-button { margin-left: 10px; }

.round-button, .quiet-button, .primary-button {
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--accent);
  background: transparent; color: var(--ink); font-weight: 700; cursor: pointer;
}
.primary-button { background: var(--accent); color: var(--accent-ink); font-weight: 800; }
a.quiet-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.round-button:hover, .quiet-button:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); }
button:disabled { opacity: .55; cursor: not-allowed; }
/* A pile you can't take from right now keeps its card crisp; only the words dim. */
.pile:disabled { opacity: 1; }
.pile:disabled .pile-label { opacity: .7; }

.intro { max-width: 640px; min-height: 250px; margin: clamp(28px, 8vh, 88px) auto; padding: 32px; border-radius: 24px; background: var(--panel); text-align: center; display: grid; align-content: center; justify-items: center; }
.intro[hidden] { display: none; }
.intro h2 { margin-top: 0; font-size: 30px; }
.intro-season { color: var(--muted); }
.intro-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.intro-actions .quiet-button { min-height: 44px; }
.intro .settings-note { margin: 8px 0 0; }

/* The table starts hidden behind the welcoming introduction.  This explicit
   rule is necessary because .table's display:flex otherwise overrides the
   browser's lower-specificity [hidden] default and leaves an empty, giant
   board/pot visible before a player has started a supper. */
.table[hidden] { display: none; }
.table { display: flex; flex-direction: column; gap: 20px; }
.status-row, .timer-area, .turn-prompt, .actions, .progress-text, .log { width: min(1120px, 100%); margin-inline: auto; }
.status-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.status-row p { margin: 0; }
.course-label { font-weight: 800; }
.season-label { color: var(--muted); }

/* The table is one original raster board. Interactive cards, labels, and buttons
   remain live HTML layered onto the empty play spaces painted into the board. */
.round-table {
  /* A started supper replaces the welcome panel, but the live board must
     leave room for its own turn instruction and action buttons. Reserving
     that full control strip keeps the hand, prompt, and discard action in
     one usable view instead of asking a player to scroll mid-turn. */
  --available-table-height: calc(100vh - 190px);
  --size: min(calc(100vw - 32px), var(--available-table-height), 1232px);
  position: relative; width: var(--size); height: var(--size); margin: 0 auto;
  isolation: isolate; background: url("assets/multiplayer/gentle-harvest-four-seat-table-v3.png") center / contain no-repeat;
}
@supports (height: 100dvh) {
  .round-table { --available-table-height: calc(100dvh - 190px); }
}
.seats { display: contents; margin: 0; padding: 0; list-style: none; }
.card-lanes { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.discard-lanes { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
/* Four distinct player fields around the shared pot. Cards are not placed on
   decorative rings: each field has one centered, predictable hand area. */
.seat { position: absolute; min-width: 0; max-width: 100%; z-index: 2; }
.seat--north { left: 23%; top: 3%; width: 54%; height: 21%; }
.seat--west { left: 7%; top: 23%; width: 18%; height: 45%; }
.seat--east { right: 7%; top: 23%; width: 18%; height: 45%; }
.seat p { margin: 0; }
.seat-plate { padding: 4px 9px; border-radius: 12px; color: #fff6df; background: rgba(12, 33, 25, .90); border: 1px solid rgba(239, 202, 118, .85); box-shadow: 0 3px 8px rgba(20, 9, 3, .46); text-align: center; max-width: 96%; }
.seat--north .seat-plate { position: absolute; left: 50%; top: -16%; transform: translateX(-50%); }
.seat--west .seat-plate { position: absolute; left: -4%; top: -10%; transform: translateX(-35%); }
.seat--east .seat-plate { position: absolute; right: -4%; top: -10%; transform: translateX(35%); }
.seat--active .seat-plate { border-color: #fff0a5; box-shadow: 0 0 0 3px rgba(255, 211, 94, .34), 0 3px 8px rgba(20, 9, 3, .46); }
.seat-compass { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #ffe39b; }
.seat-name { font-size: 15px; font-weight: 800; }
.seat-detail { font-size: 12px; color: #d5e1cf; }
.seat-backs {
  position: absolute;
  pointer-events: none;
  padding: 0;
  /* This is a real play-space boundary, not merely a visual guide. The
     placement math keeps cards inside it; the clip is the last safeguard at
     unusual viewport sizes or browser zoom levels. */
  overflow: hidden;
}
.seat-back { position: absolute; display: block; width: clamp(38px, 4vw, 52px); height: clamp(54px, 5.7vw, 74px); border-radius: 6px; border: 2px solid #ffe6a5; background: #396f5a url("assets/favicon-32.png") center / 100% 100% no-repeat; box-shadow: 0 2px 4px var(--shadow); }
/* The card backs travel on three curved rails around the common pot—the
   table relationship is deliberate, rather than three independent stacks. */
.seat--north .seat-backs { left: 3%; top: 5%; width: 94%; height: 60%; }
.seat--north .seat-back { left: var(--seat-x); top: var(--seat-y); width: clamp(40px, 4.2vw, 55px); height: clamp(57px, 6vw, 78px); transform: translate(-50%, -50%) rotate(calc(var(--seat-facing, 0deg) + var(--seat-turn, 0deg))); transform-origin: center bottom; }
.seat--west .seat-backs, .seat--east .seat-backs { left: 0; top: 0; width: 100%; height: 100%; }
.seat--west .seat-back, .seat--east .seat-back { left: var(--seat-x); top: var(--seat-y); transform: translate(-50%, -50%) rotate(calc(var(--seat-facing, 0deg) + var(--seat-turn, 0deg))); transform-origin: center; }
.card-lanes .seat-back {
  position: absolute;
  left: var(--lane-x);
  top: var(--lane-y);
  /* Exact proportions of the parent board, matching the painted wells. This
     avoids the old viewport-based sizing that drifted away from the artwork
     whenever the table reached its maximum width. */
  width: 5%;
  height: 7.6%;
  transform: translate(-50%, -50%) rotate(calc(var(--lane-facing, 0deg) + var(--lane-turn, 0deg)));
  transform-origin: center;
}
.seat-discard { display: flex; align-items: center; gap: 4px; padding: 0; min-height: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; }
.discard-lane { position: absolute; left: var(--discard-x); top: var(--discard-y); transform: translate(-50%, -50%); pointer-events: auto; z-index: 1; }
button.seat-discard:not(:disabled) { cursor: pointer; box-shadow: 0 0 0 2px #ffe39b; background: rgba(29, 67, 48, .78); } button.seat-discard:not(:disabled):hover { background: rgba(73, 116, 79, .86); } button.seat-discard:disabled { opacity: 1; cursor: default; } .seat-discard-label { font-size: 11px; font-weight: 700; color: #fff6df; }
.discard-lane .seat-discard-label { display: none; }
/* Discards stay large enough to read, but do not overwhelm the shared pot or
   spill across a neighbouring cook's field. */
.card.card--mini { width: clamp(58px, 4.7vw, 64px); height: auto; aspect-ratio: 3 / 5; border-width: 1.5px; border-radius: 8px; flex: none; } .card--mini .card-band { padding: 3px 2px; } .card--mini .card-icon { width: 18px; height: 18px; } .card--mini .card-family { font-size: 12px; letter-spacing: 0; } .card--mini .card-name { font-size: 14px; padding: 0 2px; } .card--mini .card-season { display: none; }

/* The shared pot well is a raster overlay clipped to the game's real course. */
.centre { position: absolute; left: 31%; top: 27%; display: grid; place-items: center; width: 38%; height: 38%; } .centre > .pot, .centre > .pot-steam, .centre > .pile { grid-area: 1 / 1; }
.pot {
  --pot-fill: .28; position: relative; width: 100%; height: 100%;
  /* The well is viewed slightly from above. This deliberately smaller oval is
     the liquid boundary: food may rise within it, never over the metal rim. */
  clip-path: ellipse(41% 37% at 50% 53%); overflow: hidden; pointer-events: none;
}
/* The broth can rise through the well, but neither its painted edge nor any
   ingredient can ever cross the bowl's metal rim. The image provides the
   food and broth detail; these small motions keep it from reading as a still
   food photograph pasted beneath the cards. */
.pot-fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: inset(calc((1 - var(--pot-fill)) * 100%) 0 0 0); filter: saturate(1.09) contrast(1.05); transform-origin: 50% 62%; animation: harvest-broth-simmer 5.8s ease-in-out infinite alternate; transition: clip-path 900ms ease; }
.pot::before { position: absolute; inset: 18%; z-index: 1; border-radius: 50%; content: ""; background: radial-gradient(circle at 28% 68%, rgba(255,246,207,.78) 0 1.3%, transparent 1.7%), radial-gradient(circle at 67% 56%, rgba(255,246,207,.7) 0 1%, transparent 1.5%), radial-gradient(circle at 53% 78%, rgba(255,246,207,.58) 0 .8%, transparent 1.35%); mix-blend-mode: screen; opacity: .35; pointer-events: none; animation: harvest-bubble-shimmer 3.8s ease-in-out infinite; }
/* Steam is separate from the clipped liquid layer so it visibly rises above
   the bowl while never pretending to be part of the draw-pile button. */
.pot-steam { position: relative; z-index: 2; align-self: start; justify-self: center; width: 55%; height: 61%; margin-top: -17%; pointer-events: none; overflow: visible; }
.pot-steam__wisp { position: absolute; bottom: 0; width: 20%; height: 82%; border-radius: 50%; background: linear-gradient(to top, rgba(255,244,216,0) 0%, rgba(255,247,224,.2) 22%, rgba(255,250,234,.78) 55%, rgba(255,255,248,0) 100%); filter: blur(2.2px); opacity: 0; transform-origin: 50% 100%; animation: harvest-steam-wisp 4.6s ease-in-out infinite; }
.pot-steam__wisp:nth-child(1) { left: 10%; animation-delay: -1.1s; }
.pot-steam__wisp:nth-child(2) { left: 42%; height: 100%; animation-delay: -2.7s; }
.pot-steam__wisp:nth-child(3) { left: 72%; height: 74%; animation-delay: -3.8s; }
.centre > .pile { z-index: 3; }
@keyframes harvest-broth-simmer { from { transform: translate(-.6%, .4%) scale(1.012); } to { transform: translate(.7%, -.45%) scale(1.035); } }
@keyframes harvest-bubble-shimmer { 0%, 100% { opacity: .22; transform: translateY(3%) scale(.88); } 48% { opacity: .68; transform: translateY(-5%) scale(1.08); } }
@keyframes harvest-steam-wisp { 0%, 100% { opacity: 0; transform: translate(-12%, 14%) rotate(-8deg) scaleX(.7); } 18% { opacity: .58; } 55% { opacity: .72; } 86% { opacity: .08; transform: translate(18%, -44%) rotate(9deg) scaleX(1.25); } }
body.reduce-motion .pot-fill, body.reduce-motion .pot::before, body.reduce-motion .pot-steam__wisp { animation: none; }
.piles { display: flex; gap: 20px; } .pile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px; border: 0; border-radius: 16px; background: transparent; color: var(--ink); cursor: pointer; } .pile:not(:disabled):hover .pile-back, .pile:not(:disabled):hover .pile-face { transform: translateY(-3px); } .pile-label { display: flex; flex-direction: column; align-items: center; font-weight: 700; font-size: 15px; } .pile-count { font-weight: 400; color: var(--muted); }
.pile-back { width: 104px; height: 140px; border-radius: 12px; border: 3px solid #ffe7ab; background: #3d795f url("assets/favicon-32.png") center / 100% 100% no-repeat; box-shadow: 0 4px 12px var(--shadow); transition: transform .15s ease; } .pile-face { transition: transform .15s ease; } .pile-face--empty { width: 104px; height: 140px; border: 2px dashed var(--muted); border-radius: 12px; }
.pile--draw { z-index: 3; align-self: center; justify-self: center; padding: 4px; gap: 2px; } .pile--draw .pile-back { width: 60px; height: 82px; } .pile--draw .pile-label { padding: 1px 8px; border-radius: 999px; background: rgba(22, 49, 36, .94); color: #fff5d8; font-size: 13px; line-height: 1.3; } .pile--draw .pile-count { color: #d4e2d0; font-size: 12px; }
.timer-area { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.timer-area[hidden] { display: none; }
.pot { --simmer: .3; width: 100%; height: 100%; max-width: none; max-height: none; }
.pot-rim { fill: #34403b; stroke: var(--ink); stroke-width: 3; }
body[data-theme="daylight"] .pot-rim { fill: #5a6660; }
.pot-handle { fill: #34403b; stroke: var(--ink); stroke-width: 3; }
.pot-broth { fill: #d9822b; }
.pot-bits circle { fill: #6fa862; }
.pot-bits circle:nth-child(2n) { fill: #b8462f; }
/* Bubbles rise as the turn's timer runs on: barely there, then rolling. */
.pot-bubbles circle { fill: none; stroke: #fff1d6; stroke-width: 2; opacity: calc(.15 + var(--simmer) * .85); transform-box: fill-box; transform-origin: center; transform: scale(calc(.6 + var(--simmer) * .8)); }
.pile--draw { z-index: 1; padding: 4px; gap: 2px; transform: translateY(-8px); }
.pile--draw .pile-back { width: 76px; height: 104px; }
.pile--draw .pile-label { padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--paper) 80%, transparent); font-size: 13px; line-height: 1.3; }
.pile--draw .pile-count { font-size: 12px; }
.timer-area { margin-top: 10px; }
.timer-text { margin: 0; font-weight: 700; }

.turn-prompt { margin: 0; min-height: 1.5em; font-size: 19px; font-weight: 700; text-align: center; }

/* Your face-up hand belongs in the red south play field, not below its
   border. It is the fourth hand around the table, simply readable to you. */
.player-hand { position: absolute; left: 14%; bottom: 10%; z-index: 4; width: 72%; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 3px; }
.player-hand-meta { display: flex; align-items: center; justify-content: space-between; min-height: 24px; padding: 0 7%; color: #fff4cf; text-shadow: 0 1px 3px #1a1008; }
.hand-title { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.hand { display: grid; grid-template-columns: repeat(var(--hand-count), minmax(0, 1fr)); flex: 1; align-items: end; justify-items: center; min-width: 0; overflow: visible; padding: 4px 12px 2px; border-radius: 18px; }
.hand:focus { outline: none; }
.hand-group { display: contents; }
.hand-group-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hand-group--set .hand-group-cards { padding: 0; background: transparent; }
.hand-group-cards { display: contents; }
.hand-group + .hand-group { margin-left: 0; }
.hand .card { width: calc(100% - 2px); max-width: 66px; min-width: 0; height: auto; aspect-ratio: 3 / 5; margin: 0; transform: rotate(var(--hand-tilt, 0deg)) translateY(var(--hand-lift, 0px)); transform-origin: center bottom; }
.hand .card-band { min-height: 14px; padding: 1px 2px; }
.hand .card-family { font-size: 9px; letter-spacing: .01em; }
.hand .card-illustration { min-height: 0; padding: 0 7px; }
.hand .card-name { display: block; flex: none; min-height: 1.25em; max-height: 1.25em; padding: 0 4px; overflow: hidden; font-size: 13px; line-height: 1.25; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.hand .card-season { flex: none; padding: 0 3px 2px; font-size: 9px; }
.hand .card[aria-pressed="true"] { transform: rotate(var(--hand-tilt, 0deg)) translateY(calc(var(--hand-lift, 0px) - 12px)); }
.hand button.card:not(.card--resting):hover { transform: rotate(var(--hand-tilt, 0deg)) translateY(calc(var(--hand-lift, 0px) - 7px)); }
/* The default: names remain readable even with a full nine-card hand. */
body[data-card-size="large"] .hand .card { width: calc(100% - 2px); max-width: 92px; margin: 0; }
body[data-card-size="large"] .hand .card-family { font-size: 11px; }
body[data-card-size="large"] .hand .card-name { font-size: 15px; line-height: 1.1; }
body[data-card-size="large"] .hand .card-season { font-size: 11px; }

/* A drawn ninth card is temporary, not a reason to make every card in the
   hand visibly jump smaller. Desktop hands keep the normal eight-card width;
   the ninth card uses a small, deliberate overlap while staying inside the
   south play field. Phones retain their tighter grid below. */
@media (min-width: 641px) {
  /* The south field is wider than the old hand lane used. Let the hand use
     that real space so eight ingredient cards read as cards, not thumbnails. */
  .player-hand { left: 8%; bottom: 7%; width: 84%; }
  .hand { display: flex; justify-content: center; }
  .hand .card { flex: 0 0 min(74px, calc((100% - 16px) / 8)); width: min(74px, calc((100% - 16px) / 8)); }
  .hand[data-card-count="9"] .card { margin-inline: -4px; }
  body[data-card-size="large"] .hand .card { flex-basis: min(96px, calc((100% - 16px) / 8)); width: min(96px, calc((100% - 16px) / 8)); }
}

/* A card: family band (colour + symbol + name), then the ingredient. */
.card {
  position: relative; display: flex; flex-direction: column; width: 104px; height: 140px; padding: 0; overflow: hidden;
  border-radius: 12px; border: 2px solid var(--edge); background: var(--card); color: var(--card-ink);
  box-shadow: 0 3px 8px var(--shadow); text-align: center; transition: transform .15s ease, box-shadow .15s ease;
}
button.card { cursor: pointer; }
.card-band { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; background: var(--fam); color: var(--fam-ink); }
.card-icon { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-family { font-size: 13px; font-weight: 800; letter-spacing: .04em; }
.card-name { flex: 1; display: grid; place-items: center; padding: 0 6px; font-family: Georgia, serif; font-size: 17px; font-weight: 700; line-height: 1.15; }
.card-season { padding: 0 4px 6px; font-size: 12px; color: var(--card-muted); }
.card-tag { position: absolute; top: 4px; right: 4px; padding: 1px 6px; border-radius: 999px; background: var(--card-ink); color: var(--card); font-size: 11px; font-weight: 800; }
.card {
  /* Keep the painted face, but give it a true paper-card edge and inset frame.
     Without those layers a card reads as a generic clickable illustration. */
  border: 2px solid #5d4329;
  background: linear-gradient(115deg, rgba(255,255,255,.25), transparent 24% 70%, rgba(69,43,21,.16)), repeating-linear-gradient(0deg, rgba(102,73,40,.045) 0 1px, transparent 1px 4px), #efe4c9 url("assets/cards/painted-card-face.png") center / 100% 100% no-repeat;
  background-blend-mode: soft-light, multiply, normal;
  box-shadow: 0 3px 8px var(--shadow), 0 6px 0 rgba(54,35,18,.42), inset 0 0 0 2px rgba(255,249,222,.72), inset 0 0 0 4px rgba(91,62,34,.46);
}
.card > * { position: relative; z-index: 1; }
.card::after { position: absolute; inset: 5px; z-index: 0; border: 1px solid rgba(255,249,220,.55); border-radius: 8px; content: ""; pointer-events: none; }
.card-band {
  flex: none; min-height: 19px; justify-content: center; padding: 2px 4px;
  border-bottom: 1px solid rgba(86,59,35,.55); background: color-mix(in srgb, var(--fam) 24%, rgba(255,249,226,.88)); color: #31442f; text-shadow: 0 1px rgba(255, 250, 224, .72);
}
.card-illustration {
  display: block; flex: 1 1 auto; min-height: 30px; width: 100%; object-fit: contain;
  padding: 2px 12px 0; filter: drop-shadow(0 2px 1px rgba(43, 27, 12, .26));
}
.card-name { flex: none; min-height: 1.2em; margin: 0 4px; padding: 1px 5px; border-top: 1px solid rgba(86,59,35,.34); border-bottom: 1px solid rgba(86,59,35,.3); background: rgba(255,249,226,.7); color: #293525; text-shadow: 0 1px rgba(255, 250, 224, .72); }
.card-season { flex: none; margin: 0 4px 3px; padding: 1px 4px 3px; background: rgba(255,249,226,.48); color: #4f5d46; text-shadow: 0 1px rgba(255, 250, 224, .72); }
.recipe-icon { width: 26px; height: 26px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.card[aria-pressed="true"] { transform: translateY(-10px); box-shadow: 0 0 0 4px var(--accent), 0 8px 16px var(--shadow); }
.card--new { box-shadow: 0 0 0 3px var(--focus), 0 3px 8px var(--shadow); }
.card--resting { cursor: default; }
button.card:not(.card--resting):hover { transform: translateY(-4px); }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.progress-text { margin: 0; text-align: center; color: var(--muted); }

.log summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.log-list { margin: 0; padding-left: 20px; color: var(--muted); font-size: 15px; }
.history-log { max-height: min(48vh, 420px); overflow-y: auto; padding: 8px 12px 8px 30px; border: 1px solid color-mix(in srgb, var(--muted) 42%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--paper) 62%, transparent); }

/* Dialogs */
.dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 24px; background: var(--panel); color: var(--ink); box-shadow: 0 16px 48px var(--shadow); }
.dialog--wide { width: min(900px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(10, 16, 14, .6); }
.dialog-body { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.dialog-body h2 { margin: 0; font-size: 26px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.settings-category-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 4px 0 2px; }
.settings-category-tabs button { min-width: 0; min-height: 46px; padding: 8px; overflow-wrap: anywhere; border: 2px solid color-mix(in srgb, var(--accent) 48%, transparent); border-radius: 11px; background: color-mix(in srgb, var(--accent) 5%, var(--panel)); color: var(--ink); font: inherit; font-weight: 850; cursor: pointer; }
.settings-category-tabs button:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 11%, var(--panel-strong)); }
.settings-category-tabs button[aria-selected="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); box-shadow: 0 5px 14px color-mix(in srgb, var(--accent) 24%, transparent); }
.settings-category-tabs button:focus-visible, .season-keepsake:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.settings-category-panels { min-height: 260px; padding: 4px 2px 0; }
.settings-category { display: flex; flex-direction: column; gap: 13px; padding: 4px 0 12px; animation: settings-panel-in .18s ease-out; }
.settings-category[hidden] { display: none; }
.settings-category-title { margin: 1px 0 -3px; font-family: Georgia, serif; font-size: 20px; }
@keyframes settings-panel-in { from { opacity: .25; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.companion-fill-control { min-width: 160px; }
fieldset { margin: 0; padding: 12px 16px; border: 1px solid color-mix(in srgb, var(--muted) 50%, transparent); border-radius: 16px; display: flex; flex-direction: column; gap: 8px; }
fieldset[hidden], .companion-field[hidden] { display: none; }
legend { padding: 0 6px; font-weight: 800; }
.choice { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding-top: 10px; }
.choice input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--accent); }
.field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.field select { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--muted); background: var(--paper); color: var(--ink); font-weight: 400; }
/* Drawn by hand so every browser shows the same thing: the filled part of the
   track is exactly the volume the label says (--fill, set by the game). */
.field input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; }
.field input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--accent) var(--fill, 20%), var(--panel-strong) var(--fill, 20%)); border: 1px solid var(--muted); }
.field input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--accent) var(--fill, 20%), var(--panel-strong) var(--fill, 20%)); border: 1px solid var(--muted); }
.field input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--accent); border: 3px solid var(--ink); }
.field input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid var(--ink); }
.field input[type="range"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.field output { font-weight: 400; color: var(--muted); }
.settings-note { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.rules { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.keys { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.keys dt { font-weight: 800; }
.keys dd { margin: 0; }
.result-list, .result-recipes { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.result-seasonal-check {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 62%, var(--border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--text);
  font-weight: 700;
  line-height: 1.45;
}
.recipe-book { display: flex; flex-direction: column; gap: 30px; padding: 4px 2px; }
.recipe-book-section { display: flex; flex-direction: column; gap: 16px; }
.recipe-book-section--seasonal { padding: 20px; border: 1px solid color-mix(in srgb, var(--accent) 56%, var(--edge)); border-radius: 22px; background: linear-gradient(135deg, color-mix(in srgb, var(--panel-strong) 89%, var(--accent)) 0%, var(--panel) 78%); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.recipe-book-heading h3 { margin: 2px 0 6px; font-size: clamp(24px, 3.5vw, 31px); }
.recipe-book-heading p:not(.eyebrow) { max-width: 690px; margin: 0; color: var(--muted); line-height: 1.45; }
.seasonal-recipe-window { max-width: none !important; margin-top: 13px !important; padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--accent) 75%, var(--edge)); border-radius: 12px; color: var(--ink) !important; background: color-mix(in srgb, var(--accent) 14%, var(--panel)); font-size: 14px; font-weight: 800; }
.seasonal-keepsakes-window { margin: 12px 0 0; padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--accent) 75%, var(--edge)); border-radius: 12px; color: var(--ink); background: color-mix(in srgb, var(--accent) 14%, var(--panel)); font-size: 14px; font-weight: 800; }
.seasonal-recipe-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.seasonal-recipe-tab { min-height: 44px; padding: 7px 10px; border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--edge)); border-radius: 12px; color: var(--ink); background: var(--panel); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.seasonal-recipe-tab[aria-selected="true"] { color: #16211d; border-color: var(--accent); background: var(--accent); box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 42%, #000); }
.seasonal-recipe-tab:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.seasonal-recipe-chapter { min-width: 0; }
.recipe-book-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 18px; }
.recipe-page { position: relative; display: flex; flex-direction: column; min-height: 346px; padding: 23px 25px 19px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--fam) 68%, #72502b); border-radius: 4px 17px 17px 4px; color: #392b20; background: repeating-linear-gradient(0deg, rgba(107,76,46,.08) 0 1px, transparent 1px 27px), linear-gradient(110deg, #f6e7c6, #fff7df 48%, #edd5a7); box-shadow: 4px 7px 0 rgba(19,28,22,.28), inset 0 0 0 7px rgba(132,91,47,.13), inset 14px 0 13px -15px rgba(54,30,12,.75); }
.recipe-page::before { content: ""; position: absolute; inset: 10px; border: 1px solid color-mix(in srgb, var(--fam) 55%, #8b663e); border-radius: 2px 11px 11px 2px; pointer-events: none; }
.recipe-page--seasonal::after { content: "seasonal supper"; position: absolute; top: 20px; right: -29px; width: 112px; padding: 5px 0; transform: rotate(43deg); color: #fff4d6; background: color-mix(in srgb, var(--fam) 72%, #49301e); box-shadow: 0 2px 4px rgba(0,0,0,.22); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.recipe-page > * { position: relative; z-index: 1; }
.recipe-page-label { margin: 0 0 13px; color: color-mix(in srgb, var(--fam) 76%, #3d2d20); font-size: 11px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.recipe-page h3 { margin: 0 0 16px; color: #472d1d; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: clamp(23px, 3vw, 30px); line-height: 1.08; }
.recipe-page-body { flex: 1; }
.recipe-page h4 { margin: 0 0 7px; color: #704a2b; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.recipe-page-ingredients { margin: 0; padding-left: 23px; color: #3f3022; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: 18px; line-height: 1.52; }
.recipe-page-method { margin: 18px 0 0; color: #4a3425; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: 17px; line-height: 1.48; }
.recipe-page-game-rule { margin: 0 0 16px; padding: 8px 10px; border-left: 3px solid color-mix(in srgb, var(--fam) 74%, #745031); color: #4a3425; background: rgba(255,255,255,.36); font-size: 14px; font-weight: 700; line-height: 1.38; }
.recipe-page-kitchen-note { margin: -2px 0 10px; color: #704a2b; font-size: 14px; font-style: italic; font-weight: 700; }
.recipe-page-safety { margin: 13px 0 0; color: #66412a; font-size: 13px; font-style: italic; line-height: 1.4; }
.recipe-page-footer { margin: 17px 0 0; padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--fam) 48%, #8b663e); color: #72553a; font-size: 13px; font-weight: 700; }
.recipe-page--locked { color: #d8ceb7; background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 27px), linear-gradient(130deg, #38433a, #26382e); box-shadow: 4px 7px 0 rgba(0,0,0,.3), inset 0 0 0 7px rgba(255,255,255,.04); }
.recipe-page--locked::before { border-color: color-mix(in srgb, var(--fam) 42%, #c5b991); }
.recipe-page--locked .recipe-page-label { color: color-mix(in srgb, var(--fam) 62%, #ece1bf); }
.recipe-page--locked h3 { color: #f4ead0; }
.recipe-page-seal { max-width: 250px; margin: 47px auto 0; padding: 18px; border: 1px dashed color-mix(in srgb, var(--fam) 68%, #e9dcba); border-radius: 14px; color: #ece3cc; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: 18px; line-height: 1.42; text-align: center; }
.recipe-page--locked .recipe-page-footer { border-color: rgba(238,225,193,.35); color: #d6cbb1; }
.recipe-page--locked .recipe-page-game-rule { border-color: color-mix(in srgb, var(--fam) 64%, #e9dcba); color: #eee4ce; background: rgba(0,0,0,.12); }
.recipe-page:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }

/* The kitchen is a seasonal collection room first; small notebook sections
   hold the daily goals and totals without competing with the keepsakes. */
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-heading .eyebrow { margin-bottom: 4px; }
.dialog-body section > h3 { margin: 8px 0 0; font-size: 19px; }
.kitchen-dialog { gap: 22px; }
.kitchen-season-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; min-height: 170px; padding: 22px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--edge)); border-radius: 20px; background: linear-gradient(130deg, color-mix(in srgb, var(--panel-strong) 84%, var(--accent)) 0%, var(--panel) 74%); box-shadow: inset 0 1px 0 rgba(255,255,255,.16); }
.kitchen-season-hero h3 { margin: 4px 0 7px; font-size: clamp(23px, 4vw, 31px); }
.kitchen-season-hero p:not(.eyebrow) { max-width: 590px; margin: 0; color: var(--muted); }
.kitchen-season-hero-progress { display: inline-block; margin-top: 12px !important; padding: 4px 10px; border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); border-radius: 999px; color: var(--ink) !important; font-size: 14px; font-weight: 800; }
.kitchen-season-hero-art { position: relative; display: grid; grid-template-columns: minmax(126px, 166px); justify-items: center; gap: 8px; max-width: 260px; }
.kitchen-season-hero-pin { width: min(166px, 26vw); height: min(166px, 26vw); object-fit: contain; filter: drop-shadow(0 8px 7px rgba(0,0,0,.3)); }
.kitchen-season-hero-art--locked .kitchen-season-hero-pin { opacity: .43; filter: grayscale(1) brightness(.78) contrast(.9) drop-shadow(0 7px 6px rgba(0,0,0,.32)); }
.kitchen-season-hero-lock { position: absolute; left: 50%; top: 62px; transform: translateX(-50%); padding: 5px 8px; border: 2px solid var(--paper); border-radius: 999px; color: var(--paper); background: color-mix(in srgb, var(--edge) 86%, #000); font-size: 10px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.36); }
.kitchen-season-family-row { display: flex; justify-content: center; gap: 7px; }
.season-family-chip { display: grid; grid-template-columns: 24px auto; align-items: center; gap: 5px; min-height: 34px; padding: 4px 7px 4px 5px; border: 1px solid color-mix(in srgb, var(--family-tone) 62%, var(--edge)); border-radius: 999px; color: var(--ink); background: color-mix(in srgb, var(--paper) 72%, var(--family-tone)); font-size: 11px; font-weight: 800; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,.16); }
.season-family-art { width: 24px; height: 24px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.22)); }
.kitchen-collection-section { display: flex; flex-direction: column; gap: 12px; }
.kitchen-section-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 18px; }
.kitchen-section-heading h3 { margin: 3px 0 0; font-size: 22px; }
.kitchen-section-heading .settings-note { max-width: 480px; }
.seasonal-shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px; border: 1px solid color-mix(in srgb, var(--edge) 70%, transparent); border-radius: 18px; background: linear-gradient(to bottom, color-mix(in srgb, var(--panel-strong) 78%, transparent) 0 80%, color-mix(in srgb, var(--edge) 30%, var(--panel)) 80% 100%); }
.season-keepsake { display: grid; grid-template-rows: auto auto minmax(92px, 1fr) auto; align-items: start; min-height: 264px; padding: 14px; border: 1px solid color-mix(in srgb, var(--season-tone) 64%, var(--edge)); border-radius: 15px 15px 8px 8px; background: linear-gradient(145deg, color-mix(in srgb, var(--season-tone) 20%, var(--panel-strong)), var(--panel)); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 8px 0 color-mix(in srgb, var(--edge) 38%, var(--panel)), 0 4px 9px rgba(0,0,0,.2); transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease; }
.season-keepsake:hover { transform: translateY(-3px); border-color: var(--season-tone); box-shadow: 0 10px 0 color-mix(in srgb, var(--edge) 38%, var(--panel)), 0 7px 14px rgba(0,0,0,.26); }
.season-keepsake .eyebrow { color: color-mix(in srgb, var(--season-tone) 74%, var(--ink)); font-size: 11px; }
.season-keepsake h4 { margin: 5px 0 8px; font-family: Georgia, serif; font-size: 18px; }
.season-keepsake-pin-frame { position: relative; display: grid; min-height: 126px; place-items: center; margin: 0 0 4px; overflow: hidden; border-radius: 12px; background: radial-gradient(circle at 50% 48%, color-mix(in srgb, var(--season-tone) 24%, transparent), transparent 66%); }
.season-keepsake-pin { width: min(142px, 100%); height: 142px; object-fit: contain; filter: drop-shadow(0 6px 5px rgba(0,0,0,.28)); transition: filter 160ms ease, opacity 160ms ease; }
.season-keepsake-pin-frame--locked .season-keepsake-pin { opacity: .38; filter: grayscale(1) brightness(.78) contrast(.9) drop-shadow(0 4px 4px rgba(0,0,0,.3)); }
.season-keepsake-lock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 5px 8px; border: 2px solid var(--paper); border-radius: 999px; color: var(--paper); background: color-mix(in srgb, var(--edge) 86%, #000); font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; box-shadow: 0 2px 6px rgba(0,0,0,.36); }
.season-keepsake-status { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.3; }
.season-keepsake-timing { display: inline-block; margin-top: 4px; color: var(--ink); font-size: 12px; font-weight: 850; }
.season-keepsake--earned { border-width: 2px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent), 0 8px 0 color-mix(in srgb, var(--edge) 42%, var(--panel)), 0 6px 15px rgba(0,0,0,.25); }
.season-keepsake--earned .season-keepsake-status { color: var(--ink); font-weight: 800; }
.occasion-stamps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.occasion-stamp { position: relative; min-height: 142px; padding: 16px 14px 14px 70px; border: 1px dashed color-mix(in srgb, var(--edge) 78%, var(--muted)); border-radius: 15px; background: color-mix(in srgb, var(--panel-strong) 78%, transparent); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.occasion-stamp:hover { border-color: var(--accent); transform: translateY(-2px); }
.occasion-stamp:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.occasion-stamp h4 { margin: 0 0 5px; font-size: 17px; }
.occasion-stamp p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.35; }
.occasion-stamp-seal { position: absolute; left: 14px; top: 17px; display: grid; width: 43px; height: 43px; place-items: center; border: 2px solid var(--edge); border-radius: 50%; color: var(--edge); background: var(--paper); font-family: Georgia, serif; font-size: 21px; font-weight: 800; box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--edge) 14%, transparent); }
.occasion-stamp-status { margin-top: 9px !important; color: var(--ink) !important; font-weight: 800; }
.occasion-stamp--earned { border-style: solid; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel-strong)); }
.occasion-stamp--earned .occasion-stamp-seal { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.seasonal-weekly-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.seasonal-weekly-now { margin: 0; padding: 10px 13px; border: 2px solid var(--accent); border-radius: 13px; color: var(--ink); background: color-mix(in srgb, var(--accent) 14%, var(--panel-strong)); font-weight: 850; line-height: 1.4; }
.seasonal-weekly-pin { position: relative; display: grid; grid-template-columns: 142px 1fr; grid-template-rows: auto 1fr auto; column-gap: 16px; min-height: 172px; padding: 16px; overflow: hidden; border: 1px solid color-mix(in srgb, #b68a35 62%, var(--edge)); border-radius: 16px; background: linear-gradient(145deg, color-mix(in srgb, #e9c772 13%, var(--panel-strong)), var(--panel)); }
.seasonal-weekly-pin h3 { margin: 9px 0 5px; font-family: Georgia, serif; font-size: 20px; }
.seasonal-weekly-pin p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.35; }
.seasonal-weekly-art { grid-row: 1 / span 3; display: block; width: 142px; height: 142px; align-self: center; background-repeat: no-repeat; background-size: 200% 200%; filter: drop-shadow(0 7px 6px rgba(0,0,0,.29)); }
.seasonal-weekly-art--kitchen-book, .seasonal-weekly-art--kitchen-ladle, .seasonal-weekly-art--kitchen-basket, .seasonal-weekly-art--kitchen-soup { background-image: url("assets/seasonal-keepsakes/harvest-kitchen-keepsakes-sheet.png"); }
.seasonal-weekly-art--weekly-tomatoes, .seasonal-weekly-art--weekly-wheat, .seasonal-weekly-art--weekly-mushrooms, .seasonal-weekly-art--weekly-recipe { background-image: url("assets/seasonal-keepsakes/harvest-weekly-keepsakes-sheet.png"); }
.seasonal-weekly-art--kitchen-book, .seasonal-weekly-art--weekly-tomatoes { background-position: 0 0; }
.seasonal-weekly-art--kitchen-ladle, .seasonal-weekly-art--weekly-wheat { background-position: 100% 0; }
.seasonal-weekly-art--kitchen-basket, .seasonal-weekly-art--weekly-mushrooms { background-position: 0 100%; }
.seasonal-weekly-art--kitchen-soup, .seasonal-weekly-art--weekly-recipe { background-position: 100% 100%; }
.seasonal-weekly-art--spring, .seasonal-weekly-art--summer, .seasonal-weekly-art--autumn, .seasonal-weekly-art--winter { background-size: 400% 400%; background-position: var(--sprite-x) var(--sprite-y); }
.seasonal-weekly-art--spring { background-image: url("assets/seasonal-keepsakes/harvest-spring-weekly-pins.png"); }
.seasonal-weekly-art--summer { background-image: url("assets/seasonal-keepsakes/harvest-summer-weekly-pins.png"); }
.seasonal-weekly-art--autumn { background-image: url("assets/seasonal-keepsakes/harvest-autumn-weekly-pins.png"); }
.seasonal-weekly-art--winter { background-image: url("assets/seasonal-keepsakes/harvest-winter-weekly-pins.png"); }
.seasonal-weekly-pin:not(.seasonal-weekly-pin--earned) .seasonal-weekly-art { opacity: .38; filter: grayscale(1) brightness(.78) contrast(.9) drop-shadow(0 5px 5px rgba(0,0,0,.3)); }
.seasonal-weekly-pin--earned { border-width: 2px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent), 0 5px 12px rgba(0,0,0,.24); }
.seasonal-weekly-pin--active { border: 2px solid var(--accent); background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 16%, var(--panel-strong)), var(--panel)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 26%, transparent), 0 7px 16px rgba(0,0,0,.26); }
.seasonal-weekly-status { align-self: end; color: var(--ink) !important; font-weight: 800; }
.seasonal-weekly-lock { position: absolute; left: 86px; top: 86px; transform: translate(-50%, -50%); padding: 5px 8px; border: 2px solid var(--paper); border-radius: 999px; color: var(--paper); background: color-mix(in srgb, var(--edge) 86%, #000); font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; box-shadow: 0 2px 6px rgba(0,0,0,.36); }
.kitchen-notebook { display: grid; grid-template-columns: minmax(190px, .7fr) minmax(0, 2fr); gap: 16px; padding: 17px; border: 1px solid color-mix(in srgb, var(--muted) 46%, transparent); border-radius: 17px; background: color-mix(in srgb, var(--panel-strong) 82%, transparent); }
.kitchen-notebook h3 { margin: 3px 0 6px; font-size: 21px; }
.kitchen-notebook--milestones { grid-template-columns: 1fr; }
.kitchen-notebook-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px 24px; padding: 2px 3px 13px; border-bottom: 2px solid color-mix(in srgb, var(--edge) 58%, transparent); }
.kitchen-notebook-heading .settings-note { margin: 0; font-weight: 750; text-align: right; }
.challenge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.daily-card { position: relative; min-height: 132px; padding: 13px 12px 12px 42px; overflow: hidden; border: 2px solid color-mix(in srgb, var(--accent) 33%, var(--edge)); border-radius: 13px; background: color-mix(in srgb, var(--accent) 6%, var(--paper)); }
.daily-card-mark { position: absolute; left: 10px; top: 12px; display: grid; width: 23px; height: 23px; place-items: center; border: 2px solid var(--edge); border-radius: 50%; color: var(--ink); background: var(--panel); font-size: 12px; font-weight: 900; }
.daily-card h4 { margin: 0 0 5px; font-size: 15px; }
.daily-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.3; }
.daily-card-progress { margin-top: 8px !important; color: var(--ink) !important; font-weight: 900; }
.daily-card-fill { position: absolute; left: 12px; right: 12px; bottom: 10px; height: 5px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--muted) 26%, transparent); }
.daily-card-fill::after { content: ""; display: block; width: var(--daily-progress); height: 100%; border-radius: inherit; background: var(--accent); }
.daily-card--complete { border-color: #b68a35; background: color-mix(in srgb, #edcb72 20%, var(--paper)); }
.daily-card--complete::after { content: "✓ DAILY"; position: absolute; right: 7px; top: 7px; padding: 3px 5px; border: 2px solid #8d6421; border-radius: 6px; color: #704c16; background: #ffebad; font-size: .56rem; font-weight: 900; letter-spacing: .07em; transform: rotate(4deg); }
.achievement-grid { display: flex; flex-direction: column; gap: 20px; }
.achievement-group { display: flex; flex-direction: column; gap: 9px; }
.achievement-group-title { margin: 0; padding-bottom: 6px; border-bottom: 1px solid color-mix(in srgb, var(--muted) 48%, transparent); color: var(--accent); font-size: 17px; letter-spacing: .04em; }
.achievement-group-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(224px, 1fr)); gap: 14px; }
.recipe-milestone { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto 1fr auto; min-height: 224px; padding: 18px 18px 15px; overflow: hidden; border: 2px solid #9a7d4d; border-radius: 5px 5px 18px 18px; background: repeating-linear-gradient(0deg, rgba(116, 83, 40, .07) 0 1px, transparent 1px 29px), linear-gradient(135deg, #fff7df, #e8cf9b); box-shadow: 0 6px 0 rgba(59, 43, 24, .18), inset 0 0 0 5px rgba(129, 88, 39, .12); color: #382817; }
.recipe-milestone::before { content: ""; position: absolute; inset: 9px; border: 1px dashed rgba(121, 82, 37, .48); border-radius: 2px 2px 13px 13px; pointer-events: none; }
.recipe-milestone h4 { position: relative; z-index: 1; grid-column: 1; margin: 6px 0 8px; color: #382817; font-family: Georgia, serif; font-size: 21px; }
.recipe-milestone p { position: relative; z-index: 1; margin: 0; color: #654c2e; font-size: 14px; line-height: 1.45; }
.recipe-milestone-kicker { grid-column: 1; color: #8a5f23 !important; font-size: 10px !important; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.recipe-milestone-seal { position: relative; z-index: 1; grid-column: 2; grid-row: 1 / span 2; display: grid; width: 38px; height: 38px; place-items: center; border: 2px solid #8b6227; border-radius: 50%; color: #704716; background: #f8dfa0; font-family: Georgia, serif; font-size: 20px; font-weight: 900; transform: rotate(5deg); }
.recipe-milestone-status { align-self: end; margin-top: 11px !important; padding-top: 9px; border-top: 1px solid rgba(121, 82, 37, .38); color: #704716 !important; font-weight: 800; }
.recipe-milestone--earned { border-color: #9a6a21; background: repeating-linear-gradient(0deg, rgba(116, 83, 40, .055) 0 1px, transparent 1px 27px), linear-gradient(135deg, #fff9df, #f0d487); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent), 0 5px 0 rgba(59, 43, 24, .18), inset 0 0 0 4px rgba(129, 88, 39, .12); }
.recipe-milestone--earned .recipe-milestone-seal { color: #fff5d8; background: #7b9d55; border-color: #4e7036; }
.progress-card { min-height: 112px; padding: 12px; border: 1px solid color-mix(in srgb, var(--muted) 55%, transparent); border-radius: 14px; background: var(--panel-strong); }
.progress-card h4, .progress-card p { margin: 0; }
.progress-card h4 { font-size: 16px; }
.progress-card p + p { margin-top: 7px; color: var(--muted); font-size: 14px; }
.progress-card--complete { border-color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.progress-card--complete p:last-child { color: var(--ink); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; margin: 0; padding: 12px; border-radius: 14px; background: var(--panel-strong); }
.stats-grid dt { font-size: 13px; color: var(--muted); }
.stats-grid dd { margin: 0; font-size: 18px; font-weight: 800; }
.update-panel, .about-panel { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 14px; padding: 12px; border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 14px; }
.update-panel h3, .about-panel h3 { flex-basis: 100%; }
.update-panel .settings-note, .about-panel .settings-note { flex: 1 1 260px; }
.version-panel { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; padding: 14px; border: 1px solid color-mix(in srgb, var(--accent) 52%, var(--edge)); border-radius: 14px; background: color-mix(in srgb, var(--accent) 7%, var(--panel-strong)); }
.version-panel .eyebrow { margin-bottom: 3px; }
.version-panel h4 { margin: 0; font-family: Georgia, serif; font-size: 18px; }
.version-panel output { color: var(--accent); font-family: system-ui, sans-serif; font-size: 15px; font-weight: 850; }
.version-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.changelog-body { max-height: 45vh; overflow: auto; }
.changelog-body ul { margin: 0; padding-left: 22px; }
.changelog-body li { margin: 10px 0; line-height: 1.45; }

/* Supper Tables is an explicitly test-gated lobby until the free Worker has
   an authenticated same-origin binding. It still follows the game's calm,
   readable controls rather than becoming an unrelated dashboard. */
.lobby-start { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.lobby-card, .table-chat { padding: 16px; border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 16px; background: var(--panel-strong); }
.lobby-card { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
.lobby-card h3, .lobby-card p, .table-chat h3 { margin: 0; }
.lobby-card .primary-button, .lobby-card .quiet-button { align-self: flex-start; }
.public-table-browser { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--muted) 46%, transparent); }
.public-table-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.public-table-heading h4 { margin: 0; font-size: 17px; }
.public-table-heading .quiet-button { min-height: 38px; padding-inline: 12px; }
.public-table-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.public-table-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 8px 10px; border: 1px solid color-mix(in srgb, var(--muted) 52%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--paper) 72%, transparent); }
.public-table-list li:only-child { justify-content: flex-start; color: var(--muted); font-size: 14px; }
.public-table-list .quiet-button { min-height: 38px; padding-inline: 12px; white-space: nowrap; }
.lobby-room-heading, .table-chat-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.lobby-room-heading h3 { margin: 0; }
.invite-code { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.invite-code output { padding: 7px 10px; border-radius: 9px; background: var(--paper); color: var(--ink); font-family: ui-monospace, "Cascadia Code", monospace; font-size: 18px; letter-spacing: .08em; }
.lobby-seats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
.lobby-seat { min-height: 90px; padding: 12px; border-radius: 14px; border: 1px dashed var(--muted); display: flex; flex-direction: column; gap: 5px; }
.lobby-seat--taken { border-style: solid; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.lobby-seat span { color: var(--muted); font-size: 14px; line-height: 1.35; }
.table-chat { margin-top: 18px; }
.table-chat-dock { position: absolute; right: clamp(14px, 2vw, 28px); right: calc(100% + clamp(14px, 2vw, 28px)); bottom: 5%; z-index: 8; box-sizing: border-box; width: 236px; padding: 12px; border: 1px solid rgba(104, 213, 187, .62); border-radius: 12px; background: linear-gradient(180deg, rgba(24, 52, 42, .98), rgba(12, 30, 24, .98)); box-shadow: 0 10px 28px rgba(0, 0, 0, .42); }
.table-chat-dock[hidden] { display: none; }
.table-chat-dock h2 { margin: 0; font-size: 18px; }
.table-chat-dock .eyebrow { font-size: 10px; }
.table-chat-dock .quiet-button { min-height: 34px; padding: 0 9px; font-size: 13px; }
.table-chat-dock #tableChatDockContent { position: static; width: auto; margin-top: 12px; padding: 10px 0 0; border-top: 1px solid rgba(205, 238, 223, .22); }
.pwa-table-chat-slot { display: none; }
.table-chat-dock .settings-note { margin: 0; font-size: 12px; line-height: 1.35; }
.table-chat-dock .chat-messages { min-height: 72px; max-height: min(240px, calc(var(--size) * .38)); margin: 10px 0; padding: 8px 10px; border: 1px solid rgba(205, 238, 223, .16); border-radius: 8px; background: rgba(5, 17, 13, .5); color: #f8f0e3; }
.table-chat-dock .chat-form { gap: 6px; }
.table-chat-dock .chat-form input { min-width: 0; min-height: 38px; padding-inline: 9px; border-width: 1px; border-radius: 8px; }
.table-chat-dock .chat-form .primary-button { min-height: 38px; padding-inline: 10px; border-radius: 8px; }
.table-chat-heading { margin-bottom: 10px; }
.chat-messages { min-height: 3em; max-height: 180px; margin: 12px 0; padding: 10px 12px 10px 30px; overflow-y: auto; border-radius: 12px; background: var(--paper); }
.chat-messages:empty::after { content: "No messages yet."; color: var(--muted); font-size: 14px; }
.chat-report-button { margin-left: 8px; padding: 3px 7px; border: 1px solid currentColor; border-radius: 999px; color: var(--muted); background: transparent; font: inherit; font-size: .8rem; }
.chat-report-button:hover, .chat-report-button:focus-visible { color: var(--ink); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.chat-form { display: flex; gap: 8px; }
.chat-form input, .field input { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 2px solid var(--muted); background: var(--paper); color: var(--ink); }

@media (max-width: 640px) {
  /* An installed game needs its own compact phone chrome. The shared Menu
     keeps Mahjong's familiar full-screen-sheet behavior instead of turning
     the header into a second control bar. */
  body { min-height: 100dvh; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); font-size: 18px; }
  main { padding: 8px 8px max(16px, env(safe-area-inset-bottom)); }
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 12px; padding: 4px 4px 10px; }
  .topbar h1 { font-size: clamp(30px, 9vw, 40px); }
  .topbar .eyebrow { font-size: clamp(11px, 3.5vw, 14px); }
  .mobile-menu-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 14px; border: 2px solid var(--accent); border-radius: 999px; color: var(--ink); background: color-mix(in srgb, var(--panel) 86%, transparent); font: inherit; font-weight: 800; }
  .harvest-seasonal-actions { display: none; }
  .mobile-menu-button { margin-left: 0; }
  .harvest-menu-dialog[open] { position: fixed; inset: auto 0 0; width: min(100%, 560px); max-width: none; max-height: min(70dvh, 420px); margin: auto auto 0; border-radius: 24px 24px 0 0; }
  .harvest-menu-sheet { max-height: inherit; overflow-y: auto; padding: 17px max(16px, env(safe-area-inset-right)) max(18px, calc(env(safe-area-inset-bottom) + 12px)) max(16px, env(safe-area-inset-left)); }
  .harvest-menu-actions #recipeBookButton, .harvest-menu-actions #todayButton, .harvest-menu-actions #kitchenButton { display: inline-flex; }
  .harvest-menu-actions .round-button { min-height: 48px; font-size: 16px; }
  .gentle-games-dialog[open] { position: fixed; inset: auto 0 0; width: min(100%, 560px); max-width: none; margin: auto auto 0; border-radius: 24px 24px 0 0; }
  /* The installed app has one job while a supper is under way: leave the
     table visible. Keep the game name and menu, but retire the decorative
     eyebrow and desktop-sized header until the player returns to the welcome
     screen. This mirrors Mahjong's compact active-game shell without making
     Harvest's board or ingredient cards any smaller. */
  html[data-harvest-mobile-runtime="true"] body[data-harvest-table-active="true"] main { padding-top: max(6px, env(safe-area-inset-top)); }
  html[data-harvest-mobile-runtime="true"] body[data-harvest-table-active="true"] .topbar { min-height: 42px; padding: 0 2px 5px; align-items: center; }
  html[data-harvest-mobile-runtime="true"] body[data-harvest-table-active="true"] .topbar .eyebrow { display: none; }
  html[data-harvest-mobile-runtime="true"] body[data-harvest-table-active="true"] .topbar h1 { font-size: clamp(22px, 6.6vw, 30px); line-height: 1; }
  html[data-harvest-mobile-runtime="true"] body[data-harvest-table-active="true"] .mobile-menu-button { min-height: 40px; padding-inline: 12px; }
  html[data-harvest-mobile-runtime="true"] body[data-harvest-table-active="true"] .status-row { min-height: 24px; padding-block: 1px; font-size: 14px; }
  html[data-harvest-mobile-runtime="true"] body[data-display-mode="standalone"][data-harvest-table-active="true"] main { padding-top: max(8px, calc(env(safe-area-inset-top) + 4px)); }
  .status-row { gap: 2px 8px; padding-inline: 4px; font-size: 15px; }
  .table { gap: 12px; }
  .round-table { --available-table-height: var(--harvest-mobile-table-size, calc(100dvh - 250px)); --size: min(calc(100vw - 16px), var(--available-table-height)); }
  .intro { min-height: 300px; margin: 24px auto 36px; padding: 28px 22px; }
  .intro h2 { font-size: clamp(28px, 8vw, 34px); }
  .card, .pile-back, .pile-face--empty { width: 74px; height: 108px; }
  .card-band { padding: 6px 2px 4px; }
  .card-name { font-size: 14px; padding: 0 3px; }
  .card-season { font-size: 11px; }
  .hand-group-cards { gap: 6px; }
  .card-icon { width: 22px; height: 22px; }
  .card-family { font-size: 11px; letter-spacing: 0; }
  .hand { display: flex; justify-content: center; padding: 3px 0 1px; }
  .player-hand { left: 5%; bottom: -2%; width: 90%; }
  .hand-group + .hand-group { margin-left: 0; }
  /* Keep cards readable on a phone: the hand uses a deliberate fan instead
     of shrinking every card to one eighth of the south field. The card faces
     remain inside the table at every narrow width, including the temporary
     ninth card after drawing. */
  .hand .card { flex: 0 0 clamp(40px, 12.5vw, 52px); width: clamp(40px, 12.5vw, 52px); max-width: none; margin-inline: -4px; }
  body[data-card-size="large"] .hand .card { flex-basis: clamp(44px, 13vw, 54px); width: clamp(44px, 13vw, 54px); max-width: none; margin-inline: -5px; }
  .hand[data-card-count="9"] .card { margin-inline: -6px; }
  body[data-card-size="large"] .hand[data-card-count="9"] .card { margin-inline: -7px; }
  .hand .card-name { min-height: 1.25em; max-height: 1.25em; padding-inline: 1px; font-size: 9px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
  body[data-card-size="large"] .hand .card-name { font-size: 10px; }
  .hand .card-season { display: none; }
  .player-hand-meta { display: none; }
  /* Phone tables reserve the pot's middle for the draw pile. Each discard
     stays in its own outer lane, small enough to read without crossing into
     that shared centre. The draw pile deliberately layers above the lanes as
     a final guard against an overlap at very narrow widths. */
  .centre { z-index: 6; }
  .pile--draw { position: relative; z-index: 1; transform: translateY(18px); }
  .pile--draw .pile-label { position: absolute; left: 50%; bottom: 3px; padding: 0 4px; transform: translateX(-50%); white-space: nowrap; font-size: 9px; line-height: 1.05; }
  .pile--draw .pile-count { font-size: 8px; }
  .card.card--mini { width: clamp(36px, 10vw, 40px); height: clamp(48px, 13vw, 52px); aspect-ratio: auto; }
  .card--mini .card-band { padding: 1px; }
  .card--mini .card-icon { display: none; }
  .card--mini .card-family { overflow: hidden; font-size: 7px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
  .card--mini .card-illustration { padding: 0 3px; }
  .card--mini .card-name { display: none; }
  .card--mini .card-season { display: none; }
  .discard-lane--north { --discard-y: 29% !important; }
  .discard-lane--west { --discard-x: 30% !important; }
  .discard-lane--east { --discard-x: 70% !important; }
  .discard-lane--south { --discard-y: 69% !important; }
  .round-table { padding: 0; border-width: 0; }
  .seat { gap: 3px; }
  .seat-plate { padding: 3px 6px; }
  .seat-name { font-size: 14px; }
  .seat-detail, .seat-compass { display: none; }
  .seat-back { width: 22px; height: 32px; border-width: 1.5px; }
  .seat--north .seat-back { width: 24px; height: 35px; }
  .seat-discard { padding: 2px; gap: 4px; min-height: 0; }
  .seat-discard-label { display: none; }
  .pile--draw .pile-back { width: 44px; height: 60px; border-width: 2px; }
  .pile--draw .pile-label { font-size: 11px; }
  .round-button { padding: 0 14px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kitchen-season-hero { grid-template-columns: 1fr; padding: 18px; }
  .kitchen-season-hero-art { justify-content: flex-start; max-width: none; }
  .season-family-chip { width: min(45%, 108px); }
  .seasonal-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; }
  .season-keepsake { min-height: 164px; padding: 11px; }
  .occasion-stamps, .achievement-group-cards, .seasonal-weekly-grid { grid-template-columns: 1fr; }
  /* A weekly pin must not reserve half a narrow phone card for desktop-sized
     art. The compact left mark leaves a real reading column for its title,
     instruction and status. */
  .seasonal-weekly-pin { grid-template-columns: 72px minmax(0, 1fr); min-height: 126px; padding: 12px; column-gap: 10px; }
  .seasonal-weekly-art { width: 72px; height: 72px; }
  .seasonal-weekly-pin h3 { margin-top: 4px; font-size: 18px; }
  .seasonal-weekly-lock { left: 48px; top: 48px; font-size: 9px; }
  /* Course results are read between turns. Keep the summary, the seasonal
     outcome and the next action in one phone-sized sheet; unusually long
     recipe lists may scroll inside their own detail area without hiding the
     leave/continue controls. */
  .course-dialog { width: min(560px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); }
  .course-dialog .dialog-body { max-height: calc(100dvh - 20px); gap: 10px; padding: 16px; overflow: hidden; }
  .course-dialog .dialog-body h2 { font-size: clamp(21px, 6.2vw, 25px); line-height: 1.15; }
  .course-dialog #courseContent { display: flex; flex: 1 1 auto; flex-direction: column; gap: 8px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
  .course-dialog .result-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 0; list-style: none; }
  .course-dialog .result-list li { padding: 7px 8px; border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent); border-radius: 9px; background: color-mix(in srgb, var(--panel-strong) 80%, transparent); font-size: 13px; line-height: 1.3; }
  .course-dialog .result-seasonal-check { margin: 0; padding: 8px 10px; font-size: 13px; line-height: 1.32; }
  .course-dialog #courseContent h3 { margin: 1px 0 -2px; font-size: 16px; }
  .course-dialog .result-recipes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 0; list-style: none; }
  .course-dialog .result-recipes li { padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--edge) 13%, var(--panel)); font-size: 12px; line-height: 1.25; }
  .course-dialog .dialog-actions { flex-wrap: nowrap; justify-content: stretch; gap: 8px; }
  .course-dialog .dialog-actions button { flex: 1 1 0; min-width: 0; min-height: 42px; padding-inline: 10px; font-size: 14px; }
  .recipe-book-section--seasonal { padding: 14px; }
  .seasonal-recipe-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recipe-book-pages { grid-template-columns: 1fr; }
  .recipe-page { min-height: 320px; padding: 21px 22px 18px; }
  .kitchen-notebook { grid-template-columns: 1fr; padding: 14px; }
  .challenge-grid { grid-template-columns: 1fr; }
  .lobby-start { grid-template-columns: 1fr; }
  .lobby-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-form { flex-wrap: wrap; }
  .table-chat-dock { left: 1%; right: auto; bottom: 2%; width: 29%; padding: 6px 7px; }
  .table-chat-dock #tableChatDockContent { width: min(280px, calc(var(--size) * .56)); }
  .pwa-table-chat-slot:not([hidden]) { display: block; width: min(1120px, 100%); margin-inline: auto; }
  .pwa-table-chat-slot .table-chat-dock { position: static; width: 100%; box-sizing: border-box; margin: 0; padding: 10px 12px; }
  .pwa-table-chat-slot .table-chat-dock #tableChatDockContent { position: static; width: auto; box-sizing: border-box; margin-top: 10px; padding: 10px; box-shadow: none; }
  .pwa-table-chat-slot .table-chat-dock h2 { font-size: 17px; }
  .pwa-table-chat-slot .table-chat-dock .eyebrow { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  body:not([data-motion="full"]) * { transition: none !important; animation: none !important; }
}
body[data-motion="reduced"] * { transition: none !important; animation: none !important; }

/* Keep every interaction readable in Windows High Contrast / forced-colors.
   The decorative table art may disappear there; named controls and cards do not. */
@media (forced-colors: active) {
  body { background: Canvas; color: CanvasText; }
  :focus-visible { outline: 4px solid Highlight !important; outline-offset: 3px; }
  .round-table { background: none; border: 2px solid CanvasText; }
  .pot, .pot-fill, .pot-steam, .seasonal-weekly-art { display: none; }
  .seat-plate, .pile-back, .card, .hand-group--set .hand-group-cards,
  .intro, .dialog-body, .log, .progress-text, .kitchen-season-hero,
  .seasonal-shelf, .season-keepsake, .occasion-stamp, .seasonal-weekly-pin, .kitchen-notebook,
  .daily-card, .recipe-milestone, .settings-category-tabs button {
    background: Canvas;
    color: CanvasText;
    border-color: CanvasText;
    box-shadow: none;
  }
  .card-band, .pile--draw .pile-label, .primary-button, .quiet-button, .round-button {
    background: ButtonFace;
    color: ButtonText;
    border-color: ButtonText;
    box-shadow: none;
  }
  .card-season, .seat-detail, .seat-compass, .pile-count { color: CanvasText; }
  .card-icon { stroke: currentColor; }
}
