/* Retro Game Player (games/retro-game-player.html). Everything is scoped under .rgp so the rest of the site is
 * unaffected; the colours are the player's own palette (always dark, like a console launcher), not site tokens. */
@font-face { font-family: "RGP Pixel"; src: url("../fonts/press-start-2p.woff2") format("woff2"); font-display: swap; }

.rgp {
  --bg: #0b0d12; --bg-2: #10131a; --panel: #151922; --panel-2: #1b2030; --panel-3: #232a3c;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .13);
  --ink: #eceff6; --ink-2: #b4bbcc; --mute: #7d869b;
  --neon: #ff4f8b; --neon-2: #ff7aa8; --cyan: #3ee6ff; --amber: #ffc857; --lime: #8cff6b; --red: #ff5c5c;
  --glow: 0 0 0 1px rgba(255, 79, 139, .35), 0 8px 30px -8px rgba(255, 79, 139, .45);
  --c-nes: #e5484d; --c-gb: #9bbc0f; --c-gbc: #a46bff; --c-gba: #5b7cff;
  --r: 14px; --r-sm: 9px;
  --pixel: "RGP Pixel", ui-monospace, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  position: relative; isolation: isolate; color: var(--ink); background: var(--bg); font-family: var(--sans); overflow: clip;
  font-size: 15px; line-height: 1.5; color-scheme: dark;
  border-block: 1px solid var(--line);
}
/* Background: soft glows + a faint dot grid, no images. */
.rgp::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(91, 124, 255, .16), transparent 60%),
    radial-gradient(700px 380px at -5% 10%, rgba(255, 79, 139, .12), transparent 60%),
    radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1.2px) 0 0 / 22px 22px;
}
.rgp *, .rgp *::before, .rgp *::after { box-sizing: border-box; }
.rgp h1, .rgp h2, .rgp h3, .rgp h4 { color: var(--ink); letter-spacing: -.01em; margin: 0; }
.rgp p { margin: 0; }
.rgp a { color: var(--cyan); }
.rgp :focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.rgp-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.rgp .px { font-family: var(--pixel); font-weight: 400; letter-spacing: 0; text-transform: uppercase; }

/* ---------- buttons, inputs ---------- */
.rgp .rbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink);
  font: 600 14px/1 var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.rgp .rbtn:hover { background: var(--panel-3); border-color: rgba(255, 255, 255, .2); }
