:root {
  --ink: #071422;
  --ink-2: #0d2238;
  --panel: rgba(14, 36, 58, 0.78);
  --fog: #9ec9e0;
  --mist: #d7ebf5;
  --amber: #e8a838;
  --amber-soft: #f3c56a;
  --ok: #3dcf9a;
  --bad: #ff6b7a;
  --line: rgba(158, 201, 224, 0.18);
  --text: #e8f3fa;
  --muted: #8fb0c4;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --font: "Nunito", system-ui, sans-serif;
  --display: "Outfit", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--ink);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(62, 140, 190, 0.32), transparent 55%),
    radial-gradient(900px 480px at 92% 8%, rgba(232, 168, 56, 0.16), transparent 50%),
    linear-gradient(180deg, #06101c 0%, #0a1c30 50%, #071422 100%);
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(7, 20, 34, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-link {
  border: 0;
  background: transparent;
  color: var(--mist);
  font-weight: 700;
  cursor: pointer;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
}

.nav-link:hover {
  background: rgba(158, 201, 224, 0.1);
  color: var(--amber-soft);
}

.contact-wrap {
  display: grid;
  place-items: center;
  padding: 0.5rem 0 1rem;
}

.contact-card {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--mist);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 20, 34, 0.65);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(232, 168, 56, 0.4);
  border-color: transparent;
}

.contact-form input:disabled,
.contact-form textarea:disabled {
  opacity: 0.55;
}

.brand-logo {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.55rem;
  object-fit: cover;
  display: block;
  background: #071422;
}

.credit {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.credit strong {
  color: var(--amber-soft);
  font-weight: 800;
}

.site-credit {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  background: linear-gradient(180deg, transparent, rgba(7, 20, 34, 0.92) 35%);
  pointer-events: none;
}

.site-credit strong {
  color: var(--amber-soft);
  font-weight: 800;
}

.site-credit .dot {
  opacity: 0.5;
}

body.playing .site-credit {
  background: rgba(7, 20, 34, 0.78);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.selector {
  padding-top: 0.75rem;
}

.home-layout {
  display: grid;
  grid-template-columns: 240px 1fr 260px;
  gap: 1.25rem;
  align-items: start;
  min-height: calc(100vh - 6rem);
}

@media (min-width: 901px) {
  body.on-home {
    overflow: hidden;
    height: 100%;
    overscroll-behavior: none;
    display: flex;
    flex-direction: column;
  }

  body.on-home .topbar {
    flex: 0 0 auto;
  }

  body.on-home main {
    width: min(1280px, calc(100% - 1.5rem));
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 0.85rem 0 2.6rem;
    box-sizing: border-box;
  }

  body.on-home .home-layout {
    min-height: 0;
    height: auto;
    overflow: hidden;
    align-items: start;
    grid-template-columns: 220px minmax(0, 1fr) 250px;
    gap: 1rem;
  }

  body.on-home .home-sidebar,
  body.on-home .home-live {
    position: static;
    align-self: start;
    height: auto;
    max-height: calc(100dvh - 5.5rem);
    overflow: auto;
    scrollbar-width: none;
  }

  body.on-home .home-sidebar::-webkit-scrollbar,
  body.on-home .home-live::-webkit-scrollbar {
    display: none;
  }

  body.on-home .live-side-card {
    height: auto;
    flex: none;
  }

  body.on-home .home-games {
    align-self: start;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  body.on-home .grid-games {
    flex: none;
    height: auto;
    overflow: visible;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 0.85rem;
  }

  body.on-home .game-card {
    height: auto;
    min-height: 0;
    display: block;
    justify-content: unset;
    padding: 1.05rem 1.1rem;
  }

  body.on-home .game-card p {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
  }
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.home-brand img {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.65rem;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.home-brand h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  color: var(--amber-soft);
  line-height: 1.1;
}

.home-brand p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.home-sidebar {
  position: sticky;
  top: 4.5rem;
  padding: 1rem;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.home-live {
  position: sticky;
  top: 4.5rem;
}

.live-side-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(232, 168, 56, 0.35);
  cursor: pointer;
  padding: 1.15rem;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(232, 168, 56, 0.16), rgba(14, 36, 58, 0.9));
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.15s;
}

.live-side-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 168, 56, 0.65);
}

.live-side-card .icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.live-side-card .icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.live-side-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--amber-soft);
}

