@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --p { syntax: '<number>'; inherits: true; initial-value: 1; }

:root {
  --bg: #0a0809;
  --bg2: #141012;
  --panel: rgb(28 22 25 / .72);
  --line: rgb(255 240 220 / .1);
  --line2: rgb(255 240 220 / .2);
  --ink: #f6efe6;
  --dim: #a99c91;
  --mute: #6d625b;
  --pop: #ffd23f;
  --ruin: #ff2e4d;
  --ok: #3ddc97;
  --r: 18px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --marker: 'Permanent Marker', 'Comic Sans MS', cursive;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.2, .9, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(1200px 700px at 50% -10%, #2a1a1f 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--display);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--ruin); color: #fff; }

/* ---------- Atmosphäre ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0) } 20% { transform: translate(-3%, 2%) } 40% { transform: translate(2%, -4%) }
  60% { transform: translate(-4%, -1%) } 80% { transform: translate(3%, 3%) } 100% { transform: translate(0, 0) }
}
.beam {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: conic-gradient(from 180deg at 50% -20%, transparent 160deg, rgb(255 220 160 / .06) 175deg, rgb(255 220 160 / .1) 180deg, rgb(255 220 160 / .06) 185deg, transparent 200deg);
  animation: flicker 4s infinite;
}
@keyframes flicker { 0%, 100% { opacity: 1 } 47% { opacity: 1 } 48% { opacity: .6 } 49% { opacity: 1 } 73% { opacity: .85 } }

.wall {
  position: fixed; inset: -20vh -20vw; z-index: -1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 14px;
  transform: rotate(-12deg); opacity: 0; transition: opacity 1.2s;
  mask-image: radial-gradient(ellipse at center, rgb(0 0 0 / .55), transparent 70%);
  filter: grayscale(.7) contrast(1.1) brightness(.55);
}
.wall.on { opacity: 1; }
.wall .col { display: flex; flex-direction: column; gap: 14px; animation: drift 60s linear infinite; }
.wall .col:nth-child(even) { animation-direction: reverse; animation-duration: 75s; }
.wall img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; }
@keyframes drift { from { transform: translateY(0) } to { transform: translateY(-50%) } }

/* ---------- Gerüst ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px); backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgb(10 8 9 / .85), rgb(10 8 9 / 0));
}
.brand { font-weight: 800; font-size: 22px; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 6px; user-select: none; }
.brand-ruin { color: var(--ruin); font-family: var(--marker); font-weight: 400; transform: rotate(-6deg); display: inline-block; }
.brand-the { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--dim); }
.brand-film { position: relative; }
.brand-film::after { content: ''; position: absolute; left: -4%; right: -4%; top: 52%; height: 3px; background: var(--ruin); transform: rotate(-4deg); border-radius: 2px; }
.hud { margin-left: auto; display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 13px; color: var(--dim); }
.hud .pill { padding: 4px 10px; border: 1px solid var(--line2); border-radius: 99px; }
.icon-btn { background: none; border: 1px solid var(--line2); border-radius: 99px; width: 36px; height: 36px; display: grid; place-items: center; }

.timer { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 30; opacity: 0; transition: opacity .3s; }
.timer.on { opacity: 1; }
.timer-fill { height: 100%; width: 100%; transform-origin: left; background: linear-gradient(90deg, var(--pop), var(--ruin)); box-shadow: 0 0 18px var(--ruin); }
.timer.urgent .timer-fill { animation: pulse .5s infinite alternate; }
@keyframes pulse { to { opacity: .4 } }

main { position: relative; z-index: 1; padding: 8px clamp(16px, 4vw, 40px) 120px; max-width: 1240px; margin: 0 auto; }
.screen { animation: screen-in .6s var(--ease) both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(6px) } }
::view-transition-old(root) { animation: .3s ease both vt-out; }
::view-transition-new(root) { animation: .45s var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; transform: scale(.98); filter: blur(4px) } }
@keyframes vt-in { from { opacity: 0; transform: scale(1.02); filter: blur(4px) } }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(20px) saturate(1.2); padding: clamp(18px, 3vw, 28px); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
h1, h2, h3 { margin: 0; letter-spacing: -.03em; line-height: 1.02; }
.muted { color: var(--dim); }

/* ---------- Formularelemente ---------- */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; color: var(--dim); }
.input {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line2);
  background: rgb(0 0 0 / .35); outline: none; transition: border-color .2s, box-shadow .2s;
}
.input:focus { border-color: var(--pop); box-shadow: 0 0 0 4px rgb(255 210 63 / .15); }
.input.code { font-family: var(--mono); font-size: 22px; letter-spacing: .4em; text-transform: uppercase; text-align: center; }
.btn {
  --c: var(--pop);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 14px; border: 0; font-weight: 700; font-size: 16px;
  background: var(--c); color: #160d05; transition: transform .2s var(--spring), box-shadow .2s, filter .2s;
  box-shadow: 0 8px 30px -8px color-mix(in oklab, var(--c) 70%, transparent), inset 0 -3px 0 rgb(0 0 0 / .18);
}
.btn:hover:not(:disabled) { transform: translateY(-2px) scale(1.02); filter: brightness(1.06); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.btn:disabled { filter: grayscale(1) brightness(.6); cursor: not-allowed; }
.btn.ruin { --c: var(--ruin); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line2); box-shadow: none; }
.btn.small { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn.big { padding: 18px 30px; font-size: 19px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line2); background: rgb(0 0 0 / .25);
  font-size: 14px; transition: all .2s var(--spring); user-select: none;
}
.chip:hover { border-color: var(--dim); }
.chip.on { background: var(--pop); color: #1a0f05; border-color: var(--pop); font-weight: 600; }
.chip.off { background: rgb(255 46 77 / .18); border-color: var(--ruin); color: #ffb3bf; text-decoration: line-through; }

/* ---------- Start ---------- */
.home-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; min-height: calc(100vh - 140px); }
.hero h1 { font-size: clamp(56px, 9vw, 128px); font-weight: 800; line-height: .88; }
.hero .ruin-word { font-family: var(--marker); font-weight: 400; color: var(--ruin); display: inline-block; transform: rotate(-5deg); text-shadow: 0 0 40px rgb(255 46 77 / .5); animation: scrawl 1s var(--spring) both .2s; }
@keyframes scrawl { from { transform: rotate(-25deg) scale(2.2); opacity: 0; filter: blur(10px) } }
.hero .the { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--dim); font-size: .6em; }
.hero .film-word { position: relative; display: inline-block; }
.hero .film-word svg { position: absolute; left: -6%; top: 15%; width: 112%; height: 80%; overflow: visible; }
.hero .film-word path { fill: none; stroke: var(--ruin); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 1.1s var(--ease) forwards 1s; filter: drop-shadow(0 0 10px rgb(255 46 77 / .5)); }
@keyframes draw { to { stroke-dashoffset: 0 } }
.hero p { font-size: clamp(17px, 1.8vw, 21px); color: var(--dim); max-width: 34ch; margin: 28px 0 0; }
.hero .example { margin-top: 28px; padding: 18px 20px; border-left: 3px solid var(--ruin); background: rgb(255 46 77 / .06); border-radius: 0 12px 12px 0; max-width: 46ch; }
.hero .example b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 20px; }
.hero .example q { display: block; margin-top: 6px; font-family: var(--marker); font-size: 17px; line-height: 1.4; quotes: '„' '“'; }

