:root {
  color-scheme: light;
  font-family: ui-rounded, "Nunito", "Avenir Next", system-ui, sans-serif;
  background: var(--gc-paper-hi);
  color: var(--gc-ink);
  -webkit-tap-highlight-color: transparent;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 18% 0%, var(--gc-paper-hi) 0 17%, transparent 42%),
    var(--gc-paper-hi);
}

button, a { font: inherit; }

button {
  min-height: 44px;
  border: 1px solid var(--gc-muted);
  border-radius: 14px;
  padding: 9px 14px;
  color: inherit;
  background: var(--gc-paper-hi);
  cursor: pointer;
  touch-action: manipulation;
}

button:focus-visible, a:focus-visible { outline: 3px solid var(--gc-ink); outline-offset: 3px; }
button:disabled { opacity: .42; cursor: not-allowed; }

.shell {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(68px + env(safe-area-inset-top)) 12px calc(22px + env(safe-area-inset-bottom));
}

.topbar, .top-actions, .level-row, .map-heading, .controls, .result-actions {
  display: flex;
  align-items: center;
}

.topbar { min-height: 44px; justify-content: space-between; gap: 8px; }
.top-actions { gap: 5px; }

.lab-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gc-green);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.quiet-button, .icon-button {
  min-height: 44px;
  border-color: transparent;
  padding: 7px 9px;
  background: transparent;
  color: var(--gc-muted);
  font-size: 13px;
  font-weight: 750;
}

.icon-button { width: 44px; padding: 0; font-size: 21px; }

.title-screen { padding: clamp(58px, 13vh, 118px) 14px 32px; text-align: center; }
.eyebrow { margin: 0 0 7px; color: var(--gc-muted); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(32px, 10vw, 45px); line-height: 1.05; letter-spacing: -.045em; }
.subtitle { max-width: 32ch; margin: 17px auto 25px; color: var(--gc-muted); font-size: 16px; line-height: 1.45; }
.instruction { min-height: 1.4em; margin: 11px 2px; color: var(--gc-muted); font-size: 14px; line-height: 1.4; }
.new-line { display:flex; align-items:baseline; gap:7px; min-height:1.4em; margin:7px 2px 6px; color:var(--gc-green); font-size:13px; font-weight:750; line-height:1.35; }
.new-line[hidden] { display:none; }
.new-line strong { padding:2px 5px 1px; border-radius:4px; color:var(--gc-paper-hi); background:var(--gc-green); font-size:10px; letter-spacing:.08em; line-height:1.15; }
.soil-progress { display:grid; gap:5px; margin:7px 2px 10px; color:var(--gc-green); font-size:12px; font-variant-numeric:tabular-nums; }
.soil-progress > div:first-child { display:flex; justify-content:space-between; gap:12px; }.soil-progress strong { font-size:12px; }
.soil-progress-track { height:8px; overflow:hidden; border:1px solid var(--gc-muted); border-radius:99px; background:var(--gc-paper-hi); }.soil-progress-fill { display:block; width:0; height:100%; border-radius:inherit; background:var(--gc-green); transition:width .22s ease-out; }
.packet-tray { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; margin: 10px 0 12px; }
.seed-packet, .album-packet { position: relative; min-height: 66px; overflow: hidden; border: 1px solid var(--gc-muted); border-radius: 4px 4px 11px 11px; background: linear-gradient(135deg,var(--gc-paper-hi),var(--gc-paper-hi)); box-shadow: 0 2px 0 var(--gc-muted); text-align: left; }
.seed-packet { padding: 8px 9px 6px 27px; transform: translateY(0); }
.seed-packet.selected { border: 3px solid var(--gc-green); padding: 6px 7px 4px 25px; transform: translateY(-4px); box-shadow: 0 6px 0 var(--gc-muted); }
.seed-packet strong, .album-packet strong { display:block; font-size: 13px; letter-spacing:.04em; }.seed-packet small { color:var(--gc-green); font-weight:800; }
.packet-sprig { position:absolute; left:10px; bottom:9px; width:12px; height:34px; border-left:2px solid var(--gc-green); transform:rotate(-8deg); }.packet-sprig:before,.packet-sprig:after { content:""; position:absolute; width:12px; height:5px; border:1px solid var(--gc-green); border-radius:100% 0; }.packet-sprig:before{top:8px;left:-1px;transform:rotate(-25deg)}.packet-sprig:after{top:18px;left:-5px;transform:rotate(28deg)}
.garden-links { display:flex; gap:8px; margin-top:10px; }.garden-links[hidden] { display:none; }.garden-links button { flex:1; font-size:13px; }
.packet-album { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }.album-packet { min-height:132px; padding:18px 12px 8px 36px; }.album-packet p { margin:7px 0 0; font-size:13px; line-height:1.25; }.album-packet.locked { filter:grayscale(1); opacity:.62; }.notebook-list { display:grid; gap:9px; }.notebook-bed { min-height:52px; display:flex; align-items:center; justify-content:space-between; padding:10px 14px; border:1px solid var(--gc-muted); background:var(--gc-paper-hi); transform:rotate(-.4deg); }.notebook-bed span { color:var(--gc-green); font-size:13px; }
.title-screen .subtitle, .title-screen .instruction { display: none; }

