/* ============================================================
   Dorfgemeinschaft – Panel
   Farbwelt folgt der Ingame-Tageszeit. Blockoptik entsteht aus
   Bevel-Kanten (hell oben, dunkel unten), nicht aus Fremdtexturen.
   ============================================================ */

:root {
  /* Grundfläche: Stein/Erde, bewusst entsättigt, damit der Himmel trägt */
  --stone-900: #14161b;
  --stone-800: #1c2027;
  --stone-700: #262b34;
  --stone-600: #333944;
  --stone-500: #4a515e;
  --ink:       #e8eaee;
  --ink-dim:   #9aa2b1;

  --grass:     #6aa84f;
  --grass-lit: #8bc34a;
  --ember:     #d98324;
  --danger:    #c0483c;

  /* Wird per JS überschrieben */
  --sky-top:    #4a8fd4;
  --sky-bottom: #a7d3f2;
  --sky-ink:    #10243a;
  --glow:       #ffd97a;

  --bevel-light: rgba(255, 255, 255, .16);
  --bevel-dark:  rgba(0, 0, 0, .45);

  --pad: clamp(16px, 4vw, 32px);
  --radius: 2px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--stone-900);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ---------- Himmelsleiste ---------- */

.sky {
  position: relative;
  overflow: hidden;
  padding: calc(var(--pad) + env(safe-area-inset-top)) var(--pad) 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 100%);
  transition: background 2.5s linear;
  isolation: isolate;
}

