/* Vzhled „Moderní“ jen pro 3D verzi (hra-3d.html): písmo Jost, bez rámů, scéna zůstává vidět.
   Titulní obrazovka má text vlevo na ztmaveném přechodu, ostatní panely jsou matné sklo.
   Přepisuje pixelový vzhled ze styles.css. */
:root {
  --bg: #050607;
  --panel: rgba(14, 16, 18, 0.62);
  --line: rgba(255, 255, 255, 0.09);
  --text: #efede8;
  --muted: #a3a09a;
  --accent: #ffb35c;
  --copper: #ffb35c;
  --copper-hi: #ffffff;
  --teal: #9fe0b8;
  --bad: #ff7a66;
  --sans: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
}

html, body { font-family: var(--sans); }
body { background: var(--bg); }
.stage { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75); }

/* ---------- překryv a panely ---------- */
.overlay { background: rgba(4, 5, 6, 0.6); }
.panel {
  background: var(--panel);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: calc(16px * var(--ui-scale));
  line-height: 1.55;
}
.panel.settings, .panel.controls { background: rgba(14, 16, 18, 0.92); }

/* titulní obrazovka: bez panelu, text vlevo, scéna vpravo prosvítá */
.overlay:has(> .panel.title) {
  place-items: center start;
  padding-left: 7%;
  background: linear-gradient(90deg, rgba(4, 5, 6, 0.88) 0%, rgba(4, 5, 6, 0.58) 55%, rgba(4, 5, 6, 0.15) 100%);
}
.panel.title {
  text-align: left;
  width: min(100%, 30em);
  padding: calc(44px * var(--ui-scale)) 0 0;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
}
.panel.title .title, .panel.title .foot { text-align: left; }
.panel.title .foot.credits { margin-top: 0.6em; font-size: 0.68em; opacity: 0.75; }
.foot a { color: inherit; }
.panel.title .lang { top: 0; left: 0; right: auto; }

/* ---------- titulky mluvčích (strážce, Erika) přímo v obraze ---------- */
#subs { position: absolute; left: 50%; bottom: calc(100% * 16 / 256 + 4.5%); transform: translateX(-50%); z-index: 2; width: min(86%, 46em);
  text-align: center; pointer-events: none; opacity: 0; transition: opacity 0.35s ease; font-family: var(--sans); font-size: calc(24px * var(--ui-scale, 1)); }
#subs.on { opacity: 1; }
#subs .who { display: block; margin-bottom: 0.25em; font-size: 0.62em; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); }
#subs .line { display: inline; padding: 0.18em 0.5em; line-height: 1.55; color: #fff; font-weight: 400; background: rgba(5, 6, 8, 0.55);
  box-decoration-break: clone; -webkit-box-decoration-break: clone; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); border-radius: 4px; }