.primary-button {
  border-color: var(--gc-green);
  color: var(--gc-paper-hi);
  background: var(--gc-green);
  box-shadow: 0 4px 0 var(--gc-green);
  font-weight: 850;
}
.primary-button:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--gc-green); }

#play-screen { padding: 12px 0 0; }
.level-row { justify-content: space-between; gap: 12px; padding: 0 3px; }
.level-name { margin: 0; font-size: 18px; font-weight: 850; }
.move-count { margin: 0; color: var(--gc-muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.board-shell {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--gc-muted);
  border-radius: 22px;
  background: var(--gc-paper-hi);
  box-shadow: 0 6px 20px rgb(41 37 31 / .2);
}

#board { display: block; width: 100%; height: auto; touch-action: none; user-select: none; }
.message { min-height: 1.4em; margin: 11px 5px 6px; color: var(--gc-muted); font-size: 14px; line-height: 1.35; }
.message.refused { color: var(--gc-straw); }

.controls { justify-content: center; gap: 9px; padding: 8px 0 11px; }
.controls button { min-width: 92px; font-weight: 750; }

.result-card {
  margin: 4px 0 12px;
  padding: 20px 16px 16px;
  border: 1px solid var(--gc-muted);
  border-radius: 20px;
  background: var(--gc-paper-hi);
  text-align: center;
}
.result-title { margin: 0; color: var(--gc-green); font-size: 24px; font-weight: 900; }
.result-marks { margin: 7px 0 5px; font-size: 16px; font-weight: 800; }
.share-line { min-height: 1.4em; margin: 0 auto 14px; color: var(--gc-green); font-size: 13px; line-height: 1.4; }
.result-actions { justify-content: center; flex-wrap: wrap; gap: 8px; }
.result-actions button { font-weight: 750; }

.map-heading { justify-content: space-between; gap: 15px; padding: 12px 4px 3px; }
.map-heading h1 { font-size: 32px; }
.level-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 18px; }
.level-tile { min-height: 76px; padding: 10px 7px; text-align: left; }
.level-tile strong, .level-tile small { display: block; }
.level-tile strong { font-size: 17px; }
.level-tile small { margin-top: 4px; color: var(--gc-muted); font-size: 11px; line-height: 1.25; }
.level-tile.complete { border-color: var(--gc-green); background: var(--gc-paper-hi); }
.level-chapter { grid-column:1 / -1; margin:11px 1px -1px; padding-top:14px; border-top:1px solid var(--gc-muted); color:var(--gc-green); font-size:14px; font-weight:850; letter-spacing:.04em; }
.daily-bed { display:grid; gap:10px; margin:13px 0 4px; padding:12px; border:1px solid var(--gc-muted); border-radius:15px; background:var(--gc-paper-hi); }.daily-bed > div:first-child { display:flex; justify-content:space-between; gap:10px; align-items:baseline; }.daily-bed strong { color:var(--gc-green); font-size:15px; }.daily-bed small { color:var(--gc-muted); font-size:11px; }.daily-difficulties { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }.daily-difficulties button { min-width:0; min-height:40px; padding:7px 5px; border-radius:10px; font-size:12px; font-weight:800; }.daily-difficulties button:focus-visible, .daily-difficulties button:hover { border-color:var(--gc-green); color:var(--gc-paper-hi); background:var(--gc-green); }

