:root {
  color-scheme: dark;
  --bg: #070912;
  --card: #101629;
  --text: #f3f7ff;
  --muted: #a9b3c7;
  --accent: #cb45ff;
  --accent-2: #7e35ff;
  --stroke: #212b45;
  --soft: #18213b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top, rgba(54, 43, 125, 0.95) 0%, rgba(15, 16, 36, 0.88) 28%, var(--bg) 58%),
    #060811;
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 14px 14px 92px;
}

.hidden {
  display: none !important;
}

.gate-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg, #0b1020);
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 14px;
}

.gate-card {
  width: min(100%, 430px);
  text-align: center;
  padding: 20px 16px;
}

.gate-title {
  margin: 0 0 10px;
  font-size: 36px;
  line-height: 1;
}

.gate-sub {
  margin: 0 0 16px;
  color: var(--muted);
}

.card {
  background: linear-gradient(180deg, #151d33 0%, #101629 100%);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.card h2,
.card h3 {
  margin: 0 0 10px;
}

.label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
}

.input {
  width: 100%;
  border: 1px solid #2a3658;
  background: #0f1528;
  color: var(--text);
  border-radius: 12px;
  padding: 12px 13px;
  margin-bottom: 10px;
  font-size: 16px;
}

.input.code {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-align: center;
}

.action-row {
  display: flex;
  gap: 8px;
}

.btn {
  appearance: none;
  border: 1px solid #2c3b63;
  border-radius: 12px;
  background: #1a2542;
  color: var(--text);
  padding: 11px 14px;
  font-size: 15px;
  width: 100%;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: linear-gradient(90deg, var(--accent-2) 0%, var(--accent) 100%);
  border-color: #8740ff;
  font-weight: 700;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.btn.btn-ghost {
  width: auto;
  padding: 9px 14px;
  background: transparent;
}

.small {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.status {
  min-height: 18px;
  font-size: 14px;
  margin: 10px 0 0;
}

.list {
  margin: 0;
  padding-left: 20px;
}

.list li {
  margin: 4px 0;
}

.log {
  max-height: 180px;
  overflow: auto;
}

.button-list {
  display: grid;
  gap: 8px;
}

.invite-box {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.code-pill {
  border: 1px solid #2f3b62;
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  background: #0f1527;
}

.qr {
  border-radius: 12px;
  border: 1px solid #2f3b62;
  width: 180px;
  height: 180px;
  background: #fff;
}

.game-room-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #2d395d;
  background: #0f1527;
  color: #d8ddf0;
}

.hero {
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.hero.compact h1 {
  font-size: 26px;
}

.hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* landing */
.site-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.brand {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header {
  width: auto;
  min-width: 118px;
}

.menu-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid #293454;
  background: rgba(16, 22, 41, 0.9);
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.header-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 20;
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #273151;
  background: linear-gradient(180deg, #151d33 0%, #101629 100%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
}

.header-menu a {
  color: var(--text);
  text-decoration: none;
  padding: 4px 0;
}

.hero-landing-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(100% 100% at 75% 20%, rgba(185, 72, 255, 0.16) 0%, rgba(19, 24, 41, 0) 60%),
    linear-gradient(180deg, #11172b 0%, #0d1324 100%);
  border: 1px solid #2a3252;
  border-radius: 24px;
  padding: 18px 16px 16px;
  margin-bottom: 14px;
}

.hero-landing-card--with-art {
  min-height: 330px;
}

.hero-landing-card--with-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 10, 19, 0.96) 0%, rgba(8, 10, 19, 0.92) 34%, rgba(8, 10, 19, 0.62) 54%, rgba(8, 10, 19, 0.18) 72%, rgba(8, 10, 19, 0.05) 100%),
    linear-gradient(180deg, rgba(16, 21, 39, 0.08) 0%, rgba(16, 21, 39, 0.28) 100%);
}

.hero-side-art {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 0;
  width: 88%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  opacity: 0.95;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(62%, 290px);
  min-height: 296px;
  display: flex;
  flex-direction: column;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #2b3554;
  background: rgba(16, 21, 39, 0.9);
}

.hero-kicker {
  margin: 0 0 14px;
  color: #e6dcff;
  font-size: 15px;
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero-copy h1 span {
  color: #9f4dff;
}

.hero-sub {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.38;
}

.hero-actions {
  margin-top: auto;
  margin-bottom: 0;
}

.hero-main-btn {
  min-height: 54px;
  font-size: 18px;
}

.landing-section {
  padding-top: 16px;
  padding-bottom: 16px;
}

.section-title {
  margin: 0;
  font-size: 18px;
}

.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-link {
  appearance: none;
  background: transparent;
  border: 0;
  color: #b85cff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.how-card {
  min-width: 0;
  background: #11182e;
  border: 1px solid #253152;
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}

.how-icon {
  font-size: 28px;
  line-height: 1;
  margin: 6px 0 10px;
}

.how-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.1;
}

.how-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8f40ff 0%, #6f2ff0 100%);
  font-size: 14px;
  font-weight: 700;
}

.landing-games-showcase {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.showcase-game-card {
  min-width: 0;
}

.showcase-media {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #2a3556;
  background: #10182e;
  margin-bottom: 8px;
}

.showcase-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-game-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
}

.site-footer {
  margin-bottom: 0;
}

.footer-grid {
  display: grid;
  gap: 14px;
}

.footer-grid h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.footer-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.footer-list a {
  color: var(--muted);
  text-decoration: none;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-links a {
  min-width: 42px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #11182e;
  border: 1px solid #26324f;
  text-decoration: none;
  font-weight: 700;
}

.bottom-cta-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 560px);
  padding: 10px 14px 14px;
  z-index: 25;
  background: linear-gradient(180deg, rgba(7, 9, 18, 0) 0%, rgba(7, 9, 18, 0.96) 42%);
}

.bottom-cta-btn {
  min-height: 54px;
  border-radius: 16px;
  font-size: 18px;
}

/* picker */
.picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.games-grid-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.game-tile {
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 14px;
  padding: 0;
  text-align: center;
}

.game-media {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  border: 1px solid #2a3556;
  overflow: hidden;
  margin-bottom: 8px;
  background: #10182e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.game-tile:hover .game-media,
.game-tile:focus-visible .game-media {
  border-color: #8c3eff;
}

.game-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-title-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
}

.game-title {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  text-align: center;
  min-height: 26px;
}

.game-badge {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  color: #ffdca7;
  border: 1px solid rgba(255, 179, 74, 0.35);
  background: rgba(255, 179, 74, 0.12);
}

.game-badge-ready {
  color: #abffd0;
  border-color: rgba(77, 255, 163, 0.35);
  background: rgba(77, 255, 163, 0.12);
}