/* Sterne: nur nachts sichtbar */
.sky__stars {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 2.5s linear;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #fff, transparent),
    radial-gradient(1px 1px at 28% 12%, #fff, transparent),
    radial-gradient(1px 1px at 44% 30%, #fff, transparent),
    radial-gradient(1px 1px at 61% 16%, #fff, transparent),
    radial-gradient(1px 1px at 76% 34%, #fff, transparent),
    radial-gradient(1px 1px at 88% 20%, #fff, transparent),
    radial-gradient(1px 1px at 34% 44%, #fff, transparent),
    radial-gradient(1px 1px at 68% 48%, #fff, transparent);
}
body[data-phase='night'] .sky__stars { opacity: .85; }

/* Sonne bzw. Mond: eckig, Position folgt dem Tick-Stand */
.sky__body {
  position: absolute;
  width: 44px; height: 44px;
  left: 50%; top: 50%;
  background: var(--glow);
  box-shadow: 0 0 60px 18px var(--glow);
  transition: left 2.5s linear, top 2.5s linear, background 2.5s linear;
  pointer-events: none;
}

/* Horizontlinie als Blockkante */
.sky__ridge {
  position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  background: var(--grass);
  box-shadow: inset 0 3px 0 var(--grass-lit), 0 3px 0 rgba(0, 0, 0, .35);
}

.sky__content {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding-bottom: calc(var(--pad) + 20px);
  text-align: center;
  color: var(--sky-ink);
  transition: color 2.5s linear;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 0 0 .4em;
  opacity: .8;
}

.worldname {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 9vw, 4.2rem);
  line-height: 1;
  margin: 0 0 .5em;
  letter-spacing: .01em;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, .18);
}

/* Weltalter: sechs Blöcke, live mitlaufend */
.age {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  max-width: 640px;
  margin: 0 auto;
}
.age__unit {
  background: rgba(12, 16, 22, .72);
  color: #f2f4f7;
  padding: 10px 2px 8px;
  border-radius: var(--radius);
  box-shadow: inset 0 2px 0 var(--bevel-light), inset 0 -3px 0 var(--bevel-dark);
}
.age__unit b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4.6vw, 1.9rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.age__unit span {
  display: block;
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .65;
}
.age__note {
  font-family: var(--font-mono);
  font-size: .68rem;
  opacity: .7;
  margin: .7em 0 0;
}

/* Adresse zum Antippen */
.address { margin-top: 1.4em; }
.address__btn {
  font: inherit;
  cursor: pointer;
  background: rgba(12, 16, 22, .72);
  color: #f2f4f7;
  border: 0;
  border-radius: var(--radius);
  padding: 12px 22px;
  box-shadow: inset 0 2px 0 var(--bevel-light), inset 0 -3px 0 var(--bevel-dark);
  transition: transform .08s ease;
}
.address__btn:active { transform: translateY(2px); }
.address__label,
.address__hint {
  display: block;
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .6;
}
.address__value {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(.85rem, 3.4vw, 1.05rem);
  font-weight: 600;
  padding: 2px 0 4px;
  word-break: break-all;
}

/* ---------- Inhaltsflächen ---------- */

main {
  max-width: 980px;
  margin: 0 auto;
  padding: var(--pad) var(--pad) 0;
  display: grid;
  gap: var(--pad);
}

.panel {
  background: var(--stone-800);
  border-radius: var(--radius);
  padding: clamp(16px, 3.5vw, 26px);
  box-shadow: inset 0 2px 0 var(--bevel-light), inset 0 -3px 0 var(--bevel-dark);
}

.panel__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 .2em;
}
.panel__lead { color: var(--ink-dim); margin: 0 0 1.1em; font-size: .92rem; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}
.stats--tight { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }

.stat {
  background: var(--stone-700);
  border-radius: var(--radius);
  padding: 11px 12px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .07), inset 0 -3px 0 rgba(0, 0, 0, .3);
}
.stat__label {
  display: block;
  font-family: var(--font-mono);
  font-size: .6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.28rem;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.stat--up .stat__value { color: var(--grass-lit); }
.stat--down .stat__value { color: var(--danger); }

/* ---------- Karte ---------- */

.map {
  aspect-ratio: 16 / 9;
  background: var(--stone-700);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .3);
}
.map__empty {
  color: var(--ink-dim);
  font-size: .88rem;
  max-width: 42ch;
  text-align: center;
  padding: 20px;
  margin: 0;
}
.map iframe { width: 100%; height: 100%; border: 0; }
code {
  font-family: var(--font-mono);
  font-size: .85em;
  background: var(--stone-900);
  padding: 1px 5px;
  border-radius: 2px;
}

/* ---------- Formular und Knöpfe ---------- */

.form { display: grid; gap: 12px; max-width: 380px; }
.field { display: grid; gap: 5px; }
.field > span {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
input[type='text'], input[type='password'], input[type='number'], select {
  font: inherit;
  font-family: var(--font-mono);
  font-size: .92rem;
  background: var(--stone-900);
  color: var(--ink);
  border: 0;
  border-radius: var(--radius);
  padding: 10px 12px;
  width: 100%;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .5), inset 0 -2px 0 rgba(255, 255, 255, .05);
}
input:focus-visible, select:focus-visible, button:focus-visible, .toggle:focus-within .toggle__box {
  outline: 3px solid var(--ember);
  outline-offset: 2px;
}

.btn {
  font-family: var(--font-display);
  font-size: 1rem;
  cursor: pointer;
  background: var(--stone-600);
  color: var(--ink);
  border: 0;
  border-radius: var(--radius);
  padding: 11px 20px;
  box-shadow: inset 0 2px 0 var(--bevel-light), inset 0 -4px 0 var(--bevel-dark);
  transition: transform .07s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.14); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 2px 0 var(--bevel-light), inset 0 -2px 0 var(--bevel-dark); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--grass); color: #0d1a0a; }
.btn--danger { background: var(--danger); }

.btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.btnrow--sticky { margin-top: 18px; }

.hint { color: var(--ink-dim); font-size: .82rem; margin: 12px 0 0; }
.msg { font-size: .87rem; margin: 10px 0 0; min-height: 1.2em; }
.msg--ok { color: var(--grass-lit); }
.msg--err { color: var(--danger); }

.verdict {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 14px 0 0;
}
.verdict--stale { color: var(--ember); }
.verdict--fresh { color: var(--grass-lit); }

/* Schalter */
.toggle {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
  cursor: pointer;
}
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__box {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  margin-top: 2px;
  background: var(--stone-900);
  border-radius: var(--radius);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .5), inset 0 -2px 0 rgba(255, 255, 255, .06);
  position: relative;
}
.toggle input:checked + .toggle__box { background: var(--grass); }
.toggle input:checked + .toggle__box::after {
  content: '';
  position: absolute;
  left: 8px; top: 3px;
  width: 7px; height: 13px;
  border: solid #0d1a0a;
  border-width: 0 3px 3px 0;
  transform: rotate(42deg);
}
.toggle__text b { display: block; font-weight: 500; }
.toggle__text em { font-style: normal; font-size: .84rem; color: var(--ink-dim); }

/* ---------- Log und Konsole ---------- */

.log {
  font-family: var(--font-mono);
  font-size: .78rem;
  line-height: 1.5;
  background: var(--stone-900);
  color: #cfd6e0;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 14px 0 0;
  max-height: 340px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .45);
  overscroll-behavior: contain;
}
.log--console { max-height: 380px; min-height: 200px; }