.hand-demo {
  position: absolute;
  z-index: 2;
  display: none;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 50%;
  background: rgb(41 37 31 / .2);
  box-shadow: 0 2px 9px rgb(41 37 31 / .2);
  color: var(--gc-green);
  font-size: 25px;
  line-height: 42px;
  text-align: center;
  pointer-events: none;
}
.hand-demo.running { display: block; animation: hand-pulse 1.8s ease-in-out infinite; }
@keyframes hand-pulse { 0%, 100% { transform: scale(.78); opacity: .15; } 42%, 60% { transform: scale(1); opacity: 1; } }

.success-effect { position: absolute; inset: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.success-effect i { position: absolute; top: 47%; left: 50%; width: 9px; height: 9px; border-radius: 2px; opacity: 0; background: var(--gc-ink); }
.success-effect.on i { animation: confetti .72s ease-out both; }
.success-effect i:nth-child(2) { background: var(--gc-ink); animation-delay: .05s; }
.success-effect i:nth-child(3) { background: var(--gc-straw); animation-delay: .1s; }
.success-effect i:nth-child(4) { background: var(--gc-green); animation-delay: .02s; }
.success-effect i:nth-child(5) { background: var(--gc-ink); animation-delay: .12s; }
@keyframes confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x, 0), var(--y, 0)) rotate(240deg); opacity: 0; } }
.success-effect i:nth-child(1) { --x: -112px; --y: -105px; }.success-effect i:nth-child(2) { --x: 106px; --y: -96px; }.success-effect i:nth-child(3) { --x: 130px; --y: 92px; }.success-effect i:nth-child(4) { --x: -126px; --y: 78px; }.success-effect i:nth-child(5) { --x: 8px; --y: -145px; }

.load-error { margin: 54px 8px; padding: 18px; border: 1px solid var(--gc-straw); border-radius: 14px; background: var(--gc-paper-hi); color: var(--gc-straw); line-height: 1.4; }
.reduced-motion *, .reduced-motion *::before, .reduced-motion *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } }
@media (max-height: 600px) {
  .shell { padding-top:calc(56px + env(safe-area-inset-top)); padding-bottom:calc(12px + env(safe-area-inset-bottom)); }
  #play-screen { padding-top:8px; }
  .soil-progress { margin-top:4px; margin-bottom:6px; }
  .message { margin-top:7px; }
  .controls { padding:6px 0 0; }
}
@media (min-width: 700px) { .shell { margin-top: 18px; min-height: calc(100dvh - 36px); border: 1px solid rgb(41 37 31 / .2); border-radius: 28px; background: rgb(41 37 31 / .2); box-shadow: 0 20px 60px rgb(41 37 31 / .2); } }