.live-side-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.live-side-cta {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), #ff8a3d);
  color: #1a1205;
  font-weight: 800;
  font-size: 0.82rem;
}

.side-title {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-soft);
}

.side-title + .side-stack + .side-title {
  margin-top: 1.15rem;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.side-chip {
  width: 100%;
  text-align: left;
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
}

.home-games {
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.65rem;
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.65rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), #ff8a3d);
  color: #1a1205;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.8rem;
}

.brand-text {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.score-pill {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(232, 168, 56, 0.14);
  color: var(--amber-soft);
  font-weight: 800;
  font-size: 0.9rem;
  border: 1px solid rgba(232, 168, 56, 0.25);
  cursor: pointer;
  font-family: inherit;
}

.score-pill:hover {
  background: rgba(232, 168, 56, 0.22);
}

main {
  width: min(1280px, calc(100% - 1.25rem));
  margin: 0 auto;
  padding: 1.25rem 0 3.5rem;
}

body.playing {
  overflow: hidden;
}

body.playing .topbar {
  display: none;
}

body.playing main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.playing #app,
body.playing #app > .game-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

body.playing #app > .game-stage {
  padding-bottom: 2.35rem;
  box-sizing: border-box;
}

.btn {
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.15s, background 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber), #ff8a3d);
  color: #1a1205;
  box-shadow: 0 10px 28px rgba(232, 168, 56, 0.28);
}

.btn-ghost {
  background: rgba(158, 201, 224, 0.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ok {
  background: rgba(61, 207, 154, 0.16);
  color: var(--ok);
  border: 1px solid rgba(61, 207, 154, 0.3);
}

.btn-bad {
  background: rgba(255, 107, 122, 0.14);
  color: #ffb0b8;
  border: 1px solid rgba(255, 107, 122, 0.28);
}

.section-title {
  margin: 1.5rem 0 0.25rem;
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: -0.03em;
}

.section-sub {
  margin: 0 0 1rem;
  color: var(--muted);
  font-weight: 600;
}

.grid-games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.game-card {
  text-align: left;
  border: 1px solid var(--line);
  cursor: pointer;
  padding: 1.15rem;
  border-radius: 20px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 168, 56, 0.45);
  background: rgba(16, 42, 66, 0.92);
}

.game-card .icon {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
  background: transparent;
  margin-bottom: 0.75rem;
  overflow: hidden;
  padding: 0;
}

.game-card .icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0.75rem;
}

.game-card h3 {
  margin: 0 0 0.3rem;
  font-family: var(--display);
  font-size: 1.1rem;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.chip {
  border: 1px solid transparent;
  background: rgba(158, 201, 224, 0.08);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  cursor: pointer;
  font-weight: 700;
}

.chip.active {
  color: var(--text);
  border-color: rgba(232, 168, 56, 0.5);
  background: rgba(232, 168, 56, 0.14);
}

/* Game stage — full site */
.game-stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100%;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0a1c30;
  border: 0;
  box-shadow: none;
  animation: rise 0.35s ease both;
}