.cmdbar { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.cmdbar__caret {
  font-family: var(--font-mono);
  color: var(--grass-lit);
  font-size: 1.2rem;
}
.cmdbar input { flex: 1; }

/* ---------- Einstellungen ---------- */

.settings { display: grid; gap: 8px; }
.setting {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 210px);
  gap: 10px;
  align-items: center;
  background: var(--stone-700);
  border-radius: var(--radius);
  padding: 10px 13px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .06), inset 0 -3px 0 rgba(0, 0, 0, .28);
}
.setting--locked { opacity: .62; }
.setting__key {
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  word-break: break-all;
}
.setting__help {
  display: block;
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 400;
  color: var(--ink-dim);
  margin-top: 3px;
}
.setting__lock {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ember);
  margin-top: 4px;
}
.setting.changed { box-shadow: inset 0 0 0 2px var(--ember); }

.signout {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  color: var(--ink-dim);
  font-size: .84rem;
}

.foot {
  max-width: 980px;
  margin: 0 auto;
  padding: var(--pad);
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: .7rem;
  text-align: center;
}

/* ---------- Klein und barrierearm ---------- */

@media (max-width: 560px) {
  .age { grid-template-columns: repeat(3, 1fr); }
  .setting { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, .sky, .sky__body, .sky__stars, .sky__content { transition-duration: .01ms !important; }
}

/* ============================================================
   Erweiterungen: Vorgänge, Spieler, Sicherungen, Zugänge, Overlay
   ============================================================ */

/* ---------- Laufender Vorgang ---------- */

.panel--job {
  border-left: 4px solid var(--ember);
  background: linear-gradient(180deg, rgba(217, 131, 36, .1), transparent 60%), var(--stone-800);
}
.job__head { display: flex; gap: 14px; align-items: center; }
.job__title { font-family: var(--font-display); font-size: 1.2rem; margin: 0; }
.job__meta { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-dim); margin: 2px 0 0; }

/* Blockiger Ladeanzeiger statt Kreis - passt zur Bildsprache */
.job__spinner {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  background: var(--ember);
  animation: blockpulse 1.1s steps(4, end) infinite;
}
@keyframes blockpulse {
  0%   { clip-path: inset(0 75% 75% 0); }
  25%  { clip-path: inset(0 0 75% 75%); }
  50%  { clip-path: inset(75% 0 0 75%); }
  75%  { clip-path: inset(75% 75% 0 0); }
  100% { clip-path: inset(0 75% 75% 0); }
}
@media (prefers-reduced-motion: reduce) {
  .job__spinner { animation: none; clip-path: none; }
}

