/* Deep Time – Styles (Feldtagebuch / Archäologen-Notizbuch)
   Schriften lokal gehostet (DSGVO: keine Verbindung zu Google Fonts). Kein Dunkelmodus: das Notizbuch ist das Thema. */
@font-face { font-family: "IM Fell English"; src: url("../fonts/imfell-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IM Fell English"; src: url("../fonts/imfell-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IM Fell English SC"; src: url("../fonts/imfell-sc.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/garamond-var.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../fonts/garamond-italic-var.woff2") format("woff2"); font-weight: 400 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Special Elite"; src: url("../fonts/specialelite.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #e8dcc0;
  --paper-2: #d9c7a0;
  --paper-3: #f1e8d0;
  --ink: #3b2a1a;
  --ink-2: #5a4630;
  --faded: #8a7458;
  --red: #a3201b;
  --brass: #b08d57;
  --brass-2: #d1b078;
  --leather: #4a2f1d;
  --leather-2: #36200f;
  --ice: #eef3f5;
  --f-head: "IM Fell English", "Palatino Linotype", Palatino, Georgia, serif;
  --f-sc: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --f-text: "EB Garamond", Garamond, "Palatino Linotype", Georgia, serif;
  --f-type: "Special Elite", "Courier New", monospace;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
  --sr: env(safe-area-inset-right, 0px);
  --tb-core: 84px;
  --tb-h: calc(var(--tb-core) + var(--sb));
  --hud-h: 70px;
  --noise: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .36  0 0 0 0 .26  0 0 0 0 .13  0 0 0 .2 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  --fibers: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='f' x='0' y='0' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='.012 .35' numOctaves='2' seed='9' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .32  0 0 0 0 .16  0 0 0 .13 0'/></filter><rect width='100%25' height='100%25' filter='url(%23f)'/></svg>");
}
@media (max-width: 859px) { :root { --tb-core: 100px; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  height: 100%; margin: 0; overflow: hidden;
  background: var(--paper-2); color: var(--ink);
  font: 400 15px/1.5 var(--f-text);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--red); outline-offset: 2px; }
a { color: var(--red); }

/* ---------- Kartentisch (Hintergrund hinter dem Canvas) ---------- */
.desk {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 80% 18%, transparent 0 54px, rgba(120, 78, 34, .10) 56px, rgba(120, 78, 34, .22) 60px, rgba(120, 78, 34, .06) 64px, transparent 70px),
    radial-gradient(ellipse 70% 60% at 50% 42%, rgba(247, 238, 212, .85), rgba(232, 220, 192, 0) 70%),
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 55%, rgba(110, 76, 38, .38) 100%),
    var(--noise), var(--fibers),
    linear-gradient(180deg, #e0cfa6, #d3bf91);
}
.desk::before {                /* Windrose unten rechts */
  content: ""; position: absolute; right: 22px; bottom: calc(var(--tb-h) + 18px); width: 118px; height: 118px; opacity: .42;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-60 -60 120 120' fill='none' stroke='%233b2a1a' stroke-width='1.1'><circle r='46'/><circle r='40' stroke-dasharray='1 2.4'/><path d='M0 -56 L7 -7 L56 0 L7 7 L0 56 L-7 7 L-56 0 L-7 -7Z' fill='%23d9c7a0'/><path d='M0 -40 L5 -5 L40 0 L5 5 L0 40 L-5 5 L-40 0 L-5 -5Z' transform='rotate(45)' fill='%238a7458' stroke='none' opacity='.6'/><path d='M0 -56 L7 -7 L0 0Z' fill='%23a3201b' stroke='none'/><text x='-3.5' y='-60' font-family='serif' font-size='11' fill='%233b2a1a' stroke='none'>N</text></svg>") center / contain no-repeat;
}
.desk::after {                 /* gestrichelter Kartenrahmen */
  content: ""; position: absolute; inset: 10px 10px calc(var(--tb-h) + 8px) 10px;
  border: 2px dashed rgba(59, 42, 26, .38); border-radius: 3px;
}
#scene { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
#scene:focus-visible { outline: 2.5px solid var(--red); outline-offset: -4px; }

/* ---------- Kopf ---------- */
.hud {
  position: fixed; z-index: 4; top: calc(var(--st) + 14px); left: calc(var(--sl) + 24px); right: calc(var(--sr) + 24px);
  display: grid; gap: 2px; pointer-events: none;
}
.toprow { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hud .back { font: 400 13px/1 var(--f-type); color: var(--ink-2); text-decoration: none; pointer-events: auto; padding: 6px 0; }
.hud .back:hover { color: var(--red); }
.lang { display: inline-flex; gap: 2px; padding: 2px; border: 1.5px solid var(--ink-2); border-radius: 3px; background: rgba(232, 220, 192, .8); pointer-events: auto; }
.lang button { border: 0; background: transparent; padding: 5px 9px; font: 400 12px/1 var(--f-type); color: var(--ink-2); border-radius: 2px; }
.lang button[aria-pressed="true"] { background: var(--leather); color: var(--paper); }
.stamp {
  margin: 0; font: 400 27px/1.05 var(--f-sc); letter-spacing: .24em; color: var(--ink);
  text-shadow: 1px 1px 0 rgba(255, 248, 228, .6), -.5px -.5px 0 rgba(59, 42, 26, .45);
}
.hud .sub { margin: 0; font: italic 400 14px/1.3 var(--f-text); color: var(--ink-2); max-width: 46ch; }

/* ---------- Beschriftungen ---------- */
.labels { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.lb {
  position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform, opacity;
  color: var(--ink); text-shadow: 0 0 3px rgba(232, 220, 192, .95), 0 0 6px rgba(232, 220, 192, .8);
  transition: opacity .25s;
}
.lb.k-super { font: 400 25px/1 var(--f-head); letter-spacing: .16em; text-transform: none; border-bottom: 2px solid rgba(163, 32, 27, .75); padding-bottom: 2px; }
.lb.k-continent { font: 500 15px/1 var(--f-text); font-variant-caps: all-small-caps; letter-spacing: .24em; font-size: 17px; }
.lb.k-region { font: 400 13px/1 var(--f-text); font-variant-caps: all-small-caps; letter-spacing: .16em; color: var(--ink-2); }
.lb.k-ocean { font: italic 400 15px/1 var(--f-text); letter-spacing: .1em; color: #f1e4c2; text-shadow: 0 0 3px rgba(8, 24, 52, .95), 0 0 7px rgba(8, 24, 52, .85), 1px 1px 1px rgba(8, 24, 52, .9); }
.lb.k-future { font: italic 400 17px/1 var(--f-text); letter-spacing: .1em; color: #4b3a26; text-shadow: 0 0 4px rgba(244, 232, 200, .9), 0 0 8px rgba(244, 232, 200, .8); }
.lb.btn-l { pointer-events: auto; cursor: pointer; }
.lb.btn-l:hover { color: var(--red); }
.lb.sel { color: var(--red); }

/* ---------- Papier ---------- */
.sheet { position: relative; background: var(--paper-3); }
.sheet::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--noise), var(--fibers), linear-gradient(170deg, #f2e9d1, #e6d9b8);
  clip-path: polygon(0 1%, 3% 0, 8% .6%, 14% 0, 22% .5%, 30% 0, 40% .6%, 52% 0, 63% .5%, 74% 0, 86% .6%, 94% 0, 100% .8%, 99.6% 6%, 100% 16%, 99.5% 30%, 100% 46%, 99.6% 62%, 100% 80%, 99.5% 92%, 100% 99%, 94% 99.6%, 84% 100%, 70% 99.5%, 56% 100%, 42% 99.6%, 28% 100%, 16% 99.5%, 6% 100%, 0 99.4%, .5% 90%, 0 74%, .6% 58%, 0 40%, .5% 24%, 0 10%);
}

/* ---------- Dock "Feldnotizen" ---------- */
.dock {
  position: fixed; z-index: 5; left: calc(var(--sl) + 20px); top: calc(var(--st) + var(--hud-h) + 30px); bottom: calc(var(--tb-h) + 20px);
  width: 392px; pointer-events: none;
}
.dock-body {
  pointer-events: auto; position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; overflow: auto; overscroll-behavior: contain;
  padding: 16px 18px 14px 22px;
  background: var(--noise), var(--fibers), repeating-linear-gradient(180deg, transparent 0 25px, rgba(90, 120, 150, .10) 25px 26px), linear-gradient(170deg, #f2e9d1, #e6d9b8);
  border-radius: 3px; box-shadow: 0 10px 30px rgba(59, 42, 26, .35), 0 1px 0 rgba(255, 255, 255, .5) inset;
  border-left: 2px solid rgba(163, 32, 27, .6);
  transform: rotate(-.35deg); transform-origin: 0 100%;
  transition: transform .35s cubic-bezier(.3, .8, .3, 1), opacity .25s;
}
.dock.collapsed .dock-body { transform: translateX(calc(-100% - 40px)); opacity: 0; pointer-events: none; }
.dock-handle {
  pointer-events: auto; position: absolute; top: 18px; left: calc(100% - 1px); width: 28px; height: 74px; padding: 0;
  background: var(--leather); color: var(--paper); border: 0; border-radius: 0 6px 6px 0; font: 700 18px/1 var(--f-text);
  box-shadow: 2px 3px 8px rgba(59, 42, 26, .4); transition: left .35s cubic-bezier(.3, .8, .3, 1);
}
.dock.collapsed .dock-handle { left: -20px; }
.dock-handle:hover { background: var(--leather-2); }
.grip { display: none; }
.tabs { display: flex; gap: 4px; margin: -4px 0 0; flex: none; border-bottom: 2px solid var(--leather); }
.tabs button {
  border: 2px solid var(--leather); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--paper-2); color: var(--ink-2);
  padding: 6px 14px 5px; font: 400 14px/1.2 var(--f-sc); letter-spacing: .08em; margin-bottom: -2px; position: relative; top: 2px;
}
.tabs button[aria-selected="true"] { background: var(--leather); color: var(--paper); top: 0; padding-top: 8px; }
.panel { display: grid; gap: 10px; align-content: start; }
.lbl { font: 400 12px/1 var(--f-type); letter-spacing: .06em; color: var(--red); white-space: nowrap; flex: none; }
.tour-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dots { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.dots button { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 1.5px solid var(--ink-2); background: transparent; position: relative; }
.dots button[aria-selected="true"]::before, .dots button[aria-selected="true"]::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 15px; height: 2px; background: var(--red); border-radius: 1px;
}
.dots button[aria-selected="true"]::before { transform: translate(-50%, -50%) rotate(45deg); }
.dots button[aria-selected="true"]::after { transform: translate(-50%, -50%) rotate(-45deg); }
.dots button[aria-selected="true"] { border-color: var(--red); }
.panel h2 { margin: 0; font: 400 21px/1.2 var(--f-head); color: var(--ink); }
.panel h3 { margin: 6px 0 0; font: 400 14px/1.2 var(--f-sc); letter-spacing: .1em; color: var(--ink-2); border-bottom: 1px solid rgba(59, 42, 26, .3); padding-bottom: 3px; }
.panel p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.tour-nav { display: flex; gap: 8px; margin-top: 2px; }
.tour-nav .btn { flex: 1; }
.btn {
  border: 2px solid var(--leather); background: var(--paper-2); color: var(--leather); border-radius: 4px; padding: 7px 14px;
  font: 400 14px/1.2 var(--f-sc); letter-spacing: .06em; transition: background .2s;
}
.btn:hover { background: #cdb88b; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--brass); border-color: var(--leather); color: #2a1a0b; box-shadow: 0 1px 0 var(--brass-2) inset; }
.btn.primary:hover { background: var(--brass-2); }
.stamp-btn { border-color: var(--red); color: var(--red); background: transparent; transform: rotate(-1.2deg); font-family: var(--f-type); letter-spacing: .04em; font-size: 13px; }
.stamp-btn:hover { background: rgba(163, 32, 27, .1); }
.more { align-self: flex-start; border: 0; background: transparent; padding: 4px 0; font: 400 14px/1.2 var(--f-sc); letter-spacing: .08em; color: var(--ink-2); text-decoration: underline dotted; text-underline-offset: 3px; }
.more::after { content: " ▾"; }
.more[aria-expanded="true"]::after { content: " ▴"; }
.drawer { display: grid; gap: 10px; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.legend { display: flex; align-items: center; gap: 10px; margin: 2px 0 0; font-size: 14px; line-height: 1.3; color: var(--ink-2); }
.legend .lg-seam { flex: none; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; user-select: none; color: var(--ink-2); min-height: 28px; }
.toggle input { appearance: none; -webkit-appearance: none; margin: 0; width: 20px; height: 20px; border: 2px solid var(--ink-2); border-radius: 3px; background: var(--paper-3); position: relative; cursor: pointer; }
.toggle input:checked::after { content: ""; position: absolute; left: 3px; top: -3px; width: 7px; height: 14px; border: solid var(--red); border-width: 0 3px 3px 0; transform: rotate(40deg); }
.credits { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--faded); }
.credits a { color: var(--ink-2); }

/* Zeitalter-Panel */
.era-head { display: flex; gap: 12px; align-items: center; }
.era-chip { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 2px solid var(--ink); box-shadow: 2px 2px 0 rgba(59, 42, 26, .3); }
.era-sub { font: 400 12.5px/1.3 var(--f-type); color: var(--faded); }
.era-warn { font-style: italic; color: var(--red) !important; border-left: 3px solid var(--red); padding-left: 10px; font-size: 14.5px !important; }
.era-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.era-list button { width: 100%; text-align: left; border: 1.5px solid rgba(59, 42, 26, .35); border-radius: 4px; background: rgba(255, 252, 240, .5); padding: 6px 10px; display: flex; gap: 10px; align-items: center; font: 400 15px/1.25 var(--f-text); }
.era-list button:hover { border-color: var(--red); background: rgba(255, 252, 240, .85); }
.era-list svg { width: 18px; height: 18px; flex: none; }
.era-list .t { margin-left: auto; font: 400 12px var(--f-type); color: var(--faded); white-space: nowrap; }
.era-list .empty { font-style: italic; color: var(--faded); padding: 4px 2px; }
.era-ice { font: 400 13px/1.35 var(--f-type) !important; color: var(--ink-2); }

/* ---------- Ereignis-Karte ---------- */
.card {
  position: fixed; z-index: 6; right: calc(var(--sr) + 20px); top: calc(var(--st) + 24px); width: 372px; max-height: calc(100% - var(--tb-h) - 48px);
  display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 14px; overflow: auto; overscroll-behavior: contain;
  background: var(--noise), linear-gradient(170deg, #f7efd8, #eadfc0); border-radius: 2px;
  box-shadow: 0 12px 30px rgba(59, 42, 26, .4); transform: rotate(.7deg);
}
.tape {
  position: absolute; top: -9px; left: 50%; width: 92px; height: 22px; margin-left: -46px; transform: rotate(-2.5deg);
  background: rgba(214, 190, 120, .75); box-shadow: 0 1px 3px rgba(59, 42, 26, .3);
  clip-path: polygon(0 0, 4% 30%, 0 60%, 4% 100%, 96% 100%, 100% 65%, 96% 35%, 100% 0);
}
.card-head { display: flex; align-items: center; gap: 12px; }
.card-ico { flex: none; width: 44px; height: 44px; color: var(--red); }
.card-ico svg { width: 100%; height: 100%; display: block; }
.card-head > div { flex: 1; min-width: 0; }
.card-head h2 { margin: 0; font: 400 21px/1.15 var(--f-head); overflow-wrap: anywhere; }
.card-head .sub { font: 400 12.5px/1.3 var(--f-type); color: var(--faded); }
.x { border: 0; background: transparent; color: var(--ink-2); font-size: 28px; line-height: 1; width: 40px; height: 40px; border-radius: 4px; flex: none; margin: -6px -8px 0 0; align-self: flex-start; }
.x:hover { color: var(--red); background: rgba(59, 42, 26, .08); }
.desc { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 0; }
.facts div { min-width: 0; border-top: 1px dashed rgba(59, 42, 26, .35); padding-top: 4px; }
.facts .full { grid-column: 1 / -1; }
.facts dt { font: 400 11.5px/1.2 var(--f-sc); letter-spacing: .1em; color: var(--faded); text-transform: uppercase; }
.facts dd { margin: 2px 0 0; font: 400 14px/1.3 var(--f-type); color: var(--ink); overflow-wrap: anywhere; }
.card-foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.card-foot #card-note { flex: 1; font: italic 400 13.5px/1.3 var(--f-text); color: var(--red); }

/* ---------- Zeitregler (fest am unteren Rand) ---------- */
.timebar {
  position: fixed; z-index: 8; left: 0; right: 0; bottom: 0; height: var(--tb-h); margin: 0;
  padding: 6px calc(var(--sr) + 18px) var(--sb) calc(var(--sl) + 18px); box-sizing: border-box;
  display: grid; grid-template-rows: 30px 1fr; gap: 2px;
  background: var(--noise), linear-gradient(180deg, #5a3b25, var(--leather) 40%, var(--leather-2));
  border-top: 3px double var(--brass); color: var(--paper); touch-action: none; user-select: none; -webkit-user-select: none;
  box-shadow: 0 -6px 18px rgba(36, 20, 8, .35);
}
.tb-head { display: flex; align-items: center; gap: 10px; min-width: 0; position: relative; z-index: 5; }
.tb-play {
  width: 30px; height: 30px; flex: none; padding: 5px; border-radius: 50%; border: 2px solid var(--brass); background: var(--leather-2); color: var(--brass-2);
}
.tb-play svg { width: 100%; height: 100%; display: block; }
.tb-play:hover { background: #26160a; color: #f0d79d; }
.tb-time { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 12px; overflow: hidden; white-space: nowrap; }
.tb-time b { flex: none; width: 26ch; font: 400 17px/1 var(--f-type); font-variant-numeric: tabular-nums; color: #f6e9c8; overflow: hidden; text-overflow: clip; }
.tb-time span { min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 400 15px/1 var(--f-sc); letter-spacing: .08em; color: var(--brass-2); }
.tb-future {
  flex: none; position: relative; height: 26px; padding: 0 10px; border: 1.6px solid #d9695f; border-radius: 3px; background: transparent; color: #f2b4a8;
  font: 400 12.5px/1 var(--f-type); letter-spacing: .02em; white-space: nowrap; transform: rotate(-1.5deg);
}
.tb-future::after { content: ""; position: absolute; inset: -7px -3px; }
.tb-future:hover { background: rgba(217, 105, 95, .16); }
.tb-future[aria-pressed="true"] { background: #a3201b; border-color: #e58b80; color: #fbeee4; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
.timebar.is-future .tb-time b { color: #f3d4cb; }
.tb-speed { flex: none; width: 44px; height: 26px; border: 1.5px solid var(--brass); background: transparent; color: var(--brass-2); border-radius: 3px; font: 400 13px/1 var(--f-type); padding: 0; }
.tb-speed:hover { background: rgba(176, 141, 87, .2); }
.tb-step { display: inline-flex; gap: 4px; flex: none; }
.tb-step button { width: 32px; height: 28px; padding: 5px 8px; border: 1.5px solid var(--brass); background: transparent; color: var(--brass-2); border-radius: 3px; }
.tb-step button svg { width: 100%; height: 100%; display: block; }
.tb-step button:hover { background: rgba(176, 141, 87, .2); }
.tb-track { position: relative; height: 100%; min-height: 0; }
.tb-inner { position: absolute; left: 9px; right: 9px; top: 0; bottom: 0; pointer-events: none; }
.tb-ticks { position: absolute; left: 0; right: 0; top: 0; height: 24px; z-index: 3; }
.tb-tick {
  position: absolute; top: 0; width: 28px; height: 24px; margin-left: -14px; padding: 0; border: 0; background: transparent; color: #f0d79d; pointer-events: auto; display: grid; place-items: center;
}
.tb-tick svg { width: 15px; height: 15px; display: block; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .5)); }
.tb-tick.k-crater { color: #f2c3a0; } .tb-tick.k-lip { color: #f08a5d; } .tb-tick.k-ice { color: #cfe8f6; }
.tb-tick.k-future { color: #cfd9e6; }
.tb-tick.k-extinction { color: #ff8d8d; } .tb-tick.k-tectonic { color: #e6d49a; } .tb-tick.k-life { color: #b6e0a1; }
.tb-tick .n { position: absolute; right: 0; top: -1px; font: 700 9px/1 var(--f-text); background: var(--red); color: #fff; border-radius: 6px; padding: 1px 3px; }
.tb-tick:hover svg, .tb-tick.on svg { transform: scale(1.35); }
.tb-tick:focus-visible { outline-color: #f0d79d; }
.tb-band { position: absolute; left: 0; right: 0; bottom: 3px; height: 17px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); z-index: 1; }
.tb-seg { position: absolute; top: 0; bottom: 0; border-right: 1px solid rgba(40, 24, 10, .7); display: grid; place-items: center; overflow: hidden; font: 400 11px/1 var(--f-sc); color: rgba(30, 18, 6, .88); letter-spacing: .04em; white-space: nowrap; }
.tb-seg.fut {
  background: repeating-linear-gradient(135deg, rgba(59, 42, 26, .5) 0 1.5px, transparent 1.5px 6px), linear-gradient(180deg, #e4d9bd, #cdbf9f) !important;
  color: #3b2a1a; font-style: italic;
}
.tb-seg.fut::after { background: var(--noise) !important; }
.tb-fmark { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed rgba(59, 42, 26, .75); z-index: 2; font-weight: 400; }
.tb-fmark.lbl::before { content: attr(data-m); position: absolute; top: 2px; left: 3px; font: 400 9.5px/1 var(--f-type); color: #3b2a1a; }
.tb-today { position: absolute; top: -5px; bottom: -2px; width: 3px; margin-left: -1.5px; background: #f0d79d; box-shadow: 0 0 0 1px #2a1a0b; z-index: 3; text-decoration: none; }
.tb-seg::after { content: ""; position: absolute; inset: 0; background: var(--noise), linear-gradient(180deg, rgba(255, 245, 215, .18), rgba(90, 55, 20, .28)); pointer-events: none; }
.tb-seg i { position: relative; z-index: 1; font-style: normal; }
#tb-range {
  position: absolute; left: 0; right: 0; top: 20px; bottom: 0; width: 100%; height: auto; margin: 0; padding: 0; background: transparent; z-index: 2;
  -webkit-appearance: none; appearance: none; touch-action: none; cursor: ew-resize;
}
#tb-range::-webkit-slider-runnable-track { height: 100%; background: transparent; border: 0; }
#tb-range::-moz-range-track { height: 100%; background: transparent; border: 0; }
#tb-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 30px; margin-top: 0; border: 0; border-radius: 3px 3px 9px 9px;
  background: linear-gradient(90deg, #8a6a37, var(--brass-2) 45%, #8a6a37); box-shadow: 0 0 0 1.5px #2a1a0b, 0 3px 6px rgba(0, 0, 0, .5);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
}
#tb-range::-moz-range-thumb {
  width: 18px; height: 30px; border: 0; border-radius: 3px 3px 9px 9px;
  background: linear-gradient(90deg, #8a6a37, var(--brass-2) 45%, #8a6a37); box-shadow: 0 0 0 1.5px #2a1a0b;
  clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%);
}
#tb-range:focus-visible { outline: none; }
#tb-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2.5px #f6e9c8, 0 0 0 5px var(--red); }
#tb-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2.5px #f6e9c8, 0 0 0 5px var(--red); }
.toast {
  position: fixed; z-index: 9; left: 50%; bottom: calc(var(--tb-h) + 12px); transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 8px 16px; border: 2px solid var(--red); border-radius: 3px; background: rgba(241, 232, 208, .96); color: var(--red); font: 400 15px/1.2 var(--f-type);
  box-shadow: 0 4px 12px rgba(59, 42, 26, .35); pointer-events: none; text-align: center;
}
.toast.in { animation: toast 2.6s ease both; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 8px) rotate(-1deg); } 10%, 82% { opacity: 1; transform: translate(-50%, 0) rotate(-1deg); } 100% { opacity: 0; transform: translate(-50%, -6px) rotate(-1deg); } }

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 0 24px;
  background: var(--noise), radial-gradient(ellipse at 50% 40%, #f0e6c8, #d6c297 75%);
  transition: opacity .8s ease;
}
.loader.done { opacity: 0; pointer-events: none; }
.loader-inner { width: min(380px, 100%); display: grid; gap: 14px; text-align: center; justify-items: center; color: var(--ink); }
.compass { width: 84px; height: 84px; color: var(--ink); }
.compass .needle { transform-origin: 32px 32px; animation: swing 2.4s ease-in-out infinite; }
@keyframes swing { 0%, 100% { transform: rotate(-38deg); } 40% { transform: rotate(34deg); } 70% { transform: rotate(-12deg); } }
.loader .word { font: 400 24px/1 var(--f-sc); letter-spacing: .3em; padding-left: .3em; }
.bar { width: 100%; height: 6px; border-radius: 3px; background: rgba(59, 42, 26, .18); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 3px; transition: width .25s ease; }
.loader p { margin: 0; font: 400 14px/1.4 var(--f-type); color: var(--ink-2); }
.loader p.err { color: var(--red); }

/* ---------- Desktop-Feinheiten / Handy ---------- */
@media (min-width: 860px) {
  .hud { right: auto; }
  .toprow { justify-content: flex-start; gap: 22px; }
  .grip { display: none !important; }
}
@media (max-width: 859px) {
  html, body { font-size: 14.5px; }
  .hud { left: calc(var(--sl) + 14px); right: calc(var(--sr) + 14px); top: calc(var(--st) + 8px); gap: 0; }
  .stamp { font-size: 20px; letter-spacing: .2em; }
  .hud .sub { display: none; }
  .toprow { margin-bottom: 2px; }
  .desk::before { width: 64px; height: 64px; right: 10px; }
  .dock { left: 0; right: 0; top: auto; bottom: var(--tb-h); width: auto; pointer-events: auto; transition: transform .32s cubic-bezier(.3, .8, .3, 1); max-height: 46vh; display: flex; flex-direction: column; }
  .dock.collapsed { transform: translateY(calc(100% - 46px)); }
  .dock-handle { display: none; }
  .grip {
    display: flex; align-items: center; gap: 10px; flex: none; width: calc(100% - 16px); height: 46px; margin: 0 8px; padding: 0 14px; border: 0; border-radius: 10px 10px 0 0;
    background: var(--leather); color: var(--paper); font: 400 15px/1 var(--f-sc); letter-spacing: .06em; text-align: left; touch-action: none; position: relative;
    box-shadow: 0 -3px 10px rgba(59, 42, 26, .3);
  }
  .grip::before { content: ""; position: absolute; left: 50%; top: 6px; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: rgba(232, 220, 192, .45); }
  .grip-ico { width: 22px; height: 22px; flex: none; color: var(--brass-2); margin-top: 6px; }
  .grip-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 6px; }
  .grip-chev { width: 22px; height: 22px; flex: none; margin-top: 6px; transition: transform .3s; }
  .dock.collapsed .grip-chev { transform: none; }
  .dock:not(.collapsed) .grip-chev { transform: rotate(180deg); }
  .dock-body {
    position: relative; inset: auto; flex: 1; min-height: 0; margin: 0; padding: 12px 16px 12px 20px; transform: none; border-radius: 0; box-shadow: 0 -4px 14px rgba(59, 42, 26, .25);
    border-left: 0; border-top: 2px solid var(--leather); pointer-events: auto;
  }
  .dock.collapsed .dock-body { transform: none; opacity: 1; }
  body.card-open .dock { display: none; }
  .panel h2 { font-size: 19px; }
  .panel p, .desc { font-size: 15px; }
  .card { left: 0; right: 0; width: auto; top: auto; bottom: var(--tb-h); max-height: 58vh; transform: none; border-radius: 12px 12px 0 0; padding: 20px 16px 12px; }
  .tape { top: -8px; }
  .tb-time { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; }
  .tb-time b { width: auto; max-width: 100%; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
  .tb-time span { font-size: 11.5px; letter-spacing: .06em; max-width: 100%; }
  .tb-ticks { height: 32px; }
  .tb-tick { width: 32px; height: 32px; margin-left: -16px; }
  .tb-tick svg { width: 16px; height: 16px; }
  #tb-range { top: 28px; }
  #tb-range::-webkit-slider-thumb { height: 34px; }
  #tb-range::-moz-range-thumb { height: 34px; }
  .tb-step button { width: 34px; height: 30px; }
  .tb-future { height: 28px; padding: 0 8px; font-size: 12px; }
  .spec-stamp { top: calc(var(--st) + 46px); left: auto; right: 14px; transform: rotate(-3deg); font-size: 13px; padding: 3px 9px 2px; }
}


/* Zukunft: Stempel „Spekulation“ */
.spec-stamp {
  position: fixed; z-index: 6; top: calc(var(--st) + 14px); left: 50%; transform: translateX(-50%) rotate(-3deg); padding: 5px 16px 4px;
  border: 3px double var(--red); border-radius: 3px; color: var(--red); background: rgba(241, 232, 208, .4);
  font: 400 22px/1 var(--f-type); letter-spacing: .18em; text-transform: uppercase; opacity: .82; pointer-events: none; white-space: nowrap;
}
#tour-future { align-self: flex-start; }
body.cover .spec-stamp { display: none !important; }
@media (max-width: 859px) {
  .spec-stamp { top: calc(var(--st) + 46px); left: auto; right: 14px; transform: rotate(-3deg); font-size: 13px; padding: 3px 9px 2px; }
}
/* Cover-Modus (?cover=1): nur die Szene, für og.jpg */
body.cover .hud, body.cover .dock, body.cover .card, body.cover .timebar, body.cover .toast { display: none !important; }
body.cover .desk::after { inset: 10px; }
body.cover .desk::before { bottom: 18px; }

@media (max-width: 480px) { .tb-speed { display: none; } .timebar { padding-left: calc(var(--sl) + 12px); padding-right: calc(var(--sr) + 12px); } }
@media (prefers-reduced-motion: reduce) {
  .loader, .bar i, .dock-body, .dock, .dock-handle, .grip-chev { transition: none; }
  .compass .needle { animation: none; }
  .toast.in { animation: none; opacity: 1; }
}