.game-stage.bg-quiz,
.game-stage.bg-drag,
.game-stage.bg-soft {
  background:
    radial-gradient(circle at 18% 15%, rgba(62, 140, 190, 0.28), transparent 42%),
    radial-gradient(circle at 85% 8%, rgba(232, 168, 56, 0.14), transparent 38%),
    linear-gradient(180deg, #0a1c30, #071422);
}

.stage-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  background: rgba(7, 20, 34, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.stage-top h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
}

.stage-top .spacer {
  flex: 1;
}

.page-dots {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.page-dots span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: rgba(158, 201, 224, 0.22);
}

.page-dots span.on {
  background: var(--amber);
  transform: scale(1.15);
}

.stage-body {
  flex: 1;
  padding: 1.5rem 1.25rem 2rem;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
}

.quiz-card {
  width: min(720px, 94%);
  background: rgba(14, 36, 58, 0.88);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.howto-card {
  width: min(520px, 94%);
  background: rgba(14, 36, 58, 0.92);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.howto-steps {
  margin: 0;
  padding: 0 0 0 1.2rem;
  display: grid;
  gap: 0.65rem;
  color: var(--mist);
  font-weight: 600;
  line-height: 1.4;
}

.howto-steps li::marker {
  color: var(--amber-soft);
  font-weight: 800;
}

.quiz-card .lang-tag {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(232, 168, 56, 0.14);
  color: var(--amber-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quiz-question {
  margin: 0 0 1.15rem;
  font-family: var(--display);
  font-size: clamp(1.25rem, 3.4vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--mist);
}

.quiz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.quiz-opt {
  border: 1px solid var(--line);
  cursor: pointer;
  min-height: 72px;
  padding: 0.9rem 0.75rem;
  border-radius: 18px;
  background: rgba(7, 20, 34, 0.55);
  color: var(--text);
  font-weight: 700;
  transition: transform 0.12s, border-color 0.12s, background 0.12s;
}

.quiz-opt:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(232, 168, 56, 0.55);
}

.quiz-opt.correct {
  background: rgba(61, 207, 154, 0.14);
  color: var(--ok);
  border-color: var(--ok);
}

.quiz-opt.wrong {
  background: rgba(255, 107, 122, 0.12);
  color: #ffb0b8;
  border-color: var(--bad);
  animation: shake 0.35s ease;
}

.quiz-opt:disabled {
  cursor: default;
}

.drag-layout {
  width: min(1400px, 98%);
  display: grid;
  gap: 2rem;
}

.drag-layout > .muted {
  font-size: 1.2rem;
}

.slots-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  align-items: start;
}

.slot {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
}

.slot-label {
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
  color: var(--mist);
  line-height: 1.3;
  min-height: 2.8em;
  font-family: var(--display);
}

.slot-box {
  position: relative;
  width: 100%;
  min-height: 130px;
  border-radius: 18px;
  background: rgba(14, 36, 58, 0.55);
  border: 2px dashed rgba(158, 201, 224, 0.28);
  display: grid;
  place-items: center;
  padding: 0.9rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}

.slot-box.over {
  background: rgba(232, 168, 56, 0.12);
  border-color: var(--amber);
}

.slot-box.filled {
  background: rgba(14, 36, 58, 0.88);
  border-style: solid;
  border-color: rgba(158, 201, 224, 0.25);
  cursor: pointer;
}

.slot-box.ok {
  border-color: var(--ok);
  background: rgba(61, 207, 154, 0.12);
}

.slot-box.ko {
  border-color: var(--bad);
  background: rgba(255, 107, 122, 0.12);
}

.slot-answer {
  padding-right: 1.2rem;
}

.slot-remove {
  position: absolute;
  top: 0.25rem;
  right: 0.35rem;
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 107, 122, 0.2);
  color: #ffb0b8;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  font-weight: 800;
}

.slot-remove:hover {
  background: rgba(255, 107, 122, 0.4);
}

.cards-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.2rem;
  border-radius: 22px;
  background: rgba(7, 20, 34, 0.45);
  border: 1px solid var(--line);
}

.drag-card {
  cursor: grab;
  user-select: none;
  max-width: 300px;
  min-width: 200px;
  min-height: 96px;
  padding: 1.15rem 1.05rem;
  border-radius: 18px;
  background: rgba(16, 42, 66, 0.95);
  border: 1px solid rgba(232, 168, 56, 0.35);
  color: var(--text);
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: 1.1rem;
  text-align: center;
  display: grid;
  place-items: center;
  touch-action: none;
}

.drag-card:active {
  cursor: grabbing;
}

.drag-card.used {
  opacity: 0.35;
  pointer-events: none;
}

.drag-card.dragging {
  opacity: 0.55;
}

.flash-wrap {
  width: min(380px, 88vw);
  perspective: 1400px;
}

.flash-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  min-height: 0;
  height: auto;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.1, 0.2, 1);
  cursor: pointer;
}

.flash-card.flipped {
  transform: rotateY(180deg);
}

.flash-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.75rem 1.4rem;
  text-align: center;
}