/* ---------- Spielerliste ---------- */

.players, .backups, .accounts { display: grid; gap: 8px; margin-top: 14px; }

.player, .backup, .account {
  background: var(--stone-700);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.06), inset 0 -3px 0 rgba(0,0,0,.28);
  display: grid;
  gap: 10px;
}
.player__top, .backup__top, .account__top {
  display: flex; gap: 10px; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap;
}
.player__name, .backup__name, .account__name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  word-break: break-word;
}
.player__xuid, .backup__meta, .account__meta {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--ink-dim);
}
.player__controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.player__controls select { width: auto; min-width: 130px; }

.tag {
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  background: var(--stone-600);
}
.tag--op { background: var(--ember); color: #1a1206; }
.tag--allow { background: var(--grass); color: #0d1a0a; }
.tag--warn { background: var(--danger); }
.tag--muted { color: var(--ink-dim); }

.btn--tiny { padding: 6px 12px; font-size: .85rem; }

/* Kleines Kästchen in Zeilen */
.check { display: inline-flex; gap: 7px; align-items: center; cursor: pointer; font-size: .86rem; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  width: 20px; height: 20px;
  background: var(--stone-900);
  border-radius: var(--radius);
  box-shadow: inset 0 2px 0 rgba(0,0,0,.5);
  position: relative;
}
.check input:checked + .check__box { background: var(--grass); }
.check input:checked + .check__box::after {
  content: ''; position: absolute; left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid #0d1a0a; border-width: 0 3px 3px 0;
  transform: rotate(42deg);
}
.check input:focus-visible + .check__box { outline: 3px solid var(--ember); outline-offset: 2px; }

/* ---------- Plattenbelegung ---------- */

.diskbar {
  height: 14px;
  background: var(--stone-900);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 12px;
  box-shadow: inset 0 2px 0 rgba(0,0,0,.5);
}
.diskbar__fill {
  display: block; height: 100%;
  background: var(--grass);
  transition: width .5s ease, background .5s ease;
}
.diskbar__fill.warn { background: var(--ember); }
.diskbar__fill.crit { background: var(--danger); }

.inline { display: inline-flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--ink-dim); }
.inline input { width: 72px; }

/* ---------- Overlay ---------- */

.overlay {
  position: fixed; inset: 0;
  background: rgba(6, 8, 12, .78);
  display: grid;
  place-items: end center;
  z-index: 50;
  padding: 0;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } }

.sheet {
  width: min(560px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: var(--stone-800);
  border-radius: var(--radius);
  box-shadow: inset 0 3px 0 var(--bevel-light), 0 -8px 40px rgba(0,0,0,.5);
  padding-bottom: env(safe-area-inset-bottom);
  animation: rise .22s ease;
}
@keyframes rise { from { transform: translateY(24px); } }

@media (min-width: 640px) {
  .overlay { place-items: center; padding: 20px; }
  .sheet { border-radius: var(--radius); }
  @keyframes rise { from { transform: translateY(10px); } }
}

.sheet__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 10px;
}
.sheet__title { font-family: var(--font-display); font-size: 1.3rem; margin: 0; }
.sheet__close {
  background: none; border: 0; color: var(--ink-dim);
  font-size: 1.9rem; line-height: 1; cursor: pointer; padding: 0 6px;
}
.sheet__close:hover { color: var(--ink); }
.sheet__body { padding: 0 20px; overflow-y: auto; overscroll-behavior: contain; }
.sheet__foot {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 16px 20px 20px;
}
.sheet__foot .btn { flex: 1 1 auto; }

.sheet .field { margin-bottom: 12px; }
.sheet p { font-size: .9rem; color: var(--ink-dim); }
.sheet strong { color: var(--ink); }

