:root {
  --bg: #080c18;
  --bg-2: #0d1326;
  --panel: rgba(18, 24, 44, 0.88);
  --panel-2: #172041;
  --line: #2a3459;
  --line-soft: #1f2846;
  --gold: #d8b36c;
  --gold-soft: #9c8150;
  --titan: #72d3ff;
  --titan-soft: rgba(114, 211, 255, 0.16);
  --text: #e9e4d6;
  --muted: #98a2c0;
  --ok: #6fd39a;
  --warn: #f0b04d;
  --bad: #ef6b6b;
  --whisper: #ff86ee;
  --radius: 14px;
  --head: "Cinzel", "Palatino Linotype", Georgia, serif;
  --body: "Segoe UI", system-ui, -apple-system, sans-serif;
  --rune: "Segoe UI Historic", "Noto Sans Runic", "Segoe UI Symbol", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--body);
  color: var(--text);
  background:
    radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 8%, #fff6 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 62%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 44%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 30%, #fff4 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 20% 84%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 90%, #fff6 50%, transparent 51%),
    radial-gradient(ellipse at 70% -10%, #1d2b5c 0%, transparent 55%),
    radial-gradient(ellipse at 0% 100%, #1a1838 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.55;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: 0.02em; margin: 0; }

/* ---------- Mockup toolbar ---------- */
.mockbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px 16px;
  background: #e8e8e8; color: #222;
  font-size: 13px;
  border-bottom: 1px dashed #999;
}
.mockbar strong { margin-right: 6px; letter-spacing: 0.06em; }
.mockbar button {
  border: 1px solid #aaa; background: #fff; color: #222;
  border-radius: 6px; padding: 4px 10px; font-size: 13px;
}
.mockbar button.active { background: #222; color: #fff; border-color: #222; }
.mockbar .spacer { flex: 1; }
.mockbar .note { color: #666; }

/* ---------- Generic ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.btn {
  border: 1px solid var(--gold-soft);
  background: linear-gradient(180deg, #3a2f1b, #241c10);
  color: var(--gold);
  padding: 10px 18px; border-radius: 10px;
  font-family: var(--head); font-weight: 600; letter-spacing: 0.04em;
  transition: transform 0.08s, box-shadow 0.2s;
}
.btn:hover { box-shadow: 0 0 0 3px rgba(216, 179, 108, 0.15); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); font-family: var(--body); font-weight: 500; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { border-color: #6b2b2b; color: var(--bad); background: transparent; font-family: var(--body); }
.tag {
  display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 99px;
  border: 1px solid var(--line); color: var(--muted);
}
.muted { color: var(--muted); }
.mock-note {
  border: 1px dashed #8a8fa6; border-radius: 10px; padding: 12px 14px;
  color: #c9cde0; background: rgba(255, 255, 255, 0.03); font-size: 14px;
}
.mock-note::before { content: "Mockup-Notiz · "; font-weight: 600; color: #fff; }
input.field, textarea.field {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  background: #0a1022; border: 1px solid var(--line); outline: none;
}
input.field:focus, textarea.field:focus { border-color: var(--titan); box-shadow: 0 0 0 3px var(--titan-soft); }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid; place-items: center; padding: 32px 16px;
}
.login-grid { display: grid; grid-template-columns: 420px 300px; gap: 28px; align-items: center; }
.login-card { padding: 36px 32px; text-align: center; }
.login-card h1 { font-size: 30px; color: var(--gold); margin: 18px 0 8px; }
.login-card p { color: var(--muted); margin: 0 0 22px; }
.login-card form { display: grid; gap: 12px; }
.login-card .hint { font-size: 13px; color: var(--muted); margin-top: 14px; }
.seal-emblem {
  width: 110px; height: 110px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--rune); font-size: 48px; color: var(--titan);
  background: radial-gradient(circle, #1a2a52 0%, #0d1326 70%);
  border: 2px solid var(--gold-soft);
  box-shadow: 0 0 0 6px #0d1326, 0 0 0 7px var(--line), 0 0 40px rgba(114, 211, 255, 0.25);
  text-shadow: 0 0 14px var(--titan);
}
.gift-card {
  background: #efe4c8; color: #3a2c16; border-radius: 8px; padding: 22px 20px;
  transform: rotate(2.5deg); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  font-family: var(--head); text-align: center;
}
.gift-card .qr {
  width: 120px; height: 120px; margin: 14px auto; background: #fff; padding: 8px;
  display: grid; grid-template-columns: repeat(11, 1fr); gap: 0;
}
.gift-card .qr i { background: #222; }
.gift-card .qr i.w { background: transparent; }
.gift-card small { display: block; font-family: var(--body); font-size: 12px; color: #6c5a3a; }
.gift-card code { font-family: Consolas, monospace; font-size: 13px; background: #e2d4b0; padding: 2px 6px; border-radius: 4px; }
.gift-caption { text-align: center; color: var(--muted); font-size: 13px; margin-top: 14px; }

/* ---------- Player layout ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 14px 24px;
  border-bottom: 1px solid var(--line-soft); background: rgba(8, 12, 24, 0.7);
  backdrop-filter: blur(6px);
}
.brand { font-family: var(--head); font-size: 20px; color: var(--gold); cursor: pointer; }
.brand span { color: var(--titan); font-family: var(--rune); margin-right: 8px; }
.topbar .spacer { flex: 1; }
.progress-mini { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.progress-mini .bar { width: 140px; height: 6px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.progress-mini .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); }
.player-chip { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.player-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: #2b2140; border: 1px solid var(--gold-soft); font-family: var(--head); color: var(--gold);
}

.shell { display: grid; grid-template-columns: 290px 1fr; gap: 24px; padding: 24px; max-width: 1240px; margin: 0 auto; }
.sidebar { display: grid; gap: 18px; align-content: start; }
.side-block { padding: 16px; }
.side-block h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 10px; }
.seal-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.seal-nav button {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 8px 10px;
}
.seal-nav button:hover { background: rgba(255, 255, 255, 0.03); border-color: var(--line-soft); }
.seal-nav button.active { background: var(--titan-soft); border-color: rgba(114, 211, 255, 0.35); }
.seal-nav .num { font-family: var(--head); width: 26px; color: var(--gold); }
.seal-nav .name { flex: 1; }
.seal-nav .state { font-size: 13px; }
.seal-nav .locked .name, .seal-nav .locked .num { color: #59617f; }
.state.ok { color: var(--ok); }
.state.cur { color: var(--titan); }
.state.lock { color: #59617f; }

.runes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rune-slot {
  aspect-ratio: 1; border-radius: 12px; border: 1px dashed var(--line);
  display: grid; place-items: center; text-align: center; padding: 4px;
  color: #3e4766; font-size: 22px;
}
.rune-slot.filled {
  border: 1px solid rgba(114, 211, 255, 0.45);
  background: radial-gradient(circle, rgba(114, 211, 255, 0.18), transparent 70%);
  color: var(--titan); text-shadow: 0 0 10px var(--titan);
}
.rune-slot b { font-family: var(--head); font-size: 26px; line-height: 1; display: block; }
.rune-slot small { display: block; font-size: 15px; color: var(--gold); text-shadow: none; }
.side-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.whisper {
  color: var(--whisper); font-size: 14px; border-left: 3px solid var(--whisper);
  padding: 6px 10px; background: rgba(255, 134, 238, 0.06); border-radius: 0 8px 8px 0;
}
.whisper .who { font-weight: 700; }
.whisper time { display: block; font-size: 11px; color: #b77aae; }

.main { display: grid; gap: 20px; align-content: start; min-width: 0; }

/* Quest home */
.quest { padding: 28px; }
.quest .kicker { color: var(--warn); font-family: var(--head); font-size: 14px; letter-spacing: 0.08em; }
.quest h1 { font-size: 30px; color: var(--gold); margin: 6px 0 16px; }
.quest .giver { display: flex; gap: 16px; align-items: flex-start; }
.quest .giver .portrait {
  flex: none; width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(160deg, #4a3519, #20170c); border: 1px solid var(--gold-soft); font-size: 30px;
}
.quest .giver p { margin: 0 0 10px; }
.objectives { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 6px; }
.objectives li { display: flex; gap: 10px; align-items: center; }
.objectives li.done { color: var(--muted); }
.objectives li .chk {
  width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--gold-soft);
  display: grid; place-items: center; font-size: 12px; color: var(--ok);
}
.seal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.seal-card { padding: 18px; text-align: left; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.seal-card:hover { border-color: var(--gold-soft); }
.seal-card .n { font-family: var(--head); color: var(--gold); font-size: 13px; letter-spacing: 0.1em; }
.seal-card .t { font-family: var(--head); font-size: 18px; margin: 4px 0 8px; }
.seal-card.cur { border-color: rgba(114, 211, 255, 0.55); box-shadow: 0 0 24px rgba(114, 211, 255, 0.12); }
.seal-card.lock { opacity: 0.55; }

/* Seal page */
.seal-head { padding: 24px 28px; }
.seal-head .n { font-family: var(--head); color: var(--gold); letter-spacing: 0.12em; font-size: 14px; }
.seal-head h1 { font-size: 28px; margin: 4px 0 10px; }
.seal-head blockquote { margin: 12px 0 0; color: #c8c1ad; font-style: italic; border-left: 2px solid var(--gold-soft); padding-left: 14px; }
.seal-head .tags { display: flex; gap: 8px; flex-wrap: wrap; }

.archive-banner {
  display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center;
  padding: 14px 20px; border-radius: 12px;
  background: rgba(111, 211, 154, 0.08); border: 1px solid rgba(111, 211, 154, 0.35);
}
.archive-banner .k { font-size: 12px; color: var(--muted); display: block; }
.archive-banner .v { font-family: var(--head); font-size: 17px; }
.archive-banner .v.rune { color: var(--titan); text-shadow: 0 0 8px var(--titan); }

.puzzle { padding: 26px 28px; }
.puzzle h2 { font-size: 18px; margin-bottom: 14px; color: var(--gold); }

.answer-form { display: flex; gap: 10px; margin-top: 18px; }
.answer-form input { flex: 1; text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--head); font-size: 18px; }
.feedback { min-height: 22px; margin-top: 10px; font-size: 14px; }
.feedback.bad { color: var(--bad); }
.shake { animation: shake 0.35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Hints */
.hints { padding: 22px 28px; }
.hints h2 { font-size: 16px; margin-bottom: 12px; }
.hint-list { display: grid; gap: 10px; }
.hint {
  display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.02);
}
.hint .lvl { font-family: var(--head); color: var(--gold); width: 64px; flex: none; }
.hint .body { flex: 1; }
.hint.locked .body { color: #5d6684; }
.hint.revealed .body { color: var(--text); }

/* Freya */
.zoom-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.zoom-tile { text-align: center; }
.zoom-img {
  aspect-ratio: 1; border-radius: 10px; border: 2px solid #3b3322; overflow: hidden;
  image-rendering: pixelated; position: relative; background-repeat: no-repeat; background-color: #0c0f1a;
}
.zoom-img.full { image-rendering: auto; background-size: cover; background-position: center; }
.zoom-img.full::after { display: none; }
.zoom-img::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 11px, rgba(0, 0, 0, 0.25) 11px 12px),
              repeating-linear-gradient(90deg, transparent 0 11px, rgba(0, 0, 0, 0.25) 11px 12px);
}
.zoom-tile .lbl { margin-top: 6px; font-size: 14px; color: var(--muted); }
.zoom-tile .lbl b { color: var(--gold); font-size: 16px; }

/* Hodir */
.frost-wrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid #3c5878; user-select: none; }
.frost-content { padding: 64px 26px; background: linear-gradient(180deg, #0c1a30, #0b1424); text-align: center; }
.rune-text { font-family: var(--rune); font-size: 34px; letter-spacing: 0.25em; color: var(--titan); text-shadow: 0 0 12px rgba(114, 211, 255, 0.7); line-height: 1.6; word-spacing: 0.6em; }
.frost-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.cipher-key { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 6px; margin-top: 16px; }
.cipher-key div { border: 1px solid var(--line); border-radius: 8px; text-align: center; padding: 4px 0; }
.cipher-key .r { font-family: var(--rune); font-size: 22px; color: var(--titan); display: block; }
.cipher-key .l { font-family: var(--head); color: var(--gold); }
.cipher-key .l.q { color: #59617f; }

/* Hodir: eingefrorene Runen, Handwärme, Effekte */
.frost-content { padding: 84px 26px; }
.frost-wrap canvas.fx { pointer-events: none; }
.frost-wrap.numb canvas.frost { cursor: not-allowed; }
.ice-rune {
  position: absolute; z-index: 3; transform: translate(-50%, -50%); width: 46px; height: 56px; padding: 0;
  display: grid; place-items: center; align-content: center; gap: 0; cursor: pointer;
  background: radial-gradient(ellipse, rgba(255,255,255,0.35), rgba(255,255,255,0) 70%); border: 0; border-radius: 40%;
  color: rgba(40, 92, 140, 0.6); animation: ice-shimmer 3.4s ease-in-out infinite;
}
.ice-rune:nth-of-type(2n) { animation-delay: -1.7s; }
.ice-rune .r { font-family: var(--rune); font-size: 24px; line-height: 1; }
.ice-rune .l { font-family: var(--head); font-size: 11px; font-weight: 700; }
.ice-rune:hover { color: rgba(25, 70, 120, 0.9); }
@keyframes ice-shimmer { 0%, 100% { opacity: 0.45; filter: none; } 50% { opacity: 0.85; filter: drop-shadow(0 0 4px #fff); } }
.ice-rune.pulled { animation: ice-pull 0.7s ease-out forwards; color: var(--titan); }
@keyframes ice-pull { 40% { transform: translate(-50%, -80%) scale(1.5); opacity: 1; filter: drop-shadow(0 0 10px var(--titan)); } 100% { transform: translate(-50%, -140%) scale(0.6); opacity: 0; } }
.ice-rune.shattered { animation: ice-break 0.45s ease-out forwards; pointer-events: none; }
@keyframes ice-break { 30% { transform: translate(-50%, -50%) scale(1.3) rotate(8deg); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(0.2) rotate(-30deg); opacity: 0; } }
.ice-rune.taken, .ice-rune.gone, .hand-warmth.gone { display: none; }
.cipher-key .ice-found { border-color: rgba(114, 211, 255, 0.55); background: rgba(114, 211, 255, 0.07); }
.cipher-key .ice-found .l { color: var(--titan); }
.cipher-key .flash { animation: key-flash 1.2s ease-out; }
@keyframes key-flash { 0% { box-shadow: 0 0 0 0 rgba(114, 211, 255, 0.9); transform: scale(1.18); } 100% { box-shadow: 0 0 0 14px rgba(114, 211, 255, 0); transform: none; } }
.hand-warmth {
  position: absolute; z-index: 3; top: 12px; left: 50%; transform: translateX(-50%); width: 170px;
  font-size: 11px; color: #3c6a96; text-align: center; pointer-events: none; font-weight: 600; letter-spacing: 0.04em;
}
.hand-warmth .bar { height: 6px; border-radius: 99px; background: rgba(40, 70, 110, 0.35); overflow: hidden; margin-top: 3px; }
.hand-warmth i { display: block; height: 100%; background: linear-gradient(90deg, #ff9a5b, #ffd27a); transition: width 0.15s; }
.hand-warmth i.cold { background: linear-gradient(90deg, #6fa8d6, #bfe6ff); }
.hodir-voice { min-height: 22px; margin-top: 10px; text-align: center; color: #8fd3ff; font-style: italic; opacity: 0; }
.hodir-voice.show { animation: whisperfade 5s; }

/* Zerspringendes Eis */
.shard-layer { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.shard { position: absolute; inset: 0; transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.4, 1), opacity 1.4s ease-in; }
.shard-layer.fly .shard { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.85); opacity: 0; }
.frost-wrap.shattering { animation: shake 0.3s 2; }
.frost-wrap.shattering .rune-text { animation: rune-thaw 1.8s ease-out forwards; }
@keyframes rune-thaw { 30% { color: #fff; text-shadow: 0 0 24px #72d3ff, 0 0 60px #72d3ff; } 100% { color: #bfefff; text-shadow: 0 0 18px #72d3ff, 0 0 40px rgba(114, 211, 255, 0.6); } }

/* Hodirs Kälte auf der ganzen Seite */
.snow-layer { position: fixed; inset: 0; z-index: 55; pointer-events: none; }
body.hodir-page::after {
  content: ""; position: fixed; inset: 0; z-index: 54; pointer-events: none;
  box-shadow: inset 0 0 140px rgba(150, 210, 255, 0.22), inset 0 0 40px rgba(200, 235, 255, 0.18);
}
.frost-edges { position: fixed; inset: 0; z-index: 56; pointer-events: none; }
.fern { position: absolute; width: 240px; height: 240px; opacity: 0; transform: scale(0.3); transition: transform 40s ease-out, opacity 6s; }
.fern path { fill: none; stroke: rgba(215, 238, 255, 0.55); stroke-width: 1.1; stroke-linecap: round; filter: drop-shadow(0 0 2px rgba(180, 225, 255, 0.6)); }
.fern.tl { top: 0; left: 0; transform-origin: 0 0; }
.fern.tr { top: 0; right: 0; transform-origin: 100% 0; rotate: 90deg; }
.fern.br { bottom: 0; right: 0; transform-origin: 100% 100%; rotate: 180deg; }
.fern.bl { bottom: 0; left: 0; transform-origin: 0 100%; rotate: 270deg; }
.frost-edges.grown .fern { transform: scale(1); opacity: 1; }
.sidebar > .side-block { position: relative; }
.sidebar > .side-block::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: linear-gradient(160deg, rgba(220, 238, 255, 0.28), rgba(170, 205, 235, 0.16));
  backdrop-filter: blur(2.5px); transition: opacity 8s;
}
.sidebar > .side-block.fogged::after { opacity: 1; }
.sidebar > .side-block.fogged:hover::after { opacity: 0.15; transition: opacity 0.6s; }

/* Mimiron */
.mimiron-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.mimiron-head {
  position: relative; width: 190px; height: 190px; margin: 10px auto; border-radius: 40% 40% 34% 34%;
  background: linear-gradient(160deg, #8a93a8, #464d61 60%, #2c3140);
  border: 3px solid #1d2130; box-shadow: inset 0 -10px 30px rgba(0, 0, 0, 0.45);
}
.mimiron-head .lamp {
  position: absolute; left: 50%; top: -26px; transform: translateX(-50%);
  width: 38px; height: 38px; border-radius: 50%; background: #3a2222; border: 3px solid #1d2130;
  transition: background 0.04s, box-shadow 0.04s;
}
.mimiron-head .lamp.on { background: #ff4d3a; box-shadow: 0 0 30px 10px rgba(255, 77, 58, 0.7); }
.mimiron-head .visor {
  position: absolute; left: 22px; right: 22px; top: 58px; height: 42px; border-radius: 20px;
  background: #121722; display: flex; justify-content: space-around; align-items: center;
}
.mimiron-head .eye { width: 26px; height: 14px; border-radius: 8px; background: var(--titan); box-shadow: 0 0 12px var(--titan); }
.mimiron-head .beard {
  position: absolute; left: 34px; right: 34px; bottom: -14px; height: 62px;
  border-radius: 0 0 50% 50%; background: linear-gradient(180deg, #d0d4dc, #8c93a3);
}
.red-plate {
  text-align: center; padding: 22px; border-radius: 14px;
  background: repeating-linear-gradient(45deg, #2a2a18 0 14px, #17170d 14px 28px);
  border: 2px solid #4b4a2a;
}
.red-button {
  width: 120px; height: 120px; border-radius: 50%; border: 6px solid #3c0c0c;
  background: radial-gradient(circle at 35% 30%, #ff7a6b, #d41f1f 55%, #7d0c0c);
  box-shadow: 0 10px 0 #4f0909, 0 16px 30px rgba(0, 0, 0, 0.6);
  transition: transform 0.08s, box-shadow 0.08s;
}
.red-button:active, .red-button.pressed { transform: translateY(8px); box-shadow: 0 2px 0 #4f0909, 0 6px 14px rgba(0, 0, 0, 0.6); }
.red-plate .warn { margin-top: 18px; font-family: var(--head); font-weight: 700; letter-spacing: 0.14em; color: #ffd84a; }
.red-plate .warn.armed { color: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }
.mimiron-controls { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.morse-status { margin: 22px auto 0; max-width: 300px; text-align: center; }
.morse-status .ms-text { font-family: var(--head); font-size: 14px; color: var(--muted); min-height: 20px; }
.morse-status .ms-bar { height: 6px; margin-top: 6px; border-radius: 3px; background: #1a2030; overflow: hidden; }
.morse-status .ms-bar i { display: block; height: 100%; width: 0; background: #ff4d3a; transition: width 0.2s; }
.morse-status.count .ms-text { color: #ffd84a; font-size: 16px; }
.morse-status.live .ms-text { color: #ff8a7a; }
.morse-status.pause .ms-text { color: var(--titan); }
.morse-status.done .ms-text { color: var(--ok, #7fd88f); }
.morse-status.done .ms-bar i { background: var(--ok, #7fd88f); }

/* Locked */
.locked-page { padding: 48px 28px; text-align: center; }
.locked-page .lock { font-size: 52px; opacity: 0.6; }
.locked-page h1 { font-size: 24px; margin: 12px 0 8px; }
.locked-page .mock-note { text-align: left; margin-top: 24px; }

/* Modal */
.modal-back {
  position: fixed; inset: 0; z-index: 80; background: rgba(4, 6, 14, 0.82);
  display: grid; place-items: center; padding: 16px; animation: fade 0.3s;
}
@keyframes fade { from { opacity: 0; } }
.modal { padding: 36px; text-align: center; max-width: 440px; }
.modal .big-rune {
  width: 150px; height: 150px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--head); font-size: 76px; color: var(--titan);
  text-shadow: 0 0 24px var(--titan); border: 2px solid var(--titan);
  background: radial-gradient(circle, rgba(114, 211, 255, 0.25), transparent 70%);
  animation: glow 2s ease-in-out infinite, pop 0.6s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes glow { 50% { box-shadow: 0 0 50px rgba(114, 211, 255, 0.55); } }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } }
.modal h2 { color: var(--gold); font-size: 24px; margin-bottom: 8px; }
.modal p { color: var(--muted); }

/* Toast */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 70; max-width: 360px;
  background: #1b1022; border: 1px solid #6a3a63; border-radius: 12px; padding: 12px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); animation: slide 0.35s;
}
@keyframes slide { from { transform: translateY(20px); opacity: 0; } }

.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.ok-line { color: var(--ok); margin: 14px 0 0; font-weight: 600; }

/* Thorim */
.arena {
  border-radius: 12px; border: 1px solid #3a4a74; padding: 24px; min-height: 290px;
  background: radial-gradient(ellipse at 50% 0%, rgba(120, 160, 255, 0.18), transparent 60%), linear-gradient(180deg, #121a33, #0c1224);
}
.arena-center { text-align: center; padding: 18px 0; }
.arena-center p { color: var(--muted); }
.arena-center h3 { color: var(--bad); font-size: 20px; margin: 8px 0; }
.arena-icon { font-size: 44px; filter: drop-shadow(0 0 12px rgba(120, 180, 255, 0.8)); }
.arena-top { display: flex; justify-content: space-between; font-family: var(--head); color: var(--gold); }
.arena-timer { height: 8px; border-radius: 99px; background: var(--line-soft); overflow: hidden; margin: 8px 0 18px; }
.arena-timer i { display: block; height: 100%; background: linear-gradient(90deg, #6aa8ff, var(--titan)); transition: width 0.1s linear; }
.arena-timer i.low { background: linear-gradient(90deg, #ff6b5b, var(--warn)); }
.arena-quote { font-size: 22px; font-style: italic; text-align: center; margin: 10px 0 22px; color: #f1ecdd; font-family: var(--head); }
.arena-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.arena-options button {
  padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  font-family: var(--head); font-size: 16px;
}
.arena-options button:hover { border-color: var(--titan); background: var(--titan-soft); }
.arena-won h3 { color: var(--gold); font-size: 20px; }
.arena-won ol { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.arena-won li {
  display: flex; justify-content: space-between; gap: 14px; font-size: 15px;
  padding: 6px 0; border-bottom: 1px solid var(--line-soft);
}
.arena-won li span { color: var(--muted); }
.arena-won li b { font-family: var(--head); letter-spacing: 0.04em; text-align: right; flex: none; }
.arena-ask { text-align: center; color: var(--muted); margin: 8px 0 0; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }
.arena-notice {
  text-align: center; color: var(--warn); font-size: 14px; margin: 0 0 6px;
  border: 1px solid rgba(240, 176, 77, 0.4); border-radius: 8px; padding: 6px 10px; background: rgba(240, 176, 77, 0.06);
}
.arena-perks { color: var(--titan) !important; font-size: 14px; }
.arena-top { gap: 12px; }
.arena-top span[title] { color: var(--bad); letter-spacing: 0.15em; }
.arena-won blockquote { margin: 14px 0; color: #c8c1ad; font-style: italic; border-left: 2px solid var(--gold-soft); padding-left: 14px; }

/* Yogg-Saron */
.yogg-stage {
  position: relative; border-radius: 12px; overflow: hidden; padding: 70px 24px 44px; text-align: center;
  background: radial-gradient(ellipse at 50% 35%, #3b1a4d 0%, #170b22 55%, #07040c 100%);
  border: 1px solid #4b2a5e; min-height: 320px;
}
.yogg-stage.insane { animation: shake 0.35s 4; filter: hue-rotate(60deg) saturate(1.6); }
.yogg-eye {
  width: 190px; height: 84px; margin: 0 auto 30px; border-radius: 50%; position: relative; overflow: hidden;
  background: radial-gradient(ellipse, #f4e36b 0%, #b38d1c 55%, #5a3b0c 100%);
  box-shadow: 0 0 40px rgba(244, 227, 107, 0.35), inset 0 0 18px rgba(0, 0, 0, 0.6);
}
.yogg-eye .pupil {
  position: absolute; left: 50%; top: 50%; width: 16px; height: 66px; margin: -33px 0 0 -8px;
  border-radius: 50%; background: #0b0510; transition: transform 0.15s;
}
.yogg-msg { font-family: var(--head); font-size: 22px; line-height: 1.7; color: #e3c2ff; min-height: 80px; }
.yogg-msg .w { display: inline-block; white-space: nowrap; }
.yogg-msg .w > span { opacity: 0; transition: opacity 0.8s; text-shadow: 0 0 12px #b26bff; }
.yogg-msg .w > span.on { opacity: 1; }
.yogg-msg .w > span:not(.on) { user-select: none; }
.yogg-flavor { position: absolute; left: 0; right: 0; bottom: 14px; color: #c86bd9; font-style: italic; font-size: 14px; opacity: 0; }
.yogg-flavor.show { animation: whisperfade 2.4s; }
@keyframes whisperfade { 15%, 70% { opacity: 0.85; } }
.sanity { position: absolute; top: 14px; right: 16px; width: 190px; text-align: left; font-size: 12px; color: #c9a3dd; }
.sanity .bar { height: 7px; border-radius: 99px; background: #2a1736; overflow: hidden; margin-top: 4px; }
.sanity i { display: block; height: 100%; background: linear-gradient(90deg, #7a4cff, #c08bff); transition: width 0.2s; }
.sanity i.low { background: linear-gradient(90deg, #ff4d6d, #ff9a5b); }

/* Yogg-Saron: Gott der Lügen */
.yogg-msg.truth { color: #ffe9a6; }
.yogg-msg.truth .w > span { text-shadow: 0 0 14px #f4c84b, 0 0 2px #fff3c4; }
.yogg-msg.dissolve .w > span { opacity: 0; filter: blur(6px); transform: translateY(-10px) scale(1.4); transition: opacity 1.2s, filter 1.2s, transform 1.2s; }
.yogg-msg.dissolve .w > span:nth-child(odd) { transform: translateY(12px) rotate(25deg); }
.sanity i.full { background: linear-gradient(90deg, #d8b36c, #ffe9a6); box-shadow: 0 0 10px #f4c84b; }
.feedback.yogg-laugh { color: #c86bd9; font-style: italic; }

/* Schleichender Wahnsinn */
body.yogg-page::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 55;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(70, 12, 100, 0.55) 80%, rgba(25, 4, 40, 0.92) 100%);
  opacity: var(--madness, 0); transition: opacity 0.5s;
}
.madness-layer { position: fixed; inset: 0; pointer-events: none; z-index: 56; overflow: hidden; }
.tentacle {
  position: absolute; width: 60px; height: var(--len); transform-origin: 50% 100%;
  transform: rotate(var(--rot)) translateY(calc((1 - var(--reach, 0)) * var(--len)));
  opacity: min(1, calc(var(--reach, 0) * 4)); transition: transform 0.8s ease-out, opacity 0.6s;
}
.tentacle.left { left: -30px; margin-top: calc(-1 * var(--len)); }
.tentacle.right { right: -30px; margin-top: calc(-1 * var(--len)); }
.tentacle.bottom { bottom: 0; margin-left: -30px; }
.tentacle svg { width: 100%; height: 100%; display: block; transform-origin: 50% 100%; animation: tentacle-sway 3.2s ease-in-out infinite alternate; animation-delay: inherit; }
.tentacle path { fill: #3a1550; stroke: #7a3a9e; stroke-width: 1.5; filter: drop-shadow(0 0 8px rgba(160, 70, 220, 0.5)); }
.tentacle .suckers circle { fill: #9b62bf; opacity: 0.7; }
@keyframes tentacle-sway { from { transform: rotate(-7deg) skewX(4deg); } to { transform: rotate(7deg) skewX(-4deg); } }
.seal-nav .name.possessed { color: #c86bd9; text-shadow: 0 0 8px #8f2fd0; letter-spacing: 0.04em; }
.hint.lying .body { color: #c86bd9; font-style: italic; text-shadow: 0 0 6px rgba(178, 107, 255, 0.5); }
.yogg-fall {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; text-align: center;
  background: radial-gradient(ellipse at center, rgba(90, 20, 130, 0.92), rgba(12, 3, 20, 0.97));
  animation: fall-in 0.5s ease-out; transition: opacity 0.6s;
}
.yogg-fall.out { opacity: 0; }
.yogg-fall b { display: block; font-family: var(--head); font-size: clamp(28px, 5vw, 52px); color: #e3c2ff; text-shadow: 0 0 24px #b26bff; animation: fall-pulse 1.2s ease-in-out infinite alternate; }
.yogg-fall span { display: block; margin-top: 14px; color: #c86bd9; font-style: italic; font-size: 18px; }
@keyframes fall-in { from { opacity: 0; transform: scale(1.15); filter: blur(8px); } }
@keyframes fall-pulse { to { letter-spacing: 0.06em; text-shadow: 0 0 40px #d08bff, 0 0 4px #fff; } }

/* Brann */
/* Brann: Reisetagebuch */
.journal { --ink: #3a2814; --hand: "Caveat", "Segoe Print", cursive; }
.book {
  position: relative; padding: 14px; border-radius: 12px; perspective: 2000px;
  background: linear-gradient(135deg, #5f3a22, #3b2214 60%, #4a2c19);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55), inset 0 0 0 2px #7a5230, inset 0 0 30px rgba(0, 0, 0, 0.5);
  transform-origin: 50% 50%;
}
.spread { display: none; perspective: 2000px; }
.spread.active { display: grid; grid-template-columns: 1fr 1fr; }
.page {
  position: relative; min-height: 400px; padding: 18px 22px 20px; color: var(--ink);
  background: radial-gradient(ellipse at 30% 20%, #f6ead0, #ead7ae 70%, #d9c08f);
}
.page.left { border-radius: 6px 0 0 6px; box-shadow: inset -22px 0 26px -16px rgba(60, 35, 10, 0.5); }
.page.right { border-radius: 0 6px 6px 0; box-shadow: inset 22px 0 26px -16px rgba(60, 35, 10, 0.5); backface-visibility: hidden; transform-origin: left center; }
.pg-head { font-family: var(--head); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #8a6a3a; margin-bottom: 10px; }
.pg-hint { font-family: var(--hand); font-size: 18px; color: #7a6040; text-align: center; margin-top: 16px; }
.scrawl { font-family: var(--hand); font-size: 25px; line-height: 1.22; color: var(--ink); margin: 26px 0 0; transform: rotate(-0.6deg); }
.scrawl.small { font-size: 20px; margin-top: 16px; }
.scrawl.land { color: #8a2f1c; font-size: 24px; margin-top: 10px; transform: rotate(-2.5deg); }
.smudge { display: inline-block; filter: blur(3.2px); color: rgba(70, 45, 20, 0.6); user-select: none; }
.coffee {
  position: absolute; right: 18px; top: 10px; width: 92px; height: 92px; border-radius: 50%; pointer-events: none;
  border: 7px solid rgba(120, 70, 30, 0.14); box-shadow: inset 0 0 0 3px rgba(120, 70, 30, 0.08); filter: blur(0.6px);
}
.where { display: block; margin-top: 26px; font-family: var(--hand); font-size: 21px; color: #6b5030; }
.journal .field {
  display: block; width: 100%; margin-top: 4px; background: rgba(255, 255, 255, 0.3); border: 0; border-bottom: 2px dashed #8a6a3a;
  border-radius: 4px 4px 0 0; color: #1d2b4a; font-family: var(--hand); font-size: 26px; padding: 4px 8px;
}
.journal .field:focus { box-shadow: none; background: rgba(255, 255, 255, 0.55); border-bottom-color: #3d5a8a; }

.ask-tag {
  display: inline-block; font-family: var(--head); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border: 2px solid currentColor; border-radius: 4px; transform: rotate(-2deg); opacity: 0.85;
}
.ask-tag.zone { color: #2f6b3a; }
.ask-tag.spot { color: #2f4f8a; }
.ask-tag + .scrawl { margin-top: 14px; }
.ask-mini { font-family: var(--head); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; padding: 1px 5px; border: 1px solid currentColor; border-radius: 3px; vertical-align: middle; }
.ask-mini.zone { color: #2f6b3a; }
.ask-mini.spot { color: #2f4f8a; }
/* Foto mit Alterung und Lupe */
.photo-frame { position: relative; width: 92%; margin: 6px auto 0; padding: 10px 10px 28px; background: #fbf8ef; transform: rotate(var(--tilt)); box-shadow: 0 6px 14px rgba(60, 35, 10, 0.35); }
.aged { position: relative; aspect-ratio: 400 / 260; overflow: hidden; cursor: none; touch-action: none; }
.ph-img { position: absolute; inset: 0; background-size: cover; background-position: center; filter: sepia(0.9) saturate(0.5) contrast(0.88) brightness(0.92) blur(0.6px); }
.aged::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background:
    radial-gradient(circle at 18% 78%, rgba(90, 55, 20, 0.35) 0 6%, transparent 7%),
    radial-gradient(circle at 82% 22%, rgba(90, 55, 20, 0.25) 0 4%, transparent 5%),
    radial-gradient(ellipse at center, transparent 50%, rgba(110, 65, 20, 0.45) 78%, rgba(45, 22, 6, 0.9) 100%);
}
.lens {
  position: absolute; z-index: 3; width: 128px; height: 128px; border-radius: 50%; display: none; pointer-events: none;
  background-repeat: no-repeat; border: 5px solid #9a7a42; box-shadow: 0 0 0 2px #4a3318, 0 8px 18px rgba(0, 0, 0, 0.45), inset 0 0 18px rgba(255, 255, 255, 0.35);
}
.aged.looking .lens { display: block; }
.photo-frame .caption { position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font-family: var(--hand); font-size: 18px; color: #3a2814; }
.tape { position: absolute; width: 74px; height: 22px; background: rgba(238, 228, 196, 0.72); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.tape.t1 { top: -9px; left: -16px; transform: rotate(-32deg); }
.tape.t2 { top: -9px; right: -16px; transform: rotate(30deg); }

/* Stempel */
.stamp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }
.stamp {
  aspect-ratio: 1; border-radius: 50%; border: 4px double #a3342a; color: #a3342a; display: grid; place-content: center; text-align: center;
  font-family: var(--head); transform: rotate(var(--r, 0deg)); opacity: 0.86; mix-blend-mode: multiply; padding: 6px;
  background: radial-gradient(circle at 40% 35%, rgba(163, 52, 42, 0.08), transparent 70%);
}
.stamp b { font-size: 13px; line-height: 1.1; }
.stamp small { font-size: 9px; letter-spacing: 0.05em; margin-top: 3px; }
.stamp.named { border-color: #2f4f8a; color: #2f4f8a; }
.stamp.empty { border: 2px dashed rgba(120, 90, 50, 0.35); background: none; transform: none; }
.stamp.hit { animation: stamp-hit 0.32s cubic-bezier(0.3, 1.6, 0.6, 1); }
@keyframes stamp-hit { from { transform: scale(2.4) rotate(var(--r, 0deg)); opacity: 0; } 70% { transform: scale(0.9) rotate(var(--r, 0deg)); opacity: 1; } }
.stamp.on-photo { position: absolute; right: -10px; bottom: -6px; width: 92px; z-index: 4; }
.answer-list { font-family: var(--hand); font-size: 24px; margin: 6px 0 16px; padding-left: 26px; }
.answer-list em { color: #9a8a6a; }
.journal .feedback { color: var(--ink); font-family: var(--hand); font-size: 21px; }
.journal .feedback.bad { color: #9b2a1f; }
.journal .feedback.okc { color: #2f6b3a; }
.tries { font-size: 12px; color: #6b5a3f; margin-top: 10px; }

/* Umblättern und Zuklappen */
.leaf { display: none; position: absolute; top: 14px; bottom: 14px; width: calc(50% - 14px); z-index: 5; pointer-events: none;
  background: linear-gradient(90deg, #e9d5aa, #f5e8cc 40%, #dcc28f); box-shadow: 0 0 18px rgba(40, 20, 5, 0.35); }
.leaf.next { display: block; right: 14px; transform-origin: left center; animation: leaf-next 0.62s ease-in-out forwards; }
.leaf.prev { display: block; left: 14px; transform-origin: right center; animation: leaf-prev 0.62s ease-in-out forwards; }
@keyframes leaf-next { from { transform: rotateY(0); } to { transform: rotateY(-180deg); } }
@keyframes leaf-prev { from { transform: rotateY(0); } to { transform: rotateY(180deg); } }
.book.closing .spread.active .page.right { animation: page-close 0.9s ease-in forwards; z-index: 6; }
.book.closing { animation: book-away 1s 0.85s ease-in forwards; }
@keyframes page-close { to { transform: rotateY(-178deg); } }
@keyframes book-away { to { transform: scale(0.55) rotate(-4deg); opacity: 0; } }
.book-nav { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.book-nav .tab { font-family: var(--head); font-size: 13px; min-width: 34px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.book-nav .tab.on { border-color: var(--gold); color: var(--gold); background: rgba(216, 179, 108, 0.1); }
@media (max-width: 760px) {
  .spread.active { grid-template-columns: 1fr; }
  .page { min-height: 0; }
  .page.left, .page.right { border-radius: 6px; box-shadow: inset 0 0 22px rgba(60, 35, 10, 0.25); }
  .leaf { width: calc(100% - 28px); }
}

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.photo-card { display: grid; gap: 8px; }
.photo { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; }
.photo .ph-num {
  position: absolute; left: 8px; top: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.55); font-family: var(--head); color: var(--gold);
}
.photo .ph-note { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: rgba(255, 255, 255, 0.75); text-shadow: 0 1px 2px #000; }

/* Algalon */
.seq { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 14px; }
.seq-slot {
  position: relative; border: 1px dashed var(--line); border-radius: 10px; min-height: 76px;
  display: grid; place-items: center; text-align: center; padding: 6px;
}
.seq-slot .i { position: absolute; left: 7px; top: 4px; font-size: 12px; color: var(--muted); }
.seq-slot.filled { border: 1px solid rgba(216, 179, 108, 0.6); background: rgba(216, 179, 108, 0.06); }
.seq-slot b { display: block; font-family: var(--head); font-size: 26px; color: var(--titan); text-shadow: 0 0 8px var(--titan); line-height: 1.1; }
.seq-slot small { font-size: 11px; color: var(--gold); }
.cryptex {
  display: flex; justify-content: center; gap: 6px; margin-top: 8px; padding: 22px 18px; border-radius: 16px;
  background: linear-gradient(180deg, #2b2416, #15110a); border: 1px solid #5a4a2a;
}
.ring { display: grid; gap: 6px; justify-items: center; }
.ring-band {
  width: 58px; border-radius: 6px; overflow: hidden; display: grid; text-align: center;
  background: linear-gradient(90deg, #6b5630, #d8b36c 45%, #f3dca4 50%, #d8b36c 55%, #6b5630);
  color: #2a1f0c; font-family: var(--head); box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}
.ring-band span { font-size: 13px; opacity: 0.45; padding: 2px 0; }
.ring-band b { font-size: 30px; padding: 4px 0; border-top: 1px solid rgba(0, 0, 0, 0.35); border-bottom: 1px solid rgba(0, 0, 0, 0.35); }
.ring-n { color: var(--muted); font-size: 12px; font-family: var(--head); }
.ring { padding: 6px 2px; border-radius: 12px; border: 1px solid transparent; transition: background 0.2s, border-color 0.2s; }
.task-box {
  border: 1px solid rgba(114, 211, 255, 0.35); background: rgba(114, 211, 255, 0.06);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 18px;
}
.task-box h3 { font-size: 16px; color: var(--titan); margin-bottom: 6px; }
.task-box ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.task-box p { margin: 0 0 10px; }
.task-box ol.steps { gap: 8px; margin-bottom: 12px; }
.task-example { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 10px; background: rgba(6, 9, 20, 0.6); border: 1px solid #263a66; font-size: 14px; line-height: 1.6; }

/* Algalon: Zeichen der Titanen */
.task-example code { font-family: var(--head); color: var(--gold); letter-spacing: 0.15em; background: rgba(216, 179, 108, 0.08); padding: 1px 6px; border-radius: 4px; }
.lit-line { text-align: center; font-family: var(--head); color: var(--gold-soft); margin: 10px 0 16px; }
.disc-wrap { display: grid; place-items: center; border-radius: 16px; padding: 12px; border: 1px solid #263a66; background: radial-gradient(circle at 50% 50%, #13204a, #060914 70%); }
.disc-svg { width: 100%; max-width: 520px; height: auto; display: block; }
.disc-svg .frame { fill: none; stroke: #3a2f1a; }
.disc-svg .disc { transform-box: view-box; transform-origin: 320px 320px; transition: transform 0.35s ease; }
.disc-svg .band { fill: none; stroke: #121a33; }
.disc-svg .disc:nth-child(odd) .band { stroke: #0f1630; }
.disc-svg .tick { stroke: rgba(216, 179, 108, 0.25); stroke-width: 1; }
.disc-svg .tl { fill: none; stroke: #4a5a7d; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.25s; }
.disc-svg .tl.on { stroke: #8fe0ff; filter: url(#lineGlow); }
.disc-svg .conn circle { fill: #2a2214; stroke: #5a4a2a; stroke-width: 2; transition: fill 0.25s; }
.disc-svg .conn.on circle { fill: #8fe0ff; stroke: #d8f6ff; filter: url(#lineGlow); }
.disc-svg .conn.on .tl { stroke: #8fe0ff; filter: url(#lineGlow); }
.disc-svg .open-end { fill: #ff5a4a; stroke: #2a0a06; stroke-width: 1.5; }
.disc-svg.complete .tl, .disc-svg.complete .conn circle { stroke: #ffe7a6; }
.disc-svg.complete .frame { stroke: #8a6a2a; transition: stroke 0.6s; }
.disc-row { align-items: flex-start; flex-wrap: wrap; }
.disc-window { width: 100%; text-align: center; font-family: var(--head); color: var(--gold-soft); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; }
.disc-ctl { display: grid; gap: 6px; justify-items: center; padding: 4px 2px; }
.disc-ctl .ring-n { text-align: center; line-height: 1.2; }
.disc-ctl .ring-n small { font-size: 10px; opacity: 0.8; }
.disc-btns { display: flex; gap: 4px; }
.disc-btns button { width: 28px; height: 30px; border-radius: 7px; border: 1px solid #5a4a2a; background: #241c10; color: var(--gold); font-size: 16px; cursor: pointer; padding: 0; }
.disc-btns button:hover:not(:disabled) { background: #33281a; }
.disc-btns button:disabled { opacity: 0.4; cursor: default; }

/* Webhook */
.webhook-form { display: grid; gap: 8px; }
.webhook-form input { font-family: Consolas, monospace; font-size: 13px; }
.webhook-saved {
  display: flex; align-items: center; gap: 4px; padding: 10px 12px; margin-bottom: 8px;
  border-radius: 10px; border: 1px solid rgba(111, 211, 154, 0.35); background: rgba(111, 211, 154, 0.06);
}
.webhook-saved code { font-family: Consolas, monospace; font-size: 12px; word-break: break-all; color: var(--text); }
.howto { margin-top: 10px; font-size: 13px; color: var(--muted); }
.howto summary { cursor: pointer; color: var(--titan); }
.howto ol { margin: 6px 0 0; padding-left: 20px; }
.faded { opacity: 0.45; }
.feedback.okc { color: var(--ok); }
.modal.final { max-width: 520px; }
.final-code { display: flex; gap: 6px; justify-content: center; margin-bottom: 20px; animation: pop 0.6s cubic-bezier(.2, 1.6, .4, 1); }
.final-code span {
  width: 54px; height: 64px; display: grid; place-items: center; border-radius: 8px;
  font-family: var(--head); font-size: 34px; color: #2a1f0c;
  background: linear-gradient(90deg, #6b5630, #d8b36c 45%, #f3dca4 50%, #d8b36c 55%, #6b5630);
  box-shadow: 0 0 24px rgba(216, 179, 108, 0.45);
}

/* ---------- Admin ---------- */
.admin { max-width: 1240px; margin: 0 auto; padding: 24px; display: grid; gap: 20px; }
.admin-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { font-size: 28px; color: var(--gold); }
.admin-head .spacer { flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.kpi { padding: 16px 18px; }
.kpi .k { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.kpi .v { font-family: var(--head); font-size: 24px; margin-top: 4px; }
.kpi .s { font-size: 13px; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.dot.bad { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.dot.off { background: #59617f; }

.admin-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; align-items: start; }
.admin-col { display: grid; gap: 20px; }
.card { padding: 20px 22px; }
.card h2 { font-size: 16px; margin-bottom: 14px; color: var(--gold); }
.card h2 small { font-family: var(--body); font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 8px; }

.journey { display: grid; gap: 12px; }
.journey-row { display: grid; grid-template-columns: 110px 1fr 190px; gap: 12px; align-items: center; font-size: 14px; }
.journey-row .nm { font-family: var(--head); }
.journey-row .nm.lock { color: #59617f; }
.journey-row .track { height: 12px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.journey-row .track i { display: block; height: 100%; border-radius: 99px; background: var(--ok); }
.journey-row .track i.cur { background: repeating-linear-gradient(45deg, var(--warn) 0 8px, #c98e33 8px 16px); }
.journey-row .meta { color: var(--muted); font-size: 13px; text-align: right; }

table.attempts { width: 100%; border-collapse: collapse; font-size: 14px; }
table.attempts th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; padding: 0 8px 8px; }
table.attempts td { padding: 8px; border-top: 1px solid var(--line-soft); }
table.attempts td.inp { font-family: Consolas, monospace; letter-spacing: 0.05em; }
.near { color: var(--warn); font-size: 12px; border: 1px solid var(--warn); border-radius: 99px; padding: 1px 8px; margin-left: 6px; }
.okc { color: var(--ok); }
.badc { color: var(--bad); }

.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 360px; overflow: auto; font-size: 14px; }
.log li { display: grid; grid-template-columns: 92px 22px 1fr; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line-soft); }
.log time { color: var(--muted); font-size: 13px; }

.actions { display: grid; gap: 16px; }
.actions .row { display: flex; gap: 8px; flex-wrap: wrap; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.quick button { font-size: 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 99px; padding: 3px 10px; }
.toggle { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 14px; }
.toggle input { width: 18px; height: 18px; accent-color: var(--gold); }
.sub { font-size: 13px; color: var(--muted); margin: 0 0 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 14px; }
  .sidebar > .side-block, .main { min-width: 0; }
  .seal-head h1, .quest h1 { font-size: 22px; overflow-wrap: anywhere; }
  .sidebar { display: contents; }
  .sidebar > .side-block { order: 2; }
  .sidebar > .side-block:first-child { order: 0; padding: 8px; }
  .sidebar > .side-block:first-child h3 { display: none; }
  .main { order: 1; }
  .seal-nav { display: flex; overflow-x: auto; gap: 4px; }
  .seal-nav li { flex: none; }
  .seal-nav button { white-space: nowrap; }
  .topbar { padding: 12px 14px; }
  .brand { font-size: 17px; }
  .answer-form { flex-direction: column; }
  .seal-head, .puzzle, .hints, .quest { padding: 20px 18px; }
  .arena-options { grid-template-columns: 1fr; }
  .seq { grid-template-columns: repeat(3, 1fr); }
  .cryptex { gap: 3px; padding: 16px 8px; }
  .ring-band { width: 46px; }
  .final-code span { width: 40px; height: 52px; font-size: 26px; }
  .sanity { width: 140px; }
  .login-grid { grid-template-columns: 1fr; }
  .gift-card { max-width: 300px; margin: 0 auto; }
  .mimiron-stage { grid-template-columns: 1fr; }
  .zoom-grid { grid-template-columns: repeat(3, 1fr); }
  .progress-mini { display: none; }
  .journey-row { grid-template-columns: 90px 1fr; }
  .journey-row .meta { grid-column: 1 / -1; text-align: left; }
}
.disc-ctl .gear { font-size: 10.5px; line-height: 1.25; color: #ffcf7a; text-align: center; max-width: 84px; min-height: 42px; }
.disc-ctl .gear.none { visibility: hidden; }

/* ---------- Beta ---------- */
.login-wrap .login-card { width: min(420px, 100%); }
.seal-emblem.pulse { animation: emblemPulse 1.4s ease-in-out infinite; margin: 0 auto; }
@keyframes emblemPulse { 50% { opacity: 0.45; transform: scale(0.94); } }
.topbar .btn.small { padding: 5px 10px; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 4px; }
.admin-tabs .tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--text); font-family: var(--head); font-size: 15px; cursor: pointer;
}
.admin-tabs .tab small { font-family: var(--body); font-size: 12px; color: var(--muted); }
.admin-tabs .tab.on { border-color: var(--gold); background: rgba(216, 179, 108, 0.1); color: var(--gold); }
.arena-options button.picked { outline: 2px solid var(--gold); }
.arena-options button:disabled { opacity: 0.7; cursor: default; }