/* ---------- One screen (P1FS10, taste/ONE_SCREEN.md; sizes taste/ACCESSIBLE_PLAY.md) ---------- */
/* The masthead and the kicker are one row: the paper's name, then this puzzle (the game's name is in the top bar). */
.paper-row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; padding: 0 3px 4px; border-bottom: 2px solid var(--gc-ink, #29251f); }
.paper-row .masthead { display: contents; }
.paper-row .masthead .issue, .paper-row .masthead .dateline { display: none; }
.paper-row .masthead .paper-name { margin: 0; font-size: 22px; line-height: 1.45; letter-spacing: 0; }
.paper-row .kicker { display: contents; }
.paper-row .kicker p { margin: 0; font-size: 22px; line-height: 1.45; }
html[lang="zh-Hant"] .paper-row .kicker-en, html:not([lang="zh-Hant"]) .paper-row .kicker-zh { display: none; }
/* the paper's name follows the language: the Chinese name only in Chinese, an English name in English (P1GRX02) */
html[lang="zh-Hant"] .paper-name-en, html:not([lang="zh-Hant"]) .paper-name-zh, .paper-row.paper-crowded .paper-name { display: none !important; }
#play-screen.fit .level-row { display: none; }
#play-screen.fit .soil-progress { margin: 6px 0 2px; }
#play-screen.fit .soil-progress strong { font-size: 20px; font-weight: 400; }
#play-screen.fit .soil-progress span { font-size: 24px; font-weight: 700; }
.goal { margin: 4px 2px 6px; font-size: 22px; line-height: 1.45; font-weight: 700; }
html[lang="zh-Hant"] .goal { font-size: 24px; line-height: 1.6; }
#play-screen:not(.fit) .goal { display: none; }
#play-screen.fit { display: flex; flex-direction: column; min-height: calc(100svh - 90px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
#play-screen.fit > * { flex: none; }
#play-screen.fit .board-room { display: flex; justify-content: center; align-items: flex-start; }
#play-screen.fit .board-shell { width: auto; margin: 0 auto; }
#play-screen.fit #board { max-width: 100%; width: auto; height: auto; }
.clue-bar { margin: 6px 2px 0; font-size: 20px; line-height: 1.45; }
.clue-bar b { font-weight: 700; }
.clue-bar[hidden] { display: none; }
.tray-label { margin: 6px 2px 0; font-size: 20px; line-height: 1.45; }
.tray-label[hidden] { display: none; }
#play-screen.fit .controls { margin-top: auto; display: flex; flex-wrap: nowrap; }
#play-screen.fit .controls > * { flex: 1 1 0; }
#play-screen.fit .controls button { width: 100%; min-width: 0; min-height: 48px; font-size: 20px; }
.more { position: relative; }
.more-menu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 12; display: grid; gap: 6px; min-width: 210px; padding: 8px; border: 2px solid var(--gc-ink, #29251f); background: var(--gc-paper-hi, #f6efe0); box-shadow: 2px 2px 0 var(--gc-ink, #29251f); }
.more-menu[hidden] { display: none; }
.more-menu .garden-links { display: grid; gap: 6px; margin: 0; }
.more-menu .garden-links[hidden] { display: none; }
.more-menu button { width: 100%; white-space: nowrap; }
/* The full Across / Down list: a sheet one tap away. */
.clue-sheet { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; background: rgb(41 37 31 / .35); }
.clue-sheet[hidden] { display: none; }
.clue-sheet__panel { width: min(100%, 430px); max-height: 70dvh; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); background: var(--gc-paper-hi, #f6efe0); border-top: 2px solid var(--gc-ink, #29251f); }
.clue-sheet__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.clue-sheet__head h2 { margin: 0; font-size: 28px; }
.clue-sheet .clues { margin: 0; }
/* the message and the place hint speak through the clue bar; the Plant / Rotate row takes the controls row while aiming */
#play-screen.fit .dock-row, #play-screen.fit .place-hint { display: none; }
.clue-bar.refused { color: var(--gc-straw, #8a5a00); }
#play-screen.fit .clue-bar { min-height: 1.45em; }
.controls:has(#aim-row:not([hidden])) > :not(#aim-row) { display: none; }
#play-screen.fit .controls #aim-row:not([hidden]) { display: flex; gap: 8px; flex: 1 1 auto; margin: 0; }
#play-screen.fit .controls #aim-row button { flex: 1 1 0; }
#play-screen.fit .goal { font-weight: 400; }
@media (max-width: 379px) { .paper-row .masthead .paper-name { display: none; } }
#play-screen.fit .soil-progress { margin: 4px 0 0; }
#play-screen.fit .soil-progress-track { height: 6px; margin: 0; }
.tray-label { font-family: var(--gc-song, Georgia, serif); }
/* the Plant / Rotate bar stays fixed at the bottom (look.css), over a controls row of the same height, so it never covers the clue bar and a 320 px phone still sees it */
#play-screen.fit .controls { min-height: 66px; align-items: center; padding: 0; }
/* the counts stay on screen with the result (taste/ONE_SCREEN.md rule 5): undo look.css's short-screen hide */
body.is-result #play-screen.fit .masthead { display: contents; }
body.is-result #play-screen.fit .soil-progress, body.is-result #play-screen.fit .kicker-en { display: block; }
html[lang="zh-Hant"] body.is-result #play-screen.fit .kicker-en { display: none; }
#play-screen.fit .controls { gap: 6px; } #play-screen.fit .controls button { padding-left: 4px; padding-right: 4px; white-space: nowrap; }
