/* 🎁 Weihnachts-Quiz – klar, ruhig, Apple-Stil. Hell & dunkel, Dynamic Type, 44pt+. */
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
@supports (font: -apple-system-body) { html { font: -apple-system-body; } }
:root {
  --bg: #f2f2f7; --card: #ffffff; --fill: #f2f2f7; --fill2: #e5e5ea; --sep: rgba(60, 60, 67, .18);
  --label: #000; --label2: rgba(60, 60, 67, .78); --label3: rgba(60, 60, 67, .55);
  --blue: #0066d6; --green: #248a3d; --red: #d70015; --orange: #c93400; --gold: #b25000;
  --greenbg: rgba(52, 199, 89, .14); --redbg: rgba(255, 59, 48, .12); --bluebg: rgba(0, 122, 255, .1);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000; --card: #1c1c1e; --fill: #2c2c2e; --fill2: #3a3a3c; --sep: rgba(84, 84, 88, .6);
    --label: #fff; --label2: rgba(235, 235, 245, .8); --label3: rgba(235, 235, 245, .6);
    --blue: #409cff; --green: #30d158; --red: #ff6961; --orange: #ff9f0a; --gold: #ffd60a;
    --greenbg: rgba(48, 209, 88, .18); --redbg: rgba(255, 105, 97, .16); --bluebg: rgba(64, 156, 255, .16); --shadow: none; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--label); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif; line-height: 1.4; -webkit-font-smoothing: antialiased; }
main { max-width: 36rem; margin: 0 auto; padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) calc(2.5rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
h1, h2 { margin: 0; letter-spacing: -.02em; }
h1 { font-size: 2rem; font-weight: 700; line-height: 1.12; }
h2 { font-size: 1.3rem; font-weight: 650; line-height: 1.25; }
p { margin: 0; }
.eyebrow { font-size: .8rem; font-weight: 600; color: var(--orange); text-transform: uppercase; letter-spacing: .06em; }
.lead { font-size: 1.06rem; color: var(--label2); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 12px; }
.snd { position: fixed; z-index: 5; bottom: max(.8rem, env(safe-area-inset-bottom)); right: max(.6rem, env(safe-area-inset-right)); width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); color: var(--label2); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; }

