@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Staatliches&display=swap');

:root {
  --bg-1: #e7f0ff;
  --bg-2: #f5f9ff;
  --surface: #ffffff;
  --surface-alt: #edf3ff;
  --text: #15213f;
  --text-subtle: #51608c;
  --ink-accent: #0d1830;
  --primary: #1d5bf0;
  --primary-dark: #0f3fbf;
  --accent: #ff8a3d;
  --accent-dark: #ff7420;
  --shadow-lg: 0 28px 60px rgba(18, 32, 68, 0.18);
  --shadow-md: 0 20px 40px rgba(18, 32, 68, 0.16);
  --shadow-soft: 0 10px 26px rgba(18, 32, 68, 0.12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --footerPad: 64px;
  --mobile-footer-height: 0px;
  --modal-backdrop: rgba(12, 18, 38, 0.58);
  --page-gradient: linear-gradient(140deg, var(--bg-1), var(--bg-2));
  --page-background: var(--bg-2);
}

html.dark {
  --bg-1: #071225;
  --bg-2: #111d36;
  --surface: #182446;
  --surface-alt: #1f2f55;
  --text: #f4f7ff;
  --text-subtle: rgba(244, 247, 255, 0.78);
  --ink-accent: #0b1428;
  --shadow-lg: 0 28px 68px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 20px 52px rgba(0, 0, 0, 0.46);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.3);
  --modal-backdrop: rgba(6, 10, 22, 0.76);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

html {
  background: var(--page-gradient);
  background-color: var(--page-background);
  min-height: 100%;
  transition: background 280ms ease, color 180ms ease;
}

body {
  font-family: "Barlow", system-ui, sans-serif;
  color: var(--text);
  background: var(--page-gradient);
  background-color: var(--page-background);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.6vw, 26px);
  padding-bottom: calc(var(--footerPad) + clamp(12px, 2.6vw, 26px));
  transition: background 280ms ease, color 180ms ease;
}

body[data-view="quiz"] {
  --footerPad: 104px;
}

body.results-active {
  --footerPad: 104px;
}

@media (max-width: 720px) {
  :root {
    --mobile-footer-height: clamp(58px, 18vw, 74px);
    --footerPad: var(--mobile-footer-height);
  }

  body {
    --page-pad-block: clamp(10px, 4vw, 18px);
    --page-pad-inline: clamp(12px, 4.8vw, 20px);
    align-items: stretch;
    justify-content: flex-start;
    padding-inline: var(--page-pad-inline);
    padding-block-start: max(env(safe-area-inset-top), var(--page-pad-block));
    padding-block-end: calc(
      var(--footerPad) + max(env(safe-area-inset-bottom), var(--page-pad-block))
    );
    --page-gradient: linear-gradient(
      158deg,
      var(--bg-1) 0%,
      var(--bg-2) 62%,
      var(--surface) 90%,
      var(--surface) 100%
    );
    --page-background: var(--bg-1);
  }

  body.mobile-quiz {
    --mobile-logo-stack: clamp(44px, 13vw, 66px);
    --mobile-stage-gap: clamp(4px, 2vw, 10px);
    --mobile-question-height: clamp(78px, 16svh, 108px);
    --mobile-options-height: clamp(214px, 38svh, 276px);
    --mobile-stage-padding: clamp(44px, 12svh, 68px);
    --mobile-stage-base: calc(
      var(--mobile-question-height) +
      var(--mobile-options-height) +
      var(--mobile-stage-padding)
    );
    --mobile-stage-target: clamp(428px, 72svh, 500px);
    --mobile-top-stack: calc(
      max(env(safe-area-inset-top), var(--page-pad-block)) +
      var(--mobile-logo-stack) +
      var(--mobile-stage-gap)
    );
    --mobile-bottom-stack: max(env(safe-area-inset-bottom), clamp(10px, 3vw, 16px));
    --mobile-stage-height: min(
      calc(100svh - (var(--mobile-top-stack) + var(--mobile-bottom-stack))),
      max(var(--mobile-stage-base), var(--mobile-stage-target))
    );
  }

  body[data-view="quiz"],
  body.results-active {
    --footerPad: 0px;
  }

  body.show-landing {
    --footerPad: var(--mobile-footer-height);
    --page-pad-block: clamp(4px, 1.8vw, 10px);
    min-height: 100dvh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-content: stretch;
    justify-content: stretch;
    gap: 0;
    padding-block-start: max(env(safe-area-inset-top), clamp(4px, 1.6vw, 10px));
    padding-block-end: calc(
      var(--mobile-footer-height) +
      max(env(safe-area-inset-bottom), clamp(6px, 2vw, 12px))
    );
    overflow: hidden;
    position: relative;
    --page-gradient: linear-gradient(
      170deg,
      var(--bg-1) 0%,
      var(--bg-2) 44%,
      #ffffff 88%,
      #ffffff 100%
    );
    --page-background: #ffffff;
  }

  html.dark body.show-landing {
    --page-gradient: linear-gradient(
      172deg,
      #050d1d 0%,
      #0d1830 40%,
      #111d36 92%,
      #111d36 100%
    );
    --page-background: #050d1d;
  }

  body.show-landing #quiz {
    display: none;
  }

  body:not(.show-landing) {
    --footerPad: 0px;
  }

  body:not(.show-landing) .footer-ceia {
    display: none;
  }

  body.show-landing #landing {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0;
  }

  body.show-landing .landing-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(100%, 420px);
    margin-inline: auto;
    padding: clamp(12px, 4.6vw, 22px);
    gap: clamp(18px, 5vw, 28px);
    height: 100%;
    flex: 1 1 auto;
  }

  body.show-landing .landing-inner > * {
    min-height: 0;
    width: 100%;
  }

  body.show-landing .landing-logo {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    order: -1;
  }

  body.show-landing .landing-logo-badge {
    flex: 0 0 auto;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    align-items: center;
    text-align: center;
    gap: clamp(10px, 3.6vw, 16px);
    min-height: auto;
    height: auto;
  }

  body.show-landing .landing-logo-tagline {
    display: none;
  }

  body.show-landing .landing-logo-badge {
    gap: clamp(6px, 2.4vw, 12px);
  }

  body.show-landing .landing-logo-badge img {
    width: clamp(58px, 18vw, 84px);
  }

  body.show-landing .landing-logo-badge .home-logo-title {
    font-size: clamp(0.7rem, 2.3vw, 0.88rem);
    letter-spacing: 0.14em;
  }

  body.show-landing .landing-card {
    flex: 0 0 auto;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    gap: clamp(12px, 3.6vw, 18px);
    align-items: center;
    text-align: center;
    order: 0;
  }

  body.show-landing .landing-card.skills {
    order: 1;
  }

  body.show-landing .landing-card-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(8px, 3.4vw, 16px);
    width: 100%;
  }

  body.show-landing .landing-card h1 {
    width: 100%;
  }

  body.show-landing .landing-card h1 {
    font-size: clamp(1.18rem, 4.8vw, 1.52rem);
    letter-spacing: 0.08em;
  }

  body.show-landing .landing-card .blurb {
    display: none;
  }

  body.show-landing .landing-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 2.8vw, 12px);
    margin-top: clamp(10px, 3.2vw, 18px);
  }

  body.show-landing .landing-actions .btn {
    width: min(100%, 250px);
    font-size: clamp(0.98rem, 3.4vw, 1.08rem);
    padding: clamp(0.58rem, 2.3vw, 0.75rem) clamp(1.1rem, 4vw, 1.4rem);
  }

  body.show-landing .landing-actions .btn-sub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.show-landing .landing-coach-link {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: clamp(6px, 2.6vw, 12px);
  }

  body.show-landing .landing-coach-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0;
    width: auto;
    background: none;
    color: inherit;
    font-weight: 700;
    font-size: clamp(0.9rem, 3vw, 1rem);
    text-decoration: none;
  }

  body.show-landing .landing-coach-link a:hover,
  body.show-landing .landing-coach-link a:focus-visible {
    text-decoration: underline;
  }

  body.show-landing .landing-settings-btn {
    position: absolute;
    top: max(env(safe-area-inset-top), clamp(0px, 1vw, 6px));
    right: max(env(safe-area-inset-right), clamp(0px, 0.5vw, 3px));
    left: auto;
    width: clamp(28px, 8vw, 34px);
    height: clamp(28px, 8vw, 34px);
    font-size: clamp(0.82rem, 4vw, 1rem);
    background: rgba(255, 255, 255, 0.96);
    color: var(--primary);
    box-shadow: var(--shadow-soft);
    transform: translateY(-4px);
  }

  body.show-landing .settings-section.settings-shortcuts {
    display: none;
  }

  body.show-landing .landing-inner {
    gap: clamp(40px, 12vw, 56px);
  }

  body.show-landing .landing-card.casual {
    gap: clamp(4px, 1.8vw, 8px);
  }

  body.show-landing .landing-card.casual .landing-card-head {
    margin-bottom: 0;
  }

  body.show-landing .landing-card.casual .landing-actions {
    margin-top: 0;
  }

  body.show-landing .landing-card.skills {
    margin-top: clamp(26px, 8.6vw, 40px);
    gap: clamp(4px, 1.6vw, 8px);
  }

  body.show-landing .landing-card.skills .landing-card-head {
    width: 100%;
    margin-bottom: 0;
  }

  body.show-landing .landing-card.skills .landing-actions {
    margin-top: 0;
  }

  body.show-landing .landing-card.skills .landing-coach-link {
    margin-top: clamp(2px, 1.2vw, 8px);
  }

  body.show-landing .landing-logo .settings {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    padding: clamp(18px, 5vw, 32px);
    padding-bottom: calc(
      var(--mobile-footer-height, 0px) +
      max(env(safe-area-inset-bottom), clamp(24px, 7vw, 40px))
    );
    width: 100vw;
    height: auto;
    min-height: 0;
    align-items: center;
    justify-content: center;
    background: rgba(11, 20, 40, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0;
    box-shadow: none;
    transform: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    z-index: 360;
  }

  body.show-landing .landing-logo .settings.open {
    opacity: 1;
    pointer-events: auto;
  }

  body.show-landing .landing-logo .settings-panel {
    position: relative;
    width: min(92vw, 360px);
    max-height: min(
      440px,
      calc(100dvh - var(--mobile-footer-height, 0px) - clamp(120px, 32vw, 188px))
    );
    border-radius: 22px;
    padding: clamp(20px, 6vw, 26px);
    padding-top: clamp(44px, 10vw, 56px);
    box-shadow: 0 24px 60px rgba(9, 18, 38, 0.32);
    gap: clamp(0.8rem, 2.8vw, 1.2rem);
    transform: translate3d(0, 16px, 0);
    transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 200ms ease;
    overflow-y: auto;
  }

  body.show-landing .landing-logo .settings:not(.open) .settings-panel {
    opacity: 0;
  }

  body.show-landing .landing-logo .settings.open .settings-panel {
    transform: none;
    opacity: 1;
  }

  body.show-landing .landing-logo .settings .settings-header {
    justify-content: center;
    margin-bottom: clamp(0.4rem, 2.4vw, 0.9rem);
    padding: 0;
  }

  body.show-landing .landing-logo .settings .settings-header h3 {
    font-size: clamp(1.05rem, 4.8vw, 1.26rem);
  }

  body.show-landing .landing-logo .settings #closeSettings {
    position: absolute;
    top: clamp(14px, 4.8vw, 22px);
    right: clamp(14px, 4.8vw, 22px);
    width: clamp(28px, 8vw, 34px);
    height: clamp(28px, 8vw, 34px);
    border-radius: 50%;
    margin: 0;
    box-shadow: 0 14px 28px rgba(9, 18, 38, 0.18);
    background: rgba(15, 27, 60, 0.12);
    color: var(--primary);
    opacity: 0;
    pointer-events: none;
  }

  body.show-landing .landing-logo .settings.open #closeSettings {
    opacity: 1;
    pointer-events: auto;
  }

  body.show-landing .landing-logo .settings .settings-theme-options {
    flex-direction: column;
    gap: clamp(0.5rem, 2.8vw, 0.9rem);
    align-items: stretch;
  }

  body.show-landing .landing-logo .settings .settings-theme-option {
    justify-content: center;
  }

  body.show-landing .landing-logo .settings .settings-version {
    margin-top: clamp(0.8rem, 4vw, 1.6rem);
    padding-top: clamp(1rem, 7vh, 2rem);
    text-align: left;
  }

  html.dark body.show-landing .landing-logo .settings {
    background: rgba(2, 6, 16, 0.72);
  }

  html.dark body.show-landing .landing-logo .settings-panel {
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.55);
  }

  html.dark body {
    background: linear-gradient(
      152deg,
      var(--bg-1) 0%,
      var(--bg-2) 86%,
      var(--surface) 100%
    );
    background-color: var(--surface);
  }
}

::selection {
  background: rgba(255, 138, 61, 0.58);
  color: #ffffff;
}

.btn::selection,
.btn-sub::selection,
.btn-primary::selection {
  color: #ffffff;
}

html.dark ::selection {
  background: rgba(255, 138, 61, 0.7);
  color: #ffffff;
}

body.noscroll {
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 800;
}

h1 {
  font-size: clamp(2.3rem, 5vw, 3.7rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

p {
  line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* HOME LOGO                                                           */
/* ------------------------------------------------------------------ */
.home-logo-title {
  font-family: "Bebas Neue", "Barlow", system-ui, sans-serif;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: clamp(1.25rem, 3.8vw, 1.9rem);
  color: var(--ink-accent);
  text-shadow: 0 8px 22px rgba(9, 18, 36, 0.22);
  text-align: center;
  margin-bottom: clamp(12px, 3vw, 18px);
  width: 100%;
}

.landing-logo-badge .home-logo-title {
  order: -1;
}

html.dark .home-logo-title {
  color: rgba(244, 247, 255, 0.92);
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

#homeLogo {
  position: fixed;
  top: clamp(16px, 3vw, 28px);
  left: clamp(18px, 3.6vw, 36px);
  z-index: 120;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  transition: transform 220ms ease;
}

body.show-landing #homeLogo {
  display: none;
}

#homeLogo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

#homeLogo:hover,
#homeLogo:focus-visible {
  transform: translateY(-2px);
}

@media (max-width: 720px) {
  .home-logo-title {
    font-size: clamp(0.95rem, 4.6vw, 1.28rem);
    letter-spacing: 0.12em;
    margin-bottom: clamp(8px, 3.2vw, 12px);
  }

  #homeLogo {
    width: 48px;
    height: 48px;
  }

  #homeLogo img {
    width: 34px;
    height: 34px;
  }

  body:not(.show-landing) #homeLogo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    position: static;
    margin: clamp(4px, 2.4vw, 10px) auto clamp(8px, 3vw, 14px);
  }

  body:not(.show-landing) #homeLogo img {
    width: clamp(42px, 13vw, 56px);
    height: auto;
  }

  body[data-view="quiz"] #homeLogo {
    justify-content: center;
  }

  body.results-active #homeLogo {
    justify-content: center;
    align-self: center;
    margin-inline: auto;
    margin-bottom: clamp(6px, 3vw, 12px);
  }
}

body.mode-serious.results-active #homeLogo {
  display: none;
}

/* ------------------------------------------------------------------ */
/* LANDING                                                             */
/* ------------------------------------------------------------------ */
#landing {
  position: fixed;
  inset: clamp(12px, 3vw, 34px) clamp(12px, 3vw, 34px)
    calc(var(--footerPad) + env(safe-area-inset-bottom) + clamp(12px, 3vw, 34px)) clamp(12px, 3vw, 34px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.5vw, 22px);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.84));
  border: 1px solid rgba(255, 138, 61, 0.18);
  box-shadow: 0 32px 62px rgba(15, 27, 60, 0.12);
  z-index: 80;
  transition: opacity 220ms ease;
  --landing-card-min: clamp(320px, 30vw, 420px);
}

.landing-inner {
  width: min(1240px, 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(clamp(220px, 28vw, 420px), 1fr));
  align-items: stretch;
  justify-items: stretch;
  justify-content: center;
  gap: clamp(20px, 3.5vw, 48px);
  grid-auto-rows: minmax(var(--landing-card-min), 1fr);
}

@media (max-width: 720px) {
  #landing {
    position: static;
    inset: auto;
    width: 100%;
    margin: 0;
    padding-inline: var(--page-pad-inline);
    padding-block: clamp(6px, 2.6vw, 12px) clamp(12px, 4vw, 18px);
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    --landing-card-min: auto;
    flex: 1 0 auto;
    display: flex;
    align-items: stretch;
  }

  .landing-inner {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2.6vw, 12px);
    align-content: stretch;
    align-items: stretch;
    justify-content: stretch;
    width: min(100%, 420px);
    margin-inline: auto;
    height: 100%;
  }

  body.show-landing .landing-inner {
    width: min(100%, 420px);
    gap: clamp(20px, 6vw, 28px);
  }

  body.show-landing .landing-logo-badge img {
    width: clamp(58px, 18vw, 84px);
  }

  body.show-landing .landing-logo-badge .home-logo-title {
    font-size: clamp(0.72rem, 2.4vw, 0.92rem);
    letter-spacing: 0.1em;
  }

  .landing-card-head {
    gap: clamp(4px, 2vw, 10px);
    align-items: flex-start;
    text-align: left;
  }

  .landing-card h1 {
    font-size: clamp(1.32rem, 4.6vw, 1.7rem);
    text-align: left;
    margin: 0;
  }

  body.show-landing .landing-card h1 {
    font-size: clamp(1.32rem, 4.6vw, 1.7rem);
  }

  .landing-card .blurb {
    display: block;
    font-size: 0.78rem;
    line-height: 1.3;
    color: var(--text-subtle);
    text-align: left;
  }

  .landing-card {
    width: 100%;
    min-height: auto;
    height: auto;
    padding: clamp(8px, 2.4vw, 14px);
    gap: clamp(6px, 2.2vw, 10px);
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    border-radius: 24px;
    border: none;
    box-shadow: 0 20px 42px rgba(15, 27, 60, 0.18);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.9));
  }

  body.show-landing .landing-card {
    width: 100%;
    margin-inline: auto;
    min-height: 0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3.6vw, 18px);
    align-items: center;
    background: none;
    box-shadow: none;
  }

  body.show-landing .landing-card.casual,
  body.show-landing .landing-card.skills {
    min-height: auto;
    height: auto;
    justify-content: center;
  }

  .landing-card-skills__top {
    flex-direction: column;
    gap: clamp(12px, 3.8vw, 16px);
    width: 100%;
  }

  .landing-card-code__copy {
    align-items: flex-start;
    text-align: left;
  }

  .landing-card-code__copy p {
    font-size: 0.9rem;
  }

  .landing-card-code__status {
    text-align: left;
  }

  .landing-team-hub-btn {
    align-self: stretch;
    width: 100%;
  }

  .landing-card-code {
    width: 100%;
    align-items: stretch;
    gap: clamp(10px, 3vw, 16px);
  }

  .landing-card-code__field {
    grid-template-columns: 1fr auto;
  }

  .landing-card-code__icon {
    display: none;
  }

  .landing-card-code__field input {
    font-size: 1rem;
    text-align: left;
  }

  .landing-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(6px, 2vw, 10px);
  }

  .landing-actions .btn {
    width: 100%;
    padding: clamp(0.52rem, 2vw, 0.68rem) clamp(0.74rem, 2.6vw, 0.92rem);
    font-size: clamp(0.86rem, 2.8vw, 0.94rem);
    justify-content: center;
  }

  body.show-landing .landing-actions .btn {
    width: min(100%, 250px);
    font-size: clamp(0.98rem, 3.4vw, 1.08rem);
    padding: clamp(0.58rem, 2.3vw, 0.75rem) clamp(1.1rem, 4vw, 1.4rem);
  }

  body.show-landing .landing-actions .btn-sub,
  body.show-landing .landing-card.casual .landing-actions .btn-sub,
  body.show-landing .landing-card.skills .landing-actions .btn-sub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.show-landing .landing-actions {
    margin-block-start: clamp(10px, 3.2vw, 18px);
  }

  body.show-landing .landing-card.casual {
    padding-bottom: 0;
  }

  body.show-landing .landing-card.casual .landing-actions {
    margin-top: clamp(10px, 3.2vw, 18px);
  }

  .landing-card-note {
    font-size: 0.8rem;
    color: var(--text-subtle);
    margin: clamp(2px, 1.2vw, 6px) 0 0;
  }

  body.show-landing .landing-card-note {
    margin-top: auto;
  }

@media (min-width: 721px) {
  .landing-card-note {
    margin-top: auto;
    margin-bottom: 0;
  }
}

.landing-team-link {
  margin: clamp(18px, 3vw, 28px) auto 0;
  max-width: 680px;
  text-align: center;
  font-size: 0.95rem;
  color: rgba(15, 27, 60, 0.65);
}