.placeholder-note {
  background: #11182e;
  border: 1px solid #26324f;
  border-radius: 12px;
  padding: 12px;
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

@media (max-width: 420px) {
  .brand {
    font-size: 32px;
  }

  .btn-header {
    min-width: 98px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .hero-sub {
    font-size: 15px;
  }

  .how-card {
    padding: 10px 8px;
  }

  .how-icon {
    font-size: 24px;
  }

  .how-card h3 {
    font-size: 13px;
  }

  .how-card p {
    font-size: 11px;
  }

  .showcase-game-card strong {
    font-size: 11px;
  }
}

@media (max-width: 390px) {
  .games-grid-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn.btn-ghost {
    width: 100%;
  }
}


@media (max-width: 420px) {
  .hero-landing-card--with-art {
    min-height: 310px;
  }

  .hero-copy {
    width: min(64%, 255px);
    min-height: 276px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .hero-sub {
    font-size: 15px;
  }

  .hero-side-art {
    width: 92%;
    object-position: 70% center;
  }
}

.gov-section + .gov-section {
  margin-top: 18px;
}

.subsection-title {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
}

.rules-list,
.list {
  margin: 10px 0 0;
  padding-left: 20px;
}

.rules-list li,
.list li {
  margin: 6px 0;
}

.record-widget {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(119, 140, 255, 0.25);
  border-radius: 16px;
  background: rgba(8, 14, 44, 0.55);
}

.record-status {
  margin-bottom: 12px;
  color: #d9e4ff;
  font-size: 14px;
  line-height: 1.45;
}

.result-big {
  margin: 6px 0 8px;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
}


.alco-top-stats {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-bottom:12px;
}
.alco-top-stats--minimal {
  position: absolute;
  top: 6px;
  left: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 4px 6px;
  margin: 0;
  padding: 0;
  width: auto;
  max-height: 22vh;
  overflow: hidden;
  pointer-events: none;
  opacity: .68;
}
.alco-top-stats div,.alco-overlay-banner div {
  border:1px solid #2a3556;
  background:#10182e;
  border-radius:14px;
  padding:10px;
}
.alco-top-stats span,.alco-overlay-banner strong { display:block; font-size:12px; color:var(--muted); margin-bottom:4px; }
.alco-top-stats strong { font-size:15px; }
.alco-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(16, 24, 46, 0.5);
  border: 1px solid rgba(151, 168, 203, 0.18);
  line-height: 1.3;
  white-space: nowrap;
  max-width: 45vw;
  overflow: hidden;
}
.alco-stat-chip i {
  font-style: normal;
  font-size: 10px;
  color: rgba(210, 220, 243, 0.55);
  max-width: 22vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alco-stat-chip b {
  font-weight: 700;
  font-size: 11px;
  color: rgba(229, 236, 255, 0.78);
}
.alco-overlay-banner {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-bottom:12px;
  animation: alcoFade 5s ease forwards;
}
@keyframes alcoFade { 0% {opacity:0; transform:translateY(-6px);} 8%,85% {opacity:1; transform:none;} 100% {opacity:0;} }
.alco-scene {
  border:1px solid #2f3d62;
  border-radius:18px;
  padding:14px;
  background:radial-gradient(circle at top, rgba(111,47,240,.28) 0%, rgba(10,14,29,.95) 65%);
  margin-bottom:12px;
}
.alco-scene.is-live { box-shadow:0 0 0 1px rgba(255,255,255,.04) inset, 0 0 35px rgba(164,78,255,.18); }
.alco-scene--single { background:radial-gradient(circle at top, rgba(111,47,240,.35) 0%, rgba(10,14,29,.95) 65%); }
.alco-scene--all { background:radial-gradient(circle at top, rgba(23,163,184,.30) 0%, rgba(10,14,29,.95) 65%); }
.alco-scene--none { background:radial-gradient(circle at top, rgba(122,122,180,.25) 0%, rgba(10,14,29,.95) 65%); }
.alco-scene--double { background:radial-gradient(circle at top, rgba(255,61,61,.34) 0%, rgba(25,10,18,.95) 65%); animation: alcoAlarm .8s linear infinite; }
@keyframes alcoAlarm { 0%,100% { box-shadow:0 0 0 rgba(255,80,80,0);} 50% { box-shadow:0 0 36px rgba(255,60,60,.35);} }
.alco-scene__header { display:flex; justify-content:space-between; gap:8px; margin-bottom:10px; }
.alco-round-badge,.alco-theme-badge {
  border:1px solid #2d395d; background:#0f1527; border-radius:999px; padding:6px 10px; font-size:12px;
}
.alco-scene__title { font-size:28px; font-weight:900; line-height:1.05; margin-bottom:8px; }
.alco-scene__subtitle { color:var(--muted); margin-bottom:12px; font-size:15px; }
.alco-table-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.alco-seat { border:1px solid #2a3556; background:rgba(12,18,37,.78); border-radius:16px; padding:12px; text-align:center; }
.alco-seat.is-target { border-color:#d95cff; box-shadow:0 0 28px rgba(217,92,255,.35), inset 0 0 0 1px rgba(255,255,255,.05); }
.alco-seat__name { font-size:13px; font-weight:700; min-height:34px; }
.alco-seat__circle { font-size:34px; line-height:1; margin:10px 0 8px; }
.alco-seat.is-target .alco-seat__circle { animation: alcoPulse 1s ease-in-out infinite; }
@keyframes alcoPulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.12); } }
.alco-seat__meta { color:var(--muted); font-size:12px; }
.alco-finish-screen { border:1px solid #2f3d62; border-radius:18px; padding:16px; background:radial-gradient(circle at top, rgba(217,92,255,.26) 0%, rgba(10,14,29,.95) 65%); }
.alco-finish-emoji { font-size:40px; line-height:1; margin-bottom:10px; }
@media (max-width: 420px) {
  .alco-top-stats:not(.alco-top-stats--minimal),
  .alco-overlay-banner { grid-template-columns:1fr; }
  .alco-table-grid { grid-template-columns:1fr 1fr; }
  .alco-scene__title { font-size:24px; }
}


body.alco-mode-active .container {
  width: 100%;
  max-width: none;
  padding: 0;
}
body.alco-mode-active .hero.compact,
body.alco-mode-active .hero.compact h1,
body.alco-mode-active #phaseText {
  margin: 0;
}
body.alco-mode-active .hero.compact {
  display: none;
}
.alco-hidden-card { display: none !important; }
.alco-fullscreen-card {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}
.alco-overlay-banner--fixed {
  position: fixed;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 50;
}
.alco-overlay-banner--fixed div span { display:block; font-size:18px; font-weight:800; color:#fff; }
.alco-stage {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  background: #000;
}
.alco-stage__dim {
  position: absolute;
  inset: 0;
  background: #000;
}
.alco-stage__center,
.alco-stage__footer { position: relative; z-index: 2; }
.alco-stage__center {
  flex: 1;
  min-height: 0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.alco-glass-zone {
  position: relative;
  width: min(72vw, 420px);
  height: min(72vw, 420px);
  min-width: 250px;
  min-height: 250px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 8px auto 16px;
}
.alco-glass-zone__halo,
.alco-glass-zone__ring {
  position:absolute;
  inset:0;
  border-radius:50%;
}
.alco-glass-zone__halo {
  background: radial-gradient(circle, rgba(191,81,255,.9) 0%, rgba(191,81,255,.38) 34%, rgba(191,81,255,.08) 68%, transparent 74%);
  filter: blur(12px);
  opacity: 1;
}
.alco-glass-zone__ring {
  inset: 8%;
  border: 14px solid rgba(255,255,255,1);
  box-shadow: 0 0 50px rgba(255,255,255,.75), 0 0 160px rgba(191,81,255,1), inset 0 0 22px rgba(255,255,255,.6);
}
.alco-glass-zone__label {
  position: relative;
  z-index: 2;
  font-size: clamp(60px, 14vw, 100px);
  line-height: 1;
  text-shadow: 0 0 36px rgba(255,255,255,.65), 0 0 70px rgba(191,81,255,.95);
}
.alco-glass-zone.is-muted .alco-glass-zone__halo,
.alco-glass-zone.is-muted .alco-glass-zone__ring,
.alco-glass-zone.is-muted .alco-glass-zone__label {
  opacity: .12;
  box-shadow: none;
  text-shadow: none;
}
.alco-stage__hint {
  max-width: 640px;
  color: rgba(233,238,255,.5);
  font-size: clamp(16px, 4.8vw, 24px);
  line-height: 1.35;
}
.alco-stage__footer {
  position: relative;
  z-index: 2;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.alco-host-note { text-align:center; margin-top: 12px; font-size: 16px; }
.alco-effects-unlock {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
}
.alco-glass-zone.alco-haptic-burst .alco-glass-zone__ring {
  transform: scale(1.1);
  box-shadow: 0 0 70px rgba(255,255,255,.95), 0 0 260px rgba(191,81,255,1), inset 0 0 30px rgba(255,255,255,.8);
}
.alco-glass-zone.alco-haptic-burst .alco-glass-zone__halo {
  opacity: 1;
  filter: blur(16px);
}
.alco-stage__footer .btn {
  opacity: .68;
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  color: rgba(246,248,255,.78);
  box-shadow: none;
}
.alco-stage__footer .btn.primary {
  background: rgba(176,118,255,.26);
  border-color: rgba(215,178,255,.56);
  color: rgba(255,255,255,.95);
  box-shadow: 0 0 20px rgba(191, 81, 255, .22);
}
.alco-stage__footer .btn:disabled {
  opacity: .45;
}
.alco-stage.is-waiting .alco-glass-zone.is-target .alco-glass-zone__halo,
.alco-stage.is-waiting.is-waiting-target .alco-glass-zone__halo {
  background: radial-gradient(circle, rgba(74,230,142,1) 0%, rgba(74,230,142,.46) 36%, rgba(74,230,142,.12) 70%, transparent 76%);
}
.alco-stage.is-waiting.is-waiting-target .alco-glass-zone__ring {
  border-color: rgba(162, 255, 206, 0.95);
  animation: alcoRingWaitingPulse .55s ease-in-out infinite;
}
.alco-stage.is-waiting.is-waiting-target .alco-glass-zone__label {
  color: rgba(225, 255, 237, 0.95);
}
@keyframes alcoRingWaitingPulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 38px rgba(105,255,176,.58), 0 0 120px rgba(74,230,142,.35), inset 0 0 16px rgba(236,255,244,.44); }
  50% { transform: scale(1.09); box-shadow: 0 0 62px rgba(137,255,196,.92), 0 0 220px rgba(74,230,142,.64), inset 0 0 24px rgba(236,255,244,.76); }
}
.alco-stage--single .alco-glass-zone.is-target .alco-glass-zone__halo,
.alco-stage--single.is-target .alco-glass-zone__halo {
  background: radial-gradient(circle, rgba(217,92,255,1) 0%, rgba(217,92,255,.46) 36%, rgba(217,92,255,.11) 70%, transparent 76%);
}
.alco-stage--all .alco-glass-zone__halo {
  background: radial-gradient(circle, rgba(46,217,255,1) 0%, rgba(46,217,255,.4) 36%, rgba(46,217,255,.1) 70%, transparent 76%);
}
.alco-stage--none .alco-glass-zone__halo {
  background: radial-gradient(circle, rgba(198,205,216,.26) 0%, rgba(198,205,216,.12) 36%, rgba(198,205,216,.02) 72%, transparent 78%);
}
.alco-stage--none .alco-glass-zone__ring {
  border-color: rgba(216, 223, 235, 0.92);
  box-shadow: 0 0 16px rgba(220,228,240,.24), 0 0 34px rgba(186,196,214,.16), inset 0 0 12px rgba(240,245,255,.14);
}
.alco-stage--none .alco-glass-zone__label {
  color: rgba(228, 233, 244, 0.72);
  text-shadow: none;
}
.alco-stage--double .alco-glass-zone__halo {
  background: radial-gradient(circle, rgba(255,45,45,1) 0%, rgba(255,45,45,.52) 30%, rgba(255,45,45,.12) 66%, transparent 74%);
}
.alco-stage.is-live .alco-glass-zone:not(.is-muted) .alco-glass-zone__ring {
  animation: alcoRingPulse .8s ease-in-out infinite;
}
.alco-stage--double.is-live .alco-glass-zone:not(.is-muted) .alco-glass-zone__ring {
  animation: alcoRingAlarm .34s linear infinite;
}
@keyframes alcoRingPulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 42px rgba(255,255,255,.65), 0 0 135px rgba(191,81,255,.92), inset 0 0 20px rgba(255,255,255,.45); }
  50% { transform: scale(1.08); box-shadow: 0 0 66px rgba(255,255,255,.95), 0 0 220px rgba(191,81,255,1), inset 0 0 28px rgba(255,255,255,.72); }
}
@keyframes alcoRingAlarm {
  0%,100% { transform: scale(1); box-shadow: 0 0 32px rgba(255,255,255,.5), 0 0 95px rgba(255,35,35,.8), inset 0 0 16px rgba(255,255,255,.32); }
  50% { transform: scale(1.11); box-shadow: 0 0 58px rgba(255,255,255,.92), 0 0 240px rgba(255,25,25,1), inset 0 0 24px rgba(255,255,255,.65); }
}
.alco-stage--double { background: radial-gradient(circle at center, rgba(109,0,0,.65) 0%, rgba(20,5,10,.98) 60%); }
.alco-stage--all { background: radial-gradient(circle at center, rgba(0,98,130,.52) 0%, rgba(9,11,20,.98) 62%); }
.alco-stage--single { background: radial-gradient(circle at center, rgba(82,24,126,.58) 0%, rgba(9,11,20,.98) 62%); }
.alco-stage--none { background: radial-gradient(circle at center, rgba(54,60,72,.34) 0%, rgba(12,13,16,.98) 64%); }
.alco-stage--none.is-live .alco-glass-zone__ring {
  animation: none;
}
.alco-finish-screen--fullscreen {
  position: fixed;
  inset: 0;
  z-index: 35;
  overflow:auto;
  margin:0 !important;
  border:0;
  border-radius:0;
  padding: 120px 20px 40px;
  background: radial-gradient(circle at center, rgba(110,42,170,.58) 0%, rgba(10,14,29,.98) 62%);
}
@media (max-width: 640px) {
  .alco-overlay-banner--fixed { grid-template-columns:1fr; }
  .alco-stage { padding: 14px 14px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .alco-glass-zone { width: min(82vw, 360px); height: min(82vw, 360px); }
  .alco-glass-zone__ring { border-width: 10px; }
}

.gov-game-page {
  min-height: 100vh;
  background: radial-gradient(circle at top, rgba(38, 82, 220, 0.26) 0%, #060912 62%);
}

.gov-game-shell {
  width: min(100%, 1000px);
  margin: 0 auto;
  min-height: 100vh;
  padding: 0;
}

.gov-game-main {
  min-height: 100vh;
}

.gov-stage-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px calc(22px + env(safe-area-inset-bottom, 0px));
}

.gov-stage-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.gov-wave-root {
  width: min(72vw, 420px);
  height: min(72vw, 420px);
  min-width: 220px;
  min-height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(45, 92, 221, 0.22) 0%, rgba(8, 14, 31, 0.12) 63%, transparent 72%);
  display: grid;
  place-items: center;
  box-shadow: 0 0 130px rgba(84, 146, 255, 0.2);
}

.gov-wave-root[data-mode="play"] {
  box-shadow: 0 0 150px rgba(120, 166, 255, 0.32), 0 0 220px rgba(183, 95, 255, 0.18);
}

.gov-wave-root[data-mode="record"] {
  box-shadow: 0 0 160px rgba(90, 201, 255, 0.3), 0 0 220px rgba(242, 106, 255, 0.18);
}

.gov-wave-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: saturate(1.1) contrast(1.03);
}