/* ---------- nápis názvu ---------- */
h1.logo3d { margin: 0 0 0.6em; line-height: 1; font-weight: 300; text-transform: uppercase; color: #fff; }
h1.logo3d span { display: block; white-space: nowrap; }
h1.logo3d svg.x4 { display: inline-block; width: 0.7285em; height: 0.7em; vertical-align: baseline; overflow: visible; }
h1.logo3d .l1 { font-size: 1.15em; font-weight: 400; letter-spacing: 0.5em; color: var(--accent); margin-left: -0.04em; }
/* R a E mají v písmu Jost levý okraj písmene (u R při 3,6em asi 6 px): optická korekce na hranu textu pod nimi */
h1.logo3d .l2 { font-size: 3.6em; letter-spacing: 0.14em; margin-top: 0.15em; margin-left: -0.064em; }
.orn { width: 3em; height: 2px; background: var(--accent); margin: 0 0 1.2em; }
.orn i { display: none; }
.panel.title .lead { margin: 0 0 1.6em; max-width: 26em; color: var(--muted); text-align: left; text-wrap: pretty; }

/* ---------- písmo ---------- */
h2 { font-weight: 300; font-size: calc(30px * var(--ui-scale)); letter-spacing: 0.2em; color: #fff; }
h2.bad { color: var(--bad); }
/* hotový level i konec hry v barvě loga; smrt zůstává červená */
h2.good { color: var(--accent); }
h3 { font-weight: 600; font-size: 0.72em; letter-spacing: 0.2em; color: var(--accent); }
.kicker { color: var(--accent); }
.note, .foot, th, .group > span, .slider output { color: var(--muted); }

/* ---------- tlačítka ---------- */
button {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.9em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  border-radius: 2em;
  padding: 0.65em 1.6em;
}
button:hover { background: rgba(255, 255, 255, 0.12); border-color: transparent; }
button:focus-visible { background: rgba(255, 255, 255, 0.16); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7); }
button.primary { color: #1a1209; background: var(--accent); }
button.primary:hover { background: #ffc47e; }
button.primary:focus-visible { background: #ffc47e; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
button:disabled { opacity: 1; color: #67645f; background: rgba(255, 255, 255, 0.03); }
button:disabled:hover { background: rgba(255, 255, 255, 0.03); }
.buttons.col { gap: 8px; width: max-content; max-width: 100%; margin-left: auto; margin-right: auto; align-items: stretch; }
.buttons.col button { min-width: 15em; }

/* tlačítka na titulce: řádky s linkou vlevo */
.panel.title .buttons.col { width: auto; margin-left: 0; margin-right: 0; gap: 2px; }
.panel.title .buttons.col button {
  text-align: left;
  min-width: 0;
  background: transparent;
  border-left: 2px solid transparent;
  border-radius: 0;
  padding: 0.6em 1em;
}
.panel.title .buttons.col button.primary { color: var(--accent); border-left-color: var(--accent); }
.panel.title .buttons.col button:hover,
.panel.title .buttons.col button:focus-visible { background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent); border-left-color: #fff; box-shadow: none; }
.panel.title .buttons.col button:disabled { color: #67645f; background: transparent; border-left-color: transparent; }

button.mini, .panel .lang {
  font-size: 0.72em;
  letter-spacing: 0.08em;
  text-transform: none;
  padding: 0.35em 0.9em;
  color: var(--muted);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
button.mini:hover, .panel .lang:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.4); }
svg.lock { width: 0.8em; height: 0.9em; vertical-align: -0.08em; margin-left: 0.5em; }

/* ---------- tabulky, klávesy ---------- */
kbd { font-family: var(--sans); font-weight: 500; color: var(--text); background: #24262a; border: 0; border-radius: 0.4em; padding: 1px 7px; }
td, th { border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.stats td:last-child { color: var(--accent); font-weight: 500; }
.tips li::marker { color: var(--accent); }
.bindings button.bind { font-size: 0.85em; letter-spacing: 0.02em; text-transform: none; color: var(--text); background: #24262a; border-radius: 0.4em; }
.bindings button.bind:hover { background: #2f3236; }
.bindings button.capturing { color: #1a1209; background: var(--accent); }
@keyframes pulse { 50% { background: #ffd29c; } }

/* ---------- přepínače a posuvníky ---------- */
input[type="checkbox"], input[type="radio"] { appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer; }
input[type="checkbox"] {
  position: relative;
  width: 2em;
  height: 1.1em;
  border-radius: 1em;
  background: #34363a;
  transition: background 0.15s;
}
input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 0.15em;
  left: 0.15em;
  width: 0.8em;
  height: 0.8em;
  border-radius: 50%;
  background: #9a9a9a;
  transition: left 0.15s;
}
input[type="checkbox"]:checked { background: var(--accent); }
input[type="checkbox"]:checked::after { left: 1.05em; background: #fff; }
input[type="radio"] { display: inline-grid; place-items: center; width: 1em; height: 1em; border-radius: 50%; border: 1.5px solid #6b6b6b; }
input[type="radio"]:checked { border-color: var(--accent); }
input[type="radio"]:checked::after { content: ""; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--accent); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 1px solid #fff; outline-offset: 2px; }
input[type="range"] { appearance: none; -webkit-appearance: none; height: 1.2em; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: #34363a; }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: #34363a; }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 1em; height: 1em; margin-top: calc(-0.5em + 2px); border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
input[type="range"]::-moz-range-thumb { width: 1em; height: 1em; border: 0; border-radius: 50%; background: #fff; }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(255, 179, 92, 0.6); }
input:disabled { opacity: 0.4; cursor: default; }
@media (prefers-reduced-motion: reduce) {
  input[type="checkbox"], input[type="checkbox"]::after { transition: none; }
}

/* ---------- stavový řádek pod obrazem ---------- */
.bar { font-family: var(--sans); font-size: 14px; }
.room { font-weight: 500; font-size: 12px; letter-spacing: 0.18em; color: var(--accent); }