.landing-team-link__button {
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.landing-team-link__button:hover,
.landing-team-link__button:focus-visible {
  color: rgba(15, 27, 60, 0.85);
  outline: none;
}

  .landing-logo {
    order: 0;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-inline: 0;
  }

  body.show-landing .landing-logo {
    order: -1;
    align-items: center;
    align-self: center;
    justify-content: center;
    margin: 0;
    --settings-trigger-top: clamp(12px, 3vw, 18px);
    --settings-trigger-right: auto;
    --settings-panel-padding: clamp(16px, 4vw, 20px);
  }

  body.show-landing .landing-card.casual {
    order: 0;
  }

  body.show-landing .landing-card.skills {
    order: 1;
  }

  .landing-logo-badge {
    width: 100%;
    max-width: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-width: 0;
    background: none;
    box-shadow: none;
    text-align: center;
    margin-inline: auto;
    align-self: center;
    min-height: auto;
    padding: 0;
    gap: clamp(12px, 4.2vw, 18px);
    border-radius: 0;
  }

  body.show-landing .landing-logo-badge {
    width: 100%;
    max-width: none;
    padding: 0;
    gap: clamp(12px, 4.2vw, 18px);
    align-self: center;
  }

  .landing-logo-badge img,
  body.show-landing .landing-logo-badge img {
    width: clamp(58px, 20vw, 88px);
  }

  .landing-logo-tagline {
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: left;
    max-width: none;
  }

  body.show-landing .landing-logo-tagline {
    display: none;
  }

  .landing-logo-caption {
    font-size: clamp(0.56rem, 2.2vw, 0.7rem);
    letter-spacing: 0.12em;
  }

  body.show-landing .landing-logo-caption {
    letter-spacing: 0.1em;
  }

  body.show-landing .landing-logo-badge .home-logo-title {
    font-size: clamp(1rem, 5.6vw, 1.5rem);
    letter-spacing: 0.12em;
    margin-bottom: 0;
    text-align: center;
  }
}

.landing-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.9));
  color: var(--text);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 27, 60, 0.08);
  border-top: 6px solid transparent;
  box-shadow: var(--shadow-soft);
  padding: clamp(22px, 3.5vw, 36px);
  display: flex;
  flex: 1 1 clamp(220px, 30vw, 420px);
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(18px, 3vw, 26px);
  text-align: center;
  min-height: var(--landing-card-min);
  height: 100%;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.landing-card h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.05;
  word-break: break-word;
}

.landing-card:hover,
.landing-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.landing-card.bubble-card-grab {
  transform: translate3d(0, -8px, 0) rotate(var(--bubble-card-tilt, 0deg));
  box-shadow: var(--shadow-md);
}

.landing-card.bubble-card-away {
  --bubble-card-shove: var(--bubble-card-shove, 0%);
  --bubble-card-tilt: var(--bubble-card-tilt, -9deg);
  animation: bubble-card-launch 620ms cubic-bezier(0.19, 0.88, 0.32, 1.12) forwards;
  animation-delay: var(--bubble-card-delay, 0s);
  pointer-events: none;
  opacity: 0;
}

@keyframes bubble-card-launch {
  0% {
    transform: translate3d(0, -6px, 0) rotate(calc(var(--bubble-card-tilt) * 0.25));
    opacity: 1;
  }
  35% {
    transform: translate3d(4px, -32px, 0) rotate(calc(var(--bubble-card-tilt) * 0.55));
  }
  100% {
    transform: translate3d(var(--bubble-card-shove), -160%, 0) rotate(var(--bubble-card-tilt));
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-card.bubble-card-away {
    animation-duration: 0ms;
  }
}

.landing-card.casual {
  border-top-color: rgba(255, 138, 61, 0.68);
}

.landing-card.skills {
  border-top-color: rgba(29, 91, 240, 0.55);
}

.landing-card-skills__top {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(16px, 3vw, 24px);
}

.landing-card-code {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  width: min(360px, 100%);
}

.landing-card-code__copy {
  flex: 1 1 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-subtle);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 360px;
}

.landing-card-code__copy p {
  margin: 0;
}

.landing-team-hub-btn {
  align-self: center;
  border-radius: 999px;
  border: 1px solid rgba(29, 91, 240, 0.28);
  background: rgba(29, 91, 240, 0.12);
  color: var(--ink-accent);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.6rem 1.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.landing-team-hub-btn:hover,
.landing-team-hub-btn:focus-visible {
  background: rgba(29, 91, 240, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(29, 91, 240, 0.18);
}

html.dark .landing-team-hub-btn {
  border-color: rgba(114, 154, 255, 0.32);
  background: rgba(29, 91, 240, 0.24);
  color: rgba(244, 247, 255, 0.9);
}

html.dark .landing-team-hub-btn:hover,
html.dark .landing-team-hub-btn:focus-visible {
  background: rgba(29, 91, 240, 0.3);
  box-shadow: 0 14px 28px rgba(12, 21, 44, 0.45);
}

.landing-card-code__label {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-soft);
}

.landing-card-code__field {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.landing-card-code__icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(29, 91, 240, 0.12);
  color: var(--primary);
  font-size: 1.35rem;
  flex-shrink: 0;
}

.landing-card-code__icon svg {
  width: 22px;
  height: 22px;
}

.landing-card-code__field input {
  border-radius: 14px;
  border: 1px solid rgba(15, 27, 60, 0.12);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(15, 27, 60, 0.08);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-card-code__field input::placeholder {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: var(--text-soft);
}

.landing-card-code__field input:focus {
  outline: none;
  border-color: rgba(29, 91, 240, 0.6);
  box-shadow: 0 0 0 3px rgba(29, 91, 240, 0.2);
}

html.dark .landing-card-code__field input {
  background: rgba(16, 26, 54, 0.82);
  border-color: rgba(173, 198, 255, 0.32);
  color: rgba(244, 247, 255, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

html.dark .landing-card-code__field input::placeholder {
  color: rgba(201, 210, 233, 0.72);
}

html.dark .landing-card-code__icon {
  background: rgba(29, 91, 240, 0.28);
  color: rgba(214, 225, 255, 0.92);
}

.landing-card-code__submit {
  border-radius: 999px;
  border: 0;
  padding: 0.65rem 1.3rem;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 12px 26px rgba(29, 91, 240, 0.28);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.landing-card-code__submit:hover,
.landing-card-code__submit:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(29, 91, 240, 0.34);
}

.landing-card-code__hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.landing-card-code__status {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-accent);
}

.landing-card-code__status--pending {
  color: var(--text-muted);
}

.landing-card-code__status--success {
  color: #1e7f4d;
}

html.dark .landing-card-code__status {
  color: rgba(212, 220, 245, 0.92);
}

html.dark .landing-card-code__status--pending {
  color: rgba(164, 180, 218, 0.8);
}

html.dark .landing-card-code__status--success {
  color: #6fe3a7;
}

.landing-card-code__error {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  font-weight: 600;
  color: #d24a4a;
}

html.dark .landing-card-code__error {
  color: #ff8f8f;
}

.landing-card-head {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.5vw, 18px);
  align-items: center;
  text-align: center;
}

.landing-card .blurb {
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--text-subtle);
  max-width: 520px;
  text-align: center;
}

.landing-card .landing-actions {
  width: 100%;
}

.landing-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(12px, 2.6vw, 16px);
  align-items: stretch;
}

.landing-actions .btn {
  width: 100%;
  justify-content: center;
}

.landing-coach-link {
  margin: clamp(12px, 2.6vw, 18px) auto 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-accent);
  text-align: center;
}

html.dark .landing-coach-link {
  color: rgba(244, 247, 255, 0.92);
}

.landing-coach-link a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.landing-coach-link a:hover,
.landing-coach-link a:focus-visible {
  text-decoration: underline;
}

#landing .btn {
  width: 100%;
}

@media (min-width: 721px) {
  .landing-card {
    align-items: flex-start;
    text-align: left;
  }

  .landing-card-head {
    align-items: flex-start;
    text-align: left;
    width: 100%;
    min-height: clamp(13rem, 24vw, 16rem);
  }

  .landing-card .blurb {
    text-align: left;
  }

  .landing-card .landing-actions {
    align-self: stretch;
  }
}

.landing-logo {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  justify-self: center;
  align-self: stretch;
  width: 100%;
  margin-inline: auto;
  --settings-trigger-size: clamp(28px, 3vw, 34px);
  --settings-trigger-font: 0.88rem;
  --settings-close-font: 0.95rem;
  --settings-trigger-top: clamp(10px, 2.1vw, 18px);
  --settings-trigger-right: clamp(6px, 1.6vw, 14px);
  --settings-close-size: var(--settings-trigger-size);
  --badge-border: 3px;
  --badge-radius: 28px;
  --badge-padding: clamp(18px, 4.2vw, 28px);
  --settings-panel-padding: clamp(20px, 4.8vw, 28px);
  --settings-slide-distance: clamp(16px, 3.8vw, 28px);
}

.landing-settings-btn {
  display: inline-flex;
  position: absolute;
  top: var(--settings-trigger-top);
  right: var(--settings-trigger-right);
  width: var(--settings-trigger-size);
  height: var(--settings-trigger-size);
  font-size: var(--settings-trigger-font);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: transform 180ms ease, box-shadow 200ms ease, background 180ms ease,
    color 160ms ease, opacity 140ms ease;
  z-index: 5;
}

.landing-logo-badge {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(10px, 2.8vw, 16px);
  padding: var(--badge-padding);
  border-radius: var(--badge-radius);
  background: rgba(255, 255, 255, 0.95);
  border: var(--badge-border) solid rgba(255, 138, 61, 0.34);
  box-shadow: 0 20px 38px rgba(15, 27, 60, 0.16);
  text-align: center;
  min-height: var(--landing-card-min);
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

@media (min-width: 721px) {
  .landing-logo-badge {
    justify-content: center;
  }

  .landing-logo-badge .home-logo-title {
    margin-bottom: clamp(10px, 1.8vw, 16px);
  }
}

.landing-logo-badge img {
  width: clamp(112px, 16vw, 182px);
  height: auto;
  display: block;
}

.landing-logo-tagline {
  margin: clamp(6px, 2vw, 12px) 0 0;
  font-size: clamp(0.98rem, 2.6vw, 1.08rem);
  line-height: 1.5;
  color: var(--text-subtle);
  text-align: center;
  max-width: 24ch;
}

.landing-logo-caption {
  margin: 0;
  font-weight: 800;
  font-size: clamp(0.82rem, 2vw, 0.98rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}

.landing-logo .settings {
  position: absolute;
  inset: 0;
  padding: var(--badge-border);
  width: auto;
  height: auto;
  max-width: none;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: rgba(17, 26, 46, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--badge-radius);
  box-shadow: none;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(var(--settings-slide-distance) * -0.35));
  transition: opacity 220ms ease, transform 360ms cubic-bezier(0.22, 0.75, 0.25, 0.99);
  z-index: 4;
}

.landing-logo .settings.open {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.landing-logo .settings-panel {
  width: 100%;
  height: 100%;
  background: var(--surface);
  color: var(--text);
  border-radius: calc(var(--badge-radius) - var(--badge-border));
  box-shadow: none;
  padding: var(--settings-panel-padding);
  padding-top: calc(var(--settings-trigger-top) - var(--badge-border));
  display: flex;
  flex-direction: column;
  gap: clamp(0.9rem, 2.6vw, 1.4rem);
  max-height: 100%;
  overflow: auto;
  transform: translateY(calc(var(--settings-slide-distance) * -1));
  opacity: 0;
  transition: transform 380ms cubic-bezier(0.18, 0.88, 0.32, 1), opacity 220ms ease;
}

.landing-logo .settings .settings-header {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.5rem, 1.8vw, 0.9rem);
  margin-bottom: clamp(0.6rem, 2.6vw, 0.95rem);
  padding-top: 0;
  padding-right: calc(var(--settings-close-size) + clamp(8px, 2.8vw, 16px));
  min-height: var(--settings-close-size);
}

.landing-logo .settings.open .settings-panel {
  transform: none;
  opacity: 1;
}

.landing-logo .settings:not(.open) .settings-panel {
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .landing-logo .settings {
    transform: none;
    transition: opacity 160ms ease;
  }

  .landing-logo .settings-panel {
    transform: none;
    transition: opacity 160ms ease;
  }

  .landing-logo .settings #closeSettings {
    transform: none;
  }
}

.landing-logo .settings #closeSettings {
  position: absolute;
  top: calc(var(--settings-trigger-top) - var(--badge-border));
  right: calc(var(--settings-trigger-right) - var(--badge-border));
  width: var(--settings-close-size);
  height: var(--settings-close-size);
  border-radius: 50%;
  border: 0;
  background: rgba(15, 27, 60, 0.12);
  color: var(--primary);
  font-size: var(--settings-close-font);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(15, 27, 60, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transition: background 160ms ease, opacity 180ms ease, box-shadow 200ms ease, color 160ms ease;
  z-index: 6;
}

.landing-logo .settings.open #closeSettings {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.landing-logo .settings.open #closeSettings:hover,
.landing-logo .settings.open #closeSettings:focus-visible {
  transform: none;
}

.landing-logo .settings #closeSettings:hover,
.landing-logo .settings #closeSettings:focus-visible {
  transform: translateY(-2px);
  background: rgba(15, 27, 60, 0.2);
}

html.dark .landing-logo .settings {
  background: rgba(6, 12, 28, 0.28);
}

html.dark .landing-logo .settings-panel {
  box-shadow: none;
}

html.dark .landing-logo .settings #closeSettings {
  background: rgba(244, 247, 255, 0.18);
  color: rgba(15, 27, 60, 0.85);
}

