/* Akte Tetzner — Sepia/Nacht-Ton der Weimarer Zeit */
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: #16130e; color: #d8cdb4;
  font-family: Georgia, 'Times New Roman', serif;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#topbar {
  display: flex; gap: 8px; align-items: center; padding: 10px;
  width: 968px; max-width: 96vw; flex-wrap: wrap;
}
#topbar .spacer { flex: 1; }
#tabs { display: flex; gap: 6px; }
button {
  font-family: inherit; font-size: 15px; cursor: pointer;
  background: #2a241a; color: #d8cdb4; border: 1px solid #57492f;
  padding: 7px 14px; border-radius: 3px;
}
button:hover { background: #3a3224; }
#tabs button.active { background: #57492f; color: #f4ead0; }
button.locked { opacity: 0.45; cursor: not-allowed; font-style: italic; }

#stage {
  position: relative; width: 960px; max-width: 96vw;
  border: 4px solid #57492f; background: #000;
}
canvas#scene { display: block; width: 100%; height: auto; image-rendering: pixelated; }
/* Tastatur-Pfad: unsichtbare, fokussierbare Buttons deckungsgleich ueber den Hotspots */
#hotspots { position: absolute; inset: 0; }
.hotspot-btn { position: absolute; background: none; border: none; padding: 0; border-radius: 0; cursor: pointer; }
.hotspot-btn:hover { background: none; }
.hotspot-btn:focus-visible { outline: 3px solid #f0d060; outline-offset: 2px; }
:focus-visible { outline: 2px solid #f0d060; outline-offset: 2px; }
#overlay-content:focus { outline: none; }
#hotlabel {
  display: none; position: fixed; z-index: 30; pointer-events: none;
  background: #16130e; color: #f0d060; border: 1px solid #57492f;
  padding: 3px 9px; font-size: 14px;
}

#overlay {
  display: none; position: fixed; inset: 0; z-index: 20;
  background: rgba(10, 8, 5, 0.78);
  align-items: center; justify-content: center;
}
#overlay-content {
  background: #201b12; border: 2px solid #57492f; border-radius: 4px;
  max-width: 640px; width: 92vw; max-height: 84vh; overflow-y: auto;
  padding: 26px 30px; line-height: 1.55;
}
#overlay-content h2 { margin: 0 0 4px; color: #f4ead0; font-variant: small-caps; letter-spacing: 1px; }
#overlay-content h3 { color: #f4ead0; }
.sub { margin-top: 0; font-style: italic; color: #a89878; }
.note { color: #c8a860; font-style: italic; }
.disclaimer { font-size: 13px; color: #988b6f; border-top: 1px solid #3a3224; padding-top: 10px; }
.speech { font-size: 17px; }
.dialog-head { display: flex; gap: 16px; align-items: center; }
.dialog-head canvas { image-rendering: pixelated; border: 1px solid #57492f; background: #16130e; }
.options { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.options button { text-align: left; }
.entry { border-left: 3px solid #57492f; padding: 6px 12px; margin: 10px 0; }

/* Archiv-Schicht: Dokumente als Faksimile */
.doc {
  background: #e9dfc6; color: #2a2318; border: 1px solid #b6a67f;
  padding: 18px 22px; margin: 14px 0; position: relative;
  box-shadow: 2px 3px 0 rgba(0,0,0,0.35);
}
.doc-kopf {
  font-variant: small-caps; letter-spacing: 1.5px; font-size: 14px;
  border-bottom: 1px solid #b6a67f; padding-bottom: 6px; margin-bottom: 10px;
  color: #4a3c22;
}
.doc-text { margin: 0; line-height: 1.6; }
.doc-bericht { font-family: 'Courier New', Courier, monospace; }
.doc-bericht .doc-text { font-size: 14px; }
.doc-akte table.doc-felder { width: 100%; border-collapse: collapse; font-size: 15px; }
.doc-akte td { border-bottom: 1px dotted #b6a67f; padding: 5px 8px 5px 0; vertical-align: top; }
.doc-akte td:first-child { width: 38%; font-variant: small-caps; color: #4a3c22; }
.doc-zeitung { text-align: center; font-family: Georgia, serif; }
.doc-zeitung .doc-text { font-size: 15px; }
.doc-zeitung .doc-text br + * { }
.doc-zeitung p.doc-text::first-line { font-weight: bold; letter-spacing: 3px; }
.doc-notiz { background: #efe6cf; font-style: italic; }
.doc-notiz .doc-text { font-family: Georgia, serif; }
.doc-foto { background: #1a1611; color: #d8cdb4; border: 6px double #57492f; text-align: center; }
.doc-foto .doc-kopf { color: #a89878; border-color: #57492f; }
.evidenz-label {
  float: right; margin: -4px -8px 6px 10px;
  font-size: 11px; font-variant: small-caps; letter-spacing: 1px;
  border: 1px solid #8a7d63; color: #6a5a3a; background: #f2e9d2;
  padding: 2px 8px; border-radius: 3px;
}
.doc-foto .evidenz-label { color: #a89878; background: #241e13; border-color: #57492f; }
.doc-stempel {
  position: absolute; right: 16px; bottom: 12px;
  color: #8a1f1f; border: 2px solid #8a1f1f; border-radius: 3px;
  padding: 2px 10px; font-size: 13px; font-variant: small-caps;
  transform: rotate(-7deg); opacity: 0.8;
}
.doc-badge {
  float: right; font-size: 11px; font-variant: small-caps; letter-spacing: 1px;
  border: 1px solid #57492f; padding: 1px 7px; border-radius: 3px; color: #c8a860;
}
button.entry-btn {
  display: block; width: 100%; text-align: left; margin: 8px 0;
  border-left: 3px solid #57492f; padding: 8px 12px;
}
.entry-sum { font-size: 13px; color: #a89878; }
.unlock-note { color: #f0d060; }
.options button.fresh { border-color: #c8a860; }
.neu-badge {
  display: inline-block; font-size: 11px; font-variant: small-caps;
  letter-spacing: 1px; background: #c8a860; color: #16130e;
  padding: 0 6px; border-radius: 3px; vertical-align: 1px;
}
.slot { margin: 12px 0; }
.slot label { display: block; margin-bottom: 4px; color: #f4ead0; }
.slot.confirmed select { opacity: 0.55; }
.slot-stempel {
  /* helleres Stempel-Rot: #8a1f1f besteht nur auf hellem Papier, nicht auf dem dunklen Overlay */
  float: right; color: #d4756a; border: 2px solid #d4756a; border-radius: 3px;
  padding: 1px 8px; font-size: 12px; font-variant: small-caps;
  letter-spacing: 1px; transform: rotate(-3deg);
}
.slot select.beleg { margin-top: 5px; font-style: italic; color: #c8a860; }
.slot select {
  font-family: inherit; font-size: 15px; width: 100%;
  background: #2a241a; color: #d8cdb4; border: 1px solid #57492f; padding: 6px;
}
.sources { font-size: 14px; }
.sources a { color: #c8a860; }
#footer { padding: 8px; font-size: 13px; color: #8a7d63; }
#reset-btn, #cases-btn, #sound-btn { font-size: 13px; padding: 7px 10px; opacity: 0.7; }

/* Fallauswahl (zugleich Landing Page) */
#caseselect { max-width: 640px; width: 92vw; padding: 30px 0 60px; }
#caseselect h1 { font-variant: small-caps; letter-spacing: 2px; color: #f4ead0; margin-bottom: 2px; }
.sel-sub { margin-top: 0; font-style: italic; color: #a89878; }
.sel-was { line-height: 1.55; margin: 4px 0 8px; }
.sel-fuss { font-size: 13px; color: #988b6f; line-height: 1.5; border-top: 1px solid #3a3224; padding-top: 12px; margin-top: 22px; }
.install-hint {
  position: relative; border: 1px solid #57492f; background: #241e13;
  color: #c8a860; font-size: 14px; line-height: 1.5;
  padding: 9px 38px 9px 12px; margin: 10px 0 4px;
}
.install-hint button {
  position: absolute; right: 2px; top: 2px; background: none; border: none;
  color: #c8a860; font-size: 17px; padding: 4px 10px;
}
.case-thumb {
  display: block; width: 100%; height: auto; image-rendering: pixelated;
  border: 1px solid #b6a67f; background: #000; margin-bottom: 12px;
}
button.case-card {
  display: block; width: 100%; text-align: left; margin: 16px 0;
  background: #e9dfc6; color: #2a2318; border: 1px solid #b6a67f;
  padding: 18px 22px; box-shadow: 3px 4px 0 rgba(0,0,0,0.35);
}
button.case-card:hover { background: #f2e9d2; }
button.case-card b { font-size: 19px; font-variant: small-caps; letter-spacing: 1px; }
.case-teaser { display: block; margin: 6px 0 10px; color: #4a3c22; line-height: 1.45; }
.case-prog { font-size: 13px; color: #6a5a3a; font-style: italic; }
.case-solved {
  display: inline-block; color: #8a1f1f; border: 2px solid #8a1f1f;
  border-radius: 3px; padding: 1px 9px; font-size: 13px;
  font-variant: small-caps; transform: rotate(-3deg);
}
.intro-hint {
  border: 1px solid #57492f; background: #241e13; padding: 10px 14px;
  margin: 12px 0; font-size: 15px; line-height: 1.5;
}
.intro-hint ol { margin: 8px 0 0; padding-left: 22px; }
.intro-hint li { margin: 5px 0; }
button.primary {
  display: block; width: 100%; text-align: center; font-size: 17px;
  background: #57492f; color: #f4ead0; border-color: #6a5a3a;
  padding: 13px; margin: 16px 0 6px;
}
button.primary:hover { background: #6a5a3a; }

/* ---------- Hochkant/Mobile: Szene als Panorama-Streifen oben, Akte darunter ---------- */
@media (max-width: 700px) {
  body { justify-content: flex-start; }
  #stage {
    order: 0; width: 100vw; max-width: 100vw;
    border-left: none; border-right: none; border-width: 3px 0;
    margin-top: env(safe-area-inset-top);
  }
  #topbar {
    order: 1; width: 100vw;
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    padding: 12px max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
  }
  #tabs { display: contents; }        /* Szenen-Tabs werden Grid-Kacheln */
  #topbar .spacer { display: none; }
  #topbar button { font-size: 16px; padding: 13px 10px; }   /* Tap-Flaechen */
  #reset-btn { grid-column: 1 / -1; font-size: 13px; padding: 8px; opacity: 0.7; }
  #footer { order: 2; padding-bottom: max(10px, env(safe-area-inset-bottom)); text-align: center; }
  #overlay { align-items: stretch; }
  #overlay-content {
    max-width: none; width: 100vw; max-height: none;
    border: none; border-radius: 0;
    padding: 24px max(18px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  }
  .options button { padding: 13px 12px; }
  .slot select.beleg { margin-top: 5px; font-style: italic; color: #c8a860; }
.slot select { padding: 11px 8px; font-size: 16px; }      /* verhindert iOS-Auto-Zoom */
}

/* Hint-System */
.hints { margin: 10px 0 14px; }
.hint { border-left: 3px solid #c8a860; padding: 6px 12px; margin: 8px 0;
        font-style: italic; color: #c8a860; }