.join-card { display: grid; gap: 18px; }
.avatars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.avatars button { aspect-ratio: 1; font-size: 24px; border-radius: 12px; border: 1px solid transparent; background: rgb(0 0 0 / .25); transition: transform .2s var(--spring); }
.avatars button:hover { transform: scale(1.12) rotate(-6deg); }
.avatars button.on { border-color: var(--pop); background: rgb(255 210 63 / .15); transform: scale(1.08); }
.or { display: flex; align-items: center; gap: 12px; color: var(--mute); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line2); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* ---------- Lobby ---------- */
.lobby-grid { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
.room-code { text-align: center; }
.room-code .code { font-family: var(--mono); font-weight: 700; font-size: 64px; letter-spacing: .18em; line-height: 1; margin: 6px 0 14px; background: linear-gradient(120deg, var(--pop), var(--ruin)); -webkit-background-clip: text; background-clip: text; color: transparent; cursor: copy; }
.players { display: grid; gap: 8px; margin-top: 18px; }
.player {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgb(0 0 0 / .25);
  border: 1px solid var(--line); animation: pop-in .5s var(--spring) both;
}
.player .av { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: color-mix(in oklab, var(--pc) 25%, transparent); box-shadow: inset 0 0 0 2px var(--pc); }
.player .nm { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player .tag { font-family: var(--mono); font-size: 11px; color: var(--pop); }
.player.off { opacity: .4; }
.player .kick { background: none; border: 0; color: var(--mute); font-size: 18px; }
@keyframes pop-in { from { opacity: 0; transform: scale(.6) translateY(10px) } }

.settings { display: grid; gap: 22px; }
.settings h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.slider { display: grid; gap: 6px; }
.slider label { display: flex; justify-content: space-between; font-size: 13px; color: var(--dim); }
.slider output { font-family: var(--mono); color: var(--ink); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: linear-gradient(to right, var(--pop) var(--fill, 50%), rgb(255 255 255 / .1) var(--fill, 50%)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); border: 4px solid var(--pop); transition: transform .15s; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 4px solid var(--pop); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.25); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.pool {
  display: flex; gap: 18px; align-items: center; padding: 16px 18px; border-radius: 14px;
  background: linear-gradient(120deg, rgb(255 210 63 / .1), rgb(255 46 77 / .08)); border: 1px solid rgb(255 210 63 / .25);
}
.pool .n { font-family: var(--mono); font-size: 38px; font-weight: 700; color: var(--pop); line-height: 1; min-width: 3ch; }
.pool .ex { font-size: 13px; color: var(--dim); }
.pool.bad { border-color: var(--ruin); background: rgb(255 46 77 / .1); }
.pool.bad .n { color: var(--ruin); }
.start-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.waiting { display: flex; align-items: center; gap: 12px; color: var(--dim); }
.dots span { display: inline-block; animation: bounce 1.2s infinite; } .dots span:nth-child(2) { animation-delay: .15s } .dots span:nth-child(3) { animation-delay: .3s }
@keyframes bounce { 0%, 60%, 100% { transform: none } 30% { transform: translateY(-6px) } }
.ro-settings { display: grid; gap: 8px; font-size: 14px; }
.ro-settings div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line2); padding: 6px 0; }