@media (max-width: 720px) {
  .landing-logo {
    --settings-trigger-size: clamp(22px, 6vw, 28px);
    --settings-trigger-font: 0.8rem;
    --settings-close-font: 0.92rem;
    --settings-close-size: clamp(22px, 6vw, 28px);
    --settings-trigger-top: clamp(8px, 3.4vw, 12px);
    --settings-trigger-right: clamp(2px, 1.4vw, 8px);
    --badge-radius: 10px;
    --badge-padding: clamp(8px, 2.8vw, 12px);
    --settings-panel-padding: clamp(12px, 3vw, 16px);
    --settings-slide-distance: clamp(12px, 3vw, 18px);
  }

  .landing-settings-btn,
  .landing-logo .settings #closeSettings {
    display: inline-flex;
    background: rgba(15, 27, 60, 0.12);
    color: var(--primary);
    box-shadow: 0 10px 22px rgba(15, 27, 60, 0.18);
  }

  .landing-settings-btn:hover,
  .landing-settings-btn:focus-visible,
  .landing-logo .settings #closeSettings:hover,
  .landing-logo .settings #closeSettings:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(15, 27, 60, 0.22);
    background: rgba(15, 27, 60, 0.18);
  }

  .landing-settings-btn.settings-active {
    background: rgba(15, 27, 60, 0.22);
    box-shadow: 0 12px 26px rgba(15, 27, 60, 0.22);
    opacity: 0;
    pointer-events: none;
  }

  html.dark .landing-settings-btn,
  html.dark .landing-logo .settings #closeSettings {
    background: rgba(244, 247, 255, 0.18);
    color: rgba(15, 27, 60, 0.85);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  }

  html.dark .landing-settings-btn:hover,
  html.dark .landing-settings-btn:focus-visible,
  html.dark .landing-logo .settings #closeSettings:hover,
  html.dark .landing-logo .settings #closeSettings:focus-visible {
    background: rgba(244, 247, 255, 0.24);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
  }

  body:not(.show-landing) .landing-settings-btn {
    display: none;
  }

  body.show-landing #gear {
    display: none;
  }

  .landing-logo .settings-panel {
    padding-top: calc(var(--settings-trigger-top) - var(--badge-border));
    gap: clamp(0.6rem, 2.2vw, 0.9rem);
  }

  .landing-logo .settings .settings-header h3 {
    font-size: clamp(0.98rem, 4.6vw, 1.18rem);
  }

  .landing-logo .settings #closeSettings {
    position: absolute;
    top: calc(var(--settings-trigger-top) - var(--badge-border));
    right: calc(var(--settings-trigger-right) - var(--badge-border));
    width: var(--settings-close-size);
    height: var(--settings-close-size);
    font-size: clamp(0.95rem, 4.4vw, 1.15rem);
    margin: 0;
    transform: none;
  }

  .landing-logo .settings .settings-theme-options {
    flex-direction: row;
    gap: clamp(0.35rem, 2.2vw, 0.6rem);
  }

  .landing-logo .settings .settings-theme-option {
    flex: 1 1 0;
    justify-content: center;
  }

  .landing-logo .settings .settings-theme-option input[type="radio"] {
    margin: 0;
  }

  .landing-logo .settings .settings-theme-option span {
    font-size: clamp(0.76rem, 2.6vw, 0.88rem);
  }

  .landing-logo .settings .settings-version {
    margin-top: clamp(0.6rem, 3.4vw, 1.2rem);
    padding-top: clamp(0.8rem, 6vh, 1.6rem);
    text-align: left;
    font-size: clamp(0.68rem, 2.4vw, 0.82rem);
  }

  body.show-landing .landing-logo .settings .settings-version {
    padding-top: clamp(1rem, 8vh, 2rem);
  }

  .landing-card {
    min-height: auto;
    padding: clamp(10px, 3.8vw, 16px);
    gap: clamp(6px, 2.6vw, 10px);
    justify-content: flex-start;
    text-align: center;
  }

  #landing .btn {
    padding: 0.48rem 0.92rem;
    font-size: 0.88rem;
  }

  .landing-card-head {
    gap: clamp(4px, 2.4vw, 8px);
    align-items: center;
  }

  .landing-actions {
    gap: clamp(6px, 2.4vw, 10px);
  }

  .landing-logo-badge {
    gap: clamp(2px, 1.8vw, 5px);
    justify-content: center;
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .landing-logo-badge img {
    width: clamp(48px, 15vw, 64px);
  }

  .landing-logo-caption {
    font-size: clamp(0.68rem, 2.8vw, 0.85rem);
    letter-spacing: 0.1em;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .landing-logo-badge {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

html.dark #landing {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

html.dark .landing-card {
  background: linear-gradient(180deg, rgba(27, 41, 74, 0.92), rgba(17, 28, 54, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
}

html.dark .landing-card.casual {
  border-top-color: rgba(255, 168, 103, 0.78);
}

html.dark .landing-card.skills {
  border-top-color: rgba(69, 142, 255, 0.68);
}

html.dark .landing-logo-badge {
  background: rgba(15, 24, 48, 0.92);
  border-color: rgba(255, 138, 61, 0.5);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.42);
}

@media (max-width: 720px) {
  html.dark body.show-landing .landing-card,
  html.dark body.show-landing .landing-logo-badge {
    background: none;
    border: 0;
    box-shadow: none;
  }

  html.dark body.show-landing #landing {
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  html.dark body.show-landing .landing-card.casual,
  html.dark body.show-landing .landing-card.skills {
    border-top: 0;
  }
}

html.dark .landing-logo-caption {
  color: rgba(255, 188, 120, 0.92);
}

@media (max-width: 960px) and (min-width: 721px) {
  .landing-inner {
    flex-direction: column;
    align-items: center;
  }

  .landing-card,
  .landing-logo {
    flex: 0 1 auto;
    width: min(520px, 100%);
  }

  .landing-logo {
    order: 2;
  }

  .landing-logo-badge {
    width: min(100%, 320px);
    margin-inline: auto;
  }

  #landing {
    inset: clamp(10px, 2.5vw, 18px) clamp(10px, 3vw, 18px)
      calc(var(--footerPad) + env(safe-area-inset-bottom) + clamp(10px, 2.5vw, 18px)) clamp(10px, 3vw, 18px);
  }
}

@media (max-height: 520px) {
  #landing {
    --landing-card-min: clamp(240px, 52vh, 360px);
  }

  .landing-card {
    padding: clamp(18px, 4vh, 28px);
    gap: clamp(14px, 3vh, 20px);
  }

  .landing-card .blurb {
    font-size: 0.98rem;
  }
}

/* ------------------------------------------------------------------ */
/* BUTTONS                                                             */
/* ------------------------------------------------------------------ */
.btn {
  font: 800 1rem/1 "Barlow", system-ui, sans-serif;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  padding: 0.85rem 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
  transition: transform 180ms ease, box-shadow 200ms ease, background 200ms ease, color 160ms ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 16px 36px rgba(29, 91, 240, 0.28);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(29, 91, 240, 0.35);
}

.btn-sub {
  background: linear-gradient(135deg, rgba(29, 91, 240, 0.12), rgba(255, 138, 61, 0.18));
  color: var(--ink-accent);
  border: 0;
  box-shadow: 0 12px 26px rgba(16, 33, 72, 0.14);
}

.btn-sub:hover,
.btn-sub:focus-visible {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  box-shadow: 0 18px 34px rgba(16, 33, 72, 0.2);
  transform: translateY(-2px);
}

html:not(.dark) #learnMore:hover,
html:not(.dark) #learnMore:focus-visible {
  color: #fff;
}

html.dark .btn-sub {
  background: linear-gradient(135deg, rgba(29, 91, 240, 0.28), rgba(255, 138, 61, 0.32));
  color: #fff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

html.dark .btn-sub:hover,
html.dark .btn-sub:focus-visible {
  color: #fff;
}

.btn-hero {
  font-size: 1.15rem;
  padding: 1.15rem 2.6rem;
  width: min(360px, 100%);
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.again-btn {
  margin: 1.4rem auto 0;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: min(360px, 100%);
  padding: 1rem 2.2rem;
}

button:focus-visible,
.btn:focus-visible {
  outline: 3px solid rgba(52, 86, 214, 0.32);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* CARD / STAGE                                                        */
/* ------------------------------------------------------------------ */
.card {
  width: min(1120px, 100%);
  height: min(860px, calc(100svh - var(--footerPad) - clamp(42px, 7vw, 92px)));
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(22px, 4vw, 38px);
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.show-landing .card {
  display: none !important;
}

.card.active {
  display: flex;
  animation: cardIn 320ms cubic-bezier(0.22, 0.75, 0.25, 0.99);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: top center;
  text-align: center;
}

.quiz-shell {
  position: relative;
  width: min(820px, 100%);
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: clamp(16px, 2.8vw, 26px);
}

@media (min-width: 901px) {
  .card.casual .quiz-shell {
    margin-top: -18px;
  }

  .card.skills .quiz-shell {
    margin-top: -24px;
    gap: clamp(14px, 2.2vw, 22px);
  }

  .card.casual .quiz-main {
    margin-bottom: -38px;
  }

  .card.skills .quiz-main {
    margin-bottom: -16px;
  }

  .card.casual .quiz-progress {
    margin-top: -48px;
  }

  .card.skills .quiz-progress {
    margin-top: 4px;
  }

  .card.casual .quiz-footer-nav {
    margin-top: -18px;
  }

  .card.skills .quiz-footer-nav {
    margin-top: -14px;
  }
}

.quiz-shell--break {
  justify-content: center;
  align-items: center;
}

.quiz-shell--break .quiz-main {
  width: min(480px, 100%);
}

.quiz-shell--intro {
  justify-content: center;
}

.quiz-shell--intro .quiz-main {
  width: min(540px, 100%);
  align-items: stretch;
  gap: clamp(18px, 3vw, 28px);
  text-align: left;
}

.quiz-intro-copy h2 {
  margin-bottom: clamp(8px, 1.6vw, 12px);
}

.quiz-intro-copy p {
  margin: 0;
  color: var(--text-subtle);
  line-height: 1.6;
}

.team-code-form {
  display: grid;
  gap: clamp(16px, 2.8vw, 22px);
}

.team-code-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 24px);
}

.team-code-form__grid label,
.team-code-form__code {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}

.team-code-lede {
  margin: 0 0 clamp(14px, 3vw, 20px);
  color: var(--text-subtle);
  font-size: clamp(0.92rem, 2.4vw, 1rem);
  line-height: 1.6;
}

.team-code-form label span {
  font-size: 0.82em;
  font-weight: 600;
  color: var(--text-subtle);
}

.team-code-example {
  display: block;
  font-size: 0.82em;
  font-weight: 600;
  color: var(--text-subtle);
  margin-top: 4px;
}

.team-code-status {
  margin: 0;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: none;
  font-size: 0.95rem;
  color: var(--text-subtle);
  line-height: 1.6;
}

.team-code-status:not([hidden]) {
  margin: clamp(10px, 2.4vw, 16px) 0;
}

.team-code-status strong {
  color: var(--ink-accent);
}

.team-code-status--active {
  color: var(--ink-accent);
  font-weight: 700;
}

.team-code-status--cleared {
  color: var(--ink-accent);
  font-weight: 700;
}

.team-code-feedback {
  position: relative;
  margin: clamp(10px, 2.6vw, 16px) 0 0;
  padding: clamp(14px, 3vw, 18px) clamp(16px, 3vw, 22px);
  padding-left: calc(clamp(16px, 3vw, 22px) + 40px);
  border-radius: 18px;
  border: 1px solid rgba(15, 27, 60, 0.12);
  background: rgba(15, 27, 60, 0.05);
  color: var(--ink-accent);
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 600;
}

.team-code-feedback[hidden] {
  display: none;
}

.team-code-feedback__text {
  margin: 0;
}

.team-code-feedback::before {
  content: '';
  position: absolute;
  left: clamp(16px, 3vw, 22px);
  top: 50%;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 700;
  transform: translateY(-50%);
  color: #fff;
  background: rgba(15, 27, 60, 0.25);
}

.team-code-feedback[data-state="loading"] {
  color: var(--text-subtle);
}

.team-code-feedback[data-state="loading"]::before {
  border: 3px solid rgba(15, 27, 60, 0.16);
  border-top-color: var(--primary);
  background: transparent;
  animation: spin 0.9s linear infinite;
}

.team-code-feedback[data-state="success"] {
  border-color: rgba(30, 127, 77, 0.32);
  background: rgba(30, 127, 77, 0.12);
  color: var(--ink-accent);
}

.team-code-feedback[data-state="success"]::before {
  content: '✓';
  background: #1e7f4d;
}

.team-code-feedback[data-state="error"] {
  border-color: rgba(210, 74, 74, 0.28);
  background: rgba(210, 74, 74, 0.12);
  color: var(--ink-accent);
}

.team-code-feedback[data-state="error"]::before {
  content: '✕';
  background: #d24a4a;
}

html.dark .team-code-status {
  color: rgba(212, 222, 244, 0.9);
}

html.dark .team-code-status strong {
  color: rgba(255, 255, 255, 0.98);
}

html.dark .team-code-status--active {
  color: rgba(222, 232, 255, 0.94);
}

html.dark .team-code-status--cleared {
  color: rgba(255, 231, 214, 0.95);
}

html.dark .team-code-feedback {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(11, 20, 44, 0.7);
  color: rgba(222, 234, 255, 0.92);
}

html.dark .team-code-feedback[data-state="loading"] {
  color: rgba(196, 210, 240, 0.86);
}

html.dark .team-code-feedback[data-state="loading"]::before {
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
  background: transparent;
}

html.dark .team-code-feedback[data-state="success"] {
  border-color: rgba(111, 227, 167, 0.48);
  background: rgba(52, 138, 102, 0.42);
  color: rgba(222, 240, 255, 0.95);
}

html.dark .team-code-feedback[data-state="success"]::before {
  background: rgba(79, 193, 139, 0.95);
}

html.dark .team-code-feedback[data-state="error"] {
  border-color: rgba(255, 134, 134, 0.45);
  background: rgba(178, 60, 60, 0.45);
  color: rgba(255, 220, 220, 0.94);
}

html.dark .team-code-feedback[data-state="error"]::before {
  background: rgba(227, 96, 96, 0.95);
}

.team-code-manage {
  margin-top: clamp(18px, 3vw, 24px);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.team-code-manage p {
  margin: 0;
  color: var(--text-subtle);
  font-size: 0.92rem;
}

html.dark .team-code-manage p {
  color: rgba(220, 230, 250, 0.72);
}

.team-code-hub__btn {
  border-radius: 999px;
  border: 1px solid rgba(29, 91, 240, 0.28);
  background: rgba(29, 91, 240, 0.14);
  color: var(--ink-accent);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.55rem 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.team-code-hub__btn:hover,
.team-code-hub__btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(29, 91, 240, 0.2);
  border-color: rgba(29, 91, 240, 0.34);
  box-shadow: 0 12px 22px rgba(29, 91, 240, 0.18);
}

html.dark .team-code-hub__btn {
  background: rgba(29, 91, 240, 0.3);
  border-color: rgba(29, 91, 240, 0.4);
  color: rgba(240, 246, 255, 0.94);
}

html.dark .team-code-hub__btn:hover,
html.dark .team-code-hub__btn:focus-visible {
  background: rgba(29, 91, 240, 0.36);
  box-shadow: 0 12px 22px rgba(12, 21, 44, 0.46);
}

.team-code-form input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15, 27, 60, 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: none;
  padding: 0.9rem 1rem;
  box-shadow: inset 0 2px 6px rgba(15, 27, 60, 0.06);
  transition: border 160ms ease, box-shadow 160ms ease;
}

.team-code-form input[aria-invalid="true"] {
  border-color: rgba(210, 74, 74, 0.85);
  box-shadow: 0 0 0 3px rgba(210, 74, 74, 0.18);
}

.team-code-form input::placeholder {
  letter-spacing: 0;
  text-transform: none;
}

html.dark .team-code-form input {
  background: rgba(16, 26, 54, 0.78);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
}

html.dark .team-code-form input[aria-invalid="true"] {
  border-color: rgba(255, 150, 150, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 150, 150, 0.24);
}

.team-code-form input:focus {
  border-color: rgba(255, 138, 61, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.2);
  outline: none;
}

.team-code-input--locked {
  background: rgba(15, 27, 60, 0.05);
  border-color: rgba(15, 27, 60, 0.22);
  color: var(--text-subtle);
  cursor: not-allowed;
  box-shadow: none;
}

.team-code-input--locked:focus {
  border-color: rgba(15, 27, 60, 0.22);
  box-shadow: none;
}

html.dark .team-code-input--locked {
  background: rgba(16, 26, 54, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(240, 246, 255, 0.78);
}

html.dark .team-code-input--locked:focus {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.team-code-error {
  margin: -4px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #d24a4a;
}

html.dark .team-code-error {
  color: #ff8282;
}

.team-code-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.team-code-actions .btn {
  min-width: min(100%, 240px);
}

@media (min-width: 520px) {
  .team-code-actions .btn {
    min-width: 220px;
  }
}

.quiz-toolbar {
  position: absolute;
  top: clamp(6px, 2.4vw, 18px);
  right: clamp(6px, 2.4vw, 18px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(6px, 2vw, 10px);
  min-height: clamp(32px, 2.8vw, 40px);
  width: auto;
  z-index: 3;
}

.team-code-trigger {
  position: relative;
  width: 100%;
  border: 1px solid rgba(15, 27, 60, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(12px, 2.6vw, 16px);
  padding: clamp(16px, 3vw, 22px);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 27, 60, 0.1);
  transition: transform 160ms ease, box-shadow 200ms ease, border-color 180ms ease, background 180ms ease;
}

.team-code-trigger:hover,
.team-code-trigger:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(29, 91, 240, 0.32);
  box-shadow: 0 18px 38px rgba(15, 27, 60, 0.16);
  background: rgba(255, 255, 255, 0.98);
}

.team-code-trigger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 91, 240, 0.22), 0 18px 38px rgba(15, 27, 60, 0.16);
}

.team-code-trigger--active {
  border-color: rgba(29, 91, 240, 0.5);
  background: rgba(226, 235, 255, 0.9);
  box-shadow: 0 18px 36px rgba(15, 27, 60, 0.16);
}

.team-code-trigger--active::after {
  content: '';
  position: absolute;
  top: clamp(10px, 2vw, 14px);
  right: clamp(14px, 2.6vw, 18px);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92);
}

.team-code-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(46px, 4.6vw, 52px);
  height: clamp(46px, 4.6vw, 52px);
  border-radius: 16px;
  background: rgba(29, 91, 240, 0.12);
  color: var(--primary);
  flex-shrink: 0;
}

html.dark .team-code-cta__icon {
  background: rgba(126, 168, 255, 0.22);
  color: rgba(236, 243, 255, 0.96);
}

.team-code-cta__icon svg {
  width: clamp(24px, 2.8vw, 28px);
  height: clamp(24px, 2.8vw, 28px);
  display: block;
}

.team-code-trigger--active .team-code-cta__icon {
  background: var(--primary);
  color: #ffffff;
}

.team-code-cta__header {
  display: inline-flex;
  align-items: center;
  gap: clamp(12px, 2.8vw, 16px);
  color: var(--ink-accent);
  margin-bottom: clamp(6px, 1.4vw, 12px);
}

.team-code-cta__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.team-code-cta__helper {
  display: block;
  font-size: 0.95rem;
  color: var(--text-subtle);
  line-height: 1.55;
}

html.dark .team-code-lede {
  color: rgba(244, 247, 255, 0.72);
}

html.dark .team-code-trigger {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(14, 24, 46, 0.88);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

html.dark .team-code-trigger:hover,
html.dark .team-code-trigger:focus-visible {
  border-color: rgba(114, 158, 255, 0.5);
  background: rgba(22, 36, 64, 0.94);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.45);
}

html.dark .team-code-trigger--active {
  border-color: rgba(126, 168, 255, 0.6);
  background: rgba(41, 72, 130, 0.7);
}

html.dark .team-code-trigger--active::after {
  box-shadow: 0 0 0 2px rgba(13, 24, 48, 0.92);
}

html.dark .team-code-cta__title {
  color: #ffffff;
}

html.dark .team-code-cta__helper {
  color: rgba(219, 228, 248, 0.72);
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(8px, 2vw, 16px);
  min-height: 36px;
}

.quiz-nav {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 1.6vw, 12px);
  flex-wrap: wrap;
}

.quiz-header .quiz-part-label {
  margin: 0;
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.quiz-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 27, 60, 0.08);
  color: var(--text-subtle);
  border-radius: 999px;
  border: 0;
  padding: 0.45rem 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, color 160ms ease;
}

html.dark .quiz-back {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
}

.quiz-back svg {
  flex-shrink: 0;
}

.quiz-back:hover,
.quiz-back:focus-visible {
  background: rgba(255, 138, 61, 0.18);
  color: var(--ink-accent);
  transform: translateY(-1px);
}

html.dark .quiz-back:hover,
html.dark .quiz-back:focus-visible {
  color: #10192f;
}

.quiz-back--placeholder {
  visibility: hidden;
}

.quiz-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 27, 60, 0.08);
  color: var(--text-subtle);
  border-radius: 999px;
  border: 0;
  padding: 0.45rem 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  transition: background 160ms ease, transform 160ms ease, color 160ms ease;
}

.quiz-reset:hover,
.quiz-reset:focus-visible {
  background: rgba(255, 138, 61, 0.18);
  color: var(--ink-accent);
  transform: translateY(-1px);
}

html.dark .quiz-reset {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
}

html.dark .quiz-reset:hover,
html.dark .quiz-reset:focus-visible {
  color: #10192f;
}

.quiz-reset--placeholder {
  visibility: hidden;
  pointer-events: none;
}

.quiz-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.6vw, 22px);
  flex: 1 1 auto;
}

.card.skills .quiz-main {
  gap: clamp(6px, 1.8vw, 12px);
}

.card.skills .quiz-main .divider {
  margin: 0;
  width: 100%;
}

.quiz-main--has-toolbar {
  position: relative;
  width: 100%;
  padding-top: clamp(32px, 5vw, 44px);
  padding-bottom: clamp(14px, 2.6vw, 22px);
  gap: clamp(14px, 2.2vw, 20px);
}

.quiz-meta {
  width: 100%;
  display: flex;
  justify-content: center;
}

.quiz-meta .quiz-part-label {
  margin: 0;
}

.quiz-footer-nav {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(10px, 2.4vw, 16px);
  flex-wrap: wrap;
  margin-top: clamp(12px, 2.6vw, 18px);
}

.quiz-footer-nav .quiz-back,
.quiz-footer-nav .quiz-reset {
  width: auto;
}

.quiz-footer-nav:empty {
  display: none;
}

.quiz-eyebrow {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: color-mix(in srgb, var(--text-subtle) 82%, transparent);
}

.stage.fade {
  animation: fadeUp 280ms ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-label {
  font-weight: 700;
  color: var(--text-subtle);
}

.progress {
  width: 100%;
  height: 10px;
  background: rgba(52, 86, 214, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

html.dark .progress {
  background: rgba(255, 255, 255, 0.16);
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: inherit;
  transition: width 260ms ease;
}

.question-wrap {
  min-height: clamp(120px, 22vh, 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(10px, 2vw, 18px) clamp(14px, 2.8vw, 24px);
}

.question-wrap h2 {
  margin: 0;
  line-height: 1.25;
  max-width: 40ch;
}

.quiz-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.quiz-progress .progress-label {
  text-align: center;
}

.quiz-progress .progress {
  width: min(460px, 100%);
}

.divider {
  width: 100%;
  height: 1px;
  background: rgba(15, 27, 60, 0.12);
}

html.dark .divider {
  background: rgba(255, 255, 255, 0.14);
}

@media (min-width: 901px) {
  .card.casual .quiz-main {
    gap: clamp(12px, 2vw, 18px);
  }

  .card.casual .options {
    margin: clamp(12px, 2.2vw, 18px) 0;
  }

  .card.casual .quiz-main .divider,
  .card.skills .quiz-main .divider {
    margin: clamp(10px, 2vw, 16px) 0;
  }
}

.options {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 24px);
  grid-auto-rows: 1fr;
}

.card.skills .options {
  margin: clamp(10px, 2vw, 16px) 0;
}

.option {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(14px, 3vw, 24px);
  min-height: 96px;
  height: 100%;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(52, 86, 214, 0.9), rgba(52, 86, 214, 1));
  color: #fff;
  font-weight: 800;
  font-size: clamp(0.96rem, 1.8vw, 1.08rem);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 180ms ease, background 160ms ease, border-color 160ms ease;
}

.option:hover,
body:not(.mobile-quiz) .option:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--ink-accent);
  box-shadow: 0 16px 32px rgba(255, 138, 61, 0.28);
}

.option:focus-visible {
  outline: none;
}

body.mobile-quiz .option:focus-visible {
  transform: none;
  background: linear-gradient(135deg, rgba(52, 86, 214, 0.9), rgba(52, 86, 214, 1));
  color: #fff;
  box-shadow: none;
}

.option.selected {
  border-color: rgba(255, 138, 61, 0.6);
  box-shadow: 0 12px 26px rgba(255, 138, 61, 0.28);
}

.options.scale5 > .option:nth-child(5) {
  grid-column: 1 / -1;
  width: 100%;
}