.flash-face.front {
  background:
    linear-gradient(90deg, var(--amber) 0 12px, transparent 12px),
    linear-gradient(165deg, #184062 0%, #102a42 55%, #0d2238 100%);
}

.flash-face.back {
  background:
    linear-gradient(90deg, var(--ok) 0 12px, transparent 12px),
    linear-gradient(165deg, #174840 0%, #123c3a 55%, #0d2238 100%);
  transform: rotateY(180deg);
}

.flash-face .small {
  position: absolute;
  top: 1.15rem;
  left: 1.7rem;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
}

.flash-face .word {
  font-family: var(--display);
  font-size: clamp(1.45rem, 4.2vw, 2rem);
  letter-spacing: -0.02em;
  color: var(--mist);
  line-height: 1.25;
  max-width: 16ch;
}

.type-card {
  width: min(560px, 94%);
  background: rgba(14, 36, 58, 0.88);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.type-card input {
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(7, 20, 34, 0.65);
  color: var(--text);
  font-weight: 700;
}

.type-card input:focus {
  outline: 2px solid rgba(232, 168, 56, 0.4);
  border-color: transparent;
}

.feedback-pop {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(7, 20, 34, 0.75);
  border: 1px solid var(--line);
  animation: rise 0.25s ease both;
}

.feedback-pop.ok {
  border-left: 5px solid var(--ok);
}

.feedback-pop.bad {
  border-left: 5px solid var(--bad);
}

.feedback-pop h4 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
}

.feedback-pop p {
  margin: 0.25rem 0;
  font-weight: 600;
  color: var(--mist);
}

.feedback-pop .why {
  color: var(--muted);
  font-size: 0.92rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.review-wrap {
  background: var(--panel);
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.review-list {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
}

.review-item {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(7, 20, 34, 0.5);
  border: 1px solid var(--line);
}

.review-item.ok {
  border-color: rgba(61, 207, 154, 0.35);
  background: rgba(61, 207, 154, 0.08);
}

.review-item.bad {
  border-color: rgba(255, 107, 122, 0.35);
  background: rgba(255, 107, 122, 0.08);
}

.review-item h4 {
  margin: 0 0 0.25rem;
  font-family: var(--display);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.stat {
  background: var(--panel);
  border-radius: 18px;
  padding: 1rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--amber-soft);
}

.muted {
  color: var(--muted);
  font-weight: 600;
}

.hint-mask {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(7, 20, 34, 0.65);
  border: 1px dashed rgba(232, 168, 56, 0.35);
  text-align: center;
  font-family: var(--display);
  font-size: 1.55rem;
  letter-spacing: 0.14em;
  color: var(--mist);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

@media (max-width: 1100px) {
  .home-layout {
    grid-template-columns: 220px 1fr;
  }

  .home-live {
    grid-column: 1 / -1;
    position: static;
  }
}

@media (max-width: 900px) {
  .home-layout {
    grid-template-columns: 1fr;
  }

  .home-sidebar,
  .home-live {
    position: static;
  }

  .side-stack {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .side-chip {
    width: auto;
  }

  .credit {
    display: none;
  }

  .nav-link {
    font-size: 0.85rem;
    padding: 0.35rem 0.5rem;
  }
}

@media (max-width: 720px) {
  .quiz-grid {
    grid-template-columns: 1fr;
  }

  .slots-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .stage-body {
    padding: 1rem 0.85rem 1.5rem;
  }
}

/* —— Splash intro —— */
body.splash-active .topbar,
body.splash-active .site-credit,
body.splash-active main {
  opacity: 0;
  pointer-events: none;
}

body.ready .topbar,
body.ready .site-credit,
body.ready main {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.45s ease;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 500px at 50% 40%, rgba(62, 140, 190, 0.28), transparent 55%),
    radial-gradient(700px 400px at 80% 20%, rgba(232, 168, 56, 0.12), transparent 45%),
    #071422;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  text-align: center;
}

.splash-logo {
  position: relative;
  width: min(340px, 78vw);
  height: min(340px, 78vw);
  animation: splashLogoIn 0.7s ease both;
}

.splash-ticket,
.splash-ticket-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 28px;
  display: block;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}

.splash-plane-img {
  position: absolute;
  left: 20%;
  top: 34%;
  width: 62%;
  height: auto;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.4));
  animation: planeBob 1.1s ease-in-out 0.55s 1 both;
}

.splash.plane-fly .splash-plane-img {
  animation: planeTakeoff 1.3s cubic-bezier(0.22, 0.7, 0.25, 1) forwards;
}

.splash.plane-fly .splash-ticket-img {
  animation: ticketFlash 0.7s ease both;
}

.splash-brand {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 10vw, 4.6rem);
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, #fff 10%, var(--fog) 55%, var(--amber-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: splashLogoIn 0.7s ease 0.12s both;
}

.splash-tag {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  animation: splashLogoIn 0.7s ease 0.22s both;
}

@keyframes splashLogoIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes planeBob {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(4px, -6px) rotate(-2deg);
  }
}