.gov-stage-label {
  font-size: clamp(20px, 4.4vw, 30px);
  font-weight: 800;
  color: #eef4ff;
  text-align: center;
  letter-spacing: 0.01em;
}

.gov-answer-panel {
  width: min(100%, 620px);
  margin-bottom: 14px;
  max-height: min(34vh, 300px);
  overflow: auto;
}

.gov-controls-bottom {
  width: min(100%, 620px);
  display: grid;
  gap: 8px;
}

.gov-stage-center.is-blurred,
.gov-answer-panel.is-blurred {
  filter: blur(4px) saturate(0.9);
  opacity: 0.8;
}

.gov-answer-btn.is-selected {
  border-color: #8d59ff;
  background: rgba(126, 79, 255, 0.2);
}

.gov-answer-btn.is-correct {
  border-color: #42d784;
  background: rgba(43, 157, 103, 0.3);
}

.gov-answer-btn.is-wrong {
  border-color: #ff5f74;
  background: rgba(171, 42, 72, 0.3);
}

.gov-card {
  border: 1px solid #2b4069;
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, #111d39 0%, #0e1830 100%);
}

.gov-min-card {
  width: min(100%, 520px);
  margin: 120px auto 0;
}

.gov-result-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 30;
  pointer-events: none;
  overflow: hidden;
}

