/* ==========================================================
   POCKET BOY 90 — Minimal Emulator UI
   Game-first layout. Everything else is secondary.
   ========================================================== */

:root {
  --bg: #1a1c1a;
  --surface: #222422;
  --surface-2: #2a2e2a;
  --surface-3: #343834;
  --border: #3c3e38;
  --border-light: #4a4e44;
  --ink: #dcd8c8;
  --ink-soft: #8a8678;
  --ink-dim: #5a5850;
  --screen-darkest: #0f380f;
  --screen-dark: #306230;
  --screen-light: #8bac0f;
  --screen-lightest: #9bbc0f;
  --btn-ab: #592050;
  --btn-ab-light: #7a3468;
  --power-red: #c4102e;
  --accent-blue: #4080c0;
  --accent-red: #c45040;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --radius: 10px;
  --radius-sm: 7px;
}

/* Light theme */
:root[data-theme="light"] {
  --bg: #c4c0b0;
  --surface: #d4d0c4;
  --surface-2: #dcd8cc;
  --surface-3: #e4e0d6;
  --border: #a8a498;
  --border-light: #b8b4a8;
  --ink: #1e1e22;
  --ink-soft: #6b675c;
  --ink-dim: #908c80;
  --shadow: 0 4px 20px rgba(30,28,24,0.15);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body {
  font-family: "IBM Plex Mono", "Courier New", monospace;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a, button, select, iframe { font: inherit; }
button, select { border: 0; cursor: pointer; }
a { color: var(--ink); text-decoration: none; }

a, button {
  transition: transform 0.12s ease, box-shadow 0.12s ease,
              background-color 0.12s ease, border-color 0.12s ease,
              color 0.12s ease, opacity 0.12s ease;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== APP LAYOUT ===== */
.app-layout {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100dvh;
  overflow: hidden;
}

/* --- Immersive mode (default): hide shell chrome, iframe fills all --- */
.gb-chrome { display: none; }

.gb-shell {
  width: 100%;
  height: 100%;
}

.gb-inner {
  width: 100%;
  height: 100%;
}

.gb-screen-bezel {
  width: 100%;
  height: 100%;
}

/* --- Console mode: show the Game Boy shell --- */
.app-layout.console-mode {
  height: auto;
  min-height: 100dvh;
  overflow: auto;
}

.app-layout.console-mode .emu-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--bg);
}

.app-layout.console-mode .gb-chrome { display: block; }

.app-layout.console-mode .gb-shell {
  width: var(--gb-w);
  height: auto;
  border-radius: 12px 12px 12px 60px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.4),
    0 2px 8px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.15);
  user-select: none;
}

.app-layout.console-mode .gb-inner {
  width: auto;
  height: auto;
  padding: 16px 20px 28px;
  background: linear-gradient(180deg, var(--gb-bg-light) 0%, var(--gb-bg) 30%, var(--gb-bg-dark) 100%);
  position: relative;
}

.app-layout.console-mode .gb-screen-bezel {
  width: auto;
  height: auto;
  border-radius: 6px;
  overflow: hidden;
  background: #0f380f;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5);
  aspect-ratio: 160 / 144;
  margin: 0 12px 14px;
}

.app-layout.console-mode .emu-frame {
  background: #0f380f;
}

/* ===== TOP BAR ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.power-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--power-red);
  box-shadow: 0 0 8px rgba(196,16,46,0.5);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(196,16,46,0.4); }
  50% { box-shadow: 0 0 12px rgba(196,16,46,0.8); }
}

.topbar-logo {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.topbar-90 {
  color: var(--screen-light);
}

.topbar-center { flex-shrink: 0; }
.topbar-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

/* Game toggle */
.game-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}

.toggle-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  border: none;
  border-right: 1px solid var(--border);
}

.toggle-btn:last-child { border-right: none; }

.toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.15s ease;
}

.toggle-btn.active {
  background: var(--surface-2);
  color: var(--ink);
}

.toggle-blue.active .toggle-dot { background: var(--accent-blue); }
.toggle-red.active .toggle-dot { background: var(--accent-red); }

/* Toolbar buttons */
.toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-soft);
  padding: 0;
}

.toolbar-btn:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* Theme toggle icons */
.icon-sun { display: none; }
:root[data-theme="light"] .icon-sun { display: block; }
:root[data-theme="light"] .icon-moon { display: none; }

/* ===== EMULATOR MAIN ===== */
.emu-main {
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  background: var(--screen-darkest);
}

.emu-screen {
  width: 100%;
  height: 100%;
}

.emu-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: linear-gradient(180deg, rgba(155,188,15,0.05) 0%, rgba(15,56,15,0.1) 100%);
}

/* ===== BOTTOM BAR ===== */
.bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 10;
}

.bottombar-left, .bottombar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.speed-controls {
  display: flex;
  gap: 3px;
}

.speed-btn {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 700;
}

.speed-btn:hover {
  color: var(--ink-soft);
  border-color: var(--border-light);
}

.speed-btn-active {
  background: var(--screen-dark);
  border-color: var(--screen-dark);
  color: var(--screen-lightest);
}