/* QR-Code und Notfallcodes */
.qr {
  display: block;
  margin: 0 auto 14px;
  background: #fff;
  padding: 10px;
  border-radius: var(--radius);
  max-width: 260px;
  width: 100%;
  height: auto;
}
.secretline {
  font-family: var(--font-mono);
  font-size: .8rem;
  background: var(--stone-900);
  padding: 10px 12px;
  border-radius: var(--radius);
  word-break: break-all;
  text-align: center;
  margin-bottom: 14px;
}
.codes {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  font-family: var(--font-mono);
  font-size: .88rem;
  background: var(--stone-900);
  padding: 14px;
  border-radius: var(--radius);
  margin: 12px 0;
}

/* Suchfeld für Einstellungen */
.filter { margin: 0 0 12px; }
.filter input { width: 100%; }
.settinggroup { margin-bottom: 18px; }
.settinggroup__title {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ember);
  margin: 0 0 8px;
}

/* Das hidden-Attribut muss jede display-Regel überstimmen.
   Sonst bleiben Overlay und Einmalcode-Feld sichtbar, obwohl sie
   ausgeblendet sein sollen. */
[hidden] { display: none !important; }

/* ============================================================
   Sprungleiste, Schriftgrößen, Kartenzustand
   ============================================================ */

/* ---------- Sprungleiste ---------- */

.quicknav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding: 8px max(12px, env(safe-area-inset-left)) 8px max(12px, env(safe-area-inset-right));
  background: rgba(20, 22, 27, .94);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .4);
}
.quicknav::-webkit-scrollbar { display: none; }

.quicknav a {
  flex: 0 0 auto;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-dim);
  padding: 7px 12px;
  border-radius: var(--radius);
  background: var(--stone-700);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .06), inset 0 -2px 0 rgba(0, 0, 0, .3);
  white-space: nowrap;
  transition: color .15s ease, background .15s ease;
}
.quicknav a:hover { color: var(--ink); }
.quicknav a.current { background: var(--grass); color: #0d1a0a; }

/* Sprungziele nicht unter der Leiste verstecken */
main > section, main > div > section { scroll-margin-top: 60px; }

/* ---------- Lange Werte in Kacheln ---------- */

/* Versionsnummern wie 1.26.43.1 sprengen sonst die Kachel */
.stat__value {
  overflow-wrap: anywhere;
  hyphens: none;
}
.stat__value[data-len='long']   { font-size: 1.05rem; }
.stat__value[data-len='longer'] { font-size: .9rem; }
.stat__value[data-len='longest'] { font-size: .78rem; line-height: 1.35; }

/* ---------- Karte ---------- */

.map--empty { display: grid; place-items: center; }
.map__note {
  color: var(--ink-dim);
  font-size: .88rem;
  max-width: 44ch;
  text-align: center;
  padding: 24px;
  margin: 0;
}
.map__note strong { color: var(--ink); display: block; margin-bottom: 6px; font-family: var(--font-display); font-size: 1.05rem; }

/* Schriften auch dann brauchbar, wenn die Web-Schrift nicht lädt */
:root {
  --font-display: 'Pixelify Sans', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

/* Der Weltname wird durchgehend groß geschrieben */
.worldname { text-transform: uppercase; }

/* ============================================================
   Symbole, Betriebsbereich, aufgeräumte Abstände
   ============================================================ */

/* Symbolvorrat unsichtbar halten */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Symbole in Überschriften */
.panel__title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ico {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  color: var(--grass-lit);
  /* Eckige Kanten statt weicher – passt zur Blockoptik */
  shape-rendering: crispEdges;
}

/* Symbole in der Sprungleiste */
.quicknav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.quicknav a svg {
  width: 13px; height: 13px;
  flex: 0 0 auto;
  opacity: .75;
}
.quicknav a.current svg { opacity: 1; }

/* ---------- Ruhigere Gliederung ---------- */

.panel { position: relative; }
.panel__title { margin-bottom: .35em; }
.panel__lead + .stats,
.panel__title + .stats { margin-top: 14px; }

/* Trennung zwischen Aktionsreihe und Inhalt */
.btnrow { padding-top: 2px; }

/* Auf breiten Schirmen mehr Ruhe durch feste Spaltenzahl */
@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats--tight { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Betriebsbereich ---------- */

.ops {
  background: var(--stone-700);
  border-radius: var(--radius);
  margin-bottom: 8px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .06), inset 0 -3px 0 rgba(0, 0, 0, .28);
  overflow: hidden;
}
.ops > summary {
  cursor: pointer;
  padding: 13px 16px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.ops > summary::-webkit-details-marker { display: none; }
.ops > summary::before {
  content: '';
  width: 0; height: 0;
  border-left: 7px solid var(--ink-dim);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transition: transform .15s ease;
}
.ops[open] > summary::before { transform: rotate(90deg); }
.ops > summary:hover { background: rgba(255, 255, 255, .04); }
.ops > summary:focus-visible { outline: 3px solid var(--ember); outline-offset: -3px; }

.ops__body {
  padding: 2px 16px 16px;
  font-size: .9rem;
  color: var(--ink-dim);
}
.ops__body p { margin: 0 0 12px; line-height: 1.6; }
.ops__body p:last-child { margin-bottom: 0; }
.ops__body b { color: var(--ink); font-weight: 500; }

.deflist { margin: 0; display: grid; gap: 9px; }
.deflist dt {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ember);
}
.deflist dd {
  margin: 3px 0 0;
  line-height: 1.55;
}
@media (min-width: 620px) {
  .deflist { grid-template-columns: minmax(120px, 190px) 1fr; align-items: baseline; gap: 9px 16px; }
  .deflist dt { text-align: right; }
  .deflist dd { margin: 0; }
}

.snippet {
  font-family: var(--font-mono);
  font-size: .76rem;
  background: var(--stone-900);
  color: #cfd6e0;
  padding: 10px 12px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 0 0 12px;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .4);
}

/* ---------- Karte: mehr Höhe auf großen Schirmen ---------- */

@media (min-width: 900px) {
  .map { aspect-ratio: 21 / 10; }
}

/* ============================================================
   Zeitreise
   ============================================================ */

.timeline {
  margin-top: 14px;
  background: var(--stone-700);
  border-radius: var(--radius);
  padding: 14px 16px 10px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .06), inset 0 -3px 0 rgba(0, 0, 0, .28);
}