/* ---------- Filmkarte ---------- */
.film {
  display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: clamp(20px, 3vw, 40px); align-items: center;
}
.poster-wrap { perspective: 1000px; }
.poster {
  position: relative; aspect-ratio: 2/3; border-radius: 14px; overflow: hidden; background: #222;
  box-shadow: 0 40px 80px -20px rgb(0 0 0 / .9), 0 0 0 1px rgb(255 255 255 / .08);
  transform-style: preserve-3d; transition: transform .3s;
}
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgb(255 255 255 / .18) 50%, transparent 60%); background-size: 250% 100%; animation: sheen 5s infinite; mix-blend-mode: overlay; }
@keyframes sheen { from { background-position: 150% 0 } to { background-position: -100% 0 } }
.poster .noimg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 64px; }
.intro .poster-wrap { animation: projector 1.4s var(--ease) both; }
@keyframes projector {
  0% { opacity: 0; transform: scale(.4) rotateY(-50deg); filter: brightness(4) blur(14px) }
  40% { opacity: 1; filter: brightness(2.2) blur(4px) }
  100% { transform: none; filter: none }
}
.film-meta { display: grid; gap: 14px; }
.film-meta .kicker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tagpill { font-family: var(--mono); font-size: 12px; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line2); color: var(--dim); }
.film-title { font-size: clamp(38px, 6vw, 76px); font-weight: 800; }
.film-orig { font-family: var(--serif); font-style: italic; color: var(--dim); font-size: 22px; margin-top: -4px; }
.film-plot { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; max-width: 60ch; color: #e6dcd0; }
.film-tagline { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--pop); }
.film-credits { font-size: 14px; color: var(--dim); }
.film-credits b { color: var(--ink); font-weight: 600; }
.rating { display: flex; align-items: center; gap: 12px; }
.rating .score { font-family: var(--mono); font-weight: 700; font-size: 34px; color: var(--pop); line-height: 1; }
.rating .stars { --p: 1; position: relative; font-size: 22px; letter-spacing: 2px; color: rgb(255 255 255 / .12); }
.rating .stars::before { content: '★★★★★★★★★★'; position: absolute; inset: 0; width: calc(var(--p) * 100%); overflow: hidden; color: var(--pop); white-space: nowrap; transition: --p 1.6s var(--ease); }
.rating .votes { font-size: 13px; color: var(--dim); }
.intro .film-meta > * { animation: rise .7s var(--ease) both; }
.intro .film-meta > :nth-child(1) { animation-delay: .5s } .intro .film-meta > :nth-child(2) { animation-delay: .7s } .intro .film-meta > :nth-child(3) { animation-delay: .85s }
.intro .film-meta > :nth-child(4) { animation-delay: 1.05s } .intro .film-meta > :nth-child(5) { animation-delay: 1.25s } .intro .film-meta > :nth-child(6) { animation-delay: 1.4s } .intro .film-meta > :nth-child(7) { animation-delay: 1.55s }
@keyframes rise { from { opacity: 0; transform: translateY(16px); filter: blur(4px) } }
.round-badge { font-family: var(--marker); color: var(--ruin); font-size: 22px; transform: rotate(-3deg); display: inline-block; }
.skipped-note { font-size: 14px; color: var(--dim); }

