/* Pickle Rocket - theme-aware UI, English only, 44 px tap targets, no overflow.
   Shell v2 (DESIGN-v2.md section 5): phone <= 720 px = bottom tab bar; tablet 721-1100 px = 88 px rail (icon + label);
   desktop > 1100 px = 232 px rail with labels. Tokens live on :root and are shared with screens/screens.css. */
:root {
  color-scheme: dark;
  --bg: #0e1220; --bg2: #151a2b; --card: #1b2134; --card2: #222a40; --line: #687794; --text: #e9edf7; --muted: #aeb8d0;
  --gold: #ffd242; --gold2: #ffb300; --gold-text: #ffd242; --on-accent: #1a1400;
  --ok: #34c759; --ok-text: #34c759; --bad: #ff5a5f; --bad-text: #ff5a5f; --warn: #ffb300; --warn-text: #ffb300; --info: #8bd5ff; --info-text: #8bd5ff;
  --scrim: rgba(6,8,16,.9); --image-scrim: rgba(0,0,0,.86); --title-scrim: rgba(0,0,0,.9); --stage: #05070d; --stage-frame: #262c3f;
  --text-inverse: #fff; --toast: #f1f4fb; --toast-text: #10131f; --blue-badge: #3b9cff; --heart: #ff5b79; --bad-soft: #ffb3b5; --on-bad: #1a1400; --focus: #ffd242; --control-knob: #1a1400; --avatar-bg: #2a3550; --avatar-text: #e9edf7;
  --end-ink: #182033; --end-panel: #fff; --end-accent: #ffd166; --end-accent-ink: #182033; --end-line: rgba(0,0,0,.2); --end-shadow: 0 2px 8px rgba(0,0,0,.22); /* custom end-card defaults, same in both themes */
  --social-telegram: #229ed9; --social-whatsapp: #25d366; --social-x: #000; --social-facebook: #1877f2; --social-x-border: #444;
  --shadow: 0 8px 24px rgba(0,0,0,.35); --topbar: rgba(14,18,32,.94); --tabbar: rgba(14,18,32,.97); --sheet-back: rgba(0,0,0,.62);
  --soft-shadow: 0 4px 12px rgba(255,210,66,.28); --hover-shadow: 0 10px 24px rgba(0,0,0,.4); --phone-inset: #0b0e18; --phone-shadow: 0 20px 40px rgba(0,0,0,.5), inset 0 0 0 2px var(--phone-inset);
  --radius: 14px; --card-radius: 16px; --gap: 14px; --tap: 44px; --gutter: 16px; --content-max: 1280px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px);
  --top-h: 57px; --tab-h: calc(62px + var(--safe-b)); --rail-w: 0px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fb; --bg2: #edf0f6; --card: #fff; --card2: #e5e9f1; --line: #6f798b; --text: #182033; --muted: #596579;
  --gold: #ffd242; --gold2: #e7a900; --gold-text: #805900; --on-accent: #1a1400;
  --ok: #16823a; --ok-text: #126b30; --bad: #c62832; --bad-text: #b71c1c; --warn: #8a5700; --warn-text: #754900; --info: #005da8; --info-text: #005da8;
  --scrim: rgba(20,28,44,.55); --image-scrim: rgba(0,0,0,.86); --title-scrim: rgba(0,0,0,.9); --stage: #05070d; --stage-frame: #262c3f;
  --text-inverse: #fff; --toast: #fff; --toast-text: #182033; --blue-badge: #0060aa; --heart: #c2183a; --bad-soft: #b71c1c; --on-bad: #fff; --focus: #005da8; --control-knob: #fff; --avatar-bg: #e1e7f0; --avatar-text: #182033;
  --social-telegram: #0876a9; --social-whatsapp: #087c39; --social-x: #000; --social-facebook: #1258b2; --social-x-border: #444;
  --shadow: 0 8px 24px rgba(25,38,62,.14); --topbar: rgba(245,247,251,.94); --tabbar: rgba(245,247,251,.97); --sheet-back: rgba(20,28,44,.55);
  --soft-shadow: 0 4px 12px rgba(126,93,0,.16); --hover-shadow: 0 10px 24px rgba(25,38,62,.18); --phone-inset: #cbd3e0; --phone-shadow: 0 20px 40px rgba(25,38,62,.24), inset 0 0 0 2px var(--phone-inset);
}
* { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
html { font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; padding-left: var(--rail-w); }
img, svg, video, iframe { max-width: 100%; display: block; }
a { color: var(--info-text); text-decoration: none; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.2; overflow-wrap: anywhere; }
h1 { font-size: clamp(22px, 2.6vw, 30px); } h2 { font-size: 18px; } h3 { font-size: 15px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
p { margin: 0 0 10px; overflow-wrap: anywhere; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; top: 8px; left: calc(var(--rail-w) + 8px); z-index: 80; padding: 10px 14px; border-radius: 10px; background: var(--gold); color: var(--on-accent); font-weight: 800; opacity: 0; pointer-events: none; }
.skip:focus { opacity: 1; pointer-events: auto; outline: 2px solid var(--info-text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
iframe:focus, .game-frame:focus { outline: 2px solid var(--focus); outline-offset: -3px; } /* a focused game frame keeps a visible ring (a11y gate) */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--topbar); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: var(--safe-t); }
.top-in { max-width: var(--content-max); margin: 0 auto; padding: 6px max(var(--gutter), var(--safe-r)) 6px max(var(--gutter), var(--safe-l)); display: flex; align-items: center; gap: 6px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; min-height: var(--tap); flex: 0 1 auto; min-width: 0; color: var(--text); }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand-sub { color: var(--gold-text); font-weight: 800; font-size: 15px; white-space: nowrap; letter-spacing: .01em; }
.tools { display: flex; gap: 4px; align-items: center; margin-inline-start: auto; }
.icon-btn { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--bg2); }
.icon-btn svg, .tabbar svg, .rail svg, .menu-item svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.avatar-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.avatar-btn .av { width: 36px; height: 36px; }
.avatar-btn:hover .av, .avatar-btn[aria-expanded="true"] .av { box-shadow: 0 0 0 2px var(--gold); }
.count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: var(--on-bad); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; pointer-events: none; }
.top-search { position: relative; display: none; flex: 1 1 200px; max-width: 420px; margin: 0 8px; }
.top-search input[type="search"] { width: 100%; min-height: var(--tap); padding: 8px 44px 8px 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-size: 15px; }
.top-search input::placeholder { color: var(--muted); }
.top-search input[type="search"]:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--gold-text); }
.top-search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.top-search-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.top-search-key { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); font: 700 12px/18px ui-monospace, Consolas, monospace; pointer-events: none; }
.top-search:focus-within .top-search-key { display: none; }
#menuBtn { margin-left: -6px; }
#menuBtn { display: none; }
body[data-screen="home"] #menuBtn { display: inline-flex; }

