:root {
  color-scheme: dark;
  --bg: #14111c;
  --field-surface: #171220;
  --panel: #201a2d;
  --edge: #3d3252;
  --purple: #c9b3fa;
  --muted: #b6aabb;
  --text: #f6f1fa;
  --lime: #dcfa78;
  --font: "Geist", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-family: var(--font);
  color: var(--text);
  background: #100d16;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
button, input, select, textarea { font: inherit; }
input, select, textarea { font-size: max(1em, 16px); }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .53; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.frame { width: 100%; max-width: 600px; min-height: 100svh; margin: 0 auto; background: var(--bg); border-inline: 1px solid #281e37; }
.head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 68px; padding: 12px 24px; border-bottom: 1px solid #2e263d; }
.frame > .head { position: sticky; top: 0; z-index: 2; background: var(--bg); }
.home-head { border-bottom: 0; }
.brand { color: var(--text); font-weight: 850; font-size: 1.3rem; letter-spacing: -.05em; background: transparent; border: 0; padding: 5px 0; }
.head a.brand, a.action { text-decoration: none; }
.text-button { color: var(--purple); font-weight: 720; background: transparent; border: 0; padding: 7px; text-decoration: underline; text-underline-offset: 4px; }
.hero { text-align: center; }
.hero-art { aspect-ratio: 1.74; margin: 0; background: linear-gradient(180deg, transparent 75%, var(--bg)), url('/ai-jinro/wolf.webp') center 47% / cover no-repeat; }
.hero h1 { font-size: clamp(3.1rem, 12vw, 5rem); letter-spacing: -.095em; margin: -.07em 0 0; font-weight: 920; line-height: 1.04; }
.hero p { margin: .65rem 0 1.8rem; color: var(--muted); font-weight: 720; font-size: 1.04rem; }
.menu { display: grid; gap: 12px; padding: 0 22px 28px; text-align: center; }
.private-room-entry { display: grid; gap: 4px; }
.action { width: 100%; min-height: 53px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--purple); color: var(--text); background: var(--panel); border-radius: 13px; padding: .63rem 1rem; font-weight: 780; }
.action.large { min-height: 62px; position: relative; font-size: clamp(1.02rem, 4.4vw, 1.24rem); }
.action.large > span[aria-hidden="true"] { position: absolute; right: 1rem; font-size: 1.34rem; }
.primary { color: #1c1b11; background: var(--lime); border-color: var(--lime); }
.action.subtle { border-color: var(--edge); }
.quota { color: var(--muted); margin: .3rem 0 0; font-size: .93rem; }
.quota strong { color: var(--lime); font-variant-numeric: tabular-nums; font-size: 1.06rem; }
.muted { color: var(--muted); }
.stats { display:flex; align-items:center; justify-content:center; gap: .5rem; color: var(--muted); }
.note { margin: 0; font-size: .83rem; color: var(--muted); line-height: 1.6; }
.body { padding: 23px 20px max(24px, env(safe-area-inset-bottom)); }
.panel { background: var(--panel); border: 1px solid var(--edge); border-radius: 13px; padding: 16px; }
.splash { margin: 24px; }
.stack { display: grid; gap: 14px; }
h1, h2, p { margin: 0; }
h1 { font-size: 1.72rem; }
h2 { font-size: 1.15rem; }
.form { display: grid; gap: 12px; }
.room-choice { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; padding: 4px; border: 1px solid var(--edge); border-radius: 12px; }
.room-choice button { min-height: 44px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 730; }
.room-choice button[aria-pressed="true"] { border-color: var(--edge); background: var(--panel); color: var(--text); }
.form label { display: grid; gap: 5px; font-size: .91rem; color: var(--muted); }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
select, .input { width: 100%; min-height: 43px; padding: 9px 12px; border: 1px solid var(--edge); background: var(--field-surface); color: var(--text); border-radius: 10px; }
[hidden] { display: none !important; }
.room-count { font-size: 2rem; color: var(--lime); font-weight: 850; font-variant-numeric: tabular-nums; }
.match-lobby-row { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: stretch; gap: 14px; }
.match-lobby-row > .stack { gap: 4px; }
.match-lobby-row .room-count { line-height: 1.1; }
.match-lobby-row .action { padding-inline: .5rem; font-size: clamp(.75rem, 4vw, 1rem); }
.match-schedule { display: grid; gap: 4px; }
.match-schedule-compact { text-align: center; }
.match-schedule.match-schedule-home { padding: 0 0 12px; }
.match-schedule-title { margin-block-end: 6px; border-radius: 12px 12px 0 0; }
.match-schedule-title:not(.action) { display: grid; place-items: center; min-height: 54px; padding: 8px 12px; font-size: clamp(1.02rem, 4.4vw, 1.24rem); background: var(--field-surface); border-bottom: 1px solid var(--edge); }
.match-schedule-home > :is(.kicker, .note) { margin-inline: 10px; }
.match-schedule-home .text-button { max-width: calc(100% - 20px); }
.match-schedule-times { white-space: nowrap; font-size: clamp(.5625rem, 4vw - 2px, .83rem); font-variant-numeric: tabular-nums; }
.match-schedule .text-button { justify-self: start; padding: 5px 0; font-size: .84rem; }
.match-schedule-compact .text-button { justify-self: center; }
.match-share-status { overflow-wrap: anywhere; }
.match-share-status:empty { display: none; }
.room-code { justify-self: start; padding: 3px 0; color: var(--text); font-size: 1.08rem; font-weight: 850; }
.kicker { color: var(--purple); font-weight: 730; font-size: .87rem; }
.game-open, .game-open body { overflow: hidden; overscroll-behavior: none; }
.game-open body { position: fixed; inset: 0; }
.frame.is-playing {
  position: fixed;
  inset-block-start: var(--game-top, 0px);
  inset-inline: 0;
  height: var(--game-height, 100dvh);
  min-height: 0;
  overflow: hidden;
}
.game-screen { height: 100%; min-height: 0; display: flex; flex-direction: column; }
.game-screen > :not(.chat-pane) { flex-shrink: 0; }
.game-screen .head { min-height: 40px; padding-block: 2px; }
.game-screen .brand { font-size: 1rem; }
.game-screen .mode { font-size: .85rem; }
.keyboard-open .game-screen .head { display: none; }
.mode { font-weight: 780; }
.rules-identity { display: flex; align-items: center; gap: 6px; font-size: 1.15rem; font-weight: 780; }
.status, .topic, .secret { margin: 5px 10px 0; padding: 5px 8px; }
.status, .topic { background: var(--field-surface); border: 0; border-radius: 10px; }
.status { position: relative; display: flex; align-items: center; gap: 7px; min-height: 36px; white-space: nowrap; padding-bottom: 8px; overflow: hidden; }
.status-top, .topic { display: flex; align-items: center; }
.status-top { flex: 0 0 auto; gap: 5px; font-size: .8rem; }
.status-end { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; margin-inline-start: auto; }
.clock { color: var(--lime); font-variant-numeric: tabular-nums; font-size: 1.62rem; font-weight: 850; line-height: 1; }
.status .clock { font-size: clamp(.97rem, 4vw, 1.22rem); }
.status.vote-starting { background: #302b21; box-shadow: inset 0 0 0 1px var(--lime); }
.vote-starting .status-top { color: var(--lime); }
.vote-tallying .status-top { color: var(--lime); }
.vote-starting .status-ai { display: none; }
.status-round, .status-ai { color: var(--muted); font-size: .74rem; }
.status-ai { flex: 0 0 auto; }
.progress { position: absolute; bottom: 2px; inset-inline: 8px; height: 3px; border-radius: 999px; background: #4c3e68; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.letters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.status .letters { flex-wrap: nowrap; gap: 3px; }
[data-seat="A"] { --seat-hue: 268; }
[data-seat="B"] { --seat-hue: 208; }
[data-seat="C"] { --seat-hue: 350; }
[data-seat="D"] { --seat-hue: 166; }
[data-seat="E"] { --seat-hue: 39; }
[data-seat="F"] { --seat-hue: 308; }
[data-seat="G"] { --seat-hue: 234; }
[data-seat="H"] { --seat-hue: 83; }
[data-seat] { --seat-tone: hsl(var(--seat-hue, 268) 37% 74%); --seat-surface: hsl(var(--seat-hue, 268) 19% 20%); }
.letter { --badge-fill: var(--seat-tone, #bca5e8); display: inline-grid; flex: 0 0 auto; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--badge-fill); color: #221331; font-size: .94rem; font-weight: 850; }
.status .letter { width: 20px; height: 20px; font-size: .72rem; }
.letter.removed { opacity: .4; }
.letter[data-presence="away"] { --badge-fill: #3b3547; color: #c2b8cd; opacity: 1; }
.status .letter[data-presence="away"] { --badge-fill: hsl(var(--seat-hue, 268) 33% 36%); color: #fff; }
.letter.wolf-letter { position: relative; isolation: isolate; background: transparent; }
.wolf-letter svg { position: absolute; inset-inline: 0; bottom: 0; z-index: -1; width: 100%; height: 112.5%; overflow: visible; fill: var(--badge-fill); pointer-events: none; }
.seat-button { display: inline-grid; flex: 0 0 auto; place-items: center; color: inherit; background: transparent; border: 0; padding: 0; min-height: 30px; border-radius: 50%; }
.status .seat-button { min-height: 22px; }
.seat-button[aria-pressed="true"] .letter { outline: 1px solid var(--lime); outline-offset: 1px; }
.seat-button[aria-pressed="true"] .wolf-letter { outline: none; }
.seat-button[aria-pressed="true"] .wolf-letter path { stroke: var(--lime); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.leave-debrief { min-height: 34px; border: 1px solid var(--edge); border-radius: 8px; padding: 2px 8px; background: var(--bg); color: var(--text); font-size: .8rem; }
.topic { gap: 8px; min-height: 32px; color: var(--text); text-align: start; font-size: .9rem; font-weight: 780; line-height: 1.4; }
.topic[aria-expanded="true"] { align-items: baseline; }
.topic .kicker { flex-shrink: 0; white-space: nowrap; font-size: .75rem; }
.topic-window { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
.topic-text { display: inline-block; width: max-content; }
.topic-arrow { flex: none; width: 7px; height: 7px; margin: 0 3px 3px; border: solid var(--purple); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.topic[aria-expanded="true"] .topic-arrow { transform: rotate(225deg); }
.topic[aria-expanded="true"] .topic-window { white-space: normal; overflow-wrap: anywhere; }
.topic[aria-expanded="true"] .topic-text { display: inline; width: auto; }
.topic-window.is-scrolling .topic-text { animation: topic-left var(--topic-duration, 5s) linear infinite; }
@supports (animation-timing-function: linear(0, 1)) {
  .topic-window.is-scrolling .topic-text { animation-timing-function: var(--topic-easing, linear); }
}
@keyframes topic-left {
  from { transform: translateX(0); }
  to { transform: translateX(var(--topic-shift)); }
}
@media (prefers-reduced-motion: reduce) {
  .topic-window.is-scrolling .topic-text { animation: none; }
}
.secret { color: var(--purple); font-size: .9rem; }
.chat-pane { position: relative; display: flex; flex: 1 1 auto; min-height: 0; margin-block-start: 7px; }
.chat { overflow: auto; overflow-anchor: none; overscroll-behavior: contain; flex: 1 1 auto; display: flex; flex-direction: column; gap: 7px; padding: 4px 11px 8px; min-height: 0; }
.new-messages { position: absolute; inset-inline-end: 14px; bottom: 10px; min-height: 40px; padding: 5px 13px; border: 1px solid var(--purple); border-radius: 999px; background: var(--panel); color: var(--text); font-weight: 750; }
.chat .empty { margin: auto 0; text-align: center; }
.line { display: flex; flex: 0 0 auto; align-items: flex-start; gap: 7px; }
.line.own { flex-direction: row-reverse; }
.bubble {
  background: var(--seat-surface, #302741);
  border: 1px solid var(--edge);
  border-inline-start: 2px solid var(--seat-tone, var(--purple));
  padding: 5px 9px;
  max-width: 86%;
  border-radius: 9px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.own .bubble { border-inline-start: 1px solid var(--edge); border-inline-end: 2px solid var(--seat-tone, var(--purple)); }
.line.addressed .bubble { border-color: var(--lime); background: #37352e; }
.ai-tag { display: inline-block; margin-inline-end: 6px; padding: 0 4px; border: 1px solid var(--edge); border-radius: 4px; color: var(--muted); background: var(--field-surface); font-size: .68rem; font-weight: 760; vertical-align: .1em; }
.reply-prefix { font-weight: 760; white-space: nowrap; color: var(--seat-tone, var(--purple)); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.chat-divider { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.chat-divider::before, .chat-divider::after { content: ""; flex: 1 1 auto; border-top: 1px solid var(--edge); }
.composer { display: flex; gap: 7px; border-top: 1px solid var(--edge); padding: 5px 10px max(5px, env(safe-area-inset-bottom)); }
.keyboard-open .composer { padding-bottom: 8px; }
.composer .input { flex: 1 1 auto; width: auto; min-width: 0; min-height: 44px; border: 0; }
.composer .input:focus { outline: none; box-shadow: none; }
.composer .send { display: inline-grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; padding: 0; border: 0; border-radius: 10px; background: var(--seat-tone, var(--purple)); color: #221331; }
.feedback-composer { border: 0; padding: 0; }
.feedback-list { list-style: none; margin: 0; padding: 0; }
.feedback-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.reply-chip { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; min-height: 44px; padding: 0 6px; color: var(--purple); font-weight: 730; border: 1px solid var(--edge); border-radius: 9px; background: var(--panel); }
.reply-chip .letter { width: 20px; height: 20px; font-size: .75rem; }
.composer p { align-self: center; }
.game-screen > .body { padding-block: 8px max(10px, env(safe-area-inset-bottom)); }
.vote-screen { container: vote / size; padding-block-end: env(safe-area-inset-bottom, 0px); }
.vote-screen > .chat-pane { flex: 1 1 0; }
.vote-screen > .vote-controls {
  --vote-height: 230px;
  flex: 0 0 var(--vote-height);
  min-block-size: 0;
  display: grid;
  grid-template-rows: 24px auto 56px 32px;
  align-content: start;
  gap: 10px;
  padding-block: 12px 19px;
  border-block-start: 1px solid var(--edge);
  background: var(--bg);
}
.vote-screen > .vote-controls-two-rows { --vote-height: 296px; }
.vote-screen > .vote-controls-waiting { --vote-height: 100px; grid-template-rows: 30px 32px; gap: 5px; }
.vote-controls h2 { line-height: 24px; }
.vote-controls .action { min-height: 56px; }
.vote-list { display: grid; grid-template-columns: repeat(var(--vote-columns), minmax(0, 1fr)); gap: 10px; }
.vote-list .action { position: relative; padding-inline: 0; }
.vote-list .letter { width: 32px; height: 32px; font-size: 1rem; }
.vote-check { display: none; position: absolute; inset-block-start: 4px; inset-inline-end: 5px; }
.vote-check .line-icon { display: block; width: 16px; height: 16px; stroke-width: 2.6; }
.vote-list .action[aria-pressed="true"] .vote-check { display: block; }
.vote-receipt { display: flex; align-items: center; gap: 8px; }
.vote-meta { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.vote-meta .text-button { font-size: .8rem; min-height: 32px; }
.vote-screen > .vote-review { flex: 0 1 132px; min-block-size: 0; overflow-y: auto; overscroll-behavior: contain; margin: 4px 11px; padding: 7px 10px; }
.vote-review h3 { font-size: .84rem; margin: 0 0 4px; color: var(--purple); }
.vote-review ol { margin: 0; padding-inline-start: 1.2em; font-size: .82rem; line-height: 1.45; overflow-wrap: anywhere; }
.vote-review li + li { margin-block-start: 3px; }
@container vote (max-height: 520px) {
  .vote-screen > .head { display: none; }
}
@container vote (max-height: 450px) {
  .vote-screen > .topic, .vote-screen > .secret { display: none; }
  .vote-screen > .vote-controls { max-block-size: calc(100% - 41px); overflow-y: auto; overscroll-behavior: contain; }
}
.result-own-score { margin-block-start: 4px; color: var(--muted); font-size: .94rem; }
.result-own-score strong { margin-inline-start: 4px; color: var(--lime); }
.result-tied-winners { margin-block-start: 5px; font-size: 1.05rem; font-weight: 700; }
.help-list { padding-left: 1.2rem; margin: 0; line-height: 1.8; }
.solo-rules { list-style: none; padding: 0; }
.solo-rules > li { display: grid; grid-template-columns: 2em minmax(0, 1fr); }
#feedback:not(:empty) { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 10px 14px; border-radius: 10px; border: 1px solid var(--purple); background: #292035; color: var(--text); z-index: 5; pointer-events: none; }
@media (max-width: 430px) {
  .head { padding-inline: 16px; }
  .match-schedule-compact { padding-inline: 10px; }
  .status { gap: 5px; padding-inline: 6px; }
  .status-end { gap: 5px; }
  .status .letters { gap: 2px; }
  .status .letter { width: 17px; height: 17px; font-size: .66rem; }
  .status-top { gap: 4px; font-size: .75rem; }
  .status-round, .status-ai { font-size: .68rem; }
}
@media (max-width: 340px) {
  .status { margin-inline: 8px; gap: 4px; }
  .status-top { font-size: .7rem; }
  .status .letter { width: 15px; height: 15px; }
}
@media (max-width: 600px) and (max-height: 430px) { .game-screen .head { display: none; } }
@media (max-width: 600px) { .composer-focused .game-screen .head, .game-screen:has(.composer .input:focus) .head { display: none; } }

/* 狼アイコンは見出しと同じ高さ。既存の紫・ライム配色は維持する。 */
.brand { display: inline-flex; align-items: center; gap: .32em; }
.brand img { display: block; width: 1.4em; height: 1.4em; object-fit: contain; flex: none; }
.account { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap: 4px 12px; color:var(--muted); font-size:.86rem; overflow-wrap:anywhere; }
.podium { display:grid; gap:10px; }
.award { display:flex; align-items:center; gap:10px; min-height:50px; border-radius:10px; padding:10px 12px; border:1px solid var(--edge); background:var(--field-surface); }
.award strong { flex:1; }
.award-symbol { display: inline-flex; flex: none; }
.award-1 .award-symbol { color: #f9cd62; }
.award-2 .award-symbol { color: #dfe3f5; }
.award-3 .award-symbol { color: #e2a580; }
.award-me { border-color:var(--purple); box-shadow:inset 0 0 0 1px var(--purple); }
.award-champion { background:linear-gradient(125deg, #3a2856, #59432d, #31253d); border-color:var(--lime); box-shadow:0 0 0 2px #dcfa7833, 0 0 22px #dcfa7833; }
.award-champion strong { color:var(--lime); font-size:1.12rem; }
@media (prefers-reduced-motion: no-preference) {
  .award-champion { animation:champion-glow 1.8s ease-in-out infinite alternate; }
  @keyframes champion-glow { from {box-shadow:0 0 0 2px #dcfa7833,0 0 8px #dcfa7822;} to {box-shadow:0 0 0 3px #dcfa7877,0 0 32px #dcfa7866;} }
}

/* 同じ狼耳の参加者アイコンを会話・結果・順位・投票先で共通使用 */
.award .letter, .vote-history .letter { flex-shrink: 0; }
.award strong { min-width: 0; }

.icon-label { display: inline-flex; align-items: center; gap: .42em; vertical-align: middle; }
.icon-label .line-icon { flex: none; width: 1em; height: 1em; }
.ai-reveal > p { display: flex; flex-wrap: wrap; align-items: center; gap: .55em; font-size: 1.15rem; font-weight: 780; }
.revealed-seats { display: inline-flex; gap: 8px; }
.revealed-seats .letter { width: 40px; height: 40px; font-size: 1.2rem; }
.reveal-first .revealed-seats { position: relative; }
.reveal-first .revealed-seats::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(ellipse, #ffe4a693 0%, #ffd27d37 42%, transparent 72%); opacity: 0; pointer-events: none; animation: reveal-light 1.4s ease-out both; }
@keyframes reveal-light {
  0% { opacity: 0; transform: scale(.65); }
  28%, 56% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.18); }
}
.detected-bot { color: var(--lime); }
.debrief-entry-top { min-height: 44px; }
.vote-history { width: 100%; table-layout: fixed; border-collapse: collapse; }
.vote-history th, .vote-history td { text-align: center; vertical-align: middle; padding: 14px 4px; }
.vote-history tbody tr { border-top: 1px solid var(--edge); }
.vote-history thead th { color: var(--muted); font-size: .85rem; padding-block: 8px; }
.vote-history thead th:nth-child(-n+2) { width: 31%; }
.result-voter, .result-vote { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 3px 6px; }
.result-voter { position: relative; }
.result-vote + .result-vote { margin-block-start: 5px; }
.result-voter-note { position: absolute; inset: calc(100% + 3px) 0 auto; font-size: .66rem; line-height: 1; font-weight: 650; white-space: nowrap; }
.result-total { white-space: nowrap; font-variant-numeric: tabular-nums; }
.vote-history .result-total { color: var(--lime); font-size: 1.04rem; }
.result-breakdown { display: grid; justify-items: center; gap: 1px; font-size: .73rem; line-height: 1.18; overflow-wrap: anywhere; margin-block-start: 3px; }
.celebration-rank-1 h1 { color: #f9cd62; }
.celebration-rank-2 h1 { color: #dfe3f5; }
.celebration-rank-3 h1 { color: #e2a580; }
.confetti { position: fixed; z-index: 4; inset: 0; max-width: 600px; margin-inline: auto; overflow: hidden; pointer-events: none; }
.confetti span { position: absolute; top: -12px; left: var(--x); width: 6px; height: 9px; opacity: .65; background: var(--paper); animation: paper-fall var(--fall-duration) linear var(--fall-delay) infinite; }
.confetti span:nth-child(3n) { width: 5px; height: 5px; border-radius: 50%; }
@keyframes paper-fall {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--drift), calc(100dvh + 16px), 0) rotate(var(--spin)); }
}
.result-fireworks {
  --firework-extent: min(100vw, 600px, 88dvh);
  position: fixed; z-index: 4; inset: 0 0 auto; max-width: 600px; height: min(62dvh, 440px);
  margin-inline: auto; overflow: hidden; pointer-events: none;
}
.frame:has(.result-fireworks) :is(.result-heading, .ai-reveal) > :is(h1, p, strong) {
  position: relative; z-index: 5; text-shadow: 0 1px 6px var(--bg);
}
.firework {
  --spark-delay: calc(var(--burst-delay) + 500ms);
  position: absolute; left: var(--burst-x); top: var(--burst-y);
}
.firework::before {
  content: ""; position: absolute; width: 5px; height: 34px; border-radius: 50%;
  background: linear-gradient(#fff9d9, var(--burst-color) 40%, transparent); box-shadow: 0 -3px 9px var(--burst-color);
  opacity: 0; animation: firework-rise 500ms var(--burst-delay) ease-out 1 both;
}
.firework::after {
  content: ""; position: absolute; width: clamp(18px, var(--burst-radius), 72px); aspect-ratio: 1;
  border-radius: 50%; background: radial-gradient(circle, #fffada, var(--burst-color) 28%, transparent 70%);
  opacity: 0; animation: firework-core 340ms var(--spark-delay) ease-out 1 both;
}
.firework i {
  position: absolute; width: clamp(5px, calc(var(--burst-radius) * .085), 15px); height: 3px; border-radius: 50%;
  background: linear-gradient(90deg, transparent, var(--spark-color) 57%, #fffbe5);
  box-shadow: 0 0 6px var(--spark-color); opacity: 0;
  animation: firework-burst var(--burst-duration) var(--spark-delay) ease-out 1 both;
}
.firework i:nth-child(3n) { height: 4px; }
@keyframes firework-rise {
  0% { opacity: 0; transform: translate(-50%, min(24dvh, 170px)); }
  25%, 85% { opacity: .95; }
  100% { opacity: 0; transform: translate(-50%, 0) scaleY(.4); }
}
@keyframes firework-core {
  0% { opacity: .8; transform: translate(-50%, -50%) scale(.24); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
}
@keyframes firework-burst {
  0% { opacity: 0; transform: rotate(var(--spark-angle)) scaleX(.3); }
  14% { opacity: 1; }
  56% { opacity: .92; transform: translate(var(--spark-x), var(--spark-y)) rotate(var(--spark-angle)); }
  100% { opacity: 0; transform: translate(var(--spark-x), calc(var(--spark-y) + 30px)) rotate(var(--spark-angle)) scale(.35); }
}
@media (prefers-reduced-motion: reduce) {
  .confetti span { animation: none; top: var(--static-y); left: var(--static-x); opacity: .45; transform: rotate(var(--spin)); }
  .reveal-first .revealed-seats::before { animation: none; opacity: .62; }
  .result-fireworks { display: none; }
}
