@import url("../base-style/flashcardsflow-base.css");

/* START: Global layout */
:root {
  --page-background: var(--bg);
}

body.dark {
  --page-background: var(--bg);
}

h1 {
  font-size: clamp(2.6rem, 5vw, 4.25rem);
  line-height: 0.95;
  font-family: "Unbounded", sans-serif;
  font-weight: 800 !important;
}

.setup-hero-title {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.25rem) !important;
  line-height: 0.92;
}

.setup-hero-subtitle {
  margin: 0;
  max-width: 38ch;
  font-size: clamp(1.25rem, 2vw, 2rem) !important;
  line-height: 1.3;
  font-weight: 600 !important;
}

h2 {
  font-family: "Unbounded", sans-serif;
  font-weight: 600;
}

.question-text,
.player-pill p,
.score-card-name p,
.ranking-player-name {
  font-weight: 900 !important;
}

[x-cloak] {
  display: none !important;
}

html,
body {
  scroll-behavior: smooth;
  background: var(--page-background);
}

body {
  overflow-x: hidden;
  background: var(--page-background);
}

.app-shell {
  min-height: 100vh;
  background: var(--page-background);
}

/* END: Global layout */

/* START: Top navigation */
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  z-index: 50;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  grid-column: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  line-height: 0;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  justify-self: end;
  grid-column: 3;
  position: relative;
  z-index: 51;
}

.topbar-home-nav {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  grid-column: 2;
  gap: 10px;
}

.topbar-game-progress {
  grid-column: 2;
}

.topbar-menu-item {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  color: var(--fg);
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: all 0.15s ease;
}

.topbar-menu-item i,
.topbar-menu-item span {
  color: inherit;
}

.topbar-menu-item i {
  font-size: 1.18em;
  line-height: 1;
}

.topbar-menu-item:hover {
  color: var(--fg);
  background: #F5B201;
}

.topbar-menu-item[aria-disabled="true"] {
  opacity: 0.58;
  pointer-events: none;
}

.topbar-menu-item.is-active {
  background: rgba(245, 180, 0, 0.508);
  color: var(--fg);
}

.topbar-game-progress {
  flex: 1 1 auto;
  min-width: 140px;
  max-width: 760px;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  min-height: 44px;
  overflow: visible;
  position: relative;
  z-index: 51;
}

.topbar-game-progress-compact {
  justify-content: center;
}

.topbar-game-question {
  margin: 0;
  text-align: center;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-progress-shell {
  flex: 1 1 auto;
  min-width: 160px;
  height: 10px;
  border: 0;
  box-shadow: none;
  background: rgba(15, 23, 42, 0.12);
}

.topbar-progress-shell .progress-bar {
  border-right: 0;
  border-radius: 999px;
}

.topbar-timer {
  flex: 0 0 auto;
  min-width: 92px;
  font-size: 1.25rem;
}

.topbar-finish-btn {
  flex: 0 0 auto;
}

.toggle:checked,
.toggle[aria-checked="true"] {
  background-color: #2d956d !important;
  border-color: #2d956d !important;
  color: #ffffff !important;
}

.toggle.toggle-error:checked,
.toggle.toggle-error[aria-checked="true"] {
  background-color: #2d956d !important;
  border-color: #2d956d !important;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(245, 178, 1, 0.25);
  border-radius: 14px;
  background: #f5b201;
  color: #0f172a;
  box-shadow: 0 12px 28px rgba(245, 178, 1, 0.28);
}

.brand-logo {
  display: block;
  width: auto;
  height: 58px;
  max-width: min(280px, 50vw);
  object-fit: contain;
}

.brutal-btn .ti {
  font-size: 2.20em;
  line-height: 1;
}

/* END: Top navigation */

/* START: Global footer */
.global-footer-shell {
  margin-top: 56px;
  padding: 28px 18px calc(34px + env(safe-area-inset-bottom));
  border-top: 3px solid var(--border);
  background: var(--bg);
  box-shadow: none;
}

.global-footer-inner {
  width: min(100%, 1320px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.global-footer-brand {
  display: flex;
  align-items: flex-start;
}

.global-footer-brand-link {
  opacity: 1;
}

.global-footer-brand-logo {
  height: 52px;
  max-width: min(260px, 56vw);
  opacity: 0.5;
}

.global-footer-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 36px);
}

.global-footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.global-footer-title {
  margin: 0 0 4px;
  color: rgba(15, 23, 42, 0.92);
}

.global-footer-link {
  color: rgba(15, 23, 42, 0.72);
  text-decoration: none;
  transition: color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.global-footer-link:hover,
.global-footer-link:focus-visible {
  color: rgba(15, 23, 42, 0.96);
  transform: translateX(2px);
}

body:has(.setup-actionbar) .global-footer-shell {
  padding-bottom: calc(124px + env(safe-area-inset-bottom));
}

body.dark .global-footer-shell {
  border-color: color-mix(in srgb, #136eb9 18%, rgba(255, 255, 255, 0.08));
  background:
    linear-gradient(180deg, rgba(9, 13, 26, 0.7), rgba(9, 13, 26, 0.94)),
    radial-gradient(circle at top left, rgba(19, 110, 185, 0.16), transparent 38%);
  box-shadow: 0 -16px 34px rgba(2, 6, 23, 0.24);
}

body.dark .global-footer-title {
  color: rgba(255, 255, 255, 0.9);
}

body.dark .global-footer-link {
  color: rgba(255, 255, 255, 0.68);
}

body.dark .global-footer-link:hover,
body.dark .global-footer-link:focus-visible {
  color: rgba(255, 255, 255, 0.96);
}

/* END: Global footer */

/* START: Cookie consent banner */
.cookie-consent-shell {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 60;
  width: min(360px, calc(100vw - 32px));
}

.cookie-consent-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
}

.cookie-consent-copy {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.6;
}

.cookie-consent-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cookie-consent-btn {
  min-width: 110px;
  justify-content: center;
}

body:has(.setup-actionbar) .cookie-consent-shell {
  bottom: calc(112px + env(safe-area-inset-bottom));
}

body.dark .cookie-consent-card {
  border-color: var(--border);
  background: var(--bg);
  box-shadow: var(--shadow);
}

/* END: Cookie consent banner */

/* START: Static info pages */
.static-page-shell {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.static-page-hero {
  display: grid;
  gap: 18px;
}

.static-page-intro {
  display: grid;
  gap: 16px;
}

.static-page-section-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.static-page-card {
  display: grid;
  gap: 16px;
  align-content: start;
}

.static-page-card-list {
  display: grid;
  gap: 10px;
}

.static-page-card-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.98rem;
  line-height: 1.6;
}

.static-page-card-item .ti {
  margin-top: 3px;
  color: var(--color-emerald, #2d956d);
}

.static-page-placeholder-note {
  display: grid;
  gap: 10px;
}

.static-page-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
}

.static-page-status .ti {
  font-size: 1rem;
}

/* END: Static info pages */

/* START: Legal prose pages */
.legal-page-shell {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 10px 0 24px;
}

.legal-page-hero {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.legal-page-updated {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.74;
}

.legal-page-prose {
  display: grid;
  gap: 28px;
  margin-top: 36px;
}

.legal-page-prose-section {
  display: grid;
  gap: 12px;
}

.legal-page-prose .section-title {
  font-size: clamp(1.55rem, 2vw, 2rem);
}

.legal-page-prose p {
  margin: 0;
  font-size: 1.03rem;
  line-height: 1.8;
}

.legal-page-prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-page-prose a.brutal-btn {
  text-decoration: none;
}

.legal-page-inline-note {
  font-weight: 700;
}

/* END: Legal prose pages */

/* START: Reusable copy blocks */
.section-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-kicker {
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}

.section-title {
  margin: 0;
  font-size: 1.85rem;
  line-height: 1.05;
  font-weight: 900;
  text-transform: none;
  letter-spacing: 0.00em;
}

.section-copy {
  margin: 0;
  max-width: 70ch;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.6;
  opacity: 0.82;
}

/* END: Reusable copy blocks */

/* START: App modals */
.app-modal::backdrop {
  background: rgba(15, 23, 42, 0.62);
}

.app-modal-box {
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg);
  color: var(--fg);
}

.app-modal-close {
  color: rgba(71, 85, 105, 0.9);
}

.app-modal-close:hover,
.app-modal-close:focus-visible {
  background: rgba(15, 23, 42, 0.06);
}

.app-modal-link-card {
  display: block;
  min-height: 100%;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--bg);
  text-decoration: none;
}

.app-modal-surface {
  border: 3px solid var(--border);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

body.dark .app-modal-box {
  border-color: var(--border);
  box-shadow: var(--shadow);
  background: var(--bg);
  color: var(--fg);
}

body.dark .app-modal-close {
  color: rgba(226, 232, 240, 0.82);
}

body.dark .app-modal-close:hover,
body.dark .app-modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

body.dark .app-modal-link-card {
  border-color: var(--border);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

body.dark .app-modal-surface {
  border-color: var(--border);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

/* END: App modals */

/* START: Alerts and helper cards */
.status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  font-weight: 700;
  background: var(--bg);
}

.status-banner-error {
  background: rgba(234, 82, 82, 0.14);
  border-color: #f04962;
}

.info-card,
.hotkey-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  font-weight: 700;
}

body.dark .info-card,
body.dark .hotkey-row {
  background: var(--bg);
}

/* END: Alerts and helper cards */

/* START: Setup mode and player list */
.mode-card {
  padding: 20px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.mode-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.mode-card-active {
  border-color: var(--border-selection);
  background: var(--bg-selection);
  box-shadow: var(--shadow-selection);
}

.player-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--bg);
}

.setup-screen {
  width: 100%;
}

.setup-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

/* START: Setup cards visual style */
.setup-column {
  --setup-accent-color: #136eb9;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.setup-grid>.setup-column:nth-child(2) {
  --setup-accent-color: #ffffff;
}

.setup-grid>.setup-column:nth-child(3) {
  --setup-accent-color: #2d956d;
}

.setup-column .step-index {
  border-color: var(--fg);
  color: var(--fg);
  background: rgba(255, 255, 255, 0.08);
}

.setup-column .option-row-icon {
  color: var(--fg);
}

body.dark .setup-column .step-index {
  border-color: var(--fg);
  color: var(--fg);
  background: rgba(255, 255, 255, 0.06);
}

/* END: Setup cards visual style */

.setup-screen .brutal-label {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.setup-screen .select,
.custom-shell .select,
.packs-toolbar-select,
.setup-screen .input,
.custom-shell .input,
.packs-toolbar-input {
  font-weight: 800;
}

body.dark .setup-screen .select,
body.dark .custom-shell .select,
body.dark .setup-screen .input,
body.dark .custom-shell .input,
body.dark .packs-toolbar-select,
body.dark .packs-toolbar-input {
  background-color: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.24);
  color: #e5e7eb;
}

.seo-zone {
  width: 100%;
  padding: 28px 0;
  background: rgba(15, 23, 42, 0.04);
}

.seo-zone-inner {
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 0 18px;
  display: grid;
  gap: clamp(28px, 4vw, 44px);
}

.seo-zone-heading {
  gap: 10px;
}

.seo-zone .section-title,
.seo-zone h3,
.seo-zone .collapse-title {
  font-weight: 800 !important;
  text-transform: none;
  letter-spacing: 0;
}

.seo-zone .section-copy {
  font-weight: 400 !important;
}

.seo-overview-title {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
}

.seo-overview-subtitle {
  max-width: 80ch;
  font-size: clamp(1.1rem, 1.45vw, 1.4rem);
  line-height: 1.45;
}

.seo-section-heading {
  align-items: center;
  text-align: center;
}

.seo-section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #136eb9;
}