@keyframes planeTakeoff {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  30% {
    opacity: 1;
    transform: translate(70px, -85px) scale(1.28) rotate(-8deg);
  }
  100% {
    opacity: 0;
    transform: translate(300px, -260px) scale(0.9) rotate(-24deg);
  }
}

@keyframes ticketFlash {
  0%,
  100% {
    filter: brightness(1);
  }
  40% {
    filter: brightness(1.2);
  }
}

.home-layout.is-entering .home-sidebar {
  animation: rise 0.55s ease both;
}

.home-layout.is-entering .game-card {
  opacity: 0;
  animation: rise 0.5s ease forwards;
}

.home-layout.is-entering .game-card:nth-child(1) { animation-delay: 0.05s; }
.home-layout.is-entering .game-card:nth-child(2) { animation-delay: 0.12s; }
.home-layout.is-entering .game-card:nth-child(3) { animation-delay: 0.19s; }
.home-layout.is-entering .game-card:nth-child(4) { animation-delay: 0.26s; }
.home-layout.is-entering .game-card:nth-child(5) { animation-delay: 0.33s; }
.live-wrap {
  display: grid;
  place-items: center;
  padding: 0.5rem 0 1.5rem;
}

.live-hero,
.live-pin-card,
.live-question {
  width: min(720px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.live-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  font-weight: 700;
  color: var(--mist);
}

.live-field input,
.live-field select,
.live-field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(7, 20, 34, 0.65);
  color: var(--text);
  font: inherit;
}

.live-pin {
  font-family: var(--display);
  font-size: clamp(3rem, 12vw, 5rem);
  letter-spacing: 0.18em;
  text-align: center;
  color: var(--amber-soft);
  margin: 0.35rem 0 0.75rem;
}

.live-players {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 1rem;
}

.live-chip {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(232, 168, 56, 0.14);
  color: var(--amber-soft);
  font-weight: 700;
}