.timeline__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.timeline__label { flex: 1; min-width: 0; }
.timeline__label b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.timeline__label span {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--ink-dim);
}

/* Regler in Blockoptik statt Systemvorgabe */
#tlRange {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  background: var(--stone-900);
  border-radius: var(--radius);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, .5);
  cursor: pointer;
}
#tlRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 24px;
  background: var(--grass);
  border-radius: var(--radius);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -3px 0 rgba(0, 0, 0, .35);
  cursor: grab;
}
#tlRange::-moz-range-thumb {
  width: 20px; height: 24px;
  border: 0;
  background: var(--grass);
  border-radius: var(--radius);
  cursor: grab;
}
#tlRange:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }

.timeline__ticks {
  position: relative;
  height: 18px;
  margin-top: 4px;
}
.timeline__tick {
  position: absolute;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: .58rem;
  color: var(--ink-dim);
  white-space: nowrap;
}
.timeline__tick::before {
  content: '';
  position: absolute;
  left: 50%; top: -4px;
  width: 2px; height: 4px;
  background: var(--stone-500);
}

.timeline__stage {
  margin-top: 12px;
  background: var(--stone-900);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .3);
}
.timeline__stage iframe {
  width: 100%; height: 100%;
  border: 0;
  display: block;
}

@media (min-width: 900px) {
  .timeline__stage { aspect-ratio: 21 / 10; }
}

.history { display: grid; gap: 8px; margin-top: 14px; }