/* ---------- tab bar (phone) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--tab-h); padding: 0 var(--safe-r) var(--safe-b) var(--safe-l); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--tabbar); border-top: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1; min-height: var(--tap); -webkit-tap-highlight-color: transparent; transition: color .15s ease-out; }
.tabbar a:hover { color: var(--text); }
.tabbar a > svg { margin: 2px 0; }   /* 24 px icon in a 28 px box = the Create pill's height, so all five labels share one baseline */
.tabbar a.active { color: var(--gold-text); }
.tabbar a.active svg { stroke-width: 2.3; }
.tabbar a[data-tab="play"].active svg path { fill: currentColor; }
.tabbar a::before { content: ""; position: absolute; top: 0; left: 50%; width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); transform: translateX(-50%) scaleX(0); transition: transform .18s ease-out; }
.tabbar a.active::before { transform: translateX(-50%) scaleX(1); }
.create-ic { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 28px; border-radius: 10px; background: var(--gold); color: var(--on-accent); box-shadow: var(--soft-shadow); transition: transform .15s ease-out; }
.create-ic svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.6; }
.tabbar a.create.active .create-ic { background: var(--gold2); transform: translateY(-1px); }
.tabbar a.create.active::before { display: none; }
.tabbar .count { top: 4px; right: calc(50% - 26px); }
.tabbar a:focus-visible { outline-offset: -3px; }

/* ---------- side rail (tablet + desktop) ---------- */
.rail { display: none; position: fixed; top: 0; bottom: 0; left: 0; z-index: 31; width: var(--rail-w); padding: calc(10px + var(--safe-t)) 10px calc(12px + var(--safe-b)) calc(10px + var(--safe-l)); flex-direction: column; gap: 6px; background: var(--bg2); border-right: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-brand { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; margin-bottom: 8px; border-radius: 12px; color: var(--gold-text); font-weight: 800; font-size: 17px; white-space: nowrap; }
.rail-brand img { width: 36px; height: 36px; border-radius: 10px; flex: 0 0 36px; }
.rail-nav { display: flex; flex-direction: column; gap: 4px; }
.rail-nav a, .rail-install { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 15px; white-space: nowrap; cursor: pointer; transition: background .15s ease-out, color .15s ease-out; }
.rail-nav a:hover, .rail-install:hover { background: var(--card2); color: var(--text); }
.rail-nav a.active { color: var(--gold-text); background: var(--card2); }
.rail-nav a.active svg { stroke-width: 2.3; }
.rail-nav a[data-tab="play"].active svg path { fill: currentColor; }
.rail-nav .create-ic { width: 30px; height: 30px; }
.rail-nav .count { position: static; margin-inline-start: auto; }
.rail-sep { width: 100%; height: 1px; margin: 8px 0; border: 0; background: var(--line); }
.rail-foot { margin-top: auto; padding: 8px 4px 0; font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.rail-nav a > span:not(.count):not(.create-ic), .rail-install > span, .rail-brand > span { display: none; }

/* ---------- layout ---------- */
body { padding-bottom: var(--tab-h); }
main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 18px max(var(--gutter), var(--safe-r)) 32px max(var(--gutter), var(--safe-l)); }
#view[hidden], #screens[hidden] { display: none !important; }
body[data-screen] main { max-width: none; padding: 0; }
body[data-screen] footer { display: none; }
footer { padding: 14px var(--gutter) calc(14px + var(--safe-b)); text-align: center; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.page-head h1 { flex: 1 1 200px; margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: var(--gap); }
.stack > * + * { margin-top: var(--gap); }
.cols { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 960px) { .cols { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grid-2 { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- breakpoints: phone <= 720, tablet 721-1100, desktop > 1100 ---------- */
@media (max-width: 720px) {
  body[data-screen="play"] .top { display: none; }
  .wide-only { display: none !important; }
  .tools .btn.primary { padding-inline: 12px; }
}
@media (min-width: 721px) {
  :root { --tab-h: 0px; --rail-w: 88px; }
  .tabbar { display: none; }
  .rail { display: flex; }
  .phone-only, #menuBtn.wide-hide { display: none !important; }
  .top-search { display: block; }
  .top-in { min-height: 64px; gap: 8px; }
  .brand img { width: 34px; height: 34px; }
  .rail { padding-left: calc(8px + var(--safe-l)); padding-right: 8px; }
  .rail-nav a, .rail-install { width: 72px; margin: 0 auto; flex-direction: column; gap: 3px; min-height: 56px; padding: 6px 2px; font-size: 11px; line-height: 1; }
  .rail-nav a > span:not(.count):not(.create-ic), .rail-install > span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail-nav .count { position: absolute; top: 4px; right: 6px; margin: 0; }
  .rail-foot { display: none; }
}
@media (min-width: 721px) and (max-width: 1100px) { .brand img { display: none; } }
@media (min-width: 1101px) {
  :root { --rail-w: 232px; }
  .brand { display: none; }
  .top-search { margin-left: 0; }
  .rail { padding-left: calc(14px + var(--safe-l)); padding-right: 14px; }
  .rail-brand { justify-content: flex-start; padding: 0 8px; }
  .rail-brand > span { display: inline; }
  .rail-nav a, .rail-install { width: auto; margin: 0; flex-direction: row; gap: 12px; min-height: 48px; justify-content: flex-start; padding: 0 12px; font-size: 15px; line-height: normal; }
  .rail-nav a > span:not(.count):not(.create-ic), .rail-install > span { display: inline; max-width: none; overflow: visible; }
  .rail-nav .count { position: static; margin-inline-start: auto; }
  .rail-foot { display: block; }
}
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.page-head h1 { flex: 1 1 200px; margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: var(--gap); }
.stack > * + * { margin-top: var(--gap); }
.cols { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 960px) { .cols { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grid-2 { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- controls ---------- */
button, .btn { font: inherit; }
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 8px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card2); color: var(--text); font-weight: 600; cursor: pointer; text-align: center; overflow-wrap: anywhere; }
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--gold); border-color: var(--gold-text); color: var(--on-accent); font-weight: 800; }
.btn.primary:hover { background: var(--gold2); }
.btn.big { min-height: 52px; font-size: 17px; padding-inline: 24px; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: var(--bad-text); color: var(--bad-text); background: transparent; }
.btn.icon { width: var(--tap); padding: 0; flex: 0 0 var(--tap); }
label.field { display: block; margin-bottom: 12px; }
label.field > span, .field-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], input[type="search"], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; }
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--gold-text); }
input[type="range"] { width: 100%; min-height: var(--tap); accent-color: var(--gold-text); margin: 0; }
input[type="color"] { width: var(--tap); height: var(--tap); padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); flex: 0 0 var(--tap); cursor: pointer; }
.seg { display: inline-flex; gap: 4px; background: var(--bg2); padding: 3px; border-radius: 12px; border: 1px solid var(--line); max-width: 100%; }
.seg .btn { border: 0; background: transparent; min-height: var(--tap); padding: 6px 14px; }
.lnk { display: inline-flex; align-items: center; min-height: var(--tap); padding: 4px 6px; margin: -4px -6px; border-radius: 8px; color: var(--info-text); }
.lnk:hover { background: var(--bg2); }
.seg .btn.on { background: var(--card2); color: var(--gold-text); }
.switch { display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); cursor: pointer; font-weight: 600; }
.switch .knob { width: 40px; height: 24px; border-radius: 999px; background: var(--line); position: relative; flex: 0 0 40px; transition: background .15s; }
.switch .knob::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--control-knob); transition: transform .15s; }
.switch[aria-checked="true"] .knob { background: var(--ok); }
.switch[aria-checked="true"] .knob::after { transform: translateX(16px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.chip.ok { border-color: var(--ok); color: var(--ok-text); } .chip.bad { border-color: var(--bad-text); color: var(--bad-text); } .chip.warn { border-color: var(--warn); color: var(--warn); }
button.chip { min-height: var(--tap); cursor: pointer; text-align: start; }
button.chip:hover { border-color: var(--gold-text); }
.alert { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); overflow-wrap: anywhere; }
.alert.bad { border-color: var(--bad); color: var(--bad-soft); } .alert.ok { border-color: var(--ok); } .alert.info { border-color: var(--info-text); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg2); border: 1px solid var(--line); white-space: nowrap; }
.badge.done { color: var(--ok-text); border-color: var(--ok); } .badge.failed { color: var(--bad-text); border-color: var(--bad-text); } .badge.running, .badge.queued { color: var(--gold-text); border-color: var(--gold-text); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.running .dot { animation: blink 1s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- auth ---------- */
.auth { max-width: 440px; margin: 4vh auto 0; }
.auth .brand-big { text-align: center; margin-bottom: 18px; }
.auth .brand-big img { height: 56px; margin: 0 auto 8px; }
.auth .seg { display: flex; margin-bottom: 16px; } .auth .seg .btn { flex: 1; min-height: var(--tap); }

/* ---------- dashboard ---------- */
.search { flex: 1 1 220px; max-width: 420px; }
.jobs { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 720px) { .jobs { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.job-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); box-shadow: var(--shadow); min-height: var(--tap); }
.job-card:hover { border-color: var(--gold-text); }
.job-card .thumb { aspect-ratio: 9 / 16; background: var(--bg2) center / cover no-repeat; position: relative; }
.job-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.job-card .thumb .badge { position: absolute; top: 8px; inset-inline-start: 8px; }
.job-card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.job-card .title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.empty { text-align: center; padding: 40px 16px; }
.empty .btn { margin-top: 14px; }

/* ---------- job page ---------- */
.progress { height: 12px; border-radius: 999px; background: var(--bg2); overflow: hidden; border: 1px solid var(--line); }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--gold2), var(--gold)); width: 0; transition: width .4s ease; border-radius: 999px; }
.phone-wrap { display: flex; justify-content: center; padding: 6px 0; }
.phone { position: relative; width: min(100%, 360px); aspect-ratio: 390 / 844; border-radius: 34px; background: var(--stage); border: 8px solid var(--stage-frame); box-shadow: var(--phone-shadow); overflow: hidden; }
.phone.landscape { width: min(100%, 760px); aspect-ratio: 844 / 390; }
.phone iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--stage); }
.phone .notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 34%; height: 18px; background: var(--stage-frame); border-radius: 0 0 14px 14px; z-index: 2; pointer-events: none; }
.phone.landscape .notch { display: none; }
.meta-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 14px; }
.meta-list dt { color: var(--muted); } .meta-list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .meta-list { grid-template-columns: 1fr; gap: 2px; } .meta-list dd { margin-bottom: 8px; } }