.gov-result-text {
  font-size: clamp(38px, 11vw, 74px);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.45), 0 0 48px rgba(120, 170, 255, 0.35);
  animation: govResultPop 1.9s ease both;
}

.gov-result-overlay.is-win .gov-result-text {
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.55), 0 0 62px rgba(68, 255, 184, 0.42);
  animation: govResultPop 1.9s ease both, govWinTextPulse 0.42s ease-in-out 2;
}

.gov-result-overlay.is-lose .gov-result-text {
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.35), 0 0 62px rgba(255, 92, 127, 0.44);
  animation: govResultPop 1.9s ease both, govLoseTextJolt 0.18s linear 6;
}

.gov-result-burst {
  position: absolute;
  top: 38%;
  width: 28vw;
  max-width: 240px;
  min-width: 120px;
  height: 10px;
}

.gov-result-burst::before,
.gov-result-burst::after {
  content: "";
  position: absolute;
  inset: -40px 0;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0 2px, transparent 3px) 0 0 / 18px 18px,
              radial-gradient(circle, rgba(197,121,255,0.9) 0 2px, transparent 3px) 8px 9px / 20px 20px,
              radial-gradient(circle, rgba(85,225,255,0.9) 0 2px, transparent 3px) 2px 14px / 22px 22px;
  opacity: 0;
  animation: govConfetti 1.6s ease both;
}

.gov-result-overlay.is-lose .gov-result-burst::before,
.gov-result-overlay.is-lose .gov-result-burst::after {
  background: linear-gradient(90deg, transparent 0 8%, rgba(255,76,108,0.52) 8% 12%, transparent 12% 20%, rgba(255,76,108,0.36) 20% 24%, transparent 24% 100%);
  inset: -14px 0;
  height: 30px;
  top: 40%;
  animation: govLoseScan 0.95s ease both;
}

.gov-result-burst-left { left: 4%; transform: rotate(-14deg); }
.gov-result-burst-right { right: 4%; transform: rotate(14deg); }

.gov-result-overlay.is-win::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(57, 241, 169, 0.16) 0%, rgba(34, 197, 133, 0.11) 26%, rgba(7, 13, 30, 0) 58%);
  animation: govWinFlash 1.1s ease;
}

.gov-result-overlay.is-lose::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 64, 96, 0.24) 0%, rgba(160, 22, 44, 0.16) 36%, rgba(7, 13, 30, 0) 62%);
  animation: govLoseFlash 1.2s ease;
}

.gov-result-overlay.is-lose::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 90, 120, 0.08) 0px,
      rgba(255, 90, 120, 0.08) 1px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0) 5px
    );
  mix-blend-mode: screen;
  animation: govLoseNoise 0.22s steps(2) 8;
}

@keyframes govConfetti {
  0% { opacity: 0; transform: translateY(16px) scale(0.85); }
  22% { opacity: 1; transform: translateY(-14px) scale(1); }
  100% { opacity: 0; transform: translateY(52px) scale(1.06); }
}

@keyframes govResultPop {
  0% { opacity: 0; transform: scale(0.72); }
  18% { opacity: 1; transform: scale(1.08); }
  74% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.96); }
}

@keyframes govWinFlash {
  0% { opacity: 0; transform: scale(0.9); }
  20% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.14); }
}

@keyframes govLoseFlash {
  0% { opacity: 0; transform: scale(0.94); }
  16% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1.06); }
}

