:root {
  color-scheme: dark;
  --bg: #0a161c;
  --surface: #102127;
  --surface-raised: #14292f;
  --line: #244047;
  --text: #f0f3e8;
  --muted: #acc0be;
  --mint: #72edd1;
  --gold: #ffd578;
  --pink: #f49a99;
  --purple: #cbb2f4;
  --blue: #92d3f0;
  --font: Inter, "Segoe UI", system-ui, sans-serif;
  --display: "Arial Black", "Segoe UI Black", system-ui, sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font: 16px/1.5 var(--font);
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 290px; }
button, select, input, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }
button, a { touch-action: manipulation; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.13; }
[hidden] { display: none !important; }
:where(a,button,input,select,textarea,canvas,summary):focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
#main:focus { outline: none; }
.frame { width: min(1196px, calc(100% - 88px)); margin-inline: auto; }
.icon { display: inline-block; vertical-align: middle; width: 1.18em; height: 1.18em; flex: none; }
.skip { position: fixed; top: -90px; left: 16px; z-index: 20; background: var(--gold); color: var(--bg); padding: 10px 20px; border-radius: 6px; }
.skip:focus { top: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-header { background: #0d1b20; border-bottom: 1px solid #20363c; }
.head-inner { min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand { display: inline-flex; gap: 10px; align-items: center; justify-self: start; white-space: nowrap; }
.brand-mark { width: 42px; height: 42px; border-radius: 9px; display: grid; place-items: center; color: #112725; background: var(--mint); box-shadow: inset 0 -3px 0 #46bba5; font-size: 24px; }
.brand-mark .icon { stroke-width: 2.2; }
.wordmark { display: grid; gap: 1px; line-height: 1; }
.wordmark > span { color: var(--mint); font: 700 .64rem var(--mono); letter-spacing: .14em; }
.wordmark strong { font: 900 1.01rem var(--display); letter-spacing: -.05em; }
.wordmark strong span { color: var(--mint); }
.nav { display: flex; align-items: center; justify-content: center; gap: 5px; }
.nav a { display: flex; align-items: center; gap: 7px; padding: 10px 13px; border-radius: 7px; font-size: .88rem; font-weight: 650; color: var(--muted); white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--mint); background: #153238; }
.header-actions { display: flex; align-items: center; justify-content: end; gap: 13px; }
.head-settings { color: var(--muted); border: 1px solid var(--line); border-radius: 8px; }
.head-settings:hover { color: var(--mint); border-color: var(--mint); }
.player-link { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.player-link-text { display: grid; gap: 2px; line-height: 1.1; }
.player-link-text strong { font-size: .82rem; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.player-link-text small { font: 700 .67rem var(--mono); color: var(--mint); letter-spacing: .06em; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--gold); border: 1px solid #725c45; background: #372b27; font-size: 20px; flex: none; }
.edition { margin-block: 35px 13px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.edition-title, .edition time, .games-count, .game-kicker { font: 700 .76rem/1.25 var(--mono); letter-spacing: .085em; }
.edition-title { display: flex; gap: 8px; align-items: center; color: var(--mint); }
.edition-title i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 11px #72edd180; }
.edition time { color: var(--muted); text-transform: uppercase; }
.accent-mint { --accent: var(--mint); }
.accent-gold { --accent: var(--gold); }
.accent-pink { --accent: var(--pink); }
.accent-purple { --accent: var(--purple); }
.accent-blue { --accent: var(--blue); }
.hero { border: 1px solid #2a514f; position: relative; overflow: hidden; border-radius: 13px; isolation: isolate; min-height: 383px; display: flex; align-items: center; background: #10282b; box-shadow: 0 12px 40px #00000028; }
.hero-art, .hero-fade { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.hero-art { left: 26%; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 51%; image-rendering: pixelated; }
.hero-fade { background: linear-gradient(90deg, #10282b 20%, #10282b 30%, #10282bd9 41%, #10282b44 57%, transparent 76%), linear-gradient(0deg,#101d2585, transparent 40%); }
.hero-content { padding: 29px 0 32px 40px; width: 53%; }
.hero-label { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); background: #302b22; border: 1px solid #67563b; border-radius: 5px; padding: 6px 9px; font: 700 .74rem var(--mono); letter-spacing: .055em; }
.hero h1 { margin-top: 15px; color: #f8f2d8; font: 900 clamp(2.6rem, 5.2vw, 4.65rem)/.97 var(--display); text-transform: uppercase; letter-spacing: -.081em; text-wrap: balance; text-shadow: 2px 3px 0 #101d25; }
.hero-gull h1 { text-wrap: initial; }
.hero h1 span { color: var(--mint); }
.hero p { color: #d3e2d9; max-width: 375px; margin-top: 16px; line-height: 1.5; }
.hero-actions { display: flex; align-items: center; gap: 17px; margin-top: 25px; flex-wrap: wrap; }
.hero-actions > span { color: #d1e0d7; font: 700 .82rem var(--mono); display: inline-flex; align-items: center; gap: 6px; }
.hero-location { position: absolute; right: 16px; bottom: 15px; padding: 5px 8px; border: 1px solid #c5d8ce55; border-radius: 5px; color: #f4eddd; background: #142725cc; font: 700 .69rem var(--mono); letter-spacing: .09em; }
.button { min-height: 44px; padding: .67rem .96rem; display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 7px; white-space: nowrap; font-size: .9rem; font-weight: 750; line-height: 1.25; transition: background .2s, color .2s, border-color .2s; }
.button.primary { background: var(--mint); color: #0c2626; box-shadow: inset 0 -2px 0 #31958375; }
.hero .button.primary { background: var(--gold); box-shadow: inset 0 -3px 0 #a67d345e; padding-inline: 1.15rem; min-height: 46px; }
.button.primary:hover { background: #a4ffea; }
.hero .button.primary:hover { background: #ffe4a0; }
.button.secondary { background: #142a30; border-color: #37565a; color: #e6f4eb; }
.button.secondary:hover { border-color: var(--mint); color: var(--mint); }
.button.danger { background: #7d3540; border-color: #d88189; }
.square { min-width: 39px; min-height: 39px; padding: 0; display: inline-grid; place-items: center; }
.dashboard { margin-top: 17px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.dash-card { min-height: 107px; padding: 13px 15px; background: var(--surface); border-radius: 10px; border: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.dash-card:hover { border-color: #519183; }
.dash-icon, .heading-mark { width: 45px; height: 45px; border-radius: 8px; display: grid; place-items: center; background: #203439; color: #a8c0bd; font-size: 22px; flex: none; }
.dash-icon.hot { color: #ff9a79; background: #3a2a27; }
.dash-icon.mint, .heading-mark { color: var(--mint); background: #17383b; }
.dash-icon.gold { color: var(--gold); background: #392e25; }
.dash-copy { display: grid; min-width: 0; }
.dash-copy > span { color: var(--muted); font: 700 .7rem var(--mono); letter-spacing: .075em; }
.dash-copy strong { font-size: 1.32rem; line-height: 1.32; font-weight: 850; font-variant-numeric: tabular-nums; }
.dash-copy small { color: #b7c8c0; font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.collection { margin-top: 43px; }
.section-top { display: flex; justify-content: space-between; align-items: end; gap: 13px; margin-bottom: 16px; }
.section-top h2, .page-title h1, .play-heading h1 { font: 900 clamp(2.22rem,4vw,3rem)/1.01 var(--display); letter-spacing: -.07em; color: #f4f3e8; }
.section-top h2 span,.page-title h1 span,.play-heading h1 span { color: var(--mint); }
.section-top p,.page-title p { color: var(--muted); margin-top: 6px; }
.games-count { display: inline-flex; align-items: center; gap: 7px; color: #b1c9c4; white-space: nowrap; padding: 0 2px 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 17px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #2b4449; border-radius: 6px; background: #112328; color: #c0d0cb; padding: 7px 11px; font-weight: 650; font-size: .8rem; min-height: 35px; white-space: nowrap; }
.chip:hover { border-color: var(--mint); }
.chip[aria-pressed=true] { color: var(--mint); background: #173c3d; border-color: #4a9f91; }
.game-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.game-grid > .empty { grid-column: 1/-1; }
.card { position: relative; min-width: 0; border-radius: 9px; border: 1px solid #2b4449; background: var(--surface); transition: border-color .18s, transform .18s; }
.card:hover, .card:focus-within { border-color: var(--accent,var(--mint)); }
.card-link { display: block; border-radius: inherit; height: 100%; }
.card-art { position: relative; aspect-ratio: 16/9; overflow: hidden; border-radius: 8px 8px 0 0; background: #203237; }
.card-art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.card-art::after { content: ''; pointer-events: none; position: absolute; inset: 0; background: linear-gradient(180deg,#0a161c48,transparent 55%,#0a161c44); }
.genre { position: absolute; z-index: 1; top: 9px; left: 9px; color: var(--accent,var(--mint)); border: 1px solid #496160; background: #132326f2; border-radius: 4px; font: 700 .67rem var(--mono); text-transform: uppercase; letter-spacing: .035em; padding: 4px 6px; }
.card-go { z-index: 1; position: absolute; right: 9px; bottom: 9px; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 6px; background: #11282ce0; color: #e1ece0; border: 1px solid #d5efdc55; }
.card:hover .card-go { background: var(--accent,var(--mint)); color: var(--bg); }
.card-body { padding: 12px 11px 14px; }
.card h3 { font-weight: 800; font-size: 1rem; line-height: 1.24; margin-bottom: 6px; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--muted); font-size: .75rem; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: #698681; }
.favourite { position: absolute; top: 6px; right: 6px; min-width: 42px; min-height: 42px; border: 1px solid transparent; border-radius: 7px; color: #f2e9db; background: transparent; z-index: 1; }
.favourite .icon { background: #132326dc; border-radius: 50%; width: 29px; height: 29px; padding: 5px; }
[data-favourite][aria-pressed=true] { color: #ffadad; }
.site-footer { border-top: 1px solid #22383c; background: #0d1b20; margin-top: 55px; }
.footer-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #b2c5bd; font-size: .83rem; }
.footer-inner .icon { color: var(--mint); margin-right: 6px; }
.footer-inner nav { display: flex; gap: 17px; }
.footer-inner a:hover,.text-link,.back-link:hover { color: var(--mint); }
.text-link { text-decoration: underline; text-underline-offset: .22em; }
.page-title { display: flex; align-items: center; gap: 13px; margin: 37px 0 25px; }
.heading-mark { width: 53px; height: 53px; font-size: 24px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 19px; min-width: 0; }
.panel h2 { font-size: 1.27rem; margin-bottom: 9px; }
.panel p { color: var(--muted); }
.panel p + p { margin-top: 10px; }
.panel.empty { text-align: center; padding: 36px 16px; }
.empty h1 { margin-bottom: 9px; }
.empty .button { margin-top: 15px; }
.boot { display: grid; justify-items: center; gap: 12px; margin-top: 45px; padding: 30px; }
.boot > .icon { background: #17383b; color: var(--mint); width: 44px; height: 44px; border-radius: 8px; padding: 8px; }
.notice { margin: 12px 0; border: 1px solid #536044; padding: 11px 13px; color: #f5dfac; background: #2b2b26; border-radius: 7px; }
.subheading { font-size: 1.4rem; margin: 25px 0 12px; }
.daily-list,.trophy-grid,.settings-grid { display: grid; gap: 13px; }
.daily-list { grid-template-columns: 1fr 1fr; }
.daily-entry { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 12px; }
.daily-entry img { aspect-ratio: 16/9; width: 100%; height: auto; object-fit: cover; border-radius: 6px; image-rendering: pixelated; }
.daily-entry h2 { margin: 4px 0; }
.daily-list .daily-entry { grid-template-columns: 89px 1fr; padding: 12px; }
.daily-list .daily-entry .button { grid-column: 2; justify-self: start; }
.older-quests { margin-top: 13px; }
.game-kicker { color: var(--mint); text-transform: uppercase; }
.profile-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 15px; align-items: center; }
.profile-hero h2 { font-size: 1.45rem; margin-bottom: 5px; }
.big-avatar { width: 61px; height: 61px; font-size: 29px; }
progress { width: min(250px,100%); accent-color: var(--mint); }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 10px; margin: 13px 0; }
.profile-stats article { display: grid; gap: 3px; color: var(--muted); font-size: .86rem; }
.profile-stats .icon { color: var(--mint); font-size: 18px; }
.profile-stats strong { color: var(--text); font-size: 1.34rem; }
.history { list-style: none; padding: 0; margin-bottom: 0; }
.history li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.history span,.history time { color: var(--muted); font-size: .86rem; }
.history a:hover { color: var(--mint); }
.page-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 13px 0; }
.trophy-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.trophy-card { display: flex; gap: 12px; align-items: start; }
.trophy-card h2 { font-size: 1rem; margin-bottom: 4px; }
.trophy-card p { font-size: .87rem; }
.trophy-card small { display: block; margin-top: 6px; color: var(--muted); }
.trophy-card.earned { border-color: #7c6a43; }
.trophy-card.earned small { color: var(--gold); }
.settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
.form { display: flex; flex-direction: column; align-items: start; gap: 11px; }
.form > :is(label,section,details,hr,form) { width: 100%; }
label { display: grid; gap: 6px; color: var(--text); font-size: .9rem; font-weight: 650; }
input:not([type=checkbox],[type=range]), textarea, select {
  width: 100%; border: 1px solid #466166; border-radius: 6px; min-height: 42px; padding: 8px 10px; background: #0b1c22; color: var(--text);
}
select { appearance: none; padding-right: 35px; background-image: linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%); background-position: calc(100% - 16px) 18px,calc(100% - 11px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
input[type=range], input[type=checkbox] { accent-color: var(--mint); }
input[type=checkbox] { width: 19px; height: 19px; margin: 0; flex: none; }
.check { display: flex; align-items: center; gap: 8px; min-height: 37px; }
.form-status { min-height: 0; color: var(--muted); font-size: .88rem; }
.form-status:empty,.direct-share-status:empty,.game-message:empty,.share-status:empty { display: none; }
.form hr { border: 0; border-top: 1px solid var(--line); }
summary { font-weight: 700; cursor: pointer; }
details > :is(p,button,form) { margin-top: 9px; }
code { overflow-wrap: anywhere; }
.board-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 13px; }
.board-controls label { min-width: 140px; }
.board-empty { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 26px 8px 14px; }
.board-empty > .icon { font-size: 31px; color: var(--gold); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-block: 10px; font-variant-numeric: tabular-nums; }
th,td { text-align: left; padding: 9px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .88rem; }
.admin-grid { margin-top: 13px; }
.admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 10px 0; border-top: 1px solid var(--line); }
.admin-row select { width: auto; }
.admin-row span { flex: 1; min-width: 150px; }
.about { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px; }
.about img { width: 100%; height: auto; border-radius: 8px; image-rendering: pixelated; }
.about .button { margin-top: 13px; }
.game-page { max-width: 920px; margin: 22px auto 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; color: var(--muted); font-size: .88rem; }
.play-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-block: 5px 16px; }
.play-heading-actions, .play-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.play-meta { margin-bottom: 6px; color: var(--muted); font-size: .8rem; }
.play-meta span { display: inline-flex; align-items: center; gap: 4px; }
.genre-inline { color: var(--accent,var(--mint)); }
.stage { position: relative; background: #0e1e25; border: 1px solid #355657; border-radius: 10px; overflow: hidden; }
.stage-bar { min-height: 46px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 8px 4px 12px; color: var(--muted); font-size: .82rem; border-bottom: 1px solid var(--line); }
.stage-bar .square { min-width: 43px; min-height: 40px; background: transparent; border: 1px solid transparent; border-radius: 6px; }
.stage-bar .square:hover { background: #254047; color: var(--mint); }
.screen { position: relative; overflow: hidden; aspect-ratio: 16/9; background: #183137 var(--art) center/cover no-repeat; image-rendering: pixelated; }
.screen canvas { display: block; width: 100%; height: 100%; touch-action: none; outline-offset: -4px; }
.screen-hud,.screen-note { position: absolute; inset-inline: 0; display: flex; align-items: center; pointer-events: none; color: #fff3da; background: #101e28; font-family: var(--mono); font-weight: 700; }
.screen-hud { inset-block-start: 0; height: 13.34%; justify-content: space-around; gap: 3px; padding-inline: 4px; font-size: clamp(.68rem,2.1vw,1.08rem); }
.screen-note { inset-block-end: 0; height: 8.52%; justify-content: center; text-align: center; padding-inline: 6px; font-size: clamp(.62rem,2.1vw,.91rem); }
.three-game .screen canvas { image-rendering:auto; }
.three-game .screen-hud { inset:8px 8px auto; height:auto; justify-content:space-between; gap:5px; background:none; padding:0; }
.three-game .screen-hud span { background:#122333ed; color:#fff1ce; border:1px solid #d5e0dc4a; border-radius:5px; padding:4px 8px; line-height:1.15; }
.three-game .screen-note { background:linear-gradient(0deg,#101d2eee,#101d2e90); inset: auto 0 0; min-height:8.5%; height:auto; padding:4px 6px; }
.game-fx { position:absolute; inset:0; pointer-events:none; }
.game-fx [data-kind] { --reward:#f8da94; }
.game-fx :is([data-kind="combo"],[data-kind="bonus"]) { --reward:#a3f2cc; }
.game-fx :is([data-kind="near"],[data-kind="boost"]) { --reward:#9de8ff; }
.game-fx [data-kind="hit"] { --reward:#ffb5a3; }
.game-fx [data-kind="ready"] { --reward:#ffe8a6; }
.game-fx :is([data-kind="challenge"],[data-kind="win"]) { --reward:#ffe49e; }
.game-reward { position:absolute; top:19%; left:50%; translate:-50%; display:flex; align-items:center; justify-content:center; gap:7px; width:max-content; max-width:88%; padding:5px 9px; background:#0d1d2cfa; color:var(--reward); border:1px solid var(--reward); border-radius:6px; font:800 clamp(.59rem,1.6vw,.94rem)/1.16 var(--mono); text-align:center; box-shadow:0 3px 15px #101b2c69; }
.game-reward:not(.still) { animation:reward-entry .22s cubic-bezier(.15,.72,.28,1) both; }
.game-reward :is(.reward-points,.reward-chain) { white-space:nowrap; }
.reward-points { color:#fff5da; font-size:1.23em; letter-spacing:-.04em; font-variant-numeric:tabular-nums; }
.reward-chain { background:var(--reward); color:#11242a; border-radius:4px; padding:2px 4px; }
.game-reward:is([data-kind="challenge"],[data-kind="win"]) { padding:7px 12px; box-shadow:0 0 20px #ffd97851; border-width:2px; }
.game-burst { position:absolute; width:0; height:0; color:var(--reward); }
.game-burst::before { content:""; position:absolute; inset:-7px; width:14px; height:14px; border:1px solid currentColor; border-radius:50%; animation:reward-ring .47s ease-out both; }
.game-burst i { position:absolute; inset:0; width:5px; height:3px; border-radius:2px; background:currentColor; box-shadow:0 0 6px currentColor; animation:reward-spark .49s ease-out var(--lag) both; }
.game-burst:is([data-kind="challenge"],[data-kind="win"]) i { width:6px; height:5px; }
.stage.paused .game-fx *,.stage.paused .game-burst::before { animation-play-state:paused; }
@keyframes reward-entry { from { opacity:.48; transform:translateY(5px) scale(.96); } to { opacity:1; transform:none; } }
@keyframes reward-ring { from { opacity:.85; transform:scale(.7); } to { opacity:0; transform:scale(3.15); } }
@keyframes reward-spark { from { opacity:.86; transform:rotate(var(--angle)) translateX(4px); } to { opacity:0; transform:rotate(var(--angle)) translateX(var(--travel)); } }
@media (max-width:500px) { .three-game .screen-hud span { padding:3px 4px; } .game-reward { gap:5px; } }
.stage-bar [aria-pressed="true"] { color:var(--gold); }
.game-overlay { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; background: #09171dbb; padding: 10px; overflow: auto; }
.game-overlay button,.stage-bar button { touch-action:manipulation; }
.game-overlay.game-intro { justify-items:start; background:linear-gradient(90deg,#0d2028 12%,#0d2028f4 34%,#0d2028a8 53%,transparent 80%),linear-gradient(0deg,#0d202880,transparent 58%); padding:0; }
.screen:has(.game-intro) canvas { visibility:hidden; position:absolute; inset:0; }
.screen:has(.game-intro) canvas[data-renderer="three"] { visibility:visible; image-rendering:auto; }
.start-panel { width:min(440px,54%); padding:clamp(18px,4.4vw,47px); }
.start-panel h2 { font:900 clamp(1.7rem,3.8vw,3rem)/1.07 var(--display); letter-spacing:-.055em; text-wrap:balance; color:#fff1d2; }
.start-goal { margin-top:12px; color:#f0eee3; max-width:32ch; line-height:1.55; }
.start-controls { border-top:1px solid #68888466; padding-top:10px; margin:15px 0 17px; color:#c7dfd8; font-size:.84rem; }
.start-panel .button.primary { background:var(--accent,var(--mint)); color:#102329; }
.start-panel .button.primary:hover { filter:brightness(1.12); }
.start-panel .start-error { margin-top:9px; color:#ffd7b7; font-size:.86rem; }
.touch-hint { display:none; }
.stage-bar button:disabled { opacity:.35; cursor:default; }
.play-info summary { width:fit-content; }
.game-dialog { width: min(454px,100%); text-align: center; padding: 14px; border: 1px solid #6d898880; border-radius: 9px; background: #0e1f28f0; box-shadow: 0 10px 35px #06141c80; }
.game-dialog h2 { font-size: clamp(1.25rem,3vw,2.1rem); margin: 4px 0 7px; }
.results[data-result="best"] { border-color:#ffda8f; box-shadow:0 0 32px #ffdb8754; }
.results[data-result="win"] { border-color:#88cbb0; }
.results:is([data-result="best"],[data-result="win"]) h2 { animation:reward-entry .36s ease-out both; }
.game-dialog p { color: #d3e1d8; font-size: .93rem; margin-bottom: 11px; }
.game-dialog p:last-child { margin-bottom: 0; }
.game-dialog .button + p,.game-save { margin-top: 8px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.run-highlights { display:flex; flex-wrap:wrap; gap:5px; justify-content:center; list-style:none; padding:0; margin:0 0 10px; }
.run-highlights li { border-radius:4px; background:#224047; color:#e4eedf; font-size:.75rem; padding:3px 7px; }
.run-highlights strong { color:var(--mint); }
@media (max-width:500px) { .run-highlights { margin-bottom:5px; } .run-highlights li { font-size:.67rem; padding:2px 4px; } }
.touch-controls { display: none; align-items: center; justify-content: center; gap: 8px; padding: 11px 8px; border-top: 1px solid var(--line); }
.touch-controls .directions { display: grid; grid-template-columns: repeat(3,52px); gap: 5px; place-content: center; }
.touch-controls .directions .control-up { grid-column: 2; }
.touch-controls .directions .control-left { grid-row: 2; grid-column: 1; }
.touch-controls .directions .control-down { grid-row: 2; grid-column: 2; }
.touch-controls .directions .control-right { grid-row: 2; grid-column: 3; }
.touch-controls:has(.directions) { gap: 24px; }
.control { min-width: 52px; min-height: 52px; background: #223b43; border: 1px solid #4c686b; border-radius: 10px; font-weight: 800; padding: 4px 9px; touch-action: none; user-select: none; }
.control.pressed { color: #10242a; border-color: var(--mint); background: var(--mint); }
.control-action { color: var(--gold); min-width: 67px; }
.show-controls .touch-controls { display: flex; }
.game-message,.direct-share-status { color: var(--muted); padding: 7px; }
.game-page :is(.immersive,.stage:fullscreen) { position: fixed; inset: 0; z-index: 50; border-radius: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); display: flex; flex-direction: column; justify-content: center; background: #0a161c; overflow: auto; }
.game-page :is(.immersive,.stage:fullscreen) .screen { align-self: center; width: min(100%, calc((100dvh - 112px) * 1.7778)); flex: 0 0 auto; }
.playing-fullscreen { overflow: hidden; }
.play-info { display: grid; gap: 10px; grid-template-columns: 2fr 1fr; margin-top: 13px; }
.play-info .keys { font-size: .85rem; }
kbd { font: .83rem var(--mono); padding: 2px 4px; color: var(--mint); border-radius: 3px; border: 1px solid var(--line); }
.high-contrast { --muted: #e1e9e5; --line: #718e8e; --surface: #0e2429; }
.high-contrast .screen canvas { filter: contrast(1.16); }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (pointer:coarse),(max-width:760px) { .touch-controls { display: flex; } }
@media (pointer:coarse) {
  .keys-hint { display:none; }
  .touch-hint { display:inline; }
}
@media (pointer:coarse),(max-width:760px) {
  .game-page :is(.immersive,.stage:fullscreen) .screen { width: min(100%, calc((100dvh - 163px) * 1.7778)); }
  .game-page :is(.immersive,.stage:fullscreen):has(.directions) .screen { width: min(100%, calc((100dvh - 185px) * 1.7778)); }
}
@media (max-width:1000px) {
  .frame { width: calc(100% - 52px); }
  .hero-content { width: 59%; }
  .game-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .trophy-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .screen:has(.game-intro) { aspect-ratio:auto; background-position:50% 25%; }
  .game-overlay.game-intro { position:relative; padding-top:clamp(73px,17vw,144px); background:linear-gradient(180deg,#0d20281c 5%,#0d20285e 19%,#0d2028f5 45%,#0d2028 67%); }
  .start-panel { width:100%; padding:19px 19px 22px; }
  .start-panel h2 { font-size:clamp(1.7rem,7.3vw,2.4rem); text-wrap:initial; }
  .start-goal { font-size:.93rem; max-width:44ch; margin-top:7px; }
  .start-controls { margin:9px 0 12px; padding-top:8px; }
  .frame { width: calc(100% - 32px); }
  .head-inner { grid-template-columns: 1fr auto; gap: 0 5px; padding-block: 10px 5px; min-height: 0; }
  .head-inner .nav { grid-row: 2; grid-column: 1/-1; justify-content: start; margin-top: 5px; gap: 4px; }
  .nav a { min-height: 41px; padding: 7px 10px; }
  .edition { margin-top: 22px; }
  .hero-content { width: 65%; padding-left: 22px; }
  .hero-art { left: 18%; }
  .hero h1 { font-size: clamp(2.2rem,7.8vw,3.8rem); }
  .hero-fade { background: linear-gradient(90deg, #10282b 11%, #10282be5 29%, #10282b96 47%, #10282b22 72%), linear-gradient(0deg,#101d2577,transparent 35%); }
  .hero p { max-width: 260px; }
  .hero { min-height: 329px; }
  .dashboard { gap: 7px; }
  .dash-card { gap: 7px; align-items: start; flex-direction: column; padding: 9px 8px; }
  .dash-copy small { white-space: normal; }
  .dash-icon { width: 33px; height: 33px; font-size: 18px; }
  .collection { margin-top: 30px; }
  .game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .daily-list,.settings-grid,.about { grid-template-columns: 1fr; }
}
@media (max-width:500px) {
  .frame { width: calc(100% - 24px); }
  .brand-mark { width: 36px; height: 36px; }
  .head-inner .nav { justify-content: space-between; }
  .nav a { font-size: .8rem; }
  .header-actions { gap: 8px; }
  .player-link-text { display: none; }
  .edition-title,.edition time { font-size: .64rem; letter-spacing: .042em; }
  .hero { min-height: 0; flex-direction: column; align-items: stretch; padding-top: 148px; }
  .hero-art { left: 0; bottom: auto; height: 208px; }
  .hero-art img { object-position: center 42%; }
  .hero-fade { background: linear-gradient(180deg,transparent 11%,#10282b23 28%,#10282b 49%); }
  .hero-content { padding: 0 14px 18px; width: 100%; }
  .hero h1 { margin-top: 9px; font-size: clamp(1.78rem, 8.15vw, 2.5rem); letter-spacing: -.065em; }
  .hero h1 br { display: none; }
  .hero p { max-width: 100%; margin-top: 8px; font-size: .91rem; }
  .hero-actions { margin-top: 14px; gap: 10px; }
  .hero-location { top: 9px; right: 9px; bottom: auto; }
  .dash-copy > span { letter-spacing: .025em; font-size: .62rem; }
  .dash-copy strong { font-size: 1.02rem; }
  .dash-copy small { font-size: .69rem; }
  .section-top { align-items: start; }
  .section-top p { font-size: .86rem; }
  .games-count { margin-top: 11px; font-size: .68rem; }
  .filters { gap: 5px; }
  .chip { font-size: .76rem; min-height: 40px; padding: 6px 8px; }
  .card h3 { font-size: .92rem; }
  .card-body { padding: 9px 8px 11px; }
  .card-meta { font-size: .69rem; }
  .genre { top: 6px; left: 6px; font-size: .59rem; }
  .favourite { top: 2px; right: 2px; }
  .card-go { width: 24px; height: 24px; bottom: 6px; right: 6px; }
  .site-footer { margin-top: 34px; }
  .footer-inner { flex-wrap: wrap; padding-block: 13px; }
  .page-title { align-items: start; margin-top: 25px; }
  .page-title p { font-size: .88rem; }
  .heading-mark { width: 41px; height: 41px; font-size: 20px; }
  .daily-entry { grid-template-columns: 88px 1fr; }
  .daily-entry .button { grid-column: 2; justify-self: start; }
  .trophy-grid { grid-template-columns: 1fr; }
  .profile-hero { grid-template-columns: auto 1fr; }
  .profile-hero .button { grid-column: 2; justify-self: start; }
  .profile-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .history li { grid-template-columns: 1fr auto; }
  .play-heading { display: grid; align-items: start; }
  .play-heading h1 { font-size: 2rem; }
  .play-heading-actions [data-direct-share] > span { display:none; }
  .play-heading-actions [data-direct-share] { width:44px; padding:0; }
  .game-dialog { padding: 8px; }
  .game-dialog p { font-size: .79rem; margin-bottom: 6px; }
  .game-dialog h2 { font-size: 1.2rem; margin: 3px 0 5px; }
  .game-dialog .game-kicker { font-size: .65rem; }
  .game-dialog .button { padding: 4px 9px; min-height: 38px; font-size: .78rem; }
  .game-dialog .game-save { margin-top: 4px; }
  .touch-controls { gap: 5px; }
  .play-info { grid-template-columns: 1fr; }
}