@media (max-width: 720px) {
  .card {
    height: calc(100svh - var(--footerPad) - clamp(24px, 7vw, 42px));
    padding: clamp(16px, 5.2vw, 24px);
  }

  .stage {
    padding: 0;
  }

  .quiz-shell {
    gap: clamp(8px, 3.4vw, 16px);
  }

  .quiz-header {
    justify-content: space-between;
    width: 100%;
  }

  .quiz-header .quiz-part-label {
    display: inline-flex;
    justify-content: flex-end;
    font-size: clamp(0.74rem, 3.6vw, 0.82rem);
    letter-spacing: 0.16em;
  }

  .quiz-back {
    width: auto;
  }

  .question-wrap {
    min-height: clamp(120px, 26vh, 200px);
    margin-top: 0;
  }

  .options {
    gap: clamp(10px, 3vw, 16px);
  }

  .option {
    min-height: 64px;
    font-size: 1rem;
  }

  .quiz-progress .progress {
    width: 100%;
  }

  .options.scale5 > .option:nth-child(5) {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .options {
    grid-template-columns: 1fr;
  }

  .option {
    min-height: 58px;
  }
}

@media (max-width: 720px) {
  body.mobile-quiz {
    min-height: 100dvh;
    height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-columns: 100%;
    align-content: stretch;
    align-items: stretch;
    justify-items: center;
    gap: var(--mobile-stage-gap);
    padding-block-start: max(env(safe-area-inset-top), clamp(2px, 1.2vw, 8px));
    padding-block-end: max(env(safe-area-inset-bottom), clamp(4px, 1.6vw, 10px));
    overflow-x: hidden;
    overflow-y: hidden;
  }

  body.mobile-quiz.results-active {
    overflow-y: auto;
  }

  body:not(.show-landing) .footer-ceia {
    display: none;
  }

  body.mobile-quiz #quiz {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    width: min(376px, 100%);
    margin-inline: auto;
    min-height: var(--mobile-stage-height);
    height: 100%;
    max-height: none;
  }

  body.mobile-quiz #homeLogo {
    justify-self: center;
    align-self: center;
    margin: clamp(2px, 1.6vw, 8px) auto 0;
  }

  body:not(.show-landing) .card {
    width: 100%;
    height: 100%;
    min-height: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: clamp(10px, 4.8vw, 18px) clamp(10px, 4.4vw, 18px) clamp(14px, 6vw, 22px);
    align-items: stretch;
    justify-content: flex-start;
  }

  body.mobile-quiz .card {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: clamp(2px, 1.2vw, 5px) clamp(6px, 3vw, 11px) clamp(6px, 3vw, 11px);
    margin-inline: auto;
    margin-top: 0;
    height: 100%;
    max-height: 100%;
  }

  body.mobile-quiz .stage {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
    align-items: stretch;
    min-height: 0;
    height: 100%;
  }

  body.mobile-quiz .quiz-shell {
    flex: 1 1 auto;
    width: 100%;
    max-width: min(100%, 376px);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    gap: clamp(2px, 0.9vw, 4px);
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: clamp(2px, 1vw, 5px) clamp(4px, 2.2vw, 9px) clamp(4px, 2vw, 8px);
    box-shadow: var(--shadow-soft);
    min-height: var(--mobile-stage-height);
    max-height: none;
    margin-inline: auto;
    scrollbar-gutter: stable both-edges;
  }

  body.mobile-quiz .quiz-shell > .quiz-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: clamp(1px, 0.8vw, 4px);
    padding-block: clamp(2px, 0.8vw, 4px) clamp(4px, 1.4vw, 7px);
    min-height: 0;
    scrollbar-gutter: stable both-edges;
  }

  body.mobile-quiz .quiz-main::-webkit-scrollbar {
    width: 6px;
  }

  body.mobile-quiz .quiz-main::-webkit-scrollbar-thumb {
    background: rgba(21, 33, 63, 0.16);
    border-radius: 999px;
  }

  .quiz-toolbar {
    min-height: clamp(24px, 5.4vw, 32px);
    top: clamp(2px, 2.8vw, 10px);
    right: clamp(4px, 3.2vw, 10px);
    gap: clamp(4px, 2vw, 8px);
  }

  .quiz-main--has-toolbar {
    padding-top: clamp(6px, 2.4vw, 12px);
  }

  .team-code-trigger {
    width: 100%;
    height: auto;
    gap: clamp(8px, 2.8vw, 12px);
    box-shadow: 0 5px 14px rgba(15, 27, 60, 0.14);
  }

  .team-code-cta__header {
    gap: clamp(10px, 3.2vw, 14px);
  }

  .team-code-trigger svg {
    width: clamp(20px, 5vw, 26px);
    height: clamp(20px, 5vw, 26px);
  }

  .team-code-trigger--active::after {
    bottom: clamp(3px, 1vw, 5px);
    right: clamp(3px, 1vw, 5px);
    width: 9px;
    height: 9px;
  }

  html.dark body.mobile-quiz .quiz-shell {
    box-shadow: var(--shadow-md);
  }

  body.mobile-quiz .quiz-shell--break {
    justify-content: center;
    align-items: center;
    min-height: var(--mobile-stage-height);
    max-height: var(--mobile-stage-height);
    margin-block: 0;
    width: 100%;
    margin-inline: auto;
  }

  body.mobile-quiz .quiz-shell--break {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(8px, 3.6vw, 14px);
  }

  body.mobile-quiz .quiz-shell--break .quiz-main {
    width: min(340px, 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: clamp(8px, 3.6vw, 14px);
  }

  body.mobile-quiz .quiz-shell--break .btn {
    width: min(280px, 100%);
  }

  body.mobile-quiz .quiz-header {
    justify-content: space-between;
    min-height: 0;
    padding-inline: clamp(2px, 2vw, 8px);
    gap: clamp(6px, 3vw, 12px);
  }

  body.mobile-quiz .quiz-back,
  body.mobile-quiz .quiz-reset {
    background: rgba(15, 27, 60, 0.12);
    color: var(--text);
    font-size: 0.85rem;
    padding: 0.38rem 0.75rem;
    gap: 6px;
  }

  html.dark body.mobile-quiz .quiz-back,
  html.dark body.mobile-quiz .quiz-reset {
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.88);
  }

  body.mobile-quiz .quiz-main {
    align-content: stretch;
    justify-content: stretch;
  }

  body.mobile-quiz .quiz-main .divider {
    margin: clamp(1px, 0.8vw, 4px) 0;
  }

  body.mobile-quiz .quiz-meta {
    justify-content: flex-start;
    font-size: 0.88rem;
  }

  body.mobile-quiz .quiz-header .quiz-part-label {
    text-align: right;
    white-space: normal;
  }

  body.mobile-quiz .question-wrap {
    flex: 0 0 var(--mobile-question-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2px, 0.6vw, 4px) clamp(6px, 2.4vw, 12px);
    margin: 0 auto;
    width: min(94%, 332px);
    text-align: center;
    min-height: var(--mobile-question-height);
    max-height: var(--mobile-question-height);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.mobile-quiz .question-wrap h2 {
    font-size: clamp(0.94rem, 3.4vw, 1.14rem);
    line-height: 1.2;
    margin: 0 auto;
    max-width: 22ch;
  }

  body.mode-fun.mobile-quiz .question-wrap h2 {
    font-size: clamp(0.92rem, 3.2vw, 1.06rem);
    line-height: 1.22;
  }

  body.mode-serious.mobile-quiz .question-wrap h2 {
    font-size: clamp(0.98rem, 3.8vw, 1.18rem);
  }

  body.mobile-quiz .options {
    flex: 0 0 var(--mobile-options-height);
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    align-content: stretch;
    align-items: stretch;
    gap: clamp(2px, 0.9vw, 4px);
    margin-top: clamp(0px, 0.4vw, 3px);
    height: var(--mobile-options-height);
    max-height: var(--mobile-options-height);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable both-edges;
  }

  body.mobile-quiz .option {
    justify-content: flex-start;
    text-align: left;
    align-items: center;
    padding: clamp(4px, 2.2vw, 8px);
    font-size: clamp(0.74rem, 2.8vw, 0.86rem);
    line-height: 1.24;
    min-height: clamp(40px, 9.6vw, 50px);
  }

  body.mode-fun.mobile-quiz .option {
    font-size: clamp(0.72rem, 2.6vw, 0.82rem);
    padding-block: clamp(4px, 2vw, 7px);
  }

  body.mode-serious.mobile-quiz .option {
    justify-content: center;
    text-align: center;
    font-size: clamp(0.78rem, 3vw, 0.9rem);
  }

  body.mobile-quiz .quiz-progress {
    width: 100%;
    align-items: center;
    text-align: center;
    gap: clamp(3px, 1vw, 6px);
    margin-top: clamp(8px, 2.2vw, 14px);
  }

  body.mobile-quiz .quiz-progress .divider {
    display: none;
  }

  body.mobile-quiz .quiz-progress .progress-label {
    width: min(100%, 360px);
    margin-inline: auto;
    text-align: center;
    font-size: 0.82rem;
  }

  body.mobile-quiz .quiz-progress .progress {
    width: min(100%, 360px);
    margin-inline: auto;
    height: 7px;
  }

  body.mobile-quiz .quiz-footer-nav {
    gap: clamp(6px, 2.6vw, 12px);
    margin-top: clamp(6px, 1.8vw, 12px);
  }

  body.mobile-quiz .btn {
    font-size: 0.92rem;
    padding: 0.7rem 1.3rem;
  }

  body.results-active .card.results-card {
    padding: clamp(8px, 3.8vw, 12px) clamp(8px, 3.6vw, 14px) clamp(10px, 4.8vw, 18px);
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.mobile-quiz.results-active {
    overflow-y: auto;
  }

  body.mobile-quiz.results-active #quiz {
    height: auto;
    min-height: var(--mobile-stage-height);
    max-height: none;
  }

  body.mobile-quiz.results-active .card.results-card {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    padding: clamp(10px, 3vw, 16px) clamp(6px, 2.4vw, 12px) clamp(12px, 3vw, 16px);
    overflow-x: hidden;
    overflow-y: auto;
    margin-block: clamp(2px, 1.4vw, 8px) 0;
    margin-bottom: 0;
    gap: clamp(8px, 2.6vw, 14px);
    max-height: none;
    min-height: 0;
  }

  body.results-active .stage.result {
    padding: 0;
  }

  body.mobile-quiz.results-active .stage.result {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding-inline: clamp(4px, 3vw, 10px);
    padding-block-start: clamp(12px, 3.2vw, 20px);
    padding-block-end: max(env(safe-area-inset-bottom), clamp(6px, 2vw, 12px));
    align-items: stretch;
    min-height: 0;
  }

  body.results-active .results-fit {
    padding-inline: clamp(6px, 3.2vw, 12px);
    padding-block: clamp(4px, 2.6vw, 8px);
    padding-bottom: clamp(10px, 4.4vw, 16px);
    gap: clamp(10px, 3.2vw, 16px);
  }

  body.mobile-quiz.results-active .results-fit {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    max-width: none;
    gap: clamp(10px, 2.8vw, 18px);
    padding-inline: clamp(4px, 2.4vw, 12px);
    padding-block: clamp(10px, 3vw, 16px);
    padding-bottom: clamp(18px, 5vw, 26px);
    min-height: 0;
  }

  body.mobile-quiz.results-active .casual-results {
    width: min(100%, 420px);
    margin-inline: auto;
  }

  body.mobile-quiz.results-active .results-fit > * {
    max-width: none;
  }

  .casual-results {
    gap: clamp(8px, 3vw, 14px);
    padding-inline: clamp(8px, 3.4vw, 14px);
  }

  body.mobile-quiz.results-active .casual-results {
    align-items: stretch;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: clamp(6px, 2.2vw, 12px);
    padding-top: clamp(8px, 2.8vw, 16px);
    max-width: none;
  }

  body.mobile-quiz.results-active .casual-hero {
    gap: clamp(6px, 2.4vw, 12px);
    padding: clamp(10px, 3vw, 16px);
    width: min(100%, 360px);
    margin-inline: auto;
  }

  .casual-hero__body {
    gap: clamp(4px, 2.4vw, 8px);
    align-items: center;
    text-align: center;
  }

  body.mobile-quiz.results-active .casual-hero__body {
    align-items: center;
    text-align: center;
    gap: clamp(4px, 2vw, 10px);
  }

  .casual-results .avatar {
    width: clamp(104px, 34vw, 140px);
  }

  body.mobile-quiz.results-active .casual-results .avatar {
    width: clamp(112px, 32vw, 148px);
  }

  .casual-hero__body h2 {
    font-size: clamp(1.24rem, 5.1vw, 1.48rem);
  }

  body.mobile-quiz.results-active .casual-hero__body h2 {
    font-size: clamp(1.26rem, 5vw, 1.5rem);
  }

  .casual-results .result {
    font-size: clamp(0.88rem, 3.4vw, 0.98rem);
    line-height: 1.35;
  }

  body.mobile-quiz.results-active .casual-results .result {
    font-size: clamp(0.88rem, 3.2vw, 0.98rem);
  }

  .casual-results .btn {
    padding: 0.66rem 1.1rem;
    font-size: 0.88rem;
  }

  body.mobile-quiz.results-active .casual-results .btn {
    padding: 0.64rem 1.05rem;
    font-size: 0.88rem;
  }

  .casual-share .share-row {
    gap: clamp(6px, 3vw, 10px);
  }

  body.mobile-quiz.results-active .casual-share {
    margin-block: clamp(2px, 1.4vw, 6px) 0;
  }

  .casual-actions {
    gap: clamp(8px, 3vw, 12px);
  }

  body.mobile-quiz.results-active .casual-actions {
    gap: clamp(8px, 2.8vw, 12px);
    margin-top: clamp(2px, 1.4vw, 8px);
    padding-bottom: clamp(8px, 2.8vw, 14px);
  }

  body.mode-serious.mobile-quiz.results-active {
    overflow-y: auto;
  }

  body.mode-serious.mobile-quiz.results-active .card.results-card {
    overflow-y: auto;
  }

  .results-fit--serious > .serious-return {
    margin-top: clamp(12px, 4vw, 18px);
    justify-content: center;
  }

}

/* ------------------------------------------------------------------ */
/* RESULTS                                                             */
/* ------------------------------------------------------------------ */
.stage.result {
  justify-content: flex-start;
  align-items: stretch;
  padding: clamp(10px, 3.6vw, 26px);
  padding-block-start: clamp(6px, 2.2vw, 14px);
}

body[data-mode="fun"][data-view="results"] .stage.result {
  justify-content: center;
  align-items: center;
}

.stage.result.result--loading {
  align-items: center;
  justify-content: center;
}

.results-fit {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(12px, 2.8vw, 20px);
  padding-inline: clamp(12px, 3vw, 28px);
  padding-block: clamp(10px, 2.8vw, 18px);
  padding-bottom: clamp(18px, 4.2vw, 30px);
}

.card.results-card {
  overflow-x: hidden;
  overflow-y: auto;
  align-items: stretch;
  justify-content: flex-start;
}

.serious-return__placeholder {
  display: none;
}

@media (max-width: 900px) {
  .card.results-card {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.casual-results {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2.2vw, 14px);
  padding-inline: clamp(12px, 3vw, 20px);
  align-items: center;
}

.casual-results > * {
  width: 100%;
}

.casual-hero,
.casual-actions {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
}

.casual-share {
  width: 100%;
  max-width: 640px;
  margin-inline: auto;
}

.casual-share.share-card {
  width: 100%;
  max-width: 640px;
  margin: 0;
}

@media (min-width: 901px) {
  .casual-results {
    align-items: center;
    gap: clamp(6px, 1.6vw, 12px);
  }

  .casual-share.share-card {
    --casual-share-divider-gap: clamp(16px, 3vw, 28px);
    position: relative;
    margin-block: var(--casual-share-divider-gap);
    padding-block: clamp(16px, 2.6vw, 24px);
    border-top: 1px solid rgba(16, 25, 47, 0.12);
    border-bottom: 1px solid rgba(16, 25, 47, 0.12);
    box-shadow: 0 24px 48px rgba(15, 24, 52, 0.22);
  }

  html.dark .casual-share.share-card {
    border-color: rgba(244, 247, 255, 0.24);
    box-shadow: 0 26px 52px rgba(6, 12, 28, 0.58);
  }
}

.casual-share .share-row {
  display: flex;
  width: 100%;
  gap: clamp(6px, 1.8vw, 10px);
  align-items: stretch;
}

.casual-share .share-row button {
  flex: 1 1 0;
  width: auto;
  padding: 0.5rem 0.6rem;
  font-size: 0.88rem;
  gap: 6px;
}

.casual-share .share-row span {
  white-space: normal;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-align: center;
}

@media (max-width: 720px) {
  .casual-share .share-row {
    flex-direction: column;
    align-items: stretch;
  }

  .casual-share .share-row button {
    flex: 1 1 auto;
    width: 100%;
  }
}

.results-loading {
  width: 100%;
  max-width: 420px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  text-align: center;
  color: var(--text);
}

.results-loading__spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 4px solid rgba(15, 27, 60, 0.18);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}

html.dark .results-loading__spinner {
  border-color: rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent);
}

.results-loading p {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  .results-loading {
    margin: clamp(16px, 6vw, 24px) auto;
  }

  body.results-active .stage.result.result--loading {
    min-height: calc(100svh - var(--footerPad) - clamp(32px, 12vw, 56px));
    padding: clamp(8px, 3vw, 14px);
  }
}

.casual-results .avatar {
  width: clamp(150px, 22vw, 200px);
  aspect-ratio: 1/1;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26);
  margin: 0;
}

.casual-results .result {
  margin: 0;
  line-height: 1.6;
  color: color-mix(in srgb, var(--text) 88%, var(--text-subtle) 12%);
}

.casual-results .btn {
  margin: 0;
}

.casual-hero {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: clamp(12px, 3vw, 20px);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(237, 243, 255, 0.88));
  border-radius: var(--radius-md);
  padding: clamp(16px, 3.2vw, 22px);
  box-shadow: var(--shadow-soft);
}

html.dark .casual-hero {
  background: linear-gradient(165deg, rgba(24, 34, 64, 0.92), rgba(16, 26, 48, 0.9));
  box-shadow: var(--shadow-md);
}

.casual-hero__media {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.casual-hero__body {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 2.4vw, 14px);
  align-items: center;
  text-align: center;
  justify-content: center;
}

.casual-hero__body h2 {
  margin: 0;
}

.casual-share {
  width: 100%;
  align-self: stretch;
}

.casual-share .share-row {
  justify-content: center;
}

.casual-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.casual-actions .btn {
  flex: 1 1 220px;
  width: auto;
}

.casual-actions .roster-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 18px 36px rgba(255, 138, 61, 0.28);
}

.casual-actions .roster-btn:hover,
.casual-actions .roster-btn:focus-visible {
  background: linear-gradient(135deg, var(--accent-dark), #ff6f1d);
  color: #fff;
  box-shadow: 0 22px 44px rgba(255, 138, 61, 0.32);
}

html.dark .casual-actions .roster-btn {
  background: linear-gradient(135deg, #ff9b4d, var(--accent-dark));
  color: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.46);
}

html.dark .casual-actions .roster-btn:hover,
html.dark .casual-actions .roster-btn:focus-visible {
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.5);
}

.casual-actions .again-btn {
  margin: 0;
  flex: 0 0 auto;
  width: min(320px, 100%);
  align-self: center;
}

.casual-actions .roster-btn {
  margin: 0;
}

@media (max-width: 720px) {
  .casual-results {
    gap: clamp(8px, 3vw, 14px);
  }

  .casual-hero {
    gap: clamp(8px, 3vw, 12px);
    padding: clamp(14px, 4.4vw, 18px);
  }

  .casual-hero__body {
    gap: clamp(4px, 2.6vw, 8px);
    align-items: center;
    text-align: center;
  }

  .casual-hero__body h2 {
    margin-bottom: clamp(2px, 1.8vw, 6px);
  }

  .casual-hero__body .result {
    margin-bottom: clamp(4px, 2.6vw, 8px);
  }

  .casual-hero__body .btn {
    margin-top: clamp(4px, 2.6vw, 8px);
  }
}

@media (max-width: 900px) {
  .casual-hero {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .casual-hero__body {
    align-items: center;
    text-align: center;
  }

  .casual-share .share-row {
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .casual-share .share-row button {
    font-size: 0.8rem;
    padding: 0.48rem 0.55rem;
  }

  .casual-share .share-row span {
    font-size: 0.7rem;
  }

  .casual-results .avatar {
    width: clamp(128px, 44vw, 168px);
  }

  .casual-hero {
    gap: clamp(14px, 6vw, 20px);
  }
}

.skill-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: clamp(14px, 2.8vw, 20px);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head head"
    "meter meter"
    "rank improve";
  row-gap: clamp(12px, 2.2vw, 16px);
  column-gap: clamp(12px, 2.6vw, 18px);
  text-align: left;
  min-width: 0;
  align-items: start;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

html.dark .skill-card {
  background: linear-gradient(160deg, rgba(24, 36, 68, 0.94), rgba(16, 26, 54, 0.9));
  box-shadow: var(--shadow-md);
}

.skill-card:hover,
.skill-card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.skill-card header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  grid-area: head;
}

.skill-card .title {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.skill-card header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.skill-card .i {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(29, 91, 240, 0.16);
  display: grid;
  place-items: center;
  color: var(--primary);
}

html.dark .skill-card .i {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(244, 247, 255, 0.92);
}

.skill-card .i svg {
  width: 20px;
  height: 20px;
}

.skill-card .score {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink-accent);
}

html.dark .skill-card .score {
  color: rgba(244, 247, 255, 0.97);
}

.skill-card .meter {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(29, 91, 240, 0.16);
  overflow: hidden;
  grid-area: meter;
}

html.dark .skill-card .meter {
  background: rgba(255, 255, 255, 0.14);
}

.skill-card .meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

html.dark .skill-card .meter span {
  background: linear-gradient(90deg, rgba(93, 149, 255, 0.92), rgba(255, 138, 61, 0.92));
}

.skill-card .rank {
  grid-area: rank;
  font-weight: 600;
  color: var(--text-subtle);
  font-size: 0.85rem;
  line-height: 1.4;
  word-break: break-word;
  margin: 0;
  align-self: center;
}

html.dark .skill-card .rank {
  color: rgba(244, 247, 255, 0.78);
}

.skill-card .rank strong {
  color: var(--ink-accent);
}

html.dark .skill-card .rank strong {
  color: rgba(244, 247, 255, 0.97);
}

.skill-card .rank--raw {
  color: var(--text-subtle);
}

.skill-card .improve-btn {
  grid-area: improve;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(29, 91, 240, 0.14), rgba(255, 138, 61, 0.2));
  color: var(--ink-accent);
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: 14px;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  transition: background 180ms ease, transform 180ms ease, color 160ms ease;
  margin-top: 0;
  justify-self: flex-end;
  align-self: center;
}

html.dark .skill-card .improve-btn {
  background: linear-gradient(135deg, rgba(29, 91, 240, 0.32), rgba(255, 138, 61, 0.34));
  color: rgba(244, 247, 255, 0.95);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

.skill-card .improve-btn:hover,
.skill-card .improve-btn:focus-visible {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .skill-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "meter"
      "rank"
      "improve";
    text-align: center;
  }

  .skill-card header {
    flex-direction: column;
    align-items: center;
    gap: clamp(8px, 4vw, 12px);
  }

  .skill-card .title {
    justify-items: center;
  }

  .skill-card .score {
    font-size: 1.5rem;
  }

  .skill-card .rank {
    justify-self: center;
    text-align: center;
  }

  .skill-card .improve-btn {
    justify-self: center;
    width: min(260px, 100%);
  }
}

.share-card {
  width: 100%;
  max-width: 560px;
  background: linear-gradient(135deg, rgba(29, 91, 240, 0.94), rgba(255, 138, 61, 0.92));
  color: #fff;
  border-radius: var(--radius-md);
  padding: clamp(16px, 3vw, 20px);
  text-align: center;
  box-shadow: 0 18px 42px rgba(15, 24, 52, 0.28);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vw, 16px);
}

.share-card h4 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
}

