/* Game: letter-grid word search. Night-sky page, parchment panels, carved stone tiles, lamplight trail. */
body.view-game header.app-header .subtitle, body.view-game #memorize { display: none !important; }
body.view-game {
  background: #0b1430 radial-gradient(ellipse at 50% -10%, #23366b 0%, #0b1430 60%) fixed;
  background-image: radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 72% 9%, #fff9 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 40% 30%, #fffa 50%, transparent 51%), radial-gradient(1px 1px at 88% 40%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 62%, #fff6 50%, transparent 51%), radial-gradient(1.5px 1.5px at 60% 75%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 88%, #fff6 50%, transparent 51%), radial-gradient(ellipse at 50% -10%, #23366b 0%, #0b1430 62%);
  background-attachment: fixed; color: var(--ink);
}
body.view-game header.app-header h1, body.view-game header.app-header h1 a { color: #f4ecd8; }
body.view-game .app-nav a { background: #fffaf0e6; }
body.view-game .app-nav a.on { background: #c8962e; border-color: #e0b552; color: #1b1406; }
.gm-view { font-family: var(--sans); max-width: 560px; margin: 0 auto; padding: 0 12px 40px; -webkit-tap-highlight-color: transparent; }
.gm-wrap { display: flex; flex-direction: column; gap: 12px; }
.gm-h { font-family: var(--serif); color: #f4ecd8; margin: 4px 0; font-size: 1.6rem; letter-spacing: .02em; text-shadow: 0 0 12px #ffcf6a55; }
.gm-center { text-align: center; }
.gm-crumbs { margin: 0; } .gm-crumbs a { color: #f1d9a0; text-decoration: none; font-size: 15px; display: inline-block; padding: 6px 2px; }
.gm-panel { position: relative; background: linear-gradient(180deg, #f8f0dc, #efe2c3); border: 1px solid #c9b07a; border-radius: 14px; padding: 14px; box-shadow: 0 6px 20px #0007, inset 0 0 26px #c9a76a44; }
.gm-panel .gm-h { color: var(--ink); text-shadow: none; }
.gm-olive { position: absolute; top: -9px; right: 10px; width: 110px; height: 22px; opacity: .95; }
.gm-res > .gm-olive { position: static; display: block; margin: 0 auto -4px; width: 140px; height: 28px; }
.gm-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.gm-streak { display: flex; align-items: center; gap: 8px; background: #fffaf0; border: 1px solid #d9b35a; border-radius: 30px; padding: 4px 12px 4px 6px; box-shadow: 0 0 18px #ffbf4a55; font-size: 14px; }
.gm-streak b { font-size: 1.35rem; color: #7a4a2a; } .gm-st-best { color: #6b5a40; font-size: 12px; } .gm-st-best b { font-size: 14px; }
.gm-lamp { width: 48px; height: 30px; flex: none; }
.gm-stk { color: #f4ecd8; } .gm-stk .gm-lamp { vertical-align: middle; }
.gm-dh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gm-dh small { color: #6b5a40; }
.gm-badge { background: #2c3e75; color: #f8e7b5; border-radius: 10px; padding: 2px 9px; font-size: 13px; font-weight: 600; }
.gm-dday { margin: 4px 0 0; color: #6b5a40; font-size: 13px; }
.gm-dref { font-family: var(--serif); font-size: 1.45rem; margin: 2px 0 8px; } .gm-dref small { font-size: 13px; color: #6b5a40; font-family: var(--sans); }
.gm-dres { margin: 4px 0; font-size: 14px; color: #2d5a27; } .gm-dcu { color: #6b5a40; }
.gm-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.gm-col { display: flex; flex-direction: column; gap: 8px; }
.gm-btn { min-height: 46px; padding: 8px 16px; border-radius: 12px; border: 1px solid #b39a68; background: #fffaf0; color: var(--ink); font: 600 15px var(--sans); cursor: pointer; touch-action: manipulation; }
.gm-btn:active { transform: translateY(1px); }
.gm-btn:disabled { opacity: .5; }
.gm-primary { background: linear-gradient(180deg, #8a5a32, #6c4223); border-color: #5a3519; color: #fff6e6; }
.gm-wide { width: 100%; }
.gm-big { width: 100%; min-height: 56px; border-radius: 14px; border: 1px solid #a5741f; background: linear-gradient(180deg, #f3c862, #d59a2e); color: #2a1a05; font: 700 18px var(--sans); box-shadow: 0 0 20px #ffbf4a66; cursor: pointer; margin-top: 6px; touch-action: manipulation; }
.gm-modes .gm-btn { flex: 1 1 30%; padding: 8px 6px; }
.gm-link { background: none; border: 0; color: #7a4a2a; font: 600 14px var(--sans); padding: 8px 4px; cursor: pointer; text-decoration: underline; }
.gm-lv { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.gm-lv select, .gm-view input[type=text] { min-height: 44px; font-size: 16px; border: 1px solid #b39a68; border-radius: 10px; background: #fffdf8; padding: 6px 10px; color: var(--ink); }
.gm-lv select { max-width: 220px; }
.gm-join, .gm-host, .gm-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.gm-join label, .gm-host label, .gm-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.gm-join[hidden], .gm-host[hidden] { display: none; }
.gm-cur { margin: 0; font-family: var(--serif); font-size: 1.15rem; }
.gm-star { background: none; border: 0; font-size: 22px; color: #c8962e; cursor: pointer; min-width: 40px; min-height: 40px; }
.gm-chiprow, .gm-secs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gm-chip { min-height: 40px; padding: 6px 12px; border-radius: 20px; border: 1px solid #c9b07a; background: #fffaf0; font: 14px var(--sans); color: var(--ink); cursor: pointer; }
.gm-best { list-style: none; padding: 0; margin: 6px 0 0; } .gm-best li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #d7c49a; font-size: 14px; }
.gm-how { color: #e8dcc0; font-size: 14px; line-height: 1.5; } .gm-how summary { cursor: pointer; padding: 8px 0; color: #f1d9a0; font-weight: 600; }
.gm-hint { color: #6b5a40; font-size: 13px; margin: 4px 0; }
.gm-wrap > .gm-hint, .gm-res > .gm-hint, .gm-play > .gm-hint, .gm-wrap > p.gm-center { color: #d6c9a8; }
.gm-msg { background: #fff1e6; border: 1px solid #e0a070; color: #7a2e0e; border-radius: 10px; padding: 8px 10px; margin: 0; }
.gm-warn { background: #fff4d6; border: 1px solid #e0b552; color: #6b4a00; border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.gm-empty { font-size: 15px; }
/* picker */
.gm-tabs { display: flex; gap: 4px; background: #0006; padding: 4px; border-radius: 14px; }
.gm-tab { flex: 1; min-height: 46px; border: 0; border-radius: 10px; background: transparent; color: #f1e6c8; font: 600 13px var(--sans); cursor: pointer; padding: 4px; }
.gm-tab.on { background: linear-gradient(180deg, #f8f0dc, #e9dab6); color: var(--ink); }
.gm-sub { background: #00000014; margin-top: 8px; } .gm-sub .gm-tab { color: var(--ink); } .gm-sub .gm-tab.on { background: #7a4a2a; color: #fff6e6; }
.gm-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 8px; max-height: 52vh; overflow: auto; }
.gm-bk { min-height: 44px; border: 1px solid #c9b07a; border-radius: 10px; background: #fffaf0; font: 13px var(--sans); color: var(--ink); cursor: pointer; padding: 4px; }
.gm-cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; margin-top: 6px; max-height: 46vh; overflow: auto; }
.gm-num { min-height: 46px; border: 1px solid #c9b07a; border-radius: 10px; background: #fffaf0; font: 600 15px var(--sans); color: var(--ink); cursor: pointer; }
.gm-num.on { background: #7a4a2a; color: #fff6e6; border-color: #5a3519; }
.gm-mlist { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gm-mrow { border: 1px solid #d7c49a; border-radius: 12px; padding: 10px; background: #fffaf0aa; }
.gm-mhead { display: flex; justify-content: space-between; gap: 8px; align-items: center; } .gm-mhead small { color: #6b5a40; }
.gm-mbtns { display: flex; gap: 6px; flex: none; } .gm-mbtns .gm-btn { min-height: 42px; padding: 6px 10px; font-size: 14px; }
.gm-msec { margin-top: 8px; }
.gm-ptext { font-family: var(--serif); font-size: 1.05rem; line-height: 1.6; max-height: 34vh; overflow: auto; margin: 8px 0; padding: 8px 10px; background: #fffaf0; border-radius: 10px; border: 1px solid #e0d2ae; }
.gm-vs { color: #a07a3a; font: 600 .7em var(--sans); margin-right: 2px; }
.gm-it { font-style: italic; }
/* play */
.gm-play { display: flex; flex-direction: column; gap: 8px; }
.gm-hud { display: flex; align-items: center; gap: 8px; color: #f4ecd8; }
.gm-x { min-width: 44px; min-height: 44px; border-radius: 22px; border: 1px solid #f4ecd855; background: #ffffff14; color: #f4ecd8; font-size: 18px; cursor: pointer; }
.gm-hl { flex: 1; font-family: var(--serif); font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-clock { font: 700 1.3rem var(--sans); font-variant-numeric: tabular-nums; color: #ffd98a; } .gm-clock small { font-size: 12px; color: #f0b9a0; }
.gm-stats { display: flex; align-items: center; gap: 10px; color: #d6c9a8; font-size: 13px; flex-wrap: wrap; }
.gm-stats #gm-run { color: #ffd98a; font-weight: 700; }
.gm-hintb { margin-left: auto; min-height: 42px; background: #fffaf0; } .gm-hintb small { color: #8a5a32; }
.gm-scroll { display: flex; flex-direction: column; filter: drop-shadow(0 6px 14px #0008); }
.gm-rod { height: 10px; border-radius: 6px; background: linear-gradient(180deg, #9a6a3a, #5a3519); margin: 0 -6px; }
.gm-line { background: linear-gradient(90deg, #e9d9b2, #f8efd9 12%, #f8efd9 88%, #e9d9b2); padding: 10px 14px; font-family: var(--serif); font-size: 1.15rem; line-height: 1.55; min-height: 3.2em; max-height: 6.4em; overflow: auto; color: #2a2118; }
.gm-line.gm-final { max-height: none; background: none; padding: 0; }
.gm-blank { color: #b39a68; letter-spacing: 1px; }
.gm-w.gm-lock { animation: gmLock .9s ease-out; border-radius: 4px; }
@keyframes gmLock { 0% { background: #ffd56a; box-shadow: 0 0 14px #ffc84a; } 100% { background: transparent; box-shadow: none; } }
.gm-fly { position: fixed; z-index: 50; pointer-events: none; font: 700 1.3rem var(--serif); color: #2a1a05; background: #ffe29a; padding: 2px 8px; border-radius: 8px; box-shadow: 0 0 18px #ffc84a; }
.gm-say { min-height: 1.6em; margin: 0; text-align: center; font: 700 1.25rem var(--sans); letter-spacing: .12em; color: #ffe7a8; text-shadow: 0 0 10px #ffbf4a88; }
.gm-say.bad { color: #ffb0a0; letter-spacing: 0; } .gm-say.good { color: #bff0a0; letter-spacing: 0; }
.gm-gridwrap { position: relative; width: min(100%, 62vh, 460px); margin: 0 auto; aspect-ratio: 1; touch-action: none; user-select: none; -webkit-user-select: none; }
.gm-grid { --n: 4; display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-template-rows: repeat(var(--n), 1fr); width: 100%; height: 100%; touch-action: none; }
.gm-grid.gm-in { animation: gmIn .25s ease-out; }
@keyframes gmIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.gm-cell { padding: 4%; display: flex; touch-action: none; }
.gm-cell span { flex: 1; display: flex; align-items: center; justify-content: center; border-radius: 12%; font: 700 calc(min(100vw, 62vh, 460px) / var(--n) * .42) var(--serif); color: #3b3226;
  background: linear-gradient(145deg, #e9e1cf, #c7bba2 60%, #b2a587); box-shadow: inset 2px 2px 0 #fff8, inset -3px -3px 0 #0002, 0 3px 6px #0006; text-shadow: 0 1px 0 #fff9, 0 -1px 0 #0003; transition: background .1s, transform .1s; }
.gm-cell.on span { background: linear-gradient(145deg, #fff1c4, #f2c96a); color: #3a2205; box-shadow: 0 0 16px #ffc84aaa, inset 0 0 6px #fff; transform: scale(1.04); }
.gm-cell.bad span { background: linear-gradient(145deg, #f8c8b8, #d9826a); }
.gm-cell.hint span { animation: gmHint 0.85s ease-in-out 3; }
@keyframes gmHint { 0%, 100% { box-shadow: 0 0 0 #ffc84a00, inset 2px 2px 0 #fff8; } 50% { box-shadow: 0 0 26px 6px #ffd56a, inset 0 0 8px #fff; background: linear-gradient(145deg, #fff6d8, #f6d47e); } }
.gm-shake { animation: gmShake .4s; } @keyframes gmShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.gm-trail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.gm-trail polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.gm-glow { stroke: #ffbf4a; stroke-width: .34; opacity: .45; filter: blur(.06px); }
.gm-core { stroke: #fff3c8; stroke-width: .1; opacity: .9; }
.gm-tapbar { display: flex; gap: 10px; justify-content: center; } .gm-tapbar[hidden] { display: none; } .gm-tapbar .gm-btn { flex: 1; max-width: 180px; }
.gm-tip { text-align: center; }
.gm-count { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: #0b1430cc; }
.gm-count[hidden] { display: none; }
.gm-cn { font: 800 7rem var(--serif); color: #ffd98a; text-shadow: 0 0 40px #ffbf4a; animation: gmPop .9s ease-out; }
@keyframes gmPop { from { transform: scale(1.6); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1); } }
/* race */
.gm-rpanel { background: #ffffff10; border: 1px solid #ffffff22; border-radius: 12px; padding: 6px 8px; color: #f4ecd8; font-size: 13px; }
.gm-plist { max-height: 120px; overflow: auto; }
.gm-pr { display: grid; grid-template-columns: 7.5em 1fr 4.8em; gap: 6px; align-items: center; padding: 2px 0; }
.gm-pr.me { font-weight: 700; color: #ffd98a; } .gm-pr.away { opacity: .45; }
.gm-pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-pb { height: 12px; background: #ffffff1c; border-radius: 6px; overflow: hidden; } .gm-pb i { display: block; height: 100%; background: linear-gradient(90deg, #d59a2e, #ffe08a); border-radius: 6px; transition: width .4s; }
.gm-pc { text-align: right; font-variant-numeric: tabular-nums; }
.gm-rpanel.compact .gm-pr { padding: 0; font-size: 12px; } .gm-rpanel.compact .gm-pb { height: 6px; }
.gm-mine { border-bottom: 1px solid #ffffff22; padding-bottom: 3px; margin-bottom: 3px; }
.gm-rpanel .gm-link { color: #f1d9a0; padding: 4px; } .gm-pcount { float: right; opacity: .7; padding-top: 6px; }
.gm-code { font: 800 2.6rem var(--sans); letter-spacing: .25em; color: #6c4223; margin: 4px 0; }
.gm-names { list-style: none; margin: 6px 0 0; padding: 0; max-height: 34vh; overflow: auto; columns: 2; }
.gm-names li { padding: 5px 4px; border-bottom: 1px dashed #d7c49a; break-inside: avoid; font-size: 15px; } .gm-names li.me { font-weight: 700; } .gm-names small { color: #8a5a32; }
.gm-wait { text-align: center; color: #ffe7a8; font-size: 16px; }
.gm-win { text-align: center; color: #ffe7a8; font-size: 1.2rem; margin: 0; } .gm-win .gm-crown { width: 34px; height: 26px; vertical-align: middle; }
.gm-scrollbox { max-height: 46vh; overflow: auto; }
.gm-board { font-size: 14px; }
.gm-brow { display: grid; grid-template-columns: 30px 1fr 4em 2.6em 3.1em 2.4em 2.6em; gap: 4px; align-items: center; padding: 6px 4px; border-bottom: 1px dashed #d7c49a; font-variant-numeric: tabular-nums; }
.gm-brow span:nth-child(n+3) { text-align: right; } .gm-brow span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-bhead { font-size: 12px; color: #6b5a40; position: sticky; top: -14px; background: #f4ead2; }
.gm-brow.me { background: #ffe7a0; border-radius: 8px; font-weight: 700; }
.gm-brow.away { opacity: .5; }
.gm-crown { width: 30px; height: 22px; display: block; }
.gm-stars { display: block; text-align: center; font-size: 2.4rem; letter-spacing: .1em; } .gm-stars i { font-style: normal; color: #ffffff30; } .gm-stars i.on { color: #ffd56a; text-shadow: 0 0 14px #ffbf4a; }
.gm-dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; background: #f8f0dc; border-radius: 14px; padding: 12px 16px; border: 1px solid #c9b07a; }
.gm-dl dt { color: #6b5a40; } .gm-dl dd { margin: 0; text-align: right; }
.gm-dnames { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; } .gm-dnames input { flex: 1; }
@media (prefers-reduced-motion: reduce) { .gm-view *, .gm-cn { animation: none !important; transition: none !important; } }
body.view-game header.app-header { background: transparent !important; border-color: #ffffff22 !important; box-shadow: none !important; }
body.view-game footer.app-footer { background: transparent !important; color: #9aa3c0 !important; border-color: #ffffff1a !important; }
body.view-game footer.app-footer a { color: #c8d0ea !important; }
body.view-game.gm-playing header.app-header, body.view-game.gm-playing footer.app-footer { display: none !important; }
body.view-game.gm-playing .gm-view { padding-top: 8px; }
.gm-count.go { background: transparent; transition: background .3s; }
.gm-win .gm-crown { display: inline-block; }
/* word streak: 8 s ring, points, race badge */
.gm-runbox { display: inline-flex; align-items: center; gap: 5px; }
.gm-ring { width: 22px; height: 22px; transform: rotate(-90deg); flex: none; }
.gm-ring circle { fill: none; stroke-width: 4; }
.gm-ring .bg { stroke: #ffffff22; }
.gm-ring .fg { stroke: #6b6f86; stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .2s; }
.gm-runbox.live .fg { stroke: #ffd56a; filter: drop-shadow(0 0 3px #ffbf4a); }
.gm-runbox.live.low .fg { stroke: #ff9a6a; }
#gm-pts { color: #f4ecd8; font-weight: 600; }
.gm-pb { position: relative; }
.gm-sb { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font: 700 9px/1 var(--sans); font-style: normal; color: #2a1a05; background: #ffd56a; border-radius: 6px; padding: 1px 4px; white-space: nowrap; box-shadow: 0 0 6px #ffbf4a; }
.gm-rpanel .gm-pb { height: 12px; } .gm-rpanel.compact .gm-pb { height: 10px; }
.gm-light, .gm-you { color: #d6c9a8 !important; font-size: 13px; }
