/* =============================================================================
   "29. Januar 1933"  –  styles.css
   Stil: dunkel, entsättigt, Papier/Akten-Ästhetik, Berlin 1933.
   Keine NS-Symbole, keine Propagandaästhetik – ernste historische Atmosphäre.
   ============================================================================= */

/* ----------------------------- Design-Token ----------------------------- */
:root {
  --ink:        #e8e0cf;   /* helle Schrift auf dunklem Grund */
  --ink-dim:    #b3a98f;
  --ink-faint:  #8a8169;
  --paper:      #d9cdb0;   /* Papierton für Karten */
  --paper-dark: #c4b793;
  --paper-ink:  #2a2419;   /* Schrift auf Papier */
  --bg-0:       #16140f;   /* tiefster Hintergrund */
  --bg-1:       #1e1b15;
  --bg-2:       #28241c;
  --bg-3:       #332e23;
  --line:       #423b2c;
  --accent:     #8a5a2b;   /* gedämpftes Siegel-Braunrot */
  --accent-2:   #9c7b3a;   /* Messing/Stempel */
  --danger:     #9c3a2b;
  --ok:         #5e7048;
  --shadow:     0 8px 30px rgba(0,0,0,.55);
  --serif: "Georgia", "Times New Roman", serif;
  --type:  "Courier New", "Consolas", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.55;
  min-height: 100vh;
}

/* Subtile Papier-/Vignettierungstextur über allem */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 2px, rgba(0,0,0,.012) 2px 4px);
  mix-blend-mode: overlay;
  opacity: .6;
}

h1, h2, h3, h4 { font-weight: 700; letter-spacing: .02em; }
button { font-family: var(--type); cursor: pointer; }
.muted { color: var(--ink-faint); font-style: italic; }

/* ------------------------------ Screens -------------------------------- */
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; animation: fade .5s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ============================ STARTBILDSCHIRM =========================== */
#screen-start {
  display: none;
  place-items: center;
  background:
    radial-gradient(80% 60% at 50% 30%, rgba(138,90,43,.12), rgba(0,0,0,0) 70%),
    linear-gradient(160deg, var(--bg-1), var(--bg-0));
}
#screen-start.active { display: grid; }

.start-wrap {
  max-width: 640px;
  margin: 6vh 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(40,36,28,.85), rgba(22,20,15,.9));
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 44px 40px 32px;
  box-shadow: var(--shadow);
  position: relative;
}
.start-stamp {
  display: inline-block;
  font-family: var(--type);
  letter-spacing: .35em;
  color: var(--accent-2);
  border: 2px solid var(--accent-2);
  padding: 6px 16px;
  transform: rotate(-3deg);
  opacity: .85;
  margin-bottom: 18px;
  font-size: 13px;
}
.start-title {
  font-size: 44px;
  margin: 0 0 6px;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(0,0,0,.5);
}
.start-sub { color: var(--ink-dim); margin: 0 0 22px; font-style: italic; }
.start-text { color: var(--ink-dim); font-size: 16px; margin: 0 0 26px; }
.start-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.start-disclaimer {
  margin-top: 26px; font-size: 12px; color: var(--ink-faint);
  border-top: 1px solid var(--line); padding-top: 16px;
}

