/* Fijah web styles. Placeholder look: every surface is a class or variable so painted assets can
   replace it later (see web/src/art/slots.ts). */
:root {
  --ink: #2a0b4d;
  --sky-top: #160a4a; --sky-mid: #3a1d8f; --sky-bottom: #2a1066;
  --cream: #fff7e6; --honey: #f2b65e; --honey-dark: #a35a10;
  --grape: #9a47ff; --berry: #ff3d8b; --lemon: #ffc414; --lime: #47cc22; --blue: #2b86ff; --mint: #14cfae; --orange: #ff8418;
  --well: #3a1f86;
  --radius: 18px;
  --display: 'Lilita One', 'Fijah Fill', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* a long press is part of play (holding a tile, a button): never the phone's picture preview with Share, Save to
   Photos or Look Up, and no picture dragged off; typing fields keep their own copy and paste */
*, *::before, *::after { -webkit-touch-callout: none; }
img { -webkit-user-drag: none; user-select: none; }
input, textarea, [contenteditable="true"] { -webkit-touch-callout: default; -webkit-user-select: text; user-select: text; }
html, body { margin: 0; height: 100%; overscroll-behavior: none; }
body {
  font-family: var(--body); color: var(--ink); user-select: none; -webkit-user-select: none;
  background: linear-gradient(180deg, var(--sky-top), var(--sky-mid) 45%, var(--sky-bottom));
  background-attachment: fixed;
}
#app { min-height: 100%; max-width: 520px; margin: 0 auto; position: relative; padding: calc(var(--safe-top) + 10px) 14px calc(var(--safe-bottom) + 18px); }
.app-loading { color:#fff;min-height: 55vh; display: grid; place-items: center; font-family: var(--display); font-size: 24px; text-align: center; }
.auth-switch { display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;max-width:100%;text-align:center; }
.stage-loading { color:#fff;position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 22px; pointer-events: none; }
.stage.sq-loading canvas { visibility: hidden; }
.overlay:focus { outline: none; }
button:focus-visible, [role="button"]:focus-visible { outline: 3px solid #ffe066; outline-offset: 3px; }
/* during a game the board takes nearly the full width on phones, and on desktop grows with the window height (the whole game still fits on screen), up to 680px */
#app:has(.stage) { max-width: clamp(520px, calc((100vh - 268px) / 1.3 - 80px), 680px); padding-left: 6px; padding-right: 6px; }
/* wide screens: the board's painted rim reaches into the margins beside the game column */
@media (min-width: 640px) { #app:has(.stage) .stage { margin-left: -50px; margin-right: -50px; } }

/* chunky outlined display text */
.display { font-family: var(--display); color: #fff; letter-spacing: .5px; paint-order: stroke fill; -webkit-text-stroke: 5px var(--ink); text-shadow: 0 3px 0 rgba(42, 11, 77, .45); }
.display.sm { -webkit-text-stroke-width: 3.5px; }
.display.xs { -webkit-text-stroke-width: 2.5px; text-shadow: 0 2px 0 rgba(42, 11, 77, .4); }

/* bevelled glossy buttons */
.btn {
  text-decoration: none;
  --c: var(--blue); --c-dark: color-mix(in srgb, var(--c) 58%, #2a0b4d); --c-light: color-mix(in srgb, var(--c) 62%, #fff);
  position: relative; border: 2.5px solid var(--ink); border-radius: var(--radius); cursor: pointer;
  background: linear-gradient(180deg, var(--c-light), var(--c) 55%, color-mix(in srgb, var(--c) 85%, #2a0b4d));
  box-shadow: 0 6px 0 var(--c-dark), 0 6px 0 2.5px var(--ink), 0 12px 16px rgba(27, 8, 56, .3);
  font-family: var(--display); font-size: 20px; color: #fff; paint-order: stroke fill; -webkit-text-stroke: 3px var(--ink);
  padding: 12px 18px 14px; min-height: 52px; transition: transform .08s, box-shadow .08s; touch-action: manipulation;
}
/* a link or label drawn as a button centres its words like a real <button> does (owner 22 Nov 2026: Play this day's label sat at
   the top of its button); a big one stays a full-width block */
a.btn, label.btn, span.btn, div.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; box-sizing: border-box; }
a.btn.big, label.btn.big { display: flex; }
.btn::before { content: ''; position: absolute; left: 8%; right: 8%; top: 5px; height: 36%; border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.08)); pointer-events: none; }
.btn:active, .btn.pressed { transform: translateY(5px); box-shadow: 0 1px 0 var(--c-dark), 0 1px 0 2.5px var(--ink), 0 4px 8px rgba(27, 8, 56, .3); }
.btn:disabled { filter: grayscale(.7) brightness(.9); cursor: default; }
/* a button that starts a game: a soft band of light sweeps across it every few seconds (staggered by --shine-delay) */
:is(.btn.shine, .shop .btn)::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, transparent 41%, rgba(255, 255, 255, .45) 47%, rgba(255, 255, 255, .7) 50%, rgba(255, 255, 255, .45) 53%, transparent 59%) 100% 0 / 300% 100% no-repeat;
  animation: btn-shine 4.2s ease-in-out var(--shine-delay, -2.2s) infinite; }
:is(.btn.shine, .shop .btn):disabled::after { display: none; }
/* a painted button: the band crosses its face between the gold end caps, fading in and out at them */
.painted-ui :is(.btn.shine, .shop .btn)::after { border-radius: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); }
@keyframes btn-shine { 0%, 70% { background-position: 100% 0; } 100% { background-position: 0% 0; } }
.btn.green { --c: var(--lime); } .btn.yellow { --c: var(--lemon); } .btn.pink { --c: var(--berry); } .btn.purple { --c: var(--grape); } .btn.orange { --c: var(--orange); } .btn.mint { --c: var(--mint); }
.save-recovery { display: grid; gap: .75rem; }
.save-recovery-item { padding: .75rem; border: 1px solid var(--line, #d7d7dc); border-radius: 1rem; }
.save-recovery-item p { margin: 0 0 .65rem; }
.save-recovery-item strong { font-weight: 700; }
.save-recovery-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.save-recovery-status:empty { display: none; }
.btn.big { font-size: 26px; padding: 16px 22px 18px; width: 100%; }
.btn.icon { width: 64px; height: 60px; padding: 0; display: grid; place-items: center; }
.btn.icon svg { width: 34px; height: 34px; position: relative; }
.img-btn { position: relative; background: none; border: 0; padding: 0; width: 66px; height: 66px; cursor: pointer; transition: transform .08s; touch-action: manipulation; }
.img-btn img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 5px 0 rgba(27, 8, 56, .35)); }
.img-btn:active { transform: scale(.9) translateY(2px); }
.controls .img-btn { flex: none; }
.img-btn .badge, .btn .badge { position: absolute; top: -10px; right: -10px; min-width: 26px; height: 26px; border-radius: 13px; background: #ff2d55; border: 2.5px solid #fff; font-size: 14px; -webkit-text-stroke: 0; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--ink); }

/* cream cards with golden rims */
.card { background: var(--cream); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 rgba(27, 8, 56, .35); padding: 14px; position: relative; }
.card::before { content: ''; position: absolute; left: 14px; right: 14px; top: 6px; height: 8px; border-radius: 4px; background: #fff; opacity: .9; }

/* ribbon title */
.ribbon { position: relative; display: inline-block; padding: 8px 26px 10px; background: linear-gradient(180deg, #ff8fc0, var(--berry) 60%, #d81b6f); border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 #a5134f, 0 4px 0 3px var(--ink); }
.ribbon::before, .ribbon::after { content: ''; position: absolute; top: 14px; width: 22px; height: 30px; background: #b8175a; border: 3px solid var(--ink); z-index: -1; }
.ribbon::before { left: -18px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 40% 50%); border-right: 0; }
.ribbon::after { right: -18px; clip-path: polygon(0 0, 100% 0, 60% 50%, 100% 100%, 0 100%); border-left: 0; }

.row { display: flex; gap: 10px; align-items: center; }
.spread { justify-content: space-between; }
.center { text-align: center; }
.stack { display: grid; gap: 12px; }
.muted { color: #6b5a86; font-weight: 800; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(27, 8, 56, .45); color: #fff; border-radius: 999px; padding: 6px 14px; font-family: var(--display); font-size: 15px; letter-spacing: .4px; }

/* game screen */
.game-top { display: grid; grid-template-columns: 60px 1fr 60px; align-items: center; gap: 8px; }
.game-title { text-align: center; }
.game-title .ribbon .display { font-size: 21px; }
.game-sub { text-align: center; text-wrap: balance; margin-top: 6px; font-family: var(--display); color: #fff; font-size: 14px; letter-spacing: 1px; -webkit-text-stroke: 2.5px #0d4c9c; paint-order: stroke fill; }
.meter { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin: 10px 2px 2px; }
.score-orb { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #c79bff, var(--grape) 60%, #5d1fb3); border: 3px solid var(--ink); box-shadow: 0 4px 0 #3b0f80, 0 4px 0 3px var(--ink); font-size: 24px; }
.bar { position: relative; height: 26px; border-radius: 13px; background: #2b1a63; border: 3px solid #14093a; overflow: visible; }
.bar > i { position: absolute; inset: 2px auto 2px 2px; border-radius: 10px; background: linear-gradient(180deg, #b8ff7a, #34b51f); transition: width .5s cubic-bezier(.2, 1.4, .4, 1); }
.bar > i::after { content: ''; position: absolute; left: 6px; right: 6px; top: 2px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.5); }
.bar .star { position: absolute; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); }
.timer { font-size: 30px; min-width: 70px; text-align: right; }
.timer.low { animation: pulse .5s infinite alternate; color: #ffd1d1; }
@keyframes pulse { to { transform: scale(1.12); } }
.meter.with-stones { grid-template-columns: auto 1fr auto auto; }
/* card games widen the screen to 820px for the table; their meter row stays as long as every other game's (owner, 2 Dec 2026) */
.meter.ct-meter, .meter.sol-meter { width: calc(100% - 4px); max-width: calc(clamp(520px, calc((100vh - 268px) / 1.3 - 80px), 680px) - 16px); margin-left: auto; margin-right: auto; box-sizing: border-box; }
.stone-clock { --p: 0; position: relative; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--ink); background: conic-gradient(#ffb020 calc(var(--p) * 1turn), #2b1a63 0); box-shadow: 0 3px 0 rgba(27, 8, 56, .4); }
.stone-clock::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #6d4fb8, #2b1a63); }
.stone-clock img { position: relative; width: 36px; height: 36px; object-fit: contain; }
.stone-clock b { position: absolute; right: -8px; bottom: -6px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px; display: grid; place-items: center; background: #fff; border: 2.5px solid var(--ink); font: 400 15px var(--display); color: var(--ink); }
.stone-clock.soon { background: conic-gradient(#ff4d4d calc(var(--p) * 1turn), #2b1a63 0); animation: pulse .35s infinite alternate; }
.stone-clock.hidden { visibility: hidden; }
.stage { position: relative; margin: 8px -6px 0; touch-action: none; }
.stage canvas { display: block; width: 100%; }
.word-bubble { position: absolute; left: 50%; transform: translateX(-50%); top: -62px; z-index: 3; pointer-events: none; display: flex; align-items: center; gap: 8px; background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: 4px 6px 4px 18px; font-family: var(--display); font-size: 24px; color: var(--ink); letter-spacing: 1.5px; box-shadow: 0 4px 0 rgba(27, 8, 56, .3); transition: opacity .15s; }
.word-bubble.hidden { opacity: 0; }
.word-bubble.bad { color: #b0a4c4; }
.word-bubble .pts { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff3a0, #ffc21a 55%, #f08a00); border: 3px solid var(--ink); font-size: 17px; color: #fff; -webkit-text-stroke: 2.5px #8a3d00; paint-order: stroke fill; letter-spacing: 0; }
.controls { display: flex; flex-wrap:wrap; gap: 10px; margin-top: 12px; justify-content: center; }
.controls .btn.icon { flex:none; width:66px; max-width:76px; }
.controls > .btn:not(.icon){flex:none;min-width:160px;max-width:100%;white-space:normal;text-align:center}
.sq-party-help{display:flex;justify-content:center;width:100%;margin:12px 0 6px}
.sq-party-help .how-to-play{flex:none;min-width:180px;max-width:100%;white-space:normal;text-align:center}
.game-actions { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.game-actions .btn { flex: 1; max-width: 200px; font-size: 19px; }
.found { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 30px; }
.found span { background: rgba(255,255,255,.85); border: 2px solid var(--ink); border-radius: 10px; padding: 2px 8px; font-weight: 900; font-size: 13px; letter-spacing: .5px; }
.rivals { display: flex; gap: 6px; overflow-x: auto; margin-top: 8px; padding-bottom: 2px; }
.rival { flex: none; background: rgba(27, 8, 56, .5); color: #fff; border-radius: 12px; padding: 4px 10px; font-weight: 900; font-size: 13px; border: 2px solid rgba(255,255,255,.4); }
.rival.me { background: var(--grape); }
.chatbar { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; padding: 2px 0 4px; }
.chatbar button { flex: none; font: 900 13px var(--body); border: 2px solid var(--ink); border-radius: 999px; background: #fff; padding: 6px 12px; cursor: pointer; }
/* every chat's quick phrases in the leaderboard's yellow pill ("All time", .seg button.on; owner, 28 Nov 2026) */
button.chat-pill, .chatbar button.chat-pill, .chips button.chat-pill { flex: none; font: 400 14px var(--display); letter-spacing: .3px; color: var(--ink); background: var(--lemon); border: 0; border-radius: 999px; padding: 7px 14px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); cursor: pointer; -webkit-text-stroke: 0; min-height: 0; width: auto; }
.cq-qrow.chatbar button.chat-pill { padding: 5px 11px; font-size: 13px; }

/* overlays */
.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(20, 6, 50, .55); display: grid; place-items: center; padding: 18px; animation: fade .2s; }
.overlay .card { width: min(480px, 100%); max-height: calc(100vh - 36px); overflow-y: auto; }
/* Google and Apple sign-in: our gold frame and display font, white pill with the Google G, black pill with the Apple logo */
.social-controls{width:100%;display:flex;flex-direction:column;align-items:center;gap:10px}.social-controls[hidden]{display:none}.social-provider{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;max-width:340px;min-height:68px;box-sizing:border-box;padding:20px 32px 18px;border:0;border-radius:0;box-shadow:none;background:center/100% 100% no-repeat;filter:drop-shadow(0 4px 0 #1b083859);font:400 clamp(15px,4.5vw,21px)/1.15 var(--display);letter-spacing:.5px;text-transform:none;cursor:pointer;white-space:nowrap;paint-order:stroke fill}.social-provider:active{transform:translateY(3px) scale(.98)}.social-provider:disabled{opacity:.6;cursor:default}.social-provider:focus-visible{outline:3px solid #ffe49b;outline-offset:2px}.social-google{background-image:url('/assets/ui/ui.btn.white.webp');color:#2a0b4d;-webkit-text-stroke:0}.social-apple{background-image:url('/assets/ui/ui.btn.black.webp');color:#fff;-webkit-text-stroke:3px #2a0b4d}.social-logo{display:inline-flex;flex:0 0 auto;line-height:0;-webkit-text-stroke:0;transform:translateY(-2px)}.social-label{overflow:hidden;text-overflow:ellipsis}.social-google .social-logo{transform:translateY(-1px)}
.social-google-frame{max-width:100%;box-sizing:border-box;padding:8px;border:3px solid #f6c64b;border-radius:12px;background:#2a1066}
@keyframes fade { from { opacity: 0; } }
.result-stars { display: flex; justify-content: center; gap: 4px; margin: 4px 0 8px; }
.result-stars svg { width: 64px; height: 64px; }
.result-stars svg:nth-child(2) { transform: translateY(-12px); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.stat { background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 8px 4px; text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 24px; color: var(--grape); }
.stat small { font-weight: 900; font-size: 11px; color: #6b5a86; text-transform: uppercase; letter-spacing: .5px; }
.layer { background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 10px 12px; margin-top: 8px; font-weight: 800; }
.layer h4 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: 17px; color: var(--berry); letter-spacing: .4px; }
.lb { display: grid; gap: 4px; }
.lb div { display: grid; grid-template-columns: 26px 1fr auto; gap: 6px; padding: 3px 6px; border-radius: 8px; }
.lb .you { background: #ffe9a8; }
.lb .lb-head { padding-top: 0; padding-bottom: 0; font: 800 11px var(--body); opacity: .75; text-transform: none; }
.lb .lb-head span:last-child { text-align: right; }

/* home */
.brand { text-align: center; margin: 8px 0 4px; }
.brand h1 { margin: 0; font-size: 58px; line-height: 1; }
.brand p { margin: 6px 0 0; }
.hud { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tiles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.game-card { --c: var(--blue); border: 3px solid var(--ink); border-radius: 22px; padding: 12px; color: #fff; cursor: pointer; position: relative; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 80%, #2a0b4d)); box-shadow: 0 6px 0 color-mix(in srgb, var(--c) 55%, #2a0b4d), 0 6px 0 3px var(--ink); transition: transform .08s; }
.game-card:active { transform: translateY(4px); }
.game-card h3 { margin: 0; font-size: 22px; }
.game-card .tag { align-self: flex-start; background: rgba(27, 8, 56, .45); border-radius: 999px; padding: 3px 10px; font-family: var(--display); font-size: 13px; letter-spacing: .5px; }
.game-card .done { position: absolute; top: -10px; right: -8px; }
.game-card canvas { width: 100%; height: 64px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg button { font: 400 14px var(--display); letter-spacing: .3px; padding: 7px 4px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); cursor: pointer; } /* one pill style: the home cards' "Not played yet" (owner, 27 Nov 2026); white = not picked */
.seg button.on { background: var(--lemon); }
input.code { font-family: var(--display); font-size: 28px; letter-spacing: 8px; text-transform: uppercase; width: 100%; text-align: center; border: 3px solid var(--ink); border-radius: 16px; padding: 10px; }
.link-box { font-weight: 900; background: #fff; border: 2.5px dashed var(--grape); border-radius: 12px; padding: 8px; text-align: center; word-break: break-all; }
#toasts { position: fixed; left: 50%; top: calc(var(--safe-top) + 12px); transform: translateX(-50%); z-index: 50; display: grid; justify-items: center; gap: 6px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); } /* a short toast stays on one line (owner, 17 Nov 2026) */
.toast { background: var(--lemon); color: var(--ink); border: 0; border-radius: 999px; padding: 7px 16px; font: 400 15px/1.3 var(--display); letter-spacing: .3px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 6px 16px rgba(27, 8, 56, .35); animation: drop .25s cubic-bezier(.2, 1.4, .4, 1); } /* the yellow "Not played yet" pill (owner, 27 Nov 2026) */
@keyframes drop { from { transform: translateY(-20px); opacity: 0; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- painted UI (art from web/assets/ui, switched on by the .painted-ui class when it exists) ---- */
.painted-ui .btn {
  --art: var(--art-btn-blue);
  background: none; box-shadow: none; border-style: solid; border-color: transparent; border-width: 0 30px;
  border-image: var(--art) 0 46% fill / 0 30px stretch; padding: 15px 2px 19px; filter: drop-shadow(0 5px 0 rgba(27, 8, 56, .3));
  /* the cap width again on its own: iPhone's engine drops the width part of a border-image shorthand that holds a var(), and a
     plain painted button lost its gold end caps there (the /games carousel's Play, 30 Nov 2026); .big already does this */
  border-image-width: 0 30px;
}
.painted-ui .btn::before { display: none; }
.painted-ui .btn.green, .painted-ui .btn.yellow { --art: var(--art-btn-green); }
.painted-ui .btn.pink, .painted-ui .btn.orange { --art: var(--art-btn-pink); }
.painted-ui .btn.purple { --art: var(--art-btn-purple); }
.painted-ui .btn.big { border-width: 0 36px; border-image-width: 0 36px; padding: 18px 2px 22px; }
/* Icon fallbacks need their full inner square: text-button border slices consumed
   almost all of a 64px button, squeezing the glyph down to a vertical sliver. */
.painted-ui .btn.icon{border:0;border-image:none;padding:0;background:var(--art) center/100% 100% no-repeat;flex-shrink:0}
.painted-ui .btn.icon svg{min-width:34px;min-height:34px}
.painted-ui .btn:active { transform: translateY(3px) scale(.98); box-shadow: none; }
.painted-ui .card { background: none; box-shadow: none; border: 30px solid transparent; border-image: var(--art-panel) 34% fill / 30px stretch; padding: 6px; filter: drop-shadow(0 6px 0 rgba(27, 8, 56, .3)); }
.painted-ui .card::before { display: none; }
.painted-ui .ribbon { background: none; box-shadow: none; border-style: solid; border-color: transparent; border-width: 0 46px; border-image: var(--art-ribbon) 0 26% fill / 0 46px stretch; padding: 12px 0 18px; }
.painted-ui .ribbon::before, .painted-ui .ribbon::after { display: none; }
.painted-ui .score-orb { background: var(--art-orb) center / contain no-repeat; border: 0; box-shadow: none; }
.bar .star img, .result-stars img { width: 100%; height: 100%; display: block; }

/* ---- painted backdrop: the sky world behind every screen ---- */
.has-sky body { background: radial-gradient(ellipse 75% 50% at 50% -6%, rgba(178, 140, 255, .42), rgba(178, 140, 255, 0) 70%) no-repeat fixed, var(--art-sky) center top / 84px 84px repeat fixed, linear-gradient(180deg, var(--sky-top), var(--sky-mid) 45%, var(--sky-bottom)); }

/* ---- popups and panels share the board's golden frame with leaves ---- */
.has-board .overlay .card, .has-board .panel {
  background: none; box-shadow: none; filter: drop-shadow(0 8px 0 rgba(27, 8, 56, .28));
  border: 34px solid transparent; border-image: var(--art-board) 150 fill / 34px stretch; padding: 4px 6px; color: #fff;
}
.has-board .overlay .card::before, .has-board .panel::before { display: none; }
.has-board .overlay .card .muted, .has-board .panel .muted { color: #e6dcff; }
.has-board .overlay .card > b, .has-board .overlay .card label { color: #fff; font-family: var(--display); font-weight: 400; letter-spacing: .4px; }
.layer, .stat, .seg button, .link-box, input.code { color: var(--ink); }
.overlay .card h2, .overlay .card h3 { margin: 0; }
input.code.name { font-size: 22px; letter-spacing: 1px; text-transform: none; }

/* ---- home ---- */
#app.home { max-width: 1120px; padding-left: 18px; padding-right: 18px; }
.home-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.home-top .logo { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.home-top .logo h1 { margin: 0; font-size: clamp(44px, 7vw, 68px); line-height: 1; }
.home-top .logo p { margin: 0; font-size: 17px; }
/* the painted logo, at its own height */
.home-top .logo:has(.brand-logo) { align-items: center; }
.app-brand { display:flex; flex-direction:column; align-items:center; gap:0; }
.gcards > .ad-slot { grid-column:1/-1;min-width:0; }
.gcards > .ad-slot:empty { display:none; }
.boards .board-period { grid-template-columns:repeat(2,minmax(0,1fr));align-self:center;justify-self:center;margin-inline:auto;width:max-content;max-width:100%;justify-content:center; }
.store-badges { display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:14px;padding:26px 12px; }
.store-badges a { display:block;line-height:0; }
.store-badges img { display:block;width:173px;max-width:100%;height:50px;object-fit:contain; }
.app-brand-games { color:#fff; font-family:var(--display),sans-serif; font-size:clamp(22px,3vw,32px); line-height:1; -webkit-text-stroke:5px #160627; paint-order:stroke fill; text-shadow:0 3px 0 #160627; margin-top:-5px; }
.home-top .logo .brand-logo { display: block; height: clamp(84px, 11vw, 118px); width: auto; filter: drop-shadow(0 4px 10px rgba(10, 0, 40, .45)); }
.home-top .row { gap: 8px; }
.home-top .pill { border: 0; cursor: pointer; font-size: 16px; padding: 7px 16px; }
.pill.me { padding: 4px 16px 4px 6px; }
.hello { text-align: center; font-size: 20px; margin: 10px 0 2px; }
.section-title { text-align: center; margin: 22px 0 18px; }
.section-title .ribbon .display { font-size: 24px; }

.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 26px 20px; }
.gcards.small { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.gcard {
  --c: var(--blue); position: relative; display: flex; flex-direction: column; min-height: 248px; color: #fff;
  border: 26px solid transparent; border-image: var(--art-board) 150 / 26px stretch;
  background: radial-gradient(120% 90% at 30% 0%, color-mix(in srgb, var(--c) 55%, #fff), var(--c) 55%, color-mix(in srgb, var(--c) 72%, #2a0b4d)) padding-box;
  filter: drop-shadow(0 8px 0 rgba(27, 8, 56, .28)); transition: transform .12s;
}
.gcard:hover { transform: translateY(-3px) rotate(-.4deg); }
.gcard.off { filter: grayscale(.35) drop-shadow(0 8px 0 rgba(27, 8, 56, .2)); }
.gcard .gicon { width: 96px; height: 96px; margin: -46px auto 2px; display: block; filter: drop-shadow(0 6px 0 rgba(27, 8, 56, .3)); object-fit: contain; }
.gcard .gicon:not([src]) { visibility: hidden; }
.gcard.small { min-height: 0; cursor: pointer; }
.gcard.small .gicon { width: 72px; height: 72px; margin-top: -34px; }
.gbody { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; flex: 1; }
.gbody h3 { margin: 0; font-size: 26px; }
.gcard.small .gbody h3 { font-size: 20px; }
.gbody p { margin: 0; font-weight: 900; font-size: 15px; color: #fff; text-shadow: 0 2px 0 rgba(27, 8, 56, .35); }
.gstatus { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; align-items: center; }
.chip { background: rgba(27, 8, 56, .38); border-radius: 999px; padding: 3px 11px; font: 400 14px var(--display); letter-spacing: .4px; }
.chip.done { background: #36c43a; box-shadow: inset 0 -3px 0 #1d8a22; }
.chip.todo { background: transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45); color: #f3ecff; } /* "Not played" next to Daily #: quiet, an outline only */
.gstatus .chip.done { display: inline-flex; align-items: center; justify-content: center; line-height: 1; padding-top: 4px; padding-bottom: 7px; text-align: center; }
.set-lang { min-height: 44px; }
.offline-level { margin-inline-start: 10px; max-width: 100%; cursor: pointer; }
.offline-level option { background: #351169; color: #fff; }
.set-line { flex-wrap: wrap; }
.set-text { min-width: 0; flex: 1 1 160px; overflow-wrap: anywhere; }
.set-line > .btn, .set-links > .btn { max-width: 100%; flex-shrink: 1; white-space: normal; overflow-wrap: break-word; }
.set-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation: none !important; transition: none !important; }
.sync-status { text-align: center; font-weight: 800; }
.plus-card .btn { white-space: normal; }
/* Plus plans (owner 12 Nov): one short line on the painted button, the plan's title and trial line just under it */
.plus-card .plus-plan-note { margin: -2px 0 8px; font: 700 13px/1.3 'Nunito', sans-serif; color: #e6dcff; text-align: center; }
.accessible-grid { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cw-cell[role="button"]:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.chip.soon { background: rgba(255, 255, 255, .28); }
.mini-stars { display: inline-flex; }
.mini-stars img, .mini-stars svg { width: 24px; height: 24px; }
.gbtns { display: flex; gap: 8px; margin-top: auto; width: 100%; justify-content: center; }
.gbtns .btn { flex: 1; max-width: 150px; font-size: 18px; }
.gmodes { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.gmodes .mode { font: 400 15px var(--display); color: #fff; letter-spacing: .4px; background: rgba(27, 8, 56, .32); border: 2px solid rgba(255, 255, 255, .55); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.gmodes .mode.done::after { content: ' ✓'; }

.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 34px; align-items: start; }
@media (max-width: 760px) { .home-cols { grid-template-columns: minmax(0, 1fr); } }
/* a long word (Dutch "Klassement" + its switches) must not stretch the column past a small screen: columns may shrink, panels too */
.home-cols > * { min-width: 0; }
.panel h2 { margin: 2px 0 10px; text-align: center; font-size: 24px; }
.panel h4 { margin: 10px 0 6px; font: 400 17px var(--display); letter-spacing: .4px; }
.small { font-size: 13px; }

.avatar { --s: 40px; position: relative; display: inline-block; width: var(--s); height: var(--s); flex: none; }
.avatar img { position: absolute; left: -6%; top: -24%; width: 112%; height: 112%; object-fit: contain; }
.avatar b { position: absolute; left: 0; right: 0; top: 52%; text-align: center; font-size: calc(var(--s) * .34); line-height: 1; font-weight: 400; }
/* your own character, alive (home.ts liveAvatar): it breathes; data-face shows one of its stacked faces; now and then a hop, a tilt or a wiggle */
.avatar.live .av-body { position: absolute; inset: 0; transform-origin: 50% 90%; animation: av-breathe 3.8s ease-in-out infinite; }
.avatar.live .f-blink, .avatar.live .f-happy, .avatar.live[data-face="blink"] .f-idle, .avatar.live[data-face="happy"] .f-idle { opacity: 0; }
.avatar.live[data-face="blink"] .f-blink, .avatar.live[data-face="happy"] .f-happy { opacity: 1; }
.avatar.live { transform-origin: 50% 90%; }
.avatar.live.hop { animation: av-hop .62s cubic-bezier(.3, 1.4, .5, 1); }
.avatar.live.tilt { animation: av-tilt 1.3s ease-in-out; }
.avatar.live.wiggle { animation: av-wiggle .7s ease-in-out; }
/* low energy (energy.ts, home.ts liveAvatar): the sad face, a slower droopy breath, a slow wiggle; no happy face */
.avatar.live .f-sad { opacity: 0; }
.avatar.live.tired .f-idle, .avatar.live.tired .f-blink, .avatar.live.tired .f-happy { opacity: 0 !important; }
.avatar.live.tired .f-sad { opacity: 1; }
.avatar.live.tired .av-body { animation: av-droop 5.5s ease-in-out infinite; }
.avatar.live.tired.wiggle { animation: av-wiggle 1.4s ease-in-out; }
@keyframes av-droop { 0%, 100% { transform: scale(1, 1) translateY(0); } 50% { transform: scale(1.02, .97) translateY(2%); } }
@keyframes av-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(.985, 1.03); } }
@keyframes av-hop { 0% { transform: none; } 30% { transform: translateY(-16%) scale(.95, 1.07); } 58% { transform: translateY(0) scale(1.08, .92); } 78% { transform: scale(.98, 1.02); } 100% { transform: none; } }
@keyframes av-tilt { 0%, 100% { transform: none; } 25%, 45% { transform: rotate(-9deg); } 65%, 80% { transform: rotate(6deg); } }
@keyframes av-wiggle { 0%, 100% { transform: none; } 20% { transform: rotate(7deg); } 40% { transform: rotate(-6deg); } 60% { transform: rotate(4deg); } 80% { transform: rotate(-2deg); } }
.people { display: grid; gap: 6px; }
.person, .invite { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .12); border-radius: 14px; padding: 6px 8px; font-weight: 900; }
/* the words take the room; the character keeps its own size (it is a span too) */
.person > span:not(.avatar), .person > .who, .invite > span:not(.avatar) { flex: 1 1 auto; min-width: 0; }
.invite { background: rgba(255, 210, 60, .25); margin-bottom: 6px; }
.btn.tiny { font-size: 15px; padding: 6px 14px 8px; flex: none; }
.painted-ui .btn.tiny { border-width: 0 18px; border-image-width: 0 18px; padding: 7px 6px 10px; } /* side padding: a long word (Reveal) otherwise runs under the curled ends */
.feed-wrap { margin-top: 12px; background: rgba(27, 8, 56, .35); border-radius: 16px; padding: 8px; }
.feed { max-height: 180px; overflow-y: auto; display: grid; gap: 6px; }
.bubble { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.bubble span { background: #fff; color: var(--ink); border-radius: 14px; padding: 4px 10px; }
.bubble.mine { flex-direction: row-reverse; }
.bubble.mine span { background: #ffe9a8; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; justify-content: center; }
.chip-btn { font: 400 15px var(--display); letter-spacing: .3px; color: var(--ink); background: linear-gradient(#fff, #e9ddff); border: 2.5px solid var(--ink); border-radius: 999px; padding: 5px 12px; cursor: pointer; box-shadow: 0 3px 0 rgba(27, 8, 56, .35); }
.chip-btn:active { transform: translateY(2px); box-shadow: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 6px; }
.tabs button { font: 400 15px var(--display); letter-spacing: .3px; color: var(--ink); background: #fff; border: 0; border-radius: 999px; padding: 5px 12px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); cursor: pointer; } /* white = not picked, yellow = picked: the "Not played yet" pill (owner, 27 Nov 2026) */
.tabs button.on { background: var(--lemon); color: var(--ink); }
.boards .layer .who { display: flex; align-items: center; gap: 6px; }
.boards .lb div { align-items: center; }
/* phones: two compact cards per row */
@media (max-width: 560px) {
  #app.home { padding-left: 10px; padding-right: 10px; }
  .gcards, .gcards.small { grid-template-columns: 1fr 1fr; gap: 30px 8px; }
  .gcard { min-height: 0; border-width: 16px; border-image-width: 16px; }
  .gcard .gicon, .gcard.small .gicon { width: 66px; height: 66px; margin-top: -32px; }
  .gbody { gap: 6px; }
  .gbody h3, .gcard.small .gbody h3 { font-size: 18px; }
  .gbody p { font-size: 12.5px; }
  .chip { font-size: 12px; padding: 2px 8px; }
  .gbtns { flex-direction: column; align-items: stretch; gap: 6px; }
  .gbtns .btn { max-width: none; font-size: 16px; }
  .painted-ui .gbtns .btn { border-width: 0 20px; border-image-width: 0 20px; padding: 9px 0 12px; }
  .gmodes .mode { font-size: 12.5px; padding: 3px 9px; }
  .home-top .logo h1 { font-size: 46px; }
  .home-top .logo .brand-logo { height: 60px; }
  .hello { font-size: 16px; }
  .has-board .panel { border-width: 22px; border-image-width: 22px; }
}

/* in-game tutorial captions */
.coach { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); width: min(92%, 460px); z-index: 4; display: flex; align-items: center; gap: 10px; color: #fff;
  background: linear-gradient(180deg, #6b2fd0, #43139a); border: 3px solid var(--ink); border-radius: 18px; padding: 10px 12px; box-shadow: 0 6px 0 rgba(27, 8, 56, .35); animation: drop .3s cubic-bezier(.2, 1.4, .4, 1); }
.has-board .coach { background: none; border: 18px solid transparent; border-image: var(--art-board) 150 fill / 18px stretch; border-radius: 0; padding: 0 2px; box-shadow: none; filter: drop-shadow(0 6px 0 rgba(27, 8, 56, .3)); }
.coach p { margin: 0; flex: 1; font-weight: 900; font-size: 15px; line-height: 1.3; }
/* a narrow card (small board, e.g. a phone browser with its bars) puts Skip / Next under the text instead of cutting Next off
   (owner, 11 Nov 2026); if even that row is too narrow the two buttons stack */
.coach { flex-wrap: wrap; justify-content: center; }
.coach p { flex: 1 1 11em; }
.coach .sq-coach-btns { flex-wrap: wrap; justify-content: center; max-width: 100%; }
.game-actions .btn { min-width: 0; }
.coach { bottom: auto; top: calc(100% - 22px); }
/* the tutorial card over a game's board (ui.ts coachOver): placed on the page by the script, above the game, with the
   game's small demo between the words and the buttons */
.coach.coach-over { position: absolute; right: auto; bottom: auto; margin: 0; transform: none; z-index: 30; box-sizing: border-box; }
.coach .coach-title { flex: 1 1 100%; margin: 0 0 -4px; text-align: center; font-size: 22px; line-height: 1.1; }
.coach .coach-media { flex: 1 1 100%; display: flex; justify-content: center; margin: 2px 0; }
.game-actions { flex-wrap: wrap; }
@media (max-width: 560px) {
  .game-actions { gap: 6px; }
  .game-actions .btn { font-size: 14px; white-space: nowrap; }
  .painted-ui .game-actions .btn { border-width: 0 16px; border-image-width: 0 16px; padding: 9px 0 12px; }
}

.result-stars img, .result-stars svg { width: 64px; height: 64px; flex: none; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-grid .btn.big { font-size: 19px; padding-left: 4px; padding-right: 4px; }
.overlay .card .stat-row { margin: 4px 0; }
.btn-grid > *, .stat-row > * { min-width: 0; }
.stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.painted-ui .btn-grid .btn.big { border-width: 0 22px; border-image-width: 0 22px; }
@media (max-width: 560px) {
  .overlay { padding: 10px; }
  .has-board .overlay .card { border-width: 22px; border-image-width: 22px; }
  .btn-grid .btn.big { font-size: 16px; }
  .stat small { font-size: 10px; letter-spacing: 0; }
}

/* ---- the living sky (web/src/fx/backdrop.ts) ---- */
.has-backdrop body { background: linear-gradient(180deg, var(--sky-top), var(--sky-mid) 45%, var(--sky-bottom)); }
.backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.has-backdrop #app { z-index: 1; }
.bd-layer { position: absolute; inset: -4% -3%; will-change: transform; }
.bd-far { background: center bottom / cover no-repeat; }
.bd-cloud, .bd-sparkle, .bd-butterfly, .bd-floater { position: absolute; left: 0; top: 0; will-change: transform; user-select: none; }
.bd-cloud { filter: drop-shadow(0 6px 10px rgba(40, 60, 160, .12)); }
.bd-sparkle { filter: drop-shadow(0 0 6px rgba(255, 250, 200, .9)); }
.bd-face { position: relative; transform-origin: 50% 100%; }
.bd-face img { position: absolute; left: -6%; top: -24%; width: 112%; height: 112%; object-fit: contain; filter: drop-shadow(0 4px 0 rgba(27, 8, 56, .22)); }
.bd-floater { display: flex; flex-direction: column; align-items: center; }
.bd-balloon { margin-bottom: -10px; filter: drop-shadow(0 6px 8px rgba(27, 8, 56, .2)); }

/* ---- buttons, bars and badges share the board's carved-gold rim (ui.btn.*, ui.bar) ---- */
/* the swirl end caps keep their shape (15% of the art, as wide as 0.6x the button's height); the middle stretches */
.painted-ui .btn { border-width: 0 32px; border-image: var(--art) 0 15% fill / 0 32px stretch; border-image-width: 0 32px; padding: 17px 4px 17px; } /* border-image-width again on its own: iPhone drops it from a shorthand holding a var() and the gold end caps vanish (1 Dec 2026, the Popular games Play Now) */
.painted-ui .btn.big { border-width: 0 40px; border-image-width: 0 40px; padding: 20px 4px 20px; } /* labels centred: the gold frame is as thick at the top as at the bottom (owner, 2 Dec 2026: labels read top-aligned) */
.painted-ui .btn.tiny, .painted-ui .btn-grid .btn.big { border-width: 0 24px; border-image-width: 0 24px; }
.has-btn-yellow.painted-ui .btn.yellow { --art: var(--art-btn-yellow); color: #fff; }
@media (max-width: 560px) {
  .painted-ui .gbtns .btn, .painted-ui .game-actions .btn { border-width: 0 24px; border-image-width: 0 24px; }
}
.has-bar .bar { height: 34px; border: 0; border-radius: 0; background: none; border-style: solid; border-color: transparent; border-width: 0 22px; border-image: var(--art-bar) 0 13% fill / 0 22px stretch; }
.has-bar .bar > i { inset: 9px auto 9px -6px; border-radius: 8px; max-width: calc(100% + 12px); }
.has-bar .bar .star { z-index: 1; }
.painted-ui .gbtns .btn { border-width: 0 26px; border-image-width: 0 26px; }
.gmodes .btn.tiny.mode { font-size: 15px; background: none; }
.painted-ui .gmodes .btn.tiny.mode { border-width: 0 20px; border-image-width: 0 20px; padding: 6px 2px 9px; border-radius: 0; }

/* ---- watching a live room ---- */
.wt-panels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.wt-panel.lead { filter: drop-shadow(0 0 14px rgba(255, 215, 80, .8)) drop-shadow(0 8px 0 rgba(27, 8, 56, .28)); }
.wt-head { display: flex; align-items: center; gap: 8px; font-weight: 900; margin-bottom: 8px; }
.wt-head span { flex: 1; }
.wt-head b { font-size: 22px; }
.wt-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.wt-cell { position: relative; aspect-ratio: 1; border-radius: 10px; background: var(--art-cell, #3a1f86) center / 100% 100% no-repeat; }
.wt-cell img { position: absolute; left: -2%; top: -14%; width: 104%; height: 104%; object-fit: contain; }
.wt-cell b { position: absolute; left: 0; right: 0; bottom: 6%; text-align: center; font-size: 15px; }

/* ---- coins, shop and power-ups ---- */
.coin-chip { display: inline-flex; align-items: center; gap: 6px; border: 0; cursor: pointer; background: rgba(27, 8, 56, .45); color: #fff; border-radius: 999px; padding: 4px 14px 4px 4px; font: 400 18px var(--display); letter-spacing: .5px; }
.coin-img { width: 30px; height: 30px; object-fit: contain; display: inline-block; }
.coin-img.fallback { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b0, #ffc21a 55%, #e08600); border: 2px solid #8a4b00; }
.power-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.power-tray { display: flex; gap: 8px; }
.power { position: relative; width: 62px; height: 62px; border: 0; padding: 0; background: var(--art-orb, radial-gradient(circle, #8f4dff 60%, #ffc21a 62%)) center / contain no-repeat; border-radius: 50%; cursor: pointer; transition: transform .1s; filter: drop-shadow(0 4px 0 rgba(27, 8, 56, .3)); }
.power img { position: absolute; left: 12%; top: 8%; width: 76%; height: 76%; object-fit: contain; }
.power.empty img { filter: grayscale(.7) brightness(.8); opacity: .8; }
.power .badge { position: absolute; right: -4px; top: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: #ff3159; color: #fff; border: 2px solid #fff; font: 400 13px var(--display); display: grid; place-items: center; padding: 0 4px; }
.power.empty .badge { background: #36c43a; }
.power:active { transform: scale(.92); }
.power-tray.picking .power { animation: pulse .45s infinite alternate; }
.shop { text-align: center; }
.shop .shop-list { text-align: start; }
.shop .shop-balance { display: flex; align-items: center; justify-content: center; gap: 8px; font: 400 26px var(--display); }
.shop-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr)); } /* never wider than a phone's panel (audit 19 Nov 2026: buy buttons stuck out 19px at 375) */
.shop-item { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .14); border-radius: 16px; padding: 8px 10px; }
.shop-item > img { width: 54px; height: 54px; object-fit: contain; flex: none; }
.shop-text { flex: 1; display: grid; gap: 2px; }
.shop-text b { font: 400 17px var(--display); letter-spacing: .3px; }
.shop-text small { font-weight: 800; font-size: 12.5px; opacity: .9; }
.chip.own { flex: none; }
.btn.buy { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.btn.buy .coin-img { width: 20px; height: 20px; }
.account input.bad { box-shadow: 0 0 0 3px #ff3d6e; border-color: #ff3d6e; } /* a field to fix (account.ts markField) */
.keep-going .btn.green { white-space: nowrap; } .keep-going .btn .coin-img { width: 26px; height: 26px; vertical-align: -5px; margin: 0 2px 0 6px; } /* Keep going (word-crawl/screen.ts): the price inside the button */
.layer.packs { font-size: 13.5px; }
.power.shop-btn { background: none; }
.power.shop-btn img { left: 0; top: 0; width: 100%; height: 100%; }
.power.framed { background: none; }
.power.framed img { left: 0; top: 0; width: 100%; height: 100%; }
.power.framed.empty img { filter: saturate(.8) brightness(.92); opacity: 1; }
.pack-row { display: flex; justify-content: center; gap: 10px; margin: 4px 0 6px; }
.pack-row img { width: 64px; height: 64px; object-fit: contain; filter: saturate(.85); }
.home-top .coin-chip { font-size: 17px; }
.shop-game { margin: 6px 2px 0; text-align: start; font: 400 16px var(--display); letter-spacing: .4px; }
.home-top .pill, .home-top .coin-chip { white-space: nowrap; }
.home-top .pill.me > span:last-child { min-width: 0; white-space: normal; overflow-wrap: anywhere; } /* never cut: a very long name wraps */
@media (max-width: 480px) {
  .home-top .row { width: 100%; justify-content: space-between; gap: 6px; flex-wrap: nowrap; }
  .home-top .pill { font-size: 14px; padding: 6px 11px; }
  .home-top .pill.me { padding: 3px 11px 3px 4px; min-width: 0; }
  .home-top .coin-chip { font-size: 15px; padding: 3px 11px 3px 3px; }
  .home-top .coin-chip .coin-img { width: 26px; height: 26px; }
}
.gmodes.friends { margin-top: 6px; }
.overlay .card.shop { width: min(780px, 100%); }
.layer.packs { display: flex; align-items: center; gap: 12px; text-align: start; }
.layer.packs .pack-row { margin: 0; flex: none; gap: 4px; }
.layer.packs .pack-row img { width: 54px; height: 54px; }
@media (max-width: 520px) { .layer.packs { flex-direction: column; text-align: center; } }
@media (max-width: 520px) {
  .shop .tabs { gap: 4px; margin-bottom: 2px; }
  .shop .tabs button { font-size: 12.5px; padding: 3px 9px; }
  .shop .shop-balance { font-size: 22px; }
  .shop-item { padding: 6px 8px; gap: 8px; }
  .shop-item > img { width: 42px; height: 42px; }
  .shop-text b { font-size: 15px; }
  .shop-text small { font-size: 11.5px; }
  .layer.packs { flex-direction: row; text-align: start; gap: 8px; padding: 8px 10px; font-size: 11.5px; line-height: 1.3; }
  .layer.packs .pack-row img { width: 30px; height: 30px; }
  .layer.packs h4 { margin: 0 0 2px; font-size: 14px; }
  .shop > p.small { font-size: 11px; }
}
@media (max-width: 520px) {
  .layer.packs .pack-row { display: none; }
  .card.shop.stack { gap: 7px; }
  .card.shop .btn.big { padding-top: 9px; padding-bottom: 9px; }
}
/* phones: one game per row, icon on the left, its buttons in rows beside it (no tall stacks) */
@media (max-width: 560px) {
  .gcards:not(.small) { grid-template-columns: 1fr; gap: 16px; }
  .gcards:not(.small) .gcard { display: grid; grid-template-columns: 74px 1fr; align-items: center; column-gap: 10px; }
  .gcards:not(.small) .gcard .gicon { width: 74px; height: 74px; margin: 0; align-self: start; }
  .gcards:not(.small) .gbody { align-items: stretch; text-align: start; gap: 6px; }
  .gcards:not(.small) .gbody h3 { font-size: 21px; }
  .gcards:not(.small) .gbody p { font-size: 13px; }
  .gcards:not(.small) .gstatus { justify-content: flex-start; }
  /* the three buttons run the full width of the card, under the icon too, centred and big (owner, 24 Nov 2026: the space under
     the icon was empty); the icon, name, line and status stay side by side above them */
  .gcards:not(.small) .gcard > .gbody { display: contents; }
  .gcards:not(.small) .gcard > .gicon { grid-column: 1; grid-row: 1 / span 4; }
  .gcards:not(.small) .gcard > .gbody > :not(.gbtns) { grid-column: 2; min-width: 0; }
  .gcards:not(.small) .gbtns { grid-column: 1 / -1; flex-direction: row; justify-content: center; margin-top: 6px; }
  .gcards:not(.small) .gbtns .btn { flex: 1; max-width: 33%; }
  .gcards:not(.small) .gmodes { justify-content: flex-start; }
}
/* Glow Gems in a line of text, and the glow tube progress bar (ui.tube.frame + ui.tube.glow) */
.gem-row { display: inline-flex; gap: 1px; vertical-align: -0.22em; }
.gem-row img { width: 1.15em; height: 1.15em; object-fit: contain; }
.has-tube .bar { height: 40px; border: 0; border-radius: 0; background: none; border-style: solid; border-color: transparent; border-width: 0 25px; border-image: var(--art-tube) 0 9% fill / 0 25px stretch; container-type: inline-size; }
.has-tube .bar > i { inset: 0 auto 0 0; max-width: 100%; border-radius: 0; background: var(--art-tube-glow) 0 0 / 100% 100%; -webkit-mask-image: linear-gradient(to left, transparent, #000 10px); mask-image: linear-gradient(to left, transparent, #000 10px); }
.has-tube .bar > i::after { display: none; }
.has-tube .bar .star { z-index: 1; width: 36px; height: 36px; }
.bd-scene { position: absolute; inset: -3%; background-repeat: no-repeat; filter: brightness(.94); display: none; animation: scene-drift 42s ease-in-out infinite alternate; }
@keyframes scene-drift { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.05) translate(-1.2%, -.8%); } }
@media (prefers-reduced-motion: reduce) { .bd-scene { animation: none; } }

/* ---- Adventure: the home banner, the world map and its levels ---- */
.adv-card { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin: 30px 0; padding: 14px 18px; cursor: pointer; color: #fff;
  border: 22px solid transparent; border-image: var(--art-board) 150 / 22px stretch;
  background: linear-gradient(90deg, rgba(23, 8, 70, .88), rgba(23, 8, 70, .35)), var(--map, #2a0b6d) center 38% / cover padding-box; filter: drop-shadow(0 8px 0 rgba(27, 8, 56, .28)); }
.adv-card .adv-rocket { width: 92px; animation: bob 1.8s ease-in-out infinite; }
.adv-body { display: grid; gap: 4px; justify-items: start; }
.adv-body h2 { margin: 0; font-size: 32px; }
.adv-body p { margin: 0; font-weight: 900; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
@media (max-width: 560px) { .adv-card { grid-template-columns: auto 1fr; } .adv-card > .btn { grid-column: 1 / -1; } .adv-card .adv-rocket { width: 64px; } .adv-body h2 { font-size: 26px; } }
@keyframes bob { 50% { translate: 0 -6px; } }

#app.story { max-width: none; padding: 0; background: #1d0b4e; } /* the map covers the page from the top; this deep purple shows only until its picture arrives */
html:has(#app.story) { scrollbar-width: none; }
html:has(#app.story)::-webkit-scrollbar { display: none; }
/* 100dvh: the map fills tall phones to the bottom (owner approved 18 Nov 2026; 100vh left a dark strip) */
.map { position: relative; width: auto; height: max(100vh, calc(100vw / var(--ratio))); height: max(100dvh, calc(100vw / var(--ratio))); aspect-ratio: var(--ratio); container-type: inline-size; --u: calc(var(--pad) * 1cqw); }
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map.unpainted { background: #1d0b52; }
.story-hud { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px;
  padding: calc(var(--safe-top) + 10px) 16px 30px; background: linear-gradient(rgba(12, 4, 44, .62), rgba(12, 4, 44, 0)); pointer-events: none; }
.story-hud > * { pointer-events: auto; }
.story-title { display: grid; justify-items: center; gap: 4px; pointer-events: none; min-width: 0; max-width: 100%; }
.story-title .ribbon { max-width: 100%; }
/* the middle column shrinks on narrow phones (minmax(0,1fr) above) so the coin chip and sound button never leave the screen */
@media (max-width: 400px) { .story-hud { gap: 6px; } .story-title .ribbon { font-size: 15px; padding-inline: 14px; } .glow-chip { font-size: 15px; padding: 2px 10px 2px 3px; } .glow-chip img { width: 28px; height: 28px; } }
.glow-chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(23, 8, 70, .7); border-radius: 999px; padding: 3px 16px 3px 4px; color: #fff; font: 400 18px var(--display); letter-spacing: .4px; }
.glow-chip img { width: 34px; height: 34px; object-fit: contain; }
.lv { position: absolute; transform: translate(-50%, -58%); width: var(--u); height: var(--u); border: 0; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; transition: transform .12s; }
.lv:hover { transform: translate(-50%, -64%) scale(1.08); }
.lv b.display { font-size: calc(var(--u) * .64); line-height: 1; -webkit-text-stroke: calc(var(--u) * .13) var(--ink); }
.lv.locked { filter: saturate(.5) brightness(.85); }
.lv-lock { width: calc(var(--u) * .8); height: calc(var(--u) * .8); object-fit: contain; }
.lv-crown { position: absolute; top: calc(var(--u) * -.65); width: calc(var(--u) * .7); }
.lv-gems { position: absolute; top: calc(var(--u) * .86); display: flex; }
.lv-gems img { width: calc(var(--u) * .38); height: calc(var(--u) * .38); object-fit: contain; }
.lv.here::before { content: ''; position: absolute; inset: calc(var(--u) * -.12); border-radius: 50%; box-shadow: 0 0 0 calc(var(--u) * .06) rgba(255, 255, 255, .9), 0 0 calc(var(--u) * .3) calc(var(--u) * .1) #fff6a8; animation: here-glow 1s ease-in-out infinite alternate; }
@keyframes here-glow { to { opacity: .45; } }
.rocket { position: absolute; width: calc(var(--u) * 1.1); transform: translate(-20%, -150%) rotate(-8deg); cursor: pointer; animation: bob 1.6s ease-in-out infinite; } /* tapping the rocket plays its level too */
/* the current level: a bigger tap area than its painted pad (owner, 17 Nov 2026) */
.lv.here::after { content: ''; position: absolute; inset: calc(var(--u) * -.45); border-radius: 50%; }
/* a world that is not open yet: the whole map grey, "Coming soon" in colour in the middle */
.map.soon .map-art, .map.soon .lv, .map.soon > :not(.lv) { filter: grayscale(1) brightness(.75); }
.soon-badge { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-4deg); z-index: 6; padding: 14px 30px 18px; border-radius: 22px; border: 4px solid #ffd34d; background: linear-gradient(180deg, #b44bff, #6a1fd1); box-shadow: 0 8px 0 rgba(27, 8, 56, .45), 0 0 40px rgba(255, 211, 77, .55); pointer-events: none; }
.soon-badge .display { color: #fff; white-space: nowrap; }
.map-boss { position: absolute; width: calc(var(--u) * 1.7); transform: translate(-50%, -88%); pointer-events: none; animation: bob 2.6s ease-in-out infinite; }
.wnav { position: fixed; top: 50%; z-index: 5; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; font: 400 36px/1 var(--display); color: #fff; background: var(--art-orb) center / contain no-repeat; -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; }
.wnav.prev { left: 12px; } .wnav.next { right: 12px; }
.level-card .boss-art { width: 140px; height: 150px; object-fit: contain; }
.level-card .goal { font: 400 20px var(--display); color: #fff; letter-spacing: .4px; }
.level-done .freed { display: grid; justify-items: center; gap: 4px; }
.level-done .freed img { width: 120px; }
.gate-art { width: 120px; }
.goal-chip { width: fit-content; margin: 2px auto 0; background: rgba(23, 8, 70, .55); color: #fff; border-radius: 999px; padding: 3px 14px; font: 400 16px var(--display); letter-spacing: .4px; }
.goal-chip.met { background: #36c43a; } .goal-chip.low { background: #ff3159; }
.lv.own-pad::after { content: ''; position: absolute; z-index: -1; left: 50%; top: 66%; width: calc(var(--u) * 1.2); aspect-ratio: 76 / 48; transform: translate(-50%, -50%); background: var(--pad-art) center / contain no-repeat; }
.gate-banner { position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 18px); transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 12px; width: min(560px, calc(100vw - 32px));
  padding: 10px 16px; color: #fff; border: 18px solid transparent; border-image: var(--art-board) 150 / 18px stretch; background: rgba(32, 10, 86, .92) padding-box; filter: drop-shadow(0 6px 0 rgba(8, 3, 34, .4)); }
.gate-banner img { width: 64px; flex: none; }
.gate-banner p { margin: 2px 0 0; font-weight: 800; font-size: 14px; }

/* the moving parts of a painted map (tools/map-fx.mjs masks): on the map page and behind a level */
.map-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  -webkit-mask: var(--mask) var(--bg-pos, 0 0) / var(--bg-size, 100% 100%) no-repeat; mask: var(--mask) var(--bg-pos, 0 0) / var(--bg-size, 100% 100%) no-repeat; }
.map-fx > i { position: absolute; display: block; will-change: transform; }
.fx-water > i { left: 0; right: 0; top: -48px; bottom: 0; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0) 0 20px, rgba(255, 255, 255, .42) 26px, rgba(255, 255, 255, 0) 32px 48px); animation: fx-flow 1.4s linear infinite; }
@keyframes fx-flow { to { transform: translateY(48px); } }
.fx-pond > i { top: 0; bottom: 0; left: -100px; right: -100px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0) 0 36px, rgba(255, 255, 255, .3) 46px, rgba(255, 255, 255, 0) 56px 100px); animation: fx-shimmer 4s linear infinite; }
@keyframes fx-shimmer { to { transform: translateX(100px); } }
.fx-trees > i { inset: 0; background: var(--art) var(--bg-pos, 0 0) / var(--bg-size, 100% 100%) no-repeat; animation: fx-sway 3.2s ease-in-out infinite alternate; }
@keyframes fx-sway { from { transform: translate(-1.3px, 0); } to { transform: translate(1.3px, -.7px); } }
.fx-bubbles > i { top: 0; bottom: 0; left: -45%; width: 45%; background: linear-gradient(110deg, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, .6) 50%, rgba(255, 255, 255, 0) 75%); animation: fx-glint 7s ease-in-out infinite; }
@keyframes fx-glint { 0% { transform: translateX(0); } 55%, 100% { transform: translateX(330%); } }
.hint-hand { position: fixed; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .2s; filter: drop-shadow(0 6px 0 rgba(27, 8, 56, .3)); }
/* a popup opened while the hand points (the shop during a demo, 11 Nov 2026): the hand waits behind it, out of sight */
body:has(> .overlay) > .hint-hand { visibility: hidden; }
.hint-hand.on { opacity: 1; animation: hint-tap .8s ease-in-out infinite; }
@keyframes hint-tap { 0%, 100% { translate: -12px 0; } 50% { translate: 0 0; } }
/* scrollbars: no inner panel shows one (they still scroll by wheel and touch); the PAGE shows the browser's normal bar on
   the games home page, Past Answers, list pages and games with a page under the board (owner, 22 Nov 2026; which pages:
   web/src/pagescroll.ts sets html[data-scroll="page"]). Phones and the apps show their own bar while scrolling. */
*:not(html), html:not([data-scroll="page"]) { scrollbar-width: none; }
*:not(html)::-webkit-scrollbar, html:not([data-scroll="page"])::-webkit-scrollbar { display: none; width: 0; height: 0; }
html[data-scroll="page"] { overflow-y: scroll; }
.feed, .feed-wrap { overflow-x: hidden; }
/* the chat room panel */
.chat-room { margin-top: 26px; }
.chat-room .feed-wrap { background: rgba(23, 8, 70, .35); border-radius: 16px; padding: 8px; }
.chat-room .feed { max-height: 260px; min-height: 120px; overflow-y: auto; }
.chat-room .bubble { position: relative; }
.chat-room .bubble .msg-more { margin-left: auto; border: 0; background: rgba(255, 255, 255, .25); color: #fff; border-radius: 999px; width: 26px; height: 22px; cursor: pointer; font-weight: 900; flex: none; }
.composer { display: grid; gap: 8px; margin-top: 10px; }
/* min-width 0: the text box gives way on a phone instead of pushing the card it sits in wider than the screen;
   where the box and Send don't both fit with room for the hint, Send goes under the box */
.chat-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-width: 0; }
.chat-input { flex: 1 1 12em; min-width: 0; border: 3px solid var(--ink); border-radius: 999px; padding: 8px 14px; font: 800 15px var(--body, 'Nunito'), sans-serif; }
.account .field { display: grid; gap: 4px; text-align: start; width: 100%; }
.account .field > span { font: 400 15px var(--display); color: #fff; letter-spacing: .4px; }
.btn.link { background: none; border: 0; box-shadow: none; color: #fff; text-decoration: underline; font-size: 14px; }
/* the Adventure banner's map stays inside its gold frame, corners included */
.adv-card { background-clip: padding-box; background-origin: padding-box; border-radius: 40px; }

/* profile pages */
#app.profile-page { max-width: 640px; }
.profile-card { display: grid; justify-items: center; gap: 8px; text-align: center; margin-top: 10px; }
.profile-card h2 { margin: 0; font-size: 32px; }
.profile-card .stat-row { width: 100%; }
.profile-card .stat b img { width: 1.1em; height: 1.1em; vertical-align: -0.18em; object-fit: contain; }
.adventure-line { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; }
.adventure-line > img { width: 44px; }
.adventure-line h4 { margin: 0; }
.freed-row { margin-left: auto; display: flex; gap: 2px; }
.freed-row img { width: 42px; height: 42px; object-fit: contain; }
.history { margin-top: 20px; }
.history-list { display: grid; gap: 6px; }
.history-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; background: rgba(255, 255, 255, .12); border-radius: 14px; padding: 6px 10px; color: #fff; text-align: start; }
.history-row img { width: 44px; height: 44px; object-fit: contain; }
.history-row b { font: 400 17px var(--display); letter-spacing: .3px; }
.history-row small { display: block; font-weight: 800; font-size: 12.5px; opacity: .85; }
.history-row .result { font: 400 17px var(--display); white-space: nowrap; }
.who-link { color: inherit; font-weight: 900; text-decoration: none; } /* names never underlined */
.profile-card .stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }

/* badges and streaks */
.badge-img { width: 64px; height: 64px; object-fit: contain; display: block; }
.badge-img.blank { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1a8, #ffc21a 60%, #c27a00); }
.badge-img.locked { filter: grayscale(1) brightness(.75); opacity: .55; }
.badges { margin-top: 20px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.badge-cell { position: relative; display: grid; justify-items: center; gap: 3px; border: 0; background: rgba(255, 255, 255, .1); border-radius: 16px; padding: 8px 4px; color: #fff; cursor: pointer; }
.badge-cell b { font: 400 13px var(--display); letter-spacing: .3px; text-align: center; line-height: 1.1; }
.badge-cell small { font-weight: 900; font-size: 11.5px; opacity: .85; }
.badge-cell.earned { background: rgba(255, 214, 90, .22); box-shadow: inset 0 0 0 2px rgba(255, 214, 90, .6); }
.plus-tag { position: absolute; top: 4px; right: 4px; background: linear-gradient(#ffe27a, #e0a10f); color: #5a3300; border-radius: 999px; padding: 1px 7px; font: 400 11px var(--display); }
.streak-line { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; }
.streak-line h4 { margin: 0; }
.streak-line .badge-img { width: 48px; height: 48px; }
.streak-chip { display: inline-flex; align-items: center; gap: 4px; background: rgba(27, 8, 56, .45); color: #fff; border-radius: 999px; padding: 2px 12px 2px 2px; font: 400 18px var(--display); white-space: nowrap; }
.streak-chip .badge-img { width: 30px; height: 30px; }
.streak-chip.due { animation: streak-due 1.4s ease-in-out infinite; }
@keyframes streak-due { 50% { box-shadow: 0 0 0 4px rgba(255, 196, 20, .55); } }
@media (max-width: 480px) { .home-top .streak-chip { font-size: 15px; } .home-top .streak-chip .badge-img { width: 24px; height: 24px; } }
/* the home header's battery, coins and streak sit on the page with no purple pill behind them (owner, 2 Dec 2026); the numbers
   keep a dark edge so they read on the background */
.home-top .top-bar .coin-chip, .home-top .top-bar .streak-chip { background: transparent; box-shadow: none; }
.home-top .top-bar .coin-chip b, .home-top .top-bar .streak-chip { -webkit-text-stroke: 4px #1b0838; paint-order: stroke fill; }
/* a small green + after the coins and after the battery (below full) says "tap to add more" (owner, 2 Dec 2026) */
.home-top .top-bar .coin-counter::after, .home-top .top-bar .energy-chip.can-add::after { content: '+'; display: inline-grid; place-items: center; flex: none; width: 19px; height: 19px; margin-inline-start: 5px; border-radius: 50%; background: #36c43a; box-shadow: inset 0 -2px 0 #1d8a22, 0 0 0 2px #1b0838; color: #fff; font: 400 17px/1 var(--display); -webkit-text-stroke: 0; padding-bottom: 2px; box-sizing: border-box; }
@media (max-width: 480px) { .home-top .top-bar .coin-counter::after, .home-top .top-bar .energy-chip.can-add::after { width: 17px; height: 17px; font-size: 15px; margin-inline-start: 4px; } }

/* badge tiers: the cell glows in the badge's material */
.badge-cell.tier-crystal.earned { background: rgba(120, 230, 255, .2); box-shadow: inset 0 0 0 2px rgba(150, 240, 255, .7); }
.badge-cell.tier-gold.earned { background: rgba(255, 200, 60, .24); box-shadow: inset 0 0 0 2px #ffcf4a, 0 0 14px rgba(255, 200, 60, .45); }
.badge-cell.tier-platinum.earned { background: linear-gradient(135deg, rgba(255, 255, 255, .28), rgba(190, 220, 255, .2), rgba(255, 190, 240, .22)); box-shadow: inset 0 0 0 2px #fff, 0 0 18px rgba(220, 230, 255, .6); }
.badge-cell.tier-gold::before, .badge-cell.tier-platinum::before { content: ''; position: absolute; top: 6px; left: 6px; width: 9px; height: 9px; border-radius: 50%; background: #ffcf4a; box-shadow: 0 0 6px #ffcf4a; }
.badge-cell.tier-platinum::before { background: #fff; box-shadow: 0 0 8px #cfe6ff; }
.tier-chip { align-self: center; justify-self: center; width: fit-content; max-width: 100%; text-align: center; overflow-wrap: anywhere; border-radius: 999px; padding: 3px 12px; font: 400 14px var(--display); letter-spacing: .3px; color: var(--ink); background: var(--lemon) !important; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); } /* one yellow pill for every tier (owner, 27 Nov 2026: no grey bar) */
.tier-chip.tier-stone { background: #c9c2dc; } .tier-chip.tier-crystal { background: #9fefff; } .tier-chip.tier-gold { background: linear-gradient(#ffe27a, #e0a10f); } .tier-chip.tier-platinum { background: linear-gradient(135deg, #fff, #d6e4ff, #ffd6f2); }
/* ads: labelled, framed in our style, never inside a game */
.ad-tag { align-self: flex-start; background: rgba(255, 255, 255, .85); color: #2a0b4d; border-radius: 6px; padding: 1px 7px; font: 800 11px 'Nunito', sans-serif; text-transform: uppercase; letter-spacing: .5px; }
.ad-body { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; color: #fff; }
.ad-body > img { width: 72px; height: 72px; object-fit: contain; flex: none; }
.ad-body p { margin: 2px 0 0; font-weight: 800; font-size: 14px; }
.ad-body > .btn { margin-left: auto; flex: none; }
.ad-slot:empty { display: none; }
.ad-card { margin-top: 26px; display: grid; gap: 6px; }
.ad-reward { display: flex; align-items: center; gap: 10px; background: rgba(54, 196, 58, .18); border-radius: 16px; padding: 8px 10px; text-align: start; }
.ad-reward:empty { display: none; }
.ad-reward > img { width: 46px; height: 46px; object-fit: contain; }
.ad-reward small { display: block; font-weight: 800; opacity: .85; }
.ad-reward > .btn { margin-left: auto; }
/* locked tiles and the Plus card */
.locked-tile { cursor: pointer; }
.locked-tile .lock-art { position: relative; width: 72px; height: 72px; margin: -34px auto 2px; }
.locked-tile .lock-art .gicon { width: 72px; height: 72px; margin: 0; filter: saturate(.55) brightness(.8) drop-shadow(0 6px 0 rgba(27, 8, 56, .3)); }
.locked-tile.wide-art .lock-art .gicon { object-fit: cover; border-radius: 50%; border: 4px solid #ffcf4a; }
.locked-tile .lock-badge { position: absolute; right: -10px; bottom: -6px; width: 36px; height: 36px; object-fit: contain; }
.locked-tile .plus-tag { top: 8px; right: 8px; }
.plus-card .plus-hero { width: 110px; }
.plus-perks { display: grid; gap: 8px; width: 100%; }
.plus-perk { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .12); border-radius: 14px; padding: 6px 10px; text-align: start; color: #fff; }
.plus-perk img { width: 48px; height: 48px; object-fit: contain; flex: none; }
.plus-perk b { font: 400 16px var(--display); display: block; }
.plus-perk small { font-weight: 800; opacity: .9; }
/* no long buttons anywhere: big buttons stop at a comfortable width and sit centred */
.btn.big { max-width: 300px; justify-self: center; margin-left: auto; margin-right: auto; }
.btn-grid { grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: center; }
.btn-grid > .btn { width: 100%; }
.composer .btn-grid .btn, .chat-room .btn-grid .btn { max-width: 220px; }
.chat-line .btn { flex: none; }
/* card rows centre their last row (e.g. three cards under a heading) */
.gcards { display: flex; flex-wrap: wrap; justify-content: center; }
.gcards > .gcard { width: calc((100% - 60px) / 4); min-width: 230px; }
@media (max-width: 560px) {
  .gcards { display: grid; }
  .gcards > .gcard { width: auto; min-width: 0; }
}
/* badge cards: one size for all, whatever the name's length */
.badge-cell.tier-gold::before, .badge-cell.tier-platinum::before { display: none; }
.badge-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); grid-auto-rows: 1fr; }
.badge-cell { grid-template-rows: 64px 2.3em auto; align-content: start; align-items: center; height: 100%; padding: 10px 6px; }
.badge-cell b { align-self: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge-cell small { align-self: start; }

/* daily quests and the reward calendar */
.quests { margin-top: 26px; }
.quest-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.quest { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; background: rgba(255, 255, 255, .12); border-radius: 16px; padding: 8px 10px; color: #fff; text-align: start; }
.quest.done { background: rgba(54, 196, 58, .25); box-shadow: inset 0 0 0 2px rgba(120, 255, 120, .5); }
.quest.claimed { opacity: .65; }
.quest-icon { width: 52px; height: 52px; object-fit: contain; }
.quest-text { display: grid; gap: 3px; min-width: 0; }
.quest-text b { font: 400 16px var(--display); letter-spacing: .3px; }
.quest-text small { font-weight: 800; font-size: 12px; opacity: .85; }
.quest-text .bar { height: 26px; }
.quest-claim { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.quest-claim .coin-img { width: 20px; height: 20px; }
.quest-tick { font: 400 26px var(--display); color: #7dff7a; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
/* the reward week (quests.ts): seven days (Sunday's chest spans two on a phone), today lit, collected days
   ticked, missed ones marked, days before the player's first visit dimmed; then what today gave (Sunday: the
   chest that opens) and the gold chest's line. Text wraps rather than shrinking or cutting off. */
.overlay .card.calendar { width: min(660px, 100%); }
.rw-week { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(0, 1.4fr); grid-auto-rows: 1fr; gap: 7px; width: 100%; }
.overlay .card.streak-card { width:min(720px,100%); }
.streak-reward-history { width:100%;min-width:0;display:grid;gap:8px; }
.streak-reward-history .rw-history-row { grid-template-columns:repeat(7,minmax(78px,1fr));overflow-x:auto;padding:18px 12px 12px;scroll-snap-type:x proximity; }
.rw-history-row .rw-day { scroll-snap-align:start; }
.rw-history-row .rw-day.rw-sun { grid-column:auto; }
.rw-history-hint { margin:0;text-align:center; }
@media(min-width:680px){.rw-history-hint{display:none;}}
.rw-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 6px 3px 8px; border-radius: 14px; background: rgba(255, 255, 255, .12); color: inherit; text-align: center; }
.rw-wd { font-weight: 900; font-size: 12px; line-height: 1.15; text-transform: capitalize; overflow-wrap: break-word; }
.rw-gifts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px 7px; min-width: 0; }
.rw-gift { display: inline-flex; align-items: center; gap: 2px; min-width: 0; font: 400 14px var(--display); letter-spacing: .3px; line-height: 1.15; }
.rw-ico { width: 24px; height: 24px; object-fit: contain; flex: none; }
.rw-day.today { background: rgba(255, 207, 74, .3); box-shadow: inset 0 0 0 3px #ffcf4a, 0 0 16px rgba(255, 207, 74, .55); }
.rw-day.done > :not(.rw-tick) { opacity: .75; }
.rw-day.missed > :not(.rw-missed), .rw-day.before > * { opacity: .4; }
.rw-day.before { background: rgba(255, 255, 255, .05); }
.rw-tick { position: absolute; top: -8px; right: -6px; width: 26px; height: 26px; object-fit: contain; }
span.rw-tick { width: auto; height: auto; font-size: 20px; }
.rw-missed { max-width: 100%; padding: 1px 5px; border-radius: 999px; background: rgba(23, 8, 70, .7); font-weight: 900; font-size: 11px; line-height: 1.3; }
.rw-chest { width: 44px; height: 44px; object-fit: contain; }
.rw-tier { font: 400 12.5px var(--display); letter-spacing: .3px; line-height: 1.1; overflow-wrap: break-word; }
.rw-count { font-weight: 900; font-size: 11.5px; }
.tint-bronze { filter: drop-shadow(0 0 5px #e08a3c); } .tint-silver { filter: drop-shadow(0 0 5px #dfe9ff); } .tint-gold { filter: drop-shadow(0 0 6px #ffcf4a); }
.rw-got { gap: 6px 14px; }
.rw-got .rw-gift { font-size: 17px; gap: 5px; text-align: start; }
.rw-got .rw-ico { width: 34px; height: 34px; }
.rw-gift.look { gap: 6px; }
.rw-look-art { flex: none; object-fit: contain; width: 32px; height: 32px; }
.rw-look-art.banner { width: 64px; height: 26px; object-fit: cover; border-radius: 6px; }
.rw-got .rw-look-art { width: 44px; height: 44px; }
.rw-got .rw-look-art.banner { width: 96px; height: 36px; }
.rw-saved { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; }
.rw-saved .rw-ico { width: 30px; height: 30px; }
.rw-saved b { font: 400 16px var(--display); letter-spacing: .3px; line-height: 1.2; text-wrap: balance; }
.rw-gold { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 16px; background: rgba(255, 207, 74, .14); box-shadow: inset 0 0 0 2px rgba(255, 207, 74, .45); text-align: start; }
.rw-gold-chest { width: 58px; height: 58px; object-fit: contain; flex: none; }
.rw-gold-text { display: grid; gap: 4px; min-width: 0; }
.rw-gold-text > b { font: 400 15px var(--display); letter-spacing: .3px; line-height: 1.2; text-wrap: balance; }
.rw-gold-text small, .rw-next { font-weight: 800; font-size: 12.5px; line-height: 1.3; }
.rw-gold .rw-gifts { justify-content: flex-start; }
.rw-gold > .rw-next { width: 100%; text-align: center; }
.rw-chest-box { display: grid; justify-items: center; gap: 4px; }
.rw-big-chest { width: 120px; height: 120px; object-fit: contain; }
.rw-chest-box.opened .rw-big-chest { animation: rw-open .7s cubic-bezier(.3, 1.6, .5, 1); }
.rw-chest-box .rw-got:not(:empty) { margin-top: 4px; animation: rw-pop .5s .25s both cubic-bezier(.3, 1.5, .5, 1); }
@keyframes rw-open { 25% { transform: scale(.9) rotate(-6deg); } 55% { transform: scale(1.18) rotate(5deg); } }
@keyframes rw-pop { from { opacity: 0; transform: translateY(10px) scale(.8); } }
@media (max-width: 560px) {
  .rw-week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rw-day.rw-sun { grid-column: span 2; }
}
@media (prefers-reduced-motion: reduce) { .rw-chest-box .rw-big-chest, .rw-chest-box .rw-got { animation: none !important; } }
/* bringing back a broken streak (home.ts): a line under the greeting, like a friend's notice */
.rw-restore { display: flex; align-items: center; gap: 10px; max-width: 640px; margin: 12px auto 4px; padding: 8px 12px; color: #fff;
  background: rgba(27, 8, 56, .5); border: 2px solid rgba(255, 207, 74, .6); border-radius: 18px; box-shadow: 0 4px 0 rgba(27, 8, 56, .3); }
.rw-restore-flame { width: 40px; height: 40px; object-fit: contain; flex: none; }
.rw-restore-text { flex: 1 1 auto; min-width: 0; font-weight: 900; font-size: 15px; line-height: 1.3; text-wrap: balance; }
.rw-restore-btn { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.rw-restore-btn .coin-img { width: 22px; height: 22px; }
.rw-restore-slot:empty { display: none; }
/* notifications (pushask.ts): the home page's line while they are off, and the first-open card's sentence */
.push-home-slot:empty { display: none; }
.push-home-slot { width: 100%; max-width: 640px; margin: 6px auto 8px; padding: 0 14px; box-sizing: border-box; }
/* one yellow pill row, the "Not played yet" chip's look (owner, 28 Nov 2026) */
.push-pill { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 3px 4px 3px 14px; box-sizing: border-box; border-radius: 999px; background: var(--lemon); color: var(--ink);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); font: 400 15px var(--display); letter-spacing: .3px; cursor: pointer; text-align: start; }
.push-pill:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.push-pill-text { flex: 1 1 auto; min-width: 0; }
.push-pill-x { appearance: none; flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: #47cc22; color: #fff; display: grid; place-items: center;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); cursor: pointer; }
.push-pill-x svg { width: 14px; height: 14px; display: block; }
[dir=rtl] .push-pill { padding: 3px 14px 3px 4px; }
.push-home { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: start; }
.push-home-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.push-home-bell { width: 44px; height: 44px; object-fit: contain; flex: none; }
.push-home-text { flex: 1 1 auto; min-width: 0; color: #fff; font-weight: 900; font-size: 15px; line-height: 1.3; text-wrap: balance; }
.push-home-btn { max-width: 100%; }
.push-home .push-home-x { position: absolute; top: -20px; right: -20px; z-index: 3; width: 46px; height: 46px; padding: 0; }
.has-board .push-home .push-home-x { top: -44px; right: -26px; } /* on the corner, inside the screen */
.push-home .push-home-x img { width: 46px; height: 46px; display: block; }
[dir=rtl] .push-home .push-home-x { right: auto; left: -20px; }
[dir=rtl] .has-board .push-home .push-home-x { right: auto; left: -26px; }

/* the week's timed event on home (events.ts): its art, name, countdown and points, the top 3, its buttons, in the
   same painted gold frame as the Adventure card (its own painted banner behind it, like Adventure's map, once it
   exists); on a phone the buttons go under it and the top 3 stays in the leaderboard card */
.ev-banner { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 14px; margin: 30px 0; padding: 12px 16px; color: #fff;
  border: 22px solid transparent; border-image: var(--art-board) 150 / 22px stretch; border-radius: 40px;
  background: linear-gradient(90deg, rgba(23, 8, 70, .92), rgba(58, 18, 120, .78)) padding-box; background-origin: padding-box;
  filter: drop-shadow(0 8px 0 rgba(27, 8, 56, .28)); }
.ev-banner.has-map { background: linear-gradient(90deg, rgba(23, 8, 70, .88), rgba(23, 8, 70, .35)), var(--map) center / cover padding-box; }
.has-rim .ev-banner { border-image-source: var(--art-rim); border-image-outset: .08; background-clip: border-box; background-origin: border-box; border-radius: 10px; }
.ev-banner:empty { display: none; }
.ev-art { width: 84px; height: 84px; object-fit: contain; filter: drop-shadow(0 4px 0 rgba(27, 8, 56, .35)); }
.ev-waiting { margin: 0; font-weight: 900; font-size: 13.5px; line-height: 1.3; color: #ffe27a; }
.ev-gift { white-space: nowrap; }
.ev-news { background: rgba(255, 207, 74, .3); }
.ev-body { display: grid; gap: 4px; min-width: 0; }
.ev-label { font-weight: 900; font-size: 12px; color: #ffe27a; text-transform: uppercase; letter-spacing: .5px; }
.ev-name { margin: 0; overflow-wrap: break-word; }
.ev-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-me { margin: 0; font-weight: 800; font-size: 14px; line-height: 1.3; }
.ev-top3 { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ev-mini { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font-weight: 800; font-size: 13px; }
.ev-mini.you { color: #ffe27a; }
.ev-mini-name { overflow-wrap: anywhere; }
.ev-btns { display: grid; gap: 6px; justify-items: stretch; }
.ev-btns > .btn { width: auto; max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; }
@media (max-width: 640px) {
  .ev-banner { grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 8px 10px; }
  .ev-art { width: 56px; height: 56px; }
  .ev-top3 { display: none; }
  .ev-btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .ev-btns > .btn { flex: 0 1 auto; }
  /* slimmer painted ends, so two buttons share a row and the card stays short */
  .painted-ui .ev-btns > .btn { border-width: 0 18px; border-image-width: 0 18px; padding-top: 11px; padding-bottom: 14px; min-height: 46px; }
}
/* the event's leaderboard card */
.ev-rule { margin: 0; font-weight: 800; font-size: 14px; line-height: 1.35; }
.ev-list { display: grid; gap: 4px; width: 100%; }
.ev-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 12px; background: rgba(255, 255, 255, .1); text-align: start; }
.ev-row.you { background: rgba(255, 207, 74, .25); box-shadow: inset 0 0 0 2px rgba(255, 207, 74, .6); }
.ev-rank, .ev-pts { font: 400 16px var(--display); }
.ev-pts { text-align: end; }

/* the season pass: its card on home and its page (season.ts) */
.sp-card { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 26px; color: #fff; cursor: pointer; }
.sp-card-art { width: 76px; height: 76px; object-fit: contain; }
.sp-card-body { display: grid; gap: 4px; min-width: 0; justify-items: start; }
.sp-card-body h3 { margin: 0; }
.sp-card-line { margin: 0; font-weight: 800; font-size: 13.5px; line-height: 1.3; }
.sp-card > .btn { white-space: normal; }
@media (max-width: 640px) {
  .sp-card { grid-template-columns: 60px minmax(0, 1fr); }
  .sp-card-art { width: 60px; height: 60px; }
  .sp-card > .btn { grid-column: 1 / -1; justify-self: center; }
}
.sp-xp { display: grid; gap: 2px; width: 100%; }
.sp-xp .bar { height: 18px; }
.sp-xp small { font-weight: 800; font-size: 12px; }
#app.season-page { max-width: 680px; }
.sp-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 10px; color: #fff; }
.sp-hero { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 14px; }
.sp-hero-art { width: 110px; height: 110px; object-fit: contain; }
.sp-hero-body { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.sp-hero-body h2 { margin: 0; text-align: start; }
.sp-tier { font: 400 18px var(--display); letter-spacing: .3px; }
.sp-premium { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.sp-premium-art { width: 56px; height: 56px; object-fit: contain; }
.sp-premium-body { display: grid; gap: 3px; min-width: 0; }
.sp-premium-body b { font: 400 17px var(--display); letter-spacing: .3px; }
.sp-premium-body p { margin: 0; font-weight: 800; font-size: 13.5px; line-height: 1.35; }
.sp-premium-body small { font-weight: 800; color: #ffe27a; }
.sp-unlock { white-space: normal; }
@media (max-width: 560px) {
  .sp-hero { grid-template-columns: 80px minmax(0, 1fr); }
  .sp-hero-art { width: 80px; height: 80px; }
  .sp-premium { grid-template-columns: 48px minmax(0, 1fr); }
  .sp-premium-art { width: 48px; height: 48px; }
  .sp-unlock { grid-column: 1 / -1; justify-self: center; }
}
.sp-how h3 { margin: 0 0 6px; text-align: center; }
.sp-how-list { display: grid; gap: 4px; }
.sp-how-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; }
.sp-how-row b { font: 400 15px var(--display); white-space: nowrap; }
.sp-tracks { display: grid; gap: 6px; }
.sp-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) minmax(0, 1fr); gap: 6px; align-items: stretch; }
.sp-head b { text-align: center; font: 400 16px var(--display); letter-spacing: .3px; }
/* tier numbers: the leaderboard's coins (.rk, owner 27 Nov 2026): gold once reached, silver before; the current tier ringed */
.sp-num { display: grid; place-items: center; justify-self: center; align-self: center; width: 34px; height: 34px; border-radius: 50%; box-sizing: border-box;
  color: #fff; font: 400 16px/1 var(--display); -webkit-text-stroke: 3px #2a0b4d; paint-order: stroke fill; letter-spacing: 0;
  background: radial-gradient(circle at 35% 28%, #ffffff 0%, #dfe4ec 38%, #a9b3c1 76%, #6c7787 100%);
  box-shadow: 0 0 0 2px #2a0b4d, inset 0 -3px 0 rgba(0, 0, 0, .22), inset 0 2px 0 rgba(255, 255, 255, .55); }
.sp-row.reached .sp-num { background: radial-gradient(circle at 35% 28%, #fff7b8 0%, #ffd23f 38%, #e39c00 76%, #a86400 100%); }
.sp-row.now .sp-num { box-shadow: 0 0 0 2px #2a0b4d, 0 0 0 5px #ffcf4a, inset 0 -3px 0 rgba(0, 0, 0, .22), inset 0 2px 0 rgba(255, 255, 255, .55); }
.sp-cell { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; min-height: 52px; padding: 6px; border-radius: 12px; background: rgba(255, 255, 255, .1); }
.sp-cell.empty { background: rgba(255, 255, 255, .04); }
.sp-cell.premium { background: rgba(255, 207, 74, .14); }
.sp-cell.ready { box-shadow: inset 0 0 0 2px #7dff7a, 0 0 10px rgba(125, 255, 122, .45); }
button.sp-cell { appearance: none; border: 0; width: 100%; color: inherit; font: inherit; cursor: pointer; flex-direction: column; gap: 2px; }
button.sp-cell:active { transform: scale(.97); }
.sp-take { font: 400 14px var(--display); letter-spacing: .3px; color: #7dff7a; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.sp-hero > .sp-all { grid-column: 1 / -1; justify-self: center; }
.sp-cell.got > .sp-gift { opacity: .55; }
.sp-cell.locked > .sp-gift { opacity: .55; }
.sp-cell.locked { display: grid; grid-template-columns: minmax(0, 1fr) 24px; }
.sp-cell.locked > .sp-gift { justify-self: center; }
.sp-cell.locked > .sp-lock { grid-column: 2; justify-self: center; }
.sp-gift { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font: 400 15px var(--display); letter-spacing: .3px; line-height: 1.15; text-align: center; }
.sp-gift.look { flex-direction: column; font-size: 13px; }
.sp-gift b { overflow-wrap: break-word; }
.sp-fixed-items { display: grid; gap: 4px; min-width: 0; max-width: 100%; justify-items: center; }
.sp-fixed-items .sp-gift { max-width: 100%; }
.sp-cell.got > .sp-fixed-items, .sp-cell.locked > .sp-fixed-items { opacity: .55; }
.sp-ico { width: 26px; height: 26px; object-fit: contain; flex: none; }
.sp-look { width: 40px; height: 40px; object-fit: contain; }
.sp-look.banner { width: 84px; height: 30px; object-fit: cover; border-radius: 6px; }
.sp-tick, .sp-lock { width: 24px; height: 24px; object-fit: contain; flex: none; }
.sp-price { font: 400 26px var(--display); }
.quest-reward { display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; font: 400 17px var(--display); color: #fff; -webkit-text-stroke: 4px #1b0838; paint-order: stroke fill; } /* on the card itself, no dark pill (owner, 2 Dec 2026) */
.quest-reward .coin-img { width: 22px; height: 22px; }
/* big buttons fit their words: a comfortable minimum, never stretched across a card */
.btn.big { width: auto; min-width: 180px; max-width: 260px; padding-left: 34px; padding-right: 34px; }
.btn-grid > .btn.big { min-width: 0; padding-left: 4px; padding-right: 4px; }
.wnav { width: auto; height: auto; background: none; -webkit-text-stroke: 0; font-size: 0; }
.wnav.next > img, .wnav.next > svg { transform: scaleX(-1); }
/* every button sizes to its words on one line, centred in its row (a grid would otherwise stretch it) */
.btn { white-space: nowrap; justify-self: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* Offline play: "Sandwich · Missing Links · English" is longer than a phone-wide button; these wrap to two lines (the painted art stretches) */
.btn[data-new] { white-space: normal; text-overflow: clip; line-height: 1.15; }
.btn.big { max-width: 100%; }
/* home: room under each ribbon and between rows, for the icons that rise above the cards */
.section-title { margin-bottom: 54px; }
.gcards { row-gap: 66px; }
.gcards.small { row-gap: 52px; }
/* the home ad card sits inside the grid of game cards: it takes the whole row, never one card's cell (15 Nov 2026) */
.gcards > .ad-slot { grid-column: 1 / -1; flex: 0 0 100%; width: 100%; } /* .gcards is a wrapping flex row: a full row is 100% */
.gcards > .ad-slot > .ad-card { margin-top: 0; max-width: 720px; margin-inline: auto; }
/* the full-screen ad's buttons keep their words on one line (Stop watching (no coins) wrapped) */
.ad-break > .btn.big { white-space: nowrap; font-size: clamp(15px, 4.6vw, 20px); max-width: 100%; padding-inline: 22px; }
/* the Ad label: a small tag in the card's corner (house ads no longer carry it: owner, 15 Nov 2026) */
.ad-card { position: relative; }
.ad-card .ad-tag { position: absolute; top: 2px; right: 6px; width: auto; justify-self: auto; }
.ad-break .ad-tag { justify-self: start; width: auto; }
/* form fields share one look: the year box matches the others */
.account .field input { width: 100%; box-sizing: border-box; }
/* game card buttons share the row and never cut their word short */
.gbtns { gap: 6px; }
.gbtns .btn { flex: 1 1 auto; min-width: 0; max-width: 150px; padding-left: 10px; padding-right: 10px; text-overflow: clip; overflow: visible; }
.painted-ui .gbtns .btn { border-width: 0 18px; border-image-width: 0 18px; }
/* the world arrows: the round painted arrow at button size */
.wnav { width: 58px; height: 58px; padding: 0; }
.wnav > img { width: 58px; height: 58px; object-fit: contain; display: block; }
.account input::placeholder { color: #b8a9d4; opacity: 1; font-weight: 700; }
.seg.five { grid-template-columns: repeat(5, 1fr); }
.seg.five button { font-size: 12.5px; padding: 7px 2px; }
/* the difficulty picker: one row per level, gems lighting up as it gets harder */
.level-list { display: grid; gap: 6px; width: 100%; }
.level { display: grid; grid-template-columns: 74px 70px 1fr; align-items: center; gap: 8px; border: 0; border-radius: 14px; padding: 7px 10px; background: rgba(255, 255, 255, .12); color: #fff; text-align: start; cursor: pointer; }
.level.on { background: rgba(255, 207, 74, .28); box-shadow: inset 0 0 0 3px #ffcf4a; }
.level b { font: 400 17px var(--display); letter-spacing: .4px; }
.level small { font-weight: 800; font-size: 12.5px; opacity: .9; }
.level-gems { display: flex; gap: 1px; }
.level-gems i { width: 14px; height: 14px; background: var(--gem) center / contain no-repeat; filter: grayscale(1) brightness(.6); opacity: .45; }
.level-gems i.lit { filter: none; opacity: 1; }
.overlay .card.level-card { width: min(520px, 100%); }
.level-rating { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 800; }
.level-rating .level-gems i { width: 20px; height: 20px; }
/* the level rows carry their own dark backing, so they read on any card (purple or cream) */
.level { background: rgba(42, 11, 77, .82); }
.level.on { background: rgba(120, 70, 10, .85); }
.level-card > b { color: inherit; }
.gbtns { flex-wrap: wrap; }
.gbtns .btn:not(.green):not(.pink) { --c: var(--blue); }

/* the Solo bars in a game: mode (Word Crawl) and difficulty, a tap re-deals the board */
.solo-bars, .level-bar { display: grid; gap: 4px; justify-items: center; margin: 4px auto 6px; max-width: 100%; }
.tab-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; background: rgba(23, 8, 70, .55); border-radius: 999px; padding: 4px 6px; }
.tab-label { color: #e6dcff; font: 800 13px 'Nunito', sans-serif; padding: 0 4px 0 8px; }
.tab { border: 0; background: none; color: #fff; font: 400 15px var(--display); letter-spacing: .3px; padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.tab:hover { background: rgba(255, 255, 255, .14); }
.tab.on { background: var(--lemon); color: var(--ink); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.level-line { color: #fff; font-weight: 800; font-size: 12.5px; opacity: .9; text-shadow: 0 1px 0 rgba(27, 8, 56, .5); }
@media (max-width: 480px) { .tab { font-size: 13px; padding: 4px 7px; } .tab-label { display: none; } }
/* the painted round X on every popup, in its top-right corner */
.overlay .card { position: relative; }
.overlay-x.img-btn, .overlay-x { position: absolute; top: -20px; right: -20px; z-index: 3; width: 46px; height: 46px; padding: 0; }
.overlay-x img { width: 46px; height: 46px; display: block; }

[dir=rtl] .overlay-x { right: auto; left: -20px; }
/* game button rows: buttons keep their whole word and wrap to a second line instead of cutting off */
.game-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.game-actions .btn { flex: 0 0 auto; max-width: none; text-overflow: clip; overflow: visible; }
/* the level description sits on its own dark pill so it reads over any sky */
.level-line { background: rgba(23, 8, 70, .55); border-radius: 999px; padding: 2px 12px; opacity: 1; }

/* the popup X sits on the frame's top-right corner, so the card can't clip it: a tall popup scrolls as a
   whole inside the dimmed page instead of inside its frame (auto margins keep it centred when it fits) */
.overlay { overflow-y: auto; place-items: start center; }
.overlay > .card { margin: auto; max-height: none; overflow: visible; }
.has-board .overlay .overlay-x { top: -42px; right: -42px; }
[dir=rtl] .has-board .overlay .overlay-x { right: auto; left: -42px; }
@media (max-width: 560px) {
  .has-board .overlay .overlay-x { top: -32px; right: -30px; width: 42px; height: 42px; }
  [dir=rtl] .has-board .overlay .overlay-x { right: auto; left: -30px; }
  .has-board .overlay .overlay-x img { width: 42px; height: 42px; }
}
/* every count badge on a button (hints, undos, peeks) matches the power-up tray's */
.img-btn .badge, .btn .badge, .power .badge { position: absolute; right: -4px; top: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: #ff3159; color: #fff; border: 2px solid #fff; font: 400 13px var(--display); -webkit-text-stroke: 0; display: grid; place-items: center; padding: 0 4px; box-shadow: none; }

/* ---- the word panel ("what's left"): beside the board on wide screens, under the game on phones ---- */
.wpanel { margin: 14px auto 0; max-width: 520px; text-align: start; }
/* the word list as a bottom sheet on narrower screens (wordsheet.ts; owner, 22 Nov 2026): closed, only its header shows as a
   peek bar along the bottom edge; open, it rises to about half the screen and scrolls */
.wpanel.wsheet { position: fixed; left: 50%; bottom: 0; translate: -50% 0; z-index: 18; width: min(560px, 100vw); max-width: none; margin: 0; box-sizing: border-box;
  max-height: 56px; overflow: hidden; transition: max-height .28s cubic-bezier(.2, .9, .3, 1), opacity .2s, visibility .2s; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 4px);
  filter: drop-shadow(0 -6px 10px rgba(8, 3, 34, .5)); }
.has-board .wpanel.panel.wsheet { border-width: 16px 16px 0; border-image-width: 16px 16px 0; padding: 0 10px calc(env(safe-area-inset-bottom, 0px) + 6px); }
.wpanel.wsheet.open { max-height: min(56vh, 520px); overflow-y: auto; overscroll-behavior: contain; }
.wpanel.wsheet > .wp-head { position: sticky; top: 0; z-index: 1; min-height: 40px; cursor: pointer; gap: 10px; background: inherit; }
.wpanel.wsheet:not(.open) > :not(.wp-head) { visibility: hidden; }
.wsheet-arrow { display: none; width: 28px; height: 28px; margin-inline-start: auto; flex: none; transition: rotate .25s; }
.wsheet-arrow svg { width: 100%; height: 100%; display: block; }
.wpanel.wsheet .wsheet-arrow { display: block; }
.wpanel.wsheet.open .wsheet-arrow { rotate: 180deg; }
html.has-wsheet #app { padding-bottom: calc(var(--safe-bottom) + 84px); }
/* Crossword on phones (slide-up keyboard): the clue bar runs full bleed to the bottom of the screen and its first rows show in
   the strip beside the keyboard tab, which stays on top (z 19) where it was (owner screenshot, 24 Nov 2026: the rows under
   "Clues" were cut off and the strip below was empty) */
html.has-sk .wpanel.wsheet { bottom: 0; max-height: calc(56px + 34px + env(safe-area-inset-bottom, 0px)); }
html.has-sk .wpanel.wsheet:not(.open) > :not(.wp-head) { visibility: visible; }
html.has-sk .wpanel.wsheet.open { max-height: min(56vh, 520px); }
html.has-sk.has-wsheet #app { padding-bottom: calc(var(--safe-bottom) + 118px); }
/* the keyboard wins: while it is open or peeking, the word list bar steps aside (owner screenshot check, 22 Nov 2026: the
   clue bar sat on top of the rising keys) */
html.sk-up .wpanel.wsheet, html:has(.sk-sheet.peek) .wpanel.wsheet, html:has(.sk-sheet.open) .wpanel.wsheet { visibility: hidden; opacity: 0; pointer-events: none; }
html.has-sk .wpanel.wsheet { z-index: 17; }
/* the bar's first peek (wordsheet.ts): it rises a little to show the top of the list, then settles back */
.wpanel.wsheet.wpeek:not(.open) { max-height: 112px; transition-duration: .42s, .2s, .2s; }
.wpanel.wsheet.wpeek:not(.open) > :not(.wp-head) { visibility: visible; }
.wpanel.wsheet.wpeek:not(.open) .wsheet-arrow svg { animation: sk-tab-nudge 1.2s ease-in-out 1; }
/* a word found while the bar is closed (wordpanel.ts): a small bounce, the count pops, the word shows on the bar */
@keyframes wp-cheer { 0%, 100% { transform: translateY(0); } 28% { transform: translateY(-9px); } 52% { transform: translateY(0); } 70% { transform: translateY(-3px); } }
.wpanel.wsheet.wcheer:not(.open) { animation: wp-cheer .6s cubic-bezier(.3, .7, .4, 1) 1; }
@keyframes wp-count-pop { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.14); } }
.wpanel.wsheet.wcheer:not(.open) .wp-count { display: inline-block; transform-origin: 0 50%; animation: wp-count-pop .5s ease-out 1; } /* grows away from the title, never onto it */
.wp-flash { display: none; }
@keyframes wp-flash { 0% { opacity: 0; transform: scale(.4); } 14% { opacity: 1; transform: scale(1.15); } 24% { transform: scale(1); } 82% { opacity: 1; } 100% { opacity: 0; transform: scale(1); } }
.wpanel.wsheet:not(.open) > .wp-head > .wp-flash { display: inline-block; flex: 0 1 auto; min-width: 0; max-width: 34%; margin-inline-start: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; animation: wp-flash 1.6s ease-out forwards; }
@media (prefers-reduced-motion: reduce) { .wpanel.wsheet { transition: none; } .wsheet-arrow { transition: none; } .wpanel.wsheet.wcheer, .wpanel.wsheet.wcheer .wp-count, .wp-flash { animation: none !important; } }
.has-board .wpanel.panel { padding: 4px 10px 6px; }
.wp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.wp-head h3 { margin: 0; font-size: 20px; }
.wp-count { font: 400 15px var(--display); color: var(--lemon); white-space: nowrap; }
.wp-sec { border-top: 1px solid rgba(255, 255, 255, .16); padding: 8px 0 4px; }
.wp-sec h4 { margin: 0 0 4px; font: 900 11.5px 'Nunito', sans-serif; letter-spacing: 1.2px; text-transform: uppercase; color: #e6dcff; }
.wp-sec p { margin: 2px 0 4px; font-weight: 800; font-size: 14px; color: #fff; line-height: 1.35; }
.wp-sec p.wp-gems { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: #e6dcff; }
.wp-gems span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.wp-sec p.wp-hot-line { color: var(--lemon); }
.wp-row { padding: 5px 0; }
.wp-row + .wp-row { border-top: 1px dashed rgba(255, 255, 255, .1); }
.wp-row-head { display: flex; align-items: center; gap: 6px; }
.wp-len { font: 400 15px var(--display); color: #fff; letter-spacing: .3px; white-space: nowrap; }
.wp-pts { font: 400 12px var(--display); color: var(--ink); background: var(--lemon); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.wp-note { margin-inline-start: auto; font-weight: 800; font-size: 12.5px; color: #e6dcff; white-space: nowrap; }
.wp-row.hot .wp-note { color: var(--lemon); }
.wp-row.hot .wp-len { color: var(--lemon); }
.wp-words { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.wp-word { background: linear-gradient(#fffaf0, #ffe4a6); color: var(--ink); border-radius: 8px; padding: 1px 7px; font: 400 14px var(--display); letter-spacing: .6px; box-shadow: inset 0 -2px 0 rgba(138, 61, 0, .25), 0 2px 0 rgba(27, 8, 56, .35); }
.wp-word.theirs { background: linear-gradient(#eef8ff, #a6dcff); }
.wp-word.fresh { animation: wp-pop .45s ease-out; }
@keyframes wp-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.wp-slot { border: 2px dashed rgba(255, 255, 255, .35); border-radius: 8px; padding: 0 6px; color: rgba(255, 255, 255, .6); font-weight: 900; font-size: 11px; letter-spacing: 1px; line-height: 19px; }
.wp-more { color: #e6dcff; font-weight: 900; font-size: 12.5px; align-self: center; }
@media (min-width: 1000px) {
  .with-side { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 28px; align-content: start; }
  .with-side > * { grid-column: 1; }
  .with-side > .wpanel { grid-column: 2; grid-row: 1 / span 40; align-self: start; position: sticky; top: 12px; margin: 96px 0 0; max-width: none; }
  #app.with-side:has(.stage) { max-width: calc(clamp(520px, calc((100vh - 268px) / 1.3 - 80px), 680px) + 328px); }
}

/* when the next dailies arrive: quiet static text under the ribbon, no countdown */
.next-daily { text-align: center; margin: -40px 0 22px; color: #fff; font-weight: 800; font-size: 14px; text-shadow: 0 1px 0 rgba(27, 8, 56, .5); }
/* Word Crawl: its board's painted rim reaches 50px into the gap, so the panel stands further off */
@media (min-width: 1000px) {
  #app.with-side:has(.stage) { column-gap: 76px; max-width: calc(clamp(520px, calc((100vh - 268px) / 1.3 - 80px), 680px) + 376px); }
}

/* the next-daily line under Today's puzzles, with Past answers beside it */
.next-daily { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; }
/* ---- Past answers (/answers): one day at a time, a card per daily ---- */
#app.answers-page { max-width: 1000px; }
.pa-spacer { width: 66px; }
.pa-stepper { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0 16px; }
.pa-stepper .img-btn, .pa-stepper .btn.icon { width: 54px; height: 54px; }
.pa-stepper [disabled] { opacity: .35; pointer-events: none; }
.pa-next img, .pa-next svg { transform: scaleX(-1); }
.pa-day { display: grid; justify-items: center; min-width: 210px; color: #fff; text-shadow: 0 1px 0 rgba(27, 8, 56, .5); }
.pa-day b { font-size: 20px; }
.pa-day small { font-weight: 800; font-size: 13px; opacity: .9; }
.pa-day .pa-daily { font-weight: 800; font-size: 15px; color: #ffe27a; } /* the daily number, the same "Daily #N" as the game cards */
.pa-empty, .pa-loading { text-align: center; color: #fff; font-weight: 800; }
.pa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; align-items: start; }
.pa-card { color: #fff; }
.has-board .pa-card.panel { padding: 4px 8px 8px; }
.pa-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.pa-head h3 { margin: 0; font-size: 18px; }
.pa-you { font: 400 14px var(--display); color: var(--lemon); white-space: nowrap; }
.pa-you.none { color: #e6dcff; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 12.5px; }
.pa-label { display: block; margin: 8px 0 2px; font-weight: 800; font-size: 12.5px; color: #e6dcff; text-align: center; }
.pa-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-width: 200px; margin: 0 auto; }
.pa-board span, .pa-cw span, .pa-sdk span { display: grid; place-items: center; aspect-ratio: 1; background: linear-gradient(#fffaf0, #ffe4a6); color: var(--ink); border-radius: 6px; font: 400 18px var(--display); }
.pa-cw { display: grid; gap: 3px; max-width: 230px; margin: 0 auto 6px; }
.pa-cw span { font-size: 16px; }
.pa-cw span.blk { background: rgba(23, 8, 70, .7); }
.pa-clues { font-size: 13px; margin-top: 6px; }
.pa-clues b { font: 400 14px var(--display); color: var(--lemon); }
.pa-clues p { margin: 4px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.pa-clues i { font-style: normal; font-weight: 900; color: #e6dcff; min-width: 16px; }
.pa-clues .wp-word { font-size: 12.5px; margin-inline-start: auto; }
.pa-sdk { display: grid; gap: 2px; max-width: 270px; margin: 0 auto; }
.pa-sdk span { border-radius: 3px; font-size: 14px; color: #6a2bd8; background: #fffaf0; }
.pa-sdk span.given { color: var(--ink); background: #ffe4a6; }
.pa-sdk span.er { margin-right: 3px; }
.pa-sdk span.eb { margin-bottom: 3px; }
.pa-sw p { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 5px 0; }
.pa-sw small { font-weight: 800; font-size: 13px; color: #e6dcff; }
.pa-pic { display: block; width: 100%; max-width: 280px; margin: 0 auto; border-radius: 12px; box-shadow: 0 3px 0 rgba(27, 8, 56, .4); }
.pa-px { display: grid; gap: 1px; max-width: 220px; margin: 0 auto; background: rgba(23, 8, 70, .5); padding: 3px; border-radius: 8px; }
.pa-px span { aspect-ratio: 1; background: rgba(255, 255, 255, .1); border-radius: 1px; }
@media (max-width: 560px) { .pa-grid { grid-template-columns: 1fr; } .pa-day { min-width: 0; } .pa-day b { font-size: 16px; } }

/* a big button is as long as its label needs: no cap, no cut-off, no smaller text */
.btn.big { max-width: none; text-overflow: clip; }
/* ...but never wider than its popup: a long label ("Stop watching (no reward)" on a phone) wraps inside the card */
.overlay .card .btn.big { max-width: 100%; white-space: normal; line-height: 1.1; }
/* Jigsaw's orb: pieces placed, with the total small under it */
.jg-meter .score-orb .display { display: grid; justify-items: center; line-height: .95; }
.jg-meter .score-orb .of { font-size: 11px; opacity: .9; }
/* the level and mode bars stay on one line; wider than a narrow game column, they reach past it evenly */
.tab-row { flex-wrap: nowrap; white-space: nowrap; }
@media (max-width: 600px) { .tab { font-size: 13px; padding: 4px 7px; } .tab-label { display: none; } }
/* small phones: the five level names must fit on one line in every language (Japanese ran 402 px on a 375 px screen) */
@media (max-width: 420px) { .tab-row { gap: 2px; padding: 4px; } .tab { padding: 4px 5px; letter-spacing: 0; } :lang(ja) .tab { font-size: 12px; } }
/* Past answers: cards flow in columns, so a tall one (a crossword's clues) leaves no gaps beside it */
.pa-grid { display: block; columns: 290px 3; column-gap: 14px; }
.pa-grid > .pa-card { break-inside: avoid; width: 100%; margin: 0 0 14px; display: inline-block; }
/* big buttons in popups stay centred even when their label makes them wider than the card's inside; on
   phones the painted end caps are a little shorter (the label keeps its size) */
.overlay .btn.big { margin-left: 0; margin-right: 0; align-self: center; justify-self: center; }
@media (max-width: 480px) { .painted-ui .btn.big { border-width: 0 28px; border-image-width: 0 28px; } }

/* Past answers: a daily you haven't finished stays covered until you choose Reveal */
.pa-cover { display: grid; justify-items: center; gap: 10px; padding: 26px 10px 18px; border-radius: 14px; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 12px, rgba(255, 255, 255, .02) 12px 24px); }
.pa-cover p { margin: 0; color: #e6dcff; font-weight: 800; font-size: 14px; text-align: center; }
/* an older day without Plus (archive.ts): the lock, the line and both plans on top, each game's card with a lock */
.pa-locked-day { display: grid; justify-items: center; gap: 10px; text-align: center; }
.pa-lock { width: 64px; height: 64px; object-fit: contain; }
.pa-lock-sm { width: 22px; height: 22px; object-fit: contain; vertical-align: -4px; margin-inline-end: 6px; }
.pa-lockbtn { width: 100%; border: 0; cursor: pointer; font: inherit; }
/* a day without Plus (owner, 22 Nov 2026): one line over the cards, every card visible; a tap on a card or the line opens
   the Plus popup (answers.ts) */
.pa-locked-note { grid-column: 1 / -1; column-span: all; display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; margin: 0 0 14px;
  padding: 6px 14px; border: 0; background: none; color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, .75); /* no box, text and lock straight on the page (owner, 22 Nov 2026) */
  font: 900 16px/1.3 var(--body); cursor: pointer; text-wrap: balance; }
.pa-locked-note:hover, .pa-locked-note:focus-visible { color: #ffd54a; text-decoration: underline; }
.pa-card.pa-locked { cursor: pointer; }
.pa-card.pa-locked:focus-visible { outline: 3px solid #ffd54a; outline-offset: 2px; }
/* the Plus plans anywhere (popups, cards, the shop): the price always fits its button, and the links read gold on purple
   like the shop's (owner, 22 Nov 2026: "1 month · $5.9" cut off; dark blue links) */
.plus-buy .btn.big { width: min(100%, 340px); max-width: 100%; box-sizing: border-box; white-space: nowrap; font-size: clamp(15px, 4.6vw, 22px); }
.plus-buy a, .plus-buy a:visited { color: #ffd76a; font-weight: 800; }
/* Plus plan buttons with small tags centred on the top edge (owner, 27 Nov 2026): "3 days free" and yearly "Save 44%";
   the wrap is exactly the button's width so the tags sit on its edges and the button itself never changes */
.plan-wrap { position: relative; width: min(100%, 340px); max-width: 100%; margin: 0 auto; }
.plan-wrap > .btn.big { width: 100%; }
/* the Plus plan buttons use the exact same shine as the home page's Daily button (owner, 27 Nov 2026: "match exactly
   like the daily button gloss"); never give them a rule of their own */
.plan-tags { position: absolute; top: -10px; left: 8px; right: 8px; z-index: 3; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.plan-tag { white-space: nowrap; max-width: 48%; overflow: hidden; text-overflow: ellipsis;
  font: 400 12.5px/1.25 var(--display); letter-spacing: .3px; padding: 2px 9px; border-radius: 999px; box-shadow: 0 0 0 2px #2a0b4d, inset 0 -2px 0 rgba(0, 0, 0, .18); }
.plan-tag[hidden] { display: none; }
.plan-tag.free { background: var(--lemon); color: var(--ink); }
.plan-tag.save { background: #ff3159; color: #fff; }
.plus-plans .plan-wrap { margin-top: 8px; } /* room for the tags above each button */
.pa-daypage { display: inline-block; margin: 8px 6px 0; color: #ffe66a; font-weight: 800; font-size: 14px; }
.pa-play { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 12px; }
/* iPhone/Safari (WebKit) sized these grids' rows from the stretched square tiles wrongly: the box ended a row early and
   "Play this day" sat on the board (owner, 22 Nov 2026). Tiles placed at the row start keep their square and the box. */
.pa-sdk, .pa-board, .pa-cw { align-items: start; }
.archive-lock-img { width: 84px; height: 84px; object-fit: contain; align-self: center; }
/* the plain tile (Settings: Character tiles off), for DOM tiles in every game; web/src/prefs.ts has the same
   look for canvas tiles */
:root { --plain-tile: linear-gradient(180deg, #fffaf0, #ffe4a6); --plain-tile-shadow: inset 0 -3px 0 rgba(138, 61, 0, .25), 0 3px 0 rgba(27, 8, 56, .35); }

/* ---- letter and digit tiles on DOM screens (tile.ts): the character with its letter, or the plain tile ---- */
.ltile { position: relative; display: grid; place-items: center; aspect-ratio: 1; container-type: inline-size; border-radius: 18%; }
.ltile.char { background: radial-gradient(circle at 50% 40%, #6a2bd8, #3b0f80 75%); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); }
.ltile.char img { position: absolute; left: 2%; top: -6%; width: 96%; height: 96%; object-fit: contain; }
.ltile.char b { position: absolute; left: 0; right: 0; bottom: 4%; text-align: center; font: 400 40cqw/1 var(--display); color: #fff; -webkit-text-stroke: 4cqw var(--ink); paint-order: stroke fill; }
.ltile.plain { background: var(--plain-tile); box-shadow: var(--plain-tile-shadow); border-radius: 20%; }
.ltile.plain b { font: 400 58cqw/1 var(--display); color: var(--ink); }
.ltile.plain img { display: none; } /* a Fijee picture still on its way (tile.ts) */
.ltile.empty { background: rgba(23, 8, 70, .45); }
/* Past answers boards in tiles: the old plain-cell rules step aside */
.pa-board .ltile, .pa-cw .ltile, .pa-sdk .ltile { background-color: transparent; }
.pa-board .ltile.plain, .pa-cw .ltile.plain, .pa-sdk .ltile.plain { background: var(--plain-tile); }
.pa-cw span.blk { background-size: cover; border-radius: 12%; }
.pa-sdk { gap: 2px; }
.pa-sdk .ltile.plain.mine b { color: #6a2bd8; }
.pa-sdk .ltile.char.given { box-shadow: inset 0 0 0 2px var(--lemon); }
.pa-sdk .ltile.er { margin-right: 3px; }
.pa-sdk .ltile.eb { margin-bottom: 3px; }
/* ---- Settings (/settings) ---- */
#app.settings-page { max-width: 620px; }
.set-list { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 14px; margin-top: 10px; }
.set-row { color: #fff; }
.next-lines { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; } /* Today's puzzles: the daily time, then the live countdown (home.ts) */
/* lines inside one Settings box (the notification kinds, nativesettings.ts): a thin divider, smaller text, the same switch */
.set-subs { display: grid; gap: 2px; margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 6px; }
.set-sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; font: 800 15px/1.25 var(--body); }
.set-sub + .set-sub { border-top: 1px solid rgba(255, 255, 255, .1); }
.set-sub > :last-child { flex: none; transform: scale(.85); transform-origin: right center; }
.has-board .set-row.panel { padding: 6px 12px 10px; }
.set-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.set-text h3 { margin: 0; font-size: 20px; }
.set-text p { margin: 4px 0 0; color: #e6dcff; font-weight: 800; font-size: 13.5px; line-height: 1.35; }
.set-sample { display: grid; grid-template-columns: repeat(4, 58px); gap: 8px; justify-content: center; margin-top: 12px; }
.set-lang { border: 0; cursor: pointer; }
.switch { position: relative; flex: none; width: 66px; height: 36px; border-radius: 999px; border: 3px solid var(--ink); background: linear-gradient(#4a2a8a, #2c1460); box-shadow: inset 0 3px 0 rgba(0, 0, 0, .3), 0 3px 0 rgba(27, 8, 56, .35); cursor: pointer; padding: 0; transition: background .2s; }
.switch i { position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e6dcff 60%, #b9a6e8); box-shadow: 0 2px 0 rgba(27, 8, 56, .45); transition: left .2s; }
.switch.on { background: linear-gradient(#ffe66b, #ffbf1a); }
.switch.on i { left: 32px; }
.pa-sdk .ltile.char.given, .pa-sdk .ltile.char.mine { background: radial-gradient(circle at 50% 40%, #6a2bd8, #3b0f80 75%); }
.pa-sdk .ltile.plain.given { background: var(--plain-tile); }

.wt-cell.plain { background: var(--plain-tile); box-shadow: var(--plain-tile-shadow); border-radius: 20%; display: grid; place-items: center; }
.wt-cell.plain b { position: static; color: var(--ink); -webkit-text-stroke: 0; text-shadow: none; font-size: 20px; }
/* Past answers' Sudoku is 9 tiles across: the digit is drawn bigger than the face so it stays readable */
.pa-sdk .ltile.char img { top: -14%; left: 8%; width: 84%; height: 84%; opacity: .9; }
.pa-sdk .ltile.char b { font-size: 62cqw; bottom: -2%; -webkit-text-stroke: 6cqw var(--ink); }

/* Past answers' crossword: black squares sunk into the board (as in the game), clue numbers in the corner */
.pa-cw span.blk { background: radial-gradient(circle at 50% 30%, #2b0d5e, #12042b 78%); box-shadow: inset 0 4px 5px rgba(0, 0, 0, .65), inset 0 -2px 0 rgba(190, 150, 255, .12); border-radius: 17%; }
.pa-num { position: absolute; top: 3%; inset-inline-start: 7%; z-index: 2; font: 400 26cqw/1 var(--display); font-style: normal; color: #fff; -webkit-text-stroke: 5cqw var(--ink); paint-order: stroke fill; }

/* ---- Pick your character (avatars.ts) ---- */
.overlay .card.avatar-pick { width: min(660px, 100%); }
.ap-preview { display: flex; align-items: center; justify-content: center; gap: 16px; }
.ap-halo { position: relative; width: 116px; height: 116px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, rgba(255, 236, 150, .95) 0, rgba(255, 200, 80, .45) 45%, rgba(255, 190, 60, 0) 70%); }
.ap-big { width: 108px; height: 108px; object-fit: contain; filter: drop-shadow(0 6px 0 rgba(27, 8, 56, .35)); }
.ap-big.pop { animation: ap-pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes ap-pop { 0% { transform: scale(.6) rotate(-6deg); } 100% { transform: none; } }
.ap-who { display: grid; text-align: start; gap: 2px; color: #fff; }
.ap-who b { font-size: 26px; color: var(--lemon); }
.ap-who span { font-weight: 800; color: #e6dcff; }
.ap-note { margin: 0; text-align: center; }
.ap-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; width: 100%; }
.ap-pib { border: 0; background: none; padding: 0; cursor: pointer; display: grid; justify-items: center; gap: 2px; color: #fff; }
.ap-well { position: relative; width: 100%; aspect-ratio: 1; border-radius: 22%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #6a2bd8, #3b0f80 75%); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); transition: transform .12s; }
.ap-well img { width: 92%; height: 92%; object-fit: contain; transform: translateY(-4%); }
.ap-pib small { font: 400 12.5px var(--display); letter-spacing: .3px; opacity: .9; }
.ap-pib:hover .ap-well { transform: translateY(-3px); }
.ap-pib.on .ap-well { box-shadow: 0 0 0 3px var(--lemon), 0 0 16px rgba(255, 214, 64, .8), inset 0 -3px 0 rgba(0, 0, 0, .25); transform: translateY(-3px) scale(1.04); }
.ap-pib.on small { color: var(--lemon); opacity: 1; }
@media (max-width: 560px) { .ap-grid { grid-template-columns: repeat(4, 1fr); } .ap-halo { width: 92px; height: 92px; } .ap-big { width: 86px; height: 86px; } }
/* a character you can tap to change (Settings, your profile) */
.avatar-edit { border: 0; background: none; padding: 0; cursor: pointer; display: grid; justify-items: center; gap: 6px; }
.avatar-edit .chip { font: 400 13px var(--display); letter-spacing: .3px; color: var(--ink); background: var(--lemon); border-radius: 999px; padding: 3px 10px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); white-space: nowrap; }

/* ---- special characters (core/avatar.ts SPECIALS): their own turning ring, a glow, a glint and twinkling
   sparkles, wherever an avatar shows, so they read as rare at a glance ---- */
.sp-gold { --sp-ring: conic-gradient(#fff6c2, #ffc21a, #fff6c2, #e09a00, #fff6c2); --sp-glow: rgba(255, 210, 60, .95); }
.sp-cosmic { --sp-ring: conic-gradient(#6a3cff, #ff6ad5, #3cc8ff, #b388ff, #6a3cff); --sp-glow: rgba(160, 120, 255, .95); }
.sp-crystal { --sp-ring: conic-gradient(#b9f6ff, #ffc2f3, #ffffff, #7fe0ff, #b9f6ff); --sp-glow: rgba(150, 235, 255, .95); }
.sp-holo { --sp-ring: conic-gradient(#ff7ad9, #ffd36b, #7dffb2, #6bd5ff, #b98bff, #ff7ad9); --sp-glow: rgba(255, 170, 250, .95); }
.sp-champ { --sp-ring: conic-gradient(#ffe066, #ff3159, #ffe066, #ffb800, #ff3159, #ffe066); --sp-glow: rgba(255, 196, 50, .95); }
.avatar.special, .ap-halo.special { isolation: isolate; }
.avatar.special::before, .ap-halo.special::before, .ap-pib.special .ap-well::before {
  content: ''; position: absolute; inset: -12%; border-radius: 50%; z-index: -1; background: var(--sp-ring);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%, #000 70%, transparent 72%); mask: radial-gradient(circle, transparent 60%, #000 62%, #000 70%, transparent 72%);
  filter: drop-shadow(0 0 4px var(--sp-glow)); animation: sp-turn 5s linear infinite; }
.avatar.special::after, .ap-halo.special::after, .ap-pib.special .ap-well::after {
  content: ''; position: absolute; inset: -16%; pointer-events: none; z-index: 2;
  background: radial-gradient(circle at 14% 24%, #fff 0 2%, transparent 3.2%), radial-gradient(circle at 86% 18%, #fff 0 1.6%, transparent 2.8%),
    radial-gradient(circle at 80% 84%, #fff 0 1.8%, transparent 3%), radial-gradient(circle at 22% 80%, #fff 0 1.2%, transparent 2.4%);
  animation: sp-twinkle 1.6s ease-in-out infinite alternate; }
.avatar.special img, .ap-halo.special img, .ap-pib.special .ap-well img { animation: sp-glint 4s ease-in-out infinite; }
@keyframes sp-turn { to { transform: rotate(1turn); } }
@keyframes sp-twinkle { from { opacity: .15; transform: scale(.96); } to { opacity: 1; transform: scale(1.03); } }
@keyframes sp-glint { 0%, 78%, 100% { filter: drop-shadow(0 0 3px var(--sp-glow)) brightness(1); } 86% { filter: drop-shadow(0 0 8px var(--sp-glow)) brightness(1.28); } }
@media (prefers-reduced-motion: reduce) { .avatar.special::before, .avatar.special::after, .avatar.special img, .ap-halo.special::before, .ap-halo.special::after, .ap-halo.special img, .ap-pib.special .ap-well::before, .ap-pib.special .ap-well::after, .ap-pib.special .ap-well img { animation: none; } }
/* the picker's Special row */
.ap-special-title { color: var(--lemon); margin-top: 6px; }
.ap-grid.ap-specials { grid-template-columns: repeat(5, 1fr); gap: 14px; }
.ap-pib.special .ap-well { background: radial-gradient(circle at 50% 40%, #4a1a9e, #22075a 75%); overflow: visible; }
/* locked specials greyed like every locked Fijee (owner, 12 Nov), glow too; colour once unlocked. The tag says how to get it. */
.ap-pib.special.locked .ap-well { filter: grayscale(1) brightness(.85); }
.ap-wellbox { position: relative; display: block; width: 100%; }
.ap-pib.special.locked small { opacity: .7; }
.ap-tag { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); z-index: 3; white-space: nowrap; font: 400 12px var(--display); padding: 1px 8px; border-radius: 999px; border: 2px solid var(--ink); }
.ap-tag.plus { background: linear-gradient(#ffe66b, #ffbf1a); color: var(--ink); }
.ap-tag.top10 { background: linear-gradient(#ff7a94, #ff3159); color: #fff; }
@media (max-width: 560px) { .ap-grid.ap-specials { grid-template-columns: repeat(3, 1fr); } }
/* special rings, second pass: a thin ring that hugs the shape (round for avatars, the well's rounded square in
   the picker), its colours sweeping round it while the ring itself stays put */
@property --sp-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.sp-gold { --sp-ring: conic-gradient(from var(--sp-a), #fff6c2, #ffc21a, #fff6c2, #e09a00, #fff6c2); }
.sp-cosmic { --sp-ring: conic-gradient(from var(--sp-a), #6a3cff, #ff6ad5, #3cc8ff, #b388ff, #6a3cff); }
.sp-crystal { --sp-ring: conic-gradient(from var(--sp-a), #b9f6ff, #ffc2f3, #ffffff, #7fe0ff, #b9f6ff); }
.sp-holo { --sp-ring: conic-gradient(from var(--sp-a), #ff7ad9, #ffd36b, #7dffb2, #6bd5ff, #b98bff, #ff7ad9); }
.sp-champ { --sp-ring: conic-gradient(from var(--sp-a), #ffe066, #ff3159, #ffe066, #ffb800, #ff3159, #ffe066); }
.avatar.special::before, .ap-halo.special::before, .ap-pib.special .ap-well::before {
  inset: -8%; border-radius: 50%; padding: max(2px, 6%); background: var(--sp-ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  filter: drop-shadow(0 0 5px var(--sp-glow)); animation: sp-sweep 3.5s linear infinite; }
.ap-pib.special .ap-well::before { inset: -5px; border-radius: 26%; padding: 4px; }
.ap-halo.special::before { inset: -4px; padding: 5px; }
@keyframes sp-sweep { to { --sp-a: 1turn; } }
.ap-pib.special .ap-well::after { inset: -10%; }
/* the lock tag sits on the tile's corner like a badge, clear of the name under it */
.ap-tag { left: auto; right: -8px; top: -8px; bottom: auto; transform: none; }
@media (prefers-reduced-motion: reduce) { .avatar.special::before, .ap-halo.special::before, .ap-pib.special .ap-well::before { animation: none; } }
/* the picker tiles' art already sparkles, so their extra sparkle layer stays off */
.ap-pib.special .ap-well::after { display: none; }
/* the art carries its own sparkles, so the extra sparkle layer is off everywhere; the gold ring runs richer */
.avatar.special::after, .ap-halo.special::after { display: none; }
.sp-gold { --sp-ring: conic-gradient(from var(--sp-a), #ffd84a, #ffb000, #fff1a0, #ffb000, #ffd84a); }
/* special characters, final: no ring. A soft aura of their own colour pulses behind them and a glint passes
   over them, wherever they're shown */
.avatar.special::before, .ap-halo.special::before, .ap-pib.special .ap-well::before {
  inset: -18%; padding: 0; border-radius: 50%; -webkit-mask: none; mask: none; filter: blur(6px);
  background: radial-gradient(circle, var(--sp-glow) 0%, color-mix(in srgb, var(--sp-glow) 45%, transparent) 38%, transparent 68%);
  animation: sp-pulse 2.6s ease-in-out infinite alternate; }
.ap-pib.special .ap-well::before { inset: 4%; border-radius: 50%; filter: blur(10px); }
.ap-halo.special { background: none; }
.ap-halo.special::before { inset: -10%; }
@keyframes sp-pulse { from { opacity: .55; transform: scale(.92); } to { opacity: 1; transform: scale(1.06); } }
.sp-gold { --sp-glow: rgba(255, 200, 40, .95); }
.sp-cosmic { --sp-glow: rgba(150, 100, 255, .95); }
.sp-crystal { --sp-glow: rgba(120, 225, 255, .95); }
.sp-holo { --sp-glow: rgba(255, 140, 235, .95); }
.sp-champ { --sp-glow: rgba(255, 196, 40, .95); }
@media (prefers-reduced-motion: reduce) { .avatar.special::before, .ap-halo.special::before, .ap-pib.special .ap-well::before { animation: none; } }

/* ---- names as others see them (home.ts playerName): gold with the Plus crown for Plus members, the gold
   laurel before the name for a daily top-10 finish this week; plain for everyone else ---- */
.pname { display: inline-flex; align-items: center; gap: .22em; max-width: 100%; vertical-align: middle; }
.pname .pn-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pname .pn-badges, .who > .avatar { flex-shrink: 0; }
.people > .person.online-person { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 10px; width: 100%; box-sizing: border-box; padding: 12px; }
.people > .person.online-person > .who { flex: none; width: 100%; justify-content: center; min-width: 0; }
.people > .person.online-person .pname { min-width: 0; max-width: calc(100% - 44px); }
.people > .person.online-person .pn-text { white-space: normal; overflow-wrap: anywhere; }
.people > .person.online-person > .fr-btns { margin-inline: 0; justify-content: center; flex-wrap: wrap; max-width: 100%; }
/* one row (owner, 2 Dec 2026): Fijee + name left, the round painted Add friend and Invite far right, like the Inbox Friends tab */
.people > .person.online-person.ol-row { display: flex; align-items: center; justify-items: initial; gap: 10px; padding: 8px 10px; }
.people > .person.online-person.ol-row > .who { flex: 1 1 auto; width: auto; justify-content: flex-start; min-width: 0; }
.people > .person.online-person.ol-row .pname { max-width: 100%; }
.people > .person.online-person.ol-row .pn-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people > .person.online-person.ol-row > .ol-btns { margin-inline-start: auto; flex-wrap: nowrap; gap: 6px; }
.ol-ic.img-btn, .ol-ic.btn.icon { width: 44px; height: 44px; flex: none; }
.boards .fr-scope[hidden] { display: none; }
.avatar.av-offscreen, .avatar.av-offscreen * { animation-play-state: paused !important; }
.pname img { width: 1.15em; height: 1.15em; object-fit: contain; flex: none; filter: drop-shadow(0 1px 0 rgba(27, 8, 56, .45)); }
.pname .pn-laurel { width: 1.3em; height: 1.3em; }
.pname.plus .pn-text { color: #ffcf2e; text-shadow: 0 1px 0 #6b3d00, 1px 0 0 #6b3d00, -1px 0 0 #6b3d00, 0 -1px 0 #6b3d00, 0 0 8px rgba(255, 200, 40, .55); }
h2.pname.display { justify-content: center; display: flex; }
h2.pname .pn-laurel, h2.pname .pn-plus { width: .95em; height: .95em; }
/* the badges sit together after the name: the same gap before them, and between the two when there are two */
.pname .pn-badges { display: inline-flex; align-items: center; gap: .15em; flex: none; }

/* Challenge a friend: both players side by side, then who did better */
.vs-card { display: grid; gap: 6px; padding: 10px 12px; border-radius: 16px; background: rgba(23, 8, 70, .45); color: #fff; width: 100%; }
.vs-row { display: flex; align-items: center; gap: 8px; }
.vs-row b { margin-inline-start: auto; font: 400 18px var(--display); white-space: nowrap; }
.vs-row .gem-row { font-size: 15px; }
.vs-you { font: 400 16px var(--display); color: var(--lemon); padding-inline-start: 4px; }
.vs-verdict { text-align: center; margin: 4px 0 0; color: var(--lemon); font-size: 18px; }
.vs-record { text-align: center; margin: 0; font: 800 14px/1.3 var(--body); color: rgba(255, 255, 255, .85); }
.vs-rec { font: 400 12.5px var(--display); padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .16); white-space: nowrap; }

/* ---- Word Crawl on wide landscape screens (screen.ts arrange): the board on the left sized to the window's
   height, everything else in a column beside it; the board's painted rim reaches into the gap ---- */
#app.sq-wide { max-width: none; width: min(100%, calc(var(--sq-bw, 520px) + 540px)); }
.sq-cols { display: grid; grid-template-columns: var(--sq-bw, 520px) 440px; column-gap: 76px; justify-content: center; align-items: start; }
.sq-main { min-width: 0; }
.sq-side { display: grid; gap: 10px; align-content: start; min-width: 0; padding-top: 6px; }
.sq-side .wpanel { margin: 0; max-width: none; }
.sq-side .meter { margin: 0; }
.sq-side .solo-bars { margin: 0 auto; }
.sq-side .power-row, .sq-side .game-actions { margin-top: 0; }

.vs-tag { font: 400 12.5px var(--display); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.vs-tag.win { background: var(--lemon); color: var(--ink); }
.vs-tag.lose { background: #ff3159; color: #fff; }
.vs-tag.tie { background: rgba(255, 255, 255, .25); color: #fff; }
.vs-wait { margin: 2px 0 0; color: #e6dcff; font-weight: 800; font-size: 13.5px; text-align: center; }
/* phones: with a level bar on screen the sub-line repeats it, and Word Crawl drops the level's detail line, so
   the board and its buttons fit the first screen */
@media (max-width: 600px) {
  #app:has(.level-bar) > .game-sub { display: none; }
  #app:has(.stage) .level-bar .level-line { display: none; }
}

/* narrow phones: the challenge rows wrap their tag under the result rather than run past the card */
.vs-row { flex-wrap: wrap; row-gap: 2px; min-width: 0; }
.vs-row .pname { min-width: 0; flex: 1 1 auto; }
@media (max-width: 400px) { .vs-card { padding: 8px; } .vs-row { gap: 6px; } .vs-row .avatar { --s: 26px !important; } }
/* Word Crawl' other daily modes (Countdown, Stones) are glossy chips above the buttons, on one line, so every
   game card's buttons sit together along its bottom edge with no empty band in the middle */
.gmodes { margin-top: 2px; }
.painted-ui .gmodes .btn.tiny.mode, .gmodes .btn.tiny.mode { border: 2px solid rgba(255, 255, 255, .6); border-image: none; border-radius: 999px; padding: 3px 12px 4px; background: rgba(27, 8, 56, .35); font-size: 14.5px; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .2); }

/* the home page's island sits lower and quieter, under the tiled backdrop */
.backdrop[data-look=home] .bd-sparkle { display: none; } /* the home page stays still: no twinkling stars */
/* ---- coloured cards in the gold frame (game cards, the Adventure banner, the gate banner): the colour is
   drawn under the frame and the frame is the gold alone (ui.board.rim, its purple lining cut out), pushed out
   by its own transparent margin so the gold's outer edge is the card's edge. The colour then meets the gold
   cleanly all round, following its curves: no square corners, no purple strip. ---- */
.has-rim .gcard, .has-rim .adv-card, .has-rim .gate-banner {
  border-image-source: var(--art-rim); border-image-outset: .08; background-clip: border-box; background-origin: border-box; }
.has-rim .gcard { border-radius: 12px; }
.has-rim .adv-card { border-radius: 10px; }
.has-rim .gate-banner { border-radius: 8px; }
@media (max-width: 560px) { .has-rim .gcard { border-radius: 7px; } }
/* the same gap under Past Answers as between the other home rows (owner, 28 Nov 2026; the icons sit inside their cards now) */
/* the filter pills over the game cards: one sideways row in the yellow / white pills, starting at the page gutter and running
   to the edge, so a pill cut at the right says there are more (owner, 28 Nov 2026) */
.seg.gfilter { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -30px -18px 34px; padding: 4px 18px 6px; scroll-padding-inline: 18px; }
.seg.gfilter::-webkit-scrollbar { display: none; }
.seg.gfilter button { flex: none; font-size: 15px; padding: 8px 18px; }
.gcards > [hidden] { display: none !important; }
@media (min-width: 561px) { .seg.gfilter { justify-content: safe center; } } /* wide screens: centred (owner, 28 Nov 2026); phones keep the row starting at the left */
@media (max-width: 560px) { .seg.gfilter { margin: -10px -10px 22px; padding-inline: 10px; scroll-padding-inline: 10px; } }
.next-daily { margin-bottom: 56px; } /* wide screens: the icons sit half above their cards */
@media (max-width: 560px) { .next-daily { margin-bottom: 22px; } }

/* the Get-the-app banner on shared links, on phones (storelinks.ts) */
.store-banner { position: fixed; left: 8px; right: 8px; top: calc(var(--safe-top) + 8px); z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 8px; border-radius: 18px; background: rgba(32, 10, 86, .94); border: 2px solid #ffcf4a; box-shadow: 0 6px 0 rgba(8, 3, 34, .4); color: #fff; animation: fade .3s; }
.store-banner { left: 28px; right: 28px; top: calc(var(--safe-top) + 28px); } /* in from the edges, so its red X fits at the standard corner */
.store-banner .sb-x { position: absolute; top: -20px; right: -20px; z-index: 3; width: 46px; height: 46px; padding: 0; } /* the red X every popup has, same size and corner (owner, 19 Nov 2026) */
.store-banner .sb-x img, .store-banner .sb-x svg { width: 46px; height: 46px; display: block; }
[dir=rtl] .store-banner .sb-x { right: auto; left: -20px; }
.store-banner .sb-text { display: grid; min-width: 0; flex: 1; }
.store-banner .sb-text b { font-size: 16px; }
.store-banner .sb-text small { color: #e6dcff; font-weight: 800; font-size: 12.5px; }
.store-banner .btn { flex: none; text-decoration: none; }
html.has-store-banner #app { padding-top: calc(var(--safe-top) + 92px); }

/* A player's character and name that open their profile (profile.ts profileLink); a guest's stay plain. */
span.who, button.who { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; vertical-align: middle; }
button.who { appearance: none; border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: inherit; cursor: pointer; }
button.who:hover .pn-text { filter: brightness(1.15); }
button.who:focus-visible { outline: 2px solid var(--lemon); outline-offset: 2px; border-radius: 8px; }
/* a profile opened over a game: the profile page in a card, so the game carries on underneath */
.overlay > .profile-sheet { position: relative; width: min(640px, 100%); margin: auto; padding: 14px; border-radius: 22px;
  background: linear-gradient(180deg, var(--sky-mid), var(--sky-bottom)); border: 3px solid var(--ink); box-shadow: 0 6px 0 rgba(27, 8, 56, .35); }
.profile-sheet .game-top { margin-top: 0; }

/* The chat room: who's talking (character and name) sits outside their speech bubble; your own on the right. */
.chat-msgs .msg { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "face who" "face say"; column-gap: 8px; row-gap: 2px; align-items: start; }
.chat-msgs .msg > .who:first-child { grid-area: face; }
.chat-msgs .msg > .who:nth-child(2) { grid-area: who; justify-self: start; font-weight: 900; font-size: 14px; color: #fff; }
.chat-msgs .msg-bubble { grid-area: say; justify-self: start; display: flex; align-items: center; gap: 8px; max-width: 100%;
  background: #fff; color: var(--ink); border-radius: 4px 14px 14px 14px; padding: 5px 10px; font-weight: 800; }
.chat-msgs .msg-bubble > span { min-width: 0; overflow-wrap: anywhere; }
.chat-msgs .msg.mine { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who face" "say face"; }
.chat-msgs .msg.mine > .who:nth-child(2), .chat-msgs .msg.mine .msg-bubble { justify-self: end; }
.chat-msgs .msg.mine .msg-bubble { background: #ffe9a8; border-radius: 14px 4px 14px 14px; }
.chat-msgs .msg-bubble .msg-more { border: 0; background: rgba(42, 11, 77, .12); color: var(--ink); border-radius: 999px; width: 26px; height: 22px; cursor: pointer; font-weight: 900; flex: none; }
.composer-note { margin: 0; text-align: center; }
/* the party room's last few messages (party.ts): another player's opens Report and Block from its gear */
.party-feed { display: grid; gap: 6px; width: 100%; text-align: start; }
.party-feed:empty { display: none; }
.party-feed > b { font-size: 15px; }

/* Celebrating a good move (fx/celebrate.ts): above the game, below cards, never taking a tap. */
.cele-layer { position: fixed; inset: 0; pointer-events: none; z-index: 15; overflow: hidden; }
.cele-chip, .cele-praise, .cele-banner, .cele-dust { position: absolute; left: 0; top: 0; }
.cele-chip { padding: 6px 13px; border-radius: 12px; white-space: nowrap; background: rgba(20, 6, 52, .9); border: 2px solid rgba(255, 210, 90, .85);
  color: #fff; font: 400 19px var(--display); letter-spacing: .3px; box-shadow: 0 4px 0 rgba(27, 8, 56, .35); }
.cele-chip i { font-style: normal; color: #ffd45a; }
.cele-praise { white-space: nowrap; font: 400 clamp(36px, 6.4vw, 58px)/1.05 var(--display); letter-spacing: .5px;
  background: linear-gradient(#fff7cf, #ffd23a 55%, #f39a12); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #4a1f00) drop-shadow(0 0 14px rgba(255, 200, 60, .45)); }
.cele-banner { white-space: nowrap; padding: 7px 18px; border-radius: 999px; background: linear-gradient(#ffe27a, #f6a91a); color: #3a1300; font: 400 19px var(--display); box-shadow: 0 4px 0 #a35a00; }
.cele-coin { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(27, 8, 56, .4)); }
.cele-dust { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(#fffbe0, #ffd23a 60%, transparent 70%); }

/* The home top bar: round painted buttons for the shop and settings; the coin counter is not a button. */
.top-icon { appearance: none; border: 0; background: none; padding: 0; width: 44px; height: 44px; cursor: pointer; flex: none; transition: transform .12s; }
.top-icon img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 3px 0 rgba(27, 8, 56, .35)); }
.top-icon:hover { transform: scale(1.06); }
/* the gold Plus button right of Settings (home.ts; switch homePlusButton): a painted gold circle; members never see it */
.top-plus img { border-radius: 50%; }
html.is-plus .top-plus { display: none; }
/* the top bar pinned while home scrolls (home.ts stickyTopBar; switch homeStickyBar): a slim band at the top of the screen, the
   same buttons, over the page; the safe area (notch, status bar) stays clear */
.home-top .top-bar.stuck { position: fixed; top: 0; left: 0; right: 0; z-index: 30; justify-content: flex-end; flex-wrap: nowrap;
  padding: calc(env(safe-area-inset-top, 0px) + 6px) max(12px, env(safe-area-inset-right, 0px)) 6px max(12px, env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, rgba(42, 14, 98, .96), rgba(30, 9, 72, .92)); box-shadow: 0 4px 14px rgba(8, 3, 34, .45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: topbar-in .18s ease-out; }
.home-top .top-bar.stuck .top-icon { width: 38px; height: 38px; }
@keyframes topbar-in { from { transform: translateY(-100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .home-top .top-bar.stuck { animation: none; } }
.plus-paywall { max-width: min(460px, 94vw); }
.top-icon:focus-visible { outline: 2px solid var(--lemon); outline-offset: 2px; border-radius: 50%; }
.coin-counter { cursor: default; }
button.streak-chip { appearance: none; border: 0; cursor: pointer; }
button.streak-chip:focus-visible { outline: 2px solid var(--lemon); outline-offset: 2px; }
.streak-card-img { width: 96px; height: 96px; object-fit: contain; }

/* The one exception to "no scrollbars": the home chat list shows the browser's own plain thin bar once the talk runs past
   what fits (owner, 11 Nov 2026: no gold bar). A non-auto scrollbar-width makes Chrome, Edge, Firefox and Safari 18.2+
   draw their native bar; older Safari only knows the webkit pseudo-elements, so it gets a plain grey thumb. Phones show
   their own fading bar either way. */
.chat-room .feed-wrap { padding-right: 4px; }
.chat-room .feed { scrollbar-width: thin; scrollbar-color: auto; padding-right: 6px; overscroll-behavior: contain; }
@supports not (scrollbar-width: thin) {
  .chat-room .feed::-webkit-scrollbar { display: block; width: 8px; height: 0; }
  .chat-room .feed::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .45); border-radius: 999px; }
}

/* whenPainted: held back (keeping its place) until its pictures are ready, then shown in one go */
.painting { visibility: hidden; }

/* Phones: the shop and settings sit at the top right beside the logo; the streak, you and your coins get the
   row under it, so a long name has room (it wraps rather than being cut). */
@media (max-width: 480px) {
  .home-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; column-gap: 6px; row-gap: 8px; }
  .home-top .logo { grid-row: 1; grid-column: 1 / 4; }
  .home-top .top-bar { display: contents; }
  .home-top .top-bar > .top-shop { grid-row: 1; grid-column: 4; }
  .home-top .top-bar > .top-gear { grid-row: 1; grid-column: 5; }
  .home-top .top-bar > .streak-chip { grid-row: 2; grid-column: 1; }
  .home-top .top-bar > .pill.me { grid-row: 2; grid-column: 2; justify-self: start; max-width: 100%; }
  .home-top .top-bar > .coin-counter { grid-row: 2; grid-column: 3 / 6; justify-self: end; }
}
/* Narrow phones: the house card's button goes under its text instead of running off the screen. */
@media (max-width: 420px) {
  .ad-body { flex-wrap: wrap; }
  .ad-body > div { flex: 1 1 0; min-width: 55%; }
  .ad-body > .btn { margin: 2px auto 0; }
}

/* Muted: the speaker keeps its colour and gets a line through it (soundButton). */
.sound-off { position: relative; }
.sound-off::after { content: ''; position: absolute; left: 50%; top: 50%; width: 56%; height: 9%; min-height: 5px; background: #fff; border: 2px solid #3b1470;
  border-radius: 999px; transform: translate(-50%, -50%) rotate(45deg); box-shadow: 0 1px 0 rgba(27, 8, 56, .35); pointer-events: none; }
/* Centred popups centre their pictures too (icons, medals, characters): a grid lines a fixed-size picture up on
   the left otherwise, whatever the text does. */
.stack.center > :is(img, picture, svg, canvas, .avatar, .badge-img) { justify-self: center; }

/* My stuff (inventory.ts): the player's own coins, power-ups, showcase and purchases, in the usual panels */
#app.stuff-page { max-width: 620px; }
.stuff-note { margin: 6px 0 0; text-align: center; color: #e6dcff; font-weight: 800; font-size: 14px; }
.stuff-list { display: grid; gap: 14px; margin-top: 10px; }
.stuff-head { display: flex; align-items: center; gap: 14px; color: #fff; }
.stuff-art { width: 72px; height: 72px; object-fit: contain; flex: none; }
.stuff-text { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.stuff-text h3 { margin: 0; font-size: 20px; }
.stuff-text small { color: #e6dcff; font-weight: 800; }
.stuff-coins { display: inline-flex; align-items: center; gap: 6px; font: 400 28px var(--display); color: #fff; }
.stuff-coins .coin-img { width: 30px; height: 30px; }
.stuff-panel { color: #fff; }
.stuff-panel > h2 { margin: 0 0 6px; text-align: center; }
.stuff-games { display: grid; gap: 12px; }
.stuff-game-name { margin: 0 0 6px; font: 400 17px var(--display); letter-spacing: .4px; }
.stuff-pus { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.stuff-pu { appearance: none; border: 0; background: none; padding: 0; display: grid; justify-items: center; align-content: start; gap: 4px; cursor: pointer; color: #fff; font: 800 12.5px var(--body); text-align: center; }
.stuff-pu small { overflow-wrap: anywhere; line-height: 1.2; }
.stuff-pu:hover .power { transform: scale(1.06); }
.stuff-buys { display: grid; gap: 8px; }
.stuff-buy { display: flex; align-items: center; gap: 12px; background: rgba(27, 8, 56, .35); border-radius: 14px; padding: 8px 12px; }
.stuff-thumb { width: 56px; height: 44px; flex: none; object-fit: contain; display: grid; place-items: center; overflow: hidden; border-radius: 10px; }
.stuff-thumb > * { max-width: 100%; max-height: 100%; }
.stuff-amount, .stuff-price { display: inline-flex; align-items: center; gap: 5px; font: 400 17px var(--display); white-space: nowrap; }
.stuff-price { flex: none; }
.stuff-empty { display: grid; justify-items: center; gap: 8px; }
.shop-foot { margin-top: 2px; }
/* your own profile's buttons (My stuff, Change name, Log out): each as wide as its words, wrapping on phones */
.own-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.own-actions > .btn { max-width: none; overflow: visible; text-overflow: clip; flex: 0 0 auto; }
.stuff-buy .stuff-text > b { font: 400 17px var(--display); letter-spacing: .3px; overflow-wrap: anywhere; }
.stuff-list { grid-template-columns: minmax(0, 1fr); }
.stuff-head { flex-wrap: wrap; }
.stuff-head > .btn { margin-left: auto; }
.stuff-buy { flex-wrap: wrap; }
/* My stuff, Your bests (bests.ts): one row per kind of game, its name (and Daily when a daily set it) on the left,
   the best on the right; long names wrap rather than push the best off the row */
.stuff-bests { display: grid; gap: 6px; }
.stuff-best { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; background: rgba(27, 8, 56, .35); border-radius: 14px; padding: 8px 12px; }
.stuff-best-kind { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; font-weight: 800; overflow-wrap: anywhere; }
.stuff-best-kind .chip { font-size: 12px; padding: 1px 8px; }
.stuff-best-value { font: 400 19px var(--display); letter-spacing: .3px; white-space: nowrap; margin-inline-start: auto; }
.stuff-none { margin: 0; text-align: center; font-weight: 800; color: #e6dcff; }
/* a results card's personal best (bests.ts): gold once this game beat it */
.layer.pb-layer.new { background: linear-gradient(#fff6c8, #ffe27a); }
.layer.pb-layer.new h4 { color: #8a3d00; }
/* "New best!" under the results title (bests.ts bestUnderTitle) */
.pill.best-pill { align-self: center; width: fit-content; margin: 0 auto; background: linear-gradient(#ffe27a, #f6a91a); color: #3a1300; border: 3px solid var(--ink); }
/* a results card's coins (payout.ts): the coin art and "+N coins", which then fly to the coin counter */
.layer.coins-layer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; background: linear-gradient(#fff6c8, #ffe27a); }
.layer.coins-layer .coin-img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.layer.coins-layer b { font: 400 22px var(--display); color: #8a3d00; letter-spacing: .4px; }

/* Every button springs: a quick dip while pressed, then a little overshoot as it bounces back on release.
   One rule for all of them (painted buttons, icon buttons, chips, cards that act as buttons), placed last so
   it wins over each kind's own press style. Reduce Motion turns it off with every other transition. */
/* the press spring uses scale, not transform, so it adds to an element's own placement (a map pad positioned with
   transform) instead of replacing it: the button bounces in place */
:is(button, [role=button]) { transition: scale .34s cubic-bezier(.34, 1.9, .5, 1), filter .15s, box-shadow .15s; }
:is(button, [role=button]):not(:disabled):active { scale: .93; transition: scale .07s ease-out, filter .15s, box-shadow .15s; }

/* ==== The shop (shop.ts): one page inside the popup's frame. The page scrolls under a header that keeps the
   balance (and My stuff) in view: the starter pack first and biggest, a streak shield while there's a streak
   to protect, the coin packs, Plus, every power-up, then the Showcase. ==== */
.overlay > .card.shop { display: flex; flex-direction: column; gap: 8px; max-height: calc(100dvh - 36px); }
.shop-top { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; }
.shop-top > h2 { margin: 0; }
.shop-top .coin-chip { cursor: default; font-size: 22px; padding: 3px 14px 3px 3px; }
.shop-top .coin-chip .coin-img { width: 30px; height: 30px; }
.shop-top .shop-stuff { white-space: nowrap; flex-shrink: 0; padding-inline: 8px; min-width: 126px; }
.shop-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px;
  align-content: start; padding: 12px 2px 6px; text-align: start; color: #fff; }
.shop-body .shop-h { margin: 0 0 8px; text-align: center; font-size: 22px; letter-spacing: .4px; }
.shop-body > .shop-sec { min-width: 0; }
/* a picture still waiting for its painting keeps its space, empty */
.shop-body .blank:not(.pk-art) { visibility: hidden; }
/* coins bought here fly over the shop into its balance */
body:has(.overlay .card.shop) .cele-layer { z-index: 21; }

/* the starter pack: gold, tagged Best value, its price on one big button */
.st { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); grid-template-areas: 'hero head' 'hero cells' 'hero buy'; align-items: center;
  gap: 10px 16px; padding: 18px 18px 16px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 207, 74, .36), rgba(255, 207, 74, .1)); box-shadow: inset 0 0 0 3px #ffcf4a, 0 0 20px rgba(255, 200, 60, .45); }
.st > .st-tag { position: absolute; top: -12px; inset-inline-start: 18px; font-size: 15px; padding: 2px 12px; }
.st-hero { grid-area: hero; width: 150px; height: 150px; object-fit: contain; justify-self: center; filter: drop-shadow(0 6px 0 rgba(27, 8, 56, .3)); }
.st-head { grid-area: head; display: grid; gap: 2px; min-width: 0; }
.st-title { margin: 0; font-size: 30px; line-height: 1.1; }
.st-sub { margin: 0; font-weight: 900; font-size: 13.5px; color: #ffe9a8; }
.st-cells { grid-area: cells; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.st-cell { display: grid; grid-template-rows: 56px auto auto; justify-items: center; align-content: start; gap: 3px; min-width: 0; padding: 8px 4px 9px;
  border-radius: 14px; background: rgba(27, 8, 56, .35); text-align: center; }
.st-pic { width: 56px; height: 56px; display: grid; place-items: center; }
.st-img { width: 56px; height: 56px; object-fit: contain; display: block; }
.st-cell > b { font: 400 19px var(--display); letter-spacing: .3px; line-height: 1.1; overflow-wrap: anywhere; }
.st-cell > small { font-weight: 800; font-size: 12px; line-height: 1.2; color: #e6dcff; overflow-wrap: anywhere; }
.st-pus { width: 56px; display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 2px; }
.st-pus img { width: 27px; height: 27px; object-fit: contain; }
.st-pus.n1 img { width: 56px; height: 56px; }
.st-look { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--rar) 80%, transparent); }
.st-look .badge-img { width: 54px; height: 54px; }
.st-look .cos-banner { width: 56px; height: 36px; border-width: 2px; border-radius: 8px; }
.st-look .sc-aa { font-size: 30px; }
.st-look .sc-bub { font-size: 12px; padding: 4px 8px; }
.st > .st-buy { grid-area: buy; }

/* the streak shield, while there's a streak to protect */
.shop-shield { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto auto; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: 18px;
  background: linear-gradient(90deg, rgba(255, 140, 50, .34), rgba(255, 255, 255, .08)); box-shadow: inset 0 0 0 2px rgba(255, 176, 90, .85); }
.shop-shield-art { width: 60px; height: 60px; object-fit: contain; }
.shop-shield .shop-text { min-width: 0; }
.shop-shield .shop-text b { font-size: 19px; }

/* coin packs: Most popular in blue beside Best value in gold; a long tag wraps rather than cut */
.shop .pk.popular { background: linear-gradient(180deg, rgba(90, 200, 255, .32), rgba(90, 200, 255, .1)); box-shadow: inset 0 0 0 3px #6fd3ff, 0 0 14px rgba(90, 200, 255, .4); }
.pk-popular { border-radius: 999px; padding: 1px 9px; font: 400 13.5px var(--display); letter-spacing: .3px; color: #fff;
  background: linear-gradient(#7fd8ff, #2f8fe8); box-shadow: inset 0 -2px 0 #1a64b0; }
.shop .pk-tags > span { white-space: normal; text-align: center; }
/* a long word on a button makes the button grow (a second line), never cut or smaller */
.shop-body .btn { white-space: normal; overflow: visible; text-overflow: clip; }

/* Plus: its picture, what it gives (each with its own picture) and Try free */
/* the crown sits in line with the "Plus membership" title on every screen (owner, 22 Nov 2026: on computers it floated
   alone at the left, centred on the whole list) */
.shop-plus { display: grid; grid-template-columns: 80px minmax(0, 1fr); grid-template-areas: 'hero title' 'perks perks' 'price price' 'try try'; align-items: center; gap: 10px 16px;
  padding: 14px 16px; border-radius: 20px; background: linear-gradient(135deg, rgba(190, 110, 255, .42), rgba(70, 150, 255, .22)); box-shadow: inset 0 0 0 2px rgba(220, 180, 255, .8); }
.shop-plus-hero { grid-area: hero; width: 80px; height: 80px; object-fit: contain; justify-self: center; }
.shop-body .shop-plus > .shop-h { grid-area: title; margin: 0; text-align: start; }
.shop-plus > .plus-perks { grid-area: perks; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shop-plus .plus-perk { background: rgba(27, 8, 56, .3); min-width: 0; }
.shop-plus .plus-perk img, .shop-plus .plus-perk .plus-perk-art { width: 40px; height: 40px; flex: none; }
.shop-plus .plus-perk b { min-width: 0; font: 400 15px var(--display); letter-spacing: .3px; line-height: 1.2; overflow-wrap: anywhere; }
.shop-plus > .shop-plus-try { grid-area: try; justify-self: start; }
.shop-plus-price { grid-area: price; margin: 0; font-weight: 900; font-size: 14px; line-height: 1.3; color: #ffe9a8; }
/* the Plus card shown elsewhere (plus.ts): its price under the same perks */
.plus-card .plus-price { margin: 0; font-weight: 900; font-size: 14px; line-height: 1.3; color: #ffe9a8; }

/* power-ups, by game */
.shop-powers .shop-group + .shop-group { margin-top: 10px; }
.shop-powers .shop-game { margin: 0 2px 6px; color: #fff; }
.shop-powers .shop-text { min-width: 0; }
.shop-body .shop-fair { margin: 10px 0 0; text-align: center; }

/* Showcase looks only won from the gold Sunday chest: where they come from instead of a price */
.sc-chest { display: inline-flex; align-items: center; justify-content: center; gap: 3px; font: 400 12.5px var(--display); letter-spacing: .3px; line-height: 1.15; color: #ffe27a; text-align: center; }
.sc-chest .sc-chest-img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.sc-chest-note { flex: 0 1 auto; max-width: 55%; display: inline-flex; align-items: center; gap: 6px; font: 900 12.5px var(--body); line-height: 1.25; color: #ffe27a; }
.sc-chest-note .sc-chest-img { width: 30px; height: 30px; object-fit: contain; flex: none; }

@media (max-width: 560px) {
  .overlay > .card.shop { max-height: calc(100dvh - 20px); gap: 6px; }
  .shop-top { gap: 4px 8px; }
  .shop-top .coin-chip { font-size: 19px; }
  .shop-top .coin-chip .coin-img { width: 26px; height: 26px; }
  .shop-body { gap: 12px; }
  .st { grid-template-columns: 76px minmax(0, 1fr); grid-template-areas: 'hero head' 'cells cells' 'buy buy'; gap: 10px 12px; padding: 18px 12px 12px; }
  .st-hero { width: 76px; height: 76px; }
  .st-title { font-size: 25px; }
  .st-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-shield { grid-template-columns: 48px minmax(0, 1fr) auto; padding: 8px 10px; }
  .shop-shield-art { width: 48px; height: 48px; grid-row: span 2; }
  .shop-shield .shop-text { grid-column: 2 / -1; }
  .shop-shield .chip.own { justify-self: end; }
  .shop-plus { grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: 'hero title' 'perks perks' 'price price' 'try try'; padding: 12px; }
  .shop-plus-hero { width: 64px; height: 64px; }
  .shop-plus > .plus-perks { grid-template-columns: minmax(0, 1fr); }
  .shop-plus > .shop-plus-try { justify-self: stretch; }
  /* phones: both plans pinned to the bottom of the shop while the list scrolls above them (owner, 22 Nov 2026: the monthly
     and yearly buttons must both show without scrolling); the renewal line, links and Restore follow in the page */
  .shop-plus > .plus-buy { display: contents; }
  .shop-plus > .plus-buy > :not(.plus-plans) { grid-column: 1 / -1; justify-self: center; text-align: center; }
  .shop-plus .plus-plans { grid-area: try; position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; /* two full-width rows (owner, 22 Nov 2026) */
    gap: 2px 0; margin: 4px -6px 0; padding: 8px 6px 6px;
    background: #2c0f66; isolation: isolate; border-radius: 16px; box-shadow: 0 -8px 14px rgba(8, 3, 34, .45); }
  .shop-plus .plus-plans > * { position: relative; z-index: 1; }
  .shop-plus .plus-buy .plus-plans .btn.big { width: min(100%, 320px); min-width: 0; white-space: nowrap; font-size: 18px; } /* the same width, the label inside the button */
  .shop-plus .plus-plans .plan-wrap { width: min(100%, 320px); } .shop-plus .plus-plans .plan-wrap > .btn.big { width: 100%; }
  .shop-plus .plus-buy .plus-plans .plus-plan-note { margin: 0 0 6px; font-size: 12px; text-align: center; line-height: 1.25; }
}

/* The chat's Sign up / Log in pair: each button as wide as its words (German and Russian are long), wrapping
   to two rows on a narrow phone rather than cutting the text */
.composer .btn-grid { display: flex; flex-wrap: wrap; justify-content: center; }
.composer .btn-grid > .btn { width: auto; max-width: none; flex: 0 1 auto; white-space: nowrap; }

/* Two buttons side by side in a popup (.btn-grid): each at least as wide as its longest word, so German,
   Russian or Persian words are never cut; a pair that doesn't fit on one line wraps to two rows. The font
   never shrinks: the buttons grow instead. */
.btn-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn-grid > *, .btn-grid > .btn, .btn-grid > .btn.big { flex: 1 1 140px; width: auto; max-width: 260px; min-width: min-content; }
/* Adventure: a map wider than the screen that still shows every pad is centred and clipped at the sides
   (story/adventure.ts), so the page never scrolls sideways */
#app.story.story-clip { overflow-x: clip; }
/* Word Crawl on a phone: its three buttons and the round How to play in one row under the power-ups (narrower
   painted ends, same font size), so they're on the first screen */
.sq-actions { gap: 6px; }
.painted-ui .game-actions.sq-actions .btn { border-width: 0 16px; border-image-width: 0 16px; }
/* Small phones (360px): the top bar's round buttons fit their 60px columns (66px ones stuck out past the
   screen's edge and made the page scroll sideways) */
@media (max-width: 380px) { .game-top .img-btn { width: 58px; height: 58px; } }
/* Home cards on a narrow phone: Daily, Solo and Invite each at least as wide as their words, wrapping to a
   second row rather than cutting "Invite", "Einladen" or "Пригласить" */
.gbtns { flex-wrap: wrap; }
.gbtns .btn { min-width: min-content; }
/* Phones: Word Crawl' power-ups on one line beside the coins (smaller round buttons, same text), so the board keeps
   its size with the game's buttons on the first screen */
@media (max-width: 560px) {
  .sq-power { gap: 8px; }
  .sq-power .power-tray { gap: 6px; }
  .sq-power .power { width: 48px; height: 48px; }
}
/* Narrow phones: the game's buttons with slimmer painted ends (the words keep their size), so New game,
   Leaderboard and Share fit one row in Russian or Persian too */
@media (max-width: 400px) {
  .painted-ui .game-actions .btn { border-width: 0 18px; border-image-width: 0 18px; }
  .painted-ui .game-actions.sq-actions .btn { border-width: 0 16px; border-image-width: 0 16px; }
}
/* No page wider than the screen: the backdrop's drifting layers (a little larger than the screen, so their drift
   never shows an edge) are painted inside it and never widen the page; the season card keeps its picture and
   button inside the card on a phone */
.backdrop { contain: paint; }
.sp-card { max-width: 100%; overflow: clip; }
.sp-card-art { max-width: 100%; }
/* the home event card's buttons on a phone: each at least as wide as its words ("Рейтинг события"), wrapping
   to another row instead of cutting them */
@media (max-width: 640px) {
  .ev-btns { display: flex; flex-wrap: wrap; }
  .ev-btns > .btn { flex: 1 1 110px; min-width: min-content; }
}
/* Small phones: a row of five round controls (Word Crawl: hint, turn left, turn right, undo, done) fits a 360px
   screen without reaching past its edges */
@media (max-width: 380px) {
  .controls { gap: 8px; }
  .controls .img-btn { width: 58px; height: 58px; }
  .controls .btn.icon { width:58px;height:58px; }
}
/* Small phones: the title between the top bar's buttons gets the room the slimmer buttons free, so a long
   Russian or German title never pushes the sound button past the screen's edge */
@media (max-width: 380px) { .game-top { grid-template-columns: 58px minmax(0, 1fr) 58px; gap: 4px; } }

/* Every popup keeps clear of the phone's status bar and home bar (the notch, the Dynamic Island, the clock):
   taps up there go to the phone, not the page, so a popup's red X under the clock couldn't be pressed */
.overlay { padding-top: max(18px, calc(var(--safe-top) + 12px)); padding-bottom: max(18px, calc(var(--safe-bottom) + 12px)); }
.overlay > .card.shop { max-height: calc(100dvh - 36px - var(--safe-top) - var(--safe-bottom)); }

/* Word Crawl (and Adventure) board: while the board is being refitted the canvas shrinks with its frame at once,
   never drawn wider than the frame and cut off on the right */
.stage:not(.pic-stage):not(.sw-stage) > canvas { max-width: 100%; height: auto !important; }

/* Home header on a phone: one row (logo, streak, you, coins, shop, settings) at the same sizes, wrapping only when
   a screen is too narrow for all of it */
@media (max-width: 480px) {
  .home-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 6px; row-gap: 8px; }
  .home-top .logo { flex: none; }
  .home-top .top-bar { display: flex; flex: 1 1 auto; justify-content: flex-end; align-items: center; gap: 5px; flex-wrap: nowrap; width: auto; min-width: 0; }
  .home-top .top-bar > * { grid-row: auto; grid-column: auto; justify-self: auto; }
}
@media (max-width: 480px) {
  /* the name is right below in the greeting, so on a phone the chip shows just your character (tap it as before) */
  .home-top .pill.me > span:last-child { display: none; }
  .home-top .pill.me { padding: 3px; gap: 0; }
}

/* ---- something new, shown big (fx/reveal.ts): a ribbon, the art on a ray of light in its grade's colour,
   its name and grade, "×2", and a bar filling to what the player has now. Each part arrives in turn; .whole
   (tapped early) shows it all at once. ---- */
.rv-layer { --rv: #14cfae; position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; overflow: hidden;
  padding: calc(var(--safe-top) + 20px) 16px calc(var(--safe-bottom) + 64px); cursor: pointer;
  background: rgba(20, 6, 50, .86); animation: fade .2s; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.rv-layer.out { opacity: 0; transition: opacity .2s; }
/* the painted red X sits in the screen's top-right corner (top-left in right-to-left), on the layer, so nothing clips it */
.rv-layer > .rv-x { top: calc(var(--safe-top) + 12px); right: 14px; z-index: 5; cursor: pointer; }
[dir=rtl] .rv-layer > .rv-x { right: auto; left: 14px; }
.rv-item { --rv: #14cfae; grid-area: 1 / 1; width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: #fff; }
.rv-item.g-rare { --rv: #3d9bff; } .rv-item.g-epic { --rv: #b45cff; } .rv-item.g-legendary { --rv: #ffc414; }
.rv-item.g-stone { --rv: #c9c2dc; } .rv-item.g-crystal { --rv: #7fe9ff; } .rv-item.g-gold { --rv: #ffcf4a; } .rv-item.g-platinum { --rv: #fff1fb; }
.rv-item.leave { animation: rv-leave .18s ease-in forwards; }
.rv-kind { animation: rv-drop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.rv-art { position: relative; width: min(64vw, 240px); aspect-ratio: 1; display: grid; place-items: center; margin: 6px 0 2px; }
.rv-art > img { position: relative; z-index: 2; width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 8px 0 rgba(20, 6, 50, .4));
  animation: rv-pop .65s cubic-bezier(.2, 1.5, .4, 1) .12s both, rv-float 3.2s ease-in-out .9s infinite; }
.rv-rays { position: absolute; inset: -38%; z-index: 0; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rv) 55%, transparent) 0 8deg, transparent 8deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%); mask: radial-gradient(circle, #000 18%, transparent 66%);
  animation: rv-in .5s ease-out both, rv-spin 16s linear infinite; }
.rv-glow { position: absolute; inset: -6%; z-index: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--rv) 70%, #fff) 0, color-mix(in srgb, var(--rv) 45%, transparent) 34%, transparent 68%);
  animation: rv-in .4s ease-out both, rv-breathe 2.4s ease-in-out .5s infinite; }
.rv-sparks { position: absolute; inset: -10%; z-index: 3; pointer-events: none;
  background: radial-gradient(circle at 12% 30%, #fff 0 1.4%, transparent 2.6%), radial-gradient(circle at 88% 22%, #fff 0 1.1%, transparent 2.2%),
    radial-gradient(circle at 80% 82%, #fff 0 1.3%, transparent 2.5%), radial-gradient(circle at 20% 78%, #fff 0 1%, transparent 2.1%),
    radial-gradient(circle at 50% 6%, #fff 0 .9%, transparent 2%), radial-gradient(circle at 95% 55%, #fff 0 .8%, transparent 1.9%);
  animation: rv-in .3s ease-out .35s both, sp-twinkle 1.4s ease-in-out .7s infinite alternate; }
.rv-count { position: absolute; z-index: 4; right: 2%; bottom: 4%; font-size: 46px; -webkit-text-stroke-width: 6px; animation: rv-pop .5s cubic-bezier(.2, 1.6, .4, 1) .55s both; }
.rv-title { margin: 0; font-size: clamp(30px, 9vw, 42px); line-height: 1.05; overflow-wrap: anywhere; animation: rv-rise .4s ease-out .3s both; }
.rv-grade { font-size: 22px; color: var(--rv); animation: rv-rise .4s ease-out .42s both; }
.rv-item.g-legendary .rv-grade, .rv-item.g-platinum .rv-grade { animation: rv-rise .4s ease-out .42s both, rv-shimmer 1.6s ease-in-out 1s infinite alternate; }
.rv-note { margin: 0; max-width: 30ch; font-weight: 800; color: #e6dcff; animation: rv-rise .4s ease-out .5s both; }
.rv-bar-row { width: min(380px, 100%); display: grid; grid-template-columns: 3.6em minmax(0, 1fr) 3.6em; align-items: center; gap: 4px 10px; margin-top: 6px; animation: rv-rise .4s ease-out .6s both; }
/* a new Fijee: Use it now and Share under it (web/src/fijees.ts) */
.rv-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; animation: rv-rise .4s ease-out .7s both; }
.rv-actions .btn { min-width: 140px; }
/* opened from a reward page (Share: the card preview, a message): above the reward layer, not hidden behind it */
.rv-layer ~ .overlay { z-index: 90; }
body:has(.rv-layer) #toasts { z-index: 95; }
/* an error toast with its Contact us link (ui.ts errToast; owner: a plain link, not a button): tappable, never wider than the phone */
.toast.with-contact { pointer-events: auto; max-width: min(92vw, 520px); text-align: center; }
.toast-contact { display: inline; margin: 0 0 0 6px; padding: 4px 2px; border: 0; background: none; font: inherit; color: #5b23a8; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.toast-contact:focus-visible { outline: 3px solid #ffe49b; outline-offset: 2px; border-radius: 4px; }
/* Fijees still to unlock: greyed but still animated (owner 11 Nov 2026: no lock), in the picker and on their how-to card */
.ap-pib.fj-locked .ap-well img, .fj-locked-art { filter: grayscale(1) brightness(.85); }
.ap-pib.fj-locked small { opacity: .7; }
.ap-count { margin: -4px 0 0; font-weight: 800; color: #ffe27a; }
.fj-locked .fj-locked-art { width: 150px; height: 150px; object-fit: contain; }
.fj-progress { width: 100%; max-width: 420px; display: grid; grid-template-columns: 3.6em minmax(0, 1fr) 3.6em; align-items: center; gap: 8px; }
.rv-bar-label { grid-column: 2; text-align: center; font-size: 17px; }
/* the bar centred, its count beside it on the right (owner, 11 Nov 2026), on every bar of this kind */
.rv-bar-row > .bar, .fj-progress > .bar { grid-column: 2; }
.rv-bar-row > .rv-bar-num, .fj-progress > b { grid-column: 3; justify-self: start; white-space: nowrap; }
.rv-bar > i { transition: width .7s cubic-bezier(.3, 1.3, .5, 1); }
.rv-bar-num { font: 400 22px var(--display); color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; min-width: 2ch; }
.rv-step { font-weight: 900; color: #cbb8ff; }
.rv-tap { position: fixed; left: 0; right: 0; bottom: calc(var(--safe-bottom) + 24px); text-align: center; font: 400 18px var(--display); color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; opacity: 0; transition: opacity .25s; }
.rv-tap.on { opacity: 1; animation: rv-breathe 1.8s ease-in-out infinite; }
.rv-item.whole, .rv-item.whole * { animation-delay: 0s !important; animation-duration: .01s !important; }
.rv-item.whole .rv-rays { animation: rv-spin 16s linear infinite !important; }
.rv-item.whole .rv-art > img { animation: rv-float 3.2s ease-in-out infinite !important; }
@keyframes rv-pop { from { transform: scale(0) rotate(-14deg); opacity: 0; } 60% { opacity: 1; } }
@keyframes rv-drop { from { transform: translateY(-30px) scale(.8); opacity: 0; } }
@keyframes rv-rise { from { transform: translateY(14px); opacity: 0; } }
@keyframes rv-in { from { opacity: 0; transform: scale(.6); } }
@keyframes rv-spin { to { transform: rotate(1turn); } }
@keyframes rv-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes rv-breathe { 0%, 100% { opacity: .85; scale: 1; } 50% { opacity: 1; scale: 1.05; } }
@keyframes rv-shimmer { from { filter: brightness(1); } to { filter: brightness(1.35) drop-shadow(0 0 8px var(--rv)); } }
@keyframes rv-leave { to { transform: scale(.85); opacity: 0; } }

/* ---- Glow Gems that move: a gem on a progress bar giggles as the fill reaches it (.hit, word-crawl/screen.ts),
   then glints now and then; the gems won on a results card bob and sway in turn, with a glint. Individual
   translate/rotate/scale, so each keeps its own placement (the raised middle gem, the bar's centring). ---- */
.bar .star.hit { animation: gem-hit .9s cubic-bezier(.3, 1.4, .5, 1); }
.gstatus .mini-stars .gem-on { transform-origin: 50% 70%; animation: gem-hit 1.2s cubic-bezier(.3, 1.4, .5, 1) infinite; }
.gstatus .mini-stars .gem-on:nth-child(2) { animation-delay: .18s; }
.gstatus .mini-stars .gem-on:nth-child(3) { animation-delay: .36s; }
.bar .star .gem-on { animation: gem-glint 4.2s ease-in-out 1s infinite; }
.result-stars .gem-on { transform-origin: 50% 70%; animation: gem-bob 2.6s ease-in-out infinite, gem-glint 3.9s ease-in-out infinite; }
.result-stars > :nth-child(2) .gem-on, .result-stars > .gem-on:nth-child(2) { animation-delay: -.87s, -1.3s; }
.result-stars > :nth-child(3) .gem-on, .result-stars > .gem-on:nth-child(3) { animation-delay: -1.73s, -2.6s; }
@keyframes gem-hit { 0% { scale: 1; rotate: 0deg; } 18% { scale: 1.45; rotate: -14deg; } 36% { scale: 1.28; rotate: 12deg; } 54% { scale: 1.3; rotate: -8deg; } 72% { scale: 1.12; rotate: 5deg; } 100% { scale: 1; rotate: 0deg; } }
@keyframes gem-bob { 0%, 100% { translate: 0 0; rotate: 0deg; } 25% { rotate: -5deg; } 50% { translate: 0 -5px; rotate: 0deg; } 75% { rotate: 5deg; } }
@keyframes gem-glint { 0%, 78%, 100% { filter: none; } 86% { filter: brightness(1.35) drop-shadow(0 0 7px #fff3a0); } }

/* characters kept alive after a win (fx/alive.ts): breathing, and a hop now and then (individual scale and
   translate, so their own placement and cheering stay as they are) */
img.alive { transform-origin: 50% 85%; animation: char-breathe 3.4s ease-in-out infinite; }
img.alive.hop { animation: char-hop .62s cubic-bezier(.3, 1.3, .5, 1), char-breathe 3.4s ease-in-out infinite; }
.ap-pib.special .ap-well img.alive, .ap-halo.special img.alive { animation:char-breathe 3.4s ease-in-out infinite,sp-glint 4s ease-in-out infinite; }
.ap-pib.special .ap-well img.alive.hop, .ap-halo.special img.alive.hop { animation:char-hop .62s cubic-bezier(.3,1.3,.5,1),char-breathe 3.4s ease-in-out infinite,sp-glint 4s ease-in-out infinite; }
@keyframes char-breathe { 0%, 100% { scale: 1 1; } 50% { scale: .985 1.035; } }
@keyframes char-hop { 0%, 100% { translate: 0 0; } 35% { translate: 0 -16%; } 62% { translate: 0 0; } 80% { translate: 0 -4%; } }

/* Daily offers fresh Solo levels without altering the shared daily puzzle. */
.daily-solo-label { display:block; text-align:center; color:white; font:800 14px/1.4 var(--body); margin-bottom:4px; }
.game-mode-label { text-align:center; color:#eee0ff; font-weight:800; margin-top:6px; }
.password-field { position:relative; display:block; width:100%; min-width:0; }
.password-field .password-input { width:100%; box-sizing:border-box; padding-right:52px; }
.password-eye { position:absolute; right:4px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:44px; height:44px; padding:10px; border:0; border-radius:10px; background:transparent; color:#351154; cursor:pointer; }
.password-eye svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.password-eye .eye-slash { display:none; }
.password-eye.revealed .eye-slash { display:block; }
.password-eye:focus-visible { outline:3px solid #6b35b8; outline-offset:-3px; }


/* Camera stays inside the board; elapsed-time hiding never moves the layout. */
.board-zoom-viewport{scrollbar-width:none}.board-zoom-viewport::-webkit-scrollbar{display:none}
.game-sound-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:none}
.game-sound-controls .img-btn,.game-sound-controls .btn.icon{width:44px;height:44px;min-width:44px;min-height:44px;padding:0;flex:none}

.hide-elapsed-timers :is(.sdk-timer,.jg-timer,.pic-meter .timer,.cw-screen .timer,.sw-timer,.ws-meter>:last-child,.np-meter>:last-child){visibility:hidden}
/* The stopwatch has a crown above its circular face: align/size the face to the speaker rim. */
.game-sound-controls .timer-toggle img{position:absolute;left:52%;top:40%;width:116%;height:116%;max-width:none;transform:translate(-50%,-50%)}


.game-board-loading{position:absolute;inset:0;z-index:12;display:grid;place-items:center;background:rgba(35,8,62,.35);color:white;font:20px var(--display);pointer-events:none}

.marketing-optin{display:flex;align-items:flex-start;gap:10px;text-align:start;font-size:14px;line-height:1.4}.marketing-optin input{width:20px;height:20px;flex:none;accent-color:#883cbd}

/* Jigsaw keyboard / screen-reader control: clipped for pointer users, a small status bar while it has keyboard focus */
.jg-kb { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.jg-kb:focus-within { width: auto; height: auto; overflow: visible; clip: auto; left: 8px; right: 8px; top: auto; bottom: 8px; z-index: 4; white-space: normal;
  background: #fff; color: var(--ink, #1b0838); border: 3px solid var(--ink, #1b0838); border-radius: 14px; padding: 6px 10px; font: 800 14px var(--body, system-ui); }
.jg-kb-key { display: block; width: 100%; min-height: 28px; background: transparent; border: 0; font: inherit; color: inherit; text-align: start; }
.jg-kb-key:focus-visible { outline: 3px solid #ffd23a; outline-offset: 2px; }
.jg-kb-say:empty { display: none; }

/* layout polish (shared): consistent game-screen insets and a comfortable end-of-page gap */
#app:has(.np-screen), #app:has(.ws-screen), #app:has(.bl-screen), #app:has(.hz-screen) { padding-left: 6px; padding-right: 6px; padding-top: calc(var(--safe-top) + 10px); }
.game-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin: 12px 0; }
.game-foot > .np-actions, .game-foot > .ws-actions { display: contents; }
.game-foot > .power-tray, .game-foot .power-tray { margin: 0; }
@media (max-width: 480px) {
  .np-actions, .ws-actions, .game-foot { gap: 8px; }
  .np-actions .btn:not(.icon), .ws-actions .btn:not(.icon), .game-foot > .btn { font-size: 17px; padding: 8px 14px 10px; min-height: 46px; }
  .np-actions .btn.icon, .ws-actions .btn.icon { width: 56px; height: 54px; }
}
/* popup close X: keep it inside the screen on phones; tighten the help dialogs' dead space */
@media (max-width: 560px) {
  /* the X sits centred on the frame's corner, the same as on wide screens; the card leaves room so the X stays on screen */
  .has-board .overlay { padding: max(28px, calc(var(--safe-top) + 24px)) 10px max(18px, calc(var(--safe-bottom) + 12px)); } /* room above the card so the X is never cut at the top of the screen, notch included */
  .has-board .overlay > .card { width: min(480px, calc(100vw - 52px)); }
  .has-board .overlay .overlay-x { right: -43px; top: -43px; width: 42px; height: 42px; }
  [dir=rtl] .has-board .overlay .overlay-x { right: auto; left: -43px; }
}
.overlay .card:has(.hz-demo, .bl-demo) { gap: 8px; }
.overlay .card:has(.hz-demo, .bl-demo) > p { margin: 0; }
/* compact secondary-button rows on phones: balanced rows, no orphans, less scrolling */
@media (max-width: 480px) {
  .game-actions { gap: 6px 8px; }
  .game-actions .btn { flex: 0 1 auto; max-width: 100%; font-size: 15px; padding: 6px 10px 8px; min-height: 42px; }
}
/* Word Crawl: one bottom row layout for every mode (coin chip inline with the power-ups) */
.sq-power { flex-wrap: nowrap; min-height: 60px; }
.sq-power .coin-chip { flex: none; }
@media (max-width: 400px) { .sq-power { gap: 6px; } .sq-power .power { width: 44px; height: 44px; } .sq-power .power-tray { gap: 5px; flex-wrap: nowrap; } .sq-power .coin-chip { font-size: 15px; padding-right: 8px; } }
.sq-side .wpanel { min-height: 220px; }
/* ribbon: leave room for the stopwatch + sound pair */
.game-top > .game-title { min-width: 0; }
.game-title .ribbon { max-width: 100%; box-sizing: border-box; }
@media (max-width: 380px) { .np-top h1, .ws-top h1, .bl-top h1, .hz-top h1 { font-size: 21px; white-space: nowrap; overflow-wrap: normal; } }
.np-actions { flex-wrap: wrap; gap: 8px; }
@media (max-width: 400px) {
  .painted-ui .game-foot .btn:not(.icon), .painted-ui .np-actions .btn:not(.icon), .painted-ui .ws-actions .btn:not(.icon) { border-width: 0 18px; border-image-width: 0 18px; padding: 8px 2px 11px; font-size: 15px; }
  .game-foot .btn.icon, .np-actions .btn.icon, .ws-actions .btn.icon { width: 48px; height: 48px; }
}
/* home game cards: keep the description legible over the character art */
.game-card .gbody, .game-card .gstatus { text-shadow: 0 1px 3px rgba(20, 6, 50, .9), 0 0 8px rgba(20, 6, 50, .6); }
/* Sudoku/Killer side panel: Solo, Leaderboard and Share share one row */
.sdk .sdk-side .game-actions { flex-wrap: wrap; gap: 6px 8px; justify-content: center; }
.painted-ui .sdk .sdk-side .game-actions .btn:not(.img-btn) { border-width: 0 18px; border-image-width: 0 18px; padding: 8px 2px 11px; font-size: 15px; flex: 0 1 auto; }

/* ===== Word Conquest (.cq-): the live open-world territory game. Dark navy board; the HUD is translucent glass over the canvas. ===== */
#app:has(> .cq-screen) { max-width: min(100%, 1280px); }
.cq-screen { display: grid; gap: 8px; }
.cq-stage { --cq-band: 112px; position: relative; height: clamp(500px, calc(100dvh - 215px), 820px); border-radius: 18px; overflow: hidden; border: 3px solid #f6c64b; background: #081226; box-shadow: 0 5px 0 rgba(27, 8, 56, .35); touch-action: none; user-select: none; -webkit-user-select: none; }
.cq-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: default; }
.cq-canvas.grab { cursor: grabbing; } .cq-canvas.tgt { cursor: crosshair; }
.cq-hud { position: absolute; inset: 0; pointer-events: none; z-index: 5; color: #fff; font-family: Nunito, system-ui, sans-serif; }
.cq-hud button, .cq-rank, .cq-roster, .cq-chat, .cq-mmwrap, .cq-ink, .cq-inv { pointer-events: auto; }
.cq-glass { background: rgba(8, 18, 44, .58); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; box-shadow: 0 4px 14px rgba(2, 6, 24, .3); }
.cq-stats { position: absolute; left: 8px; top: 8px; width: calc(100% - 172px); max-width: 300px; padding: 4px 8px; }
.cq-row { display: flex; align-items: center; gap: 9px; height: 38px; }
.cq-dot { font: 400 22px/1 var(--display); opacity: .5; }
.cq-myrank { font: 400 24px/1 var(--display); color: #f6c64b; text-shadow: 0 2px 0 #0a1230; -webkit-text-stroke: 3px #0a1230; paint-order: stroke fill; min-width: 44px; }
.cq-myrank small { display: block; font: 800 9px/1 Nunito, sans-serif; letter-spacing: .5px; text-transform: uppercase; opacity: .85; -webkit-text-stroke: 0; margin-bottom: 1px; }
.cq-mytiles { white-space: nowrap; min-width: 0; }
.cq-mytiles b { font: 400 26px/1 var(--display); -webkit-text-stroke: 3px #0a1230; paint-order: stroke fill; }
.cq-mytiles span { font-size: 11px; font-weight: 800; opacity: .85; margin-inline-start: 3px; }
.cq-sub { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; font-weight: 800; line-height: 14px; opacity: .92; white-space: nowrap; }
.cq-prot { color: #9ff0ff; font-size: 11px; font-weight: 800; line-height: 14px; text-align: center; } .cq-prot:empty { display: none; }
.cq-rank { position: absolute; right: 8px; top: 8px; width: 150px; padding: 4px 5px; cursor: pointer; }
.cq-rank .rh { font: 400 11px/1 var(--display); opacity: .85; display: flex; justify-content: space-between; gap: 4px; margin: 0 1px 2px; white-space: nowrap; }
.cq-rank .rh span:last-child { overflow: hidden; text-overflow: ellipsis; font-size: 9px; }
.cq-rk { display: flex; align-items: center; gap: 4px; height: 17px; font-size: 10.5px; font-weight: 800; border-radius: 6px; padding: 0 3px; white-space: nowrap; }
.cq-rk .n { width: 11px; text-align: center; font: 400 10px/1 var(--display); opacity: .8; }
.cq-rk .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cq-rk b { font: 400 11px/1 var(--display); color: #f6c64b; }
.cq-rk.me { background: rgba(246, 198, 75, .22); box-shadow: inset 0 0 0 1px rgba(246, 198, 75, .67); }
.cq-crown { color: #f6c64b; text-shadow: 0 1px 2px #000; font-size: 11px; }
.cq-av, .cq-cav { width: 14px; height: 14px; border-radius: 50%; border: 2px solid; object-fit: cover; background: #0a1230; flex: none; box-sizing: content-box; }
.cq-sep { border-top: 1px solid rgba(255, 255, 255, .2); margin: 2px 0; }
.cq-rank .rall { text-align: center; font: 400 11px var(--display); opacity: .85; padding: 3px 0 1px; }
.cq-roster { position: absolute; right: 8px; top: 8px; width: min(330px, calc(100% - 16px)); max-height: calc(100% - 16px - var(--cq-band)); overflow: auto; padding: 8px; display: none; background: rgba(8, 18, 44, .88); z-index: 2; }
.cq-roster.on { display: block; }
.cq-roster h3 { margin: 0 0 2px; font: 400 15px/1 var(--display); } .cq-roster .hint { margin: 0 0 4px; font-size: 10px; opacity: .7; }
.cq-rr { display: flex; align-items: center; gap: 5px; min-height: 26px; font-size: 12px; font-weight: 800; border-radius: 8px; padding: 1px 4px; cursor: pointer; }
.cq-rr:hover { background: rgba(255, 255, 255, .08); } .cq-rr.me { background: rgba(246, 198, 75, .2); }
.cq-rr .n { width: 20px; text-align: center; opacity: .7; } .cq-rr .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-rr .cq-av { width: 18px; height: 18px; } .cq-rr .tl { font: 400 12px/1 var(--display); color: #f6c64b; min-width: 34px; text-align: end; }
.cq-ivs { display: inline-flex; gap: 2px; } .cq-iv { position: relative; width: 17px; height: 17px; background: var(--cq-orb) center / contain no-repeat; display: inline-block; }
.cq-iv > img, .cq-iv > svg { position: absolute; left: 14%; top: 12%; width: 72%; height: 72%; object-fit: contain; }
.cq-iv b { position: absolute; right: -5px; bottom: -5px; min-width: 10px; height: 10px; border-radius: 5px; background: #ff3159; color: #fff; font-size: 8px; line-height: 10px; text-align: center; font-weight: 900; }
.cq-band { position: absolute; left: 8px; right: 8px; bottom: 8px; height: var(--cq-band); display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.cq-left { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.cq-inkfill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--cq-glow) 0 0 / 100% 100%; transition: width .15s linear; max-width: 100%; }
.cq-ink.low .cq-inkfill { filter: brightness(.7) saturate(.8); }
.cq-inktxt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 400 12px/1 var(--display); letter-spacing: .4px; text-shadow: 0 1px 2px #000, 0 0 3px #000; white-space: nowrap; }
.cq-ink.shake { animation: cq-shake .32s; }
.cq-invrow { display: flex; gap: 6px; align-items: flex-end; }
.cq-inv { display: grid; grid-template-columns: repeat(4, 38px); gap: 8px 4px; pointer-events: auto; }
.cq-inv .power { width: 38px; height: 38px; touch-action: manipulation; }
.cq-inv .power svg, .cq-inv .power .cq-ic-txt { position: absolute; left: 12%; top: 8%; width: 76%; height: 76%; pointer-events: none; }
.cq-inv .power .cq-ic-txt { display: grid; place-items: center; font: 400 20px var(--display); color: #fff; }
.cq-inv .power.on { transform: scale(1.12); box-shadow: 0 0 0 3px #f6c64b, 0 0 14px #f6c64b; }
.cq-inv .power.rot { background: none; } .cq-inv .power.rot img { left: 0; top: 0; width: 100%; height: 100%; } /* the reshuffle art is itself a ringed orb: no second ring */
.cq-key { display: none; }
.cq-me::after, .cq-iv::after { content: ''; position: absolute; left: 15%; top: 7%; width: 70%; height: 44%; border-radius: 50%; background: radial-gradient(ellipse at 38% 28%, rgba(255, 255, 255, .6), rgba(255, 255, 255, .12) 55%, rgba(255, 255, 255, 0) 72%); pointer-events: none; z-index: 1; }
.cq-me { position: relative; width: 38px; height: 38px; margin: 0; flex: none; }
.cq-me > i { position: absolute; inset: 18%; } .cq-me svg { width: 100%; height: 100%; display: block; }
.cq-melbl { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); font: 400 10px/1 'Lilita One', 'Fijah Fill', sans-serif; background: #f6c64b; color: #3a2300; border: 2px solid #0a1230; border-radius: 8px; padding: 2px 5px; z-index: 2; pointer-events: none; white-space: nowrap; }
.cq-me.on { box-shadow: 0 0 0 3px #f6c64b, 0 0 12px #f6c64b; animation: cq-pop .35s; }
.cq-mmwrap { padding: 3px; flex: none; line-height: 0; touch-action: none; border-radius: 10px; }
.cq-mmc { width: 88px; height: 88px; display: block; border-radius: 7px; touch-action: none; }
.cq-feed { position: absolute; left: 8px; bottom: calc(8px + var(--cq-band) + 46px); width: fit-content; max-width: 60%; display: flex; flex-direction: column; gap: 1px; padding: 4px 9px; border-radius: 12px; background: rgba(8, 18, 44, .58); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .18); transition: opacity .3s; }
.cq-feed:empty { display: none; } .cq-feed div { font-size: 11.5px; font-weight: 800; line-height: 15px; width: fit-content; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 1px #0008; transition: opacity .4s; }
.cq-chat { position: absolute; left: 8px; right: 8px; bottom: calc(8px + var(--cq-band) + 6px); max-width: 480px; padding: 3px 7px; }
.cq-chatlast { display: flex; align-items: center; gap: 6px; font-size: 12px; height: 26px; width: 100%; border: 0; background: none; color: inherit; white-space: nowrap; overflow: hidden; cursor: pointer; padding: 0; }
.cq-chatt { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; text-align: start; }
.cq-chat:not(.open) .cq-chatbody { display: none; } .cq-chat.open .cq-chatlast { display: none; } .cq-chat.open { background: rgba(8, 18, 44, .9); z-index: 6; } /* above the boosts column (.cq-pw), which covered the open chat on a phone */
.cq-chatlog { height: 150px; overflow-y: auto; font-size: 12px; scrollbar-width: thin; scrollbar-color: auto; display: grid; gap: 4px; align-content: start; }
/* the shared chat message (chatmsg.ts), a size smaller to fit the game's panel */
.cq-chatlog .msg { column-gap: 6px; } .cq-chatlog .msg > .who:nth-child(2) { font-size: 12px; }
.cq-chatlog .msg-bubble { font-size: 13px; padding: 3px 8px; gap: 4px; } .cq-chatlog .msg-bubble .cq-mod { flex: none; border: 0; background: rgba(42, 11, 77, .12); color: var(--ink); border-radius: 999px; width: 22px; height: 20px; padding: 0; font-size: 11px; cursor: pointer; }
.cq-chatlog .cq-cav { width: 22px; height: 22px; }
.cq-chatlog .m, .cq-chatt .m { display: flex; align-items: center; gap: 6px; height: 22px; overflow: hidden; min-width: 0; } .cq-chatlog .none { opacity: .6; }
.cq-cav { width: 18px; height: 18px; } .cq .mb, .cq-hud .mb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cq-qrow { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin: 3px 0; }
.cq-qrow .chip-btn { font-size: 12px; padding: 2px 8px; }
.cq-chatx { margin-inline-start: auto; border: 0; background: none; color: #fff; font-size: 20px; line-height: 1; opacity: .8; cursor: pointer; }
.cq-chat .chat-line { display: flex; gap: 6px; } .cq-chat .chat-input { flex: 1; min-width: 0; font-size: 16px; padding: 4px 8px; border-radius: 8px; border: 1px solid #4a6fb5; background: #0a1230; color: #fff; user-select: text; -webkit-user-select: text; }
.cq-chat .chat-line .btn { font-size: 14px; padding: 4px 10px; }
.cq-pill { position: absolute; left: 8px; top: 82px; max-width: calc(100% - 172px); display: none; padding: 5px 9px; background: rgba(8, 18, 44, .78); border: 2px solid #f6c64b; border-radius: 16px; box-shadow: 0 4px 14px #0008; pointer-events: none; }
.cq-pill.on { display: block; }
.cq-chips { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; font: 400 17px/1 var(--display); letter-spacing: .5px; }
.cq-chips span { background: rgba(255, 255, 255, .14); border-radius: 5px; padding: 2px 3px; }
.cq-hl { font-size: 11px; font-weight: 800; margin-top: 2px; line-height: 1.25; white-space: normal; }
.cq-pill.ok .cq-hl { color: #8dff9d; } .cq-pill.no .cq-hl { color: #ff9a9a; } .cq-pill.shake { animation: cq-shake .32s; }
.cq-toast { position: absolute; left: 50%; top: 26%; transform: translate(-50%, -50%); font-family: var(--display); font-size: 25px; color: #f6c64b; text-shadow: 0 3px 0 #000a; pointer-events: none; opacity: 0; text-align: center; max-width: 92%; line-height: 1.1; -webkit-text-stroke: 3px #0a1230; paint-order: stroke fill; z-index: 4; }
.cq-toast.on { animation: cq-toast 2.6s; } .cq-toast small { display: block; font-size: 14px; -webkit-text-stroke: 2px #0a1230; margin-top: 4px; color: #fff; }
.cq-again { position: absolute; left: 50%; bottom: calc(var(--cq-band) + 70px); transform: translateX(-50%); display: none; width: 220px; margin: 0; }
.cq-again.on { display: block; }
/* .btn.big (display: block) outranked .cq-again: Play again showed during play too (11 Nov 2026) */
.cq-hud .btn.cq-again { display: none; }
.cq-hud .btn.cq-again.on { display: block; }
.cq-status { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); display: none; padding: 8px 16px; border-radius: 999px; background: rgba(8, 18, 44, .85); border: 2px solid #f6c64b; font: 400 18px var(--display); text-align: center; max-width: 90%; }
.cq-status.on { display: block; }
.cq-actions .btn { font-size: 19px; }
@keyframes cq-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes cq-pop { 0% { transform: scale(.4); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes cq-toast { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 20% { transform: translate(-50%, -50%) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1); } }
@keyframes cq-bob { 0%, 100% { transform: none; } 50% { transform: translateY(-3px) scale(1.04); } }
.cq-av, .cq-cav, .cq-wav { animation: cq-bob 3.1s ease-in-out infinite; }
.reduce-motion .cq-av, .reduce-motion .cq-cav, .reduce-motion .cq-wav { animation: none; }
.cq-wipe .cq-wav { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 4px solid #f6c64b; background: #0a1230; align-self: center; }
.cq-wby { margin: 0; font: 400 20px/1.2 var(--display); text-align: center; }
.cq-wipe .btn-grid { margin-top: 6px; }
/* the first-time demo */
.cq-tut { max-width: 460px; }
.coach .cq-demo.coach-media { display: grid; justify-items: center; gap: 4px; } .coach .cq-hand { width: 64px; } /* the demo inside the shared tutorial card (conquest/tutorial.ts) */
.cq-demo-stage { position: relative; width: 100%; display: flex; justify-content: center; } .cq-demo-cv { display: block; border-radius: 10px; background: #081226; }
.cq-hand { position: absolute; width: 80px; pointer-events: none; opacity: 0; z-index: 3; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .4)); } .cq-hand.on { opacity: 1; }
.cq-demo-tray { display: flex; justify-content: center; align-items: center; gap: 22px; min-height: 52px; }
.cq-demo-orbw { display: inline-block; position: relative; width: 44px; height: 44px; background: var(--cq-orb) center / contain no-repeat; border-radius: 50%; }
.cq-demo-orb { position: absolute; inset: 12% 14%; opacity: .35; filter: grayscale(.8); transition: all .3s; } .cq-demo-orb.on { opacity: 1; filter: none; transform: scale(1.15); } .cq-demo-orb img, .cq-demo-orb svg { width: 100%; height: 100%; object-fit: contain; }
.cq-demo-me { font: 400 16px var(--display); background: #f6c64b; color: #3a2300; border: 3px solid #0a1230; border-radius: 14px; padding: 6px 16px; } .cq-demo-me.on { animation: cq-pop .5s; box-shadow: 0 0 0 3px #fff, 0 0 14px #f6c64b; }
.cq-cap { min-height: 3.6em; margin: 0; font-weight: 900; text-align: center; }
.cq-tut-btns { display: flex; gap: 8px; justify-content: center; }
@media (min-width: 760px) {
  .cq-stage { --cq-band: 152px; }
  .cq-stats { width: 300px; } .cq-myrank, .cq-mytiles b { font-size: 30px; } .cq-sub { font-size: 12px; }
  .cq-rank { width: 216px; padding: 6px 8px; } .cq-rk { height: 23px; font-size: 12.5px; gap: 6px; } .cq-rk .cq-av { width: 17px; height: 17px; } .cq-rk b { font-size: 13px; } .cq-rk .n { width: 14px; font-size: 11px; }
  .cq-roster { width: 340px; } .cq-ink { width: 386px; height: 30px; }
  .cq-inv { grid-template-columns: repeat(8, 48px); gap: 6px; } .cq-inv .power { width: 48px; height: 48px; }
  .cq-key { display: block; position: absolute; left: -2px; top: -2px; font: 900 9px/1 Nunito; background: #0a1230; color: #fff; border-radius: 4px; padding: 1px 3px; z-index: 2; opacity: .85; }
  .cq-mmc { width: 140px; height: 140px; } .cq-me { width: 48px; height: 48px; }
  .cq-chat { left: 50%; right: auto; width: 280px; transform: translateX(-50%); bottom: 8px; }
  .cq-feed { bottom: calc(8px + var(--cq-band) + 8px); max-width: min(60%, 420px); }
  .cq-pill { left: 50%; transform: translateX(-50%); top: 82px; max-width: 480px; } .cq-pill.shake { animation: none; }
  .cq-chips { font-size: 20px; } .cq-toast { font-size: 40px; }
}

/* ----- Word Conquest cohesion pass: the same painted board frame, panels, rows, bar and chat bar as the other games ----- */
.cq-stage { --cq-frame: 15px; border: var(--cq-frame) solid transparent; border-image: var(--art-board) 150 fill / var(--cq-frame) stretch; border-radius: 0; background: none; box-shadow: none; filter: drop-shadow(0 7px 0 rgba(27, 8, 56, .3)); }
.cq-canvas { border-radius: 10px; }
.cq-glass { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; border: 6px solid transparent; border-image: var(--art-board) 150 fill / 6px stretch; padding-top: 0; padding-bottom: 0; border-radius: 0; box-shadow: none; filter: drop-shadow(0 3px 0 rgba(27, 8, 56, .3)); }
.cq-rank .lb, .cq-roster .lb { gap: 1px; }
.cq-rank .lb div, .cq-roster .lb div { grid-template-columns: 12px minmax(0, 1fr) auto; gap: 3px; padding: 1px 2px; align-items: center; font: 900 11px var(--body); color: #fff; }
.cq-rank .lb .you, .cq-roster .lb .you { background: rgba(255, 196, 20, .28); }
.cq-rank .lb b, .cq-roster .lb b { font: 400 11px var(--display); } .cq-rank .lb div > b:last-child, .cq-roster .lb div > b:last-child { color: var(--lemon); }
.cq-rank .who, .cq-roster .who { display: flex; align-items: center; gap: 4px; min-width: 0; } .cq-rank .nm, .cq-roster .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-rank .rh { color: #fff; } .cq-rank .rall { color: #fff; }
.cq-roster { background: none; max-width: calc(100% - 16px); }
.cq-roster .lb div { grid-template-columns: 20px minmax(0, 1fr) auto auto; }
.cq-roster h3 { font: 400 15px var(--display); }
.cq-feed { padding: 0 4px; border: 6px solid transparent; border-image: var(--art-board) 150 fill / 6px stretch; border-radius: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.cq-feed div { color: #fff; }
.cq-chat { padding: 0 3px; max-width: 480px; }
.cq-chat.open { background: none; }
.cq-chatlog .m b { font-weight: 900; }
.cq-qrow.chatbar { margin: 4px 0; padding: 0 0 2px; }
.cq-qrow.chatbar button { padding: 4px 10px; font-size: 12px; }
.cq-chat .chat-input { border: 3px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); padding: 4px 12px; }
.cq-chat .chat-line .btn { font-size: 14px; }
.cq-ink.bar { height: 26px; }
.cq-ink.bar .cq-inkfill { position: absolute; background: var(--art-tube-glow) 0 0 / 100% 100%; }
.cq-mini { padding: 0; border-width: 7px; border-image-width: 7px; }
.cq-mmc { border-radius: 6px; }
.cq-status.on { display: grid; }
.cq-status { border: 0; background: rgba(35, 8, 62, .35); border-radius: 0; font: 20px var(--display); max-width: none; padding: 0; transform: none; left: 0; top: 0; }
.cq-myrank, .cq-mytiles b { color: var(--lemon); }
.cq-pill { background: none; border: 10px solid transparent; border-image: var(--art-board) 150 fill / 10px stretch; border-radius: 0; box-shadow: none; filter: drop-shadow(0 3px 0 rgba(27, 8, 56, .3)); padding: 0 2px; }
@media (min-width: 760px) {
  .cq-stage { --cq-frame: 30px; }
  .cq-ink.bar { height: 30px; }
}

/* assistive text, the compact leaderboard row in the top-3 panel, the world's reconnect cover */
.cq-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cq-canvas:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.cq-who { padding: 0; margin: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: start; min-width: 0; max-width: 100%; pointer-events: auto; }
.cq-who .pname, .cq-rank .pname, .cq-roster .pname { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; }
.cq-rank .pn-text, .cq-roster .pn-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-rank .pn-badges img { width: 12px; height: 12px; }
.cq-glass.cq-rank { padding-left: 0; padding-right: 0; }
.cq-rank .lb div { grid-template-columns: 10px minmax(0, 1fr) auto; gap: 2px; padding: 1px 1px; font-size: 10.5px; }
.cq-rank .lb b { font-size: 10.5px; text-align: right; }
.cq-rank .cq-av { width: 11px; height: 11px; border-width: 1.5px; }
.cq-rank .who { gap: 3px; } .cq-rank .nm { min-width: 0; }
.cq-rank .rh span:last-child { display: none; }
.cq-status.cq-cover { pointer-events: auto; background: rgba(35, 8, 62, .75); }
.cq-status .btn { pointer-events: auto; }
/* the cover is a popup card with the painted red X in its top-right corner, like every other card */
.cq-cover > .card { width: min(420px, calc(100vw - 52px)); margin: auto; padding: 22px 18px 18px; font: 400 20px var(--display); overflow: visible; }
.cq-cover > .card p { color: var(--ink); }

/* ===== Word Conquest, open world: the canvas fills the viewport, the top bar and HUD float over it, the gold frame is the world's edge (drawn in the canvas) ===== */
html:has(.cq-screen), body:has(.cq-screen) { overflow: hidden; overscroll-behavior: none; height: 100%; }
#app:has(> .cq-screen) { max-width: none; padding: 0; min-height: 0; }
.cq-screen { display: block; }
.cq-stage { --cq-top: calc(var(--safe-top) + 80px); --cq-bot: calc(8px + var(--safe-bottom)); --cq-sl: calc(8px + env(safe-area-inset-left, 0px)); --cq-sr: calc(8px + env(safe-area-inset-right, 0px));
  position: fixed; inset: 0; z-index: 1; height: auto; border: 0; border-image: none; border-radius: 0; background: #081226; box-shadow: none; filter: none; }
.cq-canvas { border-radius: 0; }
.cq-top { position: fixed; z-index: 6; top: calc(var(--safe-top) + 6px); left: 50%; transform: translateX(-50%); width: min(calc(100% - 16px), 560px); box-sizing: border-box; padding: 2px 4px; gap: 6px; grid-template-columns: 52px minmax(0, 1fr) 52px 52px; }
.cq-top .img-btn, .cq-top .btn.icon { width: 52px; height: 52px; }
.cq-top .btn.icon svg { width: 30px; height: 30px; }
.cq-top .game-title .ribbon .display { font-size: 18px; }
.cq-top .game-title { height: 52px; display: grid; place-items: center; overflow: visible; }
.cq-top .ribbon { transform: scale(.72); transform-origin: center; white-space: nowrap; }
/* small phones (iPhone SE): the title ribbon ran under the menu button; slightly smaller buttons and title (11 Nov 2026) */
@media (max-width: 420px) { .cq-top { grid-template-columns: 44px minmax(0, 1fr) 44px 44px; } .cq-top .img-btn, .cq-top .btn.icon { width: 44px; height: 44px; } .cq-top .game-title .ribbon .display { font-size: 15px; } }
.cq-actions { position: fixed; z-index: 7; top: calc(var(--safe-top) + 80px); inset-inline-end: max(8px, calc(50% - 280px)); display: none; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 8px; width: 190px; margin: 0; padding: 10px; border-radius: 16px; background: rgba(8, 18, 44, .88); border: 2px solid #f6c64b; }
.cq-actions.open { display: flex; }
.cq-actions .btn { flex: none; width: 100%; max-width: none; font-size: 17px; }
.cq-stats, .cq-rank, .cq-roster { top: calc(var(--cq-top) + 4px); }
.cq-stats { left: var(--cq-sl); } .cq-rank { right: var(--cq-sr); }
.cq-roster { right: var(--cq-sr); max-height: calc(100% - var(--cq-top) - var(--cq-bot) - var(--cq-band) - 12px); }
.cq-pill { top: calc(var(--cq-top) + 80px); left: var(--cq-sl); }
.cq-band { left: var(--cq-sl); right: var(--cq-sr); bottom: var(--cq-bot); }
.cq-chat { left: var(--cq-sl); right: var(--cq-sr); bottom: calc(var(--cq-bot) + var(--cq-band) + 6px); }
.cq-feed { left: var(--cq-sl); bottom: calc(var(--cq-bot) + var(--cq-band) + 46px); }
.cq-again { bottom: calc(var(--cq-bot) + var(--cq-band) + 62px); }
.cq-toast { top: 32%; }
@media (min-width: 760px) {
  .cq-chat { left: 50%; right: auto; bottom: var(--cq-bot); }
  .cq-feed { bottom: calc(var(--cq-bot) + var(--cq-band) + 8px); }
  .cq-pill { left: 50%; top: calc(var(--cq-top) + 8px); }
}

/* Word Conquest power-ups: speed, guard, blast, double score (a column on the right edge) and the free boost */
.cq-pw { position: absolute; inset-inline-end: 8px; top: 46%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-end; gap: 7px; pointer-events: none; z-index: 1; }
.cq-pw.off { display: none; }
.cq-pw .power { width: 38px; height: 38px; pointer-events: auto; touch-action: manipulation; }
.cq-pw .power svg { position: absolute; left: 12%; top: 8%; width: 76%; height: 76%; pointer-events: none; }
.cq-pw .power.on { box-shadow: 0 0 0 3px #f6c64b, 0 0 14px #f6c64b; }
.cq-pw .power.cd svg { opacity: .4; }
.cq-pw .power.empty svg { filter: grayscale(.5); opacity: .85; }
.cq-cdt { position: absolute; inset: 0; display: grid; place-items: center; font: 400 15px var(--display); color: #fff; text-shadow: 0 1px 2px #000, 0 0 3px #000; pointer-events: none; }
.cq-free { margin: 0; pointer-events: auto; font-size: 11px; padding: 4px 8px; white-space: nowrap; }
.cq-free[hidden] { display: none; }
/* wiped out: Play again is the only action; the power column (Free boost at its foot sat on Play again on short phones,
   11 Nov 2026) steps aside until the respawn */
.cq-hud:has(.cq-again.on) .cq-pw { display: none; }

/* Letter and number boards follow the game language's direction, not the page's. An Arabic, Hebrew or Urdu page that plays an
   English or Spanish board keeps the grid left to right (set on <html data-game-dir> by main.ts applyLanguage). */
html[data-game-dir=ltr] :is(.tf-board, .tf-tray, .tf-wheel-row, .sw-grid, .sw-board, .sdk-dgrid, .wt-board, .cw-grid, .pa-board) { direction: ltr; }

/* rewarded ad buttons (ads.ts rewardedButton): the shop's bolt beside a short label */
.btn.reward-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.reward-btn[hidden] { display: none; }
/* the label sits in the middle of the painted face (owner, 17 Nov 2026: it looked high with the 7/10 tiny padding) */
.btn.tiny.reward-btn { padding-top: 9px; padding-bottom: 8px; }
.btn.reward-btn .reward-play { display: inline-flex; position: relative; top: 1px; } /* the play symbol lines up with the letters, not the line box */
.btn.reward-btn .reward-ico { width: 22px; height: 22px; object-fit: contain; flex: none; }
.layer.coins-layer .reward-btn { flex: none; }

/* PvP chat bar (web/src/chatbar.ts): one compact row, and the log it opens over the game */
.pvp-chat { display: block; width: 100%; max-width: 480px; margin: 6px auto; box-sizing: border-box; }
.pvp-chat-last { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 12px; box-sizing: border-box; border: 3px solid var(--ink); border-radius: 999px; background: rgba(255, 255, 255, .9); color: var(--ink); font: 800 13px var(--body); cursor: pointer; overflow: hidden; white-space: nowrap; }
.pvp-chat-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: start; }
.pvp-chat-dot { flex: none; min-width: 18px; height: 18px; border-radius: 9px; background: #e8383d; color: #fff; font: 900 11px/18px var(--body); font-style: normal; text-align: center; }
.pvp-chat-dot[hidden] { display: none; }
.overlay .card.pvp-card, .pvp-card { width: min(440px, calc(100vw - 52px)); max-width: calc(100vw - 52px); min-width: 0; max-height: min(560px, calc(100dvh - 24px)); box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; overflow: visible; } /* visible: the painted X sits on the corner like every popup */
/* the painted panel fill is see-through; the chat needs a solid ground over a busy board */
.painted-ui .overlay .card.pvp-card { background: rgba(38, 13, 84, .92); }
.pvp-head { display: flex; justify-content: space-between; align-items: center; font-size: 18px; }
.pvp-log { flex: 1 1 auto; min-height: 90px; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 6px; align-content: start; text-align: start; }
.pvp-mod { border: 0; background: none; font-size: 18px; min-width: 36px; min-height: 36px; cursor: pointer; }
.pvp-none { margin: 0; opacity: .7; }
.pvp-quick { flex: none; margin-top: 0; }
.pvp-compose { flex: none; }
.pvp-compose .chat-line { display: flex; gap: 6px; }
.pvp-compose .chat-input { flex: 1; min-width: 0; font-size: 16px; padding: 6px 12px; border: 3px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); user-select: text; -webkit-user-select: text; }
.pvp-thread { display: grid; gap: 4px; width: 100%; }
.pvp-recent:empty { display: none; }
/* during a challenge: docked to the bottom edge, and the page keeps room for it */
.pvp-dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 4px 12px calc(4px + env(safe-area-inset-bottom)); box-sizing: border-box; pointer-events: none; }
.pvp-dock .pvp-chat { margin: 0 auto; pointer-events: auto; }
.pvp-dock.kb { display: none; }
body.pvp-docked #app { padding-bottom: calc(52px + env(safe-area-inset-bottom)); }

/* the blocked-account screen (main.ts): the night sky, one card, the logo and one calm line */
.overlay.blocked-layer { z-index: 99999; background: radial-gradient(ellipse 75% 50% at 50% -6%, rgba(178, 140, 255, .42), rgba(178, 140, 255, 0) 70%) no-repeat, linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(14, 5, 40, .45)) no-repeat, #1a0b3d url(/assets/bg/bg.home.tile.webp) center top / 84px 84px repeat; place-items: center; }
.blocked-layer .card { max-width: 360px; gap: 14px; }
body.is-blocked #app, body.is-blocked .pvp-dock { visibility: hidden; }
.blocked-logo { width: 150px; height: auto; margin: 0 auto; }
.blocked-text { margin: 0; font-weight: 800; font-size: 17px; line-height: 1.4; color: #fff; }

/* Home leaderboard: one board at a time, arrows either side of a ribbon with the game's icon and name */
.boards { touch-action: pan-y; }
.panel.boards { min-width: 0; max-width: 100%; box-sizing: border-box; } /* a long board name ellipsizes instead of widening the panel (a grid item grows to its content otherwise) */
.boards .bd-head { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 10px 0 8px; min-width: 0; }
.boards .bd-head[hidden] { display: none; }
.boards .bd-arrow { flex: none; width: 46px; height: 46px; }
.boards .bd-arrow.next img, .boards .bd-arrow.next svg { transform: scaleX(-1); }
[dir=rtl] .boards .bd-arrow.prev img, [dir=rtl] .boards .bd-arrow.prev svg { transform: scaleX(-1); }
[dir=rtl] .boards .bd-arrow.next img, [dir=rtl] .boards .bd-arrow.next svg { transform: none; }
/* the blue arrows always show (owner, 11 Nov 2026), also with a single board listed */
.boards .bd-ribbon { flex: 0 1 auto; min-width: 0; max-width: calc(100% - 112px); display: flex; align-items: center; gap: 8px; box-sizing: border-box; padding-inline: 18px; }
.boards .bd-icon { width: 30px; height: 30px; flex: none; object-fit: contain; }
.boards .bd-name { font-size: 19px; min-width: 0; line-height: 1.05; text-align: center; white-space: normal; overflow-wrap: anywhere; } /* a long name (Classic Sudoku · Easy) wraps to two lines, never cut */
.painted-ui .boards .bd-ribbon { border-width: 0 30px; border-image: var(--art-ribbon) 0 26% fill / 0 30px stretch; padding: 10px 0 16px; }
.boards .boards-body { outline: none; min-width: 0; }
.boards .boards-body:focus-visible { outline: 2px solid var(--lemon); outline-offset: 2px; border-radius: 10px; }
.boards .lb { min-width: 0; }
.boards .lb div { grid-template-columns: 26px minmax(0, 1fr) auto; }
.boards .lb-sep { height: 0; margin: 6px 12px; border-top: 3px dotted rgba(27, 8, 56, .35); }
@media (max-width: 440px) { .boards .bd-head { gap: 6px; } .boards .bd-arrow { width: 42px; height: 42px; } .boards .bd-ribbon { max-width: calc(100% - 96px); } .boards .bd-name { font-size: 16px; } .painted-ui .boards .bd-ribbon { border-width: 0 24px; border-image-width: 0 24px; } }
/* Language picker: wide, every language visible without a scrollbar, closed by the round X */
.overlay .card.lang-pick { width: min(820px, 100%); }
.lang-pick .lang-grid { grid-template-columns: repeat(3, 1fr); gap: 5px; }
.lang-pick .lang-grid button { min-height: 34px; padding: 5px 3px; line-height: 1.1; }
@media (min-width: 640px) { .lang-pick .lang-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; } }
/* Contact us (contact.ts): the foot of home, and the popup's message and email boxes in our ink-bordered field style */
.home-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 34px auto 26px; /* clear of the last card above (owner, 22 Nov 2026: jammed against Photo to Puzzle) */ max-width: 100%; }
.contact-card .contact-line { margin: 0; font-weight: 800; }
.contact-card .tab-row { flex-wrap: wrap; white-space: normal; justify-self: center; max-width: 100%; }
.contact-card textarea, .contact-card input { width: 100%; box-sizing: border-box; border: 3px solid var(--ink); border-radius: 14px; padding: 10px 12px; font: 700 16px var(--body); color: var(--ink); background: #fff; }
.contact-card textarea { resize: vertical; min-height: 120px; max-height: 40vh; }
.contact-card textarea:focus-visible, .contact-card input:focus-visible { outline: 3px solid var(--lemon); outline-offset: 2px; }
.contact-card input::placeholder, .contact-card textarea::placeholder { font-size: 14px; }
.contact-card .contact-err { align-self: center; justify-self: center; width: fit-content; max-width: 100%; margin: 0 auto; padding: 5px 14px; border-radius: 999px; background: var(--lemon); color: var(--ink); font: 400 15px/1.3 var(--display); letter-spacing: .3px; text-align: center; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); } /* the yellow "Not played yet" pill (owner, 27 Nov 2026) */
.contact-card .contact-err[hidden] { display: none; }
.home-contact .btn { white-space: normal; text-overflow: clip; max-width: 100%; line-height: 1.15; }
/* Plus retention popup (plus.ts confirmLeavePlus): sad characters above the title, the way out as a plain link */
.plus-leave-sad { display: flex; justify-content: center; gap: 8px; }
.plus-leave-sad { flex-wrap: nowrap; overflow: visible; }
.plus-leave .plus-leave-line { margin: 0; font-weight: 800; }
.plus-leave .plus-leave-go { font-size: 15px; text-decoration: underline; }
/* the retention popup's sad characters: faces stacked in one square (never cropped), swapped like the homepage's */
.plus-leave-sad .sad-char { position: relative; display: block; width: 84px; aspect-ratio: 1; flex: none; }
.plus-leave-sad .sad-char img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.plus-leave-sad .sad-char .m-blink, .plus-leave-sad .sad-char .m-happy { opacity: 0; }
.plus-leave-sad .sad-char[data-face=blink] .m-idle, .plus-leave-sad .sad-char[data-face=happy] .m-idle { opacity: 0; }
.plus-leave-sad .sad-char[data-face=blink] .m-blink, .plus-leave-sad .sad-char[data-face=happy] .m-happy { opacity: 1; }
/* No very long buttons (owner, 11 Nov 2026): a button is as wide as its words plus its painted ends, between a
   comfortable minimum and 320px, centred; it is never stretched across a card or a row. A row of buttons still shares
   the row, each at its own size. (tools/check-games.mjs fails any visible .btn wider than 340px.) */
.btn.big { display: block; width: fit-content; min-width: min(200px, 100%); max-width: min(320px, 100%) !important; margin-inline: auto; }
.sw-res-actions .btn.big { justify-self: center; width: fit-content; }
.ev-btns { justify-items: center; justify-content: center; }
.ev-btns > .btn { width: fit-content; min-width: min(150px, 100%); max-width: min(320px, 100%); }
@media (max-width: 640px) { .ev-btns > .btn { flex: 0 1 auto; } }
/* Leaderboard panel (owner, 11 Nov 2026): no white box. The list sits on the same light purple as "Online now", the top
   three rows on the lighter strip of "Invite friends", and the player's own row keeps its gold. */
.boards .layer { background: rgba(255, 255, 255, .12); border: 0; color: #fff; }
/* the top three of whichever list the box shows (the day, all time, or yesterday's best under its heading) */
.boards .layer > div.lb:first-of-type > div:nth-child(-n+3) { background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 6px 8px; }
.boards .lb .you, .boards .layer > div.lb:first-of-type > .you { background: #ffe9a8; color: var(--ink); }
.boards .lb-sep { border-color: rgba(255, 255, 255, .25); }
/* a season reward's name wraps inside its chip, even one long word (Dutch "Veroveringsschudden"), and never widens the page */
.sp-gift { min-width: 0; max-width: 100%; }
.sp-gift > b { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
/* an outlined name keeps its whole outline: the text box clips for the "…" of a long name, so it gets room for the
   outline (padding) without moving the name (the same negative margin) (owner, 11 Nov 2026: the G of "Guest" lost
   its left edge) */
.pname .pn-text { padding-inline: .2em; margin-inline: -.2em; }
/* No page scrollbar on any platform (owner, 11 Nov 2026: phones, apps and computers all match; the gold desktop bar
   is gone). Pages still scroll by wheel, trackpad, keyboard and touch. The chat list keeps the browser's own bar. */
/* the leaderboard's own row: room for a long rank (3,454) */
.boards .lb-you .you { grid-template-columns: minmax(26px, auto) 1fr auto; }

/* chat message options without a button on every bubble (web/src/msgmenu.ts; owner, 11 Nov 2026) */
.has-msg-menu{position:relative;-webkit-touch-callout:none}
.has-msg-menu .msg-dots{border:0;background:rgba(42,11,77,.14);color:inherit;border-radius:999px;min-width:28px;height:22px;padding:0 6px;margin-left:6px;
  font:900 15px/1 'Nunito',system-ui,sans-serif;letter-spacing:1px;cursor:pointer;opacity:0;transition:opacity .15s;flex:none;align-self:center}
.has-msg-menu .msg-dots:focus-visible{opacity:1;outline:2px solid #ffd54a;outline-offset:1px}
@media (hover:hover) and (pointer:fine){.has-msg-menu:hover .msg-dots{opacity:1}}
@media (hover:none),(pointer:coarse){.has-msg-menu .msg-dots{position:absolute;width:1px;height:1px;min-width:0;padding:0;margin:0;overflow:hidden;clip-path:inset(50%)}}
.has-msg-menu.msg-held{transform:scale(.97);transition:transform .12s}

/* Under a game, website only (web/src/gameabout.ts): breadcrumbs, how to play, questions, more games. Outside #app, so it
   never moves anything in the game above it; the apps don't show it. */
/* the game area is not a full screen tall when the How to Play section follows it (owner, 22 Nov 2026: a short game on a
   tall screen left a huge, different gap above it in every game); the same small space above it everywhere */
body:has(> .game-about) #app { min-height: 0; }
.game-about { width: calc(100% - 28px); max-width: 680px; box-sizing: border-box; margin: 6px auto calc(var(--safe-bottom) + 28px); text-align: start; }
.game-about h2 { text-align: center; margin: 14px 0 8px; }
.game-about .crumbs ol { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin: 0 0 6px; padding: 0; font-weight: 800; font-size: 14px; }
.game-about .crumbs li + li::before { content: '\203A'; margin-inline-end: 6px; opacity: .7; }
.game-about .crumbs a { color: #ffe27a; text-decoration: none; }
.game-about .crumbs a:hover, .game-about .crumbs a:focus-visible { text-decoration: underline; }
.game-about .crumbs span { color: #e6dcff; }
.game-about p, .game-about .ga-faq dd { margin: 0 0 10px; color: #e6dcff; font-weight: 700; line-height: 1.4; }
.game-about .ga-sub { color: #fff; font-weight: 900; font-size: 16px; margin: 12px 0 4px; }
.game-about .ga-steps, .game-about .ga-tips { margin: 0 0 10px; padding-inline-start: 22px; color: #e6dcff; font-weight: 700; line-height: 1.4; }
.game-about .ga-steps li, .game-about .ga-tips li { margin: 0 0 6px; }
.game-about .ga-faq { margin: 0; }
.game-about .ga-faq dt { color: #fff; font-weight: 900; margin-top: 10px; }
.game-about .ga-faq dd { margin-inline-start: 0; }
.game-about .ga-more { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.game-about .ga-more a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none; font-weight: 900; }
.game-about .ga-more a:hover, .game-about .ga-more a:focus-visible { background: rgba(255, 255, 255, .18); }
.game-about .ga-more img { width: 44px; height: 44px; border-radius: 10px; flex: none; object-fit: cover; }
.game-about .ga-more a, .game-about .ga-more a > span { min-width: 0; overflow-wrap: break-word; hyphens: manual; } /* break-word, not anywhere: names wrap between words (owner, 1 Dec 2026: "Diagona l", "Sandwic h"), a single word longer than the tile still wraps */
.game-about .ga-more a > span { font-size: 14px; line-height: 1.2; }
.game-about .ga-more a { gap: 8px; }
.game-about .ga-more img { width: 36px; height: 36px; } /* room for a whole word ("Sandwich") beside the icon in a 4-across tile */
.game-about .ga-app-line { text-align: center; } /* section subtitles centered under their centered titles (owner, 1 Dec 2026) */
.game-about .ga-learn:empty { display: none; } /* long names (Hungarian 'Négyzetek: Visszaszámlálás') wrap inside the tile instead of running past a phone's edge (checker, 27 Nov 2026) */

/* Share card on a computer: round buttons straight to WhatsApp, Facebook, X and Reddit (web/src/cardkit.ts networkRow).
   Painted art (owner, 12 Nov: no recolouring): the power-up gold orb repainted with the gem in each network's own colour
   (ui.orb.share-whatsapp / facebook / x / reddit, masters in art-masters/ui), the network's own white mark on top. */
.share-nets { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.share-nets.waiting { opacity: .45; pointer-events: none; transition: opacity .2s; } /* the share picture is still uploading (cardkit.ts sendCard) */
.share-net { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: center / contain no-repeat;
  filter: drop-shadow(0 4px 0 rgba(27, 8, 56, .3)); transition: transform .1s; }
.share-net:hover { transform: translateY(-2px); }
.share-net:active { transform: scale(.94); }
.share-net:focus-visible { outline: 3px solid #ffe49b; outline-offset: 2px; }
.share-net svg { width: 30px; height: 30px; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.share-whatsapp { background-image: url('/assets/ui/ui.orb.share-whatsapp.webp'); } /* painted orb with its own logo (21 Nov 2026) */
.share-facebook { background-image: url('/assets/ui/ui.orb.facebook.webp'); }
.share-x { background-image: url('/assets/ui/ui.orb.x.webp'); }
.share-reddit { background-image: url('/assets/ui/ui.orb.reddit.webp'); }
.share-x svg { width: 26px; height: 26px; } .share-facebook svg { width: 32px; height: 32px; }

/* Social profile buttons at the bottom of /games and under the section under each game, website only (web/src/socialrow.ts):
   the same painted gold orbs and white marks as the site footer; one row down to 320px wide. */
.site-social-wrap { margin: 18px auto 28px; position: relative; z-index: 1; } /* above the fixed .backdrop (z 0), like #app: it painted over the top of "Follow us" (15 Nov 2026) */
.site-social-title { margin: 0 0 10px; text-align: center; color: #fff; font: 400 22px/1.2 var(--display); letter-spacing: .3px; text-shadow: 0 2px 0 rgba(27, 8, 56, .55); }
.site-social { display: flex; justify-content: center; gap: 12px; margin: 0 auto; padding: 0 8px; }
.site-social-btn { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: center / contain no-repeat;
  filter: drop-shadow(0 3px 0 rgba(27, 8, 56, .3)); transition: transform .1s; }
.site-social-btn:hover { transform: translateY(-2px); }
.site-social-btn:focus-visible { outline: 3px solid #ffe49b; outline-offset: 2px; }
.site-social-btn svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
@media (max-width: 440px) { .site-social { gap: 8px; } .site-social-btn { width: 44px; height: 44px; } .site-social-btn svg { width: 21px; height: 21px; } }
/* Settings: Follow us (web/src/settings.ts), the same buttons in a row under the title */
.set-social { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
@media (max-width: 440px) { .set-social { gap: 8px; flex-wrap: nowrap; } .set-social .site-social-btn { width: 44px; height: 44px; } .set-social .site-social-btn svg { width: 21px; height: 21px; } }
/* Not-found page (web/src/notfound.ts): three random Fijees, centered; the middle one jumps with a plug toward a wall
   outlet just out of reach. The purple home pattern, never the sky backdrop (owner, 15 Nov 2026). */
#app.nf-page::before { content: ''; position: fixed; inset: 0; z-index: -1; background: url('/assets/bg/bg.home.tile.webp') center top/84px 84px repeat, #2a0d66; }
.nf { max-width: 560px; margin: 0 auto; padding: max(28px, 6vh) 16px 48px; text-align: center; color: #fff; }
.nf-scene { --c: clamp(92px, 27vw, 130px); position: relative; height: calc(var(--c) * 3); margin: 0 auto 18px; }
.nf-row { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: flex-end; }
.nf-char { position: relative; display: block; width: var(--c); aspect-ratio: 1; flex: none; }
.nf-row > .nf-char:first-child { margin-right: calc(var(--c) * -.1); animation: nf-tilt 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
.nf-row > .nf-char:last-child { margin-left: calc(var(--c) * -.1); animation: nf-tilt 2.4s ease-in-out -1.2s infinite reverse; transform-origin: 50% 90%; }
.nf-face { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; animation: nf-faces 4.8s steps(1, end) infinite; }
.nf-face-0 { opacity: 1; } .nf-face-1 { animation-delay: -3.6s; } .nf-face-2 { animation-delay: -2.4s; } .nf-face-3 { animation-delay: -1.2s; }
@keyframes nf-faces { 0% { opacity: 1; } 25% { opacity: 0; } 100% { opacity: 0; } }
@keyframes nf-tilt { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
/* the jumper and its plug are drawn in front of the outlet (owner, 15 Nov 2026: the plug showed behind it) */
.nf-jumper { position: relative; z-index: 2; display: block; animation: nf-jump 1.4s cubic-bezier(.3,.7,.4,1) infinite; }
@keyframes nf-jump { 0%, 100% { transform: translateY(0) scaleY(1); } 8% { transform: translateY(0) scaleY(.9); } 45% { transform: translateY(calc(var(--c) * -.13)) scaleY(1.04); } 55% { transform: translateY(calc(var(--c) * -.14)); } 90% { transform: translateY(0) scaleY(1); } }
/* the long-cord plug (ui.404.plug-long): held above the head, the cord hanging down behind the Fijee; prongs sit at 60% of
   the picture's width, so it is shifted to put them under the outlet */
.nf-plug-wrap { position: absolute; left: 50%; bottom: 80%; width: calc(var(--c) * .55); transform: translateX(-60%); z-index: -1; }
.nf-plug { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); }
.nf-outlet-wrap { position: absolute; top: 0; left: 50%; width: calc(var(--c) * .78); transform: translateX(-50%); z-index: 1; }
.nf-outlet { display: block; width: 100%; height: auto; filter: drop-shadow(0 4px 4px rgba(0,0,0,.35)); }
/* the zap: two painted sparks at the outlet's bottom edge, flashing and turning when the plug nearly reaches it */
/* one spark on each prong hole (measured in ui.404.outlet: slots at 35% and 64% across, 45% down) */
.nf-spark { position: absolute; left: 35%; top: 45%; width: 48%; height: auto; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.4); animation: nf-zap 1.4s linear infinite; }
.nf-spark-b { left: 64%; animation-name: nf-zap-b; }
@keyframes nf-zap { 0%, 40% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(0); } 44% { opacity: 1; transform: translate(-50%, -50%) scale(1.05) rotate(-8deg); } 50% { opacity: .3; transform: translate(-50%, -50%) scale(.8) rotate(6deg); } 54% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(-4deg); } 62%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(10deg); } }
@keyframes nf-zap-b { 0%, 46% { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(35deg); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(.9) rotate(45deg); } 56% { opacity: .2; transform: translate(-50%, -50%) scale(1.1) rotate(30deg); } 60% { opacity: .9; transform: translate(-50%, -50%) scale(.95) rotate(50deg); } 66%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.6) rotate(40deg); } }
.nf-qs { position: absolute; inset: 0; pointer-events: none; }
.nf-q { position: absolute; top: 40%; font-family: var(--display); font-size: clamp(24px, 6.5vw, 34px); color: #ffd34d; text-shadow: 0 2px 0 #3a1680; opacity: 0; animation: nf-float 3s ease-out infinite; }
.nf-q-0 { left: calc(50% - var(--c) * 1.25); } .nf-q-1 { left: calc(50% + var(--c) * 1.05); animation-delay: -1s; } .nf-q-2 { left: calc(50% - var(--c) * .95); animation-delay: -2s; }
@keyframes nf-float { 0% { opacity: 0; transform: translateY(10px) rotate(-10deg); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-40px) rotate(12deg); } }
.nf-code { font-family: var(--display); font-size: clamp(64px, 20vw, 110px); line-height: .9; color: #ffd34d; text-shadow: 0 5px 0 #3a1680, 0 8px 14px rgba(0,0,0,.35); letter-spacing: 2px; margin-bottom: 4px; }
.nf-title { font-family: var(--display); font-size: clamp(30px, 8vw, 44px); margin: 6px 0 6px; text-shadow: 0 3px 0 #3a1680; }
.nf-text { font-size: 18px; line-height: 1.45; margin: 0 auto 22px; max-width: 30ch; opacity: .95; }
.nf-go { display: inline-block; width: auto; min-width: 240px; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .nf * { animation: none !important; } .nf-face-0 { opacity: 1; } .nf-spark { display: none; } .nf-q { opacity: .9; } }


/* the starter pack and Plus trial on a results card (resultoffer.ts): one small row each, never a pop-up */
.card-offer { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; padding: 4px 6px 4px 4px; border-radius: 16px; background: rgba(255, 255, 255, .9); color: var(--ink, #1b0838); font: 800 14px/1.2 var(--body); text-align: start; }
.card-offer img { width: 38px; height: 38px; object-fit: contain; flex: none; }
.card-offer span { flex: 1; min-width: 0; }
.card-offer .btn { flex: none; min-height: 0; }
/* results cards are anchored at the top, so a badge line or offer row added under the buttons never moves them */
.overlay > .card:has(.result-stars) { margin: max(16px, 4vh) auto auto; }

/* keyboard hints only where there is a keyboard (audit 16 Nov 2026 I25) */
@media (pointer: coarse), (hover: none) { .key-hint, .ws-keys, .np-keys, .bl-keys, .hz-keys { display: none; } }

/* the four newest games: the ribbon keeps its name on one line in the narrow header (audit 16 Nov 2026 I10) */
.ws-top .game-title .display, .np-top .game-title .display, .bl-top .game-title .display, .hz-top .game-title .display { white-space: nowrap; font-size: clamp(17px, 5.2vw, 30px); }
.ws-top .game-title, .np-top .game-title, .bl-top .game-title, .hz-top .game-title { min-width: 0; flex: 1; display: flex; justify-content: center; }
/* Play with a Friend (web/src/together.ts): who is on the shared board, at the top of the screen while it is shared */
/* Play with Friends (together.ts): the players chip (a tap opens the players card) and the game's chat under it */
.together-bar { position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 6px); transform: translateX(-50%); z-index: 19; /* under every popup (the shop, cards): owner 30 Nov 2026 */ display: flex; flex-direction: column; align-items: center; gap: 4px; width: min(480px, calc(100vw - 32px)); }
.together-bar.inline { position: static; transform: none; margin: 2px auto 4px; }
.together-bar .pvp-chat { margin: 0 auto; }
.together-chip { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 8px 4px 6px; border-radius: 999px; background: rgba(27, 8, 56, .82); border: 2px solid #f6c64b; color: #fff; font-family: var(--display); font-size: 14px; letter-spacing: .3px; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); cursor: pointer; }
.together-bar.inline .together-chip { box-shadow: none; }
.together-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.together-chip .avatar, .together-chip img { flex: none; }
.together-chip .tg-friend { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.together-chip .pname { color: #fff; display: inline-flex; align-items: center; gap: 4px; }
.together-chip .pname.plus { color: #ffd34d; }
.together-chip .pn-badges img { height: 18px; width: auto; }
.together-chip .tg-text { white-space: nowrap; }
.together-chip .tg-stack { display: inline-flex; align-items: center; }
.together-chip .tg-stack > * + * { margin-left: -10px; }
.together-chip .tg-count { flex: none; padding: 2px 8px; border-radius: 999px; background: #f6c64b; color: #1b0838; font-size: 12px; }
.tg-card { min-width: min(340px, calc(100vw - 48px)); text-align: left; }
.tg-card h3 { text-align: center; }
.tg-card .tg-cap { margin: 6px 0 0; font-weight: 900; }
.tg-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; min-height: 44px; border-top: 1px solid rgba(255, 255, 255, .14); } /* thin dividers like the notification settings (owner, 17 Nov 2026) */
.tg-row .tg-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 800; }
.tg-row .tg-host { padding: 1px 8px; border-radius: 999px; background: #f6c64b; color: #1b0838; font-size: 12px; font-weight: 900; }
.tg-row .btn { flex: none; }
.tg-row .btn.tiny { min-height: 0; height: 30px; padding: 0 14px; font-size: 13px; line-height: 30px; }
.tg-row { padding: 12px 0 8px; } /* room above the character (its hat rises over the box) so the divider never touches it */
.chat-join { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.chat-join .btn { width: min(220px, 100%); font-size: 17px; }
.chat-join .btn.tg-plus { width: auto; max-width: 100%; white-space: nowrap; font-size: 14px; padding-left: 8px; padding-right: 8px; }
.pvp-sys { margin: 4px auto; text-align: center; font-weight: 800; font-size: 13px; }
.tg-kickline { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: center; min-width: 0; }
.tg-kickline .tg-friend { display: inline-flex; align-items: center; gap: 4px; }
.tg-kickline .pn-badges img { height: 16px; width: auto; }
.pvp-chat-t .tg-kickline { flex-wrap: nowrap; overflow: hidden; }
.tg-body > .tg-plus { align-self: center; justify-self: center; width: auto; max-width: 100%; white-space: nowrap; font-size: 14px; padding-left: 8px; padding-right: 8px; }
/* How to play: the standard popup in every game (ui.ts howToPlay; owner, 19 Nov 2026: no guided tours, red X top right) */
.how-pop { width: min(440px, 100%); box-sizing: border-box; gap: 10px; }
.how-pop .how-media.coach { position: static; inset: auto; transform: none; width: auto; z-index: auto; margin: 0; background: none; border: 0; border-image: none; border-radius: 0; padding: 0; box-shadow: none; filter: none; animation: none; display: flex; justify-content: center; color: inherit; }
.how-pop .how-steps { margin: 0; padding: 0 0 0 1.5em; text-align: left; font-weight: 800; font-size: 16px; line-height: 1.35; display: grid; gap: 6px; }
.how-pop div.how-steps { padding: 0; text-align: center; }
.how-pop .how-steps p { margin: 0; }
.how-pop .how-steps li { opacity: 1; color: #fff; } /* every step full white (owner, 22 Nov 2026: steps after the first looked dimmed) */
.how-pop .how-steps li.on { opacity: 1; }
/* The slide-up keyboard on phones (slidekeys.ts; owner, 19 Nov 2026): fixed to the bottom, below popups (z 20), sliding up
   when a square is tapped; the tab stays peeking when it is down so it can be pulled up again */
.sk-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 19; box-sizing: border-box; display: grid; gap: 8px; justify-items: center;
  padding: 14px 6px calc(10px + var(--safe-bottom, 0px)); background: linear-gradient(180deg, #5a22b8, #2a0d66); border-top: 4px solid #f7bd38;
  border-radius: 24px 24px 0 0; box-shadow: 0 -10px 28px rgba(10, 3, 30, .5); transform: translateY(100%); transition: transform .34s cubic-bezier(.2, .9, .25, 1); }
.sk-sheet.open { transform: translateY(0); }
.sk-sheet > :not(.sk-tab) { width: 100%; max-width: 560px; margin: 0; }
.sk-tab { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); width: 76px; height: 34px; padding: 0; border: 4px solid #f7bd38; border-bottom: 0;
  border-radius: 18px 18px 0 0; background: #5a22b8; cursor: pointer; }
.sk-tab svg { width: 30px; height: 30px; display: block; margin: 0 auto; transform: rotate(180deg); transition: transform .3s; }
.sk-sheet.open .sk-tab svg { transform: none; }
html.has-sk body { padding-bottom: 40px; }
html.sk-up body { padding-bottom: calc(var(--sk-h, 0px) + 12px); }
@media (prefers-reduced-motion: reduce) { .sk-sheet, .sk-tab svg { transition: none; } }
/* the home Plus banner: text and button centred, one above the other (owner, 19 Nov 2026) */
.nudge-bar.plus-bar { flex-direction: column; justify-content: center; text-align: center; }
.nudge-bar.plus-bar p { flex: none; }
.nudge-bar.plus-bar .nb-btns { width: auto; justify-content: center; }

/* a bottom banner (Plus, starter, invite, get the app) is up: the page ends with room for it, so Follow us stays reachable (audit 20 Nov 2026) */
html.has-nudge .site-social-wrap { margin-bottom: calc(150px + var(--safe-bottom, 0px)); }
.site-social-wrap { padding-bottom: 12px; }

/* a loading screen is up (opening a game): bottom banners wait under it, never on top of the crowd (audit 20 Nov 2026, Android build 20) */
body:has(.launch-art) .nudge-bar, body:has(.app-loading) .nudge-bar, body:has(.launch-art) .store-banner, body:has(.app-loading) .store-banner { visibility: hidden; }
/* the help section under a game never shows over the Loading screen (owner, 1 Dec 2026); it appears once the page is ready.
   Popups are NOT hidden here: a sign-in recovery card can open while the app is still loading and must stay reachable. */
body:has(.launch-art) #game-about, body:has(.app-loading) #game-about, body:has(.launch-art) #site-social, body:has(.app-loading) #site-social { display: none; } /* the Follow us row stood over the loading screen and then jumped to the bottom (2 Dec 2026) */

/* the shop Plus card carries both plans (owner, 20 Nov 2026): the plans use the full card width, styled like the old Plus popup */
.shop-plus > .plus-buy { grid-area: try; justify-self: stretch; gap: 6px; }
.shop-plus .plus-buy .btn.big { min-width: min(280px, 100%); }
.shop-plus .plus-plan-note { margin: -2px 0 8px; font: 700 13px/1.3 'Nunito', sans-serif; color: #e6dcff; text-align: center; }
.shop-plus .plus-buy a { color: #ffd76a; }

/* the slide-up keyboard peeks once when a game starts (owner, 20 Nov 2026): up about a key row, a moment, then back down */
@keyframes sk-peek { 0% { transform: translateY(100%); } 30%, 62% { transform: translateY(calc(100% - 64px)); } 100% { transform: translateY(100%); } }
.sk-sheet.peek:not(.open) { animation: sk-peek 1.5s cubic-bezier(.2, .9, .25, 1) 1; }
@keyframes sk-tab-nudge { 0%, 100% { translate: 0 0; } 30%, 62% { translate: 0 -4px; } }
.sk-sheet.peek:not(.open) .sk-tab svg { animation: sk-tab-nudge 1.5s ease-in-out 1; }

/* Word Conquest free boost picker: the painted power-up circles with their names (owner, 20 Nov 2026) */
.cq-boost-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; width: 100%; margin-top: 4px; }
.cq-boost { display: grid; justify-items: center; gap: 6px; padding: 10px 6px 12px; background: rgba(27, 8, 56, .35); border: 3px solid rgba(247, 189, 56, .55); border-radius: 22px; cursor: pointer; color: #fff; }
.cq-boost img { width: min(96px, 24vw); height: min(96px, 24vw); object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); transition: transform .15s; }
.cq-boost b { font: 400 clamp(17px, 4.6vw, 22px)/1.15 var(--display); -webkit-text-stroke: 4px #2a0b4d; paint-order: stroke fill; text-align: center; }
.cq-boost:active img, .cq-boost:hover img { transform: scale(1.08); }
.cq-boost:focus-visible { outline: 3px solid #fff; }

/* phones: the event art stays at the top and the text sits on a dark band, never over the characters (owner approved 20 Nov 2026, full audit) */
@media (max-width: 640px) {
  .ev-banner.has-map { background: linear-gradient(180deg, rgba(23, 8, 70, .35) 0, rgba(23, 8, 70, .86) 38%, rgba(23, 8, 70, .94) 100%), var(--map) center top / cover padding-box; }
  .ev-banner .ev-body { text-shadow: 0 2px 3px rgba(10, 3, 30, .7); }
}

/* season list on phones: names wrap between words only, a little smaller, never mid-word (owner approved 20 Nov 2026) */
.sp-gift b { overflow-wrap: normal; word-break: normal; hyphens: manual; }
@media (max-width: 640px) { .sp-gift { font-size: 13px; } .sp-gift.look { font-size: 12px; } .sp-gift b { min-width: 0; } }

/* Plus members stand out (owner, 20 Nov 2026): a soft gold glow behind their Fijee wherever it shows beside their gold name
   (leaderboards, chat, friends, the online list, profiles), behind your own Fijee at the top of home, and the home greeting
   in the gold name style */
@keyframes plus-glow { 0%, 100% { box-shadow: 0 0 0 2px rgba(255, 214, 70, .95), 0 0 calc(var(--s) * .35) calc(var(--s) * .12) rgba(255, 200, 40, .7); } 50% { box-shadow: 0 0 0 2px rgba(255, 226, 110, 1), 0 0 calc(var(--s) * .6) calc(var(--s) * .22) rgba(255, 200, 40, 1); } }
:has(> .pname.plus) > .avatar, :has(> .pname.plus) > .avatar-edit > .avatar, :has(> * > .pname.plus):not(.lb, .ev-top3, .feed) > .avatar,
.msg:not(.mine):has(.pname.plus) .avatar, html.is-plus .msg.mine .avatar, html.is-plus .pill.me .avatar {
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 236, 150, .95) 0%, rgba(255, 200, 50, .75) 50%, rgba(255, 180, 30, .35) 72%);
  animation: plus-glow 2.6s ease-in-out infinite; }
html.is-plus .hello-hi { color: #ffcf2e; text-shadow: 0 1px 0 #6b3d00, 1px 0 0 #6b3d00, -1px 0 0 #6b3d00, 0 -1px 0 #6b3d00, 0 0 8px rgba(255, 200, 40, .55); }
@media (prefers-reduced-motion: reduce) { :has(> .pname.plus) > .avatar, html.is-plus .pill.me .avatar, html.is-plus .msg.mine .avatar, .msg:has(.pname.plus) .avatar { animation: none; box-shadow: 0 0 calc(var(--s) * .3) calc(var(--s) * .08) rgba(255, 207, 46, .7); } }

/* Settings (owner, 20 Nov 2026): Sign-in methods centred under Log Out and Delete Account; a panel marked hidden (the save
   recovery panel when there is nothing to recover) never shows as an empty frame */
.set-methods { display: flex; justify-content: center; margin-top: 10px; }
.panel[hidden], section[hidden] { display: none !important; }

/* the streak card's reward week on a phone (owner, 20 Nov 2026): about three and a half days show, so a sliver of the days on
   either side peeks in and a day's tick never sits on the cut edge; room around the row for the ticks */
@media (max-width: 679px) {
  .streak-reward-history .rw-history-row { grid-template-columns: repeat(7, calc((100% - 3 * 7px) / 3.4)); padding: 16px 12px 10px; scroll-padding-inline: 12px; scroll-snap-type: x proximity; }
  .rw-history-row .rw-day { scroll-snap-align: center; }
}

/* the game leaderboards (resultcard.ts) in the home leaderboard's style (owner, 20 Nov 2026: no white box): light purple panel,
   the top three on lighter strips, your own row in gold */
.layer.lb-panel { background: rgba(255, 255, 255, .12); border: 0; color: #fff; }
.layer.lb-panel h4 { color: #ffe27a; }
.lb-panel .lb > div:nth-child(-n+3) { background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 6px 8px; }
.lb-panel .lb > div { align-items: center; }
.lb-panel .lb .you { background: #ffe9a8; color: var(--ink); }

/* Settings, Account: the signed-in player's Fijee and name as everyone sees them (owner, 20 Nov 2026) */
.set-who { display: flex; align-items: center; gap: 10px; margin-top: 8px; font: 400 18px var(--display); letter-spacing: .3px; color: #fff; }
.set-who .pname { min-width: 0; overflow-wrap: anywhere; }

/* leaderboards with a column heading (Gems · Dailies): the heading is plain text, never a strip, and the strips go on the real
   top three rows (owner, 20 Nov 2026) */
.boards .layer > div.lb > .lb-head, .lb-panel .lb > .lb-head { background: none !important; padding-top: 0; padding-bottom: 0; }
.boards .layer > div.lb:first-of-type:has(> .lb-head) > div:nth-child(4), .lb-panel .lb:has(> .lb-head) > div:nth-child(4) { background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 6px 8px; }
.boards .layer > div.lb:first-of-type:has(> .lb-head) > .you:nth-child(4) { background: #ffe9a8; }

/* gold, silver and bronze behind the 1, 2 and 3 on every leaderboard (owner, 20 Nov 2026; medals.ts marks the cells): a shiny
   coin with the painted art's dark rim, the number white with a dark edge; it fits the rank column, so nothing moves */
.rk { display: inline-grid !important; place-items: center; width: 24px; height: 24px; border-radius: 50%; justify-self: center; align-self: center; box-sizing: border-box;
  color: #fff !important; font: 400 14px/1 var(--display) !important; -webkit-text-stroke: 3px #2a0b4d; paint-order: stroke fill; letter-spacing: 0;
  box-shadow: 0 0 0 2px #2a0b4d, inset 0 -3px 0 rgba(0, 0, 0, .22), inset 0 2px 0 rgba(255, 255, 255, .55); }
.rk-1 { background: radial-gradient(circle at 35% 28%, #fff7b8 0%, #ffd23f 38%, #e39c00 76%, #a86400 100%); }
.rk-2 { background: radial-gradient(circle at 35% 28%, #ffffff 0%, #dfe4ec 38%, #a9b3c1 76%, #6c7787 100%); }
.rk-3 { background: radial-gradient(circle at 35% 28%, #ffd9b0 0%, #e8954a 38%, #b8632a 76%, #7a3a14 100%); }
.ev-rank.rk { width: 24px; }

/* a chat list scrolls, so it clips what rises above its top edge: room for the first Fijee's hair, bows and hats (owner, 20 Nov 2026) */
.feed.chat-msgs { padding-top: 14px; }

/* the day a past daily is from (main.ts pastDayLine), above the game */
.past-day { position: relative; z-index: 2; max-width: 520px; margin: calc(var(--safe-top) + 6px) auto -4px; padding: 6px 14px; text-align: center; font: 800 14px/1.3 var(--body, inherit); color: #2a0b4d; background: #ffe49b; border: 2.5px solid #2a0b4d; border-radius: 999px; width: fit-content; }
.past-day[hidden] { display: none; }
.past-day a { color: #5b3fd6; }

/* ----- the daily goal bar (goals.ts; switch homeGoalBar): one slim panel under the greeting ----- */
.goalbar { display: grid; gap: 6px; margin: 4px 0 12px; padding: 10px 14px; border-radius: 16px; border: 3px solid #f7bd38;
  background: linear-gradient(180deg, rgba(74, 30, 158, .92), rgba(46, 16, 110, .92)); box-shadow: 0 4px 0 rgba(27, 8, 56, .35); color: #fff; }
.goalbar:empty { display: none; }
.gb-top { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.gb-title { font-family: var(--display); font-weight: 400; font-size: 18px; letter-spacing: .3px; -webkit-text-stroke: 3px #2a0b4d; paint-order: stroke fill; }
.gb-count { font-weight: 900; font-size: 13px; color: #ffe27a; font-variant-numeric: tabular-nums; }
.gb-prize, .gb-paid { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; font-weight: 900; font-size: 15px; color: #ffe27a; }
.gb-prize .coin-img, .gb-claim .coin-img { width: 18px; height: 18px; }
.gb-paid { width: 26px; height: 26px; justify-content: center; border-radius: 50%; background: #36c43a; color: #fff; box-shadow: inset 0 -3px 0 #1d8a22; }
.gb-claim { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; animation: gb-pulse 1.6s ease-in-out infinite; }
@keyframes gb-pulse { 50% { transform: scale(1.06); } }
.gb-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.gb-seg { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); box-shadow: inset 0 2px 0 rgba(0, 0, 0, .25); }
.gb-seg.on { background: linear-gradient(180deg, #ffe27a, #f7a928); box-shadow: inset 0 -2px 0 rgba(150, 80, 0, .45); }
.goalbar.paid .gb-seg { background: linear-gradient(180deg, #7ef07e, #2fb43a); }
.gb-next { font-size: 13px; font-weight: 800; color: #e6dbff; min-height: 1.2em; }
@media (prefers-reduced-motion: reduce) { .gb-claim { animation: none; } }

/* ----- the Fijee bubble (goals.ts; switch homeFijeeBubble): floats over the header above the player's Fijee, no page height ----- */
.home-top { position: relative; }
.fjb { position: absolute; z-index: 25; display: flex; align-items: flex-start; gap: 4px; max-width: min(215px, 62vw); padding: 6px 4px 6px 10px;
  border-radius: 16px; background: #fffaf0; color: #2a0b4d; border: 3px solid #f7bd38; box-shadow: 0 5px 0 rgba(27, 8, 56, .35);
  opacity: 0; transform: translateY(6px) scale(.96); transition: opacity .25s, transform .25s; pointer-events: none; }
.fjb.in { opacity: 1; transform: none; pointer-events: auto; }
.fjb.hide { opacity: 0; pointer-events: none; }
.fjb::after { content: ""; position: absolute; left: calc(var(--tip, 50%) - 8px); bottom: -11px; border: 8px solid transparent; border-top-color: #f7bd38; }
.fjb.below::after { bottom: auto; top: -11px; border-top-color: transparent; border-bottom-color: #f7bd38; }
.fjb-text { appearance: none; border: 0; background: none; padding: 0; text-align: start; font: 800 13.5px/1.3 var(--body, system-ui); color: inherit; cursor: pointer; }
.fjb-x { appearance: none; border: 0; background: none; padding: 0 4px; font: 900 18px/1 system-ui; color: #7a5aa8; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .fjb { transition: none; } }

/* ----- the Continue row (mygames.ts; switch homeContinueRow) ----- */
.continue-row { display: grid; gap: 6px; margin: 0 0 12px; }
.continue-row[hidden] { display: none; }
.cr-title { font-family: var(--display); font-weight: 400; font-size: 17px; color: #fff; -webkit-text-stroke: 3px #2a0b4d; paint-order: stroke fill; }
.cr-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.cr-item { appearance: none; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px;
  border: 2px solid rgba(247, 189, 56, .8); background: rgba(46, 16, 110, .9); color: #fff; text-align: start; cursor: pointer; font: inherit; }
.cr-mid, .mg-mid { display: grid; gap: 4px; min-width: 0; }
.cr-mid b, .mg-mid b { font-size: 15px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-icon { width: 44px; height: 44px; object-fit: contain; display: block; }
.mg-bar { display: block; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.mg-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffe27a, #f7a928); border-radius: inherit; }
.cr-go { pointer-events: none; }
/* ----- My games (mygames.ts; switch homeMyGames) ----- */
.top-mygames { position: relative; }
/* the same number dot as the shop and power-ups (owner, 28 Nov 2026) */
.mg-badge { position: absolute; right: -4px; top: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: #ff3159; color: #fff;
  border: 2px solid #fff; font: 400 13px var(--display); -webkit-text-stroke: 0; display: grid; place-items: center; padding: 0 4px; box-sizing: border-box; }
.mg-badge[hidden] { display: none; }
.card.mygames { max-width: min(520px, 94vw); max-height: 82vh; overflow-y: auto; gap: 8px; }
.mg-list { display: grid; gap: 8px; }
.mygames .mg-seg { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 420px; justify-self: center; } .mygames .mg-seg button { padding: 7px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* All / Recent / Unfinished in the leaderboard pills (owner, 1 Dec 2026) */
.mg-h { margin: 6px 0 0; font-size: 15px; }
.mg-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: rgba(42, 11, 77, .06); }
.mg-mid small { color: #6b5a86; font-weight: 800; }
.mg-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* the apps' home banner (build 22+, switch homeBannerAd): home keeps its last row clear of the 50 px banner */
html.has-banner #app.home { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
/* a phone's top bar holds streak, character, coins and four round buttons (My games, shop, settings, Plus) on one row */
@media (max-width: 430px) {
  .home-top .top-bar { gap: 4px; }
  .home-top .top-bar .top-icon { width: 38px; height: 38px; }
}
/* pinned: one plain row, whatever the phone grid placed where (the character no longer slides over the coins) */
.home-top .top-bar.stuck { display: flex !important; align-items: center; gap: 4px; }
.home-top .top-bar.stuck > * { grid-row: auto; grid-column: auto; margin: 0; position: relative; }
/* My games: the card uses the phone's width and a game's name wraps instead of being cut ("Classic S..." on the 24 Nov shots) */
.card.mygames { width: min(520px, 94vw); }
.mg-mid b { white-space: normal; overflow-wrap: anywhere; line-height: 1.15; }
.mg-row .btn.tiny { padding-inline: 10px; }

/* Today's goals and Continue in the cards' gold painted frame (ui.panel; owner, 24 Nov 2026) */
.painted-ui :is(.goalbar, .continue-row).framed { border: 22px solid transparent; border-radius: 0; background: none; box-shadow: none; padding: 0 2px;
  border-image: var(--art-panel) 34% fill / 22px stretch; filter: drop-shadow(0 5px 0 rgba(27, 8, 56, .3)); }
.continue-row.framed { padding: 0 2px; }
.painted-ui .continue-row.framed .cr-item { background: rgba(20, 6, 52, .35); border-color: transparent; }
/* the goal bar is the games' goo tube with the green check medal at each step */
.goalbar .gb-bar { margin: 6px 16px 4px 4px; }
.goalbar .gb-check { width: 30px; height: 30px; filter: grayscale(1) brightness(.75); opacity: .75; transition: filter .3s, opacity .3s; }
.goalbar .gb-check.on { filter: none; opacity: 1; }
.has-tube .goalbar .gb-check { width: 32px; height: 32px; }
.gb-paid { background: none; box-shadow: none; width: 28px; height: 28px; }
.gb-paid img { width: 100%; height: 100%; display: block; }
/* the bubble's tip is one piece with the bubble (owner, 24 Nov 2026: it looked like two separate images): a turned square in the
   bubble's own colour with the same gold edge on its two outer sides, covering the bubble's edge where they meet */
.fjb::after { left: calc(var(--tip, 50%) - 9px); bottom: -9px; width: 15px; height: 15px; border: 0; border-right: 3px solid #f7bd38; border-bottom: 3px solid #f7bd38;
  background: #fffaf0; transform: rotate(45deg); border-bottom-right-radius: 3px; }
.fjb.below::after { bottom: auto; top: -9px; border: 0; border-left: 3px solid #f7bd38; border-top: 3px solid #f7bd38; border-top-left-radius: 3px; border-bottom-right-radius: 0; }
/* My games: the card itself must not scroll, or it clips the red X at its corner (owner, 24 Nov 2026); the list scrolls instead */
.card.mygames { overflow: visible; max-height: none; }
.card.mygames .mg-list { max-height: min(62vh, 560px); overflow-y: auto; overscroll-behavior: contain; }
/* the top bar's row is centred on phones, at rest and pinned (owner, 24 Nov 2026) */
@media (max-width: 480px) { .home-top .top-bar { justify-content: center; } }
.home-top .top-bar.stuck { justify-content: center; }
/* Settings: Rate Fijah's button centred under its text (owner, 24 Nov 2026) */
.set-line:has(.rate-btn) { flex-wrap: wrap; }
.set-line .rate-btn { margin-inline: auto; }
.set-line:has(.rate-btn) .set-text { flex: 1 1 100%; }
/* "Not played yet" on the home cards: the yellow of the difficulty pills (Easy / Medium / Hard), a label, not a button */
.chip.todo { background: var(--lemon); color: var(--ink); border: 0; font: 400 13px var(--display); letter-spacing: .3px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); padding: 3px 10px; }
/* the green labels ("Solved it", "Double coins", season "Ready") sit their words exactly like the yellow one (owner, 1 Dec 2026) */
.chip.done, .gstatus .chip.done { display: inline-block; font: 400 13px var(--display); letter-spacing: .3px; line-height: normal; padding: 3px 10px; }
/* the closed clue sheet shows the header and the first clue on Android too (owner, 24 Nov 2026: "I prefer ios where you can see
   the 1 yellow row"): Android's WebView reports no bottom inset while its gesture bar sits over the page, so it gets the iPhone's 34px */
html.has-sk .wpanel.wsheet:not(.open) { max-height: calc(56px + 34px + max(env(safe-area-inset-bottom, 0px), 34px)); }
/* (replaces the cream panel above) the cards' own gold rim with leaves, the purple inside */
.has-board :is(.goalbar, .continue-row).framed { border: 18px solid transparent; border-radius: 0; border-image: var(--art-board) 150 fill / 18px stretch; padding: 2px 4px;
  background: none; box-shadow: none; /* one purple: the painted board's own, like every panel (owner, 2 Dec 2026: no double purple) */ filter: drop-shadow(0 5px 0 rgba(27, 8, 56, .3)); color: #fff; }
.has-board .continue-row.framed .cr-item { background: rgba(20, 6, 52, .35); border-color: rgba(247, 189, 56, .35); }
/* not-yet steps show the games' own empty gem slot, undimmed; a done step shows the green check medal (owner, 24 Nov 2026) */
.goalbar .gb-check, .goalbar .gb-check.on { filter: none; opacity: 1; }
.goalbar .gb-check > span, .goalbar .gb-check > span > * { display: block; width: 100%; height: 100%; }
/* wide screens: Today's goals and Continue are as wide as the row of three game cards below them (3 x 256 px + 2 x 20 px gaps;
   owner, 24 Nov 2026: "make it same width as the total of the 3 cards") */
@media (min-width: 860px) {
  .goalbar.framed, .continue-row.framed { width: min(100%, 808px); margin-inline: auto; box-sizing: border-box; }
}
/* the bubble's tip, take 3 (owner, 24 Nov 2026: "the top of the tip is disconnected from the bottom of the speech bubble"): a gold
   triangle (::before) with a cream one on top (::after) that starts exactly at the inside of the bubble's 3px gold edge, so the
   edge line stops where the tip begins and bubble + tip read as one outline */
.fjb::before, .fjb::after { content: ""; position: absolute; width: 0; height: 0; background: none; transform: none; border-radius: 0; pointer-events: none; }
.fjb::before { left: calc(var(--tip, 50%) - 11px); top: auto; bottom: -16px; border: solid transparent; border-width: 16px 11px 0; border-top-color: #f7bd38; }
.fjb::after { left: calc(var(--tip, 50%) - 7px); top: auto; bottom: -11px; border: solid transparent; border-width: 11px 7px 0; border-top-color: #fffaf0; }
.fjb.below::before { bottom: auto; top: -16px; border-width: 0 11px 16px; border-color: transparent; border-bottom-color: #f7bd38; }
.fjb.below::after { bottom: auto; top: -11px; border-width: 0 7px 11px; border-color: transparent; border-bottom-color: #fffaf0; }
/* the sticky bar's height-keeper fills the row, so the bar inside is centred on phones (it shrink-wrapped the bar and sat left;
   owner, 24 Nov 2026) and stays right-aligned on wide screens as before */
.home-top .top-bar-holder { flex: 1 1 auto; min-width: 0; display: flex; }
.home-top .top-bar-holder > .top-bar:not(.stuck) { flex: 1 1 auto; }
@media (max-width: 480px) { .home-top .top-bar-holder { flex-basis: 100%; } }
@media (min-width: 481px) { .home-top .top-bar-holder > .top-bar:not(.stuck) { justify-content: flex-end; } }
/* the tip near the bubble's left corner: square that corner so the gold edge runs straight into the tip (owner, 24 Nov 2026:
   "still looking like 2 pieces" — the rounded corner curved up where the tip went down) */
.fjb.tip-left:not(.below) { border-bottom-left-radius: 4px; }
.fjb.tip-left.below { border-top-left-radius: 4px; }
/* the rating button at the bottom of a results card after a win (review.ts) */
.rate-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin-top: 8px; padding-top: 8px; border-top: 2px dashed rgba(42, 11, 77, .15); }
.rate-ask { font-weight: 900; font-size: 14px; }
/* the rating button matches the card's own big buttons (owner, 24 Nov 2026: same width and size, green) */
.rate-row { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rate-row .rate-go { white-space: nowrap; box-sizing: border-box; min-width: 0; }
/* the Continue row's "Up next" fillers: only on wide screens, where the row is three equal slots like the game cards below */
.cr-next { display: none; }
.cr-up { font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #ffe27a; }
@media (min-width: 860px) {
  .continue-row .cr-items { grid-template-columns: repeat(3, 1fr); }
  .cr-next { display: grid; }
}
@media (min-width: 860px) {
  .continue-row .cr-item { grid-template-columns: 40px 1fr auto; gap: 8px; padding: 8px; }
  .continue-row .cr-item .mg-icon { width: 40px; height: 40px; }
  .continue-row .cr-mid b { white-space: normal; overflow: visible; line-height: 1.15; font-size: 14px; }
  .continue-row .cr-go { padding-inline: 10px; }
}
/* the goal bar's line under the tube is centred (owner, 24 Nov 2026) */
.goalbar .gb-next { text-align: center; }
/* the Plus popup from the top bar: the card is at most the screen's height and scrolls inside, so the plans pinned to the
   bottom (position: sticky) stay inside the frame (owner, 25 Nov 2026) */
.overlay > .card.plus-paywall { max-height: calc(100dvh - 60px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; margin: auto; }
.plus-paywall > .pw-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; width: 100%; }
/* My games rows: the name keeps whole words (it broke mid-word beside two stacked buttons), the buttons stack in their own
   column, and the date is plain white (owner, 25 Nov 2026) */
.mg-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
.mg-mid { min-width: 96px; }
.mg-mid b { overflow-wrap: normal; word-break: normal; hyphens: none; }
.mg-mid small, .card.mygames .mg-mid small { color: #fff; opacity: 1; }
.mg-btns { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.mg-mid b { overflow: visible; text-overflow: clip; white-space: normal; }
.mg-btns .btn { min-width: 0; width: 118px; padding-inline: 6px; font-size: 14px; white-space: nowrap; }
.mg-row { gap: 8px; }
.mg-btns .btn { width: 136px; padding-inline: 0; font-size: 13px; text-overflow: clip; overflow: visible; }
/* My games: the recent-game rows put their buttons on a line of their own under the name, side by side */
.mg-row:has(.mg-btns) { grid-template-columns: 44px minmax(0, 1fr); }
.mg-row > .mg-btns { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 8px; }
.mg-row > .mg-btns .btn { width: auto; flex: 1 1 0; max-width: 160px; font-size: 15px; padding-inline: 4px; }
/* My games: rows as a plain list with thin dividers, like the notification toggles in Settings (owner, 25 Nov 2026) */
.card.mygames .mg-list { gap: 0; }
.card.mygames .mg-row { background: none; border-radius: 0; padding: 12px 2px; border-top: 1px solid rgba(255, 255, 255, .14); }
.card.mygames .mg-h + .mg-row { border-top: 0; }
.card.mygames .mg-h { margin: 14px 0 2px; }
.card.mygames .mg-h:first-child { margin-top: 0; }
/* bigger top bar on phones (owner, 25 Nov 2026): round buttons 44 px, your Fijee 40 px; the chips give up a little padding so
   the row still fits a 360 px phone. The Fijee bubble is placed from the Fijee's own top edge, so it moves up with it */
@media (max-width: 430px) {
  .home-top .top-bar { gap: 3px; }
  .home-top .top-bar .top-icon, .home-top .top-bar.stuck .top-icon { width: 44px; height: 44px; }
  .home-top .top-bar .streak-chip, .home-top .top-bar .coin-chip { padding-inline: 6px 8px; }
}
@media (max-width: 370px) { .home-top .top-bar .top-icon, .home-top .top-bar.stuck .top-icon { width: 40px; height: 40px; } }
/* the home Fijee bubble in the games' own painted speech bubble (ui.bubble, as in Sandwich): one shape, cream with the purple
   edge, the tail at its bottom-left pointing at your Fijee, no X (owner, 25 Nov 2026) */
.has-bubble .fjb { background: none; border: 0; box-shadow: none; border-radius: 0; padding: 9px 16px 18px; max-width: min(230px, 64vw); isolation: isolate; }
.has-bubble .fjb::before { content: ''; position: absolute; inset: 0; z-index: -1; width: auto; height: auto; transform: none; background: none; border-radius: 0;
  border: 0 solid transparent; border-width: 14px 16px 20px 16px; border-image: var(--art-bubble) 34% 30% 38% 30% fill / 14px 16px 20px 16px stretch;
  filter: drop-shadow(0 4px 0 rgba(27, 8, 56, .3)); }
.has-bubble .fjb::after { content: none; display: none; }
.has-bubble .fjb.below::before { transform: scaleY(-1); }
.fjb .fjb-text { color: var(--ink); }
/* Power Tower's cheer bubble in the same painted speech bubble (owner, 25 Nov 2026: every speech bubble in the Sandwich style) */
.has-bubble .power-tower-bubble { transform: translate(-16px, -100%); background: none; border: 0; border-radius: 0; padding: 6px 14px 14px; color: var(--ink); isolation: isolate; }
.has-bubble .power-tower-bubble::after { content: none; }
.has-bubble .power-tower-bubble::before { content: ''; position: absolute; left: 0; right: 0; top: 0; bottom: 0; width: auto; height: auto; transform: none; clip-path: none; background: none; z-index: -1;
  border: 0 solid transparent; border-width: 10px 12px 14px 12px; border-image: var(--art-bubble) 34% 30% 38% 30% fill / 10px 12px 14px 12px stretch; }
/* the Fijee bubble rests between showings (goals.ts: 12 s on, 60 s off) */
.fjb.rest { opacity: 0; transform: translateY(6px) scale(.96); pointer-events: none; }
/* flipped (tail on top, desktop): the extra room goes on top too, so the text sits centred in the round part */
.has-bubble .fjb.below { padding: 18px 16px 9px; }
/* phones: the logo is centred on its own row (owner, 25 Nov 2026) */
@media (max-width: 480px) {
  .home-top .logo { grid-column: 1 / -1; justify-self: center; justify-content: center; flex: 1 0 100%; }
}
/* right-to-left: the painted bubble mirrored, tail at the bottom-right (top-right when it sits below the Fijee) */
.has-bubble .fjb.rtl-tail::before { transform: scaleX(-1); }
.has-bubble .fjb.rtl-tail.below::before { transform: scale(-1, -1); }
/* right-to-left: the Crossword clue bubble's painted tail on the Fijee's side (the Fijee sits on the right). The bubble is
   mirrored as a whole and its contents mirrored back, laid out left-to-right inside the flip so the clue reads normally */
/* (removed 25 Nov 2026: the drawn bubble aims its own tip) */
/* (removed 25 Nov 2026: the drawn bubble aims its own tip) */
/* right-to-left: Jigsaw puts its Fijee on the right, so their painted bubble is mirrored (tail on the Fijee's
   side); the art moves to a mirrored layer behind the text, so the words still read normally (owner, 25 Nov 2026) */
html[dir="rtl"]:not(.no-bubble) .jg-say { position: relative; isolation: isolate; border-image: none; border-width: 20px 30px 30px 24px; }
html[dir="rtl"]:not(.no-bubble) .jg-say::before { content: ''; position: absolute; inset: -20px -30px -30px -24px; z-index: -1; pointer-events: none;
  border: solid transparent; border-width: 20px 24px 30px 30px; border-image: var(--jg-bubble) 120 130 150 150 fill / 20px 24px 30px 30px stretch; transform: scaleX(-1); }
/* no logo at the top of the games home page (switch homeLogo, off): the heading stays in the page for search engines and screen
   readers but takes no space (owner, 25 Nov 2026) */
#app.home.no-logo .home-top .logo { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* the bubble below the Fijee (every screen, owner 25 Nov 2026: above it the camera cut-out hid it in the apps): wide and low */
.has-bubble .fjb.below { max-width: min(560px, calc(100vw - 16px)); }
.fjb.below .fjb-text { font-size: 13.5px; line-height: 1.2; }
#app.home .hello { transition: opacity .25s; }
html.fjb-over-hello #app.home .hello { opacity: 0; }
@media (max-width: 480px) { #app.home.no-logo .hello { margin-bottom: 14px; } } /* room for the two-line bubble on phones */
/* no logo: the top bar is centred on every screen size, like the apps (owner, 25 Nov 2026) */
#app.home.no-logo .home-top .top-bar-holder { flex: 1 1 100%; }
#app.home.no-logo .home-top .top-bar-holder > .top-bar:not(.stuck) { justify-content: center; }
/* the stopwatch art has its crown and + badge inside the picture, so its round body drew smaller than the bulb's and the shop's
   rings: drawn a little larger so the three read as one size (owner, 25 Nov 2026) */
.power.framed img[src*="ui.clock"] { left: -7%; top: -9%; width: 114%; height: 114%; }
/* every results card's buttons (review.ts, owner 25 Nov 2026 as approved 24 Nov): one column, all the same width and height
   (one font size for all, set by evenButtons so the longest label fits on one line), "Enjoying Fijah Games?" right above Rate
   Fijah, the pair in the middle of the buttons just above New Game */
.overlay .card .result-actions.result-actions { display: grid; grid-template-columns: minmax(0, 300px); justify-content: center; gap: 10px; flex-wrap: nowrap; }
.overlay .card .result-actions > .btn, .overlay .card .result-actions > .rate-block > .btn {
  width: 100%; max-width: 100%; min-width: 0; flex: none; margin: 0; justify-self: stretch; white-space: nowrap; overflow: hidden; text-overflow: clip; font-size: 22px; line-height: 1.1; padding-left: 4px; padding-right: 4px; }
.painted-ui .overlay .card .result-actions > .btn.big, .painted-ui .overlay .card .result-actions > .rate-block > .btn.big { border-width: 0 28px; border-image-width: 0 28px; }
.overlay .card .result-actions > .rate-block { display: grid; gap: 4px; justify-items: center; width: 100%; max-width: 100%; min-width: 0; flex: none; justify-self: stretch; }
.overlay .card .result-actions > .rate-block > .rate-ask { font-weight: 900; font-size: 14px; color: inherit; }
/* My games rows look like the profile's Recent games (owner, 25 Nov 2026): rounded tinted rows, no dividers, gems with the
   score or time on the right, the buttons under the result */
.card.mygames .mg-list { gap: 6px; }
.card.mygames .mg-hrow { grid-template-columns: 44px minmax(0, 1fr) auto; border: 0; }
.card.mygames .mg-hrow .mg-mid { min-width: 0; gap: 2px; }
.card.mygames .mg-hrow .mg-mid b { white-space: normal; overflow: visible; }
.card.mygames .mg-hrow .mg-mid small { color: #fff; opacity: .85; }
.card.mygames .mg-hrow .mg-bar { margin-top: 4px; }
.mg-right { display: grid; justify-items: end; gap: 6px; }
.mg-right .mg-btns { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.mg-right .mg-btns .btn, .mg-right > .btn { width: auto; min-width: 0; font-size: 14px; padding-inline: 10px; white-space: nowrap; }
.painted-ui .mg-right .btn.tiny, .mg-right .btn.tiny { font-size: 13px; padding: 5px 6px 7px; border-width: 0 16px; border-image-width: 0 16px; line-height: 1.1; }
.card.mygames .mg-hrow .mg-mid b { font-size: 16px; }
/* the buttons on their own line under the row (the right side holds only the result, as on the profile) */
.card.mygames .mg-hrow .mg-right { display: contents; }
.card.mygames .mg-hrow .mg-right > .result { grid-column: 3; grid-row: 1; align-self: center; }
.card.mygames .mg-hrow .mg-right > .mg-btns, .card.mygames .mg-hrow .mg-right > .btn { grid-column: 2 / -1; justify-self: end; }
.card.mygames .mg-hrow .mg-right > .btn:only-child { grid-column: 3; grid-row: 1; }
.card.mygames .mg-hrow .result { font-size: 16px; display: inline-flex; align-items: center; gap: 4px; }
.card.mygames .mg-hrow .result img { width: 26px; height: 26px; }
.card.mygames .mg-hrow .mg-right > .mg-btns { justify-self: start; }
/* the painted bubble is a glossy oval: stretched long and thin (one line of text on desktop) its top highlight and bottom rim
   squash into stripes across it (owner, 25 Nov 2026: "lines through it"). Kept about as wide as on phones, two lines. */
.has-bubble .fjb.below { max-width: min(300px, calc(100vw - 16px)); }
/* ...and never thinner than that, even when a short message fits on one line (the text sits in the middle) */
.has-bubble .fjb.below { min-height: 58px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
/* The home Fijee bubble as ONE drawn shape (owner, 25 Nov 2026): goals.ts drawBubble paints the rounded body and the curved
   tip as a single SVG path (cream fill, the art's purple rim) behind the text; no stretched picture (it showed stripes) and no
   separate tail piece. */
.has-bubble .fjb { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 9px 15px; isolation: isolate; }
.has-bubble .fjb.below { padding: 9px 15px; min-height: 0; }
.has-bubble .fjb::before, .has-bubble .fjb::after, .has-bubble .fjb.below::before, .has-bubble .fjb.below::after,
.has-bubble .fjb.rtl-tail::before, .has-bubble .fjb.rtl-tail.below::before { content: none; display: none; }
/* Every speech bubble drawn as ONE shape (speechshape.ts, owner 25 Nov 2026): the painted bubble art and the separate CSS
   tails are switched off wherever the drawn outline is in place; the outline sits behind the bubble's text. */
.speech-drawn { background: none !important; border-image: none !important; border-color: transparent !important; box-shadow: none !important; isolation: isolate; }
.speech-drawn::before, .speech-drawn::after { content: none !important; display: none !important; }
:where(.speech-drawn) { position: relative; } /* zero weight: a bubble placed absolutely keeps its own position */
.speech-shape { position: absolute; z-index: -1; overflow: visible; pointer-events: none; filter: drop-shadow(0 4px 0 rgba(27, 8, 56, .3)); }
.speech-shape path { stroke: #6a3ad0; stroke-width: 3; stroke-linejoin: round; }
/* Sandwich host bubble: the drawn tip sits outside the box, so the bottom room the painted tail needed goes; the bubble then
   fits the one line of room above the plates, a button inside included (owner, 25 Nov 2026: "truncated at the top") */
.sw-bubble.speech-drawn { padding: 6px 14px 7px; }
.sw-bubble.speech-drawn .btn, .painted-ui .sw-bubble.speech-drawn .btn { margin-block: 0; padding: 5px 8px 7px; font-size: 14px; line-height: 1.15; min-height: 0; border-width: 0 16px; border-image-width: 0 16px; }

/* Help (ui.contact) right of Settings (owner, 26 Nov 2026). Six round buttons and the streak, you and coins no longer fit one
   phone row, so a phone shows two centred rows: streak, you, coins, then My games, shop, settings, help, Plus. The pinned bar
   keeps the same two rows. Wider screens keep one row (.top-break hidden). */
.home-top .top-bar .top-break { display: none; }
@media (max-width: 480px) {
  .home-top .top-bar:has(.top-break), .home-top .top-bar.stuck:has(.top-break) { flex-wrap: wrap !important; justify-content: center !important; row-gap: 0; }
  .home-top .top-bar .top-break { display: block; flex-basis: 100%; height: 0; }
  .home-top .top-bar:has(.top-break) .top-icon { width: 44px; height: 44px; }
  /* first row: your Fijee, then energy (owner, 2 Dec 2026: right of the Fijee), then coins, then the streak (owner, 26 Nov 2026) */
  .home-top .top-bar:has(.top-break) > .pill.me { order: -4; }
  .home-top .top-bar:has(.top-break) > .energy-chip { order: -3; }
  .home-top .top-bar:has(.top-break) > .coin-counter { order: -2; }
  .home-top .top-bar:has(.top-break) > .streak-chip { order: -1; }
}

/* thumbs up / down under a game's buttons (rategame.ts; switch gameRating): one quiet line, never counts */
.gr-row { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px auto 4px; min-height: 40px; flex-wrap: nowrap; }
.gr-ask { color: #fff; font-size: 14px; font-weight: 700; opacity: .9; }
.gr-thumb { appearance: none; border: 0; background: none; padding: 0; width: 38px; height: 38px; cursor: pointer; flex: none; transition: transform .12s, opacity .12s; opacity: .8; }
.gr-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 2px 0 rgba(27, 8, 56, .35)); }
.gr-thumb.on { opacity: 1; transform: scale(1.1); }
.gr-thumb:hover { transform: scale(1.06); }
.gr-thumb:focus-visible { outline: 2px solid var(--lemon); outline-offset: 2px; border-radius: 50%; }
.gr-reasons { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.gr-reasons .gr-reason { background: rgba(23, 8, 70, .55); border-radius: 999px; padding: 6px 12px; color: #fff; }
.gr-reasons .gr-reason.on { background: var(--lemon, #ffd84d); color: #2a0b4d; }
html.in-frame .gr-row { display: none; }
/* full-screen games: just the two thumbs inside their own button row or menu (no label, no extra row) */
.gr-row.gr-inline { display: inline-flex; margin: 0; min-height: 0; gap: 6px; }
.gr-row.gr-inline .gr-thumb { width: 36px; height: 36px; }
.cq-actions .gr-row, .arc-sheet .gr-row { margin-top: 10px; }

/* Continue: each unfinished game has the red X in its corner to end it (owner, 26 Nov 2026) */
.cr-wrap { position: relative; display: grid; min-width: 0; }
.cr-wrap > .cr-item { width: 100%; box-sizing: border-box; }
.cr-wrap .cr-x { position: absolute; top: -9px; inset-inline-end: -9px; width: 30px; height: 30px; z-index: 1; }
.cr-wrap .cr-x img { width: 100%; height: 100%; }
/* My games' Unfinished rows carry the same X, inside the row's corner (the list scrolls, so it can't hang outside) */
.mg-xwrap .cr-x { top: 2px; inset-inline-end: 2px; width: 26px; height: 26px; }
.mg-xwrap > .history-row { padding-inline-end: 36px; } /* Resume steps aside so the X has its own corner */
/* the press spring on the whole slot (card and X together), not on the card alone (owner, 28 Nov 2026) */
.cr-wrap > .cr-item:active, .cr-wrap > .cr-x:active { scale: 1; }
.cr-wrap { transition: scale .34s cubic-bezier(.34, 1.9, .5, 1); }
.cr-wrap:has(> .cr-item:active, > .cr-x:active) { scale: .96; transition: scale .07s ease-out; }
.cr-head { display: flex; align-items: baseline; gap: 10px; }
.cr-sub { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cr-sub .mg-bar { flex: 1 1 auto; min-width: 24px; }
.cr-kind { flex: none; font-weight: 800; font-size: 12px; opacity: .8; white-space: nowrap; }
/* phones: one game at a time, sliding in (mygames.ts continueRow) */
@media (max-width: 859px) {
  .continue-row .cr-items > .cr-wrap:not(.on) { display: none; }

  .cr-wrap.in-r > .cr-item, .cr-wrap.in-r > .cr-x { animation: cr-in-r .35s ease-out; }
  .cr-wrap.in-l > .cr-item, .cr-wrap.in-l > .cr-x { animation: cr-in-l .35s ease-out; }
}
@media (min-width: 860px) { .cr-count { display: none; } }
@keyframes cr-in-r { from { transform: translateX(24px); opacity: 0; } }
@keyframes cr-in-l { from { transform: translateX(-24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cr-wrap.in-r > *, .cr-wrap.in-l > * { animation: none; } }

/* buttons in a popup card: one per row, all as wide as the card's big buttons (owner, 30 Nov 2026: Word Conquest's "Play
   again" wrapped beside Home; every game's popups stack their buttons the same way) */
.overlay .card .btn-grid { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; }
.overlay .card .btn-grid > *, .overlay .card .btn-grid > .btn, .overlay .card .btn-grid > .btn.big { flex: none; width: 100%; max-width: none; min-width: 0; }
/* a lone stat (Word Conquest's best this life) sits in the middle of its row, not the left third */
.stat-row > .stat:only-child { grid-column: 2; }
/* Play with Friends: its buttons share one width (3 Dec 2026) */
.overlay .card.pwf > .btn.big { width: min(100%, 292px); box-sizing: border-box; padding-inline: 4px; }
