/* SIM LYNX: warmes Bilderbuch-UI ueber einer 3D-Welt.
   Navigation oben links (hinter den Arcade-Knoepfen), Status oben rechts,
   unten bleibt Platz fuer Daumen. */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: #1c2742;
  color: #f4eede;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

/* ===================== HUD ===================== */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud button { pointer-events: auto; }

/* ---- Orb-Menue: direkt neben dem Arcade-Orb (Zwei-Orb-Doktrin).
   Der Arcade-Orb des SDK sitzt ganz links (left:12px, endet bei ~58px),
   unser Game-Orb folgt ab left:70px, gleiche Hoehe. ---- */
#orb {
  position: fixed; left: 70px; top: 12px; width: 42px; height: 42px;
  border-radius: 50%; border: 1.5px solid rgba(242, 193, 78, 0.55);
  background: radial-gradient(circle at 34% 30%, #f7d98b, #c98f3b 58%, #7a5a22);
  cursor: pointer; z-index: 60;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.45), inset 0 1px 3px rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#orb:hover { transform: scale(1.08); box-shadow: 0 0 18px rgba(242, 193, 78, 0.6); }
#orb.auf { transform: rotate(45deg) scale(1.05); }
.orbkern {
  position: absolute; inset: 12px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff3cd, #e8a63c);
}
.orbring {
  position: absolute; inset: 3px; border-radius: 50%;
  border: 1px dashed rgba(255, 243, 205, 0.6);
}
#orbmenu {
  position: fixed; left: 70px; top: 62px; z-index: 60;
  display: flex; flex-direction: column; gap: 7px;
}
/* Schmale Screens: Arcade-Orb und Game-Orb bleiben nebeneinander
   (zusammen nur ~112px breit), keine zweite Reihe noetig. */
.orbblatt {
  display: flex; align-items: center; gap: 9px;
  min-width: 42px; height: 42px; padding: 0 12px 0 8px;
  border-radius: 21px; border: 1.5px solid rgba(242, 193, 78, 0.4);
  background: rgba(24, 20, 12, 0.72);
  color: #f4eede; font-size: 13px; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: blattauf 0.22s ease backwards;
}
.orbblatt:nth-child(2) { animation-delay: 0.03s; }
.orbblatt:nth-child(3) { animation-delay: 0.06s; }
.orbblatt:nth-child(4) { animation-delay: 0.09s; }
.orbblatt:nth-child(5) { animation-delay: 0.12s; }
.orbblatt:nth-child(6) { animation-delay: 0.15s; }
@keyframes blattauf { from { opacity: 0; transform: translateY(-8px) scale(0.8); } }
.orbblatt:hover { border-color: rgba(242, 193, 78, 0.9); background: rgba(48, 38, 20, 0.85); }
.orbblatt .oicon { font-size: 20px; }
.orbblatt em { font-style: normal; letter-spacing: 0.3px; white-space: nowrap; }

/* ---- Status oben rechts, leise ---- */
#topright {
  position: fixed; top: 12px; right: 12px; z-index: 50;
  display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
#spielername {
  font-size: 12px; color: #ffe9b0; background: rgba(24, 20, 12, 0.55);
  padding: 3px 10px; border-radius: 12px;
}
#tagzeile { font-size: 13px; opacity: 0.95; }
#punkte { font-size: 22px; font-weight: 700; color: #ffe9b0; }
#punkte .pfote { font-size: 16px; }
.minibar { display: flex; align-items: center; gap: 6px; }
.mlabel { font-size: 11px; }
.mtrack {
  width: 92px; height: 7px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.45); overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.mfill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }
.mfill.hunger { background: linear-gradient(90deg, #d9863c, #f2c14e); }
.mfill.hunger.knapp { background: #d94f3c; animation: knapp 1s infinite alternate; }
@keyframes knapp { to { opacity: 0.5; } }
.mfill.energie { background: linear-gradient(90deg, #6faa53, #b8d96a); }
#windzeile { display: flex; align-items: center; gap: 5px; font-size: 12px; opacity: 0.9; }
#windpfeil { display: inline-block; font-size: 15px; color: #cfe8f2; transition: transform 0.5s ease; }
.windwort { opacity: 0.75; }
#version { font-size: 10px; opacity: 0.55; margin-top: 2px; }

/* ---- Mitte unten: Prompt + Lautstaerke ---- */
#mitteunten {
  position: fixed; left: 50%; bottom: max(120px, env(safe-area-inset-bottom, 0px) + 108px);
  transform: translateX(-50%); z-index: 40;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
#prompt {
  background: rgba(24, 20, 12, 0.78); border: 1.5px solid rgba(242, 193, 78, 0.55);
  padding: 8px 18px; border-radius: 18px; font-size: 15px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
#prompt b {
  display: inline-block; background: #f2c14e; color: #2b2013;
  border-radius: 6px; padding: 1px 7px; margin-right: 6px; font-size: 13px;
}
#lautmeter { display: flex; align-items: center; gap: 8px; }
.ltrack {
  width: 130px; height: 8px; border-radius: 5px;
  background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
#lautfill { height: 100%; background: #b8d96a; border-radius: 5px; transition: width 0.2s; }
#lautfill.laut { background: #d94f3c; }
.lwort { font-size: 11px; opacity: 0.85; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }

/* ---- Toasts ---- */
#toasts {
  position: fixed; top: 68px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  z-index: 55; pointer-events: none; width: min(92vw, 480px);
}
.toast {
  background: rgba(24, 20, 12, 0.82); border: 1px solid rgba(242, 193, 78, 0.4);
  color: #f4eede; padding: 7px 16px; border-radius: 16px; font-size: 13.5px;
  text-align: center; opacity: 0; transform: translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.toast.da { opacity: 1; transform: translateY(0); }
.toast.punkte { border-color: rgba(184, 217, 106, 0.7); color: #e6f2c8; }

/* ---- Vignette, Ego, Puls ---- */
#vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(60, 10, 5, 0.55) 100%);
  transition: opacity 0.4s ease;
}
#egotint {
  position: fixed; inset: 0; pointer-events: none; z-index: 21;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(10, 20, 30, 0.5) 100%);
  box-shadow: inset 0 0 120px rgba(120, 180, 200, 0.25);
}
#pulsring {
  position: fixed; left: 50%; top: 50%; width: 60px; height: 60px;
  margin: -30px 0 0 -30px; border-radius: 50%; z-index: 22;
  border: 2.5px solid rgba(242, 233, 176, 0.9); pointer-events: none;
  opacity: 0;
}
#pulsring.geht { animation: puls 1.25s ease-out; }
@keyframes puls {
  0% { transform: scale(0.4); opacity: 0.95; }
  100% { transform: scale(9); opacity: 0; }
}

/* ---- Touch ---- */
.touchding { position: fixed; z-index: 45; }
#stickzone {
  left: 0; bottom: 0; width: 46vw; max-width: 260px; height: 200px;
  padding: 0 0 max(18px, env(safe-area-inset-bottom, 0px)) 18px;
  display: flex; align-items: flex-end;
}
#stick {
  width: 108px; height: 108px; border-radius: 50%;
  background: rgba(24, 20, 12, 0.4); border: 1.5px solid rgba(255, 255, 255, 0.25);
  position: relative;
}
#stickknauf {
  position: absolute; left: 50%; top: 50%; width: 48px; height: 48px;
  margin: -24px 0 0 -24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f7d98b, #c98f3b);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