@keyframes govWinTextPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes govLoseTextJolt {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

@keyframes govLoseScan {
  0% { opacity: 0; transform: translateY(-8px) scaleX(0.7); }
  40% { opacity: 1; transform: translateY(0) scaleX(1); }
  100% { opacity: 0; transform: translateY(18px) scaleX(1.12); }
}

@keyframes govLoseNoise {
  0% { opacity: 0.08; transform: translateY(0); }
  100% { opacity: 0.28; transform: translateY(2px); }
}

/* ============================================================
   MAFIA — neon cyberpunk theme
   ============================================================ */

body.mafia-mode {
  background:
    linear-gradient(180deg, rgba(10, 7, 22, 0.92) 0%, rgba(6, 4, 24, 0.96) 60%, rgba(6, 4, 24, 0.99) 100%),
    url("/images/mafia/bg-city.png") center top / cover no-repeat fixed,
    radial-gradient(120% 70% at 20% 8%, rgba(140, 30, 220, 0.32) 0%, transparent 60%),
    linear-gradient(180deg, #0a0716 0%, #060418 100%);
  min-height: 100dvh;
}

body.mafia-mode [hidden] {
  display: none !important;
}

body.mafia-audio-locked .mf-btn--primary,
body.mafia-audio-locked .mf-btn--ghost {
  pointer-events: none;
  opacity: 0.55;
  filter: grayscale(0.3);
}

body.mafia-audio-locked .mf-prow.is-selectable,
body.mafia-audio-locked .mf-vote-target {
  pointer-events: none;
  opacity: 0.55;
}

.mf-timer-card__value.is-audio-lock,
.mf-bigtimer__value.is-audio-lock {
  font-size: clamp(28px, 7vw, 36px) !important;
  letter-spacing: 0.15em;
  color: #c8b9ff !important;
  text-shadow: 0 0 16px rgba(180, 130, 255, 0.6);
  animation: mfAudioPulse 1s infinite ease-in-out;
}

@keyframes mfAudioPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.mf-audio-banner {
  margin: 4px auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(180, 130, 255, 0.18);
  border: 1px solid rgba(180, 130, 255, 0.45);
  color: #d8c8ff;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  box-shadow: 0 0 16px rgba(180, 130, 255, 0.25);
}

body.mafia-mode .container,
body.mafia-mode #playersList,
body.mafia-mode #inviteBlock,
body.mafia-mode #logList,
body.mafia-mode #myRoleText,
body.mafia-mode #phaseText,
body.mafia-mode #roomTitle,
body.mafia-mode #leaveRoomBtn,
body.mafia-mode #roomGameBadge {
  display: none !important;
}

.mafia-root {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 14px 14px 32px;
  color: #f3f7ff;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.mf-screen {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mf-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
}

.mf-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.mf-topbar__round {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #ff3d6e;
  text-shadow: 0 0 18px rgba(255, 61, 110, 0.65);
}

.mf-topbar__phase {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 16, 38, 0.6);
  color: #cb45ff;
  box-shadow: 0 0 24px rgba(203, 69, 255, 0.25);
}

.mf-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(120, 90, 255, 0.35);
  background: rgba(20, 16, 38, 0.6);
  color: #cb45ff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.mf-icon-btn:hover {
  border-color: #cb45ff;
  transform: translateY(-1px);
}

.mf-icon-btn--ghost {
  cursor: default;
  opacity: 0.5;
}

.mf-brand {
  font-weight: 800;
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mf-brand__logo {
  background: linear-gradient(90deg, #ff5cf6 0%, #6da0ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-family: "Pacifico", "Bebas Neue", "Inter", sans-serif;
  font-size: 28px;
}

.mf-brand__sep {
  color: #6f78a4;
}

.mf-brand__game {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
}

/* Buttons */
.mf-btn {
  appearance: none;
  border: 0;
  border-radius: 16px;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: 100%;
  cursor: pointer;
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  color: #fff;
}

.mf-btn--primary {
  background: linear-gradient(90deg, #ff2a8b 0%, #cb45ff 100%);
  box-shadow: 0 0 0 2px rgba(255, 61, 130, 0.18), 0 18px 38px rgba(255, 60, 140, 0.32), inset 0 0 16px rgba(255, 255, 255, 0.18);
}

.mf-btn--primary:hover { transform: translateY(-1px); }
.mf-btn--primary:disabled {
  background: rgba(120, 90, 200, 0.25);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}
.mf-btn--primary.is-done,
.mf-btn--primary.is-done:disabled {
  background: linear-gradient(90deg, rgba(46, 213, 130, 0.85) 0%, rgba(70, 211, 255, 0.85) 100%);
  box-shadow: 0 0 0 2px rgba(70, 211, 200, 0.25), 0 14px 28px rgba(46, 213, 130, 0.2);
  color: #061f12;
  opacity: 1;
}

.mf-btn--ghost {
  background: rgba(20, 16, 38, 0.55);
  border: 1px solid rgba(140, 100, 255, 0.4);
  color: #d8c8ff;
}

.mf-btn--ghost:hover {
  border-color: #cb45ff;
  box-shadow: 0 0 0 2px rgba(203, 69, 255, 0.18);
}

.mf-section-title {
  margin: 8px 0 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d8c8ff;
}

.mf-section-counter {
  margin-left: 8px;
  color: #ff8fb8;
  font-weight: 700;
}

.mf-section-hint {
  margin: 0 0 6px;
  font-size: 12px;
  color: #8f96b8;
}

/* ----- Lobby ----- */
.mf-lobby__code-card {
  text-align: center;
  padding: 16px;
  border-radius: 22px;
  background: rgba(16, 10, 32, 0.75);
  border: 1px solid rgba(255, 70, 160, 0.25);
  box-shadow: inset 0 0 22px rgba(255, 60, 160, 0.08);
}

.mf-lobby__code-label {
  display: block;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #ff8fb8;
  margin-bottom: 8px;
}

.mf-lobby__code-pill {
  display: inline-block;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0.4em;
  background: linear-gradient(90deg, #ff5cf6, #cb45ff, #6da0ff);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 26px rgba(203, 69, 255, 0.4);
}

.mf-lobby__code-hint {
  margin: 8px 0 0;
  color: #98a0c0;
  font-size: 13px;
}

.mf-lobby__qr-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: rgba(16, 10, 32, 0.75);
  border: 1px solid rgba(110, 80, 220, 0.3);
}

.mf-lobby__qr {
  width: 110px;
  height: 110px;
  border-radius: 14px;
  background: #fff;
  padding: 6px;
}

.mf-lobby__qr-text strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.mf-lobby__qr-text span {
  color: #98a0c0;
  font-size: 13px;
}

.mf-lobby__settings {
  padding: 14px;
  border-radius: 22px;
  background: rgba(14, 10, 28, 0.7);
  border: 1px solid rgba(110, 80, 220, 0.25);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mf-pcount-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.mf-pcount-list::-webkit-scrollbar { height: 4px; }
.mf-pcount-list::-webkit-scrollbar-thumb { background: #4b1d80; border-radius: 4px; }

.mf-pcount-btn {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 70, 160, 0.3);
  background: rgba(20, 14, 38, 0.7);
  color: #d8c8ff;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  scroll-snap-align: center;
  transition: all 0.15s ease;
}

.mf-pcount-btn.is-active {
  background: linear-gradient(180deg, #ff2a8b, #cb45ff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(255, 60, 160, 0.25), 0 12px 28px rgba(255, 60, 130, 0.32);
}

.mf-pcount-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.mf-time-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mf-time-btn {
  flex: 1 1 auto;
  min-width: 70px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(110, 80, 220, 0.4);
  background: rgba(20, 14, 38, 0.7);
  color: #d8c8ff;
  font-weight: 700;
  cursor: pointer;
}

.mf-time-btn.is-active {
  background: rgba(203, 69, 255, 0.25);
  border-color: #cb45ff;
  color: #fff;
  box-shadow: 0 0 18px rgba(203, 69, 255, 0.25);
}

.mf-time-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.mf-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  font-size: 14px;
  position: relative;
}

.mf-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mf-toggle__slider {
  margin-left: auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #251a45;
  position: relative;
  transition: background 0.18s ease;
}

.mf-toggle__slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.18s ease;
}

.mf-toggle input:checked + .mf-toggle__slider {
  background: linear-gradient(90deg, #ff2a8b, #cb45ff);
}

.mf-toggle input:checked + .mf-toggle__slider::before {
  transform: translateX(18px);
}

.mf-lobby__players-card {
  padding: 14px;
  border-radius: 22px;
  background: rgba(14, 10, 28, 0.72);
  border: 1px solid rgba(110, 80, 220, 0.25);
}

.mf-lobby__players {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mf-lobby-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(28, 18, 50, 0.6);
  border: 1px solid rgba(120, 90, 220, 0.18);
}

.mf-lobby-player__info {
  flex: 1;
  min-width: 0;
}

.mf-lobby-player__info strong {
  display: block;
  font-size: 15px;
}

.mf-lobby-player__role {
  display: block;
  font-size: 11px;
  color: #ff8fb8;
  margin-top: 2px;
  letter-spacing: 0.06em;
}

.mf-status {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 999px;
}

.mf-status--ready {
  background: rgba(60, 220, 130, 0.18);
  color: #5af09b;
  box-shadow: 0 0 0 1px rgba(60, 220, 130, 0.3) inset;
}

.mf-status--wait {
  background: rgba(255, 60, 130, 0.15);
  color: #ff8fb8;
  box-shadow: 0 0 0 1px rgba(255, 60, 130, 0.3) inset;
}

.mf-status--off {
  background: rgba(180, 180, 200, 0.12);
  color: #b8bfd8;
}

.mf-status--bot {
  background: rgba(110, 90, 220, 0.18);
  color: #c5b8ff;
  box-shadow: 0 0 0 1px rgba(110, 90, 220, 0.3) inset;
}

.mf-avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--mf-avatar-color, #cb45ff), rgba(255, 255, 255, 0.05));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06), 0 6px 14px rgba(0, 0, 0, 0.3);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  overflow: hidden;
  position: relative;
}

.mf-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mf-lobby__cover {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 60, 130, 0.25);
  box-shadow: 0 0 30px rgba(255, 60, 130, 0.18);
  aspect-ratio: 16 / 9;
  background: linear-gradient(180deg, #1a0a26 0%, #0a0414 100%);
}

.mf-lobby__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mf-lobby__cover-img.is-hidden { display: none; }

.mf-lobby__cover-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 12px 18px 14px;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 4, 18, 0.92) 100%);
  text-align: center;
}

