[hidden] { display: none !important; }
/* Cat Games hub - Playables-style, mobile first (390x844 main target), no web fonts, compositor-only animations.
 * Neutral dark surfaces so the game covers carry the colour; purple/gold accents match kit/kit.css. */
:root {
  --c-bg: #0f0f12; --c-bg-2: #17171c; --c-surface: #1e1e25; --c-surface-2: #2a2a33; --c-surface-3: #3a3a46;
  --c-line: rgba(255, 255, 255, .09); --c-line-2: rgba(255, 255, 255, .18);
  --c-text: #f4f4f6; --c-text-2: #b4b4be; --c-text-3: #8c8c98;
  --c-primary: #8b5cf6; --c-accent: #a78bfa; --c-gold: #fbbf24; --c-success: #34d399; --c-danger: #fb7185; --c-on-gold: #2a1700;
  --g-primary: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 45%, #6d28d9 100%);
  --g-reward: linear-gradient(135deg, #fde68a 0%, #fbbf24 40%, #f59e0b 100%);
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 28px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 16px rgba(0, 0, 0, .3);
  --sh-2: 0 18px 50px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
  --f-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --fs-xs: 11px; --fs-sm: 13px; --fs-md: 15px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 28px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px;
  --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --gut: 14px; --tap: 44px; --dock-h: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--c-bg); }
body { margin: 0; min-height: 100dvh; color: var(--c-text); font: var(--fs-md)/1.4 var(--f-sans); background: var(--c-bg);
  padding-bottom: calc(var(--dock-h) + 36px + env(safe-area-inset-bottom)); }
body.playing { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--c-accent); }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 6px; }
svg { flex: none; }
h1, h2, h3 { margin: 0; }