/* Buttons */
.btn-primary, .btn-secondary {
  font-family: var(--type);
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 3px;
  border: 1px solid var(--line);
  transition: transform .12s, background .2s, border-color .2s;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent), #6f4621);
  color: #f4ead4; border-color: #5a3a1c;
}
.btn-primary:hover { transform: translateY(-2px); background: linear-gradient(180deg, #9c6630, #7a4d24); }
.btn-secondary { background: var(--bg-3); color: var(--ink-dim); }
.btn-secondary:hover { transform: translateY(-2px); color: var(--ink); border-color: var(--accent-2); }

/* ============================== TOPBAR ================================= */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 10px 18px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  flex-wrap: wrap;
}
.clock-box { display: flex; align-items: baseline; gap: 10px; }
.clock-label { font-family: var(--type); font-size: 11px; color: var(--ink-faint); letter-spacing: .1em; }
.clock {
  font-family: var(--type); font-size: 26px; font-weight: 700;
  color: var(--accent-2); letter-spacing: .05em;
  text-shadow: 0 0 12px rgba(156,123,58,.25);
}
.time-remain { font-family: var(--type); font-size: 11px; color: var(--ink-faint); }

.pressure-box { display: flex; align-items: center; gap: 8px; }
.pressure-label { font-family: var(--type); font-size: 11px; color: var(--ink-faint); letter-spacing: .15em; text-transform: uppercase; }
.pressure-track {
  width: 160px; height: 12px; background: var(--bg-0);
  border: 1px solid var(--line); border-radius: 2px; overflow: hidden;
}
.pressure-bar {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #6f6a3a, #9c7b3a);
  transition: width .4s ease, background .4s;
}
.pressure-bar.danger { background: linear-gradient(90deg, #8a3a2b, #c0432f); animation: throb 1.1s infinite; }
@keyframes throb { 0%,100%{ opacity:1; } 50%{ opacity:.7; } }
.pressure-val { font-family: var(--type); font-size: 12px; color: var(--ink-dim); width: 24px; }

.topbar-right { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-btn {
  background: var(--bg-3); color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 8px 12px; font-size: 13px;
  transition: transform .12s, color .2s, border-color .2s;
}
.tool-btn:hover { transform: translateY(-2px); color: var(--ink); border-color: var(--accent-2); }
.tool-btn.accent { color: #e7c98c; border-color: var(--accent); }
.tool-btn.pulse { animation: pulse .6s ease; }
@keyframes pulse { 0%{ box-shadow: 0 0 0 0 rgba(156,123,58,.6);} 100%{ box-shadow: 0 0 0 14px rgba(156,123,58,0);} }
.badge {
  display: inline-block; background: var(--accent); color: #f4ead4;
  border-radius: 10px; padding: 0 7px; font-size: 11px; margin-left: 2px;
}

/* ============================== STAGE ================================= */
.stage {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 22px;
  max-width: 1100px;
  margin: 26px auto;
  padding: 0 20px 60px;
}

/* Ortsbild links */
.scene-panel {
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: var(--shadow);
  height: fit-content;
}
.scene-art { aspect-ratio: 400/260; background: var(--bg-1); }
.scene-art svg { display: block; width: 100%; height: 100%; }
.scene-caption {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
}
.scene-caption h2 { margin: 0; font-size: 19px; color: var(--ink); }
.danger-flag {
  display: none; font-family: var(--type); font-size: 11px;
  color: #e7a08c; border: 1px solid var(--danger);
  padding: 3px 8px; border-radius: 2px; background: rgba(156,58,43,.15);
}

/* Text + Aktionen rechts */
.text-panel {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 20px 22px;
  background:
    linear-gradient(180deg, rgba(217,205,176,.04), rgba(217,205,176,.01)),
    var(--bg-2);
  box-shadow: var(--shadow);
}
.scene-desc { font-size: 16px; color: var(--ink-dim); margin: 0 0 20px; }
.actions-head {
  font-family: var(--type); font-size: 12px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-faint);
  border-bottom: 1px solid var(--line); padding-bottom: 8px; margin: 0 0 14px;
}
.action-list { display: flex; flex-direction: column; gap: 10px; }
.action-btn {
  display: flex; align-items: center; gap: 12px;
  text-align: left; width: 100%;
  background: var(--bg-3); color: var(--ink);
  border: 1px solid var(--line); border-left: 3px solid var(--accent-2);
  border-radius: 3px; padding: 11px 14px;
  transition: transform .12s, background .2s, border-color .2s;
}
.action-btn:hover { transform: translateX(4px); background: #3a3327; border-left-color: var(--accent); }
.action-btn.person { border-left-color: var(--accent); }
.action-btn .ico { font-size: 22px; width: 28px; text-align: center; }
.action-btn .lbl { flex: 1; display: flex; flex-direction: column; }
.action-btn .lbl strong { font-family: var(--serif); font-size: 15px; }
.action-btn .lbl em { font-size: 12px; color: var(--ink-faint); font-style: italic; }
.action-btn .cost { font-family: var(--type); font-size: 11px; color: var(--ink-faint); }

/* ============================ DIALOG-OVERLAY =========================== */
.dialogue {
  position: fixed; inset: 0; z-index: 200;
  display: none; place-items: end center;
  background: rgba(8,7,5,.6); backdrop-filter: blur(2px);
}
.dialogue.open { display: grid; animation: fade .25s; }
.dlg-box {
  width: min(820px, 94vw);
  margin-bottom: 4vh;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 6px;
  padding: 22px 24px 24px;
  box-shadow: var(--shadow);
  position: relative;
  animation: slideup .3s ease;
}
@keyframes slideup { from { transform: translateY(30px); opacity:0; } to { transform: translateY(0); opacity:1; } }
.dlg-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--ink-faint); font-size: 18px;
}
.dlg-close:hover { color: var(--ink); }
.dlg-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.dlg-portrait {
  font-size: 30px; width: 52px; height: 52px;
  display: grid; place-items: center;
  background: var(--bg-0); border: 1px solid var(--line); border-radius: 50%;
}
.dlg-name { font-size: 18px; color: var(--ink); font-weight: 700; }
.dlg-role { font-size: 12px; color: var(--ink-faint); font-style: italic; }
.dlg-text {
  font-size: 17px; color: var(--ink); line-height: 1.6;
  border-left: 2px solid var(--accent-2); padding-left: 16px;
  margin: 0 0 18px;
}
.dlg-options { display: flex; flex-direction: column; gap: 8px; }
.dlg-opt {
  text-align: left; background: var(--bg-3); color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 11px 14px; font-size: 14px;
  transition: background .15s, color .15s, transform .1s;
}
.dlg-opt:hover { background: #3d3526; color: var(--ink); transform: translateX(3px); border-color: var(--accent-2); }

/* ============================== MODAL ================================= */
.modal {
  position: fixed; inset: 0; z-index: 300; display: none;
  place-items: center; background: rgba(8,7,5,.7); backdrop-filter: blur(3px);
  padding: 20px;
}
.modal.open { display: grid; animation: fade .25s; }
.modal-box {
  width: min(760px, 96vw); max-height: 86vh; overflow: auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); border-top: 3px solid var(--accent-2);
  border-radius: 6px; padding: 22px 26px; box-shadow: var(--shadow);
  position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: var(--ink-faint); font-size: 20px;
}
.modal-close:hover { color: var(--ink); }
.modal-title {
  margin: 0 0 16px; font-size: 22px; color: var(--ink);
  border-bottom: 1px solid var(--line); padding-bottom: 10px;
}
.modal-body p { color: var(--ink-dim); }

/* Inventar (Aktenmappe) */
.folder { display: flex; flex-direction: column; gap: 12px; }
.item-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--paper); color: var(--paper-ink);
  border-radius: 3px; padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  border-left: 4px solid var(--accent);
}
.item-card .item-ico { font-size: 26px; }
.item-card strong { font-size: 15px; }
.item-card p { margin: 4px 0 0; font-size: 13px; color: #5a4f3a; }

/* Beweise (Karteikarten) */
.cards { display: grid; gap: 14px; }
.index-card {
  background: repeating-linear-gradient(var(--paper) 0 27px, #cfc09f 27px 28px);
  color: var(--paper-ink);
  border-radius: 3px; padding: 14px 16px 16px;
  box-shadow: 0 3px 10px rgba(0,0,0,.45);
  border-top: 2px solid #b09a6a;
  position: relative;
}
.index-card.key { border-left: 5px solid var(--accent); }
.card-type { font-family: var(--type); font-size: 11px; color: #6f6243; text-transform: uppercase; letter-spacing: .08em; }
.key-tag { color: var(--accent); font-weight: 700; }
.card-title { font-size: 16px; font-weight: 700; margin: 4px 0 8px; }
.card-text { font-size: 14px; color: #463d2b; line-height: 1.9; }

/* Karte / Stadtplan */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 14px; }
.map-loc {
  display: flex; flex-direction: column; text-align: left;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 4px; overflow: hidden; color: var(--ink);
  transition: transform .12s, border-color .2s;
}
.map-loc:not(.locked):not(.current):hover { transform: translateY(-3px); border-color: var(--accent-2); }
.map-art { aspect-ratio: 400/200; overflow: hidden; background: var(--bg-1); }
.map-art svg { width: 100%; height: 100%; display: block; }
.map-art .lock { display: grid; place-items: center; height: 100%; font-size: 28px; opacity: .4; }
.map-info { padding: 9px 12px; }
.map-info strong { font-size: 14px; }
.map-info em { display: block; font-size: 11px; color: var(--ink-faint); font-family: var(--type); font-style: normal; }
.map-loc.locked { opacity: .55; cursor: not-allowed; }
.map-loc.current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.map-loc.danger .map-info strong::after { content: " ⚠"; color: #e7a08c; }

/* ============================ FINALE: REDE ============================ */
.speech-wrap { max-width: 820px; margin: 30px auto; padding: 0 20px 60px; }
.speech-head { font-size: 32px; text-align: center; margin: 10px 0 14px; }
.speech-intro { color: var(--ink-dim); font-size: 16px; text-align: center; }
.speech-hint {
  color: var(--ink-faint); font-size: 13px; font-style: italic;
  text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 10px 0; margin: 18px 0 24px;
}
.slot-block { margin-bottom: 22px; }
.slot-block h3 {
  font-family: var(--type); font-size: 13px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--accent-2); margin: 0 0 10px;
}
.note-list { display: grid; gap: 10px; }
.note {
  text-align: left; position: relative;
  background: var(--paper); color: var(--paper-ink);
  border: 1px solid #b6a576; border-radius: 2px;
  padding: 12px 14px; transition: transform .12s, box-shadow .2s;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  transform: rotate(-.3deg);
}
.note:nth-child(even) { transform: rotate(.4deg); }
.note:hover { transform: rotate(0) translateY(-2px); box-shadow: 0 5px 14px rgba(0,0,0,.45); }
.note.strong { background: #e4d7b4; border-left: 4px solid var(--accent); }
.note.selected { outline: 3px solid var(--accent); box-shadow: 0 0 0 3px rgba(138,90,43,.3), 0 5px 14px rgba(0,0,0,.5); }
.note-label { display: block; font-family: var(--type); font-size: 12px; color: var(--accent); font-weight: 700; margin-bottom: 4px; }
.note-text { display: block; font-size: 14px; color: #3d3525; line-height: 1.5; }

.speech-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 18px; margin-top: 10px;
}
.speech-progress { font-family: var(--type); font-size: 13px; color: var(--ink-dim); }
.speech-footer > div { display: flex; gap: 10px; }

/* ============================== ENDE ================================= */
.ending-wrap { max-width: 800px; margin: 34px auto; padding: 0 22px 70px; }
.ending-title {
  font-size: 30px; text-align: center; color: var(--ink);
  border-bottom: 2px solid var(--accent); padding-bottom: 16px; margin-bottom: 26px;
}
.ending-section { margin-bottom: 28px; }
.ending-section h3 {
  font-family: var(--type); font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent-2); margin: 0 0 12px;
}
.delivered-speech {
  background: var(--paper); color: var(--paper-ink);
  border-radius: 3px; padding: 22px 26px;
  box-shadow: var(--shadow); border-left: 4px solid var(--accent);
  font-family: var(--type); font-size: 14px; line-height: 1.9;
}
.delivered-speech p { margin: 0 0 12px; }
.delivered-speech p:last-child { margin: 0; }
.ending-text { font-size: 16px; color: var(--ink-dim); }
.ending-eval { display: flex; flex-direction: column; gap: 10px; }
.eval-row { display: flex; align-items: center; gap: 12px; }
.eval-label { width: 200px; font-size: 13px; color: var(--ink-dim); }
.eval-track { flex: 1; height: 12px; background: var(--bg-0); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.eval-fill { display: block; height: 100%; background: linear-gradient(90deg, #6f6a3a, var(--accent-2)); transition: width .8s ease; }
.eval-num { width: 30px; text-align: right; font-family: var(--type); font-size: 13px; color: var(--ink-dim); }
.ending-section.lesson p {
  background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--accent-2);
  padding: 16px 18px; border-radius: 3px; color: var(--ink-dim); font-size: 15px;
}
.ending-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }

/* ============================ LERNMODUS ============================== */
.debrief-wrap { max-width: 860px; margin: 34px auto; padding: 0 22px 70px; }
.debrief-head { font-size: 30px; text-align: center; margin-bottom: 8px; }
.debrief-section { margin-bottom: 30px; }
.debrief-section h2 {
  font-size: 20px; color: var(--ink); border-bottom: 1px solid var(--line);
  padding-bottom: 8px; margin-bottom: 14px;
}
.debrief-lead { color: var(--ink-dim); font-size: 16px; }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; }
.learn-card {
  background: var(--bg-2); border: 1px solid var(--line); border-top: 2px solid var(--accent-2);
  border-radius: 4px; padding: 14px 16px;
}
.learn-card h4 { margin: 0 0 8px; font-size: 15px; color: var(--ink); }
.learn-card p { margin: 0; font-size: 13px; color: var(--ink-dim); }
.learn-list { display: flex; flex-direction: column; gap: 6px; }
.learn-li { font-family: var(--type); font-size: 13px; color: var(--ok); }
.learn-li.missed { color: var(--ink-faint); }
.learn-bullets { color: var(--ink-dim); font-size: 15px; }
.learn-bullets li { margin-bottom: 10px; }

/* ============================== TOAST =============================== */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--bg-3); color: var(--ink);
  border: 1px solid var(--accent-2); border-left: 4px solid var(--accent);
  border-radius: 3px; padding: 12px 20px; font-family: var(--type); font-size: 13px;
  box-shadow: var(--shadow); z-index: 500;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================ HP-CHIP (Topbar) ====================== */
.hp-box {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 14px; font-family: var(--type);
}
.hp-heart { color: #b6543f; font-size: 14px; }
.hp-num { font-size: 14px; color: var(--ink-dim); }
.hp-box.low .hp-heart { animation: throb 1s infinite; }
.hp-box.low .hp-num { color: #e7a08c; }

/* ===================== STATUS-BOX (Inventar) ======================= */
.status-box {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: 4px; padding: 12px 14px; margin-bottom: 6px;
  display: flex; flex-direction: column; gap: 10px;
}
.status-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-dim); }
.status-row > span:first-child { width: 150px; }
.status-track { flex: 1; height: 12px; background: var(--bg-0); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.status-fill { display: block; height: 100%; background: linear-gradient(90deg, #5e7048, #7a8a4a); transition: width .4s; }
.status-fill.low { background: linear-gradient(90deg, #8a3a2b, #c0432f); }
.status-num { font-family: var(--type); font-size: 13px; color: var(--ink-dim); }

/* ============================== KAMPF =============================== */
.combat {
  position: fixed; inset: 0; z-index: 400; display: none;
  place-items: center; padding: 16px;
  background: radial-gradient(80% 80% at 50% 40%, rgba(60,20,12,.35), rgba(8,7,5,.85));
  backdrop-filter: blur(3px);
}
.combat.open { display: grid; animation: fade .3s; }
.combat-box {
  width: min(640px, 96vw);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); border-top: 3px solid var(--danger);
  border-radius: 8px; padding: 20px 22px 22px; box-shadow: var(--shadow);
  animation: slideup .3s ease;
}
.combat-title {
  text-align: center; margin: 0 0 18px; font-size: 22px; color: #e7b9a8;
  letter-spacing: .04em;
}
.combat-arena {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px;
  margin-bottom: 16px;
}
.fighter { text-align: center; }
.fighter-art { height: 110px; display: grid; place-items: end center; }
.fighter-art svg { height: 100%; width: auto; }
.enemy-art { filter: saturate(.4); }
.fighter-name { font-family: var(--type); font-size: 12px; color: var(--ink-dim); margin: 6px 0 6px; }
.combat-vs { font-size: 22px; color: var(--ink-faint); padding-bottom: 40px; }
.hpbar { height: 12px; background: var(--bg-0); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.hpfill { display: block; height: 100%; transition: width .4s ease; }
.enemy-hp { background: linear-gradient(90deg, #6a3a2f, #9c3a2b); }
.player-hp { background: linear-gradient(90deg, #5e7048, #7a8a4a); }
.player-hp.low { background: linear-gradient(90deg, #8a3a2b, #c0432f); }
.hpval { font-family: var(--type); font-size: 11px; color: var(--ink-faint); margin-top: 4px; }
.combat-log {
  background: var(--bg-0); border: 1px solid var(--line); border-radius: 4px;
  padding: 12px 14px; height: 120px; overflow-y: auto; margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}
.combat-log p { margin: 0 0 8px; font-size: 14px; color: var(--ink-dim); }
.combat-log p:last-child { margin: 0; color: var(--ink); }
.combat-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.combat-btn {
  background: var(--bg-3); color: var(--ink); border: 1px solid var(--line);
  border-left: 3px solid var(--accent-2); border-radius: 3px;
  padding: 12px 14px; font-size: 15px; text-align: left;
  transition: transform .12s, background .2s;
}
.combat-btn em { display: block; font-style: normal; font-size: 11px; color: var(--ink-faint); margin-top: 2px; }
.combat-btn:hover:not(:disabled) { transform: translateY(-2px); background: #3d3526; border-left-color: var(--accent); }
.combat-btn:active:not(:disabled) { transform: translateY(0); }
.combat-btn:disabled { opacity: .4; cursor: not-allowed; }
.combat-btn.weiter { grid-column: 1 / -1; text-align: center; border-left: none; border-top: 3px solid var(--accent); background: linear-gradient(180deg, var(--accent), #6f4621); color: #f4ead4; }

/* ===================== ANGESCHLAGEN-CHIP (Topbar) ================== */
.dazed-flag {
  display: none; align-items: center; gap: 4px;
  margin-left: 12px; font-family: var(--type); font-size: 12px;
  color: #e7b98c; border: 1px solid #8a5a2b; background: rgba(138,90,43,.18);
  padding: 3px 8px; border-radius: 2px; animation: throb 1.4s infinite;
}

/* ============================ LABYRINTH ============================ */
.maze {
  position: fixed; inset: 0; z-index: 400; display: none;
  place-items: center; padding: 16px;
  background: radial-gradient(70% 70% at 50% 45%, rgba(20,16,8,.6), rgba(6,5,3,.92));
  backdrop-filter: blur(2px);
}
.maze.open { display: grid; animation: fade .3s; }
.maze-box {
  width: min(540px, 96vw);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); border-top: 3px solid var(--accent-2);
  border-radius: 8px; padding: 18px 20px 20px; box-shadow: var(--shadow);
  animation: slideup .3s ease; text-align: center;
}
.maze-title { margin: 0 0 6px; font-size: 20px; color: var(--ink); }
.maze-status { margin: 0 0 14px; font-size: 13px; color: var(--accent-2); font-family: var(--type); min-height: 18px; }
.maze-canvas-wrap { display: flex; justify-content: center; }
.maze-canvas {
  image-rendering: pixelated; image-rendering: crisp-edges;
  border: 2px solid #100f0a; border-radius: 3px; background: #0b0a07;
  max-width: 100%; height: auto; touch-action: none;
}
.maze-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 16px; flex-wrap: wrap;
}
.dpad { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dpad-mid { display: flex; gap: 44px; }
.dpad-btn {
  width: 50px; height: 50px; font-size: 18px;
  background: var(--bg-3); color: var(--ink); border: 1px solid var(--line);
  border-radius: 6px; transition: background .12s, transform .1s;
}
.dpad-btn:hover { background: #3d3526; }
.dpad-btn:active { background: var(--accent); transform: scale(.94); }
.maze-info { flex: 1; min-width: 180px; text-align: left; }
.maze-info p { margin: 0 0 6px; font-size: 13px; color: var(--ink-dim); }
.maze-info .btn-secondary { margin-top: 6px; }

/* ============================ RESPONSIVE ============================ */
/* Tablets / iPad Hochformat: einspaltig, größere Tap-Ziele */
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
  .scene-art { max-height: 30vh; }
}
@media (max-width: 760px) {
  .topbar { gap: 8px 10px; padding: 8px 12px; }
  .topbar-left, .topbar-center, .topbar-right { flex: 1 1 auto; }
  .topbar-right { justify-content: flex-end; }
  .pressure-track { width: 90px; }
  .clock { font-size: 22px; }
  .start-title { font-size: 32px; }
  .eval-label { width: 120px; font-size: 12px; }
  .combat-arena { gap: 6px; }
  .fighter-art { height: 84px; }
}

/* Touch-Geräte (iPad u.a.): komfortablere Flächen, kein klebriger Hover */
@media (pointer: coarse) {
  .action-btn, .dlg-opt, .combat-btn, .tool-btn, .note, .map-loc, .btn-primary, .btn-secondary {
    min-height: 48px;
  }
  .dlg-opt { padding: 14px 16px; font-size: 16px; }
  .action-btn { padding: 14px 16px; }
  .tool-btn { padding: 10px 14px; font-size: 14px; }
  .note-text { font-size: 15px; }
  /* Steuerkreuz fürs Labyrinth größer und fingerfreundlicher */
  .dpad-btn { width: 62px; height: 62px; font-size: 22px; }
  .dpad-mid { gap: 56px; }
  .combat-btn { font-size: 16px; }
  /* Hover-Transforms auf Touch neutralisieren, damit nichts „hängen“ bleibt */
  .action-btn:hover, .dlg-opt:hover, .note:hover, .map-loc:hover,
  .btn-primary:hover, .btn-secondary:hover, .tool-btn:hover, .combat-btn:hover {
    transform: none;
  }
  .action-btn:active { background: #3a3327; }
  .dlg-opt:active, .combat-btn:active { background: #3d3526; }
}

/* Allgemeine Touch-Verbesserungen */
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.modal-box, .dlg-box, .combat-box { -webkit-overflow-scrolling: touch; }
