/* emulator.st — Arcade OS skin for the PLAY page ("arcadeos" data-theme).
   Refinement pass (2026-10-27): unified monochrome chrome — every control
   is the same quiet glass pill; color enters only as the cyan accent
   (focus/active/volume) and the magenta selection (active slot). Emoji
   glyphs are grayscale-filtered so the bar reads as one system.
   The game canvas pixels are NEVER touched — glows sit on the stage box,
   not the bitmap. Everything is scoped under html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"])
   so every other theme (and the default) renders exactly as before.
   Geometry changes are desktop-only (min-width: 900px) — the session-47
   compact mobile HUD and the landscape-compact rules are left intact. */

html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) body.emu-st-body {
  background:
    radial-gradient(1100px 620px at 80% -8%, rgba(45, 30, 100, 0.28), transparent 62%),
    radial-gradient(900px 520px at 4% 108%, rgba(42, 107, 255, 0.14), transparent 60%),
    #05070f;
}

/* ═══ stage: neon bezel (outside the bitmap only) ═══ */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #emu-st-stage {
  box-shadow:
    0 0 0 1px rgba(37, 244, 238, 0.22),
    0 0 42px rgba(37, 244, 238, 0.12),
    0 0 110px rgba(157, 77, 255, 0.10);
}

/* ═══ HUD bar: dark glass + neon seam ═══ */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud {
  background: rgba(7, 11, 22, 0.86);
  border-bottom: 1px solid rgba(37, 244, 238, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ── one button language: quiet glass pill, monochrome glyph ── */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-btn {
  background: rgba(18, 26, 46, 0.5);
  border: 1px solid rgba(139, 152, 189, 0.22);
  border-radius: 9px;
  color: #cdd7f2;
  white-space: nowrap;
  filter: grayscale(1);
  transition: border-color .15s ease, box-shadow .15s ease,
    background .15s ease, color .15s ease;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-btn:hover {
  background: rgba(28, 40, 70, 0.72);
  border-color: rgba(37, 244, 238, 0.5);
  color: #fff;
  box-shadow: 0 0 12px rgba(37, 244, 238, 0.25);
}
/* the dist inlines a green gradient on Share and a primary fill on Full —
   both become part of the same system (Full keeps a cyan emphasis) */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-btn[data-action="share-game"] {
  background: rgba(18, 26, 46, 0.5) !important;
  border: 1px solid rgba(139, 152, 189, 0.22) !important;
  color: #cdd7f2;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-btn[data-action="share-game"]:hover {
  border-color: rgba(37, 244, 238, 0.5) !important;
  color: #fff;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-btn[data-action="fullscreen"] {
  background: rgba(37, 244, 238, 0.1);
  border-color: rgba(37, 244, 238, 0.4);
  color: var(--accent-bright, #6ef9f5);
  font-weight: 700;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-btn-primary,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-btn-accent {
  background: rgba(37, 244, 238, 0.1);
  border: 1px solid rgba(37, 244, 238, 0.4);
  color: var(--accent-bright, #6ef9f5);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-btn-primary:hover,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-btn-accent:hover {
  box-shadow: 0 0 16px rgba(37, 244, 238, 0.35);
}

/* ── panel buttons read as a menu: uppercase, letterspaced ── */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud .emu-st-btn[data-panel] {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 600;
}

/* ── hairline group separators: slots | transport | panels | share/full ── */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud-right > #emu-st-resume-btn,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud-right > .emu-st-btn[data-panel="saves"],
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud-right > .emu-st-btn[data-action="share-game"] {
  position: relative;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud-right > #emu-st-resume-btn::before,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud-right > .emu-st-btn[data-panel="saves"]::before,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud-right > .emu-st-btn[data-action="share-game"]::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(139, 152, 189, 0.35), transparent);
  pointer-events: none;
}

/* ── title block: compact, uppercase, single system ── */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #emu-st-boxart {
  height: 44px !important;
  border: 1px solid rgba(37, 244, 238, 0.3) !important;
  border-radius: 8px !important;
  box-shadow: 0 0 14px rgba(37, 244, 238, 0.15), 0 3px 8px rgba(0, 0, 0, 0.4) !important;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-title-main {
  font-size: 13px !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  max-width: 30ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-title-sys {
  color: var(--accent-bright, #6ef9f5) !important;
  font-size: 10px !important;
  letter-spacing: 0.24em;
}

/* ── volume: thin cyan slider ── */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #emu-st-volume {
  accent-color: #25f4ee;
  height: 4px;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #emu-st-volume::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(139, 152, 189, 0.28);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #emu-st-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  background: #25f4ee;
  box-shadow: 0 0 8px rgba(37, 244, 238, 0.65);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #emu-st-volume::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(139, 152, 189, 0.28);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #emu-st-volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 50%;
  background: #25f4ee;
  box-shadow: 0 0 8px rgba(37, 244, 238, 0.65);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #emu-st-volume-icon { filter: grayscale(1) opacity(.85); }

/* ── cloud-save badge: status pill with dot ── */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-badge {
  background: rgba(12, 18, 34, 0.7);
  border: 1px solid rgba(139, 152, 189, 0.25);
  border-radius: 20px;
  color: #cdd7f2;
  font-size: 11px;
  letter-spacing: 0.06em;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-badge-sync::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #25f4ee;
  box-shadow: 0 0 6px rgba(37, 244, 238, 0.8);
  vertical-align: middle;
}

/* ── slot strip: quiet squares, active = magenta selection ── */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud-label {
  color: var(--text-dim, #7f8db0);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-slot-mini {
  min-width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(18, 26, 46, 0.5);
  border: 1px solid rgba(139, 152, 189, 0.22);
  color: #cdd7f2;
  font-size: 11px;
  font-weight: 700;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-slot-mini:hover {
  border-color: rgba(37, 244, 238, 0.5);
  color: #fff;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-slot-mini.emu-st-slot-active {
  border-color: rgba(255, 42, 157, 0.7);
  color: #ff7ab0;
  background: rgba(255, 42, 157, 0.08);
  box-shadow: 0 0 12px rgba(255, 42, 157, 0.35);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-pill {
  background: rgba(12, 18, 34, 0.7);
  border: 1px solid rgba(139, 152, 189, 0.25);
  border-radius: 14px;
  color: var(--text-dim, #7f8db0);
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
/* the "Slot N" pill duplicates the magenta-highlighted slot square and its
   two-line wrap crowds the bar — hidden, element stays for JS */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #emu-st-slot-pill { display: none; }

/* ── debug/frame-counter mini pill (bottom-left) ── */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-debug {
  background: rgba(8, 12, 24, 0.9);
  border: 1px solid rgba(37, 244, 238, 0.25);
  border-radius: 10px;
  color: var(--accent-bright, #6ef9f5);
  font-size: 11px;
}

/* mobile HUD menu (☰ dropdown) */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud-mobile-menu {
  background: rgba(10, 15, 28, 0.97);
  border: 1px solid rgba(37, 244, 238, 0.3);
  border-radius: 12px;
  box-shadow: 0 0 26px rgba(37, 244, 238, 0.18), 0 18px 44px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud-mobile-menu .emu-st-btn {
  border: none;
  background: transparent;
}

/* ═══ side panels (saves / settings / cheats / multiplayer) ═══ */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panels {
  background: rgba(4, 6, 13, 0.93);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panel {
  background: linear-gradient(160deg, rgba(14, 20, 38, 0.98), rgba(8, 12, 24, 0.98));
  border: 1px solid rgba(37, 244, 238, 0.28);
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(37, 244, 238, 0.14), 0 28px 70px rgba(0, 0, 0, 0.65);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panel-head {
  border-bottom: 1px solid rgba(37, 244, 238, 0.16);
  background: rgba(10, 15, 28, 0.6);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panel-title {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 12px rgba(37, 244, 238, 0.45);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panel-close {
  border-radius: 50%;
  transition: color .14s ease, border-color .14s ease, box-shadow .14s ease;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panel-close:hover {
  color: #fff;
  border-color: rgba(255, 42, 157, 0.6);
  box-shadow: 0 0 12px rgba(255, 42, 157, 0.35);
}

/* ── panel content: typography + rows ── */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panel-body,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-settings,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-saves,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-cheats {
  background: transparent;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-settings-header,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-saves-header,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-cheats-header,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-settings-eyebrow {
  color: var(--accent-bright, #6ef9f5);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-settings-section-title {
  color: #fff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 12px;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-setting-row,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-settings-field,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-cheat-row {
  border-radius: 9px;
  transition: background .14s ease;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-setting-row:hover,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-settings-field:hover,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-cheat-row:hover {
  background: rgba(37, 244, 238, 0.05);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-settings-section {
  border-bottom: 1px solid rgba(139, 152, 189, 0.12);
}

/* ── buttons inside panels: primary = cyan, ghost = quiet ── */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-btn-ghost {
  background: rgba(18, 26, 46, 0.55);
  border: 1px solid rgba(139, 152, 189, 0.3);
  border-radius: 9px;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-btn-ghost:hover {
  border-color: rgba(37, 244, 238, 0.55);
  box-shadow: 0 0 10px rgba(37, 244, 238, 0.25);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panels .emu-st-btn-primary,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panels .emu-st-btn-accent {
  background: linear-gradient(120deg, #19e3f2, #25f4ee);
  color: #04121a;
  border: none;
  border-radius: 9px;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(37, 244, 238, 0.4);
  filter: none;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panels .emu-st-btn-primary:hover {
  box-shadow: 0 0 26px rgba(37, 244, 238, 0.6);
}

/* ── inputs, selects, checkboxes ── */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-input,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-select {
  background: rgba(5, 8, 16, 0.9);
  border: 1px solid rgba(139, 152, 189, 0.3);
  border-radius: 9px;
  color: var(--text, #e8f0ff);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-input:focus,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-select:focus {
  border-color: rgba(37, 244, 238, 0.6);
  box-shadow: 0 0 10px rgba(37, 244, 238, 0.25);
  outline: none;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panels input[type="checkbox"],
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panels input[type="radio"] {
  accent-color: #25f4ee;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panels input[type="range"] {
  accent-color: #25f4ee;
}

/* ── save slots: active slot glows magenta like the selected cover ── */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-slot-btn {
  border-radius: 9px;
  border: 1px solid rgba(139, 152, 189, 0.25);
  background: rgba(18, 26, 46, 0.5);
  filter: grayscale(1);
  transition: border-color .15s ease, box-shadow .15s ease;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-slot-btn:hover {
  border-color: rgba(37, 244, 238, 0.5);
  box-shadow: 0 0 10px rgba(37, 244, 238, 0.2);
  color: #fff;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-slot-btn.emu-st-slot-active {
  border-color: rgba(255, 42, 157, 0.7);
  box-shadow: 0 0 16px rgba(255, 42, 157, 0.35);
  filter: grayscale(1) brightness(1.25);
}
/* the dist paints the auto-save row solid green — pull it into the system
   with a cyan-tinted emphasis instead */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-slot-row-auto .emu-st-slot-load-auto {
  background: rgba(37, 244, 238, 0.1) !important;
  border: 1px solid rgba(37, 244, 238, 0.45);
  border-radius: 9px;
  color: var(--accent-bright, #6ef9f5);
  font-weight: 700;
  filter: grayscale(1);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-slot-row-auto .emu-st-slot-load-auto:hover {
  background: rgba(37, 244, 238, 0.18) !important;
  box-shadow: 0 0 12px rgba(37, 244, 238, 0.3);
  color: #fff;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-slot-row-auto .emu-st-slot-label {
  color: var(--accent-bright, #6ef9f5);
}

/* ── thin cyan scrollbars inside panel content ── */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panel-body *,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-settings,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-saves,
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-cheats { scrollbar-width: thin; scrollbar-color: rgba(37,244,238,.35) transparent; }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panel ::-webkit-scrollbar { width: 8px; height: 8px; }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panel ::-webkit-scrollbar-track { background: transparent; }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panel ::-webkit-scrollbar-thumb {
  background: rgba(37, 244, 238, 0.3);
  border-radius: 4px;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panel ::-webkit-scrollbar-thumb:hover { background: rgba(37, 244, 238, 0.55); }

/* ═══ toast ═══ */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-toast {
  background: rgba(8, 12, 24, 0.95);
  border: 1px solid rgba(37, 244, 238, 0.65);
  border-radius: 22px;
  box-shadow: 0 0 22px rgba(37, 244, 238, 0.35);
  letter-spacing: 0.04em;
}

/* ═══ pause / loading overlay ═══ */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-overlay {
  background:
    radial-gradient(800px 460px at 50% 38%, rgba(45, 30, 100, 0.18), transparent 65%),
    rgba(4, 6, 13, 0.72);
}

/* ═══ fullscreen control bar ═══ */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-fs-bar {
  background: linear-gradient(to bottom, rgba(5, 7, 15, 0.94), rgba(5, 7, 15, 0.45));
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-fs-bar .emu-st-fs-btn {
  border-radius: 8px;
  filter: grayscale(1);
  transition: box-shadow .15s ease, background .15s ease;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-fs-bar .emu-st-fs-btn:hover {
  box-shadow: 0 0 12px rgba(37, 244, 238, 0.4);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-fs-bar .emu-st-fs-btn-exit:hover {
  box-shadow: 0 0 12px rgba(255, 42, 157, 0.45);
}

/* ═══ theme dropdown popup on the play page ═══ */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .theme-menu {
  background: linear-gradient(160deg, rgba(14, 20, 38, 0.98), rgba(8, 12, 24, 0.98));
  border: 1px solid rgba(37, 244, 238, 0.3);
  border-radius: 12px;
  box-shadow: 0 0 24px rgba(37, 244, 238, 0.18), 0 18px 44px rgba(0, 0, 0, 0.6);
}

/* ═══ quick-settings panel (styles injected by quick-settings-panel.js —
       these selectors out-specify the injected .qs-* rules) ═══ */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-panel {
  background: rgba(4, 6, 13, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-overlay {
  background: linear-gradient(160deg, rgba(14, 20, 38, 0.99), rgba(8, 12, 24, 0.99));
  border: 1px solid rgba(37, 244, 238, 0.28);
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(37, 244, 238, 0.14), 0 28px 70px rgba(0, 0, 0, 0.65);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-header {
  border-bottom: 1px solid rgba(37, 244, 238, 0.2);
  background: rgba(10, 15, 28, 0.65);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-search {
  background: rgba(5, 8, 16, 0.85);
  border: 1px solid rgba(139, 152, 189, 0.28);
  border-radius: 10px;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-search input { color: #e8f0ff; }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-shortcut {
  background: rgba(37, 244, 238, 0.12);
  color: #6ef9f5;
  border-radius: 5px;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-categories {
  background: rgba(8, 12, 24, 0.85);
  border-right: 1px solid rgba(37, 244, 238, 0.16);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-category {
  color: #8b98bd;
  border-radius: 8px;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-category:hover {
  background: rgba(37, 244, 238, 0.08);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-category.active {
  background: rgba(37, 244, 238, 0.14);
  color: #25f4ee;
  box-shadow: inset 2px 0 0 #25f4ee;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-setting-title {
  color: #eef3ff;
  border-bottom: 1px solid rgba(37, 244, 238, 0.18);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-setting-name { color: #eef3ff; }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-setting-desc { color: #8b98bd; }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-setting-item {
  border-bottom: 1px solid rgba(139, 152, 189, 0.14);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-toggle {
  background: rgba(139, 152, 189, 0.3);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-toggle.active {
  background: linear-gradient(120deg, #19e3f2, #25f4ee);
  box-shadow: 0 0 10px rgba(37, 244, 238, 0.5);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-select {
  background: rgba(5, 8, 16, 0.9);
  border: 1px solid rgba(139, 152, 189, 0.3);
  color: #e8f0ff;
  border-radius: 7px;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-btn {
  background: rgba(18, 26, 46, 0.85);
  border: 1px solid rgba(139, 152, 189, 0.3);
  border-radius: 8px;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-btn:hover {
  border-color: rgba(37, 244, 238, 0.5);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-btn.primary {
  background: linear-gradient(120deg, #19e3f2, #25f4ee);
  color: #04121a;
  border: none;
  box-shadow: 0 0 14px rgba(37, 244, 238, 0.4);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-footer {
  border-top: 1px solid rgba(37, 244, 238, 0.16);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-container .qs-resize-handle {
  background: linear-gradient(135deg, transparent 50%, rgba(37, 244, 238, 0.55) 50%);
}

/* ═══ compact Quick Settings (#quick-settings-panel from quick-settings.js).
   Two components share the qs- prefix; quick-settings-panel.js's injected
   .qs-toggle{width:44px}+::after rules collide with THIS panel's labels
   (squeezed labels + a stray knob) in every theme. The id-scoped rules
   below repair the layout and apply the arcade skin under arcadeos. ═══ */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-overlay {
  background: linear-gradient(160deg, rgba(14, 20, 38, 0.99), rgba(8, 12, 24, 0.99));
  border: 1px solid rgba(37, 244, 238, 0.28);
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(37, 244, 238, 0.14), 0 28px 70px rgba(0, 0, 0, 0.65);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-header h3 {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 15px;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-close:hover { color: #fff; }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-item {
  background: rgba(12, 18, 34, 0.85);
  border: 1px solid rgba(139, 152, 189, 0.16);
  border-radius: 10px;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-label { color: #cdd7f2; }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-label > span:first-child { filter: grayscale(1) opacity(.85); }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-value { color: var(--accent-bright, #6ef9f5); }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel input[type="range"] { accent-color: #25f4ee; }
/* repair the collided toggle: full-width label, no foreign knob */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel label.qs-toggle {
  width: auto;
  height: auto;
  position: static;
  color: #cdd7f2;
  gap: 10px;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel label.qs-toggle > span:first-child {
  filter: grayscale(1) opacity(.85);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel label.qs-toggle::after { display: none; }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-slider {
  flex: 0 0 auto;
  background: rgba(139, 152, 189, 0.3);
  border-radius: 12px;
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-slider::after {
  background: #fff;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-toggle input:checked + .qs-slider {
  background: linear-gradient(120deg, #19e3f2, #25f4ee);
  box-shadow: 0 0 10px rgba(37, 244, 238, 0.5);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-shortcuts { border-top-color: rgba(37, 244, 238, 0.16); }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-shortcuts h4 { color: var(--text-dim, #7f8db0); }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-kb-grid { color: #cdd7f2; }
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #quick-settings-panel .qs-kb-grid kbd {
  background: rgba(37, 244, 238, 0.12);
  color: var(--accent-bright, #6ef9f5);
  border-radius: 5px;
}

/* ═══ TouchCtrl mobile controller — arcade glass ═══ */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .tctrl-overlay {
  --tctrl-bar: rgba(16, 26, 48, 0.92);
  --tctrl-tip: rgba(37, 244, 238, 0.95);
  --tctrl-tip-press: #ffffff;
  --tctrl-btn-bg: rgba(12, 18, 34, 0.6);
  --tctrl-btn-border: rgba(37, 244, 238, 0.5);
  --tctrl-btn-press: rgba(255, 42, 157, 0.55);
  --tctrl-text: #eef3ff;
}

/* ═══ tap/click-to-start overlay (inline-styled in the template — override) ═══ */
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #mobileStartOverlay {
  background:
    radial-gradient(600px 360px at 50% 42%, rgba(45, 30, 100, 0.3), transparent 70%),
    rgba(4, 6, 13, 0.62) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #mobileStartOverlay > div:first-child {
  background: linear-gradient(135deg, #19e3f2, #25f4ee) !important;
  color: #04121a !important;
  box-shadow: 0 0 34px rgba(37, 244, 238, 0.65), 0 0 90px rgba(157, 77, 255, 0.35);
}
html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) #mobileStartOverlay > div:last-child {
  color: #eef3ff !important;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 800;
  text-shadow: 0 0 14px rgba(37, 244, 238, 0.6), 0 2px 6px rgba(0, 0, 0, 0.7) !important;
}

/* ═══ desktop-only geometry tightening (mobile compact HUD untouched) ═══ */
@media (min-width: 900px) and (min-height: 501px) {
  html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-btn {
    height: 32px;
    padding: 0 11px;
    font-size: 12px;
  }
  html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud { gap: 8px; }
  html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud-right,
  html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud-left { gap: 6px; }
  /* the slot strip rides inside hud-right (inserted by JS) — keep it tight */
  html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-slot-bar { gap: 5px; margin-right: 2px; }
  /* never let the right cluster wrap or clip: scroll instead, no scrollbar */
  html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud-right {
    overflow-x: auto;
    scrollbar-width: none;
  }
  html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-hud-right::-webkit-scrollbar { display: none; }
}

/* prefers-reduced-motion: no self-added animation beyond transitions */
@media (prefers-reduced-motion: reduce) {
  html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-btn,
  html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-panel-close,
  html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-slot-btn,
  html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .emu-st-slot-mini,
  html:is([data-theme="arcadeos"],[data-theme="arcadeos3d"]) .aos-theme-btn { transition: none; }
}