.rgp .rbtn:active { transform: translateY(1px); }
.rgp .rbtn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.rgp .rbtn.primary { background: linear-gradient(180deg, #ff5d95, #e93b78); border-color: transparent; color: #fff; box-shadow: var(--glow); }
.rgp .rbtn.primary:hover { background: linear-gradient(180deg, #ff6fa1, #f04680); }
.rgp .rbtn.ghost { background: transparent; }
.rgp .rbtn.big { min-height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.rgp .rbtn.sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.rgp .rbtn.icon { width: 36px; min-height: 36px; padding: 0; }
.rgp .rbtn.danger { color: #ffb3b3; border-color: rgba(255, 92, 92, .35); }
.rgp .rbtn.danger:hover { background: rgba(255, 92, 92, .14); }
.rgp .rbtn svg, .rgp .ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.rgp input[type="search"], .rgp input[type="text"], .rgp select {
  height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2);
  color: var(--ink); font: 500 14px var(--sans); box-shadow: none;
}
.rgp select { padding-right: 30px; }
.rgp input:focus, .rgp select:focus { outline: 0; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(62, 230, 255, .18); }
.rgp input::placeholder { color: var(--mute); }
.rgp input[type="range"] { accent-color: var(--neon); width: 100%; }
.rgp input[type="checkbox"], .rgp input[type="radio"] { accent-color: var(--neon); width: 17px; height: 17px; }

/* ---------- top bar ---------- */
.rgp-top { position: sticky; top: var(--rgp-stick, 0px); z-index: 20; background: rgba(11, 13, 18, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.rgp-top .rgp-wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.rgp-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.rgp-brand-mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--neon), #7a5cff); box-shadow: var(--glow); }
.rgp-brand-mark svg { width: 18px; height: 18px; fill: #fff; }
.rgp-brand-text { font-family: var(--pixel); font-size: 11px; line-height: 1.35; }
.rgp-brand-text b { color: var(--neon); font-weight: 400; }
.rgp-nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.rgp-nav::-webkit-scrollbar { display: none; }
.rgp-nav button {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px; border: 0; border-radius: 9px;
  background: transparent; color: var(--ink-2); font: 600 14px var(--sans); cursor: pointer; white-space: nowrap;
}
.rgp-nav button:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.rgp-nav button[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, .07); }
.rgp-nav button[aria-current="page"]::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: -13px; height: 2px; border-radius: 2px; background: var(--neon); box-shadow: 0 0 10px var(--neon); }
.rgp-nav .count { font: 600 11px var(--sans); color: var(--mute); background: rgba(255, 255, 255, .07); padding: 2px 6px; border-radius: 99px; }
.rgp-top-actions { display: flex; gap: 8px; flex: none; }

/* ---------- views ---------- */
.rgp-view { padding: 34px 0 56px; animation: rgp-in .28s ease-out both; }
@keyframes rgp-in { from { opacity: 0; transform: translateY(6px); } }
.rgp-sec { margin-top: 44px; }
.rgp-sec:first-child { margin-top: 0; }
.rgp-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.rgp-over { display: block; font-family: var(--pixel); font-size: 9px; color: var(--neon-2); letter-spacing: .04em; margin-bottom: 9px; text-transform: uppercase; }
.rgp-sec-head h2 { font-size: 20px; font-weight: 700; }
.rgp-sec-head p { color: var(--mute); font-size: 14px; margin-top: 3px; }
.rgp-link { background: none; border: 0; padding: 0; color: var(--cyan); font: 600 14px var(--sans); cursor: pointer; }
.rgp-link:hover { text-decoration: underline; }

/* ---------- hero ---------- */
.rgp-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.rgp-hero h1 { font-family: var(--pixel); font-weight: 400; font-size: clamp(22px, 1.2rem + 1.7vw, 40px); line-height: 1.3; letter-spacing: 0; text-transform: uppercase; margin: 0 0 18px; }
.rgp-hero h1 span { display: block; color: var(--neon); text-shadow: 0 0 22px rgba(255, 79, 139, .55); }
.rgp-hero .lede { font-size: 17px; color: var(--ink-2); max-width: 34em; }
.rgp-hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.rgp-hero-notes { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; color: var(--mute); font-size: 13px; }
.rgp-hero-notes span { display: inline-flex; align-items: center; gap: 6px; }
.rgp-hero-notes .ico { width: 15px; height: 15px; color: var(--lime); }

/* Handheld/CRT illustration (pure CSS) with an attract-mode screen. */
.rgp-console { position: relative; margin: 0 auto; width: min(100%, 440px); padding: 22px 22px 26px; border-radius: 26px 26px 26px 70px;
  background: linear-gradient(160deg, #262c3d, #171b26 60%); border: 1px solid var(--line-2);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .08); }
.rgp-console-bezel { padding: 16px 16px 12px; border-radius: 14px; background: #0a0b10; border: 1px solid rgba(255, 255, 255, .05); }
.rgp-console-led { display: flex; align-items: center; gap: 7px; font: 400 7px var(--pixel); color: var(--mute); margin-bottom: 10px; }
.rgp-console-led i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.rgp-screen { position: relative; aspect-ratio: 10 / 9; border-radius: 6px; overflow: hidden; background: #0e1a12; }
.rgp-screen svg { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.rgp-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px), radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55)); }
.rgp-screen .blink { animation: rgp-blink 1.1s steps(1) infinite; }
@keyframes rgp-blink { 50% { opacity: 0; } }
.rgp-screen .scroll { animation: rgp-scroll 6s linear infinite; }
@keyframes rgp-scroll { to { transform: translateX(-80px); } }
.rgp-screen .bob { animation: rgp-bob .8s steps(2) infinite; }
@keyframes rgp-bob { 50% { transform: translateY(-3px); } }
.rgp-console-pad { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding: 0 8px; }
.rgp-dpad { position: relative; width: 70px; height: 70px; }
.rgp-dpad::before, .rgp-dpad::after { content: ""; position: absolute; background: #0d0f15; border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.rgp-dpad::before { left: 24px; top: 0; width: 22px; height: 70px; }
.rgp-dpad::after { top: 24px; left: 0; height: 22px; width: 70px; }
.rgp-ab { display: flex; gap: 14px; transform: rotate(-22deg); }
.rgp-ab i { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(160deg, #ff5d95, #b72a5f); box-shadow: 0 4px 0 #6c1a39, 0 0 18px rgba(255, 79, 139, .35); }
.rgp-ab i:first-child { margin-top: 18px; }
.rgp-console-ss { display: flex; justify-content: center; gap: 16px; margin-top: 18px; }
.rgp-console-ss i { width: 34px; height: 9px; border-radius: 6px; background: #0d0f15; transform: rotate(-22deg); }

/* Continue playing */
.rgp-continue { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 16px;
  border-radius: var(--r); background: linear-gradient(120deg, rgba(255, 79, 139, .12), rgba(91, 124, 255, .08) 60%, transparent), var(--panel);
  border: 1px solid var(--line-2); }
.rgp-continue .cover { border-radius: 10px; }
.rgp-continue h3 { font-size: 20px; margin: 4px 0 6px; }
.rgp-continue .meta { color: var(--mute); font-size: 14px; }

/* ---------- system tiles ---------- */
.rgp-systems { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rgp-sys { position: relative; padding: 18px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.rgp-sys::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--sys); box-shadow: 0 0 14px var(--sys); }
.rgp-sys .px { font-size: 13px; color: var(--sys); }
.rgp-sys h3 { font-size: 15px; margin: 10px 0 4px; }
.rgp-sys p { color: var(--mute); font-size: 13px; }
.rgp-sys .exts { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.rgp-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; font: 600 12px var(--sans); background: rgba(255, 255, 255, .06); color: var(--ink-2); border: 1px solid var(--line); }
.rgp-chip.sys { font: 400 8px/1.4 var(--pixel); padding: 4px 6px; color: #0b0d12; background: var(--sys); border-color: transparent; }
.rgp-chip.demo { color: var(--amber); border-color: rgba(255, 200, 87, .35); background: rgba(255, 200, 87, .1); }
.rgp-chip.warn { color: var(--amber); }
.rgp-chip.ok { color: var(--lime); }
.rgp-chip.bad { color: #ffb3b3; border-color: rgba(255, 92, 92, .3); }

[data-sys="nes"] { --sys: var(--c-nes); }
[data-sys="gb"] { --sys: var(--c-gb); }
[data-sys="gbc"] { --sys: var(--c-gbc); }
[data-sys="gba"] { --sys: var(--c-gba); }

/* ---------- onboarding (empty library) ---------- */
.rgp-onboard { padding: 30px; border-radius: 20px; border: 1px dashed rgba(255, 255, 255, .16); background: rgba(21, 25, 34, .6); }
.rgp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.rgp-step { padding: 20px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.rgp-step .num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; font: 400 12px var(--pixel); color: var(--neon); background: rgba(255, 79, 139, .1); border: 1px solid rgba(255, 79, 139, .3); }
.rgp-step h3 { font-size: 16px; margin: 14px 0 6px; }
.rgp-step p { color: var(--ink-2); font-size: 14px; }
.rgp-onboard-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; color: var(--mute); font-size: 13px; }
.rgp-empty { text-align: center; padding: 50px 20px; border-radius: 18px; border: 1px dashed rgba(255, 255, 255, .14); color: var(--ink-2); }
.rgp-empty .big-ico { font: 400 28px var(--pixel); color: var(--panel-3); margin-bottom: 18px; }
.rgp-empty h3 { font-size: 18px; margin-bottom: 6px; }
.rgp-empty p { color: var(--mute); max-width: 32em; margin: 0 auto 18px; }

/* ---------- game cards ---------- */
.rgp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.rgp-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 220px); gap: 18px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.rgp-row > * { scroll-snap-align: start; }
.rgp-card { position: relative; display: flex; flex-direction: column; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); overflow: hidden;
  transition: transform .18s ease, border-color .18s, box-shadow .18s; }
.rgp-card:hover, .rgp-card:focus-within { transform: translateY(-3px); border-color: rgba(255, 255, 255, .18); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9), 0 0 0 1px var(--sys); }
.rgp-card .cover { border-radius: 0; }
.rgp-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.rgp-card h3 { font-size: 15px; font-weight: 650; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rgp-card .meta { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 12.5px; }
.rgp-card-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 8px; }
.rgp-card-actions .rbtn.play { flex: 1; }
.rgp-fav { position: absolute; top: 9px; right: 9px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(11, 13, 18, .6); backdrop-filter: blur(6px); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.rgp-fav svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.rgp-fav[aria-pressed="true"] { color: var(--amber); }
.rgp-fav[aria-pressed="true"] svg { fill: currentColor; }
.rgp-card .rgp-chip.demo { position: absolute; top: 12px; left: 10px; z-index: 2; backdrop-filter: blur(6px); background: rgba(11, 13, 18, .7); }

/* Generated cover art: an SVG built from the game's name and system. */
.cover { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel-2); }
.cover svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.cover::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .14) 0 1px, transparent 1px 3px); }
.cover .cover-title { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 1; font: 400 9px/1.55 var(--pixel); color: #fff;
  text-transform: uppercase; text-shadow: 2px 2px 0 rgba(0, 0, 0, .55); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* ---------- library toolbar ---------- */
.rgp-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; padding: 10px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.rgp-search { position: relative; flex: 1 1 240px; min-width: 0; }
.rgp-search .ico { position: absolute; left: 12px; top: 11px; color: var(--mute); }
.rgp .rgp-search input { width: 100%; padding-left: 38px; }
.rgp-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); overflow-x: auto; max-width: 100%; }
.rgp-seg button { height: 32px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); font: 600 13px var(--sans); cursor: pointer; white-space: nowrap; }
.rgp-seg button:hover { color: var(--ink); }
.rgp-seg button[aria-pressed="true"] { background: var(--panel-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.rgp-toggle { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink-2); font: 600 13px var(--sans); cursor: pointer; }
.rgp-toggle[aria-pressed="true"] { color: var(--amber); border-color: rgba(255, 200, 87, .4); background: rgba(255, 200, 87, .08); }
.rgp-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.rgp-toggle[aria-pressed="true"] svg { fill: currentColor; }
.rgp .rgp-toolbar select { flex: 1 1 170px; max-width: 220px; }
.rgp-result-line { color: var(--mute); font-size: 13px; margin: -6px 0 14px; }

/* ---------- panels (settings, data) ---------- */
.rgp-cols { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.rgp-side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.rgp-side button { text-align: left; height: 40px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: 600 14px var(--sans); cursor: pointer; }
.rgp-side button:hover { background: rgba(255, 255, 255, .05); color: var(--ink); }
.rgp-side button[aria-current="true"] { background: rgba(255, 79, 139, .1); color: var(--ink); box-shadow: inset 2px 0 0 var(--neon); }
.rgp-panel { padding: 22px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.rgp-panel + .rgp-panel { margin-top: 16px; }
.rgp-panel h3 { font-size: 16px; margin-bottom: 4px; }
.rgp-panel > p.sub { color: var(--mute); font-size: 14px; margin-bottom: 16px; }
.rgp-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 20px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.rgp-field:first-of-type { border-top: 0; }
.rgp .rgp-field label, .rgp .rgp-field .lbl { font-weight: 600; font-size: 14px; color: var(--ink); margin: 0; }
.rgp-field small { grid-column: 1; color: var(--mute); font-size: 13px; }
.rgp-field .ctl { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 10px; }
.rgp-field .ctl input[type="range"] { width: 160px; }
.rgp-field output { min-width: 3.2em; text-align: right; color: var(--ink-2); font: 600 13px var(--sans); font-variant-numeric: tabular-nums; }
.rgp-note { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; font-size: 14px; color: var(--ink-2); background: rgba(62, 230, 255, .06); border: 1px solid rgba(62, 230, 255, .18); }
.rgp-note.warn { background: rgba(255, 200, 87, .07); border-color: rgba(255, 200, 87, .25); }
.rgp-note .ico { color: var(--cyan); margin-top: 2px; }
.rgp-note.warn .ico { color: var(--amber); }
.rgp-note + .rgp-note, .rgp-panel .rgp-note { margin-top: 12px; }
.rgp-phase { display: inline-flex; align-items: center; gap: 6px; font: 400 8px var(--pixel); color: var(--amber); padding: 5px 8px; border-radius: 6px; border: 1px dashed rgba(255, 200, 87, .4); text-transform: uppercase; }

/* Key mapping table */
.rgp-keys { width: 100%; border-collapse: collapse; font-size: 14px; }
.rgp-keys th, .rgp-keys td { text-align: left; padding: 9px 10px; border-top: 1px solid var(--line); }
.rgp .rgp-keycap { min-width: 74px; min-height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--panel-2);
  color: var(--ink); font: 600 13px var(--sans); cursor: pointer; transition: border-color .15s, background .15s; }
.rgp .rgp-keycap:hover { border-color: rgba(255, 255, 255, .28); background: var(--panel-3); }
.rgp .rgp-keycap.empty { color: var(--mute); border-style: dashed; }
.rgp .rgp-keycap.listening { border-color: var(--neon); color: var(--neon-2); box-shadow: var(--glow); animation: rgp-listen 1s ease-in-out infinite; }
@keyframes rgp-listen { 50% { box-shadow: 0 0 0 1px rgba(255, 79, 139, .2); } }
.rgp-keys tr.live td { background: color-mix(in srgb, var(--lime) 12%, transparent); }
.rgp-keys tr.live td:first-child { box-shadow: inset 3px 0 0 var(--lime); }
.rgp-key-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.rgp-pad-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.rgp-pad-head label { font-weight: 600; font-size: 14px; margin: 0; }
.rgp .rgp-pad-head select { flex: 1 1 220px; min-width: 0; max-width: 420px; }
.rgp-keys th { color: var(--mute); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; border-top: 0; }
.rgp kbd { display: inline-block; min-width: 26px; padding: 3px 7px; border-radius: 6px; text-align: center; font: 600 12.5px var(--sans); color: var(--ink);
  background: var(--panel-3); border: 1px solid var(--line-2); box-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.rgp-pad-art { display: block; width: 100%; max-width: 420px; margin: 4px auto 0; }

/* Storage meter */
.rgp-meter { height: 10px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; margin: 12px 0 8px; }
.rgp-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--neon)); transition: width .4s; }
.rgp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 14px; }
.rgp-stat { padding: 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.rgp-stat b { display: block; font-size: 20px; }
.rgp-stat span { color: var(--mute); font-size: 12.5px; }

/* ---------- import dialog ---------- */
.rgp-modal { width: min(680px, calc(100vw - 24px)); max-height: min(88vh, 760px); padding: 0; border-radius: 18px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink); box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .9); overflow: hidden; }
.rgp-modal[open] { display: flex; flex-direction: column; animation: rgp-pop .2s ease-out; }
@keyframes rgp-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.rgp-modal::backdrop { background: rgba(5, 6, 10, .72); backdrop-filter: blur(4px); }
.rgp-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.rgp-modal-head h2 { font-size: 18px; }
.rgp-modal-body { padding: 20px; overflow-y: auto; }
.rgp-modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg-2); }
.rgp-modal-foot .hint { color: var(--mute); font-size: 13px; }
.rgp-drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 34px 20px; border-radius: 14px;
  border: 2px dashed rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .02); cursor: pointer; transition: border-color .15s, background .15s; }