.live-choices,
.live-player-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.stage-body.live-player-body,
.stage-body.live-host-play {
  display: flex;
  place-items: unset;
  align-content: unset;
  width: 100%;
  max-width: none;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.stage-body.live-player-body {
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  padding: 0.75rem 1.15rem 1rem;
}

.live-player-prompt {
  margin: 0;
  text-align: center;
  flex: 0 0 auto;
  font-family: var(--display);
  font-size: clamp(1.4rem, 3.8vw, 2.2rem);
  line-height: 1.3;
  color: var(--text);
  padding: 1.1rem 0.75rem 0.35rem;
}

.live-player-body .live-player-grid {
  margin: auto 0 0;
  gap: 0.8rem;
  width: min(100%, 980px);
  align-self: center;
  flex: 1 1 auto;
  min-height: 250px;
  max-height: min(500px, 58dvh);
  height: 100%;
  grid-template-rows: 1fr 1fr;
}

.live-choice,
.live-answer {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 74px;
  padding: 0.9rem;
  border-radius: 16px;
  border: 0;
  background: color-mix(in srgb, var(--c) 88%, black);
  color: #fff;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.live-player-body .live-answer,
.live-host-play .live-choice {
  min-height: 0;
  height: 100%;
  width: 100%;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  font-size: clamp(1.05rem, 2.6vw, 1.4rem);
  line-height: 1.25;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.live-choice.is-correct {
  outline: 3px solid var(--ok);
}

.live-choice-n {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 0.4rem;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.live-player-body .live-choice-n,
.live-host-play .live-choice-n {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  font-size: 0.98rem;
}

.live-board {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.45rem;
}

.live-board-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: rgba(7, 20, 34, 0.5);
  border: 1px solid var(--line);
  font-weight: 700;
}

.live-board-row.top {
  border-color: rgba(232, 168, 56, 0.45);
  background: rgba(232, 168, 56, 0.1);
}

.live-board-name {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-board-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.live-host-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 1rem;
  align-items: start;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.stage-body.live-host-body.live-host-play {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 400px);
  gap: 1rem;
  align-items: stretch;
  max-width: none;
  width: 100%;
  padding: 0.75rem 1.1rem 0.95rem;
}

.live-host-body .live-pin-card,
.live-host-body .live-question {
  width: 100%;
}

.live-question-fill {
  width: 100%;
  max-width: none;
  min-height: 0;
  height: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.live-host-play .live-player-prompt {
  flex: 0 0 auto;
  font-size: clamp(1.3rem, 3vw, 2rem);
  padding: 0.65rem 0.5rem 0.15rem;
}

.live-host-play .live-host-bar {
  flex: 0 0 auto;
  margin: 0.15rem 0 0.35rem;
}

.live-host-play .live-choices {
  margin: 0;
  flex: 1 1 auto;
  min-height: 220px;
  max-height: min(480px, 52dvh);
  height: 100%;
  gap: 0.75rem;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  align-self: stretch;
}

.live-host-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem 1.1rem;
}

.live-host-bar .muted {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--mist);
}

.live-host-bar .live-stat {
  font-size: 1.15rem;
}

.live-host-bar .btn {
  padding: 0.95rem 1.55rem;
  font-size: 1.1rem;
  min-height: 3rem;
}

.live-host-play .live-rank-panel {
  position: static;
  height: 100%;
  max-height: none;
  align-self: stretch;
  min-width: 0;
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

.live-host-play .live-rank-panel h3 {
  margin: 0 0 0.65rem;
  flex: 0 0 auto;
}

.live-host-play .live-rank-panel .live-board {
  flex: 0 1 auto;
  margin-top: 0;
  overflow: auto;
  align-content: start;
}

.live-host-play .live-board-row {
  flex-wrap: wrap;
  row-gap: 0.35rem;
}

.live-host-play .live-board-meta {
  margin-left: auto;
}

.live-rank-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0.75rem;
  max-height: calc(100dvh - 5.5rem);
  overflow: auto;
}

.live-rank-panel h3 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--amber-soft);
}

.live-rank-panel .live-board {
  margin-top: 0;
}

.live-stat {
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.live-stat.ok,
.live-ans-badge.ok {
  color: #7ddea0;
}

.live-stat.bad,
.live-ans-badge.bad {
  color: #ff8f9a;
}

.live-ans-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
}

.live-ans-badge.wait {
  color: var(--mist);
}

.live-podium-body {
  align-items: stretch;
}

.live-podium-wrap {
  position: relative;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.4rem 1.2rem 1.6rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
}

.live-podium-kicker {
  margin: 0;
  color: var(--amber-soft);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  animation: podiumFadeIn 0.45s ease both;
}

.live-podium-title {
  margin: 0.35rem 0 1.25rem;
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  animation: podiumFadeIn 0.5s ease 0.1s both;
}

.live-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 0.65rem;
  min-height: 280px;
  position: relative;
  z-index: 1;
}

.live-podium-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  opacity: 0;
  transform: translateY(40px) scale(0.92);
}

