/* Layout: one phone-width column — header, candy stripes, donut stage, status, letter tray, controls. */
/* Fonts are served from this site (see fonts/OFL.txt), so pages make no requests to Google. */
@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/rubik-latin.woff2?v=691cd1d9b4) format('woff2'); }
@font-face { font-family: 'Shrikhand'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/shrikhand-latin.woff2?v=ae958e0da5) format('woff2'); }
:root {
  --bg: #FBFAF7; --fg: #2E1A47; --muted: rgba(46,26,71,.62); --line: #2E1A47;
  --ink: #2E1A47; --cream: #FFF3DC; --dough: #E9A55B; --crust: #C9803A; --dough-hi: #F8D29B;
  --placed: #FFD23F; --done: #4CAF3A; --check: #3A862D; --cherry: #E8323C;
  --tray: #F2E9DC; --tray-shadow: inset 0 2px 5px rgba(46,26,71,.10);
  --plate: transparent; --donut-shadow: #2E1A47; --mark-shadow: 3px 3px 0 #2E1A47;
  --overlay: rgba(46,26,71,.38); --panel: #FFFFFF;
  --font-ui: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mark: 'Shrikhand', 'Rubik', Georgia, serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #16121D; --fg: #F4EFE6; --muted: rgba(244,239,230,.62); --line: #F4EFE6;
  --check: #7FD36B; --tray: #2A2236; --tray-shadow: none; --plate: #2A2236; --donut-shadow: #07050B;
  --mark-shadow: none; --overlay: rgba(0,0,0,.55); --panel: #221B2C; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #16121D; --fg: #F4EFE6; --muted: rgba(244,239,230,.62); --line: #F4EFE6;
  --check: #7FD36B; --tray: #2A2236; --tray-shadow: none; --plate: #2A2236; --donut-shadow: #07050B;
  --mark-shadow: none; --overlay: rgba(0,0,0,.55); --panel: #221B2C; color-scheme: dark; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-ui); -webkit-tap-highlight-color: transparent; }
.app { max-width: 420px; margin: 0 auto; padding-block: 0 28px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; }
header { display: flex; align-items: center; justify-content: space-between; padding: 18px 0 12px; }
h1, .mark { margin: 0; font-family: var(--font-mark); font-weight: 400; font-size: 38px; line-height: 1; color: var(--cherry); text-shadow: var(--mark-shadow); }
.icons { display: flex; gap: 4px; }
.icon { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--fg); display: grid; place-items: center; cursor: pointer; padding: 0; }
.icon:hover { background: var(--tray); }
.icon svg { width: 21px; height: 21px; }
.stripes { display: flex; flex-direction: column; gap: 3px; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); }
.stripes i { display: block; height: 5px; }
.meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.meta .mode { color: var(--muted); }
.board { position: relative; width: min(360px, 100%); aspect-ratio: 1; max-width: 100%; margin: 14px auto 0; }
.stage { position: absolute; left: 0; top: 0; width: 360px; height: 360px; transform-origin: 0 0; }
.stage svg { position: absolute; inset: 0; width: 360px; height: 360px; overflow: visible; }
.sector { transition: fill .35s ease, stroke .35s ease; }
.letter { font-family: var(--font-ui); font-weight: 600; transition: fill .35s ease; pointer-events: none; }
.hit { position: absolute; border: 0; padding: 0; background: transparent; border-radius: 50%; cursor: pointer; touch-action: none; }
.hit:focus-visible { outline: 3px solid var(--cherry); outline-offset: 2px; }
.wordlist { position: absolute; left: 105px; top: 0; width: 150px; height: 360px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; pointer-events: none; }
.wrow { display: flex; align-items: center; gap: 8px; min-height: 20px; }
.wrow .w { font-weight: 500; font-size: 16px; letter-spacing: 3px; }
.dots { display: flex; gap: 5px; }
.dots i { width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; border: 1.5px solid var(--fg); }
.dots i.off { opacity: .4; }
.dots i.on { background: var(--fg); }
.wrow svg { width: 16px; height: 16px; color: var(--check); }
.marquee { position: absolute; left: 90px; top: 146px; width: 180px; height: 70px; pointer-events: none; }
.mq-win { position: absolute; left: 0; top: 0; width: 180px; height: 44px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 162px, transparent 180px); mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 162px, transparent 180px); }
.mq-strip { position: absolute; left: 0; top: 0; height: 44px; transition: transform .9s cubic-bezier(.45,0,.25,1); }
.mq-strip span { position: absolute; top: 4px; width: 30px; text-align: center; font-weight: 600; font-size: 28px; line-height: 36px; transition: color .4s ease; }
.mq-cap { position: absolute; left: 0; top: 48px; width: 180px; text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lift { opacity: 0; transform-box: view-box; transition: transform .6s ease, filter .6s ease, opacity 0s linear .6s; }
.lift.on { opacity: 1; transform: scale(1.05); filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); transition: transform .6s ease .05s, filter .6s ease .05s, opacity 0s; }
.spr { animation: sprIn .45s cubic-bezier(.2,1.5,.4,1) both; transform-box: fill-box; transform-origin: center; }
@keyframes sprIn { from { opacity: 0; transform: translateY(-16px) scale(.3); } to { opacity: 1; transform: none; } }
.wiggle { animation: wiggle .8s ease-out both; transform-box: view-box; transform-origin: 180px 180px; }
@keyframes wiggle { 0% { transform: none; } 35% { transform: scale(1.05) rotate(5deg); } 70% { transform: scale(.99) rotate(-2deg); } 100% { transform: none; } }
.flash { animation: flash .8s ease-out both; }
@keyframes flash { 0% { opacity: 0; stroke-width: 2; } 35% { opacity: 1; stroke-width: 7; } 100% { opacity: 0; stroke-width: 2; } }
.msg { margin: 14px 0 10px; min-height: 20px; text-align: center; font-size: 15px; font-weight: 600; }
.tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 10px 12px; border-radius: 30px; background: var(--tray); box-shadow: var(--tray-shadow); min-height: 64px; box-sizing: border-box; align-content: center; }
.tile { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--ink); background: var(--placed); color: var(--ink); font-family: var(--font-ui); font-weight: 600; font-size: 19px; cursor: grab; touch-action: none; box-shadow: inset -3px -4px 0 rgba(46,26,71,.22), inset 3px 3px 0 rgba(255,255,255,.4); transition: transform .15s ease; padding: 0; }
.tile[aria-pressed="true"] { transform: translateY(-6px); border-width: 3px; }
.tile.dragging { opacity: .25; }
.tile:focus-visible { outline: 3px solid var(--cherry); outline-offset: 2px; }
.controls { display: flex; gap: 10px; padding-top: 16px; }
.btn { flex: 1; height: 48px; border-radius: 999px; border: 2px solid var(--line); background: transparent; color: var(--fg); font-family: var(--font-ui); font-weight: 600; font-size: 16px; cursor: pointer; }
.btn:hover { background: var(--tray); }
.btn:focus-visible, .icon:focus-visible { outline: 3px solid var(--cherry); outline-offset: 2px; }
.hint { margin: 14px 0 0; text-align: center; font-size: 13px; line-height: 1.45; color: var(--muted); }
.practice { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 22px; font-size: 13px; color: var(--muted); }
.chip { height: 36px; min-width: 44px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--fg); font-family: var(--font-ui); font-weight: 600; font-size: 14px; cursor: pointer; }
.chip:hover { background: var(--tray); }
.ghost { position: fixed; z-index: 50; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 2px solid #2E1A47; background: #FFD23F; color: #2E1A47; display: grid; place-items: center; font-weight: 600; font-size: 20px; pointer-events: none; transform: scale(1.15); box-shadow: 0 10px 18px rgba(0,0,0,.25); }
.solved .tray, .solved .controls, .solved .hint { display: none; }
.sheet { position: fixed; inset: 0; z-index: 40; background: var(--overlay); display: grid; place-items: center; padding: 16px; }
.sheet .card { background: var(--panel); color: var(--fg); border-radius: 22px; padding: 22px 22px 18px; width: 100%; max-width: 360px; box-sizing: border-box; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.sheet h2 { margin: 0 0 10px; font-family: var(--font-mark); font-weight: 400; font-size: 26px; color: var(--cherry); }
.sheet ol { margin: 0 0 14px; padding-left: 20px; line-height: 1.5; font-size: 15px; display: flex; flex-direction: column; gap: 6px; }
.sheet .example { font-weight: 600; letter-spacing: .06em; }
.loading { text-align: center; padding: 120px 0; color: var(--muted); font-weight: 600; }
/* Pre-launch note, in-play score, results card, stats and menu sheets, footer. */
.notice { margin: 14px 0 0; padding: 10px 14px; border-radius: 16px; background: var(--tray); text-align: center; font-size: 14px; font-weight: 600; line-height: 1.4; }
.score { display: inline-flex; align-items: center; gap: 8px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.mini-stars { display: inline-flex; gap: 1px; }
.star { width: 13px; height: 13px; stroke: var(--fg); stroke-width: 2; stroke-linejoin: round; }
.star.on { fill: var(--fg); }
.star.off { fill: none; opacity: .45; }
.results { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 2px; text-align: center; }
.res-score { display: flex; align-items: center; gap: 14px; }
.stars-big { display: inline-flex; gap: 3px; }
.stars-big .star { width: 30px; height: 30px; stroke: var(--ink); stroke-width: 1.6; }
.stars-big .star.on { fill: var(--placed); }
.stars-big .star.off { fill: none; stroke: var(--fg); opacity: .4; }
.time-big { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.share-row { display: flex; gap: 10px; width: 100%; }
.rate { width: 100%; box-sizing: border-box; padding: 14px 12px; border-radius: 22px; background: var(--tray); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rate-q { margin: 0; font-size: 15px; font-weight: 600; }
.rate-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rate .chip { background: var(--bg); }
.chip[aria-pressed="true"] { background: var(--fg) !important; color: var(--bg); }
.chip:disabled { cursor: default; }
.chip:disabled:not([aria-pressed="true"]) { opacity: .45; }
.chip:focus-visible, .menu-item:focus-visible, a:focus-visible { outline: 3px solid var(--cherry); outline-offset: 2px; }
.thumb { display: inline-grid; place-items: center; min-width: 56px; }
.thumb svg { width: 20px; height: 20px; }
.thumb.down svg { transform: rotate(180deg); }
.rate-thanks { margin: 0; font-size: 14px; font-weight: 600; color: var(--check); }
.next { margin: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.res-links { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 14px; }
.res-links a, .foot a { color: var(--fg); font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 16px; text-align: center; }
.stat b { display: block; font-size: 26px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat-h { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.dist { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.dist-row { display: grid; grid-template-columns: 16px 1fr; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.bar { box-sizing: border-box; min-width: 24px; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--fg); color: var(--bg); text-align: right; line-height: 20px; font-size: 12px; font-variant-numeric: tabular-nums; }
.bar.today { background: var(--check); }
.stat-times { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 16px; text-align: center; }
.menu-list { display: flex; flex-direction: column; margin: 0 0 14px; }
.menu-item { display: block; width: 100%; box-sizing: border-box; padding: 13px 4px; border: 0; border-bottom: 1.5px solid var(--tray); background: transparent; color: var(--fg); font-family: var(--font-ui); font-size: 16px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover { background: var(--tray); }
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 28px; font-size: 13px; }
.help-more { margin: 0 0 14px; font-size: 14px; }
.help-more a { color: var(--fg); font-weight: 600; }
/* Info pages: how-to-play.html, about.html, privacy.html. Same column, a little wider for reading. */
.doc { max-width: 600px; }
.mark { text-decoration: none; }
.mark:focus-visible, .doc a:focus-visible, .btn:focus-visible { outline: 3px solid var(--cherry); outline-offset: 2px; }
.doc-main { padding-top: 8px; }
.doc-main h1 { margin: 20px 0 4px; font-size: 32px; text-shadow: none; }
.doc-main h2 { margin: 30px 0 6px; font-size: 19px; font-weight: 700; }
.doc-main p, .doc-main li, .doc-main td, .doc-main th { font-size: 16px; line-height: 1.6; }
.doc-main p { margin: 0 0 12px; }
.doc-main ul, .doc-main ol { margin: 0 0 12px; padding-left: 22px; }
.doc-main li { margin-bottom: 4px; }
.doc-main a { color: var(--fg); font-weight: 600; }
.doc-main code { font-size: 14px; background: var(--tray); padding: 1px 5px; border-radius: 5px; }
.lede { font-size: 18px !important; }
.updated { color: var(--muted); font-size: 14px !important; }
a.btn { display: flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }
.doc-cta { display: flex; margin: 28px 0 0; }
.callout { margin: 16px 0; padding: 12px 16px; border-radius: 16px; background: var(--tray); }
.callout.review { background: transparent; border: 2px dashed var(--cherry); }
.callout p:last-child { margin-bottom: 0; }
.moves { width: 100%; border-collapse: collapse; margin: 6px 0 14px; }
.moves th, .moves td { text-align: left; padding: 8px 6px; border-bottom: 1.5px solid var(--tray); vertical-align: top; }
.moves th { font-size: 13px !important; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.moves td:last-child { white-space: nowrap; font-weight: 600; }
/* The overlapping-words example on How to play. */
.chain { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 16px; padding: 14px; border-radius: 18px; background: var(--tray); overflow-x: auto; }
.chain-row { display: flex; gap: 3px; }
.chain .lt { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--ink); background: var(--placed); color: var(--ink); display: grid; place-items: center; font-weight: 600; font-size: 13px; box-sizing: border-box; }
.chain .lt.shared { background: var(--done); }
.chain .gap { flex: none; width: 24px; }
.chain .chain-note { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