/* ------------------------------------------------------------------ header */
.top { position: sticky; top: 0; z-index: 10; display: flex; gap: var(--s-2); align-items: center; padding: calc(8px + env(safe-area-inset-top)) var(--gut) 8px;
  background: rgba(15, 15, 18, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: var(--s-2); margin-inline-end: auto; color: var(--c-text); text-decoration: none; font-size: 17px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.ic { width: var(--tap); height: var(--tap); border-radius: 50%; border: 0; background: transparent; color: var(--c-text); display: grid; place-items: center; padding: 0; transition: background .12s; }
.ic:active { background: var(--c-surface-2); }
.ic svg { width: 24px; height: 24px; }
.coinchip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 6px; border-radius: var(--r-pill); border: 1px solid rgba(251, 191, 36, .35); background: rgba(251, 191, 36, .1); font-weight: 800; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.coinchip i, .coin-ic { display: block; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c4 0 18%, #fbbf24 46%, #d97706 100%); box-shadow: inset 0 0 0 2px rgba(146, 64, 14, .55); flex: none; }
.note { margin: var(--s-2) var(--gut); color: var(--c-gold); font-size: var(--fs-sm); }

main { min-height: 60dvh; max-width: 1100px; margin: 0 auto; }

/* ------------------------------------------------------------------ sections */
.sec { margin-top: var(--s-5); }
.sec:first-child { margin-top: var(--s-2); }
.sec-h { display: flex; align-items: center; gap: 2px; width: 100%; margin: 0 0 var(--s-3); padding: 4px var(--gut); border: 0; background: transparent; text-align: start; min-height: 36px; }
.sec-h h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.sec-h svg { width: 22px; height: 22px; color: var(--c-text); transition: transform .15s var(--ease-out); }
button.sec-h:active svg { transform: translateX(3px); }
.seeall { display: block; margin: var(--s-3) var(--gut) 0; width: calc(100% - var(--gut) * 2); height: 40px; border-radius: var(--r-pill); border: 1px solid var(--c-line-2); background: transparent; color: var(--c-text); font-weight: 700; font-size: var(--fs-sm); }
.seeall:active { background: var(--c-surface); }

/* ------------------------------------------------------------------ cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) 10px; padding: 0 var(--gut); }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: 148px; gap: var(--s-3); overflow-x: auto; padding: 0 var(--gut) 2px; scroll-snap-type: x proximity; scroll-padding: 0 var(--gut); scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.card { min-width: 0; scroll-snap-align: start; }
.cover { position: relative; display: block; width: 100%; border: 0; padding: 0; background: var(--c-surface); overflow: hidden; transition: transform .16s var(--ease-out); }
.cover:active { transform: scale(.97); }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* poster: a tinted frame around the art, like Playables */
.tall .cover { --tint: var(--c-surface-2); aspect-ratio: 5 / 7; border-radius: var(--r-lg); padding: 9px 9px 12px; background: var(--tint); box-shadow: var(--sh-1); }
.tall .cover img { border-radius: 13px; }
.sq .cover { aspect-ratio: 1; border-radius: var(--r-md); }
.sq .cover img { object-position: 50% 22%; }
.badge { position: absolute; top: 16px; inset-inline-start: 16px; padding: 3px 8px; border-radius: 7px; background: #fff; color: #0f0f12; font-size: 12px; font-weight: 800; line-height: 1.3; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.info { display: flex; align-items: flex-start; gap: 2px; padding: 8px 0 0 2px; }
.info .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.name { max-width: 100%; font-weight: 800; font-size: 15.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq .name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.meta { max-width: 100%; color: var(--c-text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.age { margin-top: 3px; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--c-line-2); color: var(--c-text-2); font-size: 12px; font-weight: 700; line-height: 1.45; }
.dotbtn { flex: none; width: 36px; height: 36px; margin: -6px -8px 0 0; border: 0; border-radius: 50%; background: transparent; color: var(--c-text); display: grid; place-items: center; padding: 0; }
.dotbtn:active { background: var(--c-surface-2); }
.dotbtn svg { width: 20px; height: 20px; }

/* list / browse */
.subhead { display: flex; align-items: center; gap: var(--s-1); padding: 0 var(--gut) var(--s-3) 4px; }
.subhead h1 { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.01em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count { color: var(--c-text-3); font-size: var(--fs-sm); font-weight: 700; }
.search { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-1) var(--gut) var(--s-4); padding: 0 var(--s-4); height: 48px; border-radius: var(--r-pill); background: var(--c-surface); border: 1px solid var(--c-line); color: var(--c-text-3); }
.search:focus-within { border-color: var(--c-accent); }
.search svg { width: 20px; height: 20px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--c-text); font: inherit; }
.search input::placeholder { color: var(--c-text-3); }
.cats { display: grid; gap: 10px; padding: 0 var(--gut); }
.cat { --tint: var(--c-surface-2); display: flex; align-items: center; gap: var(--s-4); height: 88px; padding: 0 var(--s-4) 0 0; border: 0; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--tint), var(--c-surface)); text-align: start; overflow: hidden; }
.cat:active { filter: brightness(1.15); }
.cat img { width: 76px; height: 100%; object-fit: cover; flex: none; }
.cat-t b { display: block; font-size: 17px; font-weight: 800; }
.cat-t small { color: var(--c-text-2); font-size: var(--fs-sm); }

/* skeleton + empty */
.sk { border-radius: var(--r-md); background: linear-gradient(90deg, var(--c-surface) 0%, var(--c-surface-2) 40%, var(--c-surface) 80%); background-size: 300% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.sk-line { height: 22px; width: 42%; margin: var(--s-4) var(--gut) var(--s-3); }
.sk-sq { width: 148px; height: 148px; margin: 0 var(--gut); }
.sk-card { aspect-ratio: 5 / 7; border-radius: var(--r-lg); }
@keyframes shimmer { 0% { background-position: 100% 0 } 100% { background-position: -50% 0 } }
.empty { text-align: center; color: var(--c-text-2); padding: 36px var(--gut); }
.empty img { opacity: .9; }
.empty b { display: block; margin-top: var(--s-3); font-size: var(--fs-lg); color: var(--c-text); }
.empty p { margin: 4px 0 var(--s-4); }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); width: 100%; height: 52px; padding: 0 var(--s-5); border: 0; border-radius: var(--r-pill); font-weight: 800; font-size: 16px; text-decoration: none; white-space: nowrap; transition: transform .12s var(--ease-out), filter .12s; }
.btn:active:not(:disabled) { transform: scale(.97); filter: brightness(.94); }
.btn:disabled { opacity: .6; }
.btn svg { width: 20px; height: 20px; }
.btn.primary { color: #fff; background: var(--g-primary); }
.btn.gold { color: var(--c-on-gold); background: var(--g-reward); }
.btn.ghost { color: var(--c-text); background: var(--c-surface-2); }
.btn.sm { width: auto; height: 40px; padding: 0 16px; font-size: var(--fs-sm); }
.x { border: 0; background: rgba(255, 255, 255, .08); width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; color: var(--c-text-2); }

/* ------------------------------------------------------------------ profile */
main[data-view="profile"] { padding: var(--s-1) 0 0; }
.pcard { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-3) var(--gut) 0; padding: var(--s-4); border-radius: var(--r-lg); background: var(--c-surface); border: 1px solid var(--c-line); }
.avatar { border-radius: 50%; background: var(--c-surface-2); padding: 6px; flex: none; }
.who-t { min-width: 0; }
.who-t b { display: block; font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.01em; }
.who-t small { display: block; color: var(--c-text-2); font-size: var(--fs-sm); }
.who-t small.ok { color: var(--c-success); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: var(--s-3) var(--gut) 0; }
.stats div { padding: var(--s-3) var(--s-2); border-radius: var(--r-md); background: var(--c-surface); border: 1px solid var(--c-line); text-align: center; }
.stats b { display: block; font-size: var(--fs-xl); font-weight: 800; font-variant-numeric: tabular-nums; }
.stats small { color: var(--c-text-2); font-size: 12px; }
.coin { border-color: rgba(251, 191, 36, .3); background: linear-gradient(135deg, rgba(251, 191, 36, .12), var(--c-surface) 60%); }
.coin-ic { width: 40px; height: 40px; }
/* Cat coins (bought in the app) look different from the xu earned in games */
.coin:not(.xu) { border-color: rgba(167, 139, 250, .35); background: linear-gradient(135deg, rgba(139, 92, 246, .16), var(--c-surface) 60%); }
.coin:not(.xu) .coin-ic { background: radial-gradient(circle at 35% 30%, #ede9fe 0 18%, #a78bfa 46%, #6d28d9 100%); box-shadow: inset 0 0 0 2px rgba(76, 29, 149, .6); }
.coin-t { flex: 1; min-width: 0; }
.coin-t small { display: block; color: var(--c-text-2); font-size: 12px; }
.coin-t b { display: block; font-size: var(--fs-xl); font-weight: 800; font-variant-numeric: tabular-nums; }
.streak .fl { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--g-reward); color: var(--c-on-gold); flex: none; }
.streak .fl svg { width: 24px; height: 24px; }
.streak .st { flex: 1; min-width: 0; }
.streak b { display: block; }
.streak small { color: var(--c-text-2); font-size: 12px; }
.pips { display: flex; gap: 4px; margin-top: 6px; }
.pips i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); }
.pips i.on { background: var(--g-reward); }
.plist { margin: 0 var(--gut); border-radius: var(--r-lg); background: var(--c-surface); border: 1px solid var(--c-line); overflow: hidden; }
.prow { display: flex; align-items: center; padding-inline-end: 10px; }
.prow + .prow, .srow + .srow { border-top: 1px solid var(--c-line); }
.prow-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s-3); padding: 10px 6px 10px 10px; border: 0; background: transparent; text-align: start; }
.prow-main:active { background: var(--c-surface-2); }
.prow-main img { width: 56px; height: 56px; border-radius: var(--r-sm); object-fit: cover; object-position: 50% 22%; flex: none; }
.prow-t { flex: 1; min-width: 0; }
.prow-t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow-t small { display: block; color: var(--c-text-2); font-size: 12.5px; }
.prow-t small.best { color: var(--c-gold); font-weight: 700; }
.prow-play { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--c-surface-3); flex: none; }
.prow-play svg { width: 16px; height: 16px; margin-left: 2px; }
.prow .dotbtn { margin: 0; }
.srow { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 54px; padding: 0 var(--s-4); border: 0; background: transparent; text-align: start; }
.srow:active { background: var(--c-surface-2); }
.srow svg { width: 22px; height: 22px; color: var(--c-text-2); }
.srow span { flex: 1; }
.srow b { color: var(--c-text-2); font-weight: 700; }
.foot { text-align: center; color: var(--c-text-3); font-size: 12px; padding: var(--s-5) var(--gut) 0; margin: 0; }
.foot a { color: var(--c-text-2); }

