/* =========================================================
   Simons Postenjagd
   Ruhig, aufgeräumt, warm. Papier, Tinte und ein Postenflaggen-Orange.
   ========================================================= */
/* Exit-Spiel: dunkler Raum, Messing, Signallampe. Trotzdem ruhig und aufgeräumt. */
:root {
  --paper: #0f1012;
  --card: #18191c;
  --card-2: #212327;
  --ink: #ece6da;
  --soft: #a29c90;
  --faint: #6a665f;
  --line: rgba(236,230,218,.08);
  --line-2: rgba(236,230,218,.16);
  --accent: #e2a54a;          /* Messing / Lampenlicht */
  --accent-ink: #f0bd6a;
  --accent-soft: rgba(226,165,74,.14);
  --red: #e2553b;             /* Signallampe */
  --green: #6cc49a;           /* entriegelt */
  --green-soft: rgba(108,196,154,.12);
  --blue: #6aa3d4;
  --gold: #e2a54a;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px rgba(0,0,0,.45);
  --radius: 12px;
  --ff-head: "Big Shoulders Stencil Display", "Oswald", Impact, sans-serif;
  --ff-type: "Special Elite", "Courier New", monospace;
  --ff: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --wrap: 760px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(226,165,74,.13), transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 120%, rgba(0,0,0,.6), transparent 60%),
    var(--paper);
  background-attachment: fixed;
  font: 16px/1.6 var(--ff); -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3 { font-family: var(--ff-head); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: .02em; text-transform: uppercase; }
h3 { font-family: var(--ff); text-transform: none; letter-spacing: 0; font-weight: 600; }
h1 { font-size: clamp(34px, 8vw, 48px); }
h2 { font-size: 26px; }
h3 { font-size: 17px; }
p { margin: 0 0 .9em; }
a { color: var(--accent-ink); }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--soft); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- Kopf ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.top .wrap { display: flex; align-items: center; gap: 12px; height: 58px; }
.brand { white-space: nowrap; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--ff-head); font-weight: 700; font-size: 21px; letter-spacing: .06em; text-transform: uppercase; }
.brand b { color: var(--accent); font-weight: 700; }
.flag { width: 22px; height: 22px; flex: none; }
.nav { margin-left: auto; display: flex; gap: 2px; }
@media (max-width: 480px) { .brand span { display: none; } .nav a { padding: 7px 9px; } }
.nav a { text-decoration: none; color: var(--soft); font-weight: 500; font-size: 14.5px; padding: 7px 11px; border-radius: 999px; position: relative; }
.nav a.on { color: var(--ink); background: var(--card-2); }
.nav .badge { position: absolute; top: 0; right: -2px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10.5px; line-height: 16px; text-align: center; padding: 0 4px; }

main { padding: 28px 0 64px; }

/* ---------- Karten & Knöpfe ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.soft { background: var(--card-2); box-shadow: none; border-color: transparent; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink);
  padding: 10px 16px; border-radius: 11px; font-weight: 500; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .15s ease, border-color .15s;
  min-height: 44px;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: #17130c; border-color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.btn.primary:hover { border-color: var(--accent-ink); background: var(--accent-ink); }
.btn.accent { background: var(--accent); color: #17130c; border-color: var(--accent); font-weight: 600; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--soft); }
.btn.ghost:hover { color: var(--ink); }
.btn.small { padding: 6px 11px; min-height: 34px; font-size: 14px; border-radius: 9px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.input, textarea.input {
  width: 100%; border: 1px solid var(--line-2); background: var(--card); border-radius: 11px;
  padding: 11px 13px; min-height: 46px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label.field { display: block; }
label.field span { display: block; font-size: 13px; color: var(--soft); margin-bottom: 4px; font-weight: 500; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--card-2); color: var(--soft); white-space: nowrap; }
.chip.orange { background: var(--accent-soft); color: var(--accent-ink); }
.chip.red { background: rgba(226,85,59,.15); color: var(--red); }
.chip.green { background: var(--green-soft); color: var(--green); }
.eyebrow { font-family: var(--ff-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--card-2); color: var(--ink); border: 1px solid var(--line-2); padding: 11px 18px; border-radius: 12px; font-size: 14.5px; z-index: 50; box-shadow: var(--shadow); max-width: calc(100% - 32px); animation: rise .25s ease; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- Anmeldung ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login .card { width: 100%; max-width: 400px; padding: 32px 26px; text-align: center; }
.login .lockbig { width: 64px; height: 64px; margin: 0 auto 18px; color: var(--accent); filter: drop-shadow(0 0 18px rgba(226,165,74,.35)); }
.login .card { border-color: var(--line-2); }
.login h1 { font-size: 40px; margin-bottom: 8px; }
.login form { margin-top: 22px; display: grid; gap: 10px; }
.login .input { text-align: center; letter-spacing: .3em; text-transform: uppercase; font-family: var(--ff-mono); background: #0b0c0d; }
.err { color: var(--red); font-size: 14.5px; min-height: 1.4em; margin: 6px 0 0; }

/* ---------- Startseite ---------- */
.hello { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.hello h1 { flex: 1; }
.cat { width: 74px; height: auto; color: var(--ink); flex: none; }
.progress { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; }
.bar { flex: 1; height: 6px; border-radius: 3px; background: var(--card-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-ink)); box-shadow: 0 0 10px var(--accent); border-radius: 3px; transition: width .6s ease; }

