:root {
  --table-deep: #22020a;
  --ink: #1e1a2e;
  --gold: #ffc83d;
  --gold-dark: #b8861a;
  --teal: #19c3b1;
  --teal-dark: #0f8478;
  --rose: #ff4d6d;
  --rose-dark: #a3243b;
  --cream-text: #fbefef;
  --muted: #d9b8bd;
  --pad: #fff3a6;
  --pad-line: #8fb8de;
  --pad-margin: #ff7a7a;
  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--body);
  color: var(--cream-text);
  background:
    radial-gradient(ellipse at 30% 20%, #6d0b1c 0%, transparent 60%),
    radial-gradient(ellipse at 80% 90%, #3a0410 0%, transparent 55%),
    var(--table-deep);
  background-attachment: fixed;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-x: hidden;
}
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
input, select { font: inherit; }

/* buttons */
.btn {
  font-family: var(--display); font-size: 1.05rem; letter-spacing: .02em;
  color: var(--ink); background: var(--gold);
  border: 0; border-radius: 14px; padding: .7em 1.2em;
  box-shadow: 0 4px 0 var(--gold-dark);
  transition: transform .08s, box-shadow .08s;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-dark); }
.btn.alt { background: var(--teal); box-shadow: 0 4px 0 var(--teal-dark); color: #fff; }
.btn.alt:active:not(:disabled) { box-shadow: 0 1px 0 var(--teal-dark); }
.btn.danger { background: var(--rose); box-shadow: 0 4px 0 var(--rose-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--cream-text); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.btn.big { font-size: 1.4rem; padding: .65em 1.4em; }
.btn.small { font-size: .82rem; padding: .45em .8em; border-radius: 10px; box-shadow: 0 3px 0 var(--gold-dark); }
.btn.small.alt { box-shadow: 0 3px 0 var(--teal-dark); }
.btn.small.danger { box-shadow: 0 3px 0 var(--rose-dark); }
.btn.small.ghost { box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* sticker logo */
.sticker {
  font-family: var(--display); line-height: .9; color: var(--gold);
  -webkit-text-stroke: .045em var(--ink); paint-order: stroke fill;
  text-shadow:
    .05em .05em 0 #fff, -.05em .05em 0 #fff, .05em -.05em 0 #fff, -.05em -.05em 0 #fff,
    0 .07em 0 #fff, 0 -.07em 0 #fff, .07em 0 0 #fff, -.07em 0 0 #fff,
    .1em .14em 0 rgba(0,0,0,.35);
  transform: rotate(-7deg); display: inline-block;
}
.sticker .line2 { display: block; color: var(--teal); margin-left: .6em; }

/* home */
.home { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.home-card { width: min(440px, 100%); text-align: center; }
.home .sticker { font-size: clamp(3.4rem, 14vw, 5.8rem); margin-bottom: 1.4rem; }
.home p.lede { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.8rem; line-height: 1.5; }
.field { width: 100%; border: 0; border-radius: 14px; padding: .85em 1em; font-size: 1.05rem; font-weight: 800; background: rgba(255,255,255,.95); color: var(--ink); }
.field::placeholder { color: #8b8697; font-weight: 700; }
.stack { display: grid; gap: .8rem; }
.or { color: var(--muted); margin: 1.2rem 0 .8rem; font-weight: 700; }
.joinrow { display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
.joinrow .field { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-family: var(--display); }
.hint { color: var(--muted); font-size: .9rem; font-weight: 700; }

/* lobby */
.lobby { max-width: 1000px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.lobby-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.lobby-head .sticker { font-size: 2.6rem; }
.code-box { text-align: right; }
.code-box .code { font-family: var(--display); font-size: 3.2rem; letter-spacing: .12em; color: #fff; line-height: 1; }
.code-box small { color: var(--muted); display: block; margin-bottom: .3rem; font-weight: 700; }
.seats { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; margin: 2rem 0; }
@media (max-width: 760px) { .seats { grid-template-columns: repeat(3, 1fr); } }
.seat { background: rgba(255,255,255,.07); border-radius: 18px; padding: 1rem .6rem .8rem; text-align: center; position: relative; min-height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; }
.seat.me { box-shadow: inset 0 0 0 3px var(--gold); }
.seat.empty { background: transparent; border: 2px dashed rgba(255,255,255,.18); color: var(--muted); font-weight: 700; }
.seat .nm { font-weight: 900; word-break: break-word; }
.seat .tag { font-size: .78rem; color: var(--muted); font-weight: 700; }
.seat .x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 1.05rem; }
.offline { opacity: .5; }
.av { display: inline-grid; place-items: center; border-radius: 50%; background: var(--pc, #888); box-shadow: inset 0 -4px 0 rgba(0,0,0,.2), 0 0 0 3px #fff; line-height: 1; flex: none; }
.seat .av { width: 58px; height: 58px; font-size: 32px; }
.lobby-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.2rem; }
@media (max-width: 760px) { .lobby-grid { grid-template-columns: 1fr; } }
.panel { background: rgba(0,0,0,.25); border-radius: 18px; padding: 1.1rem 1.2rem; }
.panel h3 { font-family: var(--display); font-weight: 400; font-size: 1.3rem; margin: 0 0 .8rem; color: #fff; }
.pick { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .9rem; }
.pick button { width: 46px; height: 46px; border-radius: 50%; border: 0; font-size: 24px; background: rgba(255,255,255,.12); display: grid; place-items: center; padding: 0; }
.pick button.on { box-shadow: 0 0 0 3px var(--gold); background: rgba(255,255,255,.25); }
.pick button.taken { opacity: .25; }
.pick.colors button { width: 34px; height: 34px; }
.rule { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.rule:last-child { border-bottom: 0; }
.rule span small { display: block; color: var(--muted); font-weight: 600; font-size: .82rem; }
.rule select { border-radius: 10px; border: 0; padding: .35em .5em; font-weight: 800; }
.switch { width: 46px; height: 26px; border-radius: 99px; border: 0; background: rgba(255,255,255,.2); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch.on { background: var(--teal); }
.switch.on::after { transform: translateX(20px); }
.start-row { margin-top: 1.4rem; display: flex; gap: .8rem; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.how { margin: 0; padding-left: 1.2rem; line-height: 1.55; color: #f3dfe2; font-weight: 600; }
.how li { margin-bottom: .3rem; }

/* ---------- game layout ---------- */
.table { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; padding: 12px; min-height: 100vh; max-width: 1400px; margin: 0 auto; }
.stage { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.side { display: flex; flex-direction: column; gap: 10px; position: sticky; top: 12px; height: calc(100vh - 24px); font-size: .9rem; }
@media (max-width: 900px) {
  .table { grid-template-columns: 1fr; padding: 8px; }
  .side { position: static; height: auto; }
  .feed { height: 220px; flex: none; }
}

/* top bar: die, timer, round */
.topline {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1rem;
  background: rgba(0,0,0,.3); border-radius: 22px; padding: .7rem 1.1rem;
}
.round-info { display: grid; gap: .15rem; }
.round-info .big { font-family: var(--display); font-size: 1.6rem; color: #fff; line-height: 1.1; }
.round-info .sub { color: var(--muted); font-weight: 800; }
@media (max-width: 900px) { .topline { position: sticky; top: 6px; z-index: 20; backdrop-filter: blur(6px); background: rgba(40,3,12,.85); } }

/* the letter die — the star of the show */
.die20 { --s: 96px; width: var(--s); height: var(--s); position: relative; flex: none; filter: drop-shadow(0 8px 10px rgba(0,0,0,.5)); }
.die20 svg { width: 100%; height: 100%; display: block; }
.die20 .let {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-size: calc(var(--s) * .46); color: #fff;
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill;
  text-shadow: 0 3px 0 rgba(0,0,0,.35);
  padding-top: calc(var(--s) * .04);
}
.die20.rolling { animation: dieTumble .25s linear infinite; }
.die20.landed { animation: dieLand .6s cubic-bezier(.2,1.6,.4,1); }
@keyframes dieTumble { 0% { transform: rotate(0) translateY(0); } 25% { transform: rotate(14deg) translateY(-6px); } 50% { transform: rotate(-10deg) translateY(2px); } 75% { transform: rotate(8deg) translateY(-3px); } 100% { transform: rotate(0); } }
@keyframes dieLand { 0% { transform: scale(1.4) rotate(-20deg); } 60% { transform: scale(.92) rotate(4deg); } 100% { transform: none; } }

/* timer ring */
.timer { --s: 84px; width: var(--s); height: var(--s); position: relative; flex: none; }
.timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer .track { stroke: rgba(255,255,255,.12); }
.timer .arc { stroke: var(--teal); transition: stroke-dashoffset .25s linear, stroke .3s; }
.timer.low .arc { stroke: var(--rose); }
.timer .num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 1.7rem; color: #fff; }
.timer.low .num { color: var(--rose); animation: beat 1s ease-in-out infinite; }
.timer.idle .num { font-size: 1rem; color: var(--muted); }
@keyframes beat { 50% { transform: scale(1.15); } }

/* legal pad */
.pad {
  background: var(--pad);
  color: var(--ink);
  border-radius: 6px 6px 14px 14px;
  box-shadow: 0 0 0 2px rgba(0,0,0,.25), 0 22px 50px rgba(0,0,0,.5);
  position: relative;
  overflow: hidden;
}
.pad-top {
  background: linear-gradient(180deg, #e2384f, #b81f36);
  color: #fff; padding: .75rem 1.2rem .65rem 3.8rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  border-bottom: 3px solid #7d1022;
  font-family: var(--display); font-size: 1.15rem;
}
.pad-top .letter-tag { background: #fff; color: var(--rose-dark); border-radius: 8px; padding: .1rem .55rem; }
.pad-lines { position: relative; padding: .3rem 0 .6rem; }
.pad-lines::before { content: ""; position: absolute; top: 0; bottom: 0; left: 3rem; width: 2px; background: var(--pad-margin); opacity: .8; }
.line {
  display: grid; grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1.25fr); align-items: end; gap: .8rem;
  padding: .55rem 1.2rem .25rem 0;
  border-bottom: 1.5px solid var(--pad-line);
  min-height: 3.1rem;
}
.line .n { text-align: center; font-family: var(--display); font-size: 1.05rem; color: var(--rose-dark); align-self: center; }
.line .cat { font-weight: 800; font-size: 1rem; line-height: 1.2; padding-bottom: .35rem; }
.line input {
  width: 100%; border: 0; background: transparent; outline: none;
  font-family: var(--hand); font-size: 1.85rem; font-weight: 700; color: #1b3d8f;
  padding: 0 .2rem; line-height: 1.1;
}
.line input:focus { background: rgba(255,255,255,.45); border-radius: 6px; }
.line input:disabled { color: #4a5a85; }
.line.wrong input { color: var(--rose-dark); text-decoration: line-through wavy rgba(163,36,59,.6); }
@media (max-width: 620px) {
  .line { grid-template-columns: 2.4rem 1fr; }
  .line .cat { grid-column: 2; padding-bottom: 0; }
  .line input { grid-column: 2; }
  .pad-lines::before { left: 2.4rem; }
  .pad-top { padding-left: 3rem; }
}
.pad-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.2rem 1.1rem; background: rgba(0,0,0,.04); }
.pad-foot .hint { color: #6b5a2a; }
.pad.locked .pad-lines { filter: saturate(.6); }

/* rolling banner */
.rollcard { text-align: center; padding: 3rem 1rem; background: rgba(0,0,0,.3); border-radius: 22px; }
.rollcard .die20 { --s: 190px; margin: 0 auto 1rem; }
.rollcard h2 { font-family: var(--display); font-weight: 400; font-size: 2rem; margin: 0; color: #fff; }
.rollcard p { color: var(--muted); font-weight: 800; margin: .4rem 0 0; }

/* review */
.review { background: rgba(0,0,0,.3); border-radius: 22px; padding: 1.2rem; }
.rv-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.rv-head .die20 { --s: 70px; }
.rv-cat { font-family: var(--display); font-size: clamp(1.5rem, 3.4vw, 2.3rem); color: #fff; line-height: 1.05; }
.rv-count { color: var(--muted); font-weight: 800; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 1rem; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.15); }
.dots i.on { background: var(--gold); box-shadow: 0 0 0 3px rgba(255,200,61,.3); }
.dots i.done { background: var(--teal); }
.answers { display: grid; gap: .55rem; }
.ans {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .8rem;
  background: var(--pad); color: var(--ink); border-radius: 12px; padding: .55rem .8rem;
  box-shadow: 0 3px 0 rgba(0,0,0,.25);
  animation: ansIn .35s cubic-bezier(.2,1.3,.4,1) both;
}
.ans .av { width: 36px; height: 36px; font-size: 20px; box-shadow: 0 0 0 2px #fff; }
.ans .who { font-weight: 900; font-size: .85rem; color: #6b5a2a; }
.ans .txt { font-family: var(--hand); font-size: 1.9rem; font-weight: 700; color: #1b3d8f; line-height: 1; overflow-wrap: anywhere; }
.ans .txt.empty { color: #a49663; font-size: 1.3rem; }
.ans.bad .txt { color: #8a8a8a; text-decoration: line-through; }
.badge { font-family: var(--display); font-size: .95rem; border-radius: 99px; padding: .3rem .7rem; white-space: nowrap; color: #fff; }
.badge.ok { background: var(--teal-dark); }
.badge.dupe { background: #7b5cd6; }
.badge.letter, .badge.rejected { background: var(--rose-dark); }
.badge.blank { background: #8d8670; }
.vote { border: 0; border-radius: 99px; padding: .35rem .7rem; font-weight: 900; background: rgba(30,26,46,.12); color: var(--ink); white-space: nowrap; }
.vote.on { background: var(--rose); color: #fff; }
.vote:disabled { opacity: .35; }
@keyframes ansIn { from { opacity: 0; transform: translateX(-16px) rotate(-1deg); } }
@media (max-width: 620px) {
  .ans { grid-template-columns: auto 1fr; }
  .ans .badge, .ans .vote { justify-self: start; }
}
.rv-nav { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 1.2rem; }

/* scores */
.scores { background: rgba(0,0,0,.3); border-radius: 22px; padding: 1.2rem; }
.scores h2 { font-family: var(--display); font-weight: 400; font-size: 2rem; margin: 0 0 1rem; color: #fff; }
.rank { display: grid; gap: .5rem; }
.rk { display: grid; grid-template-columns: 2rem auto 1fr auto auto; align-items: center; gap: .8rem; background: rgba(255,255,255,.08); border-radius: 14px; padding: .55rem .9rem; animation: ansIn .4s both; }
.rk .pos { font-family: var(--display); font-size: 1.3rem; color: var(--gold); text-align: center; }
.rk .av { width: 40px; height: 40px; font-size: 22px; }
.rk .nm { font-weight: 900; font-size: 1.05rem; }
.rk .plus { font-family: var(--display); color: var(--teal); font-size: 1.2rem; }
.rk .tot { font-family: var(--display); font-size: 1.6rem; color: #fff; min-width: 2.5ch; text-align: right; }
.grid-wrap { overflow-x: auto; margin-top: 1.2rem; border-radius: 14px; }
.agrid { border-collapse: collapse; min-width: 100%; background: var(--pad); color: var(--ink); }
.agrid th, .agrid td { padding: .45rem .6rem; border-bottom: 1px solid var(--pad-line); text-align: left; vertical-align: middle; }
.agrid th { background: #f4e27f; font-weight: 900; font-size: .85rem; white-space: nowrap; }
.agrid td.cat { font-weight: 800; font-size: .85rem; min-width: 160px; }
.agrid td .h { font-family: var(--hand); font-size: 1.35rem; font-weight: 700; color: #1b3d8f; }
.agrid td.z .h { color: #9a9a9a; text-decoration: line-through; }
.agrid td .p { font-family: var(--display); font-size: .9rem; margin-left: .3rem; color: var(--teal-dark); }
.agrid td.z .p { color: #b0a46e; }
details.full summary { cursor: pointer; font-weight: 900; color: var(--gold); margin-top: 1.1rem; }

/* final podium */
.final { text-align: center; padding: 1.5rem 1rem 2rem; background: rgba(0,0,0,.3); border-radius: 22px; }
.final .sticker { font-size: clamp(2.4rem, 6vw, 3.6rem); margin-bottom: 1.4rem; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 1rem; margin: 1rem 0 1.6rem; }
.pod { display: grid; justify-items: center; gap: .4rem; width: 130px; }
.pod .av { width: 70px; height: 70px; font-size: 40px; }
.pod .nm { font-weight: 900; }
.pod .blk { width: 100%; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, var(--gold), var(--gold-dark)); color: var(--ink); font-family: var(--display); font-size: 1.8rem; display: grid; place-items: center; box-shadow: inset 0 4px 0 rgba(255,255,255,.4); }
.pod.p1 .blk { height: 150px; }
.pod.p2 .blk { height: 110px; background: linear-gradient(180deg, #e6ebf2, #9aa6b5); }
.pod.p3 .blk { height: 80px; background: linear-gradient(180deg, #f2b27a, #b8682c); }

/* side panel */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.roomtag { font-weight: 800; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.roomtag b { font-family: var(--display); font-weight: 400; color: #fff; letter-spacing: .1em; font-size: 1.05rem; }
.ver { font-size: .7rem; opacity: .7; margin-left: .3rem; }
.topbar .row { gap: .3rem; flex-wrap: nowrap; }
.players { display: grid; gap: 5px; }
.pc { display: grid; grid-template-columns: auto 1fr auto; gap: .55rem; align-items: center; background: rgba(0,0,0,.28); border-radius: 12px; padding: .4rem .6rem; border-left: 4px solid var(--pc); }
.pc .av { width: 32px; height: 32px; font-size: 18px; box-shadow: 0 0 0 2px #fff; }
.pc .nm { font-weight: 900; line-height: 1.1; }
.pc .st { font-size: .75rem; font-weight: 700; color: var(--muted); }
.pc .st.done { color: var(--teal); }
.pc .sc { font-family: var(--display); font-size: 1.3rem; color: var(--gold); }
.pc.left { opacity: .45; }
.ctl { background: rgba(0,0,0,.28); border-radius: 14px; padding: .7rem; display: grid; gap: .5rem; }
.ctl .msg { font-weight: 800; }
.feed { flex: 1; min-height: 140px; background: rgba(0,0,0,.28); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.feed-list { flex: 1; overflow-y: auto; padding: .6rem .7rem; display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; line-height: 1.3; }
.feed-list .ch { color: #fff; font-weight: 700; }
.feed-list .ch b { color: var(--nc); }
.feed-list .empty { color: var(--muted); font-weight: 600; }
.feed form { display: flex; gap: .4rem; padding: .45rem; border-top: 1px solid rgba(255,255,255,.08); }
.feed input { flex: 1; border: 0; border-radius: 10px; padding: .5em .7em; background: rgba(255,255,255,.92); color: var(--ink); font-weight: 700; min-width: 0; font-size: .85rem; }

/* overlays, toasts, notices */
.scrim { position: fixed; inset: 0; background: rgba(20,2,8,.6); display: grid; place-items: center; z-index: 50; padding: 1rem; backdrop-filter: blur(2px); }
.modal { background: #2b0710; border-radius: 22px; box-shadow: 0 0 0 3px rgba(255,255,255,.08), 0 30px 80px rgba(0,0,0,.6); width: min(560px, 100%); max-height: calc(100vh - 2rem); overflow-y: auto; padding: 1.3rem 1.4rem; position: relative; }
.modal h2 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; margin: 0 0 1rem; color: #fff; }
.modal .close { position: absolute; right: .8rem; top: .7rem; background: none; border: 0; color: var(--muted); font-size: 1.6rem; line-height: 1; padding: .2rem .4rem; }
#toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: .5rem; z-index: 100; width: min(440px, 92vw); }
.toast { background: var(--ink); color: #fff; border-radius: 14px; padding: .75rem 1rem; font-weight: 800; box-shadow: 0 10px 30px rgba(0,0,0,.5); border-left: 5px solid var(--rose); animation: toastIn .25s ease-out; }
.toast.ok { border-left-color: var(--teal); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
#notices { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 120; display: grid; gap: .5rem; width: min(560px, 94vw); pointer-events: none; }
.notice { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .85rem 1rem; border-radius: 16px; font-family: var(--display); font-size: 1.2rem; line-height: 1.25; color: #fff; box-shadow: 0 0 0 3px var(--ink), 0 14px 40px rgba(0,0,0,.6); animation: noticeIn .45s cubic-bezier(.2,1.4,.4,1); transition: opacity .4s, transform .4s; }
.notice.good { background: linear-gradient(90deg, #0f8478, #19c3b1); }
.notice.bad { background: linear-gradient(90deg, #a3243b, #ff4d6d); }
.notice.info { background: linear-gradient(90deg, #2a3442, #46546a); }
.notice button { background: rgba(0,0,0,.25); color: #fff; border: 0; border-radius: 50%; width: 30px; height: 30px; flex: none; }
.notice.gone { opacity: 0; transform: translateY(-12px); }
@keyframes noticeIn { from { opacity: 0; transform: translateY(-20px) scale(.9); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.rules-list { line-height: 1.55; color: #f3dfe2; font-weight: 600; padding-left: 1.1rem; }
.rules-list li { margin-bottom: .35rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.final .rank, .final .grid-wrap { text-align: left; }

a.btn { text-decoration: none; display: inline-block; }
