/* ARP-Adventskalender 2026 · Variante B. Basis aus konzept/prototyp-b.html uebernommen, Ergaenzungen am Ende. */

  /* Variante B „Notte“: dunkle Bühne, große leichte Ziffern (Portal-Typografie), Rot als Fläche, Gold als Licht */
  :root {
    --bg: #140707; --surface: #1e0e0e; --surface-2: #2a1313; --line: rgba(255,255,255,.12); --line-strong: rgba(255,255,255,.28);
    --txt: #fff; --muted: rgba(255,255,255,.66); --gold: var(--arp-xmas-gold); --gold-soft: var(--arp-xmas-gold-light);
    --red: var(--arp-red-900); --red-hot: #c8141a; --ok: #7ddc8c; --r: 6px;
  }
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { margin: 0; background: var(--bg); color: var(--txt); font-family: var(--arp-font-family); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
  h1, h2, h3, p { margin: 0; }
  button { font: inherit; color: inherit; }
  a { color: var(--gold-soft); text-decoration: none; }
  a:hover { text-decoration: underline; text-underline-offset: 4px; }
  :focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
  .wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

  /* Hintergrund: roter Lichtschein + Schnee */
  .glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; background:
    radial-gradient(900px 600px at 12% -10%, rgba(200,20,26,.55), transparent 65%),
    radial-gradient(700px 500px at 100% 20%, rgba(153,0,0,.35), transparent 70%),
    radial-gradient(800px 500px at 50% 110%, rgba(255,213,79,.07), transparent 70%); }
  #snow { position: fixed; inset: 0; z-index: 0; pointer-events: none; width: 100%; height: 100%; }
  header, main, footer { position: relative; z-index: 1; }

  /* Leiste */
  .bar { position: sticky; top: 0; z-index: 50; background: rgba(20,7,7,.72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .bar .wrap { display: flex; align-items: center; gap: 18px; height: 56px; }
  .bar img { height: 24px; width: auto; display: block; }
  .bar .back { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
  .bar .user { display: flex; align-items: center; gap: 8px; font-size: 13px; }
  .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--red); display: grid; place-items: center; font-weight: 600; font-size: 13px; border: 1px solid var(--line-strong); }

  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--arp-radius-sm); padding: 11px 22px; background: var(--red); color: #fff; font-weight: 600; cursor: pointer; transition: background-color .2s, transform .2s; }
  .btn:hover { background: var(--arp-anthracite); }
  .btn.gold { background: var(--gold); color: #2a0a00; }
  .btn.gold:hover { background: var(--gold-soft); }
  .btn.line { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 400; }
  .btn.line:hover { background: rgba(255,255,255,.08); }
  .btn.sm { padding: 6px 12px; font-size: 12px; }
  .linkBtn { background: none; border: 0; padding: 0; color: var(--gold-soft); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

  /* Kopf */
  .hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: end; padding: 64px 0 40px; }
  .kicker { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-soft); display: flex; align-items: center; gap: 12px; }
  .kicker::before { content: ""; width: 36px; height: 1px; background: var(--gold); }
  .hero h1 { font-size: clamp(64px, 12.5vw, 168px); font-weight: 300; line-height: .88; letter-spacing: -.035em; margin: 18px 0 0 -.05em; }
  .hero h1 em { font-style: normal; display: block; font-size: .36em; letter-spacing: .02em; color: transparent; -webkit-text-stroke: 1px var(--gold); margin-top: .18em; }
  .hero .lead { margin-top: 22px; max-width: 46ch; color: var(--muted); font-size: 16px; }

  .now { background: linear-gradient(160deg, var(--red-hot), var(--red) 55%, #5e0000); border-radius: var(--r); padding: 26px; position: relative; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(200,20,26,.6); }
  .now::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; border: 1px solid rgba(255,213,79,.45); box-shadow: 0 0 0 26px rgba(255,213,79,.07), 0 0 0 56px rgba(255,213,79,.04); pointer-events: none; }
  .now .tag { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
  .now .big { font-size: 84px; font-weight: 300; line-height: 1; letter-spacing: -.03em; margin: 6px 0 4px; }
  .now .big small { font-size: 20px; font-weight: 400; letter-spacing: 0; margin-left: 8px; opacity: .85; }
  .now p { color: rgba(255,255,255,.88); margin-bottom: 18px; max-width: 30ch; }
  .now .clock { font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 300; letter-spacing: .02em; }

  /* Lichterkette = Fortschritt */
  .chain { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; padding: 22px 0 8px; border-top: 1px solid var(--line); }
  .lights { display: flex; justify-content: space-between; border-top: 1px solid var(--line-strong); padding: 0 4px; }
  .bulb { width: 10px; height: 14px; margin-top: 6px; border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%; background: rgba(255,255,255,.16); position: relative; transition: background-color .4s, box-shadow .4s; }
  .bulb::before { content: ""; position: absolute; left: 4px; top: -6px; width: 2px; height: 6px; background: var(--line-strong); }
  .bulb.on { background: var(--gold); box-shadow: 0 0 12px 3px rgba(255,213,79,.55); }
  .bulb.cur { background: #ff6a5c; box-shadow: 0 0 12px 3px rgba(255,84,84,.6); animation: blink 2.4s ease-in-out infinite; }
  @keyframes blink { 50% { opacity: .45; } }
  .chainMeta { display: flex; gap: 26px; align-items: baseline; white-space: nowrap; }
  .stat b { font-size: 30px; font-weight: 300; margin-right: 6px; }
  .stat.gold b { color: var(--gold); }
  .stat span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .guest { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }

  /* Türchen */
  .grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding: 22px 0 14px; }
  .tile { position: relative; aspect-ratio: 1 / 1.08; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); padding: 14px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left; cursor: pointer; overflow: hidden; transition: transform .2s ease, border-color .2s, background-color .2s; }
  .tile .num { font-size: clamp(40px, 5.6vw, 72px); font-weight: 300; line-height: .9; letter-spacing: -.04em; }
  .tile .lbl { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
  .tile .ico { position: absolute; top: 14px; right: 14px; width: 16px; height: 16px; fill: currentColor; opacity: .55; }
  .tile .chip { position: absolute; right: 10px; bottom: 10px; font-size: 11px; font-weight: 600; background: rgba(0,0,0,.4); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
  .tile:not(.locked):not(.missed):hover { transform: translateY(-4px); border-color: var(--gold); }
  .tile.locked, .tile.missed { cursor: not-allowed; background: transparent; }
  .tile.locked .num, .tile.missed .num { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.5); }
  .tile.today { background: linear-gradient(160deg, var(--red-hot), var(--red) 60%, #5e0000); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255,213,79,.14), 0 24px 50px -18px rgba(200,20,26,.8); }
  .tile.today .lbl { color: var(--gold-soft); } .tile.today .ico { opacity: 1; color: var(--gold); }
  .tile.available { border-style: dashed; border-color: rgba(255,213,79,.55); }
  .tile.available .lbl { color: var(--gold-soft); }
  .tile.solved { border-color: transparent; background-size: cover; }
  .tile.solved::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,7,7,.1), rgba(20,7,7,.82)); }
  .tile.solved > .num, .tile.solved > .lbl { position: relative; }
  .tile.solved .ico { opacity: 1; color: var(--gold); }
  .tile.solved .lbl { color: #fff; }
  .tile.special:not(.solved):not(.today) { background: linear-gradient(160deg, rgba(255,213,79,.12), transparent 60%), var(--surface); }
  .tile.special.locked { background: linear-gradient(160deg, rgba(255,213,79,.1), transparent 60%); }
  .community { color: var(--muted); font-size: 13px; padding-bottom: 70px; }
  .community b { color: #fff; }

  /* Info */
  .info { border-top: 1px solid var(--line); padding: 64px 0; }
  .h2 { font-size: 34px; font-weight: 300; letter-spacing: -.01em; margin-bottom: 28px; }
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r); }
  .step { padding: 26px; } .step + .step { border-left: 1px solid var(--line); }
  .step .n { font-size: 54px; font-weight: 300; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--gold); margin-bottom: 14px; }
  .step h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; } .step p { color: var(--muted); }
  .prizes { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; margin-top: 12px; }
  .prize { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; min-height: 170px; display: flex; flex-direction: column; justify-content: flex-start; }
  .prize:first-child { background: linear-gradient(160deg, var(--red-hot), var(--red) 60%, #5e0000); border-color: transparent; }
  .prize .k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
  .prize h3 { font-size: 24px; font-weight: 300; } .prize small { color: var(--muted); }
  .prize:first-child small { color: rgba(255,255,255,.85); }
  .fine { margin-top: 26px; color: var(--muted); font-size: 13px; max-width: 80ch; }
  footer { border-top: 1px solid var(--line); padding: 26px 0 90px; font-size: 13px; color: var(--muted); }
  footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 10px; }
  footer a { color: var(--muted); }

  /* Dialog */
  dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--txt); overflow: auto; box-shadow: 0 40px 120px rgba(0,0,0,.7); }
  dialog[open] { animation: up .28s cubic-bezier(.2,.8,.2,1); }
  @keyframes up { from { opacity: 0; transform: translateY(24px); } }
  dialog::backdrop { background: rgba(8,2,2,.72); backdrop-filter: blur(6px); }
  .dHead { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 0; }
  .dHead .k { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
  .x { background: none; border: 0; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px; color: var(--muted); }
  .x:hover { background: rgba(255,255,255,.1); color: #fff; }
  .dBody { padding: 8px 22px 24px; }
  .q { font-size: 26px; font-weight: 300; line-height: 1.25; margin: 6px 0 20px; }
  .opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; cursor: pointer; transition: border-color .15s, background-color .15s, transform .15s; }
  .opt + .opt { margin-top: 10px; }
  .opt:hover:not(:disabled) { border-color: var(--gold); transform: translateX(3px); }
  .opt .l { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
  .opt.no { opacity: .5; text-decoration: line-through; cursor: not-allowed; border-color: rgba(255,90,90,.6); }
  .opt.yes { border-color: var(--ok); background: rgba(125,220,140,.12); }
  .opt.yes .l { background: var(--ok); color: #06230c; border-color: transparent; }
  .shake { animation: shake .4s; }
  @keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
  .hint { margin-top: 16px; border-left: 3px solid var(--gold); background: rgba(255,213,79,.09); padding: 10px 14px; font-size: 14px; }
  .photo { aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; margin-top: 6px; }
  .photo svg { display: block; width: 100%; height: 100%; }
  .cap { font-size: 12px; color: var(--muted); margin-top: 6px; }
  .win { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
  .win .plus { font-size: 46px; font-weight: 300; color: var(--gold); line-height: 1; white-space: nowrap; animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
  @keyframes pop { from { transform: scale(.6); opacity: 0; } }
  .win p { color: var(--muted); font-size: 14px; } .win p b { color: #fff; }
  .tip { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); color: #fff; }
  .tip:hover { border-color: var(--gold); text-decoration: none; }
  .tip small { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .partner { margin-top: 10px; border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 10px 16px; font-size: 13px; color: var(--muted); }
  .dAct { display: flex; justify-content: flex-end; margin-top: 20px; }

  .toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; background: #fff; color: #222; padding: 10px 18px; border-radius: 999px; font-size: 13px; z-index: 600; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center; }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }
  .proto { position: fixed; right: 16px; bottom: 16px; z-index: 500; width: 250px; background: #fff; color: #333; border-radius: 6px; box-shadow: var(--arp-shadow-dropdown); font-size: 12px; border-top: 3px solid var(--gold); }
  .proto .ppHead { width: 100%; display: flex; justify-content: space-between; background: none; border: 0; padding: 10px 14px; font-weight: 600; cursor: pointer; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #333; }
  .proto .ppBody { padding: 0 14px 14px; display: grid; gap: 10px; }
  .proto.collapsed .ppBody { display: none; }
  .proto label { display: grid; gap: 4px; font-weight: 600; }
  .proto select { font: inherit; font-weight: 400; padding: 5px 6px; border: 1px solid #ccc; background: #fff; color: #333; }
  .proto .check { display: flex; align-items: center; gap: 8px; }
  .proto a { color: var(--red); font-weight: 600; }
  .proto .btn { background: var(--red); }

  @media (max-width: 1024px) { .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 44px; } .grid { grid-template-columns: repeat(4, 1fr); } }
  @media (max-width: 768px) {
    .wrap { padding: 0 16px; }
    .bar .back span { display: none; }
    .hero { padding: 32px 0 28px; } .hero .lead { font-size: 15px; }
    .now .big { font-size: 64px; }
    .chain { grid-template-columns: 1fr; gap: 14px; } .chainMeta { justify-content: space-between; }
    .grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .tile { padding: 10px; } .tile .ico { top: 10px; right: 10px; width: 13px; height: 13px; } .tile .lbl { font-size: 9.5px; letter-spacing: .06em; }
    .tile .chip { display: none; }
    .steps, .prizes { grid-template-columns: 1fr; } .step + .step { border-left: 0; border-top: 1px solid var(--line); }
    .h2 { font-size: 26px; } .q { font-size: 21px; }
    dialog { margin-bottom: 0; width: 100vw; max-width: 100vw; border-radius: 16px 16px 0 0; border-bottom: 0; }
    .proto { right: 8px; left: 8px; width: auto; bottom: 8px; } .toast { bottom: 64px; }
  }
  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ===== Ergaenzungen fuer die echte App ===== */
/* Kachel mit Foto */
.tile .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.tile.solved { background: var(--surface-2); }
.tile.solved::before { z-index: 1; }
.tile.solved > .num, .tile.solved > .lbl { z-index: 2; }
.tile.solved .ico, .tile.solved .chip { z-index: 2; }
.tile.solved.falsch .ico { color: #fff; opacity: .8; }
.grid[aria-busy="true"] { min-height: 300px; }

/* Vier Antworten mit Aufloesung */
.opt .m { margin-left: auto; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.opt:disabled { cursor: default; }
.opt.richtig { border-color: var(--ok); background: rgba(125,220,140,.14); box-shadow: 0 0 0 3px rgba(125,220,140,.16); opacity: 1; }
.opt.richtig .l { background: var(--ok); color: #06230c; border-color: transparent; }
.opt.richtig .m { color: var(--ok); }
.opt.falsch { border-color: #ff6b6b; background: rgba(255,90,90,.12); }
.opt.falsch .l { background: #ff6b6b; color: #2a0000; border-color: transparent; }
.opt.falsch .m { color: #ff9a9a; }
.opt.falsch .t { text-decoration: line-through; text-decoration-color: rgba(255,154,154,.7); }
.opt.rest { opacity: .45; }
.opt.warte { opacity: .7; }
.verdikt { margin-top: 16px; border-left: 3px solid var(--ok); background: rgba(125,220,140,.09); padding: 10px 14px; font-size: 14px; }
.verdikt.falsch { border-left-color: #ff6b6b; background: rgba(255,90,90,.09); }
.verdikt b { display: block; }
.photo { margin-top: 20px; background: var(--surface-2); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.loseListe { margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.fehler { border-left: 3px solid #ff6b6b; background: rgba(255,90,90,.09); padding: 12px 14px; margin-top: 10px; }
.proto a { display: inline-block; margin-top: 2px; }

/* Foto im Vollbild */
button.photo { display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; position: relative; }
button.photo .lupe { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 999px; opacity: .85; transition: opacity .2s; }
button.photo:hover .lupe { opacity: 1; }
#voll { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; padding: 0; border: 0; border-radius: 0; background: rgba(8,2,2,.96); overflow: hidden; cursor: zoom-out; }
#voll[open] { display: grid; place-items: center; animation: none; }
#voll img { max-width: 100vw; max-height: 100dvh; width: auto; height: auto; object-fit: contain; }
#voll .x { position: absolute; top: 14px; right: 14px; background: rgba(0,0,0,.55); color: #fff; }

/* Antwortzeit */
.uhr { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.uhr .spur { flex: 1; height: 6px; background: rgba(255,255,255,.14); border-radius: 3px; overflow: hidden; }
.uhr .spur i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 3px; }
.uhr span { font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; color: var(--muted); font-size: 13px; }
.uhr b { font-size: 24px; font-weight: 300; color: var(--gold); }
.uhr.knapp .spur i { background: #ff6b6b; }
.uhr.knapp b { color: #ff9a9a; }
.bereit { display: flex; gap: 18px; align-items: center; }
.bereit .sek { flex: none; width: 84px; height: 84px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; font-size: 36px; font-weight: 300; color: var(--gold); box-shadow: 0 0 0 8px rgba(255,213,79,.07); }
.bereit p { color: var(--muted); } .bereit b { color: #fff; }
@media (max-width: 768px) { .bereit { flex-direction: column; align-items: flex-start; } }

/* Rennspiel (Türchen 6 und 24) */
.fl { width: 16px; height: 16px; fill: currentColor; flex: none; }
.tile .fl { position: absolute; top: 14px; right: 38px; opacity: .55; z-index: 2; }
.tile .fl.sieg, .tile.today .fl { color: var(--gold); opacity: 1; }
.nowAct { display: flex; flex-wrap: wrap; gap: 10px; }
.renn { margin-top: 18px; padding: 20px 22px; border-radius: var(--r); border: 1px solid var(--gold); background: linear-gradient(160deg, var(--red-hot), var(--red) 60%, #5e0000); box-shadow: 0 0 0 4px rgba(255,213,79,.14), 0 24px 50px -18px rgba(200,20,26,.8); }
.renn .k { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.renn h3 { font-size: 24px; font-weight: 300; line-height: 1.2; margin: 6px 0 8px; }
.renn p { color: rgba(255,255,255,.88); font-size: 14px; }
.renn p b { color: #fff; }
.renn .erg { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 2px 0 8px; }
.renn .erg b { font-size: 40px; font-weight: 300; line-height: 1; letter-spacing: -.02em; }
.renn .erg .plus { font-size: 40px; font-weight: 300; line-height: 1; color: var(--gold); }
.renn .erg span:not(.plus) { font-size: 13px; color: rgba(255,255,255,.88); }
.renn .btn { margin-top: 16px; }
@media (max-width: 768px) { .tile .fl { top: 10px; right: 28px; width: 13px; height: 13px; } .renn { padding: 18px; } }