/* ---------- Schreiben ---------- */
.write-grid { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
.mini-film { position: sticky; top: 80px; display: grid; gap: 12px; }
.mini-film .poster { width: 100%; }
.mini-film h2 { font-size: 28px; }
.mini-film p { font-size: 14px; color: var(--dim); margin: 0; }
.mini-film details summary { cursor: pointer; color: var(--dim); font-size: 13px; }
.pad { position: relative; }
.pad textarea {
  width: 100%; min-height: 220px; resize: vertical; padding: 26px 26px 40px; border-radius: 18px; outline: none;
  font: 400 clamp(20px, 2.2vw, 26px)/1.45 var(--marker); color: #1d1410;
  background:
    repeating-linear-gradient(transparent 0 37px, rgb(60 90 200 / .18) 37px 38px),
    linear-gradient(#fff6d8, #ffeeb5);
  background-attachment: local;
  border: 0; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .8), inset 0 0 0 1px rgb(0 0 0 / .08);
  transform: rotate(-.6deg); transition: transform .3s var(--spring);
}
.pad textarea:focus { transform: rotate(0) scale(1.01); }
.pad textarea::placeholder { color: rgb(29 20 16 / .35); }
.pad .count { position: absolute; right: 18px; bottom: 12px; font-family: var(--mono); font-size: 12px; color: rgb(29 20 16 / .5); }
.pad .count.warn { color: var(--ruin); }
.pad.sent textarea { background: repeating-linear-gradient(transparent 0 37px, rgb(60 90 200 / .18) 37px 38px), linear-gradient(#e2ffe9, #c6f5d3); }
.pad .sent-stamp { position: absolute; right: 26px; top: -14px; font-family: var(--marker); color: var(--ok); font-size: 22px; transform: rotate(8deg); background: var(--bg); padding: 2px 12px; border: 2px solid var(--ok); border-radius: 8px; animation: stamp .5s var(--spring) both; }
.write-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.write-actions .grow { flex: 1; }
.progress-avatars { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 22px; }
.pa { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; background: rgb(255 255 255 / .05); box-shadow: inset 0 0 0 2px rgb(255 255 255 / .1); opacity: .45; transition: all .4s var(--spring); position: relative; }
.pa.done { opacity: 1; box-shadow: inset 0 0 0 2px var(--pc), 0 0 20px -4px var(--pc); transform: scale(1.08); }
.pa.done::after { content: '✓'; position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok); color: #04140c; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.ideas { margin-top: 18px; font-size: 14px; color: var(--dim); }
.ideas button { background: none; border: 0; color: var(--pop); text-decoration: underline dotted; padding: 0; }

/* ---------- Abstimmen ---------- */
.vote-head { display: flex; gap: 20px; align-items: center; margin-bottom: 26px; }
.vote-head img { width: 64px; border-radius: 8px; }
.vote-head h2 { font-size: clamp(28px, 4vw, 44px); }
.ballot { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.note {
  --rot: 0deg; position: relative; text-align: left; padding: 26px 24px 30px; border-radius: 6px; border: 0;
  background: linear-gradient(160deg, #fff7d6, #ffe9a6); color: #1d1410; font: 400 20px/1.45 var(--marker);
  transform: rotate(var(--rot)); box-shadow: 0 18px 40px -12px rgb(0 0 0 / .8); min-height: 150px;
  transition: transform .25s var(--spring), box-shadow .25s; animation: drop .6s var(--spring) both;
}
.note::before { content: ''; position: absolute; top: -10px; left: 50%; width: 90px; height: 24px; transform: translateX(-50%) rotate(-2deg); background: rgb(255 255 255 / .35); backdrop-filter: blur(2px); box-shadow: 0 1px 3px rgb(0 0 0 / .2); }
.note:hover:not(:disabled) { transform: rotate(0) translateY(-6px) scale(1.03); box-shadow: 0 30px 60px -12px rgb(0 0 0 / .9); }
.note.mine { background: linear-gradient(160deg, #e9e3d6, #cfc7b4); cursor: not-allowed; }
.note.mine::after { content: 'Deiner'; position: absolute; right: 12px; bottom: 8px; font: 600 11px var(--mono); text-transform: uppercase; color: rgb(0 0 0 / .4); }
.note.picked { background: linear-gradient(160deg, #ff8396, #ff2e4d); color: #fff; transform: rotate(0) scale(1.04); }
.note.picked::after { content: '✗ Deine Stimme'; position: absolute; right: 12px; bottom: 8px; font: 700 11px var(--mono); text-transform: uppercase; }
@keyframes drop { from { opacity: 0; transform: translateY(-60px) rotate(calc(var(--rot) * -4)) scale(1.1) } }

/* ---------- Auflösung ---------- */
.reveal-grid { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 36px; align-items: start; }
.reveal .poster-wrap { position: sticky; top: 80px; }
.reveal .poster img { transition: filter 1.2s; }
.reveal-grid.ruined .poster img { filter: saturate(.3) contrast(1.3) sepia(.4) hue-rotate(-20deg); }
.scrawl { position: absolute; inset: 0; pointer-events: none; }
.scrawl path { fill: none; stroke: var(--ruin); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1600; stroke-dashoffset: 1600; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .6)); }
.reveal-grid.ruined .scrawl path { animation: draw 1s var(--ease) forwards; }
.reveal-grid.ruined .scrawl path:nth-child(2) { animation-delay: .25s }
.reveal-grid.ruined .scrawl path:nth-child(3) { animation-delay: .5s }
.stamp {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; rotate: -14deg; padding: 6px 18px; border: 5px solid var(--ruin);
  border-radius: 10px; color: var(--ruin); font: 800 40px/1 var(--display); letter-spacing: .06em; background: rgb(10 8 9 / .55);
  opacity: 0; mix-blend-mode: normal; text-shadow: 0 0 20px rgb(255 46 77 / .6);
}
.reveal-grid.ruined .stamp { animation: stamp .45s var(--spring) forwards .9s; }
@keyframes stamp { from { opacity: 0; scale: 3; } to { opacity: 1; scale: 1; } }
.new-rating { margin-top: 18px; text-align: center; }
.new-rating .from { font-family: var(--mono); color: var(--dim); text-decoration: line-through; font-size: 20px; }
.new-rating .to { font-family: var(--mono); font-weight: 700; font-size: 56px; color: var(--ruin); line-height: 1; text-shadow: 0 0 30px rgb(255 46 77 / .5); }
.new-rating .lbl { font-size: 12px; color: var(--dim); font-family: var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.results { display: grid; gap: 14px; }
.result {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 18px 20px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line); opacity: 0; transform: translateX(40px);
}
.result.show { animation: slide-in .6s var(--spring) forwards; }
@keyframes slide-in { to { opacity: 1; transform: none } }
.result .txt { font: 400 19px/1.45 var(--marker); }
.result .by { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dim); grid-column: 1; }
.result .by .av { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in oklab, var(--pc) 25%, transparent); box-shadow: inset 0 0 0 2px var(--pc); font-size: 15px; }
.result .by b { color: var(--pc); }
.result .pts { grid-row: 1 / 3; grid-column: 2; text-align: right; align-self: center; }
.result .pts .v { font-family: var(--mono); font-size: 28px; font-weight: 700; }
.result .pts .p { font-family: var(--mono); font-size: 13px; color: var(--ok); }
.result .voters { display: flex; gap: 2px; grid-column: 1; }
.result .voters span { font-size: 16px; animation: pop-in .4s var(--spring) both; }
.result.winner { border-color: var(--ruin); background: linear-gradient(120deg, rgb(255 46 77 / .22), rgb(255 210 63 / .08)); box-shadow: 0 0 60px -10px rgb(255 46 77 / .55); }
.result.winner .txt { font-size: 24px; }
.result.winner::before { content: 'RUINIERT'; position: absolute; top: -12px; left: 18px; font: 800 11px var(--mono); letter-spacing: .18em; padding: 3px 10px; background: var(--ruin); color: #fff; border-radius: 6px; }
.scoreboard { margin-top: 28px; display: grid; gap: 6px; }
.sb-row { display: grid; grid-template-columns: 28px 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: rgb(0 0 0 / .25); transition: transform .5s var(--ease); }
.sb-row .rk { font-family: var(--mono); color: var(--mute); }
.sb-row .sc { font-family: var(--mono); font-weight: 700; }
.sb-row .gain { font-family: var(--mono); color: var(--ok); font-size: 12px; margin-left: 6px; }
.empty-round { padding: 30px; text-align: center; color: var(--dim); }

/* ---------- Finale ---------- */
.final h1 { font-size: clamp(44px, 7vw, 96px); text-align: center; font-weight: 800; }
.final h1 em { font-family: var(--marker); font-style: normal; font-weight: 400; color: var(--ruin); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 50px auto 40px; max-width: 640px; }
.podium .step { flex: 1; display: grid; justify-items: center; gap: 8px; }
.podium .av { font-size: 52px; animation: pop-in .7s var(--spring) both; }
.podium .nm { font-weight: 700; }
.podium .block { width: 100%; border-radius: 14px 14px 0 0; display: grid; place-items: start center; padding-top: 12px; font: 700 34px var(--mono); background: linear-gradient(to bottom, var(--pc), color-mix(in oklab, var(--pc) 30%, #000)); color: #120a06; transform-origin: bottom; animation: grow 1s var(--spring) both; }
.podium .s1 .block { height: 180px; animation-delay: 1.2s } .podium .s1 .av { animation-delay: 1.8s }
.podium .s2 .block { height: 130px; animation-delay: .6s } .podium .s2 .av { animation-delay: 1.2s }
.podium .s3 .block { height: 90px; animation-delay: .2s } .podium .s3 .av { animation-delay: .7s }
@keyframes grow { from { transform: scaleY(0) } }
.podium .pts { font-family: var(--mono); color: var(--dim); font-size: 14px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 24px; }
.g-item { display: grid; grid-template-columns: 70px 1fr; gap: 14px; padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.g-item img { width: 70px; border-radius: 8px; aspect-ratio: 2/3; object-fit: cover; filter: saturate(.4) sepia(.3); }
.g-item h4 { margin: 0; font-size: 15px; }
.g-item .r { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.g-item .r b { color: var(--ruin); }
.g-item q { display: block; font: 15px/1.4 var(--marker); margin-top: 6px; quotes: '„' '“'; }
.center { text-align: center; }

/* ---------- Laden ---------- */
.loading-box { min-height: 60vh; display: grid; place-items: center; text-align: center; gap: 20px; }
.reel { width: 120px; height: 120px; border-radius: 50%; border: 8px solid var(--ink); position: relative; animation: spin 1.4s linear infinite; margin: 0 auto; }
.reel::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 22%, var(--bg) 13px, transparent 14px), radial-gradient(circle at 78% 62%, var(--bg) 13px, transparent 14px), radial-gradient(circle at 22% 62%, var(--bg) 13px, transparent 14px), radial-gradient(circle, var(--bg) 6px, var(--ink) 7px); border-radius: 50%; }
@keyframes spin { to { rotate: 360deg } }
.countdown { font: 800 160px/1 var(--display); color: var(--pop); animation: count 1s var(--ease) infinite; }
@keyframes count { from { transform: scale(1.6); opacity: 0 } 30% { opacity: 1 } to { transform: scale(.9); opacity: 0 } }

/* ---------- Reaktionen & Overlays ---------- */
.reactions[hidden] { display: none; }
.reactions { position: fixed; bottom: 18px; left: 50%; translate: -50% 0; z-index: 40; display: flex; gap: 4px; padding: 6px; border-radius: 99px; background: rgb(20 16 18 / .8); backdrop-filter: blur(16px); border: 1px solid var(--line2); }
.reactions button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; font-size: 24px; transition: transform .15s var(--spring); }
.reactions button:hover { transform: scale(1.3) translateY(-4px); }
.reactions button:active { transform: scale(.9); }
.floaters { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.floater { position: absolute; bottom: -40px; font-size: 38px; animation: float-up 2.6s var(--ease) forwards; filter: drop-shadow(0 4px 10px rgb(0 0 0 / .5)); }
@keyframes float-up { 0% { transform: translate(0, 0) scale(.5); opacity: 0 } 15% { opacity: 1; transform: translate(var(--dx1), -15vh) scale(1.2) } 100% { transform: translate(var(--dx2), -85vh) scale(.9) rotate(var(--rr)); opacity: 0 } }
.confetti { position: absolute; width: 10px; height: 16px; top: -20px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(var(--r)); } }
.toasts { position: fixed; top: 70px; left: 50%; translate: -50% 0; z-index: 60; display: grid; gap: 8px; }
.toast { padding: 12px 18px; border-radius: 12px; background: #2a1d21; border: 1px solid var(--line2); box-shadow: 0 10px 40px rgb(0 0 0 / .6); animation: pop-in .4s var(--spring) both; }
.toast.err { border-color: var(--ruin); }
.shake { animation: shake .5s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px) } 40%, 80% { transform: translateX(8px) } }

@media (max-width: 900px) {
  .home-grid, .lobby-grid, .write-grid, .reveal-grid, .film { grid-template-columns: 1fr; }
  .film .poster-wrap, .reveal .poster-wrap { max-width: 260px; margin: 0 auto; position: static; }
  .mini-film { position: static; grid-template-columns: 90px 1fr; align-items: start; }
  .mini-film .poster { grid-row: span 3; }
  .home-grid { min-height: auto; padding-top: 20px; }
  .brand { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