.mf-lobby__cover-overlay span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #d8c8ff;
  text-transform: uppercase;
}

.mf-roles-card {
  margin: 12px 0 4px;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(14, 8, 30, 0.7);
  border: 1px solid rgba(110, 90, 220, 0.25);
}

.mf-roles-card__title {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a399d8;
  margin-bottom: 8px;
  text-align: center;
}

.mf-roles-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mf-roles-row {
  --mf-accent: #cb45ff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(20, 14, 38, 0.6);
  border: 1px solid color-mix(in srgb, var(--mf-accent) 40%, transparent);
}

.mf-roles-row__icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--mf-accent);
  background: rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.mf-roles-row__icon .mf-icon {
  width: 14px;
  height: 14px;
}

.mf-roles-row__label {
  flex: 1;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d8c8ff;
}

.mf-roles-row__count {
  font-weight: 800;
  font-size: 18px;
  color: var(--mf-accent);
  min-width: 18px;
  text-align: right;
}

.mf-roles-row__count.is-zero {
  color: #555a78;
}

.mf-lobby__cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.mf-lobby__cta-hint {
  text-align: center;
  margin: 0;
  font-size: 12px;
  color: #8f96b8;
}

/* ----- Role reveal (poster style: image is bg, text on top) ----- */
.mf-role-reveal {
  --mf-accent: #cb45ff;
  position: relative;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
  display: block;
}

.mf-role-reveal__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.mf-role-reveal__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.85;
  filter: saturate(1.05);
}

.mf-role-reveal__bg-img.is-hidden { display: none; }

.mf-role-reveal__bg-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 50% at 50% 35%, transparent 0%, rgba(6, 4, 18, 0.55) 70%, rgba(6, 4, 18, 0.92) 100%),
    linear-gradient(180deg, rgba(6, 4, 18, 0.78) 0%, rgba(6, 4, 18, 0.4) 30%, rgba(6, 4, 18, 0.78) 70%, rgba(6, 4, 18, 0.96) 100%);
}

.mf-role-reveal__content {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 16px 22px;
  gap: 12px;
  text-align: center;
}

.mf-role-reveal__topbar {
  width: 100%;
  display: flex;
  justify-content: center;
}

.mf-role-reveal__kicker {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--mf-accent);
  color: var(--mf-accent);
  background: rgba(20, 14, 38, 0.78);
  box-shadow: 0 0 18px rgba(203, 69, 255, 0.18);
  backdrop-filter: blur(4px);
}

.mf-role-reveal__heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 8px 18px;
  border-radius: 18px;
  background: rgba(6, 4, 18, 0.55);
  backdrop-filter: blur(4px);
}

.mf-role-reveal__caption {
  display: block;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: #d8c8ff;
}

.mf-role-reveal__title {
  margin: 0;
  font-size: clamp(38px, 11vw, 56px);
  line-height: 1.0;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff 0%, var(--mf-accent) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px var(--mf-accent);
}

.mf-role-reveal__desc {
  margin: 0 auto;
  padding: 8px 16px;
  border-radius: 14px;
  background: rgba(6, 4, 18, 0.6);
  color: #f0eefc;
  font-size: 15px;
  max-width: 320px;
  line-height: 1.35;
  backdrop-filter: blur(4px);
}

.mf-role-reveal__bottom {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mf-allies-card,
.mf-tip-card {
  width: 100%;
  max-width: 360px;
  box-sizing: border-box;
  border-radius: 18px;
  padding: 14px;
  background: rgba(10, 6, 24, 0.82);
  border: 1px solid var(--mf-accent);
  box-shadow: 0 0 28px rgba(203, 69, 255, 0.18);
  backdrop-filter: blur(6px);
}

.mf-allies-card__title {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--mf-accent);
  margin-bottom: 12px;
  text-align: center;
}

.mf-allies-list {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.mf-ally {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mf-ally .mf-avatar {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.mf-tip-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}

.mf-tip-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--mf-accent);
}

.mf-tip-card strong {
  display: block;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mf-accent);
  margin-bottom: 4px;
}

.mf-tip-card p {
  margin: 0;
  font-size: 13px;
  color: #b8bcd8;
}

