/* MB Maniax – stránka emulátoru ZX Spectra (/emulator/). V rámečku článku (.is-embed) jen černá plocha s obrazem. */

:root {
  color-scheme: light;
  --bg: #f5f4ef;
  --surface: #ffffff;
  --text: #1c1d1f;
  --muted: #686b71;
  --border: #dddbd2;
  --link: #0a5d8c;
  --header-bg: #121315;
  --header-text: #ecebe6;
  --header-muted: #a3a5aa;
  --zx-red: #c8312e;
  --zx-yellow: #e3aa00;
  --zx-green: #2f8f46;
  --zx-cyan: #1789b8;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131416;
  --surface: #1b1c1f;
  --text: #e9e8e3;
  --muted: #9c9fa5;
  --border: #2e3035;
  --link: #74bbe6;
  --header-bg: #0b0c0d;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
}
a { color: var(--link); }

.emu-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 12px 16px;
  background: var(--header-bg);
  color: var(--header-text);
}
.emu-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; font-weight: 700; text-decoration: none; }
.emu-head-sub { color: var(--header-muted); font-size: 14px; }
.emu-stripe {
  display: inline-block;
  width: 30px;
  height: 16px;
  background: linear-gradient(115deg, transparent 0 24%, var(--zx-red) 24% 38%, var(--zx-yellow) 38% 52%,
    var(--zx-green) 52% 66%, var(--zx-cyan) 66% 80%, transparent 80%);
}

.emu-main { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 18px 16px 8px; }
.emu-title { margin: 0 0 14px; }
.emu-title h1 { margin: 0; font-size: 1.5rem; line-height: 1.25; overflow-wrap: anywhere; }
.emu-meta { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.emu-screen { display: flex; justify-content: center; }
.emu-screen canvas { image-rendering: pixelated; }
.emu-help { max-width: 640px; margin: 14px auto 8px; color: var(--muted); font-size: 14px; text-align: center; }
.emu-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 24px; margin: 0 0 12px; }
.emu-volume { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.emu-volume input { width: 140px; accent-color: var(--link); }
.emu-volume-value { min-width: 3.2em; font-variant-numeric: tabular-nums; }
.emu-btn {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  text-decoration: none;
}
.emu-btn:hover { border-color: var(--muted); }
.emu-sound {
  width: fit-content;
  margin: 10px auto 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.emu-noscript { text-align: center; }
.emu-missing { text-align: center; padding-top: 48px; }
.emu-missing h1 { font-size: 1.4rem; }
.emu-foot { padding: 14px 16px 18px; color: var(--muted); font-size: 13px; text-align: center; }

/* V rámečku článku: obraz přes celou plochu, nic dalšího. */
.is-embed, .is-embed body { height: 100%; overflow: hidden; background: #000; }
.is-embed body { display: block; min-height: 0; }
.is-embed .emu-main { max-width: none; height: 100%; padding: 0; }
.is-embed .emu-screen { height: 100%; align-items: center; }
.is-embed .emu-sound {
  position: fixed;
  left: 50%;
  bottom: 10px;
  margin: 0;
  transform: translateX(-50%);
  background: rgba(18, 19, 21, 0.85);
  border-color: transparent;
  color: #ecebe6;
  pointer-events: none;
}