/* Buttons */
.btn { min-height: 50px; padding: .8rem 1.4rem; border: 0; border-radius: 14px; background: var(--blue); color: #fff; font: inherit; font-size: 1.06rem; font-weight: 600; cursor: pointer; width: 100%; transition: transform .12s, opacity .12s; }
.btn:active { transform: scale(.98); opacity: .85; }
.btn.plain { background: var(--card); color: var(--blue); box-shadow: var(--shadow); }
.btn:disabled { opacity: .4; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }

/* Intro */
.intro { display: grid; gap: .7rem; padding-top: 2.4rem; }
.intro.small { padding-top: 1.2rem; }
.badge { width: 4.4rem; height: 4.4rem; border-radius: 1.1rem; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 2.4rem; margin-bottom: .4rem; }
.group { list-style: none; margin: .6rem 0; padding: 0; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.group li { display: flex; align-items: center; gap: .85rem; padding: .8rem 1rem; min-height: 56px; }
.group li + li { border-top: .5px solid var(--sep); margin-left: 3.3rem; padding-left: 0; }
.group li + li .ic { margin-left: -2.3rem; }
.group .ic { flex: none; width: 1.6rem; text-align: center; font-size: 1.3rem; }
.group b { display: block; font-weight: 600; }
.group small { display: block; color: var(--label2); font-size: .9rem; }
.hints { margin: 0; }

/* Buchstaben-Leiste */
.tray { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: .8rem .8rem .9rem; margin-top: 2.6rem; }
.tray-h { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 600; color: var(--label3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .55rem; }
.tiles { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.tile { aspect-ratio: 1; border-radius: 9px; background: var(--fill); display: grid; place-items: center; font-size: clamp(1rem, 5vw, 1.35rem); font-weight: 700; color: var(--label); }
.tile:not(.on) { border: 1.5px dashed var(--fill2); background: transparent; }
.tile.on { background: var(--bluebg); color: var(--blue); }
.tile.new { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* Frage */
.qcard { background: var(--card); border-radius: 20px; box-shadow: var(--shadow); padding: 1.1rem 1rem 1rem; display: grid; gap: .9rem; }
.qmeta { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.pill { font-size: .8rem; font-weight: 600; padding: .25rem .65rem; border-radius: 999px; background: var(--fill); color: var(--label2); }
.cat { font-size: .8rem; font-weight: 600; color: var(--orange); text-align: right; }
.ladder { display: flex; gap: 4px; }
.ladder i { flex: 1; height: 4px; border-radius: 2px; background: var(--fill2); }
.ladder i.ok { background: var(--blue); }
.ladder i.cur { background: var(--orange); }
.img { width: 100%; max-width: 11rem; height: auto; justify-self: center; }
.opts { display: grid; gap: .55rem; }
.opt { position: relative; overflow: hidden; display: flex; align-items: center; gap: .8rem; min-height: 54px; padding: .7rem .9rem; border-radius: 14px; border: 0; background: var(--fill); color: var(--label); font: inherit; font-size: 1.06rem; font-weight: 500; text-align: left; cursor: pointer; transition: background .15s, transform .12s; }
.opt:active { transform: scale(.985); }
.opt .l { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--orange); font-weight: 700; font-size: .9rem; position: relative; z-index: 1; }
.opt .t { flex: 1; position: relative; z-index: 1; }
.opt .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--bluebg); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.opt .pct { position: relative; z-index: 1; font-size: .9rem; font-weight: 600; color: var(--blue); }
.opt.yes { background: var(--greenbg); color: var(--green); }
.opt.yes .l { background: var(--green); color: #fff; }
.opt.no { background: var(--redbg); color: var(--red); }
.opt.no .t { text-decoration: line-through; }
.opt.gone { opacity: .25; }
.opt:disabled { cursor: default; }
.note { padding: .85rem 1rem; border-radius: 14px; font-size: 1rem; display: grid; gap: .7rem; }
.note[hidden] { display: none; }
.note.yes { background: var(--greenbg); }
.note.yes b { color: var(--green); }
.note.no { background: var(--redbg); color: var(--red); }
.note.info { background: var(--bluebg); }
.gotl { color: var(--label2); }
.gotl b { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 7px; background: var(--bluebg); color: var(--blue) !important; margin-left: .3rem; }

/* Joker */
.jokers { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.jk { min-height: 64px; border: 0; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); color: var(--label); font: inherit; cursor: pointer; display: grid; place-items: center; gap: 0; padding: .5rem .3rem; }
.jk b { font-size: 1.1rem; font-weight: 700; }
.jk small { font-size: .75rem; color: var(--label2); }
.jk:disabled { opacity: .35; cursor: default; }
.jk:disabled b { text-decoration: line-through; }

/* Finale: Buchstaben ordnen */
.slots { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; padding: .8rem; border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.slot { aspect-ratio: 3 / 4; border: 0; border-radius: 9px; border-bottom: 3px solid var(--fill2); background: var(--fill); font: inherit; font-size: clamp(1.1rem, 5.6vw, 1.6rem); font-weight: 700; color: var(--label); cursor: pointer; padding: 0; }
.slot.on { background: var(--bluebg); color: var(--blue); border-bottom-color: var(--blue); }
.slots.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.pool { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.tile.big { border: 0; min-height: 56px; aspect-ratio: auto; background: var(--card); box-shadow: var(--shadow); font: inherit; font-size: 1.5rem; font-weight: 700; color: var(--label); cursor: pointer; }
.tile.big:active { transform: scale(.94); }
.tile.big.used { opacity: .2; box-shadow: none; }

/* Auflösung */
.board { margin-top: 2.6rem; background: #0b0b0d; color: #fff; border-radius: 18px; padding: .9rem; font-family: ui-monospace, "SF Mono", Menlo, monospace; box-shadow: 0 12px 32px rgba(0, 0, 0, .25); }
.bh, .bf { display: flex; justify-content: space-between; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #a1a1a6; }
.bh { margin-bottom: .6rem; } .bf { margin-top: .6rem; }
.flaps { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.flap { position: relative; aspect-ratio: 3 / 4.2; border-radius: 6px; background: linear-gradient(#232327 0 49%, #18181b 51%); display: grid; place-items: center; }
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #000; }
.flap b { font-size: clamp(1rem, 6vw, 1.8rem); color: #d1d1d6; }
.flap.on b { color: #ffd60a; }
.status { color: #30d158; font-weight: 700; }
.finale { display: grid; gap: 1rem; }
.finale[hidden] { display: none; }
.finale.in { animation: rise .7s cubic-bezier(.2, .8, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
.finale h1 { font-size: 2.2rem; }
.city { color: var(--orange); }
.pass { display: grid; grid-template-columns: minmax(0, 1fr) 3.2rem; background: var(--card); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.pm { padding: 1rem; display: grid; gap: .9rem; }
.ph { display: flex; justify-content: space-between; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--orange); }
.route { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.route > div { min-width: 0; }
.route .r { text-align: right; }
.route b { display: block; font-size: clamp(1.1rem, 5.4vw, 1.4rem); font-weight: 700; }
.plane { color: var(--orange); font-size: 1.4rem; }
.pass small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--label3); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; border-top: 1.5px dashed var(--sep); padding-top: .8rem; }
.grid > div { min-width: 0; }
.stub { background: var(--orange); display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 1rem 0; }
.stub small { color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .15em; }
.code { width: 1.6rem; flex: 1; max-height: 7rem; background: repeating-linear-gradient(180deg, #fff 0 3px, transparent 3px 5px, #fff 5px 6px, transparent 6px 9px); opacity: .9; margin-bottom: .8rem; }
.sub { margin-top: .4rem; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10; display: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (prefers-contrast: more) { :root { --label2: var(--label); --sep: var(--label3); } .tile:not(.on) { border-color: var(--label3); } }