/* ------------------------------------------------------------------ floating dock + install */
.dock { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 12; display: flex; gap: 4px; padding: 6px; height: var(--dock-h);
  border-radius: var(--r-pill); background: rgba(38, 38, 46, .78); border: 1px solid var(--c-line-2); box-shadow: var(--sh-2); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
.dock button { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 64px; height: 100%; padding: 0 18px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--c-text-2); font-weight: 800; font-size: var(--fs-sm); white-space: nowrap; transition: background .18s, color .18s; }
.dock svg { width: 24px; height: 24px; }
.dock span { display: none; }
.dock button.on { background: rgba(255, 255, 255, .14); color: #fff; }
.dock button.on span { display: inline; }
body.playing .dock, body.playing .install { display: none; }
.install { position: fixed; left: var(--gut); right: var(--gut); bottom: calc(var(--dock-h) + 24px + env(safe-area-inset-bottom)); z-index: 11; display: flex; align-items: center; gap: var(--s-3); max-width: 520px; margin: 0 auto; padding: 10px 10px 10px 14px;
  border-radius: var(--r-lg); background: rgba(30, 30, 37, .96); border: 1px solid rgba(251, 191, 36, .4); box-shadow: var(--sh-2); font-size: var(--fs-sm); }
.install-txt { flex: 1; min-width: 0; line-height: 1.25; }
.install-txt b { display: block; }
.install-txt small { color: var(--c-text-2); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ sheet */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0); transition: background .22s; }
.sheet.open { background: rgba(0, 0, 0, .66); }
.sheet-card { position: relative; width: 100%; max-width: 520px; max-height: 92dvh; overflow: auto; padding: 10px var(--s-4) calc(18px + env(safe-area-inset-bottom)); border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--c-surface); border: 1px solid var(--c-line-2); border-bottom: 0; transform: translateY(100%); transition: transform .3s var(--ease-out); box-shadow: var(--sh-2); }
.sheet.open .sheet-card { transform: none; }
.grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--c-line-2); margin: 0 auto 14px; }
.sheet-head { display: flex; gap: var(--s-4); align-items: flex-start; }
.sheet-img { width: 96px; height: 128px; object-fit: cover; border-radius: var(--r-md); background: var(--c-surface-2); flex: none; }
.sheet-info { flex: 1; min-width: 0; }
.sheet-info h3 { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.01em; margin-bottom: var(--s-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 3px 9px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .07); border: 1px solid var(--c-line); font-size: 12px; font-weight: 700; color: var(--c-text-2); }
.desc { color: var(--c-text-2); margin: var(--s-4) 0 var(--s-3); }
.rewards { display: flex; gap: 8px; align-items: center; margin: 0 0 var(--s-4); padding: 10px 12px; border-radius: var(--r-md); background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .3); color: #fde68a; font-size: var(--fs-sm); }
.rewards svg { width: 18px; height: 18px; }
.sheet-acts { display: flex; gap: 10px; margin-top: 10px; }
.sheet-acts .btn { height: 46px; font-size: var(--fs-sm); padding: 0 10px; }
.lic { color: var(--c-text-3); font-size: 11px; margin: var(--s-3) 0 0; text-align: center; }