.seo-section-icon .ti {
  font-size: 2.15rem;
  line-height: 1;
}

.seo-section-icon-category {
  color: #136eb9;
}

.seo-section-icon-benefits {
  color: #8423b1;
}

.seo-section-icon-open-data {
  color: #2d956d;
}

.seo-section-icon-faq {
  color: #f5b201;
}

.seo-shell {
  width: 100%;
  display: flex;
  justify-content: center;
}

.seo-stack {
  width: min(100%, 1240px);
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-span-2 {
  grid-column: 1 / -1;
}

/* START: Brutal box restore (SEO + setup) */
.setup-grid .brutal-box,
.seo-zone .brutal-box {
  background: var(--bg);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* END: Brutal box restore (SEO + setup) */

.seo-copy-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-step-grid,
.seo-feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-step-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* START: SEO overview cards */
.seo-mode-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seo-mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-height: 100%;
  text-align: left;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--border) 72%, white);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top, color-mix(in srgb, var(--icon-accent-color, #136eb9) 12%, transparent), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.84));
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.seo-mode-card:hover,
.seo-mode-card:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--icon-accent-color, #136eb9) 36%, var(--border));
  box-shadow: 0 24px 44px color-mix(in srgb, var(--icon-accent-color, #136eb9) 18%, rgba(15, 23, 42, 0.12));
}

.seo-mode-card-classic {
  --icon-accent-color: #136eb9;
}

.seo-mode-card-packs {
  --icon-accent-color: #8423b1;
}

.seo-mode-card-custom {
  --icon-accent-color: #2d956d;
}

.seo-mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  color: var(--icon-accent-color, #136eb9);
  background: color-mix(in srgb, var(--icon-accent-color, #136eb9) 12%, white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.seo-mode-icon .ti {
  font-size: 2rem;
  line-height: 1;
}

.seo-mode-copy {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400 !important;
  opacity: 0.88;
}

.seo-mode-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--icon-accent-color, #136eb9);
}

body.dark .seo-mode-card {
  border-color: var(--border);
  background: var(--bg);
  box-shadow: var(--shadow);
}

body.dark .seo-mode-card:hover,
body.dark .seo-mode-card:focus-visible {
  border-color: var(--icon-accent-color, var(--border));
  box-shadow: 6px 6px 0px 0px var(--icon-accent-color, var(--border));
}

body.dark .seo-mode-icon {
  background: color-mix(in srgb, var(--icon-accent-color, #136eb9) 18%, rgba(15, 23, 42, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* END: SEO overview cards */

/* START: SEO custom trivia promo */
.seo-custom-promo {
  border: 1px solid color-mix(in srgb, #2d956d 18%, var(--border));
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top left, color-mix(in srgb, #2d956d 12%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.84));
}

.seo-custom-promo-layout {
  display: grid;
  gap: 28px;
  align-items: center;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.seo-custom-promo-layout-single {
  grid-template-columns: 1fr;
}

.seo-custom-promo-copy {
  display: grid;
  gap: 24px;
}

.seo-custom-promo-points {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-custom-point {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
  padding: 16px 0;
}

.seo-custom-point:first-child {
  padding-top: 0;
}

.seo-custom-point:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.seo-custom-point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #2d956d;
  background: color-mix(in srgb, #2d956d 12%, white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.seo-custom-point-icon .ti {
  font-size: 1.7rem;
  line-height: 1;
}

.seo-custom-point h3,
.seo-custom-media-placeholder span {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.seo-custom-point p {
  margin: 8px 0 0;
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400 !important;
  opacity: 0.88;
}

.seo-custom-media {
  min-height: 100%;
}

.seo-custom-media-visual {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid color-mix(in srgb, #2d956d 18%, var(--border));
  border-radius: calc(var(--radius) + 6px);
  object-fit: cover;
  object-position: center;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.seo-custom-media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  border: 1px dashed color-mix(in srgb, #2d956d 32%, var(--border));
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(135deg, rgba(45, 149, 109, 0.08), rgba(19, 110, 185, 0.05)),
    rgba(255, 255, 255, 0.4);
  color: #2d956d;
}

.seo-custom-media-placeholder .ti {
  font-size: 3rem;
  line-height: 1;
}

body.dark .seo-custom-promo {
  border-color: var(--border);
  background: var(--bg);
  box-shadow: var(--shadow);
}

body.dark .seo-custom-point-icon {
  background: color-mix(in srgb, #2d956d 18%, rgba(15, 23, 42, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.dark .seo-custom-media-placeholder {
  border-color: color-mix(in srgb, #2d956d 28%, rgba(255, 255, 255, 0.12));
  background:
    linear-gradient(135deg, rgba(45, 149, 109, 0.14), rgba(19, 110, 185, 0.08)),
    rgba(15, 23, 42, 0.48);
}

body.dark .seo-custom-media-visual {
  border-color: color-mix(in srgb, #2d956d 26%, rgba(255, 255, 255, 0.1));
  box-shadow: 0 24px 46px rgba(2, 6, 23, 0.34);
}

/* END: SEO custom trivia promo */

/* START: SEO trivia packs banner */
.seo-packs-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #8423b1 18%, var(--border));
  border-radius: calc(var(--radius) + 6px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  min-height: 520px;
  isolation: isolate;
}

.seo-packs-banner-image,
.seo-packs-banner-overlay {
  position: absolute;
  inset: 0;
}

.seo-packs-banner-image {
  background-color: #171327;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.seo-packs-banner-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.78);
}

.seo-packs-banner-placeholder .ti {
  font-size: 3rem;
  line-height: 1;
}

.seo-packs-banner-placeholder span {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.seo-packs-banner-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: clamp(24px, 4vw, 42px);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.34), rgba(15, 23, 42, 0.68)),
    linear-gradient(135deg, rgba(15, 23, 42, 0.18), rgba(132, 35, 177, 0.2));
  color: #ffffff;
  text-align: center;
}

.seo-packs-banner-kicker,
.seo-packs-banner-title,
.seo-packs-banner-subtitle,
.seo-packs-pill {
  color: #ffffff !important;
}

.seo-packs-banner-copy {
  max-width: 64rem;
  gap: 12px;
}

.seo-packs-banner-title {
  font-size: clamp(2.3rem, 4vw, 4.2rem);
  line-height: 1.00;
}

.seo-packs-banner-subtitle {
  max-width: 70ch;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.65;
  opacity: 0.95;
}

.seo-packs-banner-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 72rem;
}

.seo-packs-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  box-shadow: var(--shadow-sm);
}

body:not(.dark) .seo-packs-pill {
  border-color: rgba(0, 0, 0, 0.72);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: none;
}

.seo-packs-banner-actions {
  display: flex;
  justify-content: center;
}

.seo-packs-banner-cta {
  min-width: 220px;
}

body.dark .seo-packs-banner {
  border-color: color-mix(in srgb, #8423b1 22%, rgba(255, 255, 255, 0.08));
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.34);
}

/* END: SEO trivia packs banner */

.seo-topic-layout {
  display: grid;
  gap: 24px;
}

.seo-topic-list,
.seo-difficulty-list {
  display: grid;
  gap: 14px;
}

.seo-topic-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seo-topic-list .seo-topic-card {
  justify-content: center;
  min-height: 100%;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.4) !important;
}

.seo-topic-list .seo-topic-card h3 {
  font-size: 1.3rem;
}

.seo-topic-list .seo-topic-card p {
  font-size: 1rem;
  font-weight: 400 !important;
  line-height: 1.6;
}

.seo-flow-item {
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(15, 23, 42, 0.12);
}

.seo-step-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
  padding-bottom: 0;
  border-bottom: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.seo-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

.seo-step-icon .ti {
  font-size: 2.7rem;
  line-height: 1;
}

.seo-step-icon-category {
  color: #136eb9;
}

.seo-step-icon-difficulty {
  color: #8423b1;
}

.seo-step-icon-players {
  color: #2d956d;
}

.seo-step-icon-launch {
  color: #f5b201;
}

.seo-topic-card,
.seo-feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding-bottom: 0;
  border-bottom: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.seo-topic-icon,
.seo-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #136eb9;
}

.seo-topic-icon .ti,
.seo-feature-icon .ti {
  font-size: 2.2rem;
  line-height: 1;
}

.seo-topic-icon-easy,
.seo-feature-icon-load {
  color: #136eb9;
}

.seo-topic-icon-videogames {
  color: #136eb9;
}

.seo-topic-icon-science {
  color: #2d956d;
}

.seo-topic-icon-history {
  color: #8d5a2b;
}

.seo-topic-icon-general {
  color: #8423b1;
}

.seo-topic-icon-music {
  color: #d94f70;
}

.seo-topic-icon-sports {
  color: #f28c18;
}

.seo-topic-icon-politics {
  color: #cc3b3b;
}

.seo-topic-icon-geography {
  color: #0f8b8d;
}

.seo-topic-icon-mood {
  color: #f5b201;
}

.seo-topic-icon-medium,
.seo-feature-icon-free {
  color: #8423b1;
}

.seo-topic-icon-hard,
.seo-feature-icon-mobile {
  color: #2d956d;
}

.seo-feature-icon-variety {
  color: #f5b201;
}

body.dark .seo-topic-list .seo-topic-card {
  background: rgba(255, 255, 255, 0.04) !important;
}

.seo-flow-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.seo-inline-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding-top: 16px;
  border-top: 2px solid rgba(15, 23, 42, 0.12);
}

.seo-faq-grid {
  display: grid;
  gap: 14px;
}

.seo-faq-panel {
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--bg);
}

.seo-faq-item {
  overflow: hidden;
  border: 3px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

.seo-faq-item:hover,
.seo-faq-item:focus-within {
  border-color: #f5b201;
  box-shadow: 4px 4px 0px 0px #f5b201;
}

.seo-faq-question {
  padding: 20px 56px 20px 20px !important;
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.seo-faq-answer {
  padding: 0 20px 20px !important;
  font-size: 0.98rem;
  line-height: 1.7;
  font-weight: 400 !important;
  opacity: 0.86;
}

.seo-faq-item.collapse-arrow>.collapse-title::after,
.seo-faq-item.collapse-arrow>.collapse-title:after {
  right: 20px;
  color: #f5b201;
}

body.dark .seo-faq-panel {
  border-color: var(--border);
  background: var(--bg);
  box-shadow: var(--shadow);
}

body.dark .seo-faq-item {
  border: 3px solid var(--border);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

body.dark .seo-faq-item:hover,
body.dark .seo-faq-item:focus-within {
  border-color: #f5b201;
  box-shadow: 4px 4px 0px 0px #f5b201;
}

.seo-link-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.seo-visual-link {
  display: block;
  overflow: hidden;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.seo-visual-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.seo-visual-link img {
  display: block;
  width: 100%;
  height: auto;
}

body.dark .seo-flow-item,
body.dark .seo-inline-note,
body.dark .seo-step-icon {
  background: transparent;
}

.question-count-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.difficulty-card {
  display: flex;
  min-height: 120px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px 10px;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.difficulty-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  filter: brightness(1.08);
}

.difficulty-card:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-active);
  filter: brightness(0.95);
}

.difficulty-card-active {
  border-color: #2d956d;
  background: rgba(45, 149, 109, 0.14);
  box-shadow: 3px 3px 0px 0px #2d956d;
}

.difficulty-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  color: #64748b;
}

.difficulty-icon-wrap-active {
  color: #2d956d;
}

.difficulty-icon-main {
  font-size: 2rem;
  line-height: 1;
}

.difficulty-icon-accent {
  position: absolute;
  top: -6px;
  right: -16px;
  font-size: 1rem;
  line-height: 1;
}

.difficulty-label {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.question-count-card {
  display: flex;
  min-height: 110px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 10px;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.question-count-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  filter: brightness(1.08);
}

.question-count-card:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: var(--shadow-active);
  filter: brightness(0.95);
}

.question-count-card-active {
  border-color: #2d956d;
  background: rgba(45, 149, 109, 0.14);
  box-shadow: 3px 3px 0px 0px #2d956d;
}

.question-count-card-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: var(--shadow-sm);
}

.question-count-value {
  font-size: 1.65rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.question-count-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  line-height: 1;
  color: #2d956d;
}

body.dark .question-count-check {
  color: #4ade80;
}

body.dark .difficulty-icon-wrap {
  color: #94a3b8;
}

body.dark .difficulty-icon-wrap-active {
  color: #4ade80;
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  flex-shrink: 0;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-size: 1.50rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.empty-panel {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  border: 3px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.3);
}

.empty-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

body.dark .empty-panel {
  background: rgba(255, 255, 255, 0.04);
}

/* END: Setup mode and player list */

/* START: Custom trivia builder */
.custom-shell {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding-inline: clamp(16px, 3vw, 32px);
}

.custom-builder-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* START: Custom trivia cards visual style */
.custom-sidebar {
  --custom-card-accent: #136eb9;
  position: sticky;
  top: 104px;
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--bg);
}

.custom-sidebar-inner {
  display: grid;
  gap: 12px;
}

.custom-sidebar .brutal-btn {
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  font-size: 0.88rem;
  line-height: 1.2;
  padding: 10px 12px;
}

.custom-sidebar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 2px auto 0;
  background: transparent;
  padding: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #136eb9;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.custom-sidebar-link .ti {
  font-size: 1.5rem;
  line-height: 1;
}

.custom-sidebar-link:hover,
.custom-sidebar-link:focus-visible {
  color: #0f5b98;
}

body.dark .custom-sidebar-link {
  color: #60a5fa;
}

body.dark .custom-sidebar-link:hover,
body.dark .custom-sidebar-link:focus-visible {
  color: #93c5fd;
}

.custom-content-stack {
  width: min(100%, 860px);
}

.custom-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.custom-meta-card,
.custom-questions-card,
.custom-question-card {
  --custom-card-accent: #136eb9;
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--bg);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.custom-meta-card {
  --custom-card-accent: #136eb9;
}

.custom-questions-card {
  --custom-card-accent: #8423b1;
}

.custom-question-card {
  --custom-card-accent: #2d956d;
  box-shadow: var(--shadow);
  background: var(--bg);
}

.custom-sidebar:hover,
.custom-sidebar:focus-within,
.custom-meta-card:hover,
.custom-meta-card:focus-within,
.custom-questions-card:hover,
.custom-questions-card:focus-within,
.custom-question-card:hover,
.custom-question-card:focus-within {
  transform: translateY(-4px);
  border-color: var(--custom-card-accent);
  box-shadow: 6px 6px 0px 0px var(--custom-card-accent);
}

.custom-sidebar .step-index,
.custom-meta-card .step-index,
.custom-questions-card .step-index {
  border-color: color-mix(in srgb, var(--custom-card-accent) 34%, var(--border));
  color: var(--custom-card-accent);
  background: color-mix(in srgb, var(--custom-card-accent) 10%, white);
}

.custom-inline-note {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.8;
}

.custom-info-copy {
  display: grid;
  gap: 16px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  opacity: 0.88;
}

.custom-info-copy p {
  margin: 0;
}

.custom-info-copy code {
  font-size: 0.95em;
  font-weight: 400;
}

.custom-question-list {
  display: grid;
  gap: 18px;
}

.custom-question-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.custom-question-difficulty {
  min-width: 140px;
}

.custom-meta-card .brutal-label,
.custom-question-card .brutal-label {
  font-size: 1.05rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}

.custom-meta-card .brutal-label .ti,
.custom-question-card .brutal-label .ti {
  font-size: 1.7rem;
  line-height: 1;
}

.custom-meta-card .brutal-input,
.custom-question-card .brutal-input,
.custom-meta-card .input,
.custom-question-card .input {
  font-size: 1.02rem;
  font-weight: 400;
}

.custom-question-textarea {
  line-height: 1.55;
}

.custom-question-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.custom-question-main,
.custom-answer-column {
  min-width: 0;
}

.custom-difficulty-field {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.custom-delete-btn {
  flex: 0 0 auto;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
}

.custom-delete-btn .ti {
  font-size: 1.1rem;
  line-height: 1;
}

.custom-question-textarea {
  min-height: 110px;
  resize: vertical;
}

.custom-answer-column {
  display: grid;
  gap: 16px;
}

.custom-incorrect-stack {
  display: grid;
  gap: 10px;
}

.custom-shell .input.custom-correct-input,
.custom-shell .brutal-input.custom-correct-input {
  border: 3px solid #2d956d !important;
  background-color: var(--bg) !important;
  color: var(--fg) !important;
  box-shadow: 3px 3px 0px 0px #2d956d !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.custom-shell .input.custom-correct-input:focus,
.custom-shell .brutal-input.custom-correct-input:focus {
  border-color: #2d956d !important;
  background-color: var(--bg) !important;
  box-shadow: 5px 5px 0px 0px #2d956d !important;
}

.custom-shell .input.custom-incorrect-input,
.custom-shell .brutal-input.custom-incorrect-input {
  border: 3px solid #f04962 !important;
  background-color: var(--bg) !important;
  color: var(--fg) !important;
  box-shadow: 3px 3px 0px 0px #f04962 !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.custom-shell .input.custom-incorrect-input:focus,
.custom-shell .brutal-input.custom-incorrect-input:focus {
  border-color: #f04962 !important;
  background-color: var(--bg) !important;
  box-shadow: 5px 5px 0px 0px #f04962 !important;
}

body.dark .custom-shell .input.custom-correct-input,
body.dark .custom-shell .brutal-input.custom-correct-input {
  background-color: var(--bg) !important;
  color: var(--fg) !important;
  border-color: #2d956d !important;
  box-shadow: 3px 3px 0px 0px #2d956d !important;
}

body.dark .custom-shell .input.custom-correct-input:focus,
body.dark .custom-shell .brutal-input.custom-correct-input:focus {
  background-color: var(--bg) !important;
  box-shadow: 5px 5px 0px 0px #2d956d !important;
}

body.dark .custom-shell .input.custom-incorrect-input,
body.dark .custom-shell .brutal-input.custom-incorrect-input {
  background-color: var(--bg) !important;
  color: var(--fg) !important;
  border-color: #f04962 !important;
  box-shadow: 3px 3px 0px 0px #f04962 !important;
}

body.dark .custom-shell .input.custom-incorrect-input:focus,
body.dark .custom-shell .brutal-input.custom-incorrect-input:focus {
  background-color: var(--bg) !important;
  box-shadow: 5px 5px 0px 0px #f04962 !important;
}

.custom-question-add {
  display: flex;
  justify-content: center;
}

.custom-validation-box {
  border: 3px solid #f04962;
  border-radius: var(--radius);
  box-shadow: 3px 3px 0 0 #f04962;
  background: rgba(240, 73, 98, 0.12);
  padding: 14px 16px;
}

.custom-validation-list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  line-height: 1.5;
}

body.dark .custom-sidebar,
body.dark .custom-meta-card,
body.dark .custom-questions-card,
body.dark .custom-question-card {
  border-color: var(--border);
  background: var(--bg);
  box-shadow: var(--shadow);
}

body.dark .custom-sidebar .step-index,
body.dark .custom-meta-card .step-index,
body.dark .custom-questions-card .step-index {
  background: color-mix(in srgb, var(--custom-card-accent) 18%, rgba(15, 23, 42, 0.8));
}

/* END: Custom trivia cards visual style */



/* START: Packs catalog */
.packs-shell {
  width: 100%;
  margin: 0 auto;
  padding-inline: clamp(16px, 3vw, 32px);
}

.packs-hero {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.packs-hero-copy {
  max-width: 58rem;
}

.pack-catalog-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 400px));
  justify-content: center;
}

.packs-toolbar {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  max-width: 100%;
  margin: 0 auto;
}

.packs-toolbar-category-row {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 12px;
  flex-wrap: wrap;
}

.packs-disclaimer-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: #136eb9;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.packs-disclaimer-link:hover,
.packs-disclaimer-link:focus-visible {
  color: #0f5b98;
}

body.dark .packs-disclaimer-link {
  color: #60a5fa;
}

body.dark .packs-disclaimer-link:hover,
body.dark .packs-disclaimer-link:focus-visible {
  color: #93c5fd;
}

@media (min-width: 768px) {
  .packs-toolbar {
    grid-template-columns: minmax(280px, 420px) max-content;
    justify-content: center;
  }
}

@media (max-width: 1023px) {

  .global-footer-inner {
    grid-template-columns: 1fr;
  }

  .global-footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .static-page-section-grid {
    grid-template-columns: 1fr;
  }

  .seo-mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seo-custom-promo-layout {
    grid-template-columns: 1fr;
  }
}

.packs-toolbar-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--bg);
  padding: 0 16px;
}

.packs-toolbar-field i {
  flex: 0 0 auto;
  font-size: 1rem;
  color: rgba(71, 85, 105, 0.92);
}

.packs-toolbar-search-field,
.packs-toolbar-select-field {
  position: relative;
  display: block;
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.packs-toolbar-search-field i,
.packs-toolbar-select-field i {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.packs-toolbar-input,
.packs-toolbar-select {
  width: 100%;
  min-width: 0;
}

.packs-toolbar-input {
  padding-left: 2.8rem;
}

.setup-screen .input.input-answer,
.setup-screen .select.input-answer,
.custom-shell .input.input-answer,
.custom-shell .select.input-answer {
  border-color: var(--border-answer) !important;
  background-color: var(--bg-answer) !important;
  box-shadow: var(--shadow-answer) !important;
}

.setup-screen .input.input-answer:focus,
.setup-screen .select.input-answer:focus,
.custom-shell .input.input-answer:focus,
.custom-shell .select.input-answer:focus {
  background-color: var(--bg-answer) !important;
  box-shadow: var(--shadow-answer-active) !important;
}

body.dark .setup-screen .input.input-answer,
body.dark .setup-screen .select.input-answer,
body.dark .custom-shell .input.input-answer,
body.dark .custom-shell .select.input-answer {
  background-color: var(--bg-answer) !important;
}

.custom-shell .input.input-answer.custom-correct-input,
.custom-shell .brutal-input.input-answer.custom-correct-input {
  border-color: #2d956d !important;
  background-color: var(--bg) !important;
  box-shadow: 3px 3px 0px 0px #2d956d !important;
}

.custom-shell .input.input-answer.custom-correct-input:focus,
.custom-shell .brutal-input.input-answer.custom-correct-input:focus {
  border-color: #2d956d !important;
  background-color: var(--bg) !important;
  box-shadow: 5px 5px 0px 0px #2d956d !important;
}

.custom-shell .input.input-answer.custom-incorrect-input,
.custom-shell .brutal-input.input-answer.custom-incorrect-input {
  border-color: #f04962 !important;
  background-color: var(--bg) !important;
  box-shadow: 3px 3px 0px 0px #f04962 !important;
}

.custom-shell .input.input-answer.custom-incorrect-input:focus,
.custom-shell .brutal-input.input-answer.custom-incorrect-input:focus {
  border-color: #f04962 !important;
  background-color: var(--bg) !important;
  box-shadow: 5px 5px 0px 0px #f04962 !important;
}

body.dark .custom-shell .input.input-answer.custom-correct-input,
body.dark .custom-shell .brutal-input.input-answer.custom-correct-input {
  border-color: #2d956d !important;
  background-color: var(--bg) !important;
  box-shadow: 3px 3px 0px 0px #2d956d !important;
}

body.dark .custom-shell .input.input-answer.custom-correct-input:focus,
body.dark .custom-shell .brutal-input.input-answer.custom-correct-input:focus {
  background-color: var(--bg) !important;
  box-shadow: 5px 5px 0px 0px #2d956d !important;
}

body.dark .custom-shell .input.input-answer.custom-incorrect-input,
body.dark .custom-shell .brutal-input.input-answer.custom-incorrect-input {
  border-color: #f04962 !important;
  background-color: var(--bg) !important;
  box-shadow: 3px 3px 0px 0px #f04962 !important;
}

body.dark .custom-shell .input.input-answer.custom-incorrect-input:focus,
body.dark .custom-shell .brutal-input.input-answer.custom-incorrect-input:focus {
  background-color: var(--bg) !important;
  box-shadow: 5px 5px 0px 0px #f04962 !important;
}

.packs-toolbar-select {
  padding-left: 2.8rem;
}

body.dark .packs-toolbar-field i {
  color: rgba(226, 232, 240, 0.72);
}

@media (max-width: 767px) {

  .global-footer-shell {
    padding-inline: 16px;
  }

  .global-footer-links {
    grid-template-columns: 1fr;
  }

  .seo-mode-grid,
  .packs-toolbar {
    max-width: 420px;
    margin-inline: auto;
  }

  .seo-mode-grid {
    grid-template-columns: 1fr;
  }

  .seo-mode-card {
    text-align: center;
    align-items: center;
  }

  .seo-custom-point {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .seo-custom-promo-points {
    grid-template-columns: 1fr;
  }

  .seo-custom-media-placeholder {
    min-height: 280px;
    aspect-ratio: auto;
  }
}

.pack-catalog-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
  width: min(100%, 400px);
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--bg);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
}

.pack-catalog-card:hover,
.pack-catalog-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--icon-accent-color, var(--border));
  box-shadow: 6px 6px 0px 0px var(--icon-accent-color, var(--border));
  filter: brightness(1.08);
}

.pack-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.pack-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 2.99rem;
  line-height: 1;
}

.pack-card-title {
  margin: 0 0 0px 0;
  font-size: clamp(1.6rem, 2vw, 2rem) !important;
  line-height: 1.2;
}

.pack-card-copy {
  margin: 0;
  font-size: 1.10rem;
  line-height: 1.65;
  font-weight: 400 !important;
  opacity: 0.86;
}

.pack-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  color: rgba(100, 116, 139, 0.92);
  white-space: nowrap;
}

.pack-card-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  font-size: 1.20rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

body.dark .pack-card-meta {
  color: rgba(203, 213, 225, 0.7);
}

body.dark .pack-catalog-card {
  border-color: var(--border);
  background: var(--bg);
  box-shadow: var(--shadow);
}

body.dark .pack-catalog-card:hover,
body.dark .pack-catalog-card:focus-visible {
  border-color: var(--icon-accent-color, var(--border));
  box-shadow: 6px 6px 0px 0px var(--icon-accent-color, var(--border));
}

.pack-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin-top: auto;
}

.pack-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--icon-accent-color, #136eb9) !important;
  background: transparent !important;
  border-color: var(--icon-accent-color, #136eb9) !important;
  box-shadow: 3px 3px 0px 0px var(--icon-accent-color, #136eb9) !important;
}

.pack-card-link:hover,
.pack-card-link:focus-visible {
  color: #ffffff !important;
  background: var(--icon-accent-color, #136eb9) !important;
  border-color: var(--icon-accent-color, #136eb9) !important;
  box-shadow: 6px 6px 0px 0px var(--icon-accent-color, #136eb9) !important;
}

.pack-catalog-card:hover .pack-card-link,
.pack-catalog-card:focus-visible .pack-card-link {
  color: #ffffff !important;
  background: var(--icon-accent-color, #136eb9) !important;
  border-color: var(--icon-accent-color, #136eb9) !important;
  box-shadow: 6px 6px 0px 0px var(--icon-accent-color, #136eb9) !important;
}

.packs-empty-state {
  text-align: center;
}

/* START: Shared icon accents */
.icon-accent-slate,
.pack-accent-classic {
  --icon-accent-color: #94a3b8;
  color: #94a3b8;
}

.icon-accent-rose,
.pack-accent-himym {
  --icon-accent-color: #d94f70;
  color: #d94f70;
}

.icon-accent-blue,
.pack-accent-bbt {
  --icon-accent-color: #136eb9;
  color: #136eb9;
}

.icon-accent-green,
.pack-accent-lotr {
  --icon-accent-color: #2d956d;
  color: #2d956d;
}

.icon-accent-amber,
.pack-accent-office {
  --icon-accent-color: #f28c18;
  color: #f28c18;
}

.icon-accent-violet {
  --icon-accent-color: #8423b1;
  color: #8423b1;
}

.icon-accent-teal {
  --icon-accent-color: #0f8b8d;
  color: #0f8b8d;
}

.icon-accent-red {
  --icon-accent-color: #cc3b3b;
  color: #cc3b3b;
}

/* END: Shared icon accents */

/* END: Packs catalog */

/* START: Fixed setup action bar */
.setup-actionbar {
  position: fixed !important;
  right: 0;
  bottom: 0 !important;
  left: 0;
  width: 100%;
  z-index: 55;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(248, 250, 252, 0), rgba(248, 250, 252, 0.92) 35%);
}

.setup-actionbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
  padding: 12px 16px;
}

body.dark .setup-actionbar {
  background: linear-gradient(180deg, rgba(17, 17, 17, 0), rgba(17, 17, 17, 0.94) 35%);
}


/* START: Range input */
.range-brutal {
  appearance: none;
  height: 18px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background:
    linear-gradient(90deg, #8423b1 0%, #136eb9 50%, #f5b201 100%);
  box-shadow: var(--shadow-sm);
}

.range-brutal::-webkit-slider-thumb {
  appearance: none;
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.range-brutal::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

/* END: Range input */

/* START: Progress bar */
.progress-shell {
  width: 100%;
  height: 22px;
  overflow: hidden;
  border: 3px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow-sm);
}

.progress-bar {
  height: 100%;
  border-right: 3px solid var(--border);
  background: linear-gradient(90deg, #8423b1 0%, #136eb9 55%, #2d956d 100%);
  transition: none;
}

body.dark .progress-shell {
  background: rgba(255, 255, 255, 0.06);
}

body.dark .topbar-progress-shell {
  background: rgba(255, 255, 255, 0.14);
}

body.dark .topbar-menu-item {
  color: var(--fg);
}

body.dark .topbar-menu-item:hover {
  color: var(--bg);
}

body.dark .topbar-menu-item.is-active {
  background: rgba(245, 180, 1, 0.46);
  color: var(--fg);
}

.topbar-menu-item-classic {
  --topbar-menu-accent: #136eb9;
  color: #136eb9;
}

.topbar-menu-item-packs {
  --topbar-menu-accent: #8423b1;
  color: #8423b1;
}

.topbar-menu-item-custom {
  --topbar-menu-accent: #2d956d;
  color: #2d956d;
}

.topbar-menu-item-classic:hover,
.topbar-menu-item-classic:focus-visible,
.topbar-menu-item-packs:hover,
.topbar-menu-item-packs:focus-visible,
.topbar-menu-item-custom:hover,
.topbar-menu-item-custom:focus-visible {
  background: var(--topbar-menu-accent);
  color: var(--bg);
}

.topbar-menu-item-classic.is-active,
.topbar-menu-item-packs.is-active,
.topbar-menu-item-custom.is-active {
  background: color-mix(in srgb, var(--topbar-menu-accent) 18%, transparent);
  color: var(--topbar-menu-accent);
}

body.dark .topbar-menu-item-classic {
  color: #60a5fa;
}

body.dark .topbar-menu-item-packs {
  color: #c084fc;
}

body.dark .topbar-menu-item-custom {
  color: #34d399;
}

body.dark .topbar-menu-item-classic:hover,
body.dark .topbar-menu-item-classic:focus-visible,
body.dark .topbar-menu-item-packs:hover,
body.dark .topbar-menu-item-packs:focus-visible,
body.dark .topbar-menu-item-custom:hover,
body.dark .topbar-menu-item-custom:focus-visible {
  background: var(--topbar-menu-accent);
  color: var(--bg);
}

body.dark .topbar-menu-item-classic.is-active,
body.dark .topbar-menu-item-packs.is-active,
body.dark .topbar-menu-item-custom.is-active {
  background: color-mix(in srgb, var(--topbar-menu-accent) 28%, transparent);
  color: #ffffff;
}

.timer-readout {
  min-width: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.timer-readout .countdown {
  line-height: 1;
}

.timer-readout .countdown>span {
  min-width: 1.15em;
  display: inline-flex;
  justify-content: center;
}

.timer-colon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.3em;
}

.timer-critical {
  animation: timer-critical-blink 0.6s steps(1, end) infinite;
}

@keyframes timer-critical-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.2;
  }
}

/* END: Progress bar */

/* START: Game layout */
.game-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  padding-bottom: 12px;
  min-height: calc(100vh - 120px);
}

.game-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  width: 100%;
  min-height: 0;
  flex: 1;
}

.game-top-strip {
  width: 100%;
}

.game-sidebar {
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  margin-top: auto;
}

.game-scoreboard-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  justify-content: center;
  overflow-x: auto;
  padding-top: 34px;
  padding-bottom: 24px;
  scroll-snap-type: x proximity;
}

.game-scoreboard-grid .score-card {
  flex: 0 0 320px;
  min-width: 320px;
  position: relative;
  justify-content: center;
  min-height: 132px;
  padding-top: 34px;
  padding-bottom: 34px;
  overflow: visible;
  scroll-snap-align: start;
}

.game-player-row .score-card-powerups,
.game-player-row .score-card-points {
  position: absolute;
  left: 50%;
  width: calc(100% - 28px);
  display: flex;
  justify-content: center;
  transform: translateX(-50%);
}

.game-player-row .score-card-powerups {
  top: 0;
  transform: translate(-50%, -50%);
}

.game-player-row .score-card-points {
  bottom: 0;
  transform: translate(-50%, 50%);
}

.game-player-row .score-card-name {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.game-player-row .score-card-name p {
  width: 100%;
  text-align: center;
  font-size: 1.5rem;
  line-height: 1;
}

.game-player-row .score-card-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
}

.game-player-row .score-card-controls {
  justify-content: center;
  width: auto;
}

.game-player-row .score-powerups {
  justify-content: center;
  margin-left: 0;
  align-self: center;
}

.game-player-row .score-powerup-btn {
  width: 46px;
  height: 46px;
  border-radius: 999px;
}

.game-player-row .score-powerup-btn .ti {
  font-size: 24px;
}

.powerup-tooltip {
  position: relative;
  display: inline-flex;
}

.powerup-tooltip-bubble {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  bottom: auto;
  transform: translateX(-50%) translateY(-4px);
  min-width: max-content;
  max-width: 180px;
  padding: 8px 10px;
  border: 3px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 10;
}

.powerup-tooltip:hover .powerup-tooltip-bubble,
.powerup-tooltip:focus-within .powerup-tooltip-bubble {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.game-center-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.game-center-stack .question-panel {
  width: 100%;
  max-width: 960px;
}

/* END: Game layout */

/* START: Question and answer blocks */
.question-panel {
  padding: 20px;
  position: relative;
  z-index: 1;
  transform: scale(var(--question-zoom, 1));
  transform-origin: center center;
  transition: transform 0.15s ease;
}

.question-panel-shake {
  animation: question-panel-horizontal-shake 0.36s ease-in-out;
}

@keyframes question-panel-horizontal-shake {
  0% {
    transform: translateX(0) scale(var(--question-zoom, 1));
  }

  20% {
    transform: translateX(-8px) scale(var(--question-zoom, 1));
  }

  40% {
    transform: translateX(8px) scale(var(--question-zoom, 1));
  }

  60% {
    transform: translateX(-6px) scale(var(--question-zoom, 1));
  }

  80% {
    transform: translateX(6px) scale(var(--question-zoom, 1));
  }

  100% {
    transform: translateX(0) scale(var(--question-zoom, 1));
  }
}

.question-text {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 2.35rem);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0.0em;
}

.question-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0 0 10px;
  font-size: 0.875rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
}

.answer-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 116px;
  padding: 20px 22px;
  text-align: left;
  overflow: hidden;
  color: var(--border-answer);
  border: 3px solid currentColor;
  border-radius: var(--radius);
  box-shadow: 3px 3px 0px 0px currentColor;
  background: var(--bg-answer);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.answer-card::before {
  content: none;
}

.answer-card::after {
  content: none;
}

.answer-card:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0px 0px currentColor;
  filter: brightness(1.08);
}

.answer-card:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 2px 2px 0px 0px currentColor;
  filter: brightness(0.95);
}