#tastenzone {
  right: 0; bottom: 0;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) 0;
  display: grid; grid-template-columns: repeat(2, auto); gap: 10px;
  align-items: end; justify-items: end;
}
.tbtn {
  border-radius: 50%; border: 1.5px solid rgba(242, 193, 78, 0.5);
  background: rgba(24, 20, 12, 0.6); color: #f4eede;
  font-size: 22px; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.tbtn.klein { width: 56px; height: 56px; }
.tbtn.gross { width: 78px; height: 78px; font-size: 30px; background: rgba(64, 46, 16, 0.7); }
.tbtn.druck { background: rgba(242, 193, 78, 0.55); transform: scale(0.94); }

/* ---- Revierkarte ---- */
.panelchen {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 70; background: #2b2418; border: 2px solid rgba(242, 193, 78, 0.5);
  border-radius: 18px; padding: 16px 18px; text-align: center;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}
.panelchen h3 { font-size: 17px; color: #ffe9b0; margin-bottom: 10px; }
#kartesvg svg { display: block; border-radius: 12px; }
.kartefuss { font-size: 11px; opacity: 0.75; margin-top: 8px; max-width: 240px; }
.zuknopf {
  margin-top: 12px; padding: 8px 22px; border-radius: 14px; border: none;
  background: #f2c14e; color: #2b2013; font-size: 14px; font-weight: 600; cursor: pointer;
}
.zuknopf:hover { background: #ffd977; }

/* ===================== BILDERBUCH ===================== */
/* ⚠️ z-index ueber Start- und Ende-Bildschirm (100): die Jahresbilanz-Seite
   und das Luchs-Buch vom Ende-Bildschirm lagen sonst unsichtbar dahinter. */
#buch {
  position: fixed; inset: 0; z-index: 105;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 10, 6, 0.62);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.35s ease;
}
#buch.auf { opacity: 1; }
#buchdeckel {
  background: #6d4c33; border-radius: 16px; padding: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  max-width: min(94vw, 860px); width: 100%;
  transform: scale(0.92); transition: transform 0.35s ease;
}
#buch.auf #buchdeckel { transform: scale(1); }
#buchseiten {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  background: linear-gradient(180deg, #f7efd9, #efe3c4);
  border-radius: 8px; padding: 18px;
  color: #4a3826;
}
#buchbild svg { width: 100%; height: auto; border-radius: 8px; display: block;
  box-shadow: 0 2px 10px rgba(74, 56, 38, 0.25); }
#buchtext { display: flex; flex-direction: column; padding: 6px 4px; }
#buchtitel {
  font-size: clamp(20px, 3.2vw, 28px); font-weight: 800; color: #6d4c33;
  margin-bottom: 12px; line-height: 1.15;
}
#buchsatz { font-size: clamp(14px, 1.9vw, 17px); line-height: 1.55; flex: 1; }
#buchfuss { font-size: 12px; opacity: 0.7; margin: 12px 0 10px; }
.neuband {
  background: #e8a63c; color: #fff; border-radius: 8px; padding: 2px 8px;
  font-weight: 700; font-size: 11px;
}
#buchknoepfe { display: flex; gap: 8px; }
#buch-weiter {
  flex: 1; padding: 10px 0; border: none; border-radius: 12px;
  background: #6d4c33; color: #f7efd9; font-size: 15px; font-weight: 700; cursor: pointer;
}
#buch-weiter:hover { background: #8a6244; }
.buchnav {
  width: 44px; border: 1.5px solid #6d4c33; background: none; border-radius: 12px;
  color: #6d4c33; font-size: 18px; cursor: pointer;
}
@media (max-width: 640px), (max-height: 460px) {
  #buchseiten { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  #buchbild svg { max-height: 34vh; margin: 0 auto; }
}