.live-podium-slot.order-a {
  animation: podiumRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.live-podium-slot.order-b {
  animation: podiumRise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 1.55s both;
}

.live-podium-slot.order-c {
  animation: podiumRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.95s both;
}

.live-podium-slot.place-1 .live-podium-block {
  height: 140px;
  background: linear-gradient(180deg, #f0c14b, #c98a14);
}

.live-podium-slot.place-2 .live-podium-block {
  height: 100px;
  background: linear-gradient(180deg, #c9d4e3, #8a9bb0);
}

.live-podium-slot.place-3 .live-podium-block {
  height: 72px;
  background: linear-gradient(180deg, #d4a574, #9a6840);
}

.live-podium-block {
  width: 100%;
  border-radius: 14px 14px 8px 8px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  color: rgba(7, 20, 34, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.live-podium-avatar {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.25rem;
  background: rgba(62, 140, 190, 0.35);
  border: 2px solid rgba(232, 168, 56, 0.55);
  color: #fff;
}

.live-podium-slot.place-1 .live-podium-avatar {
  width: 3.6rem;
  height: 3.6rem;
  background: rgba(232, 168, 56, 0.35);
  box-shadow: 0 0 0 4px rgba(232, 168, 56, 0.15);
}

.live-podium-name {
  font-weight: 800;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 0.25rem;
}

.live-podium-score {
  font-size: 0.92rem;
  color: var(--amber-soft);
  font-weight: 800;
}

.live-podium-stats {
  display: flex;
  gap: 0.45rem;
  font-size: 0.8rem;
}

.live-podium-medal {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.live-podium-slot.place-1 .live-podium-medal {
  background: radial-gradient(circle at 35% 30%, #ffe7a3, #e0a820);
}

.live-podium-slot.place-2 .live-podium-medal {
  background: radial-gradient(circle at 35% 30%, #f0f4f8, #9aabbf);
}

.live-podium-slot.place-3 .live-podium-medal {
  background: radial-gradient(circle at 35% 30%, #efc39a, #b07442);
}

.live-podium-crown {
  width: 1.9rem;
  height: 1.15rem;
  position: relative;
  margin-bottom: -0.15rem;
  background: linear-gradient(180deg, #ffd76a, #e0a820);
  clip-path: polygon(0 100%, 0 40%, 20% 70%, 40% 20%, 60% 70%, 80% 20%, 100% 40%, 100% 100%);
  animation: crownBounce 0.7s ease 2.2s both;
}

.live-podium-slot.is-empty {
  opacity: 0.35;
}

.live-podium-confetti {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.live-podium-me {
  position: relative;
  z-index: 1;
  margin-top: 1.35rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(232, 168, 56, 0.35);
  background: rgba(232, 168, 56, 0.1);
  animation: podiumFadeIn 0.55s ease 2.35s both;
}

.live-podium-me-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.55rem;
  font-weight: 700;
  color: var(--mist);
}

.live-podium-me-stats strong {
  color: var(--amber-soft);
  font-size: 1.15rem;
}

.live-podium-me-stats .dot {
  opacity: 0.55;
}

.live-podium-me-msg {
  margin: 0.55rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  color: var(--text);
}

.live-podium-confetti i {
  position: absolute;
  top: -12px;
  left: calc(8% + (var(--i) * 5%));
  width: 8px;
  height: 12px;
  border-radius: 2px;
  background: hsl(calc(28 + var(--i) * 17), 80%, 58%);
  opacity: 0;
  animation: confettiFall 1.8s ease-out calc(1.7s + var(--i) * 0.04s) both;
}

@keyframes podiumFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes podiumRise {
  0% { opacity: 0; transform: translateY(48px) scale(0.9); }
  70% { opacity: 1; transform: translateY(-6px) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes crownBounce {
  0% { opacity: 0; transform: translateY(-12px) scale(0.6); }
  60% { opacity: 1; transform: translateY(2px) scale(1.15); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes confettiFall {
  0% { opacity: 0; transform: translateY(0) rotate(0deg); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translateY(260px) rotate(220deg); }
}

@media (max-width: 980px) {
  .stage-body.live-host-body.live-host-play {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  }
}

@media (max-width: 900px) {
  .live-host-body {
    grid-template-columns: 1fr;
  }

  .stage-body.live-host-body.live-host-play {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .live-rank-panel {
    position: static;
    max-height: none;
    order: 2;
  }

  .live-host-play .live-rank-panel {
    height: auto;
    max-height: 30vh;
  }
}

@media (max-width: 720px) {
  .live-host-play .live-choices,
  .live-player-body .live-player-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    max-height: min(420px, 52dvh);
    min-height: 210px;
  }

  .live-player-body .live-answer,
  .live-host-play .live-choice {
    font-size: clamp(0.98rem, 3.5vw, 1.2rem);
    padding: 0.85rem 0.9rem;
  }

  .live-podium {
    min-height: 240px;
    gap: 0.4rem;
  }

  .live-podium-slot.place-1 .live-podium-block { height: 110px; }
  .live-podium-slot.place-2 .live-podium-block { height: 82px; }
  .live-podium-slot.place-3 .live-podium-block { height: 60px; }
}