.answer-card:disabled {
  cursor: not-allowed;
}

.answer-kbd {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  color: #0f172a;
  border: 2px solid;
  border-color: inherit;
  border-bottom-width: 4px;
  border-radius: 10px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  background: #ffffff;
}

body.dark .answer-kbd {
  color: #f0f0f0;
  background: #1a1a1a;
  border-color: inherit;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.1);
}

.kbd-hotkey {
  height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

[x-cloak] {
  display: none !important;
}

.x-enter {
  will-change: opacity, transform;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.x-enter-start {
  opacity: 0;
  transform: translateY(14px);
}

.x-enter-end {
  opacity: 1;
  transform: translateY(0);
}

.x-leave {
  will-change: opacity, transform;
  transition: opacity 0.26s ease-in-out, transform 0.26s ease-in-out;
}

.x-leave-start {
  opacity: 1;
  transform: translateY(0);
}

.x-leave-end {
  opacity: 0;
  transform: translateY(-14px);
}

.answer-card.state-eliminated {
  opacity: 0.40;
  box-shadow: none;
  background: rgba(136, 144, 157, 0.99);
  border: 0;
  filter: grayscale(1);
  text-decoration: line-through;
  transform: none;
}

.answer-card.state-eliminated:hover:not(:disabled) {
  transform: none;
  box-shadow: none;
  filter: grayscale(1);
}

.answer-index {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 3px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  background: var(--bg);
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
}

.answer-copy {
  position: relative;
  z-index: 1;
  flex: 1;
  font-size: 1.5rem;
  line-height: 1.55;
  font-weight: 900;
  color: #000000;
}

.answer-selected-mark {
  position: relative;
  z-index: 1;
  margin-left: auto;
  align-self: center;
  width: auto;
  height: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--border);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.state-neutral {
  color: var(--border-answer);
  border-color: var(--border-answer);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(15, 23, 42, 0.78);
  --answer-surface-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.answer-card.state-neutral.answer-slot-a {
  color: #b766b1;
  border-color: #b766b1;
  background: #fbd3f8;
  --answer-surface-shadow: 0 18px 38px rgba(242, 176, 242, 0.2);
}

.answer-card.state-neutral.answer-slot-a .answer-kbd {
  border-color: #d276cc;
}

.answer-card.state-neutral.answer-slot-b {
  color: #3c649f;
  border-color: #3c649f;
  background: #bed8ff;
  --answer-surface-shadow: #3c649f;
}

.answer-card.state-neutral.answer-slot-b .answer-kbd {
  border-color: #3c649f;
}

.answer-card.state-neutral.answer-slot-c {
  color: #b16b31;
  border-color: #b16b31;
  background: #f8d6bb;
  --answer-surface-shadow: 0 18px 38px rgba(170, 159, 238, 0.2);
}

.answer-card.state-neutral.answer-slot-c .answer-kbd {
  border-color: #b16b31;
}

.answer-card.state-neutral.answer-slot-d {
  color: #4b92a5;
  border-color: #4b92a5;
  background: #caf4ff;
  --answer-surface-shadow: 0 18px 38px rgba(160, 218, 224, 0.2);
}

.answer-card.state-neutral.answer-slot-d .answer-kbd {
  border-color: #a0dae0;
}

.answer-card.state-neutral.answer-slot-a:hover:not(:disabled) {
  box-shadow: 0 var(--answer-relief-depth-hover) 0 0 currentColor, 0 26px 48px rgba(242, 176, 242, 0.28);
}

.answer-card.state-neutral.answer-slot-b:hover:not(:disabled) {
  box-shadow: 0 var(--answer-relief-depth-hover) 0 0 currentColor, 0 26px 48px rgba(146, 190, 255, 0.28);
}

.answer-card.state-neutral.answer-slot-c:hover:not(:disabled) {
  box-shadow: 0 var(--answer-relief-depth-hover) 0 0 currentColor, 0 26px 48px rgba(170, 159, 238, 0.28);
}

.answer-card.state-neutral.answer-slot-d:hover:not(:disabled) {
  box-shadow: 0 var(--answer-relief-depth-hover) 0 0 currentColor, 0 26px 48px rgba(160, 218, 224, 0.28);
}

.state-selected {
  color: var(--border-selection);
  border-color: var(--border-selection);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    var(--bg-selection);
  --answer-surface-shadow: 0 22px 44px rgba(132, 35, 177, 0.26);
}

.answer-card.state-selected .answer-kbd {
  border-color: var(--border-selection);
}

.state-inactive {
  border: 0;
  background: rgba(194, 203, 217, 0.592);
  box-shadow: none;
}

.answer-card.state-inactive .answer-kbd {
  border: 0;
  border-color: rgba(100, 116, 139, 0.5);
}

.state-correct {
  color: #2d956d;
  border-color: #2d956d;
  background: #94fad3;
  --answer-surface-shadow: 0 22px 44px rgba(45, 149, 109, 0.24);
}

.answer-card.state-correct .answer-kbd {
  border-color: #2d956d;
}

.state-correct-blink {
  animation: correct-answer-blink 0.6s ease-in-out 3;
}

.state-wrong {
  color: #f04962;
  border-color: #f04962;
  background: #ff95a5;
  --answer-surface-shadow: 0 22px 44px rgba(240, 73, 98, 0.24);
}

.answer-card.state-wrong .answer-kbd {
  border-color: #f04962;
}

@keyframes correct-answer-blink {

  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.02);
    filter: brightness(1.25);
    opacity: 0.35;
  }
}

/* END: Question and answer blocks */

/* START: Scoreboard and results */
.score-card,
.ranking-card,
.summary-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--bg);
}