.rgp-drop:hover, .rgp-drop.over { border-color: var(--neon); background: rgba(255, 79, 139, .06); }
.rgp-drop .cart { width: 54px; height: 54px; color: var(--neon); }
.rgp-drop { color: var(--ink); margin: 0; }
.rgp-drop strong { font-size: 16px; color: var(--ink); }
.rgp-drop span { color: var(--mute); font-size: 13.5px; }
.rgp-queue { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.rgp-qitem { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.rgp-qitem.bad { border-color: rgba(255, 92, 92, .3); }
.rgp-qitem .badge { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font: 400 8px var(--pixel); color: #0b0d12; background: var(--sys, var(--panel-3)); }
.rgp-qitem .name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rgp-qitem .info { color: var(--mute); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.rgp-qitem .msg { grid-column: 2 / -1; font-size: 13px; color: var(--amber); }
.rgp-qitem.bad .msg { color: #ffb3b3; }
.rgp-qitem select { height: 34px; font-size: 13px; }
.rgp-qitem .bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.rgp-qitem .bar i { display: block; height: 100%; width: 0; background: var(--cyan); transition: width .2s; }
.rgp-legal { margin-top: 16px; font-size: 13px; color: var(--mute); }

/* Whole-page drop overlay */
.rgp-dropzone-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(11, 13, 18, .86); backdrop-filter: blur(6px); pointer-events: none; }
.rgp-dropzone-overlay div { padding: 40px 50px; border-radius: 22px; border: 2px dashed var(--neon); text-align: center; color: #eceff6; font: 400 14px/1.8 var(--pixel); text-transform: uppercase; box-shadow: var(--glow); }

/* Licences / help */
.rgp-faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.rgp-faq summary { cursor: pointer; font-weight: 650; }
.rgp-faq details p { color: var(--ink-2); margin-top: 8px; font-size: 14px; }
.rgp-lic { width: 100%; border-collapse: collapse; font-size: 14px; }
.rgp-lic td, .rgp-lic th { padding: 9px 8px; border-top: 1px solid var(--line); text-align: left; }
.rgp-lic th { color: var(--mute); font-size: 12px; font-weight: 600; border-top: 0; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Saves & data: backups, per-game data ---------- */
.rgp-backup-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.rgp .rgp-check { display: flex; align-items: center; gap: 9px; margin: 14px 0 0; color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer; }
.rgp .rgp-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--neon); }
.rgp-gdm { display: grid; gap: 8px; }
.rgp-gdm-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.rgp-gdm-row .g { display: flex; align-items: center; gap: 9px; min-width: 0; }
.rgp-gdm-row .g b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
.rgp-gdm-row .d { display: flex; flex-direction: column; color: var(--ink-2); font-size: 13px; min-width: 0; }
.rgp-gdm-row .a { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.rgp-panel.danger { border-color: rgba(255, 92, 92, .25); }
.rgp-gdm-row .d .use { color: var(--mute); }
.rgp-gdm-row .d .use b { color: var(--ink); font-weight: 600; }
.rgp-persist { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.rgp-persist span { flex: 1 1 260px; }
.rgp-persist.ok { border-color: color-mix(in srgb, var(--lime) 35%, transparent); }
.rgp-persist.ok span::before { content: "✓ "; color: var(--lime); font-weight: 700; }
.rgp-shots-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rgp-shots-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rgp .rgp-shots-tools select { min-width: 0; max-width: 260px; }
.rgp-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.rgp .rgp-shot { display: flex; flex-direction: column; padding: 0; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); cursor: zoom-in; text-align: left; font: inherit; }
.rgp .rgp-shot:hover { border-color: var(--line-2); }
.rgp-shot img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #000; image-rendering: pixelated; }
.rgp-shot span { display: flex; flex-direction: column; padding: 7px 9px; font-size: 13px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rgp-shot small { color: var(--mute); font-weight: 500; font-size: 12px; }
.rgp-shot-view { width: min(900px, calc(100vw - 24px)); }
.rgp-shot-view .rgp-modal-body { display: grid; place-items: center; background: #000; padding: 12px; }
.rgp-shot-view img { max-width: 100%; max-height: 62vh; width: auto; height: auto; min-width: min(100%, 480px); object-fit: contain; image-rendering: pixelated; }
@media (max-width: 720px) { .rgp-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
@media (max-width: 900px) {
  .rgp-gdm-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .rgp-gdm-row .d { flex-direction: row; flex-wrap: wrap; gap: 2px 14px; }
  .rgp-gdm-row .a { justify-content: flex-start; }
}

/* ---------- play screen (immersive, covers the whole page) ---------- */
html.rgp-playing, html.rgp-playing body { overflow: hidden; }
.rgp.rgp-play { position: fixed; inset: 0; z-index: 1000; border: 0; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); font-family: var(--sans);
  background: radial-gradient(1200px 600px at 50% 0%, #161b2a, #06070a 70%); padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.rgp-play-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(11, 13, 18, .7); backdrop-filter: blur(10px);
  transition: opacity .3s, transform .3s; position: relative; z-index: 3; }
.rgp-play-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.rgp-play-title b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rgp-play-title .sub { color: var(--mute); font-size: 13px; white-space: nowrap; }
.rgp-play-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.rgp .rgp-play-tools .rbtn.icon { width: 38px; min-height: 38px; }
.rgp-vol { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; height: 38px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink); margin: 0; }
.rgp-vol svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.rgp .rgp-vol input[type="range"] { width: 86px; }
.rgp-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 14px; position: relative; }
.rgp-screen-box { position: absolute; left: 0; top: 0; background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 30px 80px -20px rgba(0, 0, 0, .9), 0 0 60px -10px color-mix(in srgb, var(--sys) 35%, transparent); }
.rgp-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.rgp-scan { position: absolute; inset: 0; z-index: 1; pointer-events: none; background-image: linear-gradient(to bottom, transparent 50%, #000 50%); }
.rgp-overlay { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 20px; text-align: center; background: #07080c; }
.rgp-overlay .px { font-family: var(--pixel); font-size: 14px; color: var(--neon); text-transform: uppercase; }
.rgp-overlay .msg { color: var(--ink-2); font-size: 14px; max-width: 30em; }
.rgp-overlay.paused { background: rgba(5, 6, 10, .62); backdrop-filter: blur(2px); }
.rgp-overlay.paused .px { color: #fff; font-size: 18px; text-shadow: 0 0 18px rgba(255, 79, 139, .7); }
.rgp-overlay.error .px { color: var(--red); }
.rgp-overlay .acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.rgp-spinner { display: flex; gap: 8px; }
.rgp-spinner i { width: 12px; height: 12px; background: var(--neon); animation: rgp-dot 1s steps(1) infinite; }
.rgp-spinner i:nth-child(2) { animation-delay: .2s; background: var(--cyan); }
.rgp-spinner i:nth-child(3) { animation-delay: .4s; background: var(--amber); }
@keyframes rgp-dot { 50% { opacity: .15; } }
.rgp-play-foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 16px 12px; color: var(--mute); font-size: 12.5px; transition: opacity .3s; }
.rgp-play-foot .keys { line-height: 2; }
.rgp-play-foot kbd { font-size: 11px; padding: 1px 6px; min-width: 0; }
.rgp-play-foot .fps { font: 400 9px var(--pixel); color: var(--lime); white-space: nowrap; align-self: center; }
.rgp-display-pop { position: absolute; top: 60px; right: 14px; z-index: 5; width: min(320px, calc(100% - 28px)); padding: 8px 14px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .8); }
.rgp-display-pop .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink); margin: 0; }
.rgp-display-pop .row:first-child { border-top: 0; }
.rgp .rgp-display-pop input[type="range"] { width: 120px; }
.rgp-states-pop { position: absolute; top: 60px; right: 14px; z-index: 6; width: min(460px, calc(100% - 28px)); max-height: calc(100% - 76px); overflow: auto;
  padding: 12px 14px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .8); }
.rgp-states-pop .head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.rgp-states-pop .head b { display: block; font-size: 15px; }
.rgp-states-pop .head .sub { color: var(--mute); font-size: 12.5px; }
.rgp-states-pop kbd { font-size: 11px; padding: 1px 5px; min-width: 0; }
.rgp-slots { display: grid; gap: 8px; }
.rgp-slot { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--line); }
.rgp-slot.quick { border-color: color-mix(in srgb, var(--sys, var(--neon)) 45%, transparent); }
.rgp-slot .thumb { width: 72px; aspect-ratio: 3 / 2; border-radius: 6px; overflow: hidden; background: #000; display: grid; place-items: center; }
.rgp-slot .thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.rgp-slot .thumb span { font: 400 12px var(--pixel); color: var(--mute); }
.rgp-slot.empty .thumb { background: repeating-linear-gradient(45deg, var(--panel-2) 0 6px, var(--bg-2) 6px 12px); }
.rgp-slot .info { min-width: 0; display: flex; flex-direction: column; }
.rgp-slot .info b { font-size: 14px; }
.rgp-slot .info span { color: var(--mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rgp-slot .acts { display: flex; gap: 6px; align-items: center; }
.rgp .rgp-slot .rbtn.icon { width: 32px; min-height: 32px; }
.rgp-states-pop .foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.rgp-states-pop .foot .note { color: var(--mute); font-size: 12px; flex: 1 1 200px; }
/* touch controls */
.rgp-touch { position: absolute; inset: 0; z-index: 4; pointer-events: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.rgp-touch .tgrp { position: absolute; left: 0; top: 0; pointer-events: auto; touch-action: none; opacity: var(--t-op, .7); transform-origin: center; }
.rgp-touch .dpad { width: 156px; height: 156px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .07) 55%, transparent 71%); }
.rgp-touch .arm, .rgp-touch .hub { position: absolute; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .34); }
.rgp-touch .arm.u, .rgp-touch .arm.d { left: 52px; width: 52px; height: 56px; }
.rgp-touch .arm.l, .rgp-touch .arm.r { top: 52px; width: 56px; height: 52px; }
.rgp-touch .arm.u { top: 0; border-radius: 10px 10px 0 0; border-bottom: 0; }
.rgp-touch .arm.d { bottom: 0; border-radius: 0 0 10px 10px; border-top: 0; }
.rgp-touch .arm.l { left: 0; border-radius: 10px 0 0 10px; border-right: 0; }
.rgp-touch .arm.r { right: 0; border-radius: 0 10px 10px 0; border-left: 0; }
.rgp-touch .hub { left: 52px; top: 52px; width: 52px; height: 52px; border: 0; }
.rgp-touch .arm::after { content: ""; position: absolute; left: 50%; top: 50%; border: 7px solid transparent; transform: translate(-50%, -50%); }
.rgp-touch .arm.u::after { border-bottom-color: rgba(255, 255, 255, .55); margin-top: -4px; }
.rgp-touch .arm.d::after { border-top-color: rgba(255, 255, 255, .55); margin-top: 4px; }
.rgp-touch .arm.l::after { border-right-color: rgba(255, 255, 255, .55); margin-left: -4px; }
.rgp-touch .arm.r::after { border-left-color: rgba(255, 255, 255, .55); margin-left: 4px; }
.rgp-touch .face { width: 172px; height: 128px; }
.rgp-touch .tb { position: absolute; width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font: 400 17px var(--pixel); color: #fff;
  background: color-mix(in srgb, var(--sys, #fff) 22%, rgba(255, 255, 255, .1)); border: 1.5px solid color-mix(in srgb, var(--sys, #fff) 55%, rgba(255, 255, 255, .35));
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25); }
.rgp-touch .tb[data-b="a"] { right: 0; top: 0; }
.rgp-touch .tb[data-b="b"] { left: 0; bottom: 0; }
.rgp-touch .meta { display: flex; }
.rgp-touch .tp { display: grid; place-items: center; min-width: 78px; height: 34px; padding: 0 12px; border-radius: 16px; font: 400 9px var(--pixel); text-transform: uppercase; color: #fff;
  background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .28); }
.rgp-touch .tp.sh { min-width: 92px; height: 40px; border-radius: 12px; font-size: 13px; }
.rgp-touch .on { background: color-mix(in srgb, var(--neon) 70%, transparent) !important; border-color: var(--neon-2) !important; box-shadow: 0 0 18px -2px rgba(255, 79, 139, .8); }
.rgp-touch.editing .tgrp { opacity: 1; outline: 2px dashed var(--cyan); outline-offset: 8px; border-radius: 14px; cursor: grab; }
.rgp-touch.editing .tgrp.dragging { cursor: grabbing; outline-style: solid; }
.rgp-touch-edit { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); z-index: 2; pointer-events: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
  width: max-content; max-width: calc(100% - 20px); padding: 8px 10px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .8); font-size: 13px; font-weight: 600; }
.rgp-play.touch-editing .rgp-screen-box { opacity: .5; }
.rgp-play.idle { cursor: none; }
.rgp-play.idle .rgp-play-bar { opacity: 0; transform: translateY(-100%); pointer-events: none; }
.rgp-play.idle .rgp-play-foot { opacity: 0; }
.rgp-peek { display: none; }
/* Overlay mode (full screen, phones, small windows; class set by rgp-player.js): the game uses the whole screen and the
   toolbar floats over it, see-through, then hides; a faint handle at the top (or a tap on the picture) brings it back. */
.rgp-play.overlay-ui { background: #000; }
.rgp-play.overlay-ui .rgp-play-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 7; flex-wrap: nowrap; gap: 8px; border: 0; backdrop-filter: none;
  padding: calc(8px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) 18px calc(10px + env(safe-area-inset-left));
  background: linear-gradient(to bottom, rgba(0, 0, 0, .62), rgba(0, 0, 0, .28) 65%, transparent); }
.rgp-play.overlay-ui .rgp-play-bar .rbtn, .rgp-play.overlay-ui .rgp-vol { background: rgba(10, 12, 18, .38); border-color: rgba(255, 255, 255, .2); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.rgp-play.overlay-ui .rgp-play-bar .rbtn:hover { background: rgba(255, 255, 255, .16); }
.rgp-play.overlay-ui .rgp-play-bar > .rbtn .lbl { display: none; }
.rgp-play.overlay-ui .rgp-play-title { text-shadow: 0 1px 3px rgba(0, 0, 0, .8); }
.rgp-play.overlay-ui .rgp-play-title .sub { display: none; }
.rgp-play.overlay-ui .rgp-play-tools { width: auto; order: 0; }
.rgp-play.overlay-ui .rgp-stage { position: absolute; inset: 0; padding: 0; }
.rgp-play.overlay-ui .rgp-screen-box { box-shadow: none; }
.rgp-play.overlay-ui .rgp-play-foot { position: absolute; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 6; padding: 0; pointer-events: none; }
.rgp-play.overlay-ui .rgp-play-foot .keys { display: none; }
.rgp-play.overlay-ui .rgp-display-pop, .rgp-play.overlay-ui .rgp-states-pop { top: calc(58px + env(safe-area-inset-top)); z-index: 8; }
.rgp-play.overlay-ui .rgp-states-pop { max-height: calc(100% - 70px - env(safe-area-inset-top)); }
.rgp-play.overlay-ui.idle .rgp-peek { display: flex; }
.rgp-peek { position: absolute; left: 50%; top: calc(4px + env(safe-area-inset-top)); z-index: 7; transform: translateX(-50%); gap: 4px; align-items: center; justify-content: center;
  width: 54px; height: 26px; padding: 0; border-radius: 13px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(10, 12, 18, .3); opacity: .55; cursor: pointer; }
.rgp-peek i { width: 5px; height: 5px; border-radius: 50%; background: #fff; }
.rgp-display-pop .vol-row { display: none; }
@media (max-width: 720px) {
  .rgp-play-bar > .rbtn .lbl { display: none; }
  .rgp-play-title .sub { display: none; }
  .rgp-play-bar .rgp-vol { display: none; }
  .rgp-display-pop .vol-row { display: flex; }
  .rgp-play-tools { gap: 5px; }
  .rgp .rgp-play-tools .rbtn.icon, .rgp .rgp-play-bar > .rbtn { width: 38px; min-height: 38px; padding: 0; justify-content: center; }
  .rgp-play-tools [data-p="qsave"], .rgp-play-tools [data-p="qload"] { display: none; }
  .rgp-slot { grid-template-columns: 60px minmax(0, 1fr); }
  .rgp-slot .thumb { width: 60px; }
  .rgp-slot .acts { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 440px) {
  .rgp-play-title b { display: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .rgp-hero { grid-template-columns: 1fr; gap: 36px; }
  .rgp-console { width: min(100%, 360px); }
  .rgp-systems { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rgp-cols { grid-template-columns: 1fr; }
  .rgp-side { position: static; flex-direction: row; overflow-x: auto; }
  .rgp-side button { flex: none; }
}
@media (max-width: 720px) {
  .rgp-wrap { padding-left: 16px; padding-right: 16px; }
  .rgp-view { padding-top: 26px; }
  .rgp-top .rgp-wrap { height: auto; flex-wrap: wrap; gap: 6px 10px; padding-block: 10px 0; }
  .rgp-nav { order: 3; flex-basis: 100%; padding-bottom: 6px; }
  .rgp-nav button[aria-current="page"]::after { bottom: -6px; }
  .rgp-top-actions { margin-left: auto; }
  .rgp-top-actions .rbtn .lbl { display: none; }
  .rgp-steps { grid-template-columns: 1fr; }
  .rgp-onboard { padding: 20px; }
  .rgp-continue { grid-template-columns: 110px minmax(0, 1fr); }
  .rgp-continue > .rbtn { grid-column: 1 / -1; }
  .rgp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .rgp-row { grid-auto-columns: minmax(150px, 46%); gap: 12px; }
  .rgp-card-body { padding: 10px 11px 12px; }
  .rgp-card h3 { font-size: 14px; }
  .rgp-card-actions .rbtn.sm.more { display: none; }
  .rgp-field { grid-template-columns: 1fr; }
  .rgp-field .ctl { grid-column: 1; grid-row: auto; flex-wrap: wrap; }
  .rgp-modal-body, .rgp-modal-head { padding: 16px; }
  .rgp-modal-foot { flex-direction: column-reverse; align-items: stretch; }
  .rgp-modal-foot .rbtn { width: 100%; }
}
@media (max-width: 420px) {
  .rgp-systems { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rgp-sys { padding: 14px; }
  .rgp-hero-cta .rbtn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .rgp *, .rgp *::before, .rgp *::after { animation: none !important; transition: none !important; }
}
/* Continue where you left off (2026-11-13) */
.rgp-overlay.resume { background: rgba(5, 6, 10, .55); isolation: isolate; gap: 10px; }
.rgp-overlay.resume .pic { position: absolute; inset: 0; z-index: -1; background: #07080c center / cover no-repeat; image-rendering: pixelated; filter: brightness(.4) saturate(.8); }
.rgp-overlay.resume .px { color: #fff; font-size: 16px; text-shadow: 0 0 18px color-mix(in srgb, var(--sys, var(--neon)) 80%, transparent); }
.rgp-overlay.resume .msg { color: #e6e9f2; }
.rgp-overlay.resume .msg b { color: #fff; }
/* The generated "More games" links sit directly in main.rgp-page (no .container), so centre them like other pages. */
.rgp-page > .related { max-width: 1240px; margin-inline: auto; padding-inline: 24px; box-sizing: border-box; }
@media (max-width: 720px) { .rgp-page > .related { padding-inline: 16px; } }