/* ---- Bibliothek ---- */
#bibliothek {
  position: fixed; inset: 0; z-index: 104;
  background: rgba(12, 10, 6, 0.72); display: flex; align-items: center; justify-content: center;
}
.bibinnen {
  background: #efe3c4; color: #4a3826; border-radius: 16px;
  padding: 20px; max-width: min(94vw, 820px); max-height: 86vh; overflow-y: auto;
  text-align: center;
}
.bibinnen h2 { color: #6d4c33; margin-bottom: 6px; }
#bibstand { font-size: 13px; opacity: 0.8; margin-bottom: 14px; }
#bibgitter {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.bibkarte {
  border: 2px solid #cbb891; border-radius: 10px; background: #f7efd9;
  cursor: pointer; padding: 0 0 6px; overflow: hidden;
}
.bibkarte:hover { border-color: #e8a63c; }
.bibkarte.zu { opacity: 0.55; cursor: default; }
.bibbild svg { width: 100%; height: auto; display: block; }
.bibbild.raetsel {
  height: 74px; display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: #cbb891; font-weight: 800;
}
.bibname { font-size: 11.5px; padding: 5px 4px 0; color: #6d4c33; font-weight: 600; }

/* ===================== START / ENDE ===================== */
#startscreen, #endscreen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto;
}
#startscreen {
  background:
    linear-gradient(180deg, rgba(10, 12, 16, 0.28) 0%, rgba(10, 12, 16, 0.12) 38%, rgba(10, 12, 16, 0.5) 100%),
    #1a1810 url('img/start-bg.jpg') center 40% / cover no-repeat;
}
#endscreen {
  background: linear-gradient(180deg, #6f5896 0%, #b0719b 34%, #ffb677 68%, #3c5940 100%);
}
.startpanel {
  background: rgba(16, 12, 8, 0.58); border: 2px solid rgba(242, 193, 78, 0.5);
  border-radius: 22px; padding: 30px 34px; max-width: min(92vw, 560px);
  text-align: center; margin: 20px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.55);
}
.logo {
  font-size: clamp(40px, 9vw, 64px); font-weight: 900; letter-spacing: 3px;
  color: #f4eede; text-shadow: 0 3px 0 #6d4c33, 0 8px 24px rgba(0, 0, 0, 0.5);
}
.logo span { color: #f2c14e; }
.untertitel { font-size: 15px; color: #ffe9b0; margin: 6px 0 16px; letter-spacing: 1px; }
.startpitch { font-size: 14.5px; line-height: 1.6; opacity: 0.94; margin-bottom: 16px; }
.startctrl { font-size: 12.5px; line-height: 1.9; opacity: 0.85; margin-bottom: 20px; }
.startctrl b {
  background: rgba(242, 193, 78, 0.2); border: 1px solid rgba(242, 193, 78, 0.45);
  border-radius: 5px; padding: 0 5px;
}
.startpad { margin-top: 4px; opacity: 0.8; }
#namenszeile { margin: 0 0 16px; }
#namensfest { font-size: 16px; color: #ffe9b0; letter-spacing: 0.4px; }
#namensfest b { color: #f2c14e; }
#namenseingabe label { display: block; font-size: 12px; opacity: 0.75; margin-bottom: 6px; }
#lynxname {
  width: 100%; padding: 10px 14px; border-radius: 12px;
  border: 1.5px solid rgba(242, 193, 78, 0.5);
  background: rgba(12, 10, 6, 0.55); color: #ffe9b0;
  font-size: 16px; text-align: center; font-family: inherit;
}
#lynxname:focus { outline: none; border-color: #f2c14e; }
.namehint { font-size: 11.5px; opacity: 0.6; margin-top: 6px; }
#btn-start, #btn-nochmal {
  font-size: 19px; font-weight: 800; letter-spacing: 1.5px;
  padding: 14px 44px; border: none; border-radius: 16px; cursor: pointer;
  background: linear-gradient(180deg, #ffd977, #e8a63c); color: #2b2013;
  box-shadow: 0 6px 20px rgba(232, 166, 60, 0.4);
  transition: transform 0.15s ease; font-family: inherit;
}
#btn-start:hover, #btn-nochmal:hover { transform: scale(1.04); }
.startfuss { margin-top: 14px; font-size: 11.5px; opacity: 0.6; }

.endpanel { max-width: min(92vw, 520px); }
#endtitel { font-size: 30px; color: #ffe9b0; margin-bottom: 6px; }
#endgrund { font-size: 14px; opacity: 0.85; margin-bottom: 14px; }
#endpunkte { font-size: 38px; font-weight: 900; color: #f2c14e; margin-bottom: 14px; }
#endliste {
  max-height: 220px; overflow-y: auto; margin-bottom: 12px;
  border-top: 1px solid rgba(242, 193, 78, 0.25);
  border-bottom: 1px solid rgba(242, 193, 78, 0.25);
  padding: 8px 2px;
}
.endzeile {
  display: flex; justify-content: space-between; gap: 14px;
  font-size: 13.5px; padding: 4px 6px; opacity: 0.92;
}
.endzeile b { color: #b8d96a; }
#endbuch { font-size: 13px; opacity: 0.85; margin-bottom: 16px; }
.endknoepfe { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#btn-endbuch {
  padding: 12px 22px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid rgba(242, 193, 78, 0.55); background: none; color: #ffe9b0;
  font-size: 15px;
}
#btn-endbuch:hover { background: rgba(242, 193, 78, 0.15); }

@media (max-width: 720px) {
  #topright { transform: scale(0.92); transform-origin: top right; }
}

/* ===================== MINIMAP ===================== */
/* Sitzt rechts oben unter Punkten, Balken und Wind. Links oben waeren die
   beiden Orbs im Weg, unten die Touch-Zonen. */
#minibox { margin-top: 8px; text-align: right; pointer-events: none; }
#minikarte {
  width: 156px; height: 156px; display: block; margin-left: auto;
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
  opacity: 0.94;
}
.minifuss { font-size: 10px; opacity: 0.55; margin-top: 3px; letter-spacing: 0.5px; }
.minifuss b {
  background: rgba(242, 193, 78, 0.2); border: 1px solid rgba(242, 193, 78, 0.45);
  border-radius: 4px; padding: 0 4px;
}
@media (max-height: 620px) { #minikarte { width: 118px; height: 118px; } }
#topright.nurzeit #minibox { display: none; }

/* ===================== ONLINE-REVIER ===================== */
/* Punktetafel links unter den beiden Orbs. Rechts oben wohnen Status
   und Minimap, unten die Touch-Zonen: links ist der freie Platz. */
#mpliste {
  position: fixed; left: 10px; top: 74px; z-index: 44;
  min-width: 190px; padding: 7px 9px 8px;
  background: rgba(24, 20, 12, 0.72); border: 1.5px solid rgba(242, 193, 78, 0.4);
  border-radius: 12px; pointer-events: none;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
#mpkopf { font-size: 11px; opacity: 0.8; letter-spacing: 0.5px; margin-bottom: 5px; }
.mpzeile {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; padding: 2px 0;
}
.mpzeile.ich .mpname { color: #ffe9b0; font-weight: 700; }
.mppunkt { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.mpname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.mpmarken { font-size: 11px; opacity: 0.8; }
.mpzeile b { color: #f2c14e; min-width: 34px; text-align: right; }
#btn-online {
  font-size: 19px; font-weight: 800; letter-spacing: 1.2px;
  padding: 12px 28px 13px; border: none; border-radius: 16px; cursor: pointer;
  background: linear-gradient(180deg, #c8e68a, #6ea63a); color: #1c2a10;
  box-shadow: 0 6px 20px rgba(110, 166, 58, 0.38);
  transition: transform 0.15s ease; font-family: inherit; width: 100%;
  line-height: 1.15;
}
#btn-online small {
  display: block; font-size: 11.5px; letter-spacing: 1.6px; font-weight: 700;
  opacity: 0.8; margin-top: 3px;
}
#btn-online:hover { transform: scale(1.04); filter: brightness(1.06); }
@media (max-width: 520px) {
  #btn-start, #btn-online { font-size: 16px; letter-spacing: 0.8px; padding-left: 16px; padding-right: 16px; }
  #btn-online small { font-size: 10.5px; letter-spacing: 1.2px; }
}

/* ===================== JAHRESLAUF ===================== */
/* Gleicher Platz wie die Online-Tafel (links unter den Orbs): das eine
   gibt es nur solo, das andere nur online, sie treffen sich nie. */
#saison {
  position: fixed; left: 10px; top: 74px; z-index: 44;
  min-width: 205px; padding: 7px 9px 8px;
  background: rgba(24, 20, 12, 0.72); border: 1.5px solid rgba(242, 193, 78, 0.4);
  border-radius: 12px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
#saisonkopf { font-size: 12px; letter-spacing: 0.4px; margin-bottom: 5px; color: #ffe9b0; }
.sziel {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11.5px; padding: 2px 0; opacity: 0.92;
}
.sziel.fertig { color: #b8d96a; }
.sziel.bald { opacity: 0.45; }
.sziel.bald em { font-style: normal; font-size: 9.5px; border: 1px solid rgba(255,255,255,0.3); border-radius: 6px; padding: 0 5px; }
.sziel b { color: #f2c14e; }
#saison-weiter {
  width: 100%; margin-top: 6px; padding: 7px 10px; cursor: pointer;
  border: none; border-radius: 10px; font-size: 12.5px; font-weight: 700;
  background: linear-gradient(180deg, #ffd977, #e8a63c); color: #2b2013;
  font-family: inherit;
}
#saison-weiter:hover { filter: brightness(1.08); }

/* ===================== GEBURT (Baby-Edition) ===================== */
/* Liegt UNTER den Toasts und dem Prompt, aber ueber der 3D-Welt: du bist
   blind, nur ein warmer Fleck zeigt, wo die Mama liegt. */
#blind {
  position: fixed; inset: 0; z-index: 30; pointer-events: none;
  background: #050302;
}
#blindwort {
  position: absolute; left: 50%; top: 24%; transform: translateX(-50%);
  color: rgba(244, 238, 222, 0.85); font-size: clamp(15px, 2.4vw, 20px);
  font-style: italic; text-align: center; text-shadow: 0 2px 8px #000;
  width: max-content; max-width: 84vw;
}
#milchbalken {
  position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%);
  width: min(46vw, 260px); height: 12px; border-radius: 7px;
  background: rgba(0, 0, 0, 0.6); border: 1.5px solid rgba(255, 214, 170, 0.45);
  overflow: hidden;
}
#milchfill { height: 100%; width: 0%; background: linear-gradient(90deg, #f4ead8, #fff8ec); border-radius: 7px; transition: width 0.3s ease; }

/* ===================== FAMILIE ===================== */
#jungenfrage {
  position: fixed; inset: 0; z-index: 109;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 10, 6, 0.72);
}
#jname1, #jname2 {
  width: 100%; padding: 11px 14px; border-radius: 12px; margin-bottom: 10px;
  border: 1.5px solid rgba(242, 193, 78, 0.5); background: rgba(12, 10, 6, 0.6);
  color: #f4eede; font-size: 16px; font-family: inherit; text-align: center;
}
#jname1:focus, #jname2:focus { outline: none; border-color: #f2c14e; }
#btn-jungen-ja {
  padding: 12px 26px; border-radius: 14px; cursor: pointer; border: none;
  background: linear-gradient(180deg, #ffd977, #e8a63c); color: #2b2013;
  font-size: 15px; font-weight: 700; font-family: inherit;
}
.geschlechtwahl { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.gwahl {
  padding: 10px 20px; border-radius: 12px; cursor: pointer; font-size: 15px;
  border: 1.5px solid rgba(242, 193, 78, 0.4); background: none; color: #f4eede;
  font-family: inherit;
}
.gwahl.aktiv {
  background: rgba(242, 193, 78, 0.22); border-color: #f2c14e; color: #ffe9b0; font-weight: 700;
}
#blende {
  position: fixed; inset: 0; z-index: 120; background: #000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.9s ease; pointer-events: none;
}
#blende.zu { opacity: 1; pointer-events: auto; }
#blendetext {
  color: #e9dcc0; font-size: clamp(16px, 2.6vw, 22px); font-style: italic;
  max-width: min(84vw, 560px); text-align: center; line-height: 1.6;
}
.sziel.schritt { color: #ffe9b0; border-top: 1px solid rgba(242,193,78,0.25); margin-top: 4px; padding-top: 5px; }
.sziel.jhunger i {
  flex: none; width: 64px; height: 6px; border-radius: 3px; overflow: hidden;
  background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2); display: block;
}
.sziel.jhunger em { display: block; height: 100%; background: linear-gradient(90deg,#d9863c,#f2c14e); }

/* ===================== RAUS AUS DEM BUCH ===================== */
/* Das Luchs-Buch hatte seinen einzigen Ausgang unter einem langen Gitter.
   Jetzt liegt oben rechts immer ein X, Escape geht auch. */
.xknopf {
  position: absolute; top: 8px; right: 10px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid rgba(247, 239, 217, 0.55);
  background: rgba(43, 33, 24, 0.75); color: #f7efd9;
  font-size: 16px; line-height: 1; font-weight: 700;
}
.xknopf:hover { background: #8a6244; }
.xknopf.dunkel {
  position: static; border-color: #cbb891; background: #f7efd9; color: #6d4c33;
}
.xknopf.dunkel:hover { background: #e8a63c; color: #fff; }
#buchdeckel { position: relative; }
.bibkopf {
  position: sticky; top: -20px; z-index: 4; background: #efe3c4;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 4px 0 6px; margin: -4px 0 0;
}
.bibkopf h2 { margin: 0; }

/* ===================== STARTKNOEPFE ===================== */
.startknoepfe {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.startknoepfe #btn-start { width: 100%; }
.zweit {
  padding: 10px 18px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid rgba(242, 193, 78, 0.55); background: none; color: #ffe9b0;
  font-size: 13px; font-family: inherit; letter-spacing: 0.6px;
}
.zweit:hover { background: rgba(242, 193, 78, 0.15); }
.duohinweis { font-size: 12px; opacity: 0.7; margin-top: 10px; line-height: 1.5; }
.minilink {
  background: none; border: none; color: #ffe9b0; opacity: 0.85;
  font-size: 11.5px; text-decoration: underline; cursor: pointer; padding: 0;
  font-family: inherit;
}
.minilink:hover { opacity: 1; }
.schmal { max-width: min(92vw, 440px); }
.resettext { font-size: 14px; line-height: 1.6; margin: 10px 0; }
.resetklein { font-size: 12px; opacity: 0.65; margin-bottom: 16px; }
.warnknopf {
  padding: 12px 22px; border-radius: 14px; cursor: pointer; border: none;
  background: #c9533f; color: #fff; font-size: 15px; font-weight: 700;
}
.warnknopf:hover { background: #e0644f; }
#resetfrage {
  position: fixed; inset: 0; z-index: 110;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 10, 6, 0.72);
}
#btn-reset-nein {
  padding: 12px 22px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid rgba(242, 193, 78, 0.55); background: none; color: #ffe9b0; font-size: 15px;
}

/* Splitscreen: oben Spieler 1, unten Spieler 2 */
#duo { position: fixed; inset: 0; pointer-events: none; z-index: 45; }
.duotrenner {
  position: absolute; left: 0; right: 0; top: 50%; height: 3px;
  background: rgba(12, 10, 6, 0.85); box-shadow: 0 0 12px rgba(0, 0, 0, 0.6);
  transform: translateY(-1.5px);
}
.duopanel {
  position: absolute; left: 10px; top: 10px; width: 208px;
  background: rgba(24, 20, 12, 0.72); border: 1.5px solid #f2c14e;
  border-radius: 12px; padding: 7px 9px 8px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
/* Obere Haelfte: der Arcade-Orb und der Game-Orb sitzen links oben,
   das Panel faengt deshalb erst dahinter an. Unten ist die Ecke frei. */
.duopanel { left: 148px; }
.duopanel.unten { left: 10px; top: calc(50% + 10px); }
.duopanel.kampf { box-shadow: 0 0 0 2px rgba(232, 83, 63, 0.85), 0 0 22px rgba(232, 83, 63, 0.5); }
.dukopf { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.dupunkt { width: 10px; height: 10px; border-radius: 50%; background: #f2c14e; flex: none; }
.duname { flex: 1; text-align: left; letter-spacing: 0.5px; }
.dumarken { opacity: 0.85; font-size: 11px; }
.dubars { display: flex; flex-direction: column; gap: 3px; margin: 5px 0 3px; }
.dubars .minibar { justify-content: flex-start; }
.dubars .mtrack { width: 118px; }
.dupunkte { font-size: 17px; font-weight: 800; color: #f2c14e; text-align: left; }
.duprompt {
  margin-top: 5px; font-size: 11.5px; line-height: 1.35;
  border-top: 1px solid rgba(242, 193, 78, 0.28); padding-top: 5px; text-align: left;
}
.duprompt b {
  background: rgba(242, 193, 78, 0.2); border: 1px solid rgba(242, 193, 78, 0.45);
  border-radius: 4px; padding: 0 4px;
}
/* Im Revierkampf bleibt oben rechts nur die Uhr stehen */
#topright.nurzeit #punkte,
#topright.nurzeit .minibar,
#topright.nurzeit #windzeile { display: none; }

/* ===================== REVIERE (Speicherstaende) ===================== */
#welten, #neufrage, #loeschfrage {
  position: fixed; inset: 0; z-index: 108;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 10, 6, 0.72); overflow-y: auto;
}
.weltpanel { max-width: min(94vw, 520px); }
.weltpanel h2 { color: #ffe9b0; font-size: 24px; margin-bottom: 12px; }
#weltliste { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; max-height: 46vh; overflow-y: auto; }
.weltzeile { display: flex; gap: 6px; }
.weltspiel {
  flex: 1; text-align: left; cursor: pointer; padding: 10px 14px;
  border: 1.5px solid rgba(242, 193, 78, 0.45); border-radius: 14px;
  background: rgba(242, 193, 78, 0.08); color: #f4eede; font-family: inherit;
}
.weltspiel:hover { background: rgba(242, 193, 78, 0.2); }
.weltzeile.fertig .weltspiel { opacity: 0.72; border-style: dashed; }
.wname { display: block; font-size: 16px; font-weight: 700; }
.wdetail { display: block; font-size: 11.5px; opacity: 0.75; margin-top: 2px; }
.weltweg {
  width: 46px; border-radius: 14px; cursor: pointer; font-size: 16px;
  border: 1.5px solid rgba(201, 83, 63, 0.5); background: none; color: #e8917f;
}
.weltweg:hover { background: rgba(201, 83, 63, 0.25); }
#btn-neuesrevier, #btn-neu-ja, #welten-zu, #btn-neu-nein {
  padding: 12px 22px; border-radius: 14px; cursor: pointer; font-size: 15px;
  border: 1.5px solid rgba(242, 193, 78, 0.55); background: none; color: #ffe9b0;
  font-family: inherit;
}
#btn-neuesrevier, #btn-neu-ja { background: linear-gradient(180deg, #ffd977, #e8a63c); color: #2b2013; border: none; font-weight: 700; }
#neuname {
  width: 100%; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px;
  border: 1.5px solid rgba(242, 193, 78, 0.5); background: rgba(12, 10, 6, 0.6);
  color: #f4eede; font-size: 16px; font-family: inherit; text-align: center;
}
#neuname:focus { outline: none; border-color: #f2c14e; }

#endduo { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.endspieler {
  border: 1.5px solid rgba(242, 193, 78, 0.5); border-radius: 14px;
  padding: 10px 14px; min-width: 130px;
}
.endspieler.sieger { border-color: #b8d96a; box-shadow: 0 0 18px rgba(184, 217, 106, 0.3); }
.endspieler .esname { font-size: 12px; opacity: 0.85; }
.endspieler .espunkte { font-size: 26px; font-weight: 900; color: #f2c14e; }
.endspieler .eskrone { font-size: 18px; }

/* ===================== PAD-FOKUS ===================== */
/* Der Ring der Menue-Schicht (js/padmenu.js): warmes Gold wie die Rahmen der
   Knoepfe, nur box-shadow (folgt dem border-radius, kein Layoutsprung).
   Bewusst ohne animation: .orbblatt hat eine Einblend-Animation, die sonst
   bei jedem Fokuswechsel neu abliefe. */
.padfokus {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(43, 32, 19, 0.9), 0 0 0 5px #f2c14e, 0 0 0 7px rgba(43, 32, 19, 0.85),
    0 0 26px 6px rgba(242, 193, 78, 0.6) !important;
}