/* ---------- admin tables ---------- */
.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tbl a { color: var(--info-text); }
.admin-tabs, .admin-bar { margin-bottom: 14px; } .admin-bar .admin-tabs { margin-bottom: 0; }
.tbl th.n, .tbl td.n { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 719px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin-bottom: 10px; background: var(--bg2); }
  .tbl td { border: 0; padding: 4px 0; display: flex; gap: 10px; }
  .tbl td::before { content: attr(data-l); color: var(--muted); flex: 0 0 90px; font-size: 12px; text-transform: uppercase; }
}

/* =====================================================================================
   Social platform (feed, game page, discover, profile, inbox, stats, sheets)
   ===================================================================================== */
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.alert.warn { border-color: var(--warn); color: var(--warn-text); }
.center { text-align: center; margin: 12px 0 0; }
.row.split { justify-content: space-between; margin-top: 12px; }
.code-input { font-size: 26px; letter-spacing: 10px; text-align: center; font-family: ui-monospace, Consolas, monospace; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.4; }
.auth .brand-big img { width: auto; }
.av { border-radius: 50%; object-fit: cover; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; color: var(--text-inverse); font-weight: 800; line-height: 1; background: var(--card2); }
.av[style*="background"] { background: var(--avatar-bg) !important; color: var(--avatar-text) !important; }
.vbadge { display: inline-flex; width: 16px; height: 16px; flex: 0 0 16px; margin-inline-start: 3px; vertical-align: -2px; }
.vbadge svg { width: 16px; height: 16px; fill: var(--blue-badge); stroke: none; }
.vbadge .tick { fill: none; stroke: var(--text-inverse); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
h1 .vbadge, h1 .vbadge svg { width: 22px; height: 22px; flex-basis: 22px; }
.toast { position: fixed; left: calc(50% + var(--rail-w) / 2); transform: translateX(-50%); bottom: calc(var(--tab-h) + 16px); z-index: 60; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: var(--toast); color: var(--toast-text); font-weight: 600; box-shadow: var(--shadow); pointer-events: none; text-align: center; }
.chip-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 0 16px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px; white-space: nowrap; }
.chip-link.on, .chip-link:hover { border-color: var(--gold-text); color: var(--gold-text); }
@keyframes pmFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- sheet (dialog) ---------- */
body.sheet-open { overflow: hidden; }
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-back { position: absolute; inset: 0; background: var(--sheet-back); animation: pmFade .15s ease; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 88dvh; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: var(--shadow); padding-bottom: env(safe-area-inset-bottom); animation: pmFade .15s ease; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; }
.sheet-body { overflow-y: auto; padding: 14px 18px 18px; }
@media (min-width: 720px) { .sheet-wrap { align-items: center; padding: 24px; } .sheet { border-radius: 18px; max-height: 84dvh; } }
.share-game { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.share-game img { width: 48px; height: 85px; object-fit: cover; border-radius: 8px; flex: 0 0 48px; }
.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.share-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: var(--tap); text-align: center; }
.share-btn:hover { border-color: var(--gold-text); }
.sico { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; color: var(--text-inverse); background: var(--card2); }
.sico svg { width: 22px; height: 22px; fill: none; stroke: var(--text-inverse); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sico.telegram { background: var(--social-telegram); } .sico.whatsapp { background: var(--social-whatsapp); } .sico.x { background: var(--social-x); border: 1px solid var(--social-x-border); } .sico.facebook { background: var(--social-facebook); } .sico.native { background: var(--gold); } .sico.native svg { stroke: var(--on-accent); }
#embedCode { min-height: 84px; resize: none; }
.reasons { border: 0; padding: 0; margin: 0 0 10px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 6px; border-radius: 10px; cursor: pointer; }
.radio:hover { background: var(--bg2); }
.radio input { width: 20px; height: 20px; accent-color: var(--gold-text); margin: 0; flex: 0 0 20px; }

/* ---------- feed ---------- */
body.feed-mode { overflow: hidden; height: 100dvh; }
body.feed-mode main { max-width: none; padding: 0; }
body.feed-mode footer { display: none; }
.feed { --feed-h: calc(100dvh - var(--top-h) - var(--tab-h)); height: var(--feed-h); display: flex; flex-direction: column; }
.feed-tabs, .ptabs { flex: 0 0 52px; display: flex; justify-content: center; align-items: center; gap: 4px; padding: 4px var(--gutter); }
.ftab { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap); padding: 0 16px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 15px; white-space: nowrap; }
.ftab:hover { color: var(--text); }
.ftab.on { color: var(--text); background: var(--card2); box-shadow: inset 0 -2px 0 var(--gold); }
.feed-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scroll-snap-type: y mandatory; overscroll-behavior-y: contain; scrollbar-width: none; outline: none; }
.feed-scroll::-webkit-scrollbar { display: none; }
.feed-msg { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 24px var(--gutter); }
.fcard { height: calc(var(--feed-h) - 52px); scroll-snap-align: start; scroll-snap-stop: always; display: grid; grid-template-columns: minmax(0, 1fr) 52px; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; padding: 2px 10px 10px; }
.fstage, .gstage { position: relative; overflow: hidden; background: var(--stage); border: 1px solid var(--line); }
.fstage { grid-column: 1; grid-row: 1; border-radius: 16px; }
.fstage .poster, .gstage .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; }
.flevel { position: absolute; left: 12px; top: 12px; z-index: 2; display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--image-scrim); font-size: 13px; font-weight: 700; color: var(--text-inverse); }
.frail { grid-column: 2; grid-row: 1; align-self: end; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ritem { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.rbtn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--card2); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.rbtn:hover { border-color: var(--muted); }
.rbtn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rbtn.on { color: var(--heart); } .rbtn.on svg { fill: currentColor; }
.rbtn[data-act="fav"].on { color: var(--gold-text); }
.rcount { font-size: 12px; font-weight: 700; color: var(--muted); min-height: 16px; line-height: 16px; white-space: nowrap; }
.finfo { grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; gap: 10px; min-height: 48px; }
.finfo-av { flex: 0 0 44px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.ftext { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; min-height: var(--tap); color: var(--text); }
.ftitle { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmeta { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.btn.follow { flex: 0 0 auto; min-width: 96px; padding: 6px 14px; }
.btn.follow.on { background: transparent; color: var(--text); border-color: var(--line); }
@media (min-width: 900px) {
  .fcard { grid-template-columns: min(calc((var(--feed-h) - 52px - 86px) * 0.5625), 480px) 64px; justify-content: center; column-gap: 16px; padding: 2px 16px 16px; }
  .rbtn { width: 52px; height: 52px; }
}
@media (max-height: 600px) { .frail { gap: 2px; } .rcount { display: none; } }

/* ---------- game end overlay ---------- */
.endov { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: var(--scrim); padding: 12px; animation: pmFade .2s ease; }
.endbox { width: 100%; max-width: 300px; text-align: center; padding: 18px 14px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.endtitle { font-size: 30px; font-weight: 900; color: var(--gold-text); line-height: 1.1; }
.endscore { color: var(--text); margin: 6px 0 0; }
.endsub { color: var(--muted); font-weight: 700; margin: 4px 0 0; }
.endgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.endgrid .btn { flex-direction: column; gap: 4px; min-height: 66px; padding: 8px; }
.endgrid .btn svg { width: 22px; height: 22px; }
.endgrid .btn.wide { grid-column: 1 / -1; }
.endgrid .btn.on { color: var(--heart); } .endgrid .btn.on svg { fill: currentColor; }

/* Games with their own PS.cards art only need a small controls bar below that art. */
.endov.endov-custom { inset: var(--end-top, 0px) 0 0; padding: 6px; align-items: flex-end; background: transparent; animation: none; pointer-events: none; }
.endov-custom .endbox-custom { width: 100%; max-width: none; padding: 0; display: flex; justify-content: center; background: transparent; border: 0; border-radius: 0; box-shadow: none; color: var(--end-ink); pointer-events: none; }
.endov-custom .endgrid { width: 100%; max-width: 460px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; pointer-events: auto; }
.endov-custom .endgrid .btn { flex: 1 1 auto; min-width: 68px; min-height: 44px; padding: 6px 9px; flex-direction: row; gap: 5px; border: 1px solid var(--end-line); border-radius: var(--end-radius, 12px); background: var(--end-panel); color: var(--end-ink); box-shadow: var(--end-shadow); font-family: var(--end-font, inherit); font-size: 12px; line-height: 1.1; white-space: nowrap; }
.endov-custom .endgrid .btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.endov-custom .endgrid .btn.end-primary { border-color: transparent; background: var(--end-accent); color: var(--end-accent-ink); font-weight: 800; }
.endov-custom .endgrid .btn.end-secondary { background: var(--end-panel); color: var(--end-ink); }
.endov-custom .endgrid .btn.on { color: var(--end-ink); }
.endov-custom .endgrid .btn.on svg { fill: currentColor; }
.endov-custom.endov-compact .endgrid { flex-wrap: nowrap; gap: 4px; }
.endov-custom.endov-compact .endgrid .btn { flex: 0 0 auto; min-width: 44px; min-height: var(--end-compact-height, 44px); height: var(--end-compact-height, 44px); padding: 0 5px; overflow: hidden; font-size: clamp(0px, calc(var(--end-compact-height, 44px) * .2), 12px); }
.endov-custom.endov-compact .endgrid .btn svg { width: min(18px, max(0px, calc(var(--end-compact-height, 44px) - 4px))); height: min(18px, max(0px, calc(var(--end-compact-height, 44px) - 4px))); }
.endov-custom.endov-compact .endgrid .btn span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.endov.endov-custom.endov-compact { padding: 2px 4px; }
.endov-custom.endov-no-space { padding: 2px 4px; }
@media (max-width: 390px) {
  .endov.endov-custom { padding: 4px; }
  .endov-custom .endgrid { gap: 4px; }
  .endov-custom .endgrid .btn { min-width: 62px; min-height: 44px; padding: 5px 6px; gap: 4px; font-size: 11px; }
  .endov-custom .endgrid .btn svg { width: 16px; height: 16px; }
}
@media (max-height: 440px) {
  .endov.endov-custom { padding: 3px; }
  .endov-custom .endgrid { gap: 3px; }
  .endov-custom .endgrid .btn { min-width: 58px; min-height: 44px; padding: 4px 6px; gap: 3px; font-size: 10px; }
  .endov-custom .endgrid .btn svg { width: 14px; height: 14px; }
}

/* ---------- game page ---------- */
.gpage { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.gstage { width: 100%; height: min(72dvh, 640px); border-radius: 18px; }
.gstage .poster.dim { opacity: .35; }
.stage-note { position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 12px; border-radius: 12px; background: var(--image-scrim); text-align: center; font-weight: 700; }
.ginfo > * + * { margin-top: 14px; }
.gtitle { font-size: clamp(24px, 3vw, 34px); margin: 0; }
.creator-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.creator { display: flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--text); flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.creator > span { min-width: 0; overflow-wrap: anywhere; }
.gactions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.act.on { color: var(--heart); border-color: var(--heart); } .btn.act.on svg { fill: currentColor; }
.btn.act[data-act="fav"].on { color: var(--gold-text); border-color: var(--gold-text); }
.btn.icon-only { width: var(--tap); padding: 0; }
.gstats { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; }
.gstats strong { color: var(--text); }
.gdesc { white-space: pre-wrap; }
.more h2 { margin-bottom: 12px; }
@media (min-width: 960px) {
  .gpage { grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 28px; align-items: start; }
  .gstage-col { position: sticky; top: calc(var(--top-h) + 16px); }
  .gstage { height: min(calc(100dvh - var(--top-h) - 40px), 720px); }
}

/* ---------- comments ---------- */
.cmt-top h2 { margin: 0 0 10px; }
.cmt-gate { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); margin-bottom: 12px; }
.cmt-form { margin-bottom: 12px; }
.cmt-row { display: flex; gap: 8px; align-items: flex-end; }
.cmt-row textarea { min-height: var(--tap); height: var(--tap); resize: none; padding: 10px 12px; flex: 1 1 auto; line-height: 1.4; }
.cmt-err { margin-top: 8px; }
.replying { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cmt-list, .replies { list-style: none; margin: 0; padding: 0; }
.cmt { display: flex; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.cmt-list > .cmt:first-child { border-top: 0; }
.replies { margin-top: 2px; }
.replies .cmt { border-top: 0; padding: 6px 0 0; }
.cmt.deleted .cbody { padding: 4px 0; }
.cmt.is-hidden { opacity: .6; }
.cav { flex: 0 0 44px; display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; }
.cbody { flex: 1 1 auto; min-width: 0; }
.chead { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 14px; min-height: 22px; }
.ctext { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cacts { display: flex; flex-wrap: wrap; gap: 2px; margin-inline-start: -10px; }
.cbtn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: var(--tap); min-height: var(--tap); padding: 0 10px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; }
.cbtn:hover { background: var(--bg2); color: var(--text); }
.cbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cbtn.on { color: var(--heart); } .cbtn.on svg { fill: currentColor; }
.cmt-sheet .sheet-body { padding-top: 6px; }
.cmt-sheet .cmt-top { display: none; }

/* ---------- tiles ---------- */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; } }
.tile { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--text); min-height: var(--tap); }
.tile:hover { border-color: var(--gold-text); }
.tcover { position: relative; aspect-ratio: 9 / 16; background: var(--bg2); }
.tcover img { width: 100%; height: 100%; object-fit: cover; }
.tplays, .tflag, .tlevel { position: absolute; display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: var(--image-scrim); font-size: 12px; font-weight: 700; color: var(--text-inverse); }
.tplays { left: 8px; bottom: 8px; }
.tflag { left: 8px; top: 8px; background: var(--gold); color: var(--on-accent); }
.tlevel { right: 8px; top: 8px; }
.tplays svg, .tstats svg { width: 13px; height: 13px; fill: currentColor; stroke: none; flex: 0 0 13px; }
.tbody { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ttitle { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmeta { font-size: 12px; color: var(--muted); display: flex; align-items: center; overflow: hidden; white-space: nowrap; }
.tstats { display: flex; gap: 10px; font-size: 12px; color: var(--muted); align-items: center; min-width: 0; }
.tstats span { display: inline-flex; align-items: center; gap: 3px; }
.tstats .tgenre { margin-inline-start: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ---------- discover ---------- */
.searchbar { display: flex; gap: 8px; margin-bottom: 12px; }
.searchbar input { flex: 1 1 auto; }
.genres { margin-bottom: 18px; }
#dres section { margin-bottom: 26px; }
#dres h2 { margin-bottom: 12px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sec-head h2 { margin: 0 !important; }
.creators { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.creator-card { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }

/* ---------- profile ---------- */
.profile .phead { display: flex; align-items: center; gap: 16px; }
.pname { min-width: 0; }
.pname h1 { display: flex; align-items: center; gap: 4px; margin: 0; flex-wrap: wrap; overflow-wrap: anywhere; }
.pbio { margin: 12px 0 0; white-space: pre-wrap; }
.pstats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 16px 0 12px; text-align: center; }
.pstats div { display: flex; flex-direction: column; padding: 8px 2px; border-radius: 12px; background: var(--bg2); min-width: 0; }
.pstats strong { font-size: 18px; } .pstats span { font-size: 12px; color: var(--muted); }
@media (max-width: 519px) { .pstats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ptabs { justify-content: flex-start; padding: 0; margin: 18px 0 12px; }
.profile .alert { margin-top: 12px; }

/* ---------- inbox ---------- */
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.note { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--text); min-height: 64px; }
.note:hover { border-color: var(--muted); }
.note.unread { border-color: var(--gold-text); background: var(--card2); }
.note-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.note-quote { display: block; color: var(--muted); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-time { display: block; }
.note-thumb { flex: 0 0 36px; width: 36px; height: 64px; object-fit: cover; border-radius: 6px; }

/* ---------- stats ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; }
.kpi strong { font-size: 24px; } .kpi span { color: var(--muted); font-size: 13px; }
.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 24px; vertical-align: middle; }
.spark i { width: 6px; background: var(--gold); border-radius: 2px; display: block; }

/* ---------- settings ---------- */
.av-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.handle-in { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); }
.handle-in span { padding-inline-start: 12px; color: var(--muted); font-weight: 700; }
.handle-in input { border: 0; background: transparent; }
.handle-in:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.handle-in input:focus { outline: none; }
label.field > em { display: block; margin-top: 6px; font-style: normal; overflow-wrap: anywhere; }

/* ---------- admin moderation ---------- */
.rep-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rep { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); padding: 10px 12px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
@media (min-width: 900px) { .rep { grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) auto; align-items: center; } }
.rep-target { display: flex; gap: 10px; align-items: center; color: var(--text); min-height: var(--tap); min-width: 0; }
.rep-target img { width: 40px; height: 71px; object-fit: cover; border-radius: 6px; flex: 0 0 40px; }
.rep-body { overflow-wrap: anywhere; }
.rep-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.searchbar .btn, .cmt-row .btn, .btn.follow, .page-head .btn, .sec-head .btn { flex-shrink: 0; white-space: nowrap; overflow-wrap: normal; }
.ginfo .btn.block { max-width: 420px; }

/* ---------- shell v2: drawer, account menu ---------- */
.sheet-wrap.sheet-left { align-items: stretch; justify-content: flex-start; padding: 0; }
.sheet-left .sheet { width: min(320px, 86vw); max-width: none; max-height: none; height: 100%; border-radius: 0 18px 18px 0; border-left: 0; padding-top: var(--safe-t); padding-left: var(--safe-l); animation: pmSlideIn .2s ease-out; }
.sheet-left .sheet-body { padding: 10px 12px calc(16px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; }
@keyframes pmSlideIn { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-user, .menu-user { display: flex; align-items: center; gap: 12px; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.drawer-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.drawer-user-text strong, .drawer-user-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-list { display: flex; flex-direction: column; gap: 2px; }
.menu-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: inherit; font-weight: 600; font-size: 15px; text-align: start; cursor: pointer; white-space: nowrap; }
.menu-item:hover { background: var(--card2); }
.menu-item svg { color: var(--muted); }
.menu-item .count { position: static; margin-inline-start: auto; }
.drawer-note { margin: auto 0 0; padding: 12px 12px 0; border-top: 1px solid var(--line); }
.menu-pop { position: fixed; top: calc(var(--top-h) + 4px); right: max(var(--gutter), var(--safe-r)); z-index: 55; width: min(300px, calc(100vw - 32px)); padding: 6px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; animation: pmFade .15s ease-out; }
.menu-pop .menu-user { padding: 6px 8px 10px; }
.menu-pop { max-height: calc(100dvh - var(--top-h) - 12px - var(--safe-b)); overflow-y: auto; overscroll-behavior: contain; }
.sheet-body { overscroll-behavior: contain; }
.appearance-control { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.appearance-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.appearance-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.appearance-choice { min-width: 0; min-height: var(--tap); padding: 6px 4px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.appearance-choice[aria-pressed="true"] { background: var(--card); color: var(--gold-text); box-shadow: var(--shadow); }
.appearance-choice:focus-visible { outline: 2px solid var(--info-text); outline-offset: -2px; }
/* short landscape (phone rotated, 844x390 and the like): compact rail, Play goes full-bleed, menus fit the height */
@media (min-width: 721px) and (max-height: 560px) {
  .rail { gap: 2px; padding-top: calc(6px + var(--safe-t)); padding-bottom: calc(6px + var(--safe-b)); }
  .rail-brand { min-height: var(--tap); margin-bottom: 2px; }
  .rail-brand img { width: 30px; height: 30px; flex-basis: 30px; }
  .rail-nav { gap: 2px; }
  .rail-nav a, .rail-install { min-height: 44px; padding: 3px 2px; gap: 2px; }
  .rail-sep, .rail-sec, .rail-foot { display: none; }   /* Discover = top search, Inbox = bell, projects/admin = Profile menu */
  body[data-screen="play"] .top { display: none; }
}
/* wide screens with little height (844x390 phone landscape, small laptops): the account menu goes 3 columns and the Appearance row goes inline, so every control shows without scrolling */
@media (min-width: 721px) and (max-height: 700px) {
  .menu-pop { width: min(640px, calc(100vw - var(--rail-w) - 32px)); gap: 2px; }
  .menu-pop .menu-user { padding: 4px 8px 6px; margin-bottom: 0; }
  .menu-pop .menu-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 6px; }
  .menu-pop .menu-item { min-height: 44px; }
  .menu-pop .appearance-control { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 8px; }
  .menu-pop .appearance-options { flex: 0 1 320px; }
}
/* short screens (320x568 phones, 844x390 landscape): the drawer must show every item and the Appearance control without scrolling; below that it still scrolls inside the viewport */
@media (max-height: 640px) {
  .sheet-left .sheet-head { padding-top: 0; padding-bottom: 0; }
  .sheet-left .sheet-body { padding-top: 4px; padding-bottom: calc(4px + var(--safe-b)); gap: 2px; }
  .sheet-left .menu-list { gap: 0; }
  .sheet-left .menu-item { min-height: 44px; }
  .sheet-left .drawer:has(.drawer-user) .menu-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
  .sheet-left .drawer:has(.drawer-user) .menu-item { min-width: 0; gap: 6px; padding: 0 6px; font-size: 14px; white-space: normal; }
  .sheet-left .drawer:has(.drawer-user) .menu-item svg { width: 20px; height: 20px; }
  .drawer-user { padding: 2px 10px 4px; margin-bottom: 0; }
  .drawer-user .av { width: 36px !important; height: 36px !important; font-size: 15px !important; }
  .sheet-left .appearance-control { padding: 3px 8px; }
  .sheet-left .appearance-options { padding: 2px; }
  .sheet-left .appearance-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* still named for assistive tech by the group's aria-label */
  .drawer-note { display: none; }   /* the mode note is also in the footer / rail; the items come first on a short phone */
}

/* ---------- short viewports: the share sheet shows every control without scrolling ---------- */
@media (max-height: 640px) {
  .sheet { max-height: 94dvh; }
  .share-sheet .share-game { margin-bottom: 10px; }
  .share-sheet .share-game img { width: 40px; height: 56px; flex-basis: 40px; }
  .share-sheet .share-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
  .share-sheet .share-btn { flex-direction: row; justify-content: flex-start; gap: 8px; padding: 4px 8px; }
  .share-sheet .sico { width: 32px; height: 32px; font-size: 14px; }
  .share-sheet .sico svg { width: 18px; height: 18px; }
  .share-sheet label.field:has(#embedCode) { display: none; }   /* "Copy embed code" still copies it */
}
@media (min-width: 721px) and (max-height: 560px) {
  .sheet-wrap { padding: 12px; }
  .sheet { max-height: calc(100dvh - 24px); }
  .share-sheet { max-width: 640px; }
  .share-sheet .share-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.share-sheet label.field { display: none; }   /* Copy link / Copy embed code buttons cover both fields */
}

/* ---------- settings and legal entry points ---------- */
.settings-section { margin-top: 14px; }
.settings-section > p { margin: 6px 0 12px; }
.pm-setting-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; cursor: pointer; }
.pm-setting-toggle > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.pm-setting-toggle + .pm-setting-toggle { border-top: 1px solid var(--line); }
.pm-setting-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pm-setting-switch { position: relative; flex: 0 0 54px; width: 54px; height: 32px; border: 2px solid var(--line); border-radius: 999px; background: var(--card2); transition: background-color .15s ease, border-color .15s ease; }
.pm-setting-switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform .15s ease; }
.pm-setting-toggle input:checked + .pm-setting-switch { background: var(--gold); border-color: var(--gold-text); }
.pm-setting-toggle input:checked + .pm-setting-switch::after { background: var(--on-accent); transform: translateX(22px); }
.pm-setting-toggle input:focus-visible + .pm-setting-switch { outline: 3px solid var(--focus); outline-offset: 3px; }
.pm-setting-actions, .pm-sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pm-setting-actions > * { flex: 1 1 180px; }
.pm-delete-sheet, .pm-feedback-sheet { max-width: 500px; }
.pm-delete-sheet form > p, .pm-feedback-sheet form > p { margin: 2px 0 14px; }
.pm-sheet-actions { justify-content: flex-end; margin-top: 14px; }
.pm-feedback-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; margin: -4px 0 12px; }
.pm-about-name { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.pm-legal-links, .auth-legal-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.pm-legal-links a, .auth-legal-links a { display: inline-flex; align-items: center; min-width: var(--tap); min-height: var(--tap); color: var(--info-text); font-weight: 700; text-underline-offset: 3px; }
.pm-legal-links a:focus-visible, .auth-legal-links a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.auth-legal-links { justify-content: center; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
/* drawer + account menu: Privacy / Terms / Support as one compact row under Appearance (44 px targets) */
.menu-legal { justify-content: center; gap: 0 18px; padding: 0 8px; border-top: 1px solid var(--line); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .pm-setting-switch, .pm-setting-switch::after { transition: none; } }

/* mature content */
.mature-badge { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; padding: 2px 6px; min-width: 30px; border: 1px solid var(--warn-text); border-radius: 6px; background: var(--card); color: var(--warn-text); font-size: 12px; line-height: 1.25; font-weight: 800; vertical-align: middle; white-space: nowrap; }
.pm-cover > .mature-badge { position: absolute; top: 8px; left: 8px; z-index: 2; pointer-events: none; }
.ttitle > .mature-badge, .ftitle > .mature-badge { margin-right: 6px; }
.gtitle { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.pm-mature-toggle:has(input:disabled) { cursor: default; }
.pm-mature-status { min-height: 0; margin-top: 8px; }
.pm-mature-status:empty { margin: 0; }
.mature-notice-wrap { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; overflow: auto; padding: max(16px, var(--safe-t)) max(16px, var(--safe-r)) max(16px, var(--safe-b)) max(16px, var(--safe-l)); background: var(--sheet-back); }
.mature-notice { width: 100%; max-width: 440px; max-height: calc(100svh - max(16px, var(--safe-t)) - max(16px, var(--safe-b))); overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.mature-notice > .mature-badge { margin-bottom: 12px; }
.mature-notice h1 { font-size: clamp(22px, 5vw, 28px); }
.mature-notice p { margin: 12px 0 20px; }
.mature-notice-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.mature-notice-actions > .btn { flex: 1 1 140px; min-height: var(--tap); }
@media (max-height: 400px) { .mature-notice { padding: 16px; } .mature-notice > .mature-badge { margin-bottom: 6px; } .mature-notice p { margin: 8px 0 12px; } }
/* end mature content */

/* ---------- prompt creation and forge progress ---------- */
.forge-create { max-width: 820px; margin-inline: auto; }
.forge-create textarea { min-height: 132px; }
.forge-counter { color: var(--muted); text-align: end; font-size: 12px; margin-top: 6px; }
.forge-quota { margin: 12px 0 0; font-size: 13px; }
.ai-connection { min-width: 0; }
.ai-details, .game-plan, .idea-tools { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; }
.ai-details summary, .game-plan summary { min-height: 48px; padding: 14px 0; cursor: pointer; font-weight: 600; }
.ai-details .ai-connection { border: 0; padding: 0 0 16px; background: transparent; }
.game-plan summary span { display: inline-block; margin-inline-start: 8px; font-weight: 400; }
#gamePlan { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13px; line-height: 1.6; max-height: 320px; overflow-y: auto; }
.composer-submit #createActionHelp { margin: 8px 0 0; line-height: 1.4; text-align: center; }
.studio-tools { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.studio-tools .field { min-width: 0; margin: 0; }
.studio-tools input, .studio-tools select { width: 100%; min-width: 0; min-height: 44px; }
.job-placeholder { display: grid; height: 100%; place-items: center; font-size: 48px; color: var(--gold-text); background: var(--card2); }
.job-placeholder[hidden] { display: none; }
.job-sharing { margin-top: 6px; }
@media (max-width: 720px) { .studio-tools { grid-template-columns: 1fr 1fr; } .studio-tools .field:first-child { grid-column: 1 / -1; } }
.ai-connection-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.ai-connection-heading h2 { flex: 1 1 180px; margin: 0; }
.ai-connection-heading .chip { white-space: normal; }
.ai-connection p { line-height: 1.5; overflow-wrap: anywhere; }
.ai-connection-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ai-connection-actions .btn { min-height: 44px; min-width: 44px; white-space: normal; }
.forge-progress { max-width: 760px; margin-inline: auto; }
.forge-steps { list-style: none; display: flex; justify-content: space-between; gap: 6px; padding: 0; margin: 8px 0 20px; }
.forge-steps li { display: flex; flex: 1 1 0; min-width: 0; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); text-align: center; }
.forge-steps li > span { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--bg2); }
.forge-steps li.current { color: var(--text); font-weight: 700; }
.forge-steps li.current > span, .forge-steps li.done > span { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.forge-steps small { font-size: 12px; }
@media (max-width: 420px) { .forge-steps { gap: 2px; } .forge-steps small { font-size: 10px; } .forge-steps li > span { width: 28px; height: 28px; } }
@media (prefers-reduced-motion: reduce) { .forge-progress .progress > div { transition: none; } }

/* Remix: one source, one clear instruction, one explicit next step. */
.composer-head { max-width: 820px; margin-inline: auto; align-items: center; }
.composer-head h1 { margin-top: 4px; }
.composer-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--gold-text); }
.remix-source { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); min-width: 0; margin-bottom: 16px; }
.remix-source > img { flex: 0 0 64px; width: 64px; height: 80px; object-fit: cover; border-radius: 12px; }
.remix-source > div { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.remix-source strong { font-size: 18px; overflow-wrap: anywhere; }
.remix-source-icon { flex: 0 0 64px; display: grid; place-items: center; height: 64px; background: var(--card2); border-radius: 12px; color: var(--gold-text); font-size: 32px; }
.remix-composer { gap: 12px; }
.remix-composer .remix-source { margin-bottom: 0; }
.remix-composer > .card { border-radius: 22px; }
.remix-composer textarea { min-height: 156px; resize: vertical; font-size: 16px; line-height: 1.5; scroll-margin-block: 80px; }
.composer-help { display: flex; flex-wrap: wrap; gap: 8px 12px; justify-content: space-between; align-items: start; margin: 8px 0 18px; }
.composer-help p { margin: 0; }
.composer-help .forge-counter { flex: 0 0 auto; margin-top: 0; }
.composer-suggestions { margin-top: 8px; }
.composer-suggestions .chip { min-height: 44px; padding: 9px 14px; white-space: normal; text-align: left; }
.composer-note { margin: 0; line-height: 1.5; }
.forge-create #genBtn { min-height: 54px; scroll-margin-block: 80px; }
.game-create-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.game-create-actions > .btn { flex: 0 0 auto; min-height: 44px; min-width: 44px; }
.game-create-actions .remix-action { padding: 8px 14px; border-radius: 999px; background: var(--card2); border-color: var(--line); color: var(--text); font-size: 13px; font-weight: 700; }
.game-create-actions .remix-action:hover { background: var(--card2); border-color: var(--muted); }
.remix-action > span:first-child { display: none; }
.remix-permission { display: flex; align-items: center; gap: 12px; min-height: 64px; margin: 12px 0 18px; cursor: pointer; }
.remix-permission input { flex: 0 0 22px; width: 22px; height: 22px; accent-color: var(--gold); }
.remix-permission span { display: flex; flex-direction: column; gap: 4px; }
.remix-permission small { line-height: 1.4; }
.draft-compare { display: flex; gap: 8px; margin-bottom: 12px; }
.draft-compare .btn { flex: 1 1 0; }
@media (max-width: 720px) {
  body.composer-keyboard #tabbar { display: none; }
  body.composer-keyboard { --tab-h: 0px; }
  .forge-create { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .composer-submit { position: sticky; bottom: calc(var(--tab-h) + var(--composer-inset, 0px) + 8px); z-index: 5; padding-top: 10px; background: var(--bg); }
  .composer-head h1 { font-size: 28px; }
  .remix-composer .remix-source { padding: 12px; }
  .remix-composer .remix-source > img { height: 64px; }
  .remix-composer > .card { padding: 14px; }
  .remix-composer textarea { min-height: 132px; }
  .remix-composer .composer-help { margin-bottom: 12px; }
  .gstage-col .game-create-actions { width: 100%; }
  .gstage-col:has(.game-create-actions) .gstage { height: min(72dvh, calc(100dvh - var(--top-h) - var(--tab-h) - 84px), 640px); }
}
@media (min-width: 960px) { .gstage-col:has(.game-create-actions) .gstage { height: min(calc(100dvh - var(--top-h) - 108px), 720px); } }

/* Optional tools stay out of the one-button creation flow. */
.idea-tools summary, .collection-settings summary { min-height: 48px; padding: 14px 0; cursor: pointer; font-weight: 600; }
.idea-tools[open] { padding-bottom: 14px; }
.foundation-tools { min-width: 0; }
.foundation-tools label { display: block; font-weight: 600; margin-bottom: 10px; }
.foundation-tools select { width: 100%; min-width: 0; max-width: 100%; min-height: 44px; }
.foundation-tools p { margin-bottom: 0; overflow-wrap: anywhere; }
.starter-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(110px,1fr)); gap: 8px; }
.saved-idea { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 6px 0; }
.saved-idea [data-load-idea] { flex: 1; min-width: 0; text-align: start; white-space: normal; overflow-wrap: anywhere; }
.idea-tools .btn, .collections-page .btn, .collection-option, .device-preview .btn { min-height: 44px; }
.device-preview { display: flex; gap: 8px; margin: 0 0 14px; }
.device-preview [aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.collections-page .page-head, .pm-library-head { flex-wrap: wrap; }
.collections-page h1, .collection-list strong { overflow-wrap: anywhere; }
.collections-page input { min-width: 0; max-width: 100%; flex: 1 1 150px; }
.collection-list, .collection-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(150px,100%),1fr)); gap: 16px; margin-top: 20px; }
.collection-list .card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; }
.collection-game { min-width: 0; }
.collection-game .pm-card { width: 100%; }
.collection-option { white-space: normal; overflow-wrap: anywhere; margin-bottom: 8px; }
.collection-settings { margin: 10px 0; }
.gstage:has(> .fullscreen-toggle) > .game-frame, .gstage:has(> .fullscreen-toggle) > .poster { top: 48px; height: calc(100% - 48px); }
.fullscreen-toggle { position: absolute; z-index: 4; top: 2px; right: max(8px,env(safe-area-inset-right)); min-height: 44px; font-size: 12px; padding: 4px 12px; }
body.game-fullscreen { overflow: hidden; }
.gstage-col .gstage.game-expanded, .gstage-col .gstage:fullscreen { position: fixed; inset: 0; z-index: 1500; width: 100vw; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
.game-fullscreen .gstage-col { z-index: 1500; }

.player-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.player-shortcuts .btn, .browse-filters select, .browse-search .btn, .browse-creators .btn { min-height: 44px; }
.browse-search { display: flex; gap: 8px; }
.browse-search input { min-width: 0; flex: 1; }
.browse-filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 12px; }
.browse-filters label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.browse-filters select { min-width: 0; max-width: 100%; width: 100%; }
.browse-unplayed { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.browse-unplayed input { width: 20px; height: 20px; }
.browse-creators { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.browse-creators .btn { white-space: normal; overflow-wrap: anywhere; }
#browseMore { margin: 24px 0; min-height: 44px; }
.activity-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 14px; margin: 20px 0; }
.activity-grid a { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.activity-grid strong { font-size: 30px; color: var(--accent); }
.activity-resume { margin-bottom: 20px; }
.activity-resume h2 { overflow-wrap: anywhere; }
.player-controls summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
html[data-motion="reduce"] { scroll-behavior: auto !important; }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
.build-details summary { cursor: pointer; font-weight: 700; }
.build-details dl { display: grid; gap: .35rem; margin-block: 1rem; }
.build-details dt { color: var(--muted); font-size: .85rem; }
.build-details dd { margin: 0 0 .6rem; overflow-wrap: anywhere; }