.bottombar-playtime {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-dim);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bottombar-link {
  font-size: 11px;
  color: var(--ink-dim);
  font-weight: 600;
}

.bottombar-link:hover { color: var(--ink-soft); }

/* ===== GAME BOY SHELL ===== */
.gb-shell {
  --gb-w: min(380px, calc(100vw - 32px));
  --gb-bg: #bdb9aa;
  --gb-bg-light: #ccc8b8;
  --gb-bg-dark: #a8a496;
  --gb-bezel: #585464;
  --gb-bezel-dark: #3c3840;
  --gb-btn-color: #592050;
  --gb-dpad-color: #202024;
  --gb-pill-color: #6c6878;
}

:root[data-theme="light"] .gb-shell {
  --gb-bg: #c8c4b4;
  --gb-bg-light: #d8d4c6;
  --gb-bg-dark: #b0ac9c;
}

.gb-power-strip {
  height: 6px;
  background: linear-gradient(90deg, var(--gb-bg) 0%, var(--gb-bg) 18%, #c4102e 18%, #c4102e 30%, var(--gb-bg) 30%);
}

.app-layout.console-mode .gb-screen-surround {
  padding: 10px 12px 0;
  margin-bottom: 0;
}

/* Combined screen area (surround + bezel) with background */
.app-layout.console-mode .gb-screen-surround,
.app-layout.console-mode .gb-screen-bezel {
  position: relative;
  z-index: 1;
}

/* Background behind surround + bezel */
.app-layout.console-mode .gb-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(100% - 180px);
  border-radius: 10px 10px 10px 40px;
  background: linear-gradient(180deg, var(--gb-bezel) 0%, var(--gb-bezel-dark) 100%);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.25);
  z-index: 0;
}

.gb-screen-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding-left: 4px;
}

.gb-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--power-red);
  box-shadow: 0 0 6px rgba(196,16,46,0.6);
  animation: pulse 2.5s ease-in-out infinite;
}

.gb-screen-label {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

/* gb-screen-bezel base: no styles in immersive (handled at top of file) */

.gb-screen-bezel iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Brand text */
.gb-brand-wrap {
  text-align: center;
  padding: 10px 0 6px;
}

.gb-brand {
  font-size: 11px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: #4a4640;
  letter-spacing: 0.06em;
}

.gb-brand-bold {
  font-family: "Arial Black", "Helvetica Neue", sans-serif;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: #2a2824;
}

.gb-tm { font-size: 7px; vertical-align: super; }

/* Controls */
.gb-controls-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px 4px;
}

/* D-pad */
.gb-dpad {
  position: relative;
  width: 70px;
  height: 70px;
}

.gb-dpad-h {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 24px;
  border-radius: 4px;
  background: var(--gb-dpad-color);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
}

.gb-dpad-v {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 24px;
  height: 100%;
  border-radius: 4px;
  background: var(--gb-dpad-color);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2);
}

.gb-dpad-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 24px;
  height: 24px;
  background: var(--gb-dpad-color);
}

/* A/B buttons */
.gb-ab {
  display: flex;
  gap: 10px;
  transform: rotate(-25deg);
}

.gb-btn-a, .gb-btn-b {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg, #7a3468 0%, var(--gb-btn-color) 100%);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.3), 0 3px 6px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gb-btn-a span, .gb-btn-b span {
  font-size: 10px;
  font-weight: 800;
  color: rgba(255,255,255,0.5);
  transform: rotate(25deg);
}

/* Start/Select + Speaker */
.gb-meta-area {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 8px 10px 0;
}

.gb-start-select {
  display: flex;
  gap: 12px;
}

.gb-pill {
  width: 32px;
  height: 10px;
  border-radius: 5px;
  background: var(--gb-pill-color);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.2);
  transform: rotate(-25deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gb-pill span {
  font-size: 5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.35);
  transform: rotate(25deg);
}

/* Speaker grille */
.gb-speaker {
  display: flex;
  gap: 4px;
  transform: rotate(-25deg);
}

.gb-speaker-line {
  width: 3px;
  height: 28px;
  border-radius: 2px;
  background: var(--gb-bg-dark);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}

/* Layout toggle icons */
.icon-to-immersive { display: none; }
.app-layout.console-mode .icon-to-console { display: none; }
.app-layout.console-mode .icon-to-immersive { display: block; }

.bottombar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--ink-dim);
  padding: 0;
}

.bottombar-toggle:hover { color: var(--ink-soft); border-color: var(--border-light); }

/* Windowed icon shown in immersive mode, immersive icon shown in windowed mode */
.icon-immersive { display: none; }
.app-layout.windowed .icon-windowed { display: none; }
.app-layout.windowed .icon-immersive { display: block; }

