:root {
  --bg: #f6f3ee; --fg: #1f2328; --muted: #6b6f76; --line: #e3ded6; --panel: #ffffff; --card: #ffffff;
  --accent: #2f9e44; --accent-fg: #fff; --heart: #e5484d; --heart-off: #d9d4cc; --fog: #e4e1dc; --dot: #cfc8bd; --err: #e5484d;
  --c-g: #2f9e44; --c-b: #8d5a2b; --c-r: #e03131; --c-o: #f08c00; --c-y: #e0a400; --c-k: #2b2f36; --c-p: #d6336c; --c-u: #1c7ed6; --c-e: #8a929b;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
.muted { color: var(--muted); }
button { font: inherit; color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button.accent { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bar { background: var(--panel); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.bar h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
main { max-width: 480px; margin: 0 auto; padding: 12px 16px; text-align: center; }
main > p { margin: 6px 0; }
#status { font-weight: 600; }
.row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: end; }
#result { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
#share-text { white-space: pre-wrap; word-break: break-all; font: inherit; margin: 8px 0; }
footer { text-align: center; padding: 24px 16px; font-size: 14px; }
dialog { max-width: min(440px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--fg); padding: 16px 20px; }
dialog::backdrop { background: rgb(0 0 0 / .45); }
dialog h2 { margin-top: 0; }
dialog form[method=dialog] { text-align: right; margin-top: 12px; }
input { font: inherit; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); width: 12em; }
label { display: grid; gap: 2px; text-align: left; font-size: 14px; }
.list { display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.list button { text-align: left; }
.bars { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: center; font-size: 14px; }
.bars span.bar-fill { height: 14px; background: var(--accent); border-radius: 3px; }
.legal { max-width: 720px; margin: 0 auto; padding: 16px; text-align: left; }
.legal table { border-collapse: collapse; width: 100%; } .legal td, .legal th { border: 1px solid var(--line); padding: 6px; text-align: left; vertical-align: top; }
/* Board */
.hud { display: flex; justify-content: space-between; align-items: center; width: min(100%, 440px); margin: 8px auto 0; }
#lives { display: flex; gap: 4px; }
#lives svg { width: 24px; height: 24px; fill: var(--heart); transition: fill .3s, transform .3s; }
#lives svg.off { fill: var(--heart-off); transform: scale(.85); }
#lives.hurt svg:not(.off) { animation: beat .4s ease; }
#card { position: relative; width: min(100%, 440px); margin: 8px auto 12px; padding: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px rgb(0 0 0 / .06); }
#card.shake { animation: nope .35s ease; }
#board { display: block; width: 100%; height: auto; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-tap-highlight-color: transparent; }
#board .arrow { cursor: pointer; outline: none; stroke: var(--c-k); transition: opacity .35s; }
#board .arrow.fogged { opacity: 0; pointer-events: none; }
#board .fog { fill: var(--fog); }
#board .arrow .line, #board .arrow .head { fill: none; stroke-width: .13; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s, opacity .2s; }
#board .arrow .hit { fill: none; stroke: transparent; stroke-width: .9; stroke-linecap: round; stroke-linejoin: round; pointer-events: stroke; }
#board .arrow:hover .line, #board .arrow:hover .head, #board .arrow:focus-visible .line, #board .arrow:focus-visible .head { stroke-width: .2; }
#board .arrow.err .line, #board .arrow.err .head { stroke: var(--fg) !important; stroke-width: .22; } /* dark, not red: must show on red pictures too */
#board .arrow.hinted .line, #board .arrow.hinted .head { animation: glow 1s ease-in-out infinite; }
#board .pix { opacity: 0; transition: opacity .45s ease; }
#board .pix.on { opacity: 1; }
#board.dead .arrow { opacity: .35; pointer-events: none; }
#reveal { margin: 0 0 8px; font-weight: 800; font-size: 22px; animation: rise .5s ease both; }
@keyframes nope { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes beat { 50% { transform: scale(1.2); } }
@keyframes glow { 50% { stroke-width: .26; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { #card.shake, #lives.hurt svg, #board .arrow.hinted .line, #board .arrow.hinted .head, #reveal { animation: none; } #board .pix { transition: none; } }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choices button { display: grid; gap: 2px; justify-items: center; padding: 12px 8px; border-radius: 14px; font-size: 15px; }
.choices button b { font-size: 34px; line-height: 1.1; font-weight: 400; }
.choices button.wrong { opacity: .35; text-decoration: line-through; }
/* Cleared cells */
#board .dot { fill: var(--dot); opacity: 0; transition: opacity .4s ease; }
#board .dot.ink { fill: rgb(0 0 0 / .2); }
#board .dot.on { opacity: 1; }

/* Header */
.logo { font-size: 24px; font-weight: 800; letter-spacing: -.01em; color: var(--fg); text-decoration: none; }
.me { display: flex; gap: 6px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-weight: 600; font-size: 15px; }
span.pill { padding: 5px 12px; }
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); font-weight: 800; font-size: 14px; }
.big-avatar { width: 36px; height: 36px; font-size: 18px; vertical-align: middle; margin-right: 6px; }

/* Home */
#home { max-width: 480px; margin: 0 auto; padding: 16px; text-align: center; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; background: var(--fog); border-radius: 999px; margin-bottom: 16px; }
.tabs button { border: 0; background: none; font-weight: 700; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--panel); color: var(--fg); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.hero { padding: 24px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 24px rgb(0 0 0 / .06); }
.hero p { margin: 4px 0; }
.big { font-size: 56px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.big-btn { font-size: 18px; font-weight: 700; padding: 12px 40px; margin-top: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.stat-row div { display: grid; padding: 10px 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.stat-row b { font-size: 22px; }
.stat-row span { font-size: 13px; color: var(--muted); }
.path { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.path button { flex: 0 0 64px; display: grid; gap: 2px; padding: 8px 0; border-radius: 16px; scroll-snap-align: center; font-weight: 700; }
.path button small { font-weight: 400; font-size: 11px; letter-spacing: -1px; min-height: 1.2em; }
.path button.current { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.path button:disabled { opacity: .45; }
#panel-daily .row { margin-top: 14px; }
.center { text-align: center; }
button.link { background: none; border: 0; color: var(--accent); text-decoration: underline; padding: 4px; }

/* Play */
.playbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.playbar #title { margin: 0; font-weight: 700; }

/* ===== Shoo app look: sky, clouds, chunky buttons ===== */
:root { --sky1: #bfe6ff; --sky2: #e9f6ff; --blue: #2b8cf0; --blue-d: #1a64c4; --orange: #ff8a1f; --orange-d: #d9650a; --ink: #173a63; --card: #ffffff; --fg: #173a63; --muted: #5b7a9c; --line: #d3e8f8; --accent: #2b8cf0; --accent-fg: #fff; --fog: #e3eef8; --dot: #c3d6e8; }
body.app, body:has(#home) {
  min-height: 100dvh; color: var(--ink); font-family: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(120px 60px at 12% 22%, #fff9 60%, transparent 62%),
    radial-gradient(160px 70px at 88% 38%, #fff8 60%, transparent 62%),
    radial-gradient(200px 80px at 20% 78%, #fff7 60%, transparent 62%),
    linear-gradient(180deg, var(--sky1), var(--sky2)) fixed;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
.topbar { display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 16px 0; max-width: 480px; margin: 0 auto; }
.round { width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 0; background: var(--blue); color: #fff; font-size: 20px; font-weight: 900; box-shadow: 0 4px 0 var(--blue-d); }
.round:active, .btn-play:active, .tile:active, .btn-soft:active { transform: translateY(3px); box-shadow: none; }
.pill { border: 0; background: #fff; box-shadow: 0 2px 8px #2b8cf022; color: var(--ink); font-weight: 800; }
#home { padding-top: 4px; }
.wordmark { margin: 6px 0 0; font-size: 64px; font-weight: 900; letter-spacing: -1px; line-height: 1; }
.wordmark span { display: inline-block; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); }
.wordmark span:nth-child(1) { color: var(--orange); transform: rotate(-6deg); }
.wordmark span:nth-child(2) { color: #29c4f5; transform: translateY(-4px); }
.wordmark span:nth-child(3) { color: #8b5cf6; transform: rotate(4deg); }
.wordmark span:nth-child(4) { color: #f43f5e; transform: translateY(-2px) rotate(8deg); }
.tagline { margin: 10px 0 14px; font-weight: 700; color: var(--muted); }
.preview { position: relative; width: 200px; margin: 0 auto 12px; padding: 14px; background: #fff; border-radius: 28px; box-shadow: 0 10px 0 #a9d4f5, 0 18px 30px #2b8cf033; transform: rotate(-3deg); }
.preview svg { display: block; width: 100%; }
.preview .pdots { fill: var(--dot); }
.peek { position: absolute; right: -12px; top: -12px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 900; font-size: 22px; box-shadow: 0 4px 0 var(--orange-d); transform: rotate(10deg); }
.chip { display: inline-block; margin: 6px 0 0; padding: 4px 16px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 900; text-transform: uppercase; letter-spacing: .04em; font-size: 14px; box-shadow: 0 2px 8px #2b8cf022; }
.sub { color: var(--muted); font-weight: 700; margin: 6px 0; }
.btn-play { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 220px; margin-top: 10px; padding: 14px 32px; border: 0; border-radius: 999px; font-size: 24px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; color: #fff;
  background: linear-gradient(180deg, #ffad4d, var(--orange)); box-shadow: 0 6px 0 var(--orange-d), 0 12px 20px #ff8a1f44; }
.btn-soft { border: 0; padding: 10px 18px; border-radius: 999px; font-weight: 800; color: #fff; background: linear-gradient(180deg, #4aa6ff, var(--blue)); box-shadow: 0 4px 0 var(--blue-d); }
.hero { border: 0; border-radius: 28px; box-shadow: 0 8px 0 #a9d4f5, 0 16px 30px #2b8cf026; }
.stat-row div { border: 0; border-radius: 18px; box-shadow: 0 4px 0 #cfe6f8; }
.stat-row b { color: var(--ink); }
.path button { border: 0; background: #fff; box-shadow: 0 4px 0 #cfe6f8; color: var(--ink); }
.path button.current { background: var(--blue); color: #fff; box-shadow: 0 4px 0 var(--blue-d); }
#home footer { padding: 8px 16px 0; font-size: 13px; }
#home footer a { color: var(--muted); }
.bottomnav { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(440px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px; background: #fff; border-radius: 24px; box-shadow: 0 8px 24px #2b8cf033; z-index: 5; }
.bottomnav button { display: grid; justify-items: center; gap: 2px; border: 0; background: none; border-radius: 18px; padding: 6px 0; font-size: 12px; font-weight: 800; color: var(--muted); }
.bottomnav button span { font-size: 22px; line-height: 1.1; }
.bottomnav button[aria-selected="true"] { background: #e3f2ff; color: var(--blue); }
.bottomnav .avatar { width: 28px; height: 28px; font-size: 14px; background: var(--orange); color: #fff; }
/* Play screen */
#play { padding-top: calc(10px + env(safe-area-inset-top)); }
.playbar #title { margin: 0; }
#lives { justify-content: center; margin: 10px 0 4px; }
#lives svg { width: 30px; height: 30px; filter: drop-shadow(0 2px 0 #b3243a55); }
#lives svg.off { fill: #c9d9e8; }
#card { border: 0; border-radius: 28px; padding: 16px; box-shadow: 0 10px 0 #a9d4f5, 0 18px 30px #2b8cf033; }
#board .arrow .line, #board .arrow .head { stroke-width: .15; }
.tip { margin: 14px auto 6px; padding: 6px 16px; width: fit-content; border-radius: 999px; background: #ffffffb3; font-weight: 800; color: var(--muted); }
.actions { display: flex; justify-content: center; gap: 16px; margin-top: 10px; }
.tile { display: grid; justify-items: center; gap: 2px; width: 88px; padding: 12px 0 8px; border: 0; border-radius: 22px; color: #fff; font-weight: 900; font-size: 14px; background: linear-gradient(180deg, #4aa6ff, var(--blue)); box-shadow: 0 6px 0 var(--blue-d); }
.tile span { font-size: 30px; line-height: 1.1; }
.tile:disabled { opacity: .45; }
#msg { font-weight: 700; color: var(--muted); }
#result { border: 0; border-radius: 24px; box-shadow: 0 6px 0 #cfe6f8; }
#reveal { color: var(--ink); }
dialog { border: 0; border-radius: 24px; box-shadow: 0 12px 40px #173a6344; }
.choices button { border: 0; background: #f1f8ff; box-shadow: 0 4px 0 #cfe6f8; }
[hidden] { display: none !important; } /* our display: grid/flex rules must not beat the hidden attribute */
#play:not([hidden]) ~ .topbar, body:has(#play:not([hidden])) .topbar { display: none; }
/* Win popup + small hint */
.win { text-align: center; width: min(360px, calc(100vw - 32px)); padding: 22px 20px 12px; }
.win h2 { margin: 4px 0 0; font-size: 26px; font-weight: 900; }
.win-emoji { font-size: 84px; line-height: 1.1; margin-top: 8px; animation: pop .5s ease; }
.win-stars { font-size: 34px; margin: 6px 0 0; letter-spacing: 4px; }
.win .row { margin-top: 12px; }
.win .btn-play { min-width: 0; font-size: 18px; padding: 12px 22px; }
.win form[method=dialog] { text-align: center; }
.hint-small { width: 52px; height: 52px; align-self: center; padding: 0; border: 0; border-radius: 50%; font-size: 24px; background: #fff; box-shadow: 0 4px 0 #cfe6f8; }
.hint-small:disabled { opacity: .45; }
/* Home mini stats, levels tab, small game buttons */
.mini-stats { display: flex; justify-content: center; gap: 10px; margin: 16px 0 4px; }
.mini-stats > span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 8px; border-radius: 999px; background: #fff; box-shadow: 0 3px 0 #cfe6f8; font-weight: 900; font-size: 18px; }
.mini-stats i { font-style: normal; font-size: 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.panel-title { margin: 8px 0 14px; font-size: 26px; font-weight: 900; }
.level-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.level-grid button { display: grid; gap: 2px; padding: 10px 0; border: 0; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 #cfe6f8; font-weight: 900; color: var(--ink); }
.level-grid button small { font-weight: 400; font-size: 10px; letter-spacing: -1px; min-height: 1.2em; }
.level-grid button.current { background: var(--blue); color: #fff; box-shadow: 0 4px 0 var(--blue-d); }
.level-grid button:disabled { opacity: .45; }
.bottomnav { grid-template-columns: repeat(4, 1fr); }
.small-btn { position: relative; display: grid; justify-items: center; width: 60px; height: 60px; padding: 6px 0 0; border: 0; border-radius: 20px; background: #fff; box-shadow: 0 4px 0 #cfe6f8; font-size: 24px; line-height: 1.1; color: var(--ink); }
.small-btn small { font-size: 11px; font-weight: 800; }
.small-btn:disabled { opacity: .45; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: var(--orange); color: #fff; font: 900 12px/22px system-ui, sans-serif; font-style: normal; }
.badge:empty { display: none; }
/* Popups' home button, ad-free button, shop packages */
.win { position: relative; }
.home-btn { position: absolute; left: 14px; top: 14px; width: 38px; height: 38px; font-size: 18px; }
.ad-btn { width: 40px; height: 40px; background: #fff; color: #e5484d; box-shadow: 0 3px 0 #cfe6f8; position: relative; }
.ad-btn span { font-size: 13px; font-weight: 900; border: 2px solid currentColor; border-radius: 6px; padding: 0 3px; }
.ad-btn::after { content: ""; position: absolute; left: 7px; right: 7px; top: 50%; height: 3px; background: currentColor; transform: rotate(-35deg); border-radius: 2px; }
#d-pass { width: min(400px, calc(100vw - 24px)); }
.pkg { position: relative; margin: 12px 0; padding: 14px 16px; border-radius: 20px; background: #f4f9ff; box-shadow: 0 4px 0 #cfe6f8; text-align: center; }
.pkg h3 { margin: 4px 0; font-size: 22px; font-weight: 900; }
.pkg h3 small { font-size: 13px; color: var(--muted); font-weight: 700; }
.pkg ul { text-align: left; margin: 8px 0; padding-left: 22px; }
.pkg.best { background: #fff4e8; box-shadow: 0 4px 0 #ffd9b3; }
.pkg .tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); padding: 2px 12px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 900; }
.pkg .btn-play { min-width: 0; font-size: 18px; padding: 10px 22px; margin: 0; }
.pkg + .pkg .btn-play { font-size: 16px; padding: 8px 18px; }
.owned { color: #12a150; font-weight: 800; }
/* Peekarrow wordmark: 9 letters, colours cycle */
.wordmark { font-size: clamp(40px, 12vw, 54px); }
.wordmark span:nth-child(n) { transform: none; }
.wordmark span:nth-child(5n+1) { color: var(--orange); transform: rotate(-5deg); }
.wordmark span:nth-child(5n+2) { color: #29c4f5; transform: translateY(-3px); }
.wordmark span:nth-child(5n+3) { color: #8b5cf6; transform: rotate(4deg); }
.wordmark span:nth-child(5n+4) { color: #f43f5e; transform: translateY(-2px); }
.wordmark span:nth-child(5n) { color: #12b3a0; transform: rotate(-3deg); }
.wordmark-sub { margin: 2px 0 0; font-weight: 900; letter-spacing: .25em; text-transform: uppercase; color: var(--blue); font-size: 14px; }
/* Hinted arrow: black and glowing so it stands out among the colours */
#board .arrow.hinted .line, #board .arrow.hinted .head { stroke: #111 !important; stroke-width: .2; filter: drop-shadow(0 0 .12px #fff) drop-shadow(0 0 .25px #ffd43b); animation: glow 1s ease-in-out infinite; }
/* Idle nudge above the Hint button */
.actions { position: relative; }
.nudge { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-10%); white-space: nowrap; padding: 6px 12px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; animation: rise .4s ease both; }
.nudge::after { content: ""; position: absolute; top: 100%; left: 40%; border: 7px solid transparent; border-top-color: var(--ink); }
.small-btn.pulse { animation: beat 1s ease-in-out infinite; }
/* Shop: back/home button, note, single price button */
.shop { position: relative; }
.shop h2 { text-align: center; }
.note { margin: 0 0 8px; padding: 8px 12px; border-radius: 14px; background: #fff4e8; color: var(--orange-d); font-weight: 800; text-align: center; }
.pkg .btn-play:only-child, .pkg .row > .btn-play { min-width: 160px; }
/* Android app vs web */
.only-native { display: none; }
body.native .only-native { display: inline-flex; }
body.native .only-web { display: none; }
.acct { display: grid; gap: 10px; justify-items: center; }
.acct label { width: 100%; }
.acct input { width: 100%; font-size: 18px; padding: 10px 12px; border-radius: 14px; }
#d-profile .win-emoji .big-avatar { width: 72px; height: 72px; font-size: 36px; }
.bottomnav button span#nav-name { font-size: 12px; line-height: 1.3; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