.results-shell {
  width: 100%;
  display: flex;
  justify-content: center;
}

.results-stack {
  width: min(100%, 1120px);
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.score-card {
  flex-direction: column;
  min-width: 0;
  gap: 8px;
}

.score-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.score-card-name {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  display: flex;
  align-items: center;
  min-height: 38px;
  letter-spacing: 0.2em;
}

.score-card-name p {
  font-size: 1.1rem;
  line-height: 1.1;
}

.score-card-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: auto;
}

.score-powerups {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
  width: auto;
  max-width: 100%;
  margin-left: auto;
  align-self: flex-end;
}

.score-powerup-btn {
  width: 34px;
  height: 30px;
  padding: 0;
}

.score-powerup-btn .ti {
  font-size: 20px;
  line-height: 1;
}

.option-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}

.option-row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.option-row-icon .ti {
  font-size: 45px;
  line-height: 1;
}

.score-action {
  min-width: 40px;
  min-height: 38px;
  padding: 0 8px;
}

.score-value,
.ranking-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 38px;
  padding: 0 8px;
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--bg);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.summary-card {
  flex-direction: column;
  align-items: flex-start;
  min-height: 128px;
}

.summary-label {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}

.summary-value {
  font-size: 1.2rem;
  line-height: 1.25;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.result-highlight {
  background:
    linear-gradient(135deg, rgba(132, 35, 177, 0.16), rgba(19, 110, 185, 0.12)),
    var(--bg);
}

/*
.ranking-card-first {
  border-color: #f5b201;
  box-shadow: 3px 3px 0 0 #f5b201;
}

.ranking-card-second {
  border-color: #d1d5db;
  box-shadow: 3px 3px 0 0 #d1d5db;
}

.ranking-card-third {
  border-color: #b06e4c;
  box-shadow: 3px 3px 0 0 #b06e4c;
}
*/
.ranking-player-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ranking-player-name {
  margin: 0;
  min-width: 0;
  font-size: clamp(1.1rem, 0.96rem + 0.7vw, 1.5rem);
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
}

.ranking-player-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.ranking-player-icon .ti {
  font-size: 2.45rem;
  line-height: 1;
}

.ranking-player-icon-first {
  color: #f5b201;
}

.ranking-player-icon-second {
  color: #d1d5db;
}

.ranking-player-icon-third {
  color: #b06e4c;
}

.ranking-score-wrap {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: right;
}

.ranking-score-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  white-space: nowrap;
}