/* ===== DRAWER (Cheats) ===== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
  transition: opacity 0.2s ease;
}

.drawer-backdrop[hidden] { display: none; }

.drawer-panel {
  width: min(380px, 90vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  animation: slideIn 0.2s ease-out;
  overflow: hidden;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-header h2 {
  margin: 0;
  font-family: "Arial Black", "Helvetica Neue", sans-serif;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.cheat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 16px 6px;
  flex-shrink: 0;
}

.cheat-filter {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: transparent;
  color: var(--ink-dim);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cheat-filter:hover { color: var(--ink-soft); border-color: var(--border-light); }

.cheat-filter.active {
  background: var(--screen-dark);
  border-color: var(--screen-dark);
  color: var(--screen-lightest);
}

.cheat-search {
  margin: 0 16px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  flex-shrink: 0;
}

.cheat-search::placeholder { color: var(--ink-dim); }
.cheat-search:focus { outline: none; border-color: var(--screen-dark); }

.cheat-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.cheat-empty {
  text-align: center;
  padding: 24px 0;
  color: var(--ink-dim);
  font-size: 12px;
}

/* Cheat card */
.cc-card {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.cc-card:hover {
  border-color: var(--screen-dark);
  background: rgba(139,172,15,0.04);
}

.cc-card.copied {
  border-color: var(--screen-light);
  background: rgba(139,172,15,0.08);
}

.cc-top { display: flex; align-items: center; gap: 5px; }

.cc-cat {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.cc-cat-items { background: #f0d860; color: #5a4800; }
.cc-cat-combat { background: #e06050; color: #fff; }
.cc-cat-explore { background: #50a0d0; color: #fff; }
.cc-cat-progress { background: #60b860; color: #fff; }
.cc-cat-debug { background: #a080c0; color: #fff; }

.cc-type { font-size: 9px; font-weight: 600; color: var(--ink-dim); text-transform: uppercase; }
.cc-label { font-size: 12px; font-weight: 700; line-height: 1.3; }

.cc-code {
  display: block;
  padding: 3px 6px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--screen-lightest), var(--screen-light));
  color: var(--screen-darkest);
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  overflow-wrap: anywhere;
}

.cc-note { margin: 0; font-size: 10px; line-height: 1.4; color: var(--ink-dim); }

.cc-copied-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--screen-dark);
  color: var(--screen-lightest);
  font-size: 9px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}

.cc-card.copied .cc-copied-badge { opacity: 1; transform: scale(1); }

.copy-feedback {
  padding: 0 16px;
  font-size: 11px;
  color: var(--screen-dark);
  font-weight: 600;
  min-height: 20px;
  flex-shrink: 0;
}

.drawer-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-danger-btn {
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(152,40,32,0.3);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent-red);
  font-size: 11px;
  font-weight: 700;
}

.drawer-danger-btn:hover {
  background: rgba(196,80,64,0.08);
}

/* ===== CONTROLS OVERLAY ===== */
.controls-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.controls-overlay[hidden] { display: none; }

.controls-modal {
  width: min(400px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  color: var(--ink);
}

.controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.controls-header h2 {
  margin: 0;
  font-family: "Arial Black", sans-serif;
  font-size: 1rem;
  font-weight: 900;
}

.controls-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.controls-table th, .controls-table td { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--border); }
.controls-table th { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-dim); }
.controls-table td:first-child { font-weight: 700; }

.controls-table kbd {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
}

.controls-note { margin: 12px 0 0; font-size: 11px; color: var(--ink-dim); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--screen-darkest);
  color: var(--screen-lightest);
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  pointer-events: none;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== FULLSCREEN ===== */
.app-layout:fullscreen,
.app-layout:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
}

/* ===== PLAYER PAGE (player.html) ===== */
.player-page { background: var(--bg); }

.player-layout {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.player-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: min(1120px, calc(100vw - 32px));
  margin: 12px auto 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.player-bar strong { display: block; font-size: 14px; }
.player-meta { display: block; margin-top: 4px; line-height: 1.5; font-size: 11px; color: var(--ink-soft); }

.player-host {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 12px 0 20px;
}

.emulator-shell {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.emulator-mount {
  width: 100%;
  height: clamp(440px, calc(100dvh - 160px), 880px);
  border-radius: 6px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--screen-lightest), var(--screen-light));
}

.player-message { margin-top: 10px; line-height: 1.6; font-size: 12px; color: var(--ink-soft); }
.player-message.error { color: var(--accent-red); }

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
  font-size: 12px;
}

.secondary-link:hover { background: var(--surface-3); color: var(--ink); }

/* Embedded player */
.player-page-embedded .player-bar { display: none; }
.player-page-embedded .player-host { width: 100%; padding: 0; }
.player-page-embedded .emulator-shell { padding: 0; border: 0; box-shadow: none; background: transparent; }
.player-page-embedded .emulator-mount { height: 100dvh; border-radius: 0; }
.player-page-embedded .player-message { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .topbar { padding: 6px 10px; gap: 8px; }
  .topbar-logo { font-size: 12px; }
  .toggle-btn { padding: 4px 10px; font-size: 11px; }
  .toolbar-btn { width: 28px; height: 28px; }
  .toolbar-btn svg { width: 14px; height: 14px; }
  .topbar-right { gap: 3px; }
  .bottombar { padding: 5px 10px; }
  .drawer-panel { width: 100vw; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
