:root {
  --bg: #0b1030;
  --bg2: #151b4a;
  --ink: #f6f3ff;
  --mute: #aeb3df;
  --gold: #ffd34d;
  --gold2: #ffb21a;
  --line: rgba(255, 255, 255, .16);
  --card: rgba(255, 255, 255, .07);
  --red: #ff4d5e;
  --display: "Dela Gothic One", "Zen Kaku Gothic New", system-ui, sans-serif;
  --body: "Zen Kaku Gothic New", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif;
  --bar: 52px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(120% 80% at 50% -10%, #2a2f86 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 500;
  overflow-x: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* 客席のスポットライト */
.lights {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    conic-gradient(from 160deg at 12% -5%, transparent 0 8deg, rgba(255, 211, 77, .10) 12deg 20deg, transparent 26deg),
    conic-gradient(from 180deg at 88% -5%, transparent 0 12deg, rgba(120, 160, 255, .12) 16deg 24deg, transparent 30deg);
  animation: sway 9s ease-in-out infinite alternate;
}
@keyframes sway { to { transform: translateX(3%); } }

/* 上のバー */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: var(--bar); padding: 0 16px;
  background: rgba(8, 11, 36, .82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.home { color: var(--mute); text-decoration: none; font-size: 14px; white-space: nowrap; }
.home:hover { color: var(--ink); }
.bar__title { margin: 0; font-family: var(--display); font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bar__phase { margin: 0; color: var(--gold); font-weight: 700; font-size: 14px; white-space: nowrap; }
.bar__tools { margin-left: auto; display: flex; gap: 6px; }
.tool {
  display: inline-flex; align-items: center; gap: 4px;
  height: 34px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  font-size: 14px;
}
.tool span { font-size: 12px; }
.tool:hover { background: rgba(255, 255, 255, .14); }
.tool[aria-pressed="true"] { background: var(--gold); color: #1b1300; border-color: var(--gold); }
@media (max-width: 720px) {
  .tool span, .bar__title { display: none; }
  .tool { padding: 0 9px; }
}
@media (max-width: 520px) {
  .bar { gap: 8px; padding: 0 10px; }
  .home span, #full { display: none; }
  .bar__phase { font-size: 12px; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .bar__tools { gap: 4px; flex: none; }
  .tool { height: 32px; padding: 0 8px; }
}

main { position: relative; z-index: 1; }

/* 入力画面 */
.setup { padding: 28px 16px 64px; }
.setup__card {
  max-width: 720px; margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 40px) 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04));
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.kicker { margin: 0 0 6px; color: var(--gold); font-weight: 900; letter-spacing: .12em; font-size: 14px; }
h1 {
  margin: 0 0 12px;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(32px, 7vw, 54px); line-height: 1.12;
  background: linear-gradient(180deg, #fff 30%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .35));
}
.lead { margin: 0 0 22px; color: var(--mute); line-height: 1.8; }
.field { display: block; margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.field__label { display: block; margin: 0 0 8px; padding: 0; font-weight: 900; }
.field__label b { color: var(--gold); font-size: 1.25em; }
.field__label b.ok { color: #6dffaf; }
input[type="text"], textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--line); border-radius: 12px;
  font-size: 16px; line-height: 1.6;
  outline: none;
}
input[type="text"]:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 211, 77, .2); }
textarea { resize: vertical; min-height: 220px; }
.hint { margin: 8px 0 0; color: var(--mute); font-size: 14px; line-height: 1.7; }
.hint b { color: var(--gold); }
.problems { margin: 8px 0 0; padding: 0; list-style: none; }
.problems li { color: #ffb3bd; font-size: 14px; font-weight: 700; }
.problems li::before { content: "！ "; }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row--small { margin-top: 10px; }
.btn {
  min-height: 44px; padding: 8px 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  font-weight: 700;
}
.btn:hover { background: rgba(255, 255, 255, .16); }
.btn--small { min-height: 36px; padding: 4px 14px; font-size: 14px; }
.btn--gold { background: linear-gradient(180deg, var(--gold), var(--gold2)); color: #1b1300; border-color: transparent; }
.btn--gold:hover { filter: brightness(1.08); background: linear-gradient(180deg, var(--gold), var(--gold2)); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-height: 44px; padding: 6px 16px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  cursor: pointer; font-weight: 700;
}
.choice small { color: var(--mute); font-weight: 500; font-size: 12px; }
.choice input:checked + span { border-color: var(--gold); background: rgba(255, 211, 77, .14); box-shadow: inset 0 0 0 1px var(--gold); }
.choice input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.custom { margin-top: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; line-height: 1.6; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--gold); flex: none; }
.check--big {
  margin-top: 16px; padding: 16px 18px; gap: 14px;
  border: 2px solid rgba(255, 255, 255, .2); border-radius: 16px;
  background: rgba(255, 255, 255, .05);
  align-items: center;
}
.check--big input { width: 34px; height: 34px; margin: 0; }
.check--big span { display: grid; gap: 2px; }
.check--big b { font-size: clamp(18px, 3.2vw, 22px); }
.check--big small { color: var(--mute); font-size: 14px; line-height: 1.6; }
.check--big:has(input:checked) { border-color: var(--gold); background: rgba(255, 211, 77, .12); box-shadow: inset 0 0 0 1px var(--gold); }
.resume {
  margin: 0 0 24px; padding: 14px 16px;
  border: 1px solid rgba(255, 211, 77, .5); border-radius: 14px;
  background: rgba(255, 211, 77, .08);
}
.resume p { margin: 0 0 10px; font-weight: 700; }
.start {
  display: block; width: 100%;
  margin-top: 8px; padding: 18px;
  border: 0; border-radius: 18px;
  background: linear-gradient(180deg, #ff6b7a, #e0203c);
  box-shadow: 0 6px 0 #8c0f22, 0 18px 40px rgba(255, 60, 90, .35);
  font-family: var(--display); font-size: clamp(22px, 5vw, 30px); letter-spacing: .06em;
  color: #fff;
  transition: transform .08s, box-shadow .08s;
}
.start:hover { filter: brightness(1.06); }
.start:active { transform: translateY(4px); box-shadow: 0 2px 0 #8c0f22, 0 8px 20px rgba(255, 60, 90, .35); }
.start:disabled { filter: grayscale(.8) brightness(.7); cursor: not-allowed; transform: none; }
.fine { margin: 14px 0 0; color: var(--mute); font-size: 13px; text-align: center; }

/* 抽選の舞台 */
.stage {
  display: grid; gap: 18px;
  padding: 16px;
  max-width: 1500px; margin: 0 auto;
}
.stage[data-phase="teams"] { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.stage[data-phase="teams"] .machine { position: sticky; top: calc(var(--bar) + 16px); }
.stage[data-phase="bracket"] .machine { grid-template-columns: 180px minmax(0, 1fr) auto; grid-template-areas: "drum board pool" "drum draw pool"; }
.stage[data-phase="result"] .machine { display: none; }
@media (max-width: 900px) {
  .stage[data-phase="teams"] { grid-template-columns: 1fr; }
  .stage[data-phase="teams"] .machine, .stage[data-phase="bracket"] .machine { position: sticky; top: var(--bar); z-index: 5; }
  .team, .bslot { scroll-margin-top: 230px; }
  .stage[data-phase="bracket"] .machine { grid-template-columns: 110px minmax(0, 1fr); grid-template-areas: "drum board" "pool pool" "draw draw"; }
}

.machine {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "drum" "board" "draw";
  gap: 12px; align-items: center; justify-items: center;
  padding: 18px;
  background: linear-gradient(180deg, rgba(30, 36, 100, .92), rgba(14, 18, 56, .95));
  border: 2px solid rgba(255, 211, 77, .45);
  border-radius: 24px;
  box-shadow: 0 0 0 6px rgba(255, 211, 77, .06), 0 24px 60px rgba(0, 0, 0, .4);
}
@media (max-width: 900px) {
  .stage[data-phase="teams"] .machine { grid-template-columns: 96px minmax(0, 1fr); grid-template-areas: "drum board" "draw draw"; padding: 10px 12px; gap: 6px 10px; border-radius: 18px; }
}
.drum { grid-area: drum; width: 100%; max-width: 260px; overflow: visible; }
.drum__body { transform-origin: 100px 74px; transform-box: view-box; }
.machine.is-spinning .drum__body { animation: spin .5s linear infinite; }
.machine.is-slowing .drum__body { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ball { opacity: 0; }
.ball.is-out { animation: ballOut .7s cubic-bezier(.3, .6, .4, 1) forwards; }
@keyframes ballOut {
  0% { opacity: 1; transform: translate(118px, 112px) scale(.6); }
  45% { transform: translate(150px, 128px) scale(1); }
  70% { transform: translate(166px, 140px) scale(1); }
  100% { opacity: 1; transform: translate(172px, 141px) scale(1); }
}

.board {
  grid-area: board;
  width: 100%;
  padding: 14px 16px 12px;
  background: #050716;
  border: 3px solid var(--gold);
  border-radius: 16px;
  box-shadow: inset 0 0 30px rgba(255, 211, 77, .15), 0 0 24px rgba(255, 211, 77, .25);
  text-align: center;
  overflow: hidden;
}
.board__label { margin: 0; font-weight: 900; color: var(--gold); font-size: clamp(14px, 1.6vw, 20px); min-height: 1.5em; }
.board__label .tchip { display: inline-block; padding: 0 .5em; border-radius: 6px; background: var(--c); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.board__name {
  margin: 4px 0;
  font-family: var(--display);
  font-size: clamp(34px, 5.4vw, 76px); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 255, 255, .35);
}
.board__name.is-rolling { color: #cfd4ff; filter: blur(.4px); }
.board__name.is-tease { animation: tease .5s ease-in-out; }
.board__name.is-hit { color: var(--hit, var(--gold)); animation: hit .6s cubic-bezier(.2, 1.6, .4, 1); text-shadow: 0 0 26px var(--hit, var(--gold)), 0 3px 0 rgba(0, 0, 0, .5); }
@keyframes tease { 0%, 100% { transform: none; } 30% { transform: translateX(-6px) rotate(-2deg); } 60% { transform: translateX(6px) rotate(2deg); } }
@keyframes hit { 0% { transform: scale(.4); } 100% { transform: scale(1); } }
.board__sub { margin: 0; color: var(--mute); font-weight: 700; min-height: 1.5em; font-size: clamp(13px, 1.4vw, 18px); }
@media (max-width: 900px) {
  .board { padding: 8px 10px; }
  .board__name { font-size: clamp(28px, 9vw, 44px); }
}

.draw {
  grid-area: draw;
  display: flex; flex-direction: column; align-items: center;
  width: min(100%, 360px);
  padding: 12px 24px 10px;
  border: 0; border-radius: 999px;
  background: linear-gradient(180deg, #ff6b7a, #e0203c);
  box-shadow: 0 6px 0 #8c0f22, 0 0 0 0 rgba(255, 90, 110, .6);
  font-family: var(--display); font-size: 28px; color: #fff;
  animation: pulse 1.3s ease-out infinite;
}
.draw small { font-family: var(--body); font-size: 12px; opacity: .8; }
.draw:active { transform: translateY(4px); box-shadow: 0 2px 0 #8c0f22; }
@keyframes pulse { 70% { box-shadow: 0 6px 0 #8c0f22, 0 0 0 18px rgba(255, 90, 110, 0); } }

.pool { grid-area: pool; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 260px; }
.pool span { padding: 3px 10px; border-radius: 999px; background: var(--c); color: #fff; font-weight: 900; font-size: 13px; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.pool span.is-used { opacity: .18; }
.pool span.is-now { outline: 3px solid #fff; animation: bob .6s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-3px); } }

/* チーム */
.teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 1200px) { .stage[data-phase="teams"] .teams { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stage[data-phase="bracket"] .teams { display: none; }
.stage[data-phase="result"] .teams { grid-template-columns: repeat(4, minmax(0, 1fr)); order: 3; }
@media (max-width: 900px) { .stage[data-phase="result"] .teams { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .teams { gap: 8px; } }
.team {
  position: relative;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, transparent), rgba(255, 255, 255, .04));
  border: 2px solid color-mix(in srgb, var(--c) 55%, transparent);
  border-radius: 16px;
  transition: transform .25s, box-shadow .25s;
}
.team.is-now { transform: scale(1.03); box-shadow: 0 0 0 3px var(--c), 0 0 30px color-mix(in srgb, var(--c) 60%, transparent); z-index: 2; }
.team__name {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 8px;
  font-family: var(--display); font-weight: 400; font-size: clamp(15px, 1.5vw, 20px);
}
.team__name::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); flex: none; }
.seats { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.seat {
  min-height: 38px;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .28);
  border: 1px dashed rgba(255, 255, 255, .22);
  font-weight: 900; font-size: clamp(15px, 1.5vw, 19px);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.seat:empty::before { content: "？"; color: rgba(255, 255, 255, .25); }
.seat.is-next { border-color: #fff; border-style: solid; animation: blink .7s steps(2) infinite; }
@keyframes blink { 50% { background: rgba(255, 255, 255, .14); } }
.seat.is-filled { border-style: solid; border-color: color-mix(in srgb, var(--c) 70%, transparent); background: rgba(0, 0, 0, .4); animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
.seat .star { color: var(--gold); }
@keyframes pop { from { transform: scale(.7); } to { transform: scale(1); } }
.stamp {
  position: absolute; right: 8px; top: 6px;
  padding: 2px 10px;
  border: 3px solid var(--gold); border-radius: 8px;
  color: var(--gold); font-family: var(--display); font-size: 15px;
  transform: rotate(-10deg);
  animation: stamp .45s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes stamp { from { transform: rotate(-10deg) scale(2.6); opacity: 0; } to { transform: rotate(-10deg) scale(1); opacity: 1; } }
.stage[data-phase="result"] .stamp { display: none; }

/* 飛んでいく名前 */
.flyer {
  position: fixed; z-index: 30; pointer-events: none;
  margin: 0;
  font-family: var(--display); color: var(--c, #fff);
  white-space: nowrap;
  text-shadow: 0 0 16px var(--c, #fff);
  transform-origin: 0 0;
}

/* トーナメント表 */
.bracket-wrap { grid-column: 1 / -1; }
.bracket-note { margin: 0 0 10px; text-align: center; color: var(--mute); font-weight: 700; }
.bracket {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-areas: "m0 m4 m6 m5 m2" "m1 m4 m6 m5 m3";
  column-gap: clamp(18px, 3vw, 48px); row-gap: 18px;
  align-items: center;
}
.lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.lines path { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 3; stroke-linejoin: round; }
.lines path.won { stroke: var(--gold); stroke-width: 5; filter: drop-shadow(0 0 6px var(--gold)); }
.match {
  position: relative; z-index: 1;
  display: grid; gap: 6px;
  padding: 8px;
  background: rgba(8, 11, 36, .85);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.match__label { margin: 0 2px; font-size: 12px; color: var(--mute); font-weight: 900; letter-spacing: .08em; }
.final { grid-area: m6; display: grid; gap: 12px; }
.final .match { border: 2px solid var(--gold); box-shadow: 0 0 30px rgba(255, 211, 77, .2); }
.final .match__label { color: var(--gold); font-size: 14px; }
.champ {
  text-align: center;
  padding: 10px 8px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 211, 77, .35), transparent 70%);
}
.champ__cup { display: block; font-size: clamp(36px, 4vw, 60px); line-height: 1; filter: grayscale(1) opacity(.4); }
.champ__name { display: block; margin-top: 4px; font-family: var(--display); font-size: clamp(16px, 1.7vw, 24px); color: var(--mute); }
.champ.is-set .champ__cup { filter: none; animation: hit .7s cubic-bezier(.2, 1.6, .4, 1); }
.champ.is-set .champ__name { color: var(--gold); text-shadow: 0 0 18px rgba(255, 211, 77, .6); }
.bslot {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 8px;
  min-height: 46px; width: 100%;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  text-align: left;
  cursor: default;
  transition: background .2s, opacity .2s, transform .15s;
}
.bslot__chip { width: 12px; height: 28px; border-radius: 4px; background: var(--c, rgba(255, 255, 255, .15)); grid-row: span 2; }
.bslot__name { font-weight: 900; font-size: clamp(14px, 1.3vw, 18px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bslot__mem { font-size: 12px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bslot.is-empty .bslot__name { color: rgba(255, 255, 255, .3); font-weight: 700; font-size: 13px; }
.bslot.is-roulette { background: #fff; box-shadow: 0 0 20px #fff; }
.bslot.is-roulette .bslot__name { color: #111; }
.bslot.is-placed { animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); background: color-mix(in srgb, var(--c) 30%, transparent); }
.stage[data-phase="result"] .bslot.is-ready { cursor: pointer; }
.stage[data-phase="result"] .bslot.is-ready:hover { background: rgba(255, 255, 255, .14); transform: translateX(2px); }
.bslot.is-win { background: color-mix(in srgb, var(--c) 40%, transparent); border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
.bslot.is-win .bslot__name::after { content: " 勝"; color: var(--gold); font-size: .8em; }
.bslot.is-lose { opacity: .38; }
@media (max-width: 1000px) {
  .bracket { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "m0 m1" "m2 m3" "m4 m5" "m6 m6"; }
  .lines { display: none; }
  .final { max-width: 420px; width: 100%; justify-self: center; }
}
@media (max-width: 520px) {
  .bracket { grid-template-columns: 1fr; grid-template-areas: "m0" "m1" "m2" "m3" "m4" "m5" "m6"; }
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; order: 2; }

/* 大きい帯の文字 */
.banner {
  position: fixed; left: 0; right: 0; top: 50%; z-index: 40;
  margin: 0; padding: 18px 16px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, rgba(200, 20, 50, .95) 12%, rgba(200, 20, 50, .95) 88%, transparent);
  text-align: center; pointer-events: none;
  animation: sweep var(--dur, 1.4s) cubic-bezier(.2, .8, .2, 1) both;
}
.banner__small { margin: 0; color: var(--gold); font-weight: 900; letter-spacing: .3em; font-size: clamp(14px, 2vw, 22px); }
.banner__big { margin: 0; font-family: var(--display); font-size: clamp(34px, 8vw, 96px); line-height: 1.15; text-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
@keyframes sweep {
  0% { transform: translate(-110%, -50%) skewX(-12deg); }
  18% { transform: translate(0, -50%) skewX(0); }
  82% { transform: translate(0, -50%) skewX(0); opacity: 1; }
  100% { transform: translate(110%, -50%) skewX(12deg); opacity: 0; }
}

.vs {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-content: center; justify-items: center; gap: 4px;
  background: radial-gradient(circle, rgba(6, 8, 28, .9), rgba(0, 0, 0, .96));
  pointer-events: none; text-align: center;
  animation: fade var(--dur, 1.6s) both;
}
.vs p { margin: 0; }
.vs__match { color: var(--gold); font-weight: 900; letter-spacing: .25em; font-size: clamp(16px, 2.4vw, 26px); }
.vs__a, .vs__b { font-family: var(--display); font-size: clamp(34px, 7vw, 90px); color: var(--c); text-shadow: 0 0 30px var(--c), 0 4px 0 rgba(0, 0, 0, .5); }
.vs__a { animation: inL .45s cubic-bezier(.2, 1.3, .4, 1) both; }
.vs__b { animation: inR .45s .12s cubic-bezier(.2, 1.3, .4, 1) both; }
.vs__mark { font-family: var(--display); font-size: clamp(30px, 5vw, 64px); color: #fff; font-style: italic; animation: hit .5s .25s both; }
@keyframes inL { from { transform: translateX(-60vw) skewX(-20deg); } }
@keyframes inR { from { transform: translateX(60vw) skewX(20deg); } }
@keyframes fade { 0% { opacity: 0; } 10%, 85% { opacity: 1; } 100% { opacity: 0; } }

.flash { position: fixed; inset: 0; z-index: 35; pointer-events: none; background: #fff; opacity: 0; }
.flash.is-on { animation: flash .35s ease-out; }
@keyframes flash { from { opacity: .55; } to { opacity: 0; } }
.shake { animation: shake .35s; }
@keyframes shake { 20% { transform: translate(-5px, 2px); } 40% { transform: translate(4px, -3px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, 2px); } }

.fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 45; pointer-events: none; }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50;
  transform: translateX(-50%);
  margin: 0; padding: 10px 18px;
  border-radius: 999px;
  background: #fff; color: #111; font-weight: 900;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

/* サイト共通の説明（worker が差し込む）を舞台の下に置く */
#wakame-guide { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .lights, .draw, .seat.is-next, .pool span.is-now { animation: none; }
  .shake { animation: none; }
  .flash.is-on { animation: none; }
  .banner { animation-name: fade; }
}

/* アイコン（任意） */
.face {
  display: inline-grid; place-items: center; flex: none;
  width: 1.6em; height: 1.6em;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 2px var(--c, rgba(255, 255, 255, .5));
  font-family: var(--body); font-weight: 900; font-size: 1em; line-height: 1; color: #fff;
  vertical-align: middle;
}
.face--none { font-size: .8em; width: 2em; height: 2em; }
.seat .face { width: 28px; height: 28px; font-size: 13px; }
.bslot__mem { display: flex; align-items: center; gap: 4px; }
.bslot__mem .face { width: 20px; height: 20px; font-size: 10px; box-shadow: 0 0 0 1px var(--c, #fff); }
.bslot__mem .face + .face { margin-left: -8px; }
.bslot__mem span.names { margin-left: 4px; overflow: hidden; text-overflow: ellipsis; }
.vs__faces { display: flex; justify-content: center; gap: 10px; margin: 2px 0 6px !important; }
.vs__faces .face { width: clamp(44px, 7vw, 84px); height: clamp(44px, 7vw, 84px); font-size: clamp(18px, 2.6vw, 30px); box-shadow: 0 0 0 3px var(--c), 0 0 24px var(--c); animation: hit .5s .3s cubic-bezier(.2, 1.6, .4, 1) both; }
.flyer .face { width: 1.3em; height: 1.3em; margin-right: .25em; }

.board__face {
  width: clamp(72px, 9vw, 132px); height: clamp(72px, 9vw, 132px);
  margin: 6px auto 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08) center / cover no-repeat;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .35);
  font-family: var(--display); font-size: clamp(28px, 4vw, 52px); color: rgba(255, 255, 255, .55);
}
.board__face.is-hit { box-shadow: 0 0 0 5px var(--hit, var(--gold)), 0 0 40px var(--hit, var(--gold)); animation: hit .6s cubic-bezier(.2, 1.6, .4, 1); }
.board__face.is-rolling { filter: saturate(.7) brightness(.85); }
@media (max-width: 900px) { .board__face { width: 56px; height: 56px; font-size: 24px; margin-top: 2px; } }

.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.icon-cell { position: relative; display: grid; justify-items: center; gap: 4px; }
.icon-pick {
  width: 64px; height: 64px; padding: 0;
  border: 2px dashed rgba(255, 255, 255, .3); border-radius: 50%;
  background: rgba(0, 0, 0, .25);
  display: grid; place-items: center;
  overflow: hidden;
  font-weight: 900; font-size: 22px; color: rgba(255, 255, 255, .5);
}
.icon-pick img { width: 100%; height: 100%; object-fit: cover; }
.icon-pick.has-img { border: 2px solid var(--gold); }
.icon-pick:hover, .icon-pick.is-drop { border-color: #fff; background: rgba(255, 255, 255, .12); }
.icon-pick:focus-visible, .icon-pick.is-target { outline: 3px solid var(--gold); outline-offset: 3px; }
.icon-name { max-width: 100%; font-size: 12px; font-weight: 700; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-del {
  position: absolute; top: -4px; right: calc(50% - 40px);
  width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 50%;
  background: #e0203c; color: #fff; font-size: 14px; line-height: 1;
}
.field__label small { color: var(--mute); font-weight: 500; }
.leader-tog {
  position: absolute; top: -4px; left: calc(50% - 40px);
  width: 26px; height: 26px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%;
  background: rgba(8, 11, 36, .9); color: rgba(255, 255, 255, .6);
  font-size: 15px; line-height: 1;
}
.leader-tog:hover { color: var(--gold); border-color: var(--gold); }
.leader-tog[aria-pressed="true"] { background: var(--gold); color: #1b1300; border-color: var(--gold); box-shadow: 0 0 10px rgba(255, 211, 77, .6); }
.leader-tog:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