.share-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.share-row button {
  flex: 1 1 160px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.share-row button:hover,
.share-row button:focus-visible {
  background: #fff;
  color: #10192f;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(255, 255, 255, 0.32);
}

@media (max-width: 720px) {
  .share-row {
    width: 100%;
  }

  .share-row button {
    flex: 1 1 100%;
    font-size: 0.92rem;
    padding-inline: 1rem;
  }

  .share-row button span {
    white-space: normal;
  }
}

.share-card--compact {
  max-width: 480px;
  gap: clamp(10px, 2vw, 14px);
  padding: clamp(14px, 2.6vw, 18px);
}

.share-card--stacked {
  max-width: none;
  text-align: left;
  align-items: stretch;
}

.share-card--stacked .share-row {
  justify-content: flex-start;
}

.roster-btn {
  width: min(320px, 100%);
  margin: 0 auto;
  font-weight: 700;
}

.results-fit--serious {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(18px, 4vw, 32px);
  padding-inline: clamp(10px, 3.4vw, 22px);
}

.serious-summary {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.6vw, 22px);
  align-items: center;
  text-align: center;
}

.serious-summary__logo {
  width: min(110px, 28vw);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0;
}

.serious-summary__logo-link {
  display: inline-flex;
  border-radius: 999px;
  line-height: 0;
}

.serious-summary__logo-link:focus-visible {
  outline: 3px solid rgba(29, 91, 240, 0.35);
  outline-offset: 4px;
}

.serious-summary__logo img {
  width: 100%;
  height: auto;
  display: block;
}

.serious-summary .share-card,
.serious-summary .report-actions {
  margin: 0 auto;
  width: min(420px, 100%);
}

.serious-return {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: clamp(16px, 3vw, 22px);
}

.serious-return .again-btn {
  margin: 0;
}

.serious-summary .share-card {
  text-align: center;
  align-items: center;
}

.serious-summary .share-card .share-row {
  justify-content: center;
}

.serious-head {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: center;
  text-align: center;
}

.serious-head h2 {
  margin: 0;
}

.serious-head p {
  margin: 0;
  font-weight: 600;
  color: var(--text-subtle);
  line-height: 1.45;
}

.serious-meta {
  font-size: 0.95rem;
  color: var(--text-subtle);
  line-height: 1.45;
}

.serious-meta strong {
  color: var(--text);
}

.serious-meta--offline {
  color: var(--accent);
}

.serious-meta--warning {
  color: #c05621;
}

html.dark .serious-meta--warning {
  color: #fbd38d;
}

.team-share-hint {
  margin-top: clamp(16px, 2.8vw, 26px);
  padding: clamp(16px, 3vw, 24px);
  border-radius: 18px;
  background: rgba(15, 27, 60, 0.06);
  box-shadow: inset 0 0 0 1px rgba(15, 27, 60, 0.08);
  text-align: left;
  color: var(--text);
  line-height: 1.6;
}

html.dark .team-share-hint {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.team-share-hint__title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
  color: var(--ink-accent);
}

.team-share-hint p {
  margin: 0;
}

.team-share-hint__player {
  margin: 0 0 0.55rem;
  font-weight: 600;
  color: var(--text);
}

.team-share-hint__player:last-child {
  margin-bottom: 0;
}

.team-share-hint a {
  color: var(--ink-accent);
  font-weight: 700;
  text-decoration: none;
}

.team-share-hint a:hover,
.team-share-hint a:focus-visible {
  text-decoration: underline;
}

.team-code-cta {
  margin: clamp(18px, 3vw, 28px) auto 0;
  width: min(520px, 100%);
  display: block;
}

@media (max-width: 720px) {
  .team-code-cta {
    width: 100%;
  }

  .team-code-form__grid {
    grid-template-columns: 1fr;
  }

  .team-code-hub__btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .team-code-actions {
    flex-direction: column;
    align-items: stretch;
    gap: clamp(8px, 2.6vw, 12px);
  }

  .team-code-actions .btn {
    width: 100%;
    max-width: 320px;
    align-self: center;
    justify-content: center;
  }
}

.overall-callout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2.6vw, 18px);
  background: linear-gradient(145deg, rgba(237, 243, 255, 0.92), rgba(255, 255, 255, 0.86));
  border-radius: var(--radius-md);
  padding: clamp(18px, 3.4vw, 28px);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

html.dark .overall-callout {
  background: linear-gradient(150deg, rgba(28, 42, 84, 0.96), rgba(16, 26, 54, 0.92));
  box-shadow: var(--shadow-md);
}

.serious-summary .overall-callout {
  width: min(420px, 100%);
  margin-inline: auto;
}

.overall-callout__score {
  font-size: clamp(3rem, 6vw, 3.8rem);
  line-height: 1;
  font-weight: 900;
  color: var(--ink-accent);
}

html.dark .overall-callout__score {
  color: rgba(244, 247, 255, 0.97);
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.overall-callout__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
  color: var(--text-subtle);
}

html.dark .overall-callout__meta {
  color: rgba(244, 247, 255, 0.75);
}

.overall-callout__meta span {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
}

.overall-callout__helper {
  display: block;
  margin-top: 2px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-subtle);
}

html.dark .overall-callout__helper {
  color: rgba(244, 247, 255, 0.72);
}

.overall-callout__percentile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: rgba(29, 91, 240, 0.16);
  color: var(--primary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

html.dark .overall-callout__percentile {
  background: rgba(93, 149, 255, 0.28);
  color: rgba(244, 247, 255, 0.92);
}

.serious-summary .report-actions {
  max-width: 420px;
  width: min(420px, 100%);
}

.serious-breakdown {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.8vw, 24px);
  align-items: stretch;
  padding-bottom: clamp(16px, 3vw, 26px);
}

.serious-breakdown__head {
  max-width: 720px;
}

.serious-breakdown__head h3 {
  margin: 0;
}

.serious-breakdown__head p {
  margin: 0;
  color: var(--text-subtle);
  line-height: 1.5;
}

.results-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(14px, 2.6vw, 20px);
}

.results-grid--skills {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  width: 100%;
  margin: 0;
  align-items: stretch;
  padding-bottom: clamp(16px, 2.6vw, 24px);
}

.report-actions {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.report-actions__primary {
  width: 100%;
}

.report-links {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.report-links button {
  flex: 1 1 220px;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 0;
  padding: 0.62rem 1.1rem;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(29, 91, 240, 0.12), rgba(255, 138, 61, 0.18));
  color: var(--ink-accent);
  box-shadow: 0 10px 22px rgba(16, 33, 72, 0.14);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.report-links button:hover,
.report-links button:focus-visible {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 16px 30px rgba(16, 33, 72, 0.22);
  transform: translateY(-1px);
}

html.dark .report-links button {
  background: linear-gradient(135deg, rgba(29, 91, 240, 0.28), rgba(255, 138, 61, 0.3));
  color: #fff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

html.dark .report-links button:hover,
html.dark .report-links button:focus-visible {
  color: #fff;
}

.again-btn {
  margin: clamp(0.9rem, 2.4vw, 1.4rem) auto 0;
}

@media (min-width: 960px) {
  .results-fit--serious {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: flex-start;
    gap: clamp(24px, 3.6vw, 34px);
  }

  .serious-summary,
  .serious-breakdown {
    max-width: none;
    margin: 0;
  }

  .serious-summary {
    padding: clamp(18px, 2.8vw, 24px);
    padding-block-end: clamp(26px, 3.6vw, 34px);
    border-radius: var(--radius-md);
    background: linear-gradient(158deg, rgba(237, 243, 255, 0.88), rgba(255, 255, 255, 0.95));
    box-shadow: var(--shadow-soft);
    align-items: center;
    text-align: center;
    align-self: flex-start;
  }

  html.dark .serious-summary {
    background: linear-gradient(158deg, rgba(24, 34, 64, 0.92), rgba(19, 30, 58, 0.94));
    box-shadow: var(--shadow-md);
  }

  .serious-breakdown {
    padding: clamp(18px, 3vw, 26px);
    border-radius: var(--radius-md);
    background: linear-gradient(160deg, rgba(245, 249, 255, 0.9), rgba(255, 255, 255, 0.96));
    box-shadow: var(--shadow-soft);
    align-items: stretch;
    align-self: flex-start;
  }

  html.dark .serious-breakdown {
    background: linear-gradient(160deg, rgba(21, 32, 60, 0.92), rgba(15, 24, 48, 0.94));
    box-shadow: var(--shadow-md);
  }

  .serious-summary .share-card,
  .serious-summary .report-actions,
  .serious-return .again-btn {
    width: min(420px, 100%);
    margin: 0 auto;
  }

  .serious-summary .team-share-hint,
  .serious-summary .team-share-hint__player {
    order: 3;
  }

  .serious-summary .team-code-cta {
    order: 4;
    margin: clamp(16px, 2.6vw, 24px) auto 0;
  }

  .serious-summary .share-card {
    order: 5;
    margin-top: clamp(22px, 3.2vw, 32px);
  }

  .serious-summary .serious-return {
    order: 6;
  }

  .serious-return {
    justify-content: flex-start;
  }

  .results-grid--skills {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(18px, 3vw, 24px);
  }
}

@media (max-width: 900px) {
  .results-grid:not(.results-grid--skills) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .serious-return {
    justify-content: center;
  }

  .serious-summary .share-card,
  .serious-summary .report-actions,
  .serious-return .again-btn {
    width: 100%;
  }

  .share-card--stacked .share-row {
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .results-fit--serious {
    gap: clamp(10px, 3.2vw, 14px);
  }

  .serious-summary {
    gap: clamp(10px, 3.2vw, 14px);
  }

  .serious-summary__logo {
    width: clamp(76px, 26vw, 100px);
  }

  .serious-summary .report-actions,
  .serious-summary .share-card {
    width: 100%;
  }

  .serious-summary .share-card {
    gap: clamp(6px, 2.6vw, 10px);
    padding: clamp(10px, 3vw, 14px);
  }

  .overall-callout {
    padding: clamp(12px, 3.6vw, 16px);
  }

  .overall-callout__score {
    font-size: clamp(2.1rem, 7vw, 2.6rem);
  }

  .report-links button {
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
  }

  .serious-breakdown {
    gap: clamp(10px, 3vw, 14px);
    margin-top: clamp(4px, 2.2vw, 8px);
    padding-top: clamp(10px, 3vw, 14px);
    border-top: 1px solid rgba(15, 27, 60, 0.12);
  }

  html.dark .serious-breakdown {
    border-top-color: rgba(244, 247, 255, 0.16);
  }

  .serious-breakdown__head p {
    font-size: 0.9rem;
  }

  .results-grid {
    gap: clamp(8px, 2.8vw, 12px);
  }

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

  .skill-card {
    padding: clamp(10px, 3vw, 14px);
    row-gap: clamp(8px, 2.6vw, 12px);
  }

  .serious-return {
    margin-top: clamp(10px, 3.2vw, 14px);
  }

  .casual-results {
    gap: clamp(10px, 4vw, 16px);
    padding-inline: clamp(10px, 4.2vw, 16px);
  }

  .casual-hero {
    gap: clamp(12px, 4.6vw, 18px);
    padding: clamp(14px, 4.6vw, 20px);
  }

  .casual-results .avatar {
    width: clamp(118px, 38vw, 152px);
  }

  .casual-actions {
    gap: 10px;
  }

  .casual-share .share-row {
    gap: clamp(6px, 3.2vw, 10px);
  }

  .casual-share .share-row button {
    padding: 0.46rem 0.55rem;
    font-size: 0.84rem;
  }

  .casual-share .share-row span {
    font-size: 0.72rem;
  }
}

@media (max-width: 560px) {
  .results-grid:not(.results-grid--skills) {
    grid-template-columns: 1fr;
  }

  .share-card {
    padding: 14px;
  }

  .overall-callout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .overall-callout__score {
    font-size: clamp(2.6rem, 9vw, 3.2rem);
  }

  .report-links button {
    flex: 1 1 100%;
  }

  .report-actions__primary {
    width: 100%;
  }

  .casual-actions .btn {
    flex: 1 1 100%;
  }
}

/* ------------------------------------------------------------------ */
/* FOOTER                                                              */
/* ------------------------------------------------------------------ */
.footer-ceia {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 24px 16px;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  text-align: left;
  box-shadow: 0 -14px 36px rgba(15, 27, 60, 0.12);
  z-index: 120;
}

.footer-sponsor {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex: 0 0 auto;
}

.footer-sponsor-label {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(21, 33, 63, 0.6);
  white-space: nowrap;
}

.footer-sponsor-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-ceia img {
  height: 32px;
  width: auto;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(21, 33, 63, 0.58);
  margin-left: auto;
  white-space: normal;
  text-align: right;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: color 160ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent);
}

.footer-sponsor-link:hover,
.footer-sponsor-link:focus-visible {
  filter: none;
}

@media (min-width: 721px) {
  .footer-ceia {
    padding: 14px 28px 24px;
  }
}

html.dark .footer-ceia {
  background: rgba(18, 30, 62, 0.92);
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.42);
}

html.dark .footer-sponsor-label {
  color: rgba(244, 247, 255, 0.68);
}

html.dark .footer-links {
  color: rgba(244, 247, 255, 0.6);
}

html.dark .footer-links a:hover,
html.dark .footer-links a:focus-visible {
  color: #ffd0a6;
}

@media (max-width: 720px) {
  .footer-ceia {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    padding: clamp(10px, 3.2vw, 16px) clamp(18px, 6vw, 26px)
      max(env(safe-area-inset-bottom), clamp(12px, 4vw, 18px));
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: clamp(10px, 3.6vw, 18px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -10px 28px rgba(9, 18, 38, 0.16);
    border-top: 1px solid rgba(15, 27, 60, 0.08);
    min-height: var(--mobile-footer-height);
  }

  body.show-landing .footer-ceia::before {
    content: none;
  }

  .footer-sponsor {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(6px, 2.6vw, 12px);
    min-width: 0;
    flex: 1 1 auto;
  }

  .footer-sponsor-label {
    font-size: 0.48rem;
    letter-spacing: 0.12em;
  }

  .footer-ceia img {
    height: clamp(28px, 10vw, 36px);
  }

  .footer-links {
    order: 3;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    margin-left: clamp(12px, 4vw, 18px);
    font-size: 0.48rem;
    letter-spacing: 0.12em;
    gap: clamp(8px, 2.8vw, 14px);
    text-align: right;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .footer-links a {
    padding: 0;
  }

  #gear {
    order: 2;
    margin-left: clamp(10px, 3.2vw, 16px);
    width: clamp(28px, 7vw, 32px);
    height: clamp(28px, 7vw, 32px);
  }

  html.dark .footer-ceia {
    background: rgba(18, 30, 62, 0.92);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.38);
  }

  html.dark .footer-ceia #gear {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
  }
}

@media (max-width: 720px) {
  body:not(.show-landing) .footer-ceia {
    display: none;
  }
}

@media (min-width: 960px) {
  :root {
    --footerPad: 88px;
  }

  html {
    font-size: 17px;
  }

  .footer-ceia {
    justify-content: flex-end;
  }

  .footer-sponsor {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-links {
    margin-left: 0;
  }

  .landing-card h1 {
    font-size: clamp(2.4rem, 4vw, 3.6rem);
  }

  .landing-card .blurb {
    font-size: 1.18rem;
  }

  .btn {
    font-size: 1.08rem;
    padding: 1.05rem 2.2rem;
  }

  .home-logo-title {
    font-size: clamp(1.35rem, 3vw, 2.2rem);
  }

  .landing-logo-caption {
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  }

  .footer-ceia {
    padding: 34px 44px 46px;
    gap: 18px;
  }

  .footer-ceia img {
    height: 48px;
  }

  .footer-links {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
  }
}

/* ------------------------------------------------------------------ */
/* SETTINGS DRAWER                                                     */
/* ------------------------------------------------------------------ */
#gear {
  position: fixed;
  top: clamp(10px, 3vw, 20px);
  right: clamp(10px, 3vw, 20px);
  z-index: 130;
  border: 0;
  background: rgba(255, 255, 255, 0.86);
  color: var(--primary);
  width: 46px;
  height: 46px;
  font-size: 1.35rem;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 200ms ease, color 160ms ease;
}

#gear:hover,
#gear:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

@media (max-width: 720px) {
  #gear {
    position: static;
    top: auto;
    bottom: auto;
    right: auto;
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
    background: rgba(15, 27, 60, 0.08);
    box-shadow: none;
  }

  .footer-ceia #gear {
    align-self: center;
    margin: 0;
  }

  body.show-landing #gear,
  body:not(.show-landing) #gear {
    bottom: auto;
  }
}

.settings {
  position: fixed;
  top: 0;
  right: calc(-1 * min(340px, 92vw));
  width: min(340px, 92vw);
  height: 100dvh;
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
  padding: clamp(28px, 6vw, 40px);
  overflow: auto;
  transition: right 260ms ease, box-shadow 260ms ease;
  z-index: 140;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.settings-panel {
  display: flex;
  flex-direction: column;
  gap: clamp(1.4rem, 3vw, 2rem);
  min-height: 100%;
  position: relative;
  flex: 1;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.5rem, 2vw, 1.1rem);
  margin-bottom: clamp(0.6rem, 2.6vw, 1.1rem);
}

.settings-header h3 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.45rem);
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 2vw, 0.8rem);
}

.settings-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.settings-theme-options {
  display: flex;
  flex-direction: column;
  gap: clamp(0.45rem, 2vw, 0.75rem);
}

.settings-theme-option {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(21, 33, 63, 0.14);
  background: rgba(17, 26, 46, 0.06);
  font-weight: 600;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.settings-theme-option input[type="radio"] {
  accent-color: var(--primary);
}

.settings-shortcuts-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 2vw, 0.85rem);
}

.settings-shortcuts .btn {
  width: 100%;
  font-size: clamp(0.9rem, 2.6vw, 1rem);
  padding: clamp(0.68rem, 2.4vw, 0.85rem) clamp(0.9rem, 3vw, 1.2rem);
}

.settings-theme-option span { 
  font-size: 0.9rem;
}

.settings-theme-option:focus-within {
  border-color: rgba(29, 91, 240, 0.4);
  box-shadow: 0 0 0 2px rgba(29, 91, 240, 0.14);
}

.settings-theme-option input[type="radio"]:checked + span {
  color: var(--primary);
}

html.dark .settings-theme-option {
  border-color: rgba(244, 247, 255, 0.18);
  background: rgba(244, 247, 255, 0.08);
}

html.dark .settings-theme-option:focus-within {
  border-color: rgba(157, 186, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(157, 186, 255, 0.22);
}

html.dark .settings-theme-option input[type="radio"]:checked + span {
  color: #9dbaff;
}

.settings.open {
  right: 0;
  box-shadow: -18px 0 48px rgba(15, 27, 60, 0.25);
}

#closeSettings {
  position: fixed;
  top: clamp(10px, 3vw, 20px);
  right: clamp(10px, 3vw, 20px);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 180ms ease;
}

.settings.open ~ .footer-ceia #gear {
  opacity: 0;
  pointer-events: none;
}

.settings.open ~ #closeSettings,
.settings.open #closeSettings {
  opacity: 1;
  pointer-events: auto;
}

#closeSettings:hover,
#closeSettings:focus-visible {
  transform: translateY(-2px);
}

html.dark #closeSettings {
  background: rgba(18, 28, 58, 0.92);
  color: #fff;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.settings-version {
  margin-top: auto;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(19, 28, 45, 0.55);
  font-feature-settings: "tnum" 1, "zero" 1;
  text-align: left;
  align-self: flex-start;
  width: 100%;
}

html.dark .settings-version {
  color: rgba(246, 248, 255, 0.45);
}

@media (max-width: 720px) {
  #closeSettings {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
    top: clamp(10px, 5vw, 18px);
    right: clamp(10px, 5vw, 18px);
  }

  #gear {
    position: static;
    width: auto;
    height: auto;
    padding: 4px;
    font-size: 1.05rem;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    color: var(--text-subtle);
    transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 160ms ease;
  }

  #gear:hover,
  #gear:focus-visible {
    transform: none;
    box-shadow: none;
    color: var(--accent);
  }

  .settings .settings-theme-options,
  body.show-landing .landing-logo .settings .settings-theme-options {
    flex-direction: row;
    gap: clamp(0.4rem, 2vw, 0.6rem);
  }

  .settings .settings-theme-option,
  body.show-landing .landing-logo .settings .settings-theme-option {
    flex: 1 1 0;
    justify-content: center;
  }

  .settings .settings-theme-option span,
  body.show-landing .landing-logo .settings .settings-theme-option span {
    text-align: center;
    width: 100%;
  }
}

@media (max-width: 720px) {
  body:not(.show-landing) #gear,
  body:not(.show-landing) #closeSettings,
  body:not(.show-landing) .settings {
    display: none;
  }
}