.ranking-score-value {
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

body.dark .score-card,
body.dark .ranking-card,
body.dark .summary-card {
  background: var(--bg);
}

body.dark .game-player-row .score-card {
  background: var(--bg);
}

/* END: Scoreboard and results */

/* START: Responsive tuning */
@media (max-width: 767px) {
  body {
    overflow-x: hidden;
  }

  .setup-screen,
  .setup-grid,
  .setup-column {
    overflow-x: hidden;
  }

  .setup-column {
    overflow: hidden;
  }

  .setup-screen .select,
  .setup-screen select {
    width: 100%;
    max-width: 100%;
  }

  .seo-stack,
  .seo-copy-grid,
  .seo-step-grid,
  .seo-feature-grid,
  .seo-topic-list,
  .seo-link-grid {
    grid-template-columns: 1fr;
  }

  .results-stack {
    grid-template-columns: 1fr;
  }

  .custom-builder-layout,
  .custom-editor-grid,
  .custom-question-body {
    grid-template-columns: 1fr;
  }

  .custom-sidebar {
    position: static;
  }

  .seo-packs-banner {
    min-height: 560px;
  }

  .seo-packs-banner-overlay {
    padding: 28px 18px;
  }

  .seo-packs-pill {
    width: 100%;
  }

  .seo-packs-banner-cta {
    width: 100%;
    min-width: 0;
  }


  .custom-content-stack {
    width: 100%;
  }

  .custom-question-top {
    flex-direction: column;
    align-items: stretch;
  }

  .custom-question-top-actions {
    justify-content: stretch;
  }

  .custom-question-difficulty {
    width: 100%;
  }

  .difficulty-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .question-count-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .difficulty-card,
  .question-count-card {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .section-title {
    font-size: 1.55rem;
  }

  .topbar {
    padding: 10px 12px;
  }

  .topbar-home-nav {
    gap: 4px;
  }

  .topbar-menu-item {
    padding: 6px 8px;
    font-size: 0.99rem;
  }

  .topbar-game-progress {
    min-width: 110px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    position: static;
    z-index: auto;
  }

  .topbar-game-question {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }

  .topbar-progress-shell {
    min-width: 100px;
    order: 10;
    width: 100%;
  }

  .topbar-timer {
    min-width: 74px;
    font-size: 1rem;
  }

  .question-panel {
    padding: 18px;
    transform: none !important;
    transition: none;
  }

  .question-text {
    font-size: 1.45rem;
    line-height: 1.18;
  }

  .question-action-btn {
    width: 100%;
    max-width: 100%;
    min-height: 58px;
    font-size: 1.05rem;
  }

  .game-layout {
    padding-bottom: 8px;
  }

  .game-scoreboard-grid {
    gap: 10px;
  }

  .game-scoreboard-grid .score-card {
    flex-basis: 280px;
    min-width: 280px;
    min-height: 124px;
  }

  .answer-card {
    gap: 12px;
    min-height: 78px;
    padding: 12px 14px;
  }

  .answer-kbd {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .answer-copy {
    font-size: 1.15rem;
    line-height: 1.35;
  }

  .answer-selected-mark {
    font-size: 1.6rem;
  }

  .score-card-top,
  .player-pill,
  .ranking-card {
    flex-direction: column;
    align-items: stretch;
  }

  .ranking-score-wrap {
    justify-content: flex-end;
  }

  .score-card-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .setup-actionbar {
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .setup-actionbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .setup-column {
    min-width: 0;
  }

  .difficulty-card {
    overflow: hidden;
  }

  .difficulty-icon-accent {
    right: -8px;
  }

  .setup-summary {
    flex-direction: column;
  }

  .setup-summary-item {
    padding: 6px 0;
  }

  .setup-summary-item::after {
    top: auto;
    right: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
  }
}


@media (min-width: 1280px) {
  .setup-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 1fr);
  }
}