.mf-role-reveal__footer {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.mf-countdown-pill {
  font-size: 13px;
  color: #c8cce0;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(110, 90, 220, 0.4);
  background: rgba(14, 10, 28, 0.7);
}

.mf-countdown-pill b {
  color: var(--mf-accent, #cb45ff);
  margin-left: 6px;
}

/* ----- Night ----- */
.mf-night {
  text-align: center;
}

.mf-night__title {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.08em;
  text-shadow: 0 0 24px var(--mf-accent, #cb45ff);
}

.mf-night__hint {
  margin: 0;
  color: #b8bcd8;
  font-size: 14px;
}

.mf-timer-card {
  border: 1px solid var(--mf-accent, #cb45ff);
  border-radius: 16px;
  padding: 14px;
  background: rgba(14, 8, 30, 0.7);
  box-shadow: 0 0 30px rgba(203, 69, 255, 0.18);
  text-align: center;
}

.mf-timer-card__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mf-accent, #cb45ff);
}

.mf-timer-card__value {
  display: block;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--mf-accent, #cb45ff);
  text-shadow: 0 0 24px var(--mf-accent, #cb45ff);
}

.mf-players-card {
  border-radius: 18px;
  border: 1px solid rgba(110, 90, 220, 0.25);
  padding: 12px;
  background: rgba(14, 8, 30, 0.7);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.mf-players-card--scroll {
  flex: 1 1 auto;
  min-height: 100px;
  max-height: min(46vh, 360px);
}

.mf-players-card--scroll .mf-players-list,
.mf-players-card--scroll .mf-vote-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
  padding-right: 4px;
}

.mf-players-card__title {
  display: block;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b8bcd8;
  margin-bottom: 10px;
}

.mf-players-list,
.mf-vote-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mf-prow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(28, 18, 50, 0.55);
  border: 1px solid rgba(120, 90, 220, 0.18);
  cursor: default;
}

.mf-prow.is-selectable {
  cursor: pointer;
  transition: all 0.15s ease;
}

.mf-prow.is-selectable:hover {
  border-color: var(--mf-accent, #cb45ff);
}

.mf-prow.is-selected {
  border-color: var(--mf-accent, #cb45ff);
  background: rgba(203, 69, 255, 0.18);
  box-shadow: 0 0 0 2px var(--mf-accent, #cb45ff), 0 0 22px rgba(203, 69, 255, 0.32);
}

.mf-prow.is-dead {
  opacity: 0.45;
}

.mf-prow__num {
  width: 24px;
  text-align: center;
  font-weight: 800;
  color: #c5b8ff;
}

.mf-prow__name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}

.mf-prow__badge {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mf-prow__badge--mafia { background: rgba(255, 61, 110, 0.22); color: #ff8fb1; }
.mf-prow__badge--votes { background: rgba(255, 200, 80, 0.18); color: #ffd57a; border: 1px solid rgba(255, 200, 80, 0.4); }
.mf-prow__badge--out { background: rgba(180, 180, 200, 0.1); color: #98a0c0; }

.mf-night__cta { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.mf-night__cta-hint { margin: 0; text-align: center; font-size: 12px; color: #8f96b8; }

.mf-night--sleep .mf-night__title {
  color: #d8c8ff;
  text-shadow: 0 0 24px var(--mf-accent);
}

.mf-sleep-card {
  --mf-accent: #6f7bff;
  margin: 24px auto 12px;
  width: min(92%, 360px);
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--mf-accent) 50%, transparent);
  background:
    radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--mf-accent) 22%, transparent) 0%, transparent 60%),
    rgba(10, 6, 28, 0.78);
  box-shadow: 0 0 38px color-mix(in srgb, var(--mf-accent) 30%, transparent);
  padding: 28px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mf-sleep-card__icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--mf-accent);
  color: var(--mf-accent);
  background: rgba(8, 4, 22, 0.7);
  box-shadow: 0 0 26px var(--mf-accent), inset 0 0 18px rgba(255, 255, 255, 0.04);
  margin-bottom: 4px;
}

.mf-sleep-card__icon .mf-icon {
  width: 40px;
  height: 40px;
}

.mf-sleep-card__title {
  font-size: 18px;
  letter-spacing: 0.02em;
  color: #f7f7ff;
}

.mf-sleep-card__sub {
  margin: 0;
  font-size: 13px;
  color: #b6bdde;
}

.mf-sleep-card__role {
  margin-top: 10px;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--mf-accent);
  color: var(--mf-accent);
  background: rgba(20, 14, 38, 0.7);
}
.mf-sleep-card__role b { color: #fff; font-weight: 700; }

.mf-check-result {
  border-radius: 18px;
  border: 1px solid #46d3ff;
  background: rgba(8, 18, 38, 0.85);
  padding: 14px;
  box-shadow: 0 0 28px rgba(70, 211, 255, 0.22);
}

.mf-check-result__title {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #88e0ff;
  margin-bottom: 12px;
  text-align: center;
}

.mf-check-result__body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mf-check-result__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid #88e0ff;
  color: #88e0ff;
  box-shadow: 0 0 24px rgba(136, 224, 255, 0.45);
}

.mf-check-result__caption {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #88e0ff;
}

.mf-check-result__body strong {
  display: block;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.06em;
  margin: 2px 0 6px;
  color: #fff;
}

.mf-check-result__body p {
  margin: 0;
  font-size: 13px;
  color: #b8bcd8;
}

/* ----- Morning / Elimination ----- */
.mf-morning,
.mf-elimination {
  text-align: center;
}

.mf-morning__title,
.mf-elimination__title {
  margin: 6px 0 4px;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.mf-morning__title span,
.mf-elimination__title span {
  background: linear-gradient(90deg, #ff5cf6, #ff2a8b);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(255, 60, 130, 0.4);
}

.mf-morning__kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #ff8fb8;
  text-transform: uppercase;
}

.mf-morning-card,
.mf-elim-card {
  text-align: center;
  border-radius: 22px;
  border: 1px solid rgba(110, 90, 220, 0.4);
  padding: 18px;
  background: rgba(14, 8, 30, 0.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mf-morning-card__label,
.mf-elim-card__label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ff8fb8;
}

.mf-morning-card__avatar,
.mf-elim-card__avatar {
  margin-top: 4px;
}

.mf-morning-card__avatar .mf-avatar,
.mf-elim-card__avatar .mf-avatar {
  width: 96px;
  height: 96px;
  font-size: 32px;
  box-shadow: 0 0 0 4px rgba(255, 60, 130, 0.25), 0 0 32px rgba(255, 60, 130, 0.4);
}

.mf-morning-card__name,
.mf-elim-card__name {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.06em;
  margin: 4px 0;
}

.mf-morning-card__role-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #b8bcd8;
}

.mf-morning-card__role,
.mf-elim-card__role {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--mf-accent, #cb45ff);
  color: var(--mf-accent, #cb45ff);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 14px;
  background: rgba(20, 12, 36, 0.6);
  box-shadow: 0 0 18px rgba(203, 69, 255, 0.18);
}

.mf-morning-card__sub,
.mf-elim-card__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: #98a0c0;
}

.mf-morning__cta,
.mf-elimination__cta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mf-morning__cta-hint {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: #8f96b8;
}

.mf-mini-timer {
  text-align: center;
  font-size: 12px;
  color: #98a0c0;
}

.mf-mini-timer b { color: #ff8fb8; }

/* ----- Discussion ----- */
.mf-discussion {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mf-discussion__title {
  margin: 0;
  text-align: center;
  font-size: clamp(26px, 7vw, 32px);
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #ff5cf6, #ff2a8b);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(255, 60, 130, 0.4);
}

.mf-discussion__sub {
  margin: 0;
  text-align: center;
  color: #b8bcd8;
  font-size: 14px;
}

.mf-bigtimer {
  width: clamp(140px, 38vw, 180px);
  height: clamp(140px, 38vw, 180px);
  margin: 4px auto;
  border-radius: 50%;
  border: 4px solid rgba(255, 60, 130, 0.6);
  box-shadow: 0 0 60px rgba(255, 60, 130, 0.4), inset 0 0 40px rgba(255, 60, 130, 0.18);
  display: grid;
  place-items: center;
  background: rgba(10, 6, 28, 0.7);
  flex-shrink: 0;
}

.mf-bigtimer__value {
  font-size: clamp(40px, 12vw, 52px);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 0 24px rgba(255, 60, 130, 0.6);
  line-height: 1;
  text-align: center;
  display: block;
}

.mf-speaker-card {
  margin: 4px auto 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(14, 8, 30, 0.78);
  border: 1px solid rgba(255, 60, 130, 0.3);
  max-width: 92%;
}

.mf-speaker-card.is-mine {
  border-color: rgba(70, 211, 200, 0.7);
  box-shadow: 0 0 24px rgba(70, 211, 200, 0.3);
  background: rgba(8, 30, 28, 0.8);
}

.mf-speaker-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.mf-speaker-card__avatar img,
.mf-speaker-card__avatar .mf-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mf-speaker-card__name {
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex: 1;
  text-align: left;
}

.mf-speaker-card__badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #ffb1d4;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 60, 130, 0.18);
}

.mf-discussion__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 4px 0;
}

.mf-discussion__cta .mf-btn {
  width: min(92%, 360px);
}

.mf-discussion__cta-hint {
  margin: 0;
  font-size: 12px;
  color: #8f96b8;
}

.mf-prow__badge--active {
  background: rgba(70, 211, 200, 0.22);
  color: #6deaff;
  animation: mfPulse 1.4s infinite ease-in-out;
}

.mf-prow__badge--done {
  background: rgba(46, 213, 130, 0.18);
  color: #7ee5a4;
}

.mf-prow__badge--wait {
  background: rgba(180, 180, 220, 0.12);
  color: #aab0d4;
}

@keyframes mfPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 0.45; }
}

.mf-prow.is-current {
  border-color: rgba(70, 211, 200, 0.7);
  background: rgba(10, 30, 36, 0.5);
  box-shadow: 0 0 18px rgba(70, 211, 200, 0.25);
}

.mf-discussion__footnote {
  margin: 4px 0 0;
  text-align: center;
  font-size: 12px;
  color: #8f96b8;
}

/* ----- Voting ----- */
.mf-voting__title {
  margin: 0;
  text-align: center;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #ff5cf6, #ff2a8b);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.mf-voting__sub {
  margin: 0;
  text-align: center;
  color: #b8bcd8;
  font-size: 14px;
}

.mf-myvote-card {
  text-align: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(14, 8, 30, 0.75);
  border: 1px solid rgba(255, 60, 130, 0.3);
}

.mf-myvote-card__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #ff8fb8;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.mf-myvote-card__value {
  display: block;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
}

.mf-voting-targets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mf-vote-target {
  appearance: none;
  border: 1px solid rgba(110, 90, 220, 0.3);
  border-radius: 14px;
  background: rgba(20, 12, 36, 0.7);
  color: #fff;
  padding: 10px 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mf-vote-target:hover { border-color: #ff8fb8; }

.mf-vote-target.is-selected {
  border-color: #ff2a8b;
  background: rgba(255, 60, 130, 0.18);
  box-shadow: 0 0 0 2px #ff2a8b, 0 0 24px rgba(255, 60, 130, 0.3);
}

.mf-vote-target__name {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mf-vote-target:disabled { opacity: 0.5; cursor: not-allowed; }

.mf-vote-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(28, 18, 50, 0.55);
  border: 1px solid rgba(110, 90, 220, 0.18);
}

.mf-vote-row.is-leader {
  border-color: #ff2a8b;
  background: rgba(255, 60, 130, 0.18);
  box-shadow: 0 0 0 1px #ff2a8b, 0 0 16px rgba(255, 60, 130, 0.18);
}

.mf-vote-row.is-dead { opacity: 0.45; }

.mf-vote-count {
  margin-left: auto;
  font-weight: 900;
  color: #ff8fb8;
  font-size: 18px;
}

.mf-voting__empty {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: #8f96b8;
}

.mf-voting__cta-hint {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: #8f96b8;
}

/* ----- Final ----- */
.mf-finale {
  text-align: center;
}

.mf-finale__title {
  margin: 6px 0 0;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.mf-finale__title span {
  background: linear-gradient(90deg, #ff5cf6, #ff2a8b);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.mf-finale--civ .mf-finale__title span {
  background: linear-gradient(90deg, #88e0ff, #6da0ff);
  background-clip: text;
  -webkit-background-clip: text;
}

.mf-finale__sub {
  margin: 4px 0 6px;
  color: #b8bcd8;
}

.mf-finale__art {
  position: relative;
  width: min(90vw, 380px);
  height: 280px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.mf-finale__hero {
  position: relative;
  z-index: 1;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(255, 60, 130, 0.5));
}

.mf-finale--civ .mf-finale__hero {
  filter: drop-shadow(0 0 30px rgba(70, 211, 255, 0.5));
}

.mf-finale__halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 60%, rgba(255, 60, 130, 0.55) 0%, transparent 70%);
  filter: blur(30px);
}

.mf-finale--civ .mf-finale__halo {
  background: radial-gradient(50% 50% at 50% 60%, rgba(70, 211, 255, 0.55) 0%, transparent 70%);
}

.mf-finale__icon {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(10, 6, 28, 0.85);
  border: 2px solid #ff2a8b;
  color: #ff2a8b;
  display: grid;
  place-items: center;
  box-shadow: 0 0 32px rgba(255, 60, 130, 0.5);
}

.mf-finale__icon[hidden],
.mf-finale__hero[hidden] {
  display: none !important;
}

.mf-finale--civ .mf-finale__icon {
  border-color: #46d3ff;
  color: #88e0ff;
  box-shadow: 0 0 32px rgba(70, 211, 255, 0.5);
}

.mf-finale__icon .mf-icon { width: 60px; height: 60px; }

.mf-best-card {
  border-radius: 18px;
  border: 1px solid rgba(110, 90, 220, 0.3);
  padding: 12px;
  background: rgba(14, 8, 30, 0.78);
}

.mf-best-card__title {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #ff8fb8;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-align: center;
}

.mf-best-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mf-best-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(28, 18, 50, 0.5);
  border: 1px solid rgba(110, 90, 220, 0.18);
}

.mf-best-row__num {
  width: 22px;
  text-align: center;
  font-weight: 900;
  color: #ff8fb8;
}

.mf-best-row strong { flex: 1; font-size: 14px; }

.mf-best-row__role {
  font-size: 11px;
  color: var(--mf-accent, #cb45ff);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.mf-finale__cta { display: flex; flex-direction: column; gap: 6px; }
.mf-finale__cta-hint { margin: 0; text-align: center; color: #8f96b8; font-size: 12px; }

@media (max-width: 380px) {
  .mf-pcount-btn { min-width: 56px; font-size: 16px; padding: 10px; }
  .mf-bigtimer { width: 180px; height: 180px; }
  .mf-bigtimer__value { font-size: 40px; }
  .mf-role-reveal__title { font-size: 44px; }
  .mf-voting-targets { grid-template-columns: repeat(2, 1fr); }
}