@media (min-width: 721px) {
  #gear {
    display: none;
  }

  .landing-logo {
    --settings-trigger-offset: clamp(12px, 2.4vw, 20px);
    --settings-trigger-size: 34px;
    --settings-trigger-font: 0.9rem;
    --settings-close-font: 0.98rem;
  }

  .landing-settings-btn,
  .landing-logo .settings #closeSettings {
    display: inline-flex;
    background: rgba(15, 27, 60, 0.08);
    color: var(--primary);
    box-shadow: 0 12px 26px rgba(15, 27, 60, 0.18);
  }

  .landing-settings-btn:hover,
  .landing-settings-btn:focus-visible,
  .landing-logo .settings #closeSettings:hover,
  .landing-logo .settings #closeSettings:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(15, 27, 60, 0.22);
    background: rgba(15, 27, 60, 0.12);
  }

  .landing-settings-btn.settings-active {
    background: rgba(15, 27, 60, 0.16);
    box-shadow: 0 14px 28px rgba(15, 27, 60, 0.22);
    color: var(--primary-dark);
    opacity: 0;
    pointer-events: none;
  }

  html.dark .landing-settings-btn,
  html.dark .landing-logo .settings #closeSettings {
    background: rgba(244, 247, 255, 0.18);
    color: rgba(15, 27, 60, 0.85);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  }

  html.dark .landing-settings-btn:hover,
  html.dark .landing-settings-btn:focus-visible,
  html.dark .landing-logo .settings #closeSettings:hover,
  html.dark .landing-logo .settings #closeSettings:focus-visible {
    background: rgba(244, 247, 255, 0.24);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
  }

  body:not(.show-landing) .landing-settings-btn {
    display: none;
  }
}

/* ------------------------------------------------------------------ */
/* BUBBLE HOCKEY EASTER EGG                                           */
/* ------------------------------------------------------------------ */
body.bubble-hockey-active {
  overflow: hidden;
}

body.bubble-hockey-active #landing {
  pointer-events: none;
}

.bubble-hockey-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(120% 120% at 50% 20%, rgba(6, 12, 26, 0.92), rgba(3, 6, 14, 0.96));
  transition: opacity 280ms ease;
}

.bubble-hockey-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.bubble-hockey-content {
  position: relative;
  width: min(94vw, 980px);
  background: rgba(13, 22, 44, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  padding: clamp(20px, 4vw, 34px);
  box-shadow: 0 38px 84px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: #f5f8ff;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3.6vw, 26px);
}

.bubble-hockey-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 3vw, 20px);
}

.bubble-hockey-title {
  font-family: "Bebas Neue", "Barlow", system-ui, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: clamp(1.45rem, 4.4vw, 2.2rem);
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.bubble-hockey-exit {
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #f7faff;
  width: clamp(38px, 4vw, 44px);
  height: clamp(38px, 4vw, 44px);
  border-radius: 50%;
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 180ms ease, background 160ms ease, box-shadow 200ms ease;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.32);
}

.bubble-hockey-exit:hover,
.bubble-hockey-exit:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

.bubble-hockey-skit {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(60px, 1fr));
  gap: clamp(12px, 2.4vw, 22px);
  justify-items: center;
  align-items: center;
  min-height: clamp(220px, 38vh, 280px);
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 280ms ease, transform 380ms cubic-bezier(0.21, 0.88, 0.26, 1.06);
}

.bubble-hockey-overlay.visible .bubble-hockey-skit {
  opacity: 1;
  transform: none;
}

.bubble-hockey-overlay.show-rink .bubble-hockey-skit {
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.bubble-character {
  width: clamp(58px, 6vw, 74px);
  height: clamp(58px, 6vw, 74px);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translateY(120px) scale(0.6);
  transition: transform 460ms cubic-bezier(0.2, 0.9, 0.24, 1.08), opacity 340ms ease;
  transition-delay: var(--bubble-delay, 0s);
}

.bubble-hockey-overlay.visible .bubble-character {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.bubble-hockey-skit.lineup {
  grid-template-columns: repeat(10, minmax(46px, 1fr));
  gap: clamp(10px, 2vw, 18px);
}

.bubble-hockey-skit.lineup .bubble-character {
  width: clamp(48px, 4.8vw, 62px);
  height: clamp(48px, 4.8vw, 62px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

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

.bubble-hockey-rink {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 3.6vw, 20px);
  align-items: center;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 320ms ease, transform 420ms cubic-bezier(0.21, 0.88, 0.26, 1.06);
  pointer-events: none;
}

.bubble-hockey-overlay.show-rink .bubble-hockey-rink {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.bubble-hockey-board {
  position: relative;
  width: min(92vw, 840px);
  aspect-ratio: 7 / 4;
  max-height: min(58vh, 480px);
  background: linear-gradient(180deg, rgba(230, 241, 255, 0.88), rgba(187, 212, 255, 0.75));
  border-radius: clamp(24px, 5vw, 38px);
  border: 6px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.bubble-hockey-board::before,
.bubble-hockey-board::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, rgba(29, 91, 240, 0.28), rgba(255, 138, 61, 0.28));
  pointer-events: none;
}

.bubble-hockey-board::after {
  width: clamp(110px, 16vw, 160px);
  height: clamp(110px, 16vw, 160px);
  top: 50%;
  border: 3px solid rgba(29, 91, 240, 0.32);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
}

.bubble-hockey-countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-family: "Bebas Neue", "Barlow", system-ui, sans-serif;
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 200ms ease, transform 320ms ease;
  z-index: 3;
}

.bubble-hockey-countdown.visible {
  opacity: 1;
  transform: scale(1);
}

.bubble-hockey-goals,
.bubble-hockey-players {
  position: absolute;
  inset: clamp(18px, 3vw, 26px);
  pointer-events: none;
}

.bubble-hockey-goals {
  z-index: 0;
}

.bubble-hockey-players {
  z-index: 1;
}

.bubble-hockey-players.roster-on .bubble-player {
  animation: bubble-player-drop 520ms cubic-bezier(0.2, 0.8, 0.26, 1.08) forwards;
  animation-delay: var(--enter-delay, 0ms);
}

.bubble-player {
  position: absolute;
  --rod-length: clamp(110px, 24vh, 170px);
  --spin: 0deg;
  width: clamp(52px, 5.6vw, 66px);
  height: clamp(52px, 5.6vw, 66px);
  border-radius: 50%;
  overflow: hidden;
  transform: translate(-50%, -50%) rotate(var(--spin));
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 18px 32px rgba(12, 18, 42, 0.45);
  will-change: top, left;
  opacity: 0;
  transition: transform 160ms ease;
}

.bubble-player.team-left {
  border-color: rgba(29, 91, 240, 0.68);
  box-shadow: 0 18px 34px rgba(14, 30, 72, 0.45);
}

.bubble-player.team-right {
  border-color: rgba(255, 138, 61, 0.7);
  box-shadow: 0 18px 34px rgba(72, 29, 14, 0.4);
}

.bubble-player.goalie {
  border-width: 4px;
  width: clamp(56px, 6vw, 72px);
  height: clamp(56px, 6vw, 72px);
  box-shadow: 0 18px 36px rgba(6, 10, 24, 0.52);
}

.bubble-player::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(-1 * var(--rod-length));
  width: clamp(5px, 0.6vw, 8px);
  height: var(--rod-length);
  border-radius: 999px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0));
  opacity: 0.45;
}

.bubble-player.team-left::before {
  background: linear-gradient(180deg, rgba(90, 140, 255, 0.6), rgba(29, 91, 240, 0));
}

.bubble-player.team-right::before {
  background: linear-gradient(180deg, rgba(255, 176, 120, 0.68), rgba(255, 138, 61, 0));
}

.bubble-player img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.bubble-player.bonk {
  animation: bubble-player-bonk 320ms ease;
}

@keyframes bubble-player-bonk {
  0% {
    transform: translate(-50%, -50%) rotate(var(--spin)) scale(1);
  }
  45% {
    transform: translate(-50%, -54%) rotate(var(--spin)) scale(1.12);
  }
  100% {
    transform: translate(-50%, -50%) rotate(var(--spin)) scale(1);
  }
}

@keyframes bubble-player-drop {
  0% {
    opacity: 0;
    transform: translate(-50%, -64%) rotate(var(--spin)) scale(0.82);
  }
  65% {
    opacity: 1;
    transform: translate(-50%, -48%) rotate(var(--spin)) scale(1.06);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--spin)) scale(1);
  }
}

.bubble-goal {
  position: absolute;
  top: 50%;
  width: clamp(42px, 5vw, 60px);
  height: 62%;
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-radius: clamp(14px, 3vw, 24px);
  transform: translate(-45%, -50%);
  background: linear-gradient(90deg, rgba(173, 206, 255, 0.28), rgba(173, 206, 255, 0));
  box-shadow: inset 0 0 18px rgba(10, 18, 36, 0.3);
}

.bubble-goal::before {
  content: "";
  position: absolute;
  inset: 16% 18%;
  border-radius: clamp(10px, 2.4vw, 18px);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 0 10px rgba(10, 18, 36, 0.26);
}

.bubble-goal::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(6px, 0.8vw, 9px);
  height: clamp(28px, 6vw, 38px);
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0));
  border-radius: 999px;
}

.bubble-goal-left {
  left: 0;
  transform: translate(-45%, -50%);
  border-left: 0;
  background: linear-gradient(90deg, rgba(173, 206, 255, 0.32), rgba(173, 206, 255, 0));
}

.bubble-goal-right {
  right: 0;
  transform: translate(45%, -50%);
  border-right: 0;
  background: linear-gradient(270deg, rgba(255, 183, 132, 0.32), rgba(255, 183, 132, 0));
}

.bubble-hockey-puck {
  position: absolute;
  width: clamp(24px, 3vw, 30px);
  height: clamp(24px, 3vw, 30px);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 32%, #3b475f 0%, #1a2233 56%, #080d18 100%);
  border: 2px solid rgba(12, 18, 32, 0.9);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.55), inset 0 6px 10px rgba(255, 255, 255, 0.08);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

.bubble-hockey-puck::after {
  content: "";
  position: absolute;
  inset: 18% 26%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0));
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.1);
}

.bubble-hockey-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 3.4vw, 24px);
  padding: clamp(10px, 2.6vw, 16px) clamp(18px, 4vw, 26px);
  background: rgba(7, 12, 24, 0.58);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: min(92vw, 520px);
}

.bubble-score {
  font-family: "Bebas Neue", "Barlow", system-ui, sans-serif;
  font-size: clamp(2.6rem, 8vw, 3.9rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
}

.bubble-score-left {
  color: #8fbaff;
}

.bubble-score-right {
  color: #ffc095;
}

.bubble-score-flash {
  animation: bubble-score-pop 420ms ease;
}

@keyframes bubble-score-pop {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

.bubble-timer {
  font-weight: 700;
  font-size: clamp(1.1rem, 3.4vw, 1.6rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 248, 255, 0.92);
}

.bubble-hockey-instructions {
  font-size: clamp(0.85rem, 2.4vw, 1rem);
  color: rgba(244, 248, 255, 0.85);
  background: rgba(7, 12, 24, 0.58);
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  text-align: center;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.bubble-hockey-status {
  min-height: 1.2em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  color: rgba(255, 255, 255, 0.95);
  opacity: 0;
  transition: opacity 200ms ease;
}

.bubble-hockey-status.visible {
  opacity: 1;
}

@media (max-width: 900px) {
  .bubble-hockey-board {
    aspect-ratio: 5 / 3;
  }

  .bubble-hockey-players {
    inset: clamp(14px, 4vw, 22px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bubble-hockey-overlay,
  .bubble-hockey-content,
  .bubble-hockey-skit,
  .bubble-hockey-rink {
    transition-duration: 0ms;
  }

  .bubble-character,
  .bubble-player.bonk,
  .bubble-score-flash {
    animation-duration: 0ms;
    transition-duration: 0ms;
  }
}

/* ------------------------------------------------------------------ */
/* MODAL                                                               */
/* ------------------------------------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 48px);
  background: var(--modal-backdrop);
  z-index: 150;
  opacity: 0;
  transition: opacity 260ms ease;
}

.modal.visible,
.modal.hiding {
  display: flex;
}

.modal.visible {
  opacity: 1;
}

.modal-panel {
  --modal-pad: clamp(22px, 4vw, 32px);
  background: var(--surface);
  color: var(--text);
  width: min(900px, 94vw);
  max-height: 88dvh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--modal-pad);
  transform: translateY(24px) scale(0.97);
  opacity: 0;
  transition: transform 280ms cubic-bezier(0.22, 0.75, 0.25, 0.99), opacity 240ms ease;
  overflow: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3.6vw, 22px);
}

.modal.visible .modal-panel {
  transform: none;
  opacity: 1;
}

.modal.hiding .modal-panel {
  transform: translateY(20px) scale(0.97);
  opacity: 0;
}

.modal-close {
  position: absolute;
  top: clamp(12px, 3vw, 18px);
  right: clamp(12px, 3vw, 18px);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease;
  z-index: 3;
}

.modal-close:hover,
.modal-close:focus-visible {
  transform: translateY(-2px);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 3.2vw, 18px);
}

.modal-body > h3:first-child {
  position: sticky;
  top: calc(-1 * var(--modal-pad));
  margin: calc(-1 * var(--modal-pad)) calc(-1 * var(--modal-pad)) 0;
  padding: calc(var(--modal-pad)) calc(var(--modal-pad) + clamp(38px, 10vw, 48px))
    clamp(10px, 3vw, 14px) var(--modal-pad);
  background: var(--surface);
  border-bottom: 1px solid rgba(15, 27, 60, 0.12);
  z-index: 2;
}

html.dark .modal-body > h3:first-child {
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

@media (max-width: 720px) {
  .modal,
  .modal.visible,
  .modal.hiding {
    align-items: stretch;
  }

  .modal {
    padding: clamp(6px, 4vw, 16px);
  }

  .modal-panel {
    width: 100%;
    max-height: 92svh;
    border-radius: var(--radius-md);
  }

  .modal-close {
    top: clamp(10px, 3vw, 14px);
    right: clamp(10px, 3vw, 14px);
  }
}

.characters-grid,
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(14px, 3vw, 20px);
  margin-top: clamp(12px, 3vw, 20px);
}

.pill-card {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: clamp(16px, 3vw, 22px);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

html.dark .pill-card {
  background: linear-gradient(155deg, rgba(26, 38, 72, 0.94), rgba(18, 30, 60, 0.9));
  box-shadow: var(--shadow-md);
}

.pill-card .circle {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(52, 86, 214, 0.12);
  display: grid;
  place-items: center;
  overflow: hidden;
}

html.dark .pill-card .circle {
  background: rgba(255, 255, 255, 0.12);
}

.skills-grid .pill-card .circle {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 27, 60, 0.14);
}

html.dark .skills-grid .pill-card .circle {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
}

.pill-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pill-card .i svg {
  width: 36px;
  height: 36px;
  color: var(--primary);
}

.pill-card .learn {
  font-weight: 700;
  text-decoration: none;
  color: var(--ink-accent);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(29, 91, 240, 0.12), rgba(255, 138, 61, 0.18));
  box-shadow: 0 10px 24px rgba(16, 33, 72, 0.12);
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

html.dark .pill-card .learn {
  color: rgba(244, 247, 255, 0.95);
  background: linear-gradient(135deg, rgba(29, 91, 240, 0.28), rgba(255, 138, 61, 0.32));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.38);
}

.pill-card .learn:hover,
.pill-card .learn:focus-visible {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 16px 30px rgba(16, 33, 72, 0.2);
  transform: translateY(-1px);
}

/* ------------------------------------------------------------------ */
/* MINI-GAME OVERLAY                                                   */
/* ------------------------------------------------------------------ */

body.minigame-open {
  overflow: hidden;
}

.minigame-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 14, 31, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 5vw, 36px);
  z-index: 2000;
  backdrop-filter: blur(6px);
}

.minigame-overlay.is-visible {
  display: flex;
}

.minigame-panel {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(225, 233, 255, 0.96));
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(8, 16, 40, 0.35);
  width: min(92vw, 960px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vw, 18px);
  padding: clamp(18px, 3vw, 26px);
  position: relative;
}

html.dark .minigame-panel {
  background: linear-gradient(160deg, rgba(16, 26, 52, 0.96), rgba(9, 16, 32, 0.96));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
}

.minigame-close {
  position: absolute;
  top: clamp(8px, 1.8vw, 16px);
  right: clamp(8px, 1.8vw, 16px);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(9, 16, 32, 0.12);
  color: var(--ink-strong);
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.minigame-close:hover,
.minigame-close:focus-visible {
  background: rgba(16, 48, 148, 0.28);
  color: #fff;
}

html.dark .minigame-close {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 247, 255, 0.92);
}

.minigame-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.04em;
}

.minigame-score {
  font-size: clamp(24px, 5vw, 34px);
  color: var(--ink-strong);
}

.minigame-clock {
  font-size: clamp(22px, 4.5vw, 30px);
  color: var(--ink-accent);
}

html.dark .minigame-score {
  color: rgba(244, 247, 255, 0.95);
}

html.dark .minigame-clock {
  color: rgba(148, 179, 255, 0.94);
}

.minigame-canvas-wrap {
  flex: 1 1 auto;
  width: 100%;
  border-radius: clamp(16px, 3vw, 22px);
  background: radial-gradient(circle at 50% 40%, rgba(91, 142, 255, 0.18), rgba(14, 24, 52, 0.55));
  overflow: hidden;
  min-height: 260px;
}

.minigame-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.minigame-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.minigame-message {
  margin: 0;
  font-size: clamp(14px, 2.5vw, 16px);
  color: var(--ink-muted);
}

html.dark .minigame-message {
  color: rgba(205, 217, 255, 0.82);
}

.minigame-footer .btn {
  align-self: flex-start;
}

@media (max-width: 600px) {
  .minigame-panel {
    width: min(96vw, 520px);
    padding: clamp(16px, 5vw, 22px);
  }

  .minigame-footer .btn {
    width: 100%;
    text-align: center;
  }
}

/* ------------------------------------------------------------------ */
/* RESPONSIVE + REDUCED MOTION                                         */
/* ------------------------------------------------------------------ */
@media (max-width: 900px) {
  #gear {
    bottom: calc(var(--footerPad) + env(safe-area-inset-bottom) + 14px);
    top: auto;
  }
}

@media (max-width: 460px) {
  .landing-card {
    border-radius: 18px;
    padding: clamp(18px, 6vw, 24px);
  }

  .landing-logo-badge {
    padding: clamp(18px, 8vw, 26px);
  }

  .footer-ceia img {
    height: 26px;
  }
}

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

#casinoArcadeRoot {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: stretch;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
  z-index: 120;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  color: #f1f5ff;
  background: radial-gradient(circle at 18% -8%, rgba(66, 186, 255, 0.22), transparent 42%),
    radial-gradient(circle at 82% 118%, rgba(255, 122, 231, 0.18), transparent 52%),
    linear-gradient(165deg, #010713 0%, #031229 48%, #020a1e 100%);
  background-color: #010713;
}

#casinoArcadeRoot.is-active {
  pointer-events: auto;
  opacity: 1;
}

body.casino-game-active {
  overflow: hidden;
}

body.casino-pointer-freeze *:not(#casinoArcadeRoot) {
  pointer-events: none !important;
}

body.casino-game-active .footer-ceia {
  display: none !important;
}

.casino-aria-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.casino-sr-hidden {
  visibility: hidden;
}

.casino-no-pointer {
  pointer-events: none;
}

.casino-no-pointer * {
  pointer-events: none;
}

.casino-no-pointer .cec-overlay-menu,
.casino-no-pointer .cec-overlay-story,
.casino-no-pointer .cec-overlay-wasted {
  pointer-events: auto;
}

.casino-no-scroll {
  overflow: hidden;
}

.casino-no-select {
  user-select: none;
}

 .cec-root {
  display: grid;
  grid-template-rows: min-content 1fr;
  align-content: start;
  justify-items: stretch;
  gap: clamp(24px, 3vh, 36px);
  width: 100%;
  height: 100%;
  padding: clamp(28px, 4vh, 56px) clamp(32px, 4vw, 72px);
  max-width: 1680px;
  margin: 0 auto;
  box-sizing: border-box;
  background: radial-gradient(circle at 20% -10%, rgba(66, 186, 255, 0.24), transparent 46%),
    radial-gradient(circle at 82% 120%, rgba(255, 122, 231, 0.2), transparent 52%),
    linear-gradient(165deg, #020714, #041028 42%, #031730 100%);
  color: #fdfdff;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: clamp(15px, 1vw, 17px);
  line-height: 1.55;
  letter-spacing: 0.01em;
  overflow: hidden;
  isolation: isolate;
  --cec-color-bg: #020714;
  --cec-color-surface: rgba(12, 24, 52, 0.94);
  --cec-color-surface-alt: rgba(16, 32, 62, 0.92);
  --cec-color-border: rgba(156, 206, 255, 0.42);
  --cec-color-border-strong: rgba(192, 236, 255, 0.64);
  --cec-color-muted: rgba(240, 248, 255, 0.86);
  --cec-color-highlight: rgba(142, 234, 255, 0.98);
  --cec-color-positive: #7dffca;
  --cec-color-warning: #ffc659;
  --cec-radius-sm: 12px;
  --cec-radius-md: 18px;
  --cec-radius-lg: 24px;
  --cec-spacing-2xs: clamp(6px, 0.55vw, 10px);
  --cec-spacing-xs: clamp(8px, 0.75vw, 14px);
  --cec-spacing-sm: clamp(12px, 1vw, 18px);
  --cec-spacing-md: clamp(16px, 1.4vw, 22px);
  --cec-spacing-lg: clamp(22px, 2vw, 30px);
  --cec-spacing-xl: clamp(28px, 2.6vw, 36px);
  --cec-font-xs: clamp(12px, 0.8vw, 14px);
  --cec-font-sm: clamp(14px, 0.95vw, 16px);
  --cec-font-md: clamp(16px, 1.1vw, 18px);
  --cec-font-lg: clamp(18px, 1.3vw, 21px);
  --cec-font-xl: clamp(22px, 1.8vw, 26px);
  --cec-shadow-soft: 0 18px 44px rgba(2, 8, 24, 0.48);
  --cec-shadow-strong: 0 34px 78px rgba(3, 12, 38, 0.66);
  --cec-stage-max: clamp(960px, 66vw, 1180px);
  --cec-panel-width: clamp(160px, 11vw, 190px);
  --cec-topbar-height: clamp(44px, 4.5vw, 60px);
  --cec-layout-gap: clamp(32px, 4vw, 56px);
}

.cec-root * {
  box-sizing: border-box;
  font-family: inherit;
}

.cec-root h1,
.cec-root h2,
.cec-root h3,
.cec-root h4,
.cec-root h5,
.cec-root h6 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f6fbff;
}