/* xu packs (above the player: a game can ask for a top-up) */
.sheet.packs { z-index: 70; }
.packs-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); }
.packs-head h3 { flex: 1; font-size: var(--fs-xl); font-weight: 800; }
.packs-list { display: grid; gap: 10px; }
.pack { display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: 12px 12px 12px 14px; border-radius: var(--r-md); border: 1px solid rgba(251, 191, 36, .28); background: linear-gradient(135deg, rgba(251, 191, 36, .1), var(--c-surface-2) 70%); text-align: start; }
.pack:active { filter: brightness(1.12); }
.pack:disabled { opacity: .6; }
.pack .coin-ic { width: 34px; height: 34px; }
.pack b { flex: 1; font-size: var(--fs-lg); font-weight: 800; font-variant-numeric: tabular-nums; }
.packs-msg { min-height: 20px; margin: var(--s-3) 0 0; text-align: center; font-size: var(--fs-sm); font-weight: 700; color: var(--c-text-2); }
.packs-msg.ok { color: var(--c-success); }
.packs-msg.err { color: var(--c-danger); }
/* "Get Cat Browser to play" (visitors outside the app): bottom sheet on phones, centred card from 600px up */
.getapp .sheet-card { text-align: center; }
.getapp .x { position: absolute; top: 14px; inset-inline-end: 14px; }
.getapp img { width: 120px; height: 160px; object-fit: cover; border-radius: var(--r-md); background: var(--c-surface-2); box-shadow: var(--sh-1); margin-top: var(--s-2); }
.getapp h3 { margin-top: var(--s-4); font-size: var(--fs-xl); font-weight: 800; line-height: 1.25; }
.getapp .desc { margin: var(--s-2) 0 var(--s-4); }
.getapp .btn + .btn { margin-top: 8px; }
@media (min-width: 600px) { .sheet.getapp { align-items: center; } .getapp .sheet-card { max-width: 420px; border-radius: var(--r-xl); border-bottom: 1px solid var(--c-line-2); padding: var(--s-5) var(--s-6) var(--s-5); transform: translateY(24px) scale(.97); opacity: 0; transition: transform .25s var(--ease-out), opacity .2s; } .sheet.getapp.open .sheet-card { transform: none; opacity: 1; } .getapp .grab { display: none; } }