.banner { display: flex; flex-wrap: wrap; gap: 5px 4px; justify-content: center; padding: 18px 8px 6px; }
.banner .word { display: flex; gap: 4px; margin-right: 12px; }
.banner .slot {
  width: 26px; height: 36px; border-radius: 5px; background: linear-gradient(#0b0c0d, #1d1f22 45%, #1d1f22 55%, #0b0c0d);
  display: grid; place-items: center; font-family: var(--ff-mono); font-weight: 500; font-size: 17px; color: var(--faint);
  border: 1px solid var(--line-2); box-shadow: inset 0 2px 4px rgba(0,0,0,.6);
}
.banner .slot::before { content: "·"; }
.banner .slot.on::before { content: none; }
.banner .slot.on { border-color: var(--accent); color: var(--accent-ink); text-shadow: 0 0 10px rgba(226,165,74,.5); animation: flip .5s ease both; }
@keyframes flip { from { transform: rotateX(90deg); } }

/* Postenkarte */
.controlcard { position: relative; }
.controlcard .head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.posts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (min-width: 620px) { .posts { grid-template-columns: repeat(6, 1fr); gap: 10px; } }
.post {
  position: relative; aspect-ratio: 1 / 1.12; border-radius: 8px; border: 1px solid var(--line-2);
  background: linear-gradient(160deg, #26282c, #17181b);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 4px 10px rgba(0,0,0,.35); padding: 8px 9px; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  transition: transform .15s ease, border-color .15s, box-shadow .15s;
}
.post .num { font-family: var(--ff-head); font-weight: 700; font-size: 28px; line-height: 1; }
.post .code { position: absolute; top: 8px; right: 9px; font-family: var(--ff-mono); font-size: 10.5px; color: var(--faint); }
.post .foot { font-size: 11.5px; color: var(--soft); line-height: 1.25; }
.post.locked { background: linear-gradient(160deg, #1a1b1e, #121315); color: var(--faint); }
.post.locked .num { color: var(--faint); }
.post.waiting { color: var(--soft); }
.post.open { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 24px rgba(226,165,74,.28); }
.post.open .num { color: var(--accent-ink); }
.post.open:hover, .post.solved:hover, .post.waiting:hover { transform: translateY(-2px); }
.post .lk { position: absolute; right: 8px; bottom: 8px; width: 20px; height: 20px; color: var(--faint); }
.post.open .lk { color: var(--accent); animation: glow 2.2s ease-in-out infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 6px var(--accent)); } }
.post.solved { background: linear-gradient(160deg, #1c2a24, #141b18); border-color: rgba(108,196,154,.3); }
.post.solved .lk { color: var(--green); }
.post.solved .num { color: var(--green); }
.post .punch { position: absolute; right: 7px; bottom: 7px; width: 26px; height: 26px; color: var(--green); }
.post .ico { position: absolute; right: 9px; bottom: 9px; width: 16px; height: 16px; color: var(--faint); }

.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 12.5px; color: var(--soft); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--line-2); }

/* ---------- Posten-Ansicht ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--soft); text-decoration: none; font-size: 14.5px; margin-bottom: 18px; }
.back:hover { color: var(--ink); }
.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.diff { display: inline-flex; gap: 3px; vertical-align: middle; }
.diff i { width: 9px; height: 9px; border-radius: 2px; background: var(--line-2); }
.diff i.on { background: var(--accent); }
.intro { font-size: 17px; color: var(--soft); margin: 14px 0 22px; }
.puzzle { display: grid; gap: 16px; }
.puzzle p { margin: 0; }
pre.cipher {
  margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--ff-mono); font-size: 15px; line-height: 1.75;
  background: #0a0b0c; color: #e8d9b8; border: 1px solid var(--line-2); border-radius: 8px; padding: 16px 18px; letter-spacing: .06em;
  box-shadow: inset 0 0 30px rgba(0,0,0,.6);
}
.answer { display: flex; gap: 8px; margin-top: 4px; }
.answer .input { font-family: var(--ff-mono); letter-spacing: .18em; text-transform: uppercase; background: #0a0b0c; color: var(--accent-ink); font-size: 17px; }
.feedback { min-height: 1.5em; font-size: 15px; margin-top: 8px; color: var(--red); font-family: var(--ff-mono); }
.feedback.good { color: var(--green); }
.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.hints { display: grid; gap: 8px; }
.hint { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--card-2); font-size: 15px; }
.hint .lvl { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: var(--card); border: 1px solid var(--line-2); }
.hint { border: 1px dashed var(--line-2); }
.hint.open { background: var(--accent-soft); border-style: solid; border-color: rgba(226,165,74,.35); animation: flip .45s ease both; }
.hint.open .lvl { background: var(--accent); color: #17130c; border-color: var(--accent); }
.hint .txt { flex: 1; padding-top: 1px; }
details.notes summary { cursor: pointer; color: var(--soft); font-size: 14.5px; list-style: none; }
details.notes summary::before { content: "✎  "; }
details.notes textarea { margin-top: 8px; min-height: 120px; font-family: var(--ff-mono); font-size: 14px; resize: vertical; }

/* Gelöst */
.stamp {
  display: inline-flex; align-items: center; gap: 10px; color: var(--green); font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  border: 2px solid var(--green); border-radius: 6px; padding: 7px 16px; transform: rotate(-3deg);
  font-family: var(--ff-head); font-size: 24px; animation: stamp .45s cubic-bezier(.2,1.6,.4,1) both;
  box-shadow: 0 0 24px rgba(108,196,154,.2);
}
.stamp svg { width: 24px; height: 24px; }
@keyframes stamp { from { transform: scale(2.2) rotate(-12deg); opacity: 0; } }
.polaroid { position: relative; background: #f4efe4; padding: 12px 12px 16px; border-radius: 3px; box-shadow: 0 14px 40px rgba(0,0,0,.6); transform: rotate(-1.2deg); max-width: 520px; margin: 0 auto; }
.polaroid::before { content: ""; position: absolute; top: -10px; left: 50%; width: 90px; height: 22px; margin-left: -45px; background: rgba(226,200,150,.55); transform: rotate(2deg); }
.polaroid .tag { position: absolute; top: 18px; right: -8px; background: var(--red); color: #fff; font-family: var(--ff-mono); font-size: 11px; letter-spacing: .12em; padding: 3px 9px; transform: rotate(4deg); }
.polaroid img { width: 100%; border-radius: 2px; aspect-ratio: auto; }
.polaroid .ph { aspect-ratio: 4 / 3; display: grid; place-items: center; background: #f1ede6; color: #8d8f94; border-radius: 2px; text-align: center; padding: 20px; font-size: 14px; }
.polaroid figcaption { font-family: var(--ff-type); color: #2c2a26; font-size: 16.5px; line-height: 1.5; padding: 14px 4px 0; }
.gained { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gained b { width: 30px; height: 38px; display: inline-grid; place-items: center; border-radius: 5px; background: #0b0c0d; color: var(--accent-ink); font-family: var(--ff-mono); font-size: 19px; border: 1px solid var(--accent); text-shadow: 0 0 10px rgba(226,165,74,.5); }

/* Gutscheine */
.vouchers { display: grid; gap: 12px; }
.voucher { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; position: relative; }
.voucher .vi { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--card-2); }
.voucher h3 { font-size: 17.5px; }
.voucher .vt { color: var(--soft); font-size: 14.5px; margin: 3px 0 10px; }
.voucher.ticket { border-style: dashed; border-width: 1.5px; border-color: rgba(226,165,74,.35); background: linear-gradient(160deg, #1d1b17, #16171a); }
.voucher.done { opacity: .6; }
.voucher .planner { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 4px; }
.voucher .planner .full { grid-column: 1 / -1; }
.status { font-size: 14.5px; padding: 10px 12px; border-radius: 10px; background: var(--card-2); margin-bottom: 10px; }
.status.planned { background: var(--green-soft); color: var(--green); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.tabs button { border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 6px 13px; font-size: 14px; cursor: pointer; color: var(--soft); }
.tabs button.on { background: var(--accent); color: #17130c; border-color: var(--accent); }

/* ---------- Rätsel-Bausteine ---------- */
.recipe { background: #f2ecdf; color: #2b2925; border-radius: 4px; padding: 20px 22px; font-family: var(--ff-type); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.recipe .eyebrow { color: #8a5a17; }
.recipe h3 { font-family: var(--ff-type); }
.recipe h3 { margin-bottom: 10px; }
.recipe .cols { display: grid; gap: 16px; }
@media (min-width: 620px) { .recipe .cols { grid-template-columns: 1fr 1.6fr; } }
.recipe ul { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.recipe ul li { padding: 4px 0; border-bottom: 1px dotted var(--line-2); }
.recipe ol { margin: 0; padding-left: 20px; font-size: 15px; }
.recipe ol li { margin-bottom: 6px; }
.plist { margin: 0; padding-left: 22px; }
.plist li { margin-bottom: 6px; }

.lgrid { border-collapse: separate; border-spacing: 4px; margin: 0 auto; font-family: var(--ff-mono); }
.lgrid th { font-size: 12px; color: var(--faint); font-weight: 500; width: 22px; }
.lgrid td { width: 38px; height: 38px; text-align: center; background: #0d0e10; border: 1px solid var(--line-2); border-radius: 7px; font-size: 17px; cursor: pointer; user-select: none; transition: background .15s; }
.lgrid td.mark { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 400px) { .lgrid td { width: 34px; height: 34px; font-size: 15px; } .lgrid { border-spacing: 3px; } }
.moves { display: flex; flex-wrap: wrap; gap: 8px; counter-reset: mv; }
.moves span { display: inline-flex; align-items: center; gap: 7px; background: var(--card-2); border-radius: 999px; padding: 6px 12px 6px 8px; font-family: var(--ff-mono); font-size: 14px; }
.moves svg { width: 18px; height: 18px; color: var(--accent); }

.lights { display: grid; gap: 10px; justify-content: center; }
.lights .lr { display: flex; gap: 10px; }
.lights i { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-2); }
.lights i { background: #0b0c0d; }
.lights i.on { background: var(--red); border-color: var(--red); box-shadow: 0 0 16px rgba(226,85,59,.7); }

.clues { display: grid; gap: 12px; }
.clue .q { font-size: 15px; margin-bottom: 6px; }
.clue .boxes { display: flex; gap: 3px; }
.clue .boxes input {
  width: 28px; height: 34px; flex: 0 1 28px; min-width: 0; text-align: center; border: 1px solid var(--line-2); border-radius: 6px; background: var(--card);
  font-family: var(--ff-mono); font-size: 16px; text-transform: uppercase; padding: 0; outline: none;
}
.clue .boxes input.key { border-color: var(--accent); background: var(--accent-soft); }
.clue .boxes input:focus { box-shadow: 0 0 0 2px var(--accent); }

.nono { overflow-x: auto; display: flex; justify-content: center; padding: 4px 0; }
.nono table { border-collapse: collapse; touch-action: manipulation; }
.nono td { padding: 0; }
.nono .ch { font-family: var(--ff-mono); font-size: 11.5px; color: var(--soft); text-align: center; vertical-align: bottom; padding: 0 2px 4px; line-height: 1.25; }
.nono .rh { font-family: var(--ff-mono); font-size: 11.5px; color: var(--soft); text-align: right; padding-right: 7px; white-space: nowrap; }
.nono .c { width: 29px; height: 29px; border: 1px solid var(--line-2); background: #0d0e10; cursor: pointer; position: relative; }
.nono .c.f { background: var(--accent); }
.nono .c.x::after { content: "×"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 16px; }
.nono .c.b5 { border-right: 2px solid var(--soft); }
.nono .r5 .c { border-bottom: 2px solid var(--soft); }
@media (max-width: 420px) { .nono .c { width: 25px; height: 25px; } }

.conn { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.conn button {
  min-height: 58px; border: none; border-radius: 10px; background: var(--card-2); font-weight: 600; font-size: 12.5px;
  letter-spacing: .02em; cursor: pointer; padding: 4px; word-break: break-word; hyphens: auto; transition: transform .1s, background .15s;
}
@media (min-width: 520px) { .conn button { font-size: 14px; } }
.conn button.sel { background: var(--accent); color: #17130c; }
.conn .grp { grid-column: 1 / -1; border-radius: 10px; padding: 10px 12px; text-align: center; animation: flip .4s ease both; }
.conn .grp b { display: block; font-size: 14px; }
.conn .grp span { font-size: 13px; }
.g0 { background: #f6d9a8; color: #5a3c06; } .g1 { background: #d6c7ee; color: #34205e; } .g2 { background: #b9dcc7; color: #13402a; } .g3 { background: #b7d3ea; color: #10334f; }

.clocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px; }
.clocks figure { margin: 0; text-align: center; }
.clocks svg { width: 100%; max-width: 92px; height: auto; color: var(--ink); }
.clocks figcaption { font-family: var(--ff-mono); font-size: 11px; color: var(--faint); }

.pins svg { width: 100%; max-width: 300px; display: block; margin: 0 auto; color: var(--ink); }
.frames { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.frames th, .frames td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }
.frames th { font-weight: 600; color: var(--soft); font-size: 13px; }
.frames td:first-child { font-family: var(--ff-head); font-weight: 600; width: 64px; }
.frames td { font-family: var(--ff-mono); }

.rebus { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; }
.rebus .it { text-align: center; }
.rebus .sym { font-size: 52px; line-height: 1.1; }
.rebus .op { font-size: 13.5px; color: var(--soft); }
.rebus .plus { font-size: 26px; color: var(--faint); }

.jars { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.jar { position: relative; padding: 26px 8px 16px; border-radius: 12px 12px 18px 18px; background: rgba(255,255,255,.04); border: 1px solid var(--line-2); text-align: center; }
.jar::before { content: ""; position: absolute; top: -7px; left: 18%; right: 18%; height: 12px; border-radius: 4px; background: var(--accent); opacity: .7; }
.jar span { display: inline-block; background: #f2ecdf; color: #2b2925; font-family: var(--ff-mono); font-size: 13px; padding: 6px 8px; border-radius: 4px; letter-spacing: .08em; }

.letter { background: #f2ecdf; color: #2b2925; border-radius: 3px; padding: 26px 24px; font-family: Georgia, "Times New Roman", serif; font-size: 17.5px; line-height: 1.9; box-shadow: 0 12px 34px rgba(0,0,0,.55); }
.letter .d { position: relative; }
.letter .d::after { content: ""; position: absolute; left: 50%; bottom: .08em; width: 2.4px; height: 2.4px; margin-left: -1.2px; border-radius: 50%; background: currentColor; opacity: .55; }

.mm { display: grid; gap: 10px; justify-content: center; }
.mm .mr { display: flex; align-items: center; gap: 14px; }
.mm .digits { display: flex; gap: 5px; }
.mm .digits b { width: 42px; height: 50px; display: grid; place-items: center; border-radius: 6px; background: #0b0c0d; color: var(--accent-ink); border: 1px solid var(--line-2); font-family: var(--ff-mono); font-size: 22px; }
.mm .pegs { display: grid; grid-template-columns: repeat(2, 13px); gap: 4px; }
.mm .pegs i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.mm .pegs i.b { background: var(--red); border-color: var(--red); box-shadow: 0 0 8px rgba(226,85,59,.6); }
.mm .pegs i.w { background: transparent; border-color: var(--ink); }
.mm .lbl { font-size: 12px; color: var(--faint); width: 18px; }

/* ---------- Verwaltung ---------- */
.admin-door { display: grid; gap: 10px; }
.admin-door .top-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.admin-door .thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; background: var(--card-2); }
.admin-grid { display: grid; gap: 12px; }
.kv { font-size: 13.5px; color: var(--soft); }
.kv code { font-family: var(--ff-mono); background: var(--card-2); padding: 1px 6px; border-radius: 4px; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Exit-Elemente ---------- */
.timer { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ff-mono); font-size: 13px; color: var(--red); background: #0a0b0c; border: 1px solid rgba(226,85,59,.35); border-radius: 6px; padding: 4px 10px; letter-spacing: .1em; }
.timer::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.lockpanel { border-color: rgba(226,165,74,.35); background: linear-gradient(160deg, #1f1d19, #151618); }
.lockpanel h3 { font-family: var(--ff-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .14em; font-size: 13px; color: var(--accent); }
.unlock-flash { position: fixed; inset: 0; z-index: 70; pointer-events: none; background: radial-gradient(circle at 50% 45%, rgba(108,196,154,.35), transparent 60%); animation: fade 1.2s ease forwards; }
@keyframes fade { to { opacity: 0; } }
.case { display: flex; gap: 10px; align-items: baseline; font-family: var(--ff-mono); font-size: 12px; color: var(--faint); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.brand .flag { color: var(--accent); width: 22px; height: 22px; }
.post.locked .lk { opacity: .5; }
/* Foto-Sammlung */
.pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pool-item { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pool-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pool-item figcaption { padding: 6px 8px 8px; display: grid; gap: 4px; }
.pool-item select, .input.small { min-height: 34px; padding: 5px 8px; font-size: 13px; }
select.input { appearance: auto; }
.door-photo { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.door-photo img, .door-photo .ph-empty { width: 120px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.door-photo .ph-empty { display: grid; place-items: center; background: var(--card-2); color: var(--faint); font-size: 13px; }
@media (max-width: 480px) { .door-photo { grid-template-columns: 1fr; } .door-photo img, .door-photo .ph-empty { width: 100%; } }

/* ---------- Weihnachten ---------- */
:root { --red: #d8423a; }
body::before {
  content: ""; position: fixed; inset: -10% 0 0 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 120px 80px, #fff, transparent 60%),
    radial-gradient(2.5px 2.5px at 200px 160px, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 280px 40px, #fff, transparent 60%),
    radial-gradient(2px 2px at 340px 220px, #fff, transparent 60%),
    radial-gradient(1px 1px at 60px 260px, #fff, transparent 60%);
  background-size: 380px 300px;
  animation: snow 28s linear infinite;
}
body::after {
  content: ""; position: fixed; inset: -10% 0 0 0; pointer-events: none; z-index: 0; opacity: .3;
  background-image:
    radial-gradient(1.5px 1.5px at 40px 60px, #fff, transparent 60%),
    radial-gradient(2px 2px at 170px 140px, #fff, transparent 60%),
    radial-gradient(1px 1px at 250px 20px, #fff, transparent 60%),
    radial-gradient(1.5px 1.5px at 90px 200px, #fff, transparent 60%);
  background-size: 300px 240px;
  animation: snow 44s linear infinite;
}
@keyframes snow { from { background-position: 0 0; } to { background-position: 60px 600px; } }
#app { position: relative; z-index: 1; }
.tape { overflow: hidden; white-space: nowrap; margin: 0 -16px 18px; background: repeating-linear-gradient(-45deg, #f2c230 0 18px, #e5b21f 18px 36px); color: #17130c; transform: rotate(-1.5deg); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.tape span { display: inline-block; padding: 6px 0; font-family: var(--ff-head); font-weight: 700; letter-spacing: .14em; font-size: 15px; animation: tape 30s linear infinite; }
@keyframes tape { to { transform: translateX(-50%); } }
.demobar { position: sticky; top: 0; z-index: 20; background: #3a1512; border-bottom: 1px solid var(--red); padding: 8px 0; }
.demobar b { font-family: var(--ff-mono); letter-spacing: .2em; color: #fff; background: var(--red); padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.demobar select { width: auto; }
.demobar + .top { top: 0; position: relative; }
.post.open::after { content: ""; position: absolute; top: -1px; left: 50%; width: 22px; height: 10px; margin-left: -11px; background: var(--red); border-radius: 0 0 4px 4px; }
.stamp { border-color: var(--green); }
.brand b { color: var(--red); }
/* Auftrag, Lösung, Score */
.task { margin-top: 12px; padding: 14px 16px; border-left: 3px solid var(--red); background: rgba(216,66,58,.08); border-radius: 0 10px 10px 0; }
.task p { margin: 4px 0 0; font-size: 15.5px; }
.task .eyebrow { color: var(--red); }
.hint.sol { border-color: rgba(216,66,58,.4); }
.hint.sol .lvl { color: var(--red); border-color: var(--red); }
.hint.sol.open { background: rgba(216,66,58,.12); border-color: var(--red); }
.hint.sol.open .lvl { background: var(--red); color: #fff; }
.btn.danger { border-color: var(--red); color: var(--red); background: transparent; }
.stamp.lost { color: var(--red); border-color: var(--red); box-shadow: 0 0 24px rgba(216,66,58,.2); }
.voucher.lost { opacity: .5; }
.voucher.lost h3 { text-decoration: line-through; }
.post.solved.revealed { background: linear-gradient(160deg, #2a1a19, #1a1415); border-color: rgba(216,66,58,.35); }
.post.solved.revealed .num, .post.solved.revealed .lk { color: var(--red); }
.score { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.score .pts { font-family: var(--ff-head); font-size: 34px; color: var(--accent-ink); line-height: 1; margin-top: 4px; }
.score .pts small { font-size: 16px; color: var(--faint); }
.score.big { border-top: none; background: #0b0c0d; border: 1px solid rgba(226,165,74,.35); border-radius: 10px; padding: 16px; text-align: left; }
.lights.chain .lr { flex-wrap: wrap; justify-content: center; gap: 14px 10px; max-width: 420px; margin: 0 auto; padding: 10px 0; background: linear-gradient(transparent 49%, rgba(108,196,154,.35) 49% 51%, transparent 51%) 0 0 / 100% 44px; }
.lights.chain i { width: 22px; height: 28px; border-radius: 50% 50% 45% 45%; position: relative; }
.lights.chain i::before { content: ""; position: absolute; top: -6px; left: 50%; width: 8px; height: 6px; margin-left: -4px; background: #556; border-radius: 2px; }
.lights.chain i.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 16px rgba(226,165,74,.8); }
/* Verhör (Schloss 24) */
.suspects { display: grid; gap: 10px; }
.suspect { text-align: left; width: 100%; border: 1px solid var(--line-2); background: #121315; border-radius: 10px; padding: 12px 14px; cursor: pointer; color: var(--ink); font: inherit; transition: border-color .15s, background .15s; }
.suspect .sus-head { display: flex; align-items: center; gap: 10px; }
.suspect .sus-icon { font-size: 26px; }
.suspect b { font-family: var(--ff-head); font-size: 20px; letter-spacing: .04em; text-transform: uppercase; }
.suspect .sus-tag { margin-left: auto; font-size: 11.5px; color: var(--faint); font-family: var(--ff-mono); }
.suspect ol { margin: 8px 0 0; padding-left: 22px; font-size: 15px; }
.suspect ol li { margin-bottom: 4px; }
.suspect.innocent { border-color: rgba(108,196,154,.4); background: rgba(108,196,154,.06); }
.suspect.innocent .sus-tag { color: var(--green); }
.suspect.guilty { border-color: var(--red); background: rgba(216,66,58,.08); }
.suspect.guilty .sus-tag { color: var(--red); }
pre.cipher.large { font-family: system-ui, -apple-system, sans-serif; font-size: 22px; line-height: 1.9; letter-spacing: .25em; word-spacing: .2em; }
.clocks.key { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; padding: 12px; border: 1px dashed rgba(226,165,74,.4); border-radius: 8px; background: rgba(226,165,74,.05); transform: rotate(-.6deg); clip-path: polygon(0 0, 100% 0, 100% 86%, 92% 100%, 80% 88%, 66% 100%, 52% 90%, 38% 100%, 24% 89%, 10% 100%, 0 90%); padding-bottom: 26px; }
.clocks.key figcaption { font-family: var(--ff-head); font-size: 17px; color: var(--accent-ink); }
.lgrid.poly td { cursor: default; }
.lgrid.poly td.blank { color: var(--faint); }
.nono .ch.ok, .nono .rh.ok { color: var(--green); font-weight: 600; }
.nono-help { margin-bottom: 14px; background: rgba(226,165,74,.06); border: 1px dashed rgba(226,165,74,.35); border-radius: 8px; padding: 10px 12px; }
.nono-help summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; font-size: 14.5px; }
.nono-help p { margin: 10px 0; }
.nono-ex { display: grid; grid-template-columns: 52px auto 1fr; gap: 10px; align-items: center; margin: 6px 0; }
.nono-ex .rh { font-family: var(--ff-mono); font-size: 13px; text-align: right; color: var(--soft); }
.nono-ex .ex-cells { display: inline-flex; }
.nono-ex .ex-cells i { width: 16px; height: 16px; border: 1px solid var(--line-2); background: #0d0e10; }
.nono-ex .ex-cells i.f { background: var(--accent); }
.recipe .pencil { display: inline-block; padding: 0 3px; margin: -2px 0; border: 1.6px solid #6b6156; border-radius: 50% 45% 55% 48%; transform: rotate(-6deg); line-height: 1.1; }
/* Statistik */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat .val { font-family: var(--ff-head); font-size: 28px; color: var(--accent-ink); line-height: 1.1; margin: 4px 0 2px; }
.srows { display: grid; gap: 0; padding: 6px 16px; }
.srow { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.srow:last-child { border-bottom: none; }
.srow .sn { font-family: var(--ff-head); font-size: 22px; color: var(--faint); line-height: 1.2; }
.srow.solved .sn { color: var(--green); }
.srow.open .sn { color: var(--accent-ink); }
.srow.revealed .sn { color: var(--red); }
.srow.locked b, .srow.waiting b { color: var(--faint); font-weight: 500; }
.sbar { height: 6px; background: var(--card-2); border-radius: 3px; margin: 6px 0 4px; overflow: hidden; }
.sbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-ink)); border-radius: 3px; }
.srow.revealed .sbar i { background: var(--red); }
@media (max-width: 480px) { .nav a { padding: 7px 7px; font-size: 13.5px; } }
.nav { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; flex: none; }
.brand { flex: none; }
/* Intro: Fall eröffnen */
.intro-ov { position: fixed; inset: 0; z-index: 100; background: radial-gradient(ellipse 70% 50% at 50% 40%, #1d1712, #08090a 70%); color: var(--ink); display: flex; flex-direction: column; overflow: hidden; animation: fadein .6s ease; }
.intro-ov.out { animation: fadeout .6s ease forwards; }
@keyframes fadein { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; } }
.intro-ov::before { content: ""; position: absolute; inset: -10% 0 0 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(2px 2px at 20px 30px, #fff, transparent 60%), radial-gradient(1.5px 1.5px at 120px 80px, #fff, transparent 60%), radial-gradient(2.5px 2.5px at 200px 160px, #fff, transparent 60%), radial-gradient(1.5px 1.5px at 280px 40px, #fff, transparent 60%), radial-gradient(2px 2px at 340px 220px, #fff, transparent 60%);
  background-size: 380px 300px; animation: snow 20s linear infinite; }
.intro-tape { margin-top: calc(40px + env(safe-area-inset-top)); overflow: hidden; white-space: nowrap; background: repeating-linear-gradient(-45deg, #f2c230 0 18px, #e5b21f 18px 36px); color: #17130c; transform: rotate(-2deg) scaleX(1.05); box-shadow: 0 8px 24px rgba(0,0,0,.5); animation: tapein .8s cubic-bezier(.2,1.2,.4,1) both; }
.intro-tape span { display: inline-block; padding: 7px 0; font-family: var(--ff-head); font-weight: 700; letter-spacing: .14em; font-size: 16px; animation: tape 26s linear infinite; }
@keyframes tapein { from { transform: translateX(-110%) rotate(-2deg); } }
.intro-body { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 18px; padding: 24px; text-align: center; position: relative; }
.intro-ov .l { opacity: 0; animation: introIn .9s ease forwards; animation-delay: var(--d); font-size: 19px; max-width: 420px; }
@keyframes introIn { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.intro-ov .l.mono { font-family: var(--ff-mono); font-size: 12.5px; letter-spacing: .22em; color: var(--red); }
.intro-ov .l.big { font-family: var(--ff-head); font-size: clamp(48px, 15vw, 84px); text-transform: uppercase; letter-spacing: .04em; color: var(--accent-ink); text-shadow: 0 0 28px rgba(226,165,74,.5); animation: introIn .9s ease forwards, flicker 2.2s 1 forwards; animation-delay: var(--d), calc(var(--d) + .9s); }
@keyframes flicker { 0%, 18%, 22%, 62%, 66%, 100% { opacity: 1; } 20%, 64% { opacity: .35; } }
.intro-ov .l.soft { color: var(--soft); font-size: 16px; }
.intro-ov .lockwrap { position: relative; width: 74px; height: 74px; }
.intro-ov .il { position: absolute; inset: 0; width: 74px; height: 74px; color: var(--accent); filter: drop-shadow(0 0 16px rgba(226,165,74,.45)); }
.intro-ov .il.closed { animation: shakeLock .9s ease calc(var(--d) + .6s) 1 both, hideLock .01s linear calc(var(--d) + 1.6s) forwards; }
.intro-ov .il.open { opacity: 0; color: var(--green); filter: drop-shadow(0 0 22px rgba(108,196,154,.7)); animation: showLock .5s ease calc(var(--d) + 1.6s) forwards; }
@keyframes shakeLock { 20%, 60% { transform: rotate(-12deg); } 40%, 80% { transform: rotate(12deg); } }
@keyframes hideLock { to { opacity: 0; } }
@keyframes showLock { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1.08); } }
.intro-skip { position: absolute; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) { .intro-ov .l { opacity: 1 !important; } .intro-ov .il.closed { display: none; } .intro-ov .il.open { opacity: 1 !important; } }
.intro-skip { animation: skipOut .3s ease 11.2s forwards; }
@keyframes skipOut { to { opacity: 0; visibility: hidden; } }
.btn.armed { background: var(--red); border-color: var(--red); color: #fff; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(216,66,58,.25); } }