.cec-root p {
  margin: 0;
  color: rgba(240, 248, 255, 0.88);
}

.cec-root a {
  color: var(--cec-color-highlight);
}

.cec-root > * {
  position: relative;
  width: min(1440px, 100%);
  z-index: 1;
}

.cec-root::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 12% 18%, rgba(96, 226, 255, 0.12), transparent 60%),
    radial-gradient(circle at 88% 64%, rgba(255, 117, 197, 0.12), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.cec-root.cec-obscured {
  filter: saturate(0.4) blur(0.8px);
}

.cec-root.cec-obscured::before {
  content: "";
  position: absolute;
  inset: -4%;
  background: repeating-linear-gradient(135deg, rgba(50, 28, 12, 0.56), rgba(16, 8, 4, 0.42) 28px);
  mix-blend-mode: multiply;
  opacity: 0.6;
  z-index: 2;
}

.cec-root.cec-obscured > * {
  filter: blur(1px);
}

.cec-root.cec-obscured .cec-overlay-wasted,
.cec-root.cec-obscured .cec-overlay-wasted * {
  filter: none;
}

.cec-root.cec-obscured .cec-overlay-wasted {
  box-shadow: 0 0 28px rgba(255, 104, 180, 0.4);
}

.cec-root .cec-stage {
  grid-row: 2;
}

.cec-root.cec-obscured .cec-stage,
.cec-root.cec-obscured .cec-topbar-shell {
  opacity: 0.5;
}

.cec-root.cec-obscured .cec-ui,
.cec-root.cec-obscured .cec-overlay-menu,
.cec-root.cec-obscured .cec-overlay-story,
.cec-root.cec-obscured .cec-overlay-wasted {
  opacity: 1;
}

.cec-root .cec-topbar-shell {
  grid-row: 1;
}

.cec-root .cec-stage,
.cec-root .cec-topbar-shell {
  width: min(100%, calc(var(--cec-stage-max) + var(--cec-panel-width) + var(--cec-layout-gap)));
}

.cec-root.cec-obscured .cec-overlay-menu button::after,
.cec-root.cec-obscured .cec-overlay-story button::after {
  display: none;
}

.cec-root.cec-obscured .cec-overlay-wasted button::after {
  display: none;
}

.cec-root .cec-stage {
  position: relative;
  display: grid;
  border-radius: var(--cec-radius-lg);
  overflow: hidden;
  background: radial-gradient(circle at 25% 15%, rgba(112, 214, 255, 0.14), transparent 60%),
    radial-gradient(circle at 70% 85%, rgba(255, 121, 210, 0.12), transparent 52%),
    #040b18;
  box-shadow: var(--cec-shadow-strong);
  min-height: clamp(460px, 70vh, 760px);
}

.cec-root .cec-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  cursor: crosshair;
}


.cec-root .cec-legend {
  display: inline-flex;
  align-items: center;
  gap: var(--cec-spacing-2xs);
  padding: var(--cec-spacing-2xs) var(--cec-spacing-sm);
  border-radius: var(--cec-radius-sm);
  background: rgba(12, 26, 52, 0.88);
  border: 1px solid rgba(143, 191, 255, 0.24);
  font-size: var(--cec-font-xs);
  color: var(--cec-color-muted);
}

.cec-root .cec-legend[hidden] {
  display: none !important;
}


.cec-root .cec-ui {
  position: static;
  display: grid;
  grid-auto-rows: min-content;
  align-content: start;
  justify-items: stretch;
  gap: var(--cec-spacing-md);
  padding: 0;
  width: 100%;
  pointer-events: none;
}

.cec-root .cec-toast {
  position: static;
  width: 100%;
  padding: var(--cec-spacing-xs) var(--cec-spacing-md);
  border-radius: var(--cec-radius-sm);
  background: rgba(8, 25, 60, 0.9);
  border: 1px solid rgba(126, 224, 255, 0.45);
  color: #f6fbff;
  font-size: var(--cec-font-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  box-shadow: var(--cec-shadow-soft);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.cec-root .cec-toast[hidden] {
  display: none !important;
}

.cec-root .cec-dialogue {
  position: static;
  width: 100%;
  padding: var(--cec-spacing-sm) var(--cec-spacing-md);
  border-radius: var(--cec-radius-md);
  background: rgba(6, 20, 44, 0.92);
  border: 1px solid rgba(126, 224, 255, 0.3);
  font-size: var(--cec-font-sm);
  color: #f4f8ff;
  box-shadow: var(--cec-shadow-soft);
  pointer-events: none;
}

.cec-root .cec-dialogue[hidden] {
  display: none !important;
}

.cec-root .cec-convo {
  position: static;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--cec-spacing-sm);
  padding: var(--cec-spacing-md);
  border-radius: var(--cec-radius-md);
  background: rgba(8, 21, 46, 0.96);
  border: 1px solid rgba(143, 191, 255, 0.35);
  box-shadow: var(--cec-shadow-soft);
  pointer-events: auto;
}

.cec-root .cec-convo[hidden] {
  display: none !important;
}

.cec-root .cec-convo-img {
  grid-row: 1 / span 3;
  width: clamp(80px, 10vw, 110px);
  height: clamp(80px, 10vw, 110px);
  object-fit: cover;
  border-radius: var(--cec-radius-sm);
  border: 1px solid rgba(143, 191, 255, 0.4);
  box-shadow: 0 12px 30px rgba(2, 8, 24, 0.6);
}

.cec-root .cec-convo-img[hidden] {
  display: none !important;
}

.cec-root .cec-convo-head {
  grid-column: 2 / -1;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: var(--cec-spacing-2xs);
}

.cec-root .cec-convo-name {
  font-size: var(--cec-font-lg);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cec-root .cec-convo-actions {
  grid-column: 2 / -1;
  display: flex;
  flex-direction: column;
  gap: var(--cec-spacing-2xs);
}

.cec-root .cec-convo-actions button {
  text-align: left;
  width: 100%;
  padding: var(--cec-spacing-xs) var(--cec-spacing-sm);
  border-radius: var(--cec-radius-sm);
  border: 1px solid rgba(143, 191, 255, 0.2);
  background: rgba(14, 32, 66, 0.92);
  color: #f6fbff;
  font-size: var(--cec-font-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.cec-root .cec-convo-actions button:hover,
.cec-root .cec-convo-actions button:focus-visible {
  transform: translateY(-1px);
  background: rgba(32, 72, 128, 0.92);
  border-color: rgba(143, 191, 255, 0.5);
}

.cec-root .cec-convo-mood {
  grid-column: 2 / -1;
  font-size: var(--cec-font-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(180, 208, 255, 0.92);
}

.cec-root .cec-venue-indicator {
  position: static;
  display: flex;
  flex-direction: column;
  gap: var(--cec-spacing-2xs);
  align-items: flex-start;
  padding: var(--cec-spacing-sm) var(--cec-spacing-md);
  border-radius: var(--cec-radius-md);
  background: rgba(8, 24, 52, 0.92);
  border: 1px solid rgba(143, 191, 255, 0.3);
  box-shadow: var(--cec-shadow-soft);
  pointer-events: none;
}

.cec-root .cec-venue-indicator[hidden] {
  display: none !important;
}

.cec-root .cec-venue-indicator__name {
  font-size: var(--cec-font-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f6fbff;
}

.cec-root .cec-venue-indicator__flair {
  font-size: var(--cec-font-xs);
  color: rgba(204, 220, 255, 0.86);
}

.cec-root .cec-hud {
  position: static;
  width: 100%;
  padding: var(--cec-spacing-sm) var(--cec-spacing-md);
  border-radius: var(--cec-radius-md);
  background: rgba(6, 18, 38, 0.94);
  border: 1px solid rgba(143, 191, 255, 0.3);
  box-shadow: var(--cec-shadow-soft);
  pointer-events: none;
}

.cec-root .cec-hud[hidden] {
  display: none !important;
}

.cec-root .cec-hud__title {
  font-size: var(--cec-font-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f6fbff;
}

.cec-root .cec-hud__meta {
  margin-top: var(--cec-spacing-2xs);
  font-size: var(--cec-font-xs);
  color: rgba(198, 214, 255, 0.9);
  letter-spacing: 0.08em;
}

.cec-root .cec-balloon {
  position: static;
  align-self: flex-start;
  padding: var(--cec-spacing-2xs) var(--cec-spacing-sm);
  border-radius: var(--cec-radius-sm);
  background: rgba(8, 25, 60, 0.92);
  border: 1px solid rgba(143, 191, 255, 0.35);
  color: #f6fbff;
  font-size: var(--cec-font-sm);
  box-shadow: var(--cec-shadow-soft);
  animation: cec-bubble 2.8s ease forwards;
  pointer-events: none;
}

@keyframes cec-bubble {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }
  12% {
    opacity: 1;
    transform: translateY(0);
  }
  88% {
    opacity: 1;
    transform: translateY(-6px);
  }
  100% {
    opacity: 0;
    transform: translateY(-16px);
  }
}

.cec-stage-overlay {
  position: absolute;
  inset: 0;
  padding: clamp(var(--cec-spacing-lg), 5vw, calc(var(--cec-spacing-xl) * 2));
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: 2;
  border-radius: inherit;
}

.cec-stage-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 24, 0.55);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 180ms ease;
}

.cec-stage-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.cec-stage-overlay.is-active::before {
  opacity: 1;
}

.cec-root.cec-overlay-active .cec-stage > :not(.cec-stage-overlay) {
  filter: blur(3px) saturate(0.85);
}

.cec-root.cec-overlay-active .cec-panel {
  filter: blur(3px) saturate(0.85);
  pointer-events: none;
}

.cec-root.cec-overlay-active .cec-stage-overlay {
  pointer-events: auto;
}

.cec-stage-overlay > .cec-overlay-menu,
.cec-stage-overlay > .cec-overlay-story,
.cec-stage-overlay > .cec-overlay-wasted {
  position: relative;
  width: min(460px, 100%);
  max-height: min(640px, calc(100% - clamp(var(--cec-spacing-lg), 4vw, calc(var(--cec-spacing-xl) * 2))));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--cec-spacing-md);
  padding: var(--cec-spacing-lg);
  border-radius: var(--cec-radius-lg);
  background: rgba(6, 16, 36, 0.96);
  border: 1px solid rgba(143, 191, 255, 0.38);
  box-shadow: var(--cec-shadow-strong);
  color: #f7fbff;
  pointer-events: auto;
}

.cec-stage-overlay > .cec-overlay-menu[hidden],
.cec-stage-overlay > .cec-overlay-story[hidden],
.cec-stage-overlay > .cec-overlay-wasted[hidden] {
  display: none !important;
}

.cec-stage-overlay > .cec-overlay-menu h2,
.cec-stage-overlay > .cec-overlay-story h2,
.cec-stage-overlay > .cec-overlay-wasted h2 {
  font-size: var(--cec-font-lg);
  letter-spacing: 0.14em;
}

.cec-root .cec-menu-body {
  display: grid;
  gap: var(--cec-spacing-sm);
  font-size: var(--cec-font-sm);
  color: rgba(226, 236, 255, 0.9);
}

.cec-root .cec-menu-body__spacer {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(143, 191, 255, 0.4), transparent);
  margin: var(--cec-spacing-xs) 0;
}

.cec-root .cec-menu-actions {
  display: flex;
  flex-direction: column;
  gap: var(--cec-spacing-xs);
}

.cec-root .cec-menu-actions button,
.cec-root .cec-bet-form__button,
.cec-root .cec-sportsbook-actions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--cec-spacing-xs);
  padding: var(--cec-spacing-xs) var(--cec-spacing-md);
  border-radius: var(--cec-radius-sm);
  border: 1px solid rgba(143, 191, 255, 0.35);
  background: linear-gradient(135deg, rgba(67, 142, 255, 0.35), rgba(126, 224, 255, 0.35));
  color: #ffffff;
  font-size: var(--cec-font-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.cec-root .cec-menu-actions button:hover,
.cec-root .cec-menu-actions button:focus-visible,
.cec-root .cec-bet-form__button:hover,
.cec-root .cec-bet-form__button:focus-visible,
.cec-root .cec-sportsbook-actions button:hover,
.cec-root .cec-sportsbook-actions button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(8, 26, 56, 0.45);
  border-color: rgba(143, 191, 255, 0.6);
}

.cec-root .cec-bet-form {
  display: grid;
  gap: var(--cec-spacing-sm);
}

.cec-root .cec-bet-form__label {
  font-size: var(--cec-font-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(198, 214, 255, 0.86);
}

.cec-root .cec-bet-form__input {
  width: 100%;
  padding: var(--cec-spacing-xs) var(--cec-spacing-sm);
  border-radius: var(--cec-radius-sm);
  border: 1px solid rgba(143, 191, 255, 0.4);
  background: rgba(8, 20, 44, 0.9);
  color: #f6fbff;
  font-size: var(--cec-font-md);
}

.cec-root .cec-bet-form__hint {
  font-size: var(--cec-font-xs);
  color: rgba(198, 214, 255, 0.88);
}

.cec-root .cec-bet-form__error {
  font-size: var(--cec-font-xs);
  color: #ff9fc6;
}

.cec-root .cec-bet-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cec-spacing-xs);
}

.cec-root .cec-bet-form__button--ghost {
  background: rgba(12, 28, 60, 0.88);
  color: #f6fbff;
  border-color: rgba(143, 191, 255, 0.3);
}

.cec-root .cec-sportsbook {
  display: grid;
  gap: var(--cec-spacing-md);
}

.cec-root .cec-sportsbook__intro {
  font-size: var(--cec-font-sm);
  color: rgba(204, 220, 255, 0.82);
}

.cec-root .cec-sportsbook-event {
  display: grid;
  gap: var(--cec-spacing-xs);
  padding: var(--cec-spacing-sm);
  border-radius: var(--cec-radius-md);
  background: rgba(8, 20, 44, 0.9);
  border: 1px solid rgba(143, 191, 255, 0.25);
}

.cec-root .cec-sportsbook-event__title {
  font-size: var(--cec-font-sm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(198, 214, 255, 0.9);
}

.cec-root .cec-sportsbook-event__matchup {
  font-size: var(--cec-font-md);
  font-weight: 600;
}

.cec-root .cec-sportsbook-options {
  display: grid;
  gap: var(--cec-spacing-xs);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.cec-root .cec-sportsbook-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--cec-spacing-2xs);
  padding: var(--cec-spacing-xs);
  border-radius: var(--cec-radius-sm);
  border: 1px solid rgba(143, 191, 255, 0.25);
  background: rgba(12, 28, 60, 0.88);
  color: #f6fbff;
  font-size: var(--cec-font-sm);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.cec-root .cec-sportsbook-option:hover,
.cec-root .cec-sportsbook-option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(143, 191, 255, 0.5);
  background: rgba(32, 72, 128, 0.88);
}

.cec-root .cec-sportsbook-option[aria-pressed="true"] {
  border-color: rgba(126, 224, 255, 0.9);
  background: rgba(45, 110, 200, 0.92);
  color: #041022;
}

.cec-root .cec-sportsbook-option__label {
  font-weight: 600;
  letter-spacing: 0.06em;
}

.cec-root .cec-sportsbook-option__detail {
  font-size: var(--cec-font-xs);
  color: rgba(204, 220, 255, 0.92);
}

.cec-root .cec-sportsbook-slip {
  display: grid;
  gap: var(--cec-spacing-sm);
  padding: var(--cec-spacing-sm);
  border-radius: var(--cec-radius-md);
  background: rgba(8, 20, 44, 0.92);
  border: 1px solid rgba(143, 191, 255, 0.25);
}