/* ------------------------------------------------------------------ player */
.player { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; }
.bar { flex: none; display: flex; align-items: center; gap: var(--s-2); padding: calc(4px + env(safe-area-inset-top)) var(--s-2) 4px; min-height: 52px; background: var(--c-bg); border-bottom: 1px solid var(--c-line); }
.ptitle { flex: 1; min-width: 0; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage { position: relative; flex: 1; min-height: 0; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--c-bg); }
.pload { position: absolute; inset: 52px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-4); background: var(--c-bg); z-index: 2; }
.pload img { width: 180px; height: 240px; border-radius: var(--r-lg); object-fit: cover; box-shadow: var(--sh-2); }
.pload-txt { color: var(--c-text-2); font-size: var(--fs-sm); font-weight: 700; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--c-line-2); border-top-color: var(--c-accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.rotate { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 30px; background: rgba(10, 10, 14, .94); font-size: var(--fs-lg); font-weight: 700; z-index: 5; }
.over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .72); padding: var(--s-5); animation: fade .2s ease; z-index: 6; }
.over-card { width: 100%; max-width: 350px; padding: var(--s-6) var(--s-5) var(--s-4); text-align: center; border-radius: var(--r-xl); background: var(--c-surface); border: 1px solid var(--c-line-2); box-shadow: var(--sh-2); display: flex; flex-direction: column; gap: var(--s-2); animation: rise .35s var(--ease-spring); }
.over-card h3 { font-size: var(--fs-xl); font-weight: 900; }
.over-score { margin: 0 0 var(--s-3); font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; }
.toast { position: fixed; left: 50%; bottom: calc(var(--dock-h) + 30px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 10px 16px; border-radius: var(--r-pill); background: #f4f4f6; color: #0f0f12; font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; box-shadow: var(--sh-2); z-index: 60; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; } .spin { animation: spin 1.4s linear infinite !important; } }
@media (min-width: 600px) {
  :root { --gut: 24px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s-6) var(--s-4); }
  .row { grid-auto-columns: 180px; }
  .cats { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  main[data-view="profile"] { max-width: 640px; }
}

/* loading screen: cover + name + progress bar */
.pload-name { color: var(--c-text); font-size: var(--fs-lg, 18px); font-weight: 800; text-align: center; max-width: 80%; }
.pbar { width: min(240px, 64vw); height: 8px; border-radius: 999px; background: var(--c-line-2); overflow: hidden; }
.pbar i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--c-accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform .25s linear; }
.pload.done { opacity: 0; transition: opacity .18s ease; }
@media (prefers-reduced-motion: reduce) { .pbar i { transition: none; } }

/* leaderboards + daily missions */
.board { margin: 4px 0 14px; padding: 12px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .06); }
.board-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.board-h b { font-size: 15px; color: var(--c-text); }
.seg { display: inline-flex; padding: 2px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.seg button { min-height: 30px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent; color: var(--c-text-2); font: inherit; font-size: 12px; font-weight: 700; }
.seg button.on { background: var(--c-accent); color: #111; }
.board ol { list-style: none; margin: 0; padding: 0; max-height: 216px; overflow: auto; }
.board li { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; min-height: 36px; padding: 0 6px; border-radius: 10px; font-size: 14px; color: var(--c-text); }
.board li.me { background: rgba(255, 255, 255, .12); font-weight: 800; }
.board li i { font-style: normal; font-weight: 800; color: var(--c-text-2); text-align: center; }
.board li:nth-child(-n+3) i { color: var(--c-accent); }
.board li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li em { font-style: normal; font-variant-numeric: tabular-nums; font-weight: 800; }
.board-note { margin: 8px 2px 0; font-size: 12px; color: var(--c-text-2); }
.daily { margin: 0 0 18px; padding: 4px 14px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .06); }
.daily-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; cursor: pointer; list-style: none; }
.daily-h::-webkit-details-marker { display: none; }
.daily-h span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.daily-h b { font-size: 17px; color: var(--c-text); }
.daily-h small { color: var(--c-text-2); font-size: 12px; font-weight: 700; }
.daily-h em { font-style: normal; font-weight: 800; font-size: 13px; padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--c-text); white-space: nowrap; }
.mis { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 5px 10px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.mis b { grid-column: 1; font-size: 14px; color: var(--c-text); }
.mis .mbar { grid-column: 1; display: block; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.mis .mbar i { display: block; height: 100%; border-radius: inherit; background: var(--c-accent); }
.mis small { grid-column: 1; color: var(--c-text-2); font-size: 12px; }
.mis button, .mis .tag { grid-column: 2; grid-row: 1 / span 3; min-width: 76px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 0; font: inherit; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.mis button { background: var(--c-accent); color: #111; }
.mis .tag { background: rgba(255, 255, 255, .08); color: var(--c-text-2); }
.daily-note { margin: 4px 0 12px; font-size: 12px; color: var(--c-text-2); }
.dock button.dot { position: relative; }
.dock button.dot::after { content: ""; position: absolute; top: 9px; inset-inline-end: 12px; width: 9px; height: 9px; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 0 2px rgba(0, 0, 0, .5); }
.pcard.ranks { display: block; }
.ranks > b { font-size: 16px; }
.ranks li { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 14px; }
.ranks ul { list-style: none; margin: 6px 0 0; padding: 0; }
.ranks li em { font-style: normal; font-weight: 800; color: var(--c-accent); }

/* add to Home screen */
#sheet-home { grid-column: 1 / -1; }
.addhub { width: 100%; margin: 0 0 14px; }

/* FunGame.ai logo tile */
.brand img { border-radius: 9px; }

/* missions: header chip + bottom sheet; toast at the top */
.mchip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; margin-inline-end: 8px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--c-text); font: inherit; font-size: 14px; font-weight: 800; }
.mchip svg { width: 20px; height: 20px; color: var(--c-accent); }
.mchip.dot::after { content: ""; position: absolute; top: -2px; inset-inline-end: -2px; width: 11px; height: 11px; border-radius: 50%; background: #ff4d5e; box-shadow: 0 0 0 2px var(--c-bg); }
.daily-card { max-height: 84dvh; display: flex; flex-direction: column; padding-bottom: 0; }
.daily-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 0 10px; }
.daily-top h3 { font-size: var(--fs-xl, 22px); font-weight: 800; }
.daily-top small { display: block; margin-top: 2px; color: var(--c-text-2); font-size: 13px; font-weight: 700; }
.daily-list { overflow: auto; overscroll-behavior: contain; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.daily-list .mis:first-child { border-top: 0; }
.toast { top: calc(66px + env(safe-area-inset-top)); bottom: auto; z-index: 95; max-width: calc(100vw - 32px); white-space: normal; text-align: center; }

/* ------------------------------------------------------------------ editorial cards on Home (stories from the server) */
.stories { display: grid; gap: var(--s-4); padding: 0 var(--gut); margin-top: var(--s-2); }
.sec + .stories { margin-top: var(--s-5); }
.st-head { margin: var(--s-3) 2px -4px; }
.st-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.st-head p { margin: 4px 0 0; color: var(--c-text-2); font-size: var(--fs-md); }
.story { position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--c-surface); box-shadow: var(--sh-1); --tint: #2a2140; }
.st-kicker { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.st-title { margin: 4px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.16; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.st-text { margin: 6px 0 0; font-size: var(--fs-md); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* feature: the picture fills the card, the text sits on a fade of the picture's own colour */
.st-feature { display: flex; flex-direction: column; justify-content: flex-end; min-height: min(118vw, 520px); background: var(--tint); }
.st-art { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; }
.st-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.st-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 28%, var(--tint) 70%); opacity: .96; }
.st-feature .st-body { position: relative; padding: 0 20px 16px; pointer-events: none; color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.st-feature .st-kicker { color: rgba(255, 255, 255, .78); }
.st-feature .st-text { color: rgba(255, 255, 255, .82); }
.st-foot { position: relative; padding: 12px 20px 14px; background: rgba(0, 0, 0, .26); }
.st-feature .st-row { padding: 0; }
.st-feature .st-txt small { color: rgba(255, 255, 255, .78); }
.st-feature .st-play { background: rgba(255, 255, 255, .24); color: #fff; }
.st-icons { display: flex; gap: 12px; justify-content: space-between; }
.st-icons button { flex: 0 1 56px; padding: 0; border: 0; background: transparent; }
.st-icons img { width: 100%; height: auto; aspect-ratio: 1; }
/* list: a titled card with up to 5 games */
.st-list { padding: 18px 0 8px; }
.st-list .st-body { padding: 0 20px 8px; }
.st-list .st-kicker { color: var(--c-text-3); }
.st-row { display: flex; align-items: center; gap: 12px; padding: 9px 20px; }
.st-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; color: inherit; text-align: start; font: inherit; }
.st-icon { flex: none; width: 56px; height: 56px; border-radius: 13px; object-fit: cover; background: var(--c-surface-2); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.st-txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.st-txt b { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-txt small { color: var(--c-text-2); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-play { flex: none; min-width: 76px; height: 36px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: var(--c-surface-2); color: var(--c-accent); font: inherit; font-size: 15px; font-weight: 800; transition: transform .12s var(--ease-out); }
.st-play:active, .st-main:active .st-icon { transform: scale(.95); }
@media (min-width: 700px) { .stories { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } .st-head { grid-column: 1 / -1; } .st-feature { min-height: 480px; } }

/* ------------------------------------------------------------------ languages: picker + right-to-left (Arabic) */
.srow select { max-width: 55%; height: 36px; padding: 0 10px; border: 1px solid var(--c-line-2); border-radius: var(--r-sm); background: var(--c-surface-2); color: var(--c-text); font: inherit; font-weight: 700; }
[dir="rtl"] .sec-h svg, [dir="rtl"] [data-back] svg, [dir="rtl"] .prow-play svg { transform: scaleX(-1); }
[dir="rtl"] .st-kicker { letter-spacing: 0; }
/* the game frame and its controls keep their own left-to-right layout */
[dir="rtl"] #player { direction: ltr; }

/* ------------------------------------------------------------------ wide screens (laptop / desktop, 1024 px and up)
 * Phones and tablets keep everything above. The pieces below exist in the page at every width but only show here. */
.dock .rail-only, .desk-only, .c-desc, .c-play, .rank-sec { display: none; }
.st-cell { display: contents; }
@media (max-width: 1023.98px) { .grid.lim > .card:nth-child(n+5) { display: none; } }
@media (min-width: 1024px) {
  :root { --rail: 248px; --gut: 32px; }
  body { padding-bottom: 48px; padding-inline-start: var(--rail); }
  button, a, select, summary, label.srow { cursor: pointer; }
  :focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
  main { max-width: 1520px; margin: 0 auto; }
  main[data-view="profile"] { max-width: 860px; }
  /* top bar: missions, xu; the brand moves to the rail, search is in the rail */
  .top { justify-content: flex-end; padding-inline: var(--gut); min-height: 60px; }
  .top { z-index: 13; }
  .brand { position: fixed; top: 14px; inset-inline-start: calc(22px - var(--rail)); margin: 0; font-size: 19px; } /* .top is the containing block (it has a backdrop filter) */
  #search-open { display: none; }
  /* the dock becomes the left rail */
  .dock { top: 0; bottom: 0; left: auto; right: auto; inset-inline-start: 0; transform: none; width: var(--rail); height: auto; flex-direction: column; align-items: stretch; gap: 2px; padding: 72px 14px 24px;
    border: 0; border-inline-end: 1px solid var(--c-line); border-radius: 0; background: var(--c-bg-2); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; overflow-y: auto; }
  .dock button { flex: none; justify-content: flex-start; gap: 12px; min-width: 0; height: 42px; padding: 0 12px; border-radius: 10px; color: var(--c-text); font-size: 15px; font-weight: 700; }
  .dock button:hover { background: var(--c-surface); }
  .dock button.on { background: var(--c-surface-2); }
  .dock svg { width: 20px; height: 20px; flex: none; color: var(--c-accent); }
  .dock span { display: inline; overflow: hidden; text-overflow: ellipsis; }
  .dock .rail-only { display: flex; }
  #rail-search { order: -1; margin-bottom: 12px; border: 1px solid var(--c-line-2); background: var(--c-surface); color: var(--c-text-2); font-weight: 600; }
  #rail-search svg { color: var(--c-text-2); }
  #rail-cats { flex-direction: column; gap: 2px; margin-top: 20px; }
  #rail-cats small { padding: 0 12px 6px; color: var(--c-text-3); font-size: 12px; font-weight: 700; }
  #rail-cats button { height: 36px; color: var(--c-text-2); font-weight: 600; }
  #rail-cats button.on { color: var(--c-text); }
  .rail-lang { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 14px 12px 0; border-top: 1px solid var(--c-line); }
  .rail-lang svg { color: var(--c-text-2); }
  .rail-lang select { flex: 1; min-width: 0; height: 36px; padding: 0 8px; border: 1px solid var(--c-line-2); border-radius: var(--r-sm); background: var(--c-surface); color: var(--c-text); font: inherit; font-size: 14px; font-weight: 600; }
  /* sheets are centred dialogs, the install banner sits in a corner */
  .sheet { align-items: center; }
  .sheet-card { border-radius: var(--r-xl); max-height: 88dvh; }
  .sheet .grab { display: none; }
  .install { left: auto; right: auto; inset-inline-end: 24px; bottom: 24px; width: 440px; margin: 0; }
  .toast { margin-inline-start: calc(var(--rail) / 2); }
  .sec-h h2 { font-size: 22px; }
  .seeall { display: none; }
  .row { grid-auto-columns: 168px; }
  /* Home: story cards on a 3-column grid (wide + narrow, narrow + wide), all the same height */
  .stories { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; align-items: end; margin-top: 4px; }
  .st-cell { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .st-cell.d-wide { grid-column: span 2; }
  .st-cell.d-full { grid-column: 1 / -1; }
  .st-cell.st-ranked { display: none; }
  .st-cell .story { height: 470px; min-height: 0; }
  .st-cell.d-full .story { height: auto; }
  .st-head { margin: 0 2px; }
  .st-title { font-size: 30px; }
  .st-feature .st-body { max-width: 620px; padding-inline: 24px; }
  .st-foot { padding-inline: 24px; }
  .d-wide .st-art img { object-position: center 28%; }
  .st-art img { transition: transform .5s var(--ease-out); }
  .st-feature:hover .st-art img { transform: scale(1.03); }
  .st-list { display: flex; flex-direction: column; }
  .st-list .st-rows { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
  .d-wide .st-list .st-rows, .d-full .st-list .st-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
  .d-full .st-list .st-rows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-row { border-radius: 14px; }
  .st-list .st-row:hover { background: var(--c-surface-2); }
  .st-play:hover { filter: brightness(1.18); }
  .st-icons { justify-content: flex-start; gap: 16px; }
  /* a ranking: numbered cards in a row that scrolls sideways */
  .rank-sec { display: block; }
  .rank-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(196px, 1fr); gap: 20px; overflow-x: auto; padding: 4px var(--gut) 14px; scrollbar-width: thin; scroll-snap-type: x proximity; scroll-padding-inline: var(--gut); }
  .rank-card { position: relative; display: flex; flex-direction: column; align-items: center; padding: 22px 16px 18px; border-radius: var(--r-lg); background: var(--c-surface); box-shadow: var(--sh-1); text-align: center; scroll-snap-align: start; transition: transform .16s var(--ease-out), background .16s; }
  .rank-card:hover { background: var(--c-surface-2); transform: translateY(-3px); }
  .rank-card i { position: absolute; top: 12px; inset-inline-start: 16px; font-style: normal; font-size: 18px; font-weight: 800; color: var(--c-text-3); }
  .rank-art { padding: 0; border: 0; background: transparent; margin-bottom: 12px; }
  .rank-art img { width: 96px; height: 96px; border-radius: 22px; }
  .rank-card b { font-size: 16px; font-weight: 800; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .rank-card small { margin: 2px 0 14px; color: var(--c-text-2); font-size: 13px; }
  .rank-card .st-play { margin-top: auto; }
  /* game grids: rows of icon + name + one line + Play, 2 to 4 columns */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; padding: 0 calc(var(--gut) - 8px); }
  .card.tall { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: 16px; transition: background .14s; }
  .card.tall:hover { background: var(--c-surface); }
  .tall .cover { flex: none; width: 72px; aspect-ratio: 1; padding: 0; border-radius: 17px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
  .tall .cover img { border-radius: 0; object-position: center 35%; }
  .tall .badge, .tall .age, .tall .meta { display: none; }
  .tall .info { flex: 1; min-width: 0; align-items: center; gap: 6px; padding: 0; }
  .tall .name { font-size: 16px; }
  .tall .dotbtn { margin: 0; color: var(--c-text-2); }
  .tall .dotbtn:hover { background: var(--c-surface-2); }
  .c-desc { display: block; max-width: 100%; color: var(--c-text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .c-play { display: inline-block; min-width: 68px; }
  /* Categories: search field, category chips, carousel */
  .search { max-width: 460px; }
  .cats { display: flex; flex-wrap: wrap; gap: 10px; }
  .cat { height: 46px; gap: 10px; padding: 0; padding-inline-end: 18px; border-radius: var(--r-pill); background: var(--c-surface); box-shadow: 0 0 0 1px var(--c-line); }
  .cat:hover { background: var(--c-surface-2); }
  .cat img { width: 46px; height: 46px; border-radius: 50%; }
  .cat small { display: none; }
  .desk-only { display: block; }
  .car { position: relative; height: clamp(380px, 33vw, 560px); margin: 22px var(--gut) 6px; border-radius: var(--r-xl); overflow: hidden; background: var(--c-surface); box-shadow: var(--sh-1); touch-action: pan-y; user-select: none; }
  .car-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .55s, visibility .55s; }
  .car-slide.on { opacity: 1; visibility: visible; }
  .car-bg { position: absolute; inset: -48px; width: calc(100% + 96px); height: calc(100% + 96px); object-fit: cover; filter: blur(40px) brightness(.5) saturate(1.25); }
  .car-art { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; height: 100%; width: auto; aspect-ratio: 3 / 4; object-fit: cover; -webkit-mask-image: linear-gradient(90deg, transparent, #000 38%); mask-image: linear-gradient(90deg, transparent, #000 38%); pointer-events: none; }
  [dir="rtl"] .car-art { -webkit-mask-image: linear-gradient(270deg, transparent, #000 38%); mask-image: linear-gradient(270deg, transparent, #000 38%); }
  .car-txt { position: absolute; inset-inline-start: 48px; bottom: 60px; width: min(480px, 46%); color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
  .car-txt .st-kicker { color: rgba(255, 255, 255, .8); }
  .car-txt h3 { margin: 6px 0 8px; font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.14; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .car-txt p { margin: 0 0 18px; color: rgba(255, 255, 255, .86); font-size: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .car-game { padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .24); text-shadow: none; }
  .car-game .st-row { padding: 0; }
  .car-game .st-txt small { color: rgba(255, 255, 255, .8); }
  .car-game .st-play { background: var(--g-primary); color: #fff; }
  .car-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 9px; padding: 9px 13px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .38); }
  .car-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .45); }
  .car-dots button.on { background: #fff; }
}
@media (min-width: 1160px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1560px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* xu packs: the server's price hint, when it sends one */
.pack-price { margin-inline-start: auto; color: var(--c-text-2); font-size: var(--fs-sm); font-weight: 700; }

/* ------------------------------------------------------------------ playing in a browser window (computers, tablets) */
/* The "continue in Cat Browser" card on a wide screen: the game's link as a QR code and as text */
.getapp-qr { display: flex; align-items: center; gap: var(--s-4); margin: 0 0 var(--s-4); padding: var(--s-3); border-radius: var(--r-md); background: var(--c-surface-2); border: 1px solid var(--c-line); text-align: start; }
.getapp-qr .qr { flex: none; width: 132px; height: 132px; border-radius: 10px; overflow: hidden; background: #fff; }
.getapp-qr .qr svg { display: block; width: 100%; height: 100%; }
.getapp-qr > div { flex: 1; min-width: 0; }
.getapp-qr p { margin: 0 0 var(--s-3); font-size: var(--fs-sm); font-weight: 700; color: var(--c-text-2); line-height: 1.35; }
.linkchip { display: flex; align-items: center; gap: 8px; max-width: 100%; min-height: 36px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--c-line-2); background: var(--c-bg); color: var(--c-text); font-size: var(--fs-sm); font-weight: 700; }
.linkchip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
.linkchip svg { flex: none; width: 16px; height: 16px; opacity: .75; }
.linkchip:hover { border-color: var(--c-accent); }
.sheet.getapp { z-index: 70; } /* above the player: asked for while a game is on */
/* A portrait game without a wide layout of its own: a phone-shaped column in the middle, its cover blurred around it.
   On a phone held upright the column is the whole stage (the width limit is larger than the screen). */
.stage { overflow: hidden; }
.player[data-fit="column"] .stage::before { content: ""; position: absolute; inset: -40px; background: var(--cover, none) center / cover no-repeat; filter: blur(34px) brightness(.36); }
.player[data-fit="column"] .stage iframe { inset: 0; margin: 0 auto; width: min(100%, calc((100dvh - 52px) * .62)); box-shadow: 0 0 60px rgba(0, 0, 0, .6); }

/* ------------------------------------------------------------------ share sheet (when the device has no share sheet of its own) */
.share h3 { margin-top: var(--s-2); padding: 0 40px; }
.nets { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3) 10px; margin: 0 0 var(--s-4); }
.net { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 58px; color: var(--c-text-2); font-size: 12px; font-weight: 700; text-decoration: none; }
.net i { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; color: #fff; font: 800 20px/1 system-ui, sans-serif; font-style: normal; }
.net:hover i { filter: brightness(1.12); }
.net-fb i { background: #1877f2; } .net-fb i::before { content: "f"; }
.net-ms i { background: linear-gradient(45deg, #0a7cff, #a033ff 60%, #ff5c87); } .net-ms i::before { content: "m"; }
.net-wa i { background: #25d366; } .net-wa i::before { content: "W"; }
.net-tg i { background: #29a9eb; } .net-tg i::before { content: "T"; }
.net-x i { background: #000; border: 1px solid var(--c-line-2); } .net-x i::before { content: "X"; }
.share .linkchip { width: 100%; justify-content: space-between; min-height: 46px; padding: 0 6px 0 16px; }
.share .linkchip b { flex: none; padding: 7px 12px; border-radius: var(--r-pill); background: var(--c-surface-2); font-size: 12px; }