.cec-root .cec-sportsbook-summary {
  display: grid;
  gap: var(--cec-spacing-xs);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.cec-root .cec-sportsbook-summary__item {
  display: flex;
  flex-direction: column;
  gap: var(--cec-spacing-2xs);
  padding: var(--cec-spacing-xs);
  border-radius: var(--cec-radius-sm);
  background: rgba(12, 28, 60, 0.86);
  border: 1px solid rgba(143, 191, 255, 0.2);
}

.cec-root .cec-sportsbook-summary__label {
  font-size: var(--cec-font-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(204, 220, 255, 0.9);
}

.cec-root .cec-sportsbook-summary__value {
  font-size: var(--cec-font-md);
  font-weight: 600;
  color: #f6fbff;
}

.cec-root .cec-sportsbook-stake {
  display: grid;
  gap: var(--cec-spacing-2xs);
}

.cec-root .cec-sportsbook-stake label {
  font-size: var(--cec-font-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(204, 220, 255, 0.9);
}

.cec-root .cec-sportsbook-stake input {
  width: 100%;
  padding: var(--cec-spacing-xs) var(--cec-spacing-sm);
  border-radius: var(--cec-radius-sm);
  border: 1px solid rgba(143, 191, 255, 0.4);
  background: rgba(8, 20, 44, 0.9);
  color: #f6fbff;
  font-size: var(--cec-font-md);
}

.cec-root .cec-sportsbook-stake__note {
  font-size: var(--cec-font-xs);
  color: rgba(198, 214, 255, 0.9);
}

.cec-root .cec-sportsbook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cec-spacing-xs);
}

.cec-root .cec-sportsbook-actions__secondary {
  background: rgba(12, 28, 60, 0.88);
  color: #f6fbff;
  border: 1px solid rgba(143, 191, 255, 0.25);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cec-root .cec-overlay-menu--sportsbook {
  width: min(640px, calc(100% - 48px));
}

.cec-root .cec-overlay-story {
  text-align: left;
  font-size: var(--cec-font-md);
  line-height: 1.7;
  color: rgba(226, 236, 255, 0.92);
}

.cec-root .cec-overlay-wasted {
  align-items: center;
  text-align: center;
}

.cec-root .cec-wasted-title {
  font-size: var(--cec-font-lg);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cec-root .cec-wasted-subtitle {
  font-size: var(--cec-font-md);
  color: rgba(226, 236, 255, 0.9);
}

.cec-root .cec-wasted-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--cec-spacing-xs);
  justify-content: center;
}

.cec-root .cec-wasted-actions button {
  min-width: 140px;
}

.cec-root .cec-toast,
.cec-root .cec-dialogue,
.cec-root .cec-convo,
.cec-root .cec-venue-indicator,
.cec-root .cec-hud,
.cec-root .cec-balloon {
  backdrop-filter: blur(18px);
}

@media (max-width: 980px) {
  .cec-root {
    padding: clamp(20px, 4vw, 40px);
  }

  .cec-root .cec-topbar {
    grid-template-columns: 1fr auto;
    gap: var(--cec-spacing-md);
  }

  .cec-root .cec-topbar__actions {
    justify-content: flex-end;
  }

  .cec-root .cec-convo {
    position: static;
    width: 100%;
    max-width: none;
    grid-template-columns: 1fr;
  }

  .cec-root .cec-convo-img {
    grid-row: auto;
    width: clamp(96px, 30vw, 140px);
    height: clamp(96px, 30vw, 140px);
  }

  .cec-root .cec-convo-head {
    align-items: flex-start;
  }

  .cec-root .cec-overlay-menu,
  .cec-root .cec-overlay-story,
  .cec-root .cec-overlay-wasted {
    padding: var(--cec-spacing-md);
    width: min(520px, calc(100% - 32px));
  }

  .cec-root .cec-scoreboard {
    gap: var(--cec-spacing-xs);
  }

  .cec-root .cec-scoreboard__item {
    padding-inline-end: var(--cec-spacing-xs);
  }

  .cec-root .cec-scoreboard__item:not(:last-child)::after {
    height: 22px;
  }

  .cec-root .cec-score-value {
    font-size: var(--cec-font-xs);
  }
}

@media (max-width: 720px) {
  .cec-root {
    font-size: clamp(15px, 3.4vw, 17px);
  }

  .cec-root .cec-stage {
    min-height: clamp(420px, 72vh, 640px);
  }

  .cec-root .cec-dialogue {
    position: static;
    width: 100%;
  }

  .cec-root .cec-overlay-menu,
  .cec-root .cec-overlay-story,
  .cec-root .cec-overlay-wasted {
    max-height: calc(100% - 80px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cec-root *,
  .cec-root *::before,
  .cec-root *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

/* Cutting Edge Casino layout overhaul */
.cec-root {
  display: grid;
  grid-template-rows: min-content 1fr;
  align-content: start;
  justify-items: center;
  gap: clamp(24px, 3vh, 36px);
  position: relative;
  width: 100%;
  min-width: 100vw;
  height: 100%;
  min-height: 100vh;
  padding: clamp(28px, 4vh, 56px);
  background: radial-gradient(circle at 20% -10%, rgba(66, 186, 255, 0.24), transparent 46%),
    radial-gradient(circle at 82% 120%, rgba(255, 122, 231, 0.2), transparent 52%),
    linear-gradient(165deg, #020714, #041028 42%, #031730 100%);
  color: #f7fbff;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: clamp(15px, 1vw, 17px);
  line-height: 1.55;
  letter-spacing: 0.01em;
  box-sizing: border-box;
  overflow-y: auto;
  isolation: isolate;
  --cec-color-bg: #020714;
  --cec-color-surface: rgba(6, 16, 36, 0.94);
  --cec-color-surface-alt: rgba(7, 19, 44, 0.9);
  --cec-color-border: rgba(118, 176, 255, 0.32);
  --cec-color-border-strong: rgba(164, 214, 255, 0.58);
  --cec-color-muted: rgba(226, 236, 255, 0.76);
  --cec-color-highlight: rgba(126, 224, 255, 0.98);
  --cec-color-positive: #7dffca;
  --cec-color-warning: #ffc659;
  --cec-radius-sm: 12px;
  --cec-radius-md: 18px;
  --cec-radius-lg: 24px;
  --cec-spacing-2xs: clamp(6px, 0.55vw, 10px);
  --cec-spacing-xs: clamp(8px, 0.75vw, 14px);
  --cec-spacing-sm: clamp(12px, 1vw, 18px);
  --cec-spacing-md: clamp(16px, 1.4vw, 22px);
  --cec-spacing-lg: clamp(22px, 2vw, 30px);
  --cec-spacing-xl: clamp(28px, 2.6vw, 36px);
  --cec-font-xs: clamp(12px, 0.8vw, 14px);
  --cec-font-sm: clamp(14px, 0.95vw, 16px);
  --cec-font-md: clamp(16px, 1.1vw, 18px);
  --cec-font-lg: clamp(18px, 1.4vw, 22px);
  --cec-font-xl: clamp(22px, 1.8vw, 26px);
  --cec-shadow-soft: 0 18px 44px rgba(2, 8, 24, 0.58);
  --cec-shadow-strong: 0 32px 68px rgba(3, 12, 38, 0.72);
  --cec-stage-max: clamp(960px, 66vw, 1180px);
  --cec-panel-width: clamp(190px, 14vw, 220px);
  --cec-topbar-height: clamp(44px, 4.5vw, 60px);
  --cec-layout-gap: clamp(32px, 4vw, 56px);
}

.cec-root * {
  box-sizing: border-box;
  font-family: inherit;
}

.cec-topbar-shell {
  width: 100%;
  max-width: calc(var(--cec-stage-max) + var(--cec-panel-width) + var(--cec-layout-gap));
  justify-self: stretch;
  margin: 0 auto;
}

.cec-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 1.8vw, 24px);
  padding: clamp(6px, 0.9vw, 12px) clamp(16px, 2vw, 24px);
  min-height: clamp(36px, 3.6vw, 48px);
  background: none;
  border-radius: var(--cec-radius-lg);
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.cec-topbar__metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2vw, 24px);
  flex: 1 1 auto;
  min-width: 0;
}

.cec-topbar__stats {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 20px);
  flex: 1 1 auto;
  min-width: 0;
}

.cec-scoreboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 auto;
  min-width: 0;
  gap: clamp(12px, 1.6vw, 20px);
  flex-wrap: nowrap;
}

.cec-scoreboard__item {
  display: inline-flex;
  align-items: baseline;
  gap: clamp(6px, 0.9vw, 12px);
  min-width: 0;
  flex: 0 1 auto;
  white-space: nowrap;
}

.cec-scoreboard__item--wide {
  flex: 1 1 auto;
  min-width: 30%;
}

.cec-score-label {
  font-size: clamp(12px, 0.8vw, 14px);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.78);
  flex: 0 0 auto;
}

.cec-score-value {
  font-size: clamp(16px, 1.1vw, 20px);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cec-topbar__meta {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 18px);
  min-width: 0;
  margin-left: clamp(14px, 1.6vw, 24px);
  color: rgba(240, 248, 255, 0.95);
}

.cec-effects {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(6px, 0.9vw, 12px);
  font-size: var(--cec-font-md);
  color: rgba(255, 233, 176, 0.92);
  justify-self: end;
}

.cec-topbar__actions {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.2vw, 18px);
  flex: 0 0 auto;
}

.cec-controls {
  display: inline-flex;
  align-items: center;
  gap: clamp(8px, 1vw, 14px);
}

.cec-controls button {
  appearance: none;
  border: 1px solid rgba(126, 224, 255, 0.5);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: var(--cec-font-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(70, 148, 255, 0.9), rgba(126, 224, 255, 0.9));
  color: #ffffff;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.cec-controls__leave {
  letter-spacing: 0.1em;
  padding-inline: 16px;
}

.cec-controls button:hover,
.cec-controls button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(30, 86, 160, 0.4);
}

.cec-controls__help,
.cec-controls__leave,
.cec-controls__quit {
  white-space: nowrap;
}


.cec-main {
  width: min(100%, calc(var(--cec-stage-max) + var(--cec-panel-width) + var(--cec-layout-gap)));
  display: grid;
  grid-template-columns: minmax(0, var(--cec-stage-max)) minmax(0, var(--cec-panel-width));
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "location panel"
    "stage panel";
  column-gap: var(--cec-layout-gap);
  row-gap: clamp(16px, 2.2vw, 28px);
  align-items: start;
  justify-content: center;
  min-height: 0;
  margin: 0 auto;
}

#casinoArcadeRoot.cec-compact .cec-main {
  grid-template-columns: 1fr;
  grid-template-areas:
    "location"
    "stage"
    "panel";
}

#casinoArcadeRoot.cec-compact .cec-panel {
  width: 100%;
  min-height: auto;
}

#casinoArcadeRoot.cec-compact .cec-stage-shell {
  order: 3;
}

.cec-stage-shell {
  grid-area: stage;
  width: 100%;
  max-width: var(--cec-stage-max);
  min-width: min(var(--cec-stage-max), 100%);
  justify-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 1.2vw, 16px);
  background: none;
  border-radius: var(--cec-radius-lg);
  border: 0;
  box-shadow: none;
}

.cec-stage-stack {
  width: 100%;
  max-width: var(--cec-stage-max);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 22px);
}

.cec-stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  border-radius: var(--cec-radius-lg);
  overflow: hidden;
  background: radial-gradient(circle at 24% 18%, rgba(112, 214, 255, 0.24), transparent 62%),
    radial-gradient(circle at 76% 80%, rgba(255, 154, 235, 0.18), transparent 62%),
    linear-gradient(160deg, #020b1f 0%, #041839 50%, #02122a 100%);
  box-shadow: var(--cec-shadow-strong);
}

.cec-stage-hud {
  width: 100%;
  display: grid;
  gap: clamp(8px, 0.9vw, 12px);
  padding: 0;
  border-radius: var(--cec-radius-lg);
  background: none;
  border: 0;
  box-shadow: none;
  color: #f8fbff;
}

.cec-stage-hud__header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(12px, 1.6vw, 20px);
}

.cec-stage-hud__heading {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.6vw, 8px);
  min-width: 0;
}

.cec-stage-hud__title {
  font-size: clamp(20px, 1.6vw, 26px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
}

.cec-stage-hud__status {
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(194, 235, 255, 0.95);
}

.cec-stage-hud__leave {
  display: none;
}

.cec-stage-hud__meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 1vw, 14px);
  font-size: clamp(13px, 1vw, 16px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(220, 244, 255, 0.88);
}

.cec-stage-hud__message {
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.6;
  color: rgba(248, 252, 255, 0.96);
}

.cec-stage-hud__details {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 1vw, 14px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.cec-stage-hud__detail {
  padding: clamp(4px, 0.6vw, 8px) clamp(10px, 1vw, 16px);
  border-radius: 999px;
  background: rgba(6, 18, 36, 0.55);
  border: 1px solid rgba(132, 202, 255, 0.32);
  font-size: clamp(11px, 0.85vw, 14px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cec-stage-hud__legend {
  font-size: clamp(12px, 0.95vw, 15px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(210, 236, 255, 0.84);
}

.cec-stage-hud__results {
  display: grid;
  gap: clamp(6px, 0.9vw, 12px);
  font-size: clamp(13px, 1vw, 16px);
  color: rgba(255, 255, 255, 0.92);
}

.cec-stage-hud__result {
  margin: 0;
  padding: clamp(4px, 0.6vw, 8px) clamp(10px, 1vw, 16px);
  border-radius: var(--cec-radius-sm);
  background: rgba(10, 26, 54, 0.55);
  border: 1px solid rgba(132, 202, 255, 0.26);
}

.cec-stage.cec-stage--obscured .cec-canvas {
  filter: blur(1.5px) brightness(0.82);
}

.cec-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  position: relative;
  z-index: 1;
}

.cec-panel {
  grid-area: panel;
  width: min(var(--cec-panel-width), 100%);
  align-self: stretch;
  display: grid;
  grid-template-rows: minmax(0, auto) minmax(0, 1fr);
  gap: clamp(10px, 1.3vw, 16px);
  padding: clamp(10px, 1.4vw, 16px);
  background: rgba(8, 20, 46, 0.68);
  border-radius: var(--cec-radius-lg);
  border: 1px solid rgba(142, 202, 255, 0.32);
  box-shadow: var(--cec-shadow-soft);
  min-height: clamp(380px, 58vh, 620px);
  overflow: hidden;
  color: #ffffff;
  --cec-spacing-2xs: clamp(3px, 0.4vw, 7px);
  --cec-spacing-xs: clamp(5px, 0.55vw, 9px);
  --cec-spacing-sm: clamp(8px, 0.75vw, 12px);
  --cec-spacing-md: clamp(12px, 0.9vw, 16px);
  --cec-font-xs: clamp(10px, 0.62vw, 12px);
  --cec-font-sm: clamp(12px, 0.78vw, 14px);
  --cec-font-md: clamp(14px, 0.9vw, 16px);
}

.cec-ui {
  position: static;
  display: grid;
  grid-auto-rows: min-content;
  align-content: start;
  gap: var(--cec-spacing-sm);
  pointer-events: auto;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
  padding-right: clamp(2px, 0.6vw, 8px);
  min-height: 0;
}

.cec-active-wager {
  display: grid;
  gap: var(--cec-spacing-sm);
  padding: var(--cec-spacing-sm) var(--cec-spacing-md);
  border-radius: var(--cec-radius-md);
  background: rgba(10, 26, 58, 0.74);
  border: 1px solid rgba(143, 191, 255, 0.32);
  color: #f6fbff;
  box-shadow: var(--cec-shadow-soft);
}

.cec-active-wager__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--cec-spacing-sm);
}

.cec-active-wager__title {
  font-size: var(--cec-font-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cec-active-wager__status {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(132, 202, 255, 0.44);
  font-size: var(--cec-font-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(206, 238, 255, 0.9);
}

.cec-active-wager__status[data-state="win"] {
  border-color: rgba(126, 255, 210, 0.7);
  color: #9fffd5;
}

.cec-active-wager__status[data-state="loss"] {
  border-color: rgba(255, 147, 147, 0.6);
  color: #ffc1c1;
}

.cec-active-wager__status[data-state="push"] {
  border-color: rgba(255, 236, 148, 0.6);
  color: #ffeaa3;
}

.cec-active-wager__meta {
  font-size: clamp(12px, 0.95vw, 15px);
  color: rgba(218, 236, 255, 0.86);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cec-active-wager__legs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(4px, 0.7vw, 10px);
}

.cec-active-wager__leg {
  padding: clamp(6px, 0.8vw, 10px) clamp(10px, 1vw, 16px);
  border-radius: var(--cec-radius-sm);
  background: rgba(12, 32, 66, 0.72);
  border: 1px solid rgba(132, 202, 255, 0.26);
  font-size: clamp(11px, 0.85vw, 14px);
  color: rgba(246, 251, 255, 0.94);
}

.cec-location {
  grid-area: location;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  width: 100%;
  max-width: var(--cec-stage-max);
  margin: clamp(4px, 0.8vw, 10px) 0 0;
  padding: 0;
  min-height: 0;
  justify-self: start;
}

.cec-venue-indicator {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--cec-spacing-2xs);
  padding: clamp(8px, 0.9vw, 12px) clamp(14px, 1.6vw, 20px);
  width: min(100%, clamp(240px, 30vw, 320px));
  border-radius: var(--cec-radius-md);
  background: rgba(6, 18, 36, 0.56);
  border: 1px solid rgba(150, 214, 255, 0.32);
  box-shadow: none;
  font-size: var(--cec-font-xs);
  color: #ffffff;
  text-align: left;
}

.cec-venue-indicator__name {
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: var(--cec-font-sm);
}

.cec-venue-indicator__flair {
  font-size: var(--cec-font-xs);
  color: rgba(255, 255, 255, 0.9);
  max-width: 100%;
}

.cec-history {
  display: flex;
  flex-direction: column;
  gap: var(--cec-spacing-sm);
  padding: var(--cec-spacing-sm) var(--cec-spacing-md);
  background: rgba(8, 22, 50, 0.6);
  border-radius: var(--cec-radius-md);
  border: 1px solid rgba(150, 214, 255, 0.28);
  box-shadow: none;
  min-height: 0;
  max-height: clamp(200px, 36vh, 300px);
}

.cec-history__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--cec-spacing-xs);
}

.cec-history__title {
  margin: 0;
  font-size: var(--cec-font-sm);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cec-history__empty {
  margin: 0;
  font-size: var(--cec-font-xs);
  color: rgba(255, 255, 255, 0.9);
}

.cec-history__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(3px, 0.45vw, 6px);
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: 100%;
  min-height: 0;
  scrollbar-gutter: stable;
  padding-right: 2px;
}

.cec-history__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: clamp(4px, 0.55vw, 7px) clamp(8px, 0.75vw, 12px);
  background: rgba(8, 24, 58, 0.7);
  border-radius: var(--cec-radius-sm);
  border: 1px solid rgba(164, 214, 255, 0.34);
  box-shadow: none;
}

.cec-history__item[data-tone="T"] {
  border-color: rgba(164, 214, 255, 0.6);
}

.cec-history__item[data-tone="B"] {
  border-color: rgba(255, 214, 164, 0.6);
}

.cec-history__item[data-tone="F"] {
  border-color: rgba(142, 234, 255, 0.4);
}

.cec-history__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--cec-spacing-2xs);
  font-size: var(--cec-font-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

.cec-history__divider {
  opacity: 0.55;
}

.cec-history__tone {
  color: rgba(142, 234, 255, 0.86);
}

.cec-history__text {
  margin: 0;
  font-size: var(--cec-font-sm);
  color: #ffffff;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: var(--cec-spacing-2xs);
}

.cec-history__icon {
  font-size: var(--cec-font-sm);
}

.cec-toast {
  position: static;
  align-self: stretch;
  margin: 0;
  padding: var(--cec-spacing-2xs) var(--cec-spacing-sm);
  border-radius: 999px;
  background: rgba(16, 38, 88, 0.76);
  border: 1px solid rgba(126, 224, 255, 0.4);
  color: #ffffff;
  font-size: var(--cec-font-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.cec-toast--active {
  opacity: 1;
  transform: translateY(0);
}

.cec-balloons {
  display: flex;
  flex-direction: column;
  gap: var(--cec-spacing-2xs);
}

.cec-balloon {
  align-self: flex-start;
  padding: var(--cec-spacing-2xs) var(--cec-spacing-sm);
  border-radius: var(--cec-radius-sm);
  background: rgba(12, 28, 58, 0.88);
  border: 1px solid rgba(143, 191, 255, 0.3);
  font-size: var(--cec-font-xs);
  color: rgba(126, 224, 255, 0.96);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.cec-balloon--visible {
  opacity: 1;
  transform: translateY(0);
}

.cec-balloon--hide {
  opacity: 0;
  transform: translateY(-6px);
}

.cec-dialogue {
  position: static;
  width: 100%;
  padding: var(--cec-spacing-sm) var(--cec-spacing-md);
  border-radius: var(--cec-radius-md);
  background: rgba(10, 26, 58, 0.94);
  border: 1px solid rgba(143, 191, 255, 0.34);
  font-size: var(--cec-font-sm);
  color: #ffffff;
}

.cec-convo-stack {
  display: grid;
  gap: var(--cec-spacing-sm);
  position: sticky;
  top: 0;
  z-index: 2;
}

.cec-convo-stack[hidden] {
  display: none !important;
}

.cec-hud {
  position: static;
  width: 100%;
  display: grid;
  gap: var(--cec-spacing-2xs);
  padding: var(--cec-spacing-sm) var(--cec-spacing-md);
  border-radius: var(--cec-radius-md);
  background: rgba(12, 28, 58, 0.92);
  border: 1px solid rgba(143, 191, 255, 0.32);
  color: #ffffff;
}

.cec-hud__title {
  font-size: var(--cec-font-md);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.cec-hud__meta {
  font-size: var(--cec-font-xs);
  color: rgba(240, 248, 255, 0.86);
  letter-spacing: 0.08em;
}

.cec-convo {
  position: static;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--cec-spacing-sm);
  padding: var(--cec-spacing-md);
  border-radius: var(--cec-radius-md);
  background: rgba(12, 28, 58, 0.92);
  border: 1px solid rgba(143, 191, 255, 0.34);
  color: #ffffff;
}

.cec-convo-img {
  grid-row: 1 / span 3;
  width: clamp(70px, 8vw, 96px);
  height: clamp(70px, 8vw, 96px);
  object-fit: cover;
  border-radius: var(--cec-radius-sm);
  border: 1px solid rgba(143, 191, 255, 0.45);
  box-shadow: 0 12px 30px rgba(2, 8, 24, 0.6);
}

.cec-convo-head {
  display: flex;
  flex-direction: column;
  gap: var(--cec-spacing-2xs);
}

.cec-convo-name {
  font-size: var(--cec-font-md);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cec-convo-actions {
  display: flex;
  flex-direction: column;
  gap: var(--cec-spacing-2xs);
}

.cec-convo-actions button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--cec-spacing-xs);
  padding: var(--cec-spacing-2xs) var(--cec-spacing-sm);
  border-radius: var(--cec-radius-sm);
  border: 1px solid rgba(143, 191, 255, 0.45);
  background: linear-gradient(135deg, rgba(49, 118, 255, 0.95), rgba(84, 216, 255, 0.95));
  color: #ffffff;
  font-size: var(--cec-font-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.cec-convo-actions button:hover,
.cec-convo-actions button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(38, 108, 220, 0.5);
}

.cec-convo-mood {
  font-size: var(--cec-font-xs);
  color: rgba(240, 248, 255, 0.86);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cec-hint {
  display: block;
  padding: var(--cec-spacing-sm) var(--cec-spacing-md);
  border-radius: var(--cec-radius-sm);
  background: rgba(12, 28, 58, 0.9);
  border: 1px solid rgba(143, 191, 255, 0.32);
  font-size: var(--cec-font-xs);
  color: rgba(240, 248, 255, 0.86);
}

.cec-hint[hidden] {
  display: none !important;
}

.cec-overlay-menu .cec-menu-actions,
.cec-overlay-menu .cec-bet-form__actions,
.cec-overlay-menu .cec-sportsbook-actions {
  margin-top: auto;
}

.cec-overlay-menu .cec-menu-actions button,
.cec-overlay-menu .cec-bet-form__button,
.cec-overlay-menu .cec-sportsbook-actions button {
  width: 100%;
}

.cec-convo-actions button:focus-visible,
.cec-overlay-menu button:focus-visible {
  outline: 2px solid rgba(126, 224, 255, 0.9);
  outline-offset: 2px;
}

@media (max-width: 1200px) {
  .cec-main {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(var(--cec-spacing-lg), 4vw, var(--cec-spacing-xl));
  }
  .cec-stage-shell {
    min-width: clamp(480px, 60vw, var(--cec-stage-max));
  }
  .cec-panel {
    width: min(360px, 100%);
    justify-self: center;
  }
}
