* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  scroll-behavior: smooth;
  --page: #07080a;
  --surface: #101216;
  --surface-raised: #15181e;
  --line: rgba(255, 255, 255, 0.09);
  --muted: #979da8;
  --blue: #2979ff;
  --blue-bright: #60a5fa;
}

body {
  background: var(--page);
  color: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

/* Landing page */
.landing-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 9%, rgba(37, 99, 235, 0.16), transparent 28rem),
    radial-gradient(circle at 4% 42%, rgba(30, 64, 175, 0.08), transparent 25rem),
    var(--page);
}

.landing-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.32;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: #050505;
  font-size: 0.85rem;
  font-weight: 750;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.landing-nav {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(147, 197, 253, 0.32);
  border-radius: 12px;
  background: linear-gradient(145deg, #2563eb, #0f172a);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.23);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1;
}

.brand-copy strong {
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-by {
  font-family: "Caveat", cursive;
  font-size: 1.16rem;
  font-weight: 600;
  color: #a7acb5;
  white-space: nowrap;
}

.landing-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.landing-links a {
  color: #aeb4bf;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.landing-links a:hover {
  color: #fff;
}

.landing-links .nav-discord {
  padding: 10px 16px;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.1);
}

.landing-links .nav-discord:hover {
  border-color: rgba(147, 197, 253, 0.7);
  background: rgba(37, 99, 235, 0.2);
}

.landing-shell main {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.landing-hero {
  min-height: calc(100vh - 88px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  align-items: center;
  gap: clamp(48px, 7vw, 104px);
  padding: 72px 0 92px;
}

.hero-copy {
  padding-bottom: 12px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #91a4c3;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow > span,
.live-label > span {
  width: 22px;
  height: 1px;
  background: var(--blue-bright);
}

.hero-copy h1 {
  margin: 26px 0 28px;
  max-width: 760px;
  font-size: clamp(4rem, 7.5vw, 7rem);
  font-weight: 780;
  letter-spacing: -0.068em;
  line-height: 0.89;
}

.hero-copy h1 em {
  color: #70a7ff;
  font-style: normal;
}

.hero-intro {
  max-width: 630px;
  color: #aeb4bf;
  font-size: clamp(1rem, 1.5vw, 1.17rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.hero-actions a,
.discord-banner > a {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border-radius: 13px;
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.hero-actions a:hover,
.discord-banner > a:hover {
  transform: translateY(-2px);
}

.hero-actions svg,
.discord-banner > a svg {
  width: 17px;
  height: 17px;
}

.hero-primary {
  background: #f8fafc;
  color: #09090b;
}

.hero-primary:hover {
  background: #dbeafe;
}

.hero-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: #f8fafc;
}

.hero-secondary:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 28px;
  color: #858b96;
  font-size: 0.76rem;
  list-style: none;
}

.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-list svg {
  width: 13px;
  height: 13px;
  color: #60a5fa;
}

.queue-entry-panel {
  position: relative;
  min-width: 0;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(22, 26, 33, 0.96), rgba(11, 13, 17, 0.98));
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.44), inset 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.panel-glow {
  position: absolute;
  top: -130px;
  right: -120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.16);
  filter: blur(55px);
  pointer-events: none;
}

.panel-heading {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  margin-bottom: 28px;
}

.live-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  color: #8eb8ff;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.live-label > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(96, 165, 250, 0.1);
  animation: live-pulse 2.4s ease infinite;
}

.panel-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  letter-spacing: -0.045em;
}

.panel-heading p {
  max-width: 340px;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.55;
}

.panel-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.12);
  color: #93c5fd;
}

.panel-icon svg {
  width: 20px;
}

.field-group label,
.queue-entry-panel label {
  display: block;
  margin-bottom: 7px;
  color: #aeb4bf;
  font-size: 0.74rem;
  font-weight: 700;
}

.queue-entry-panel input {
  width: 100%;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  outline: none;
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  font-size: 0.92rem;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.queue-entry-panel input::placeholder {
  color: #626976;
}

.queue-entry-panel input:focus {
  border-color: rgba(96, 165, 250, 0.75);
  background: rgba(37, 99, 235, 0.07);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.queue-entry-panel input.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.2rem;
  font-weight: 760;
  letter-spacing: 0.28em;
  text-align: center;
  text-transform: uppercase;
}

.join-help {
  min-height: 38px;
  margin: 7px 0 13px;
  color: #717784;
  font-size: 0.72rem;
  line-height: 1.45;
  transition: color 180ms ease;
}

.join-help.selected {
  color: #86efac;
  font-weight: 650;
}

.btn {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 16px;
  padding: 11px 16px;
  border: 0;
  border-radius: 11px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 760;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn:hover {
  background: #1d6ff2;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.2);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.err {
  margin-bottom: 15px;
  padding: 9px 12px;
  border: 1px solid rgba(248, 113, 113, 0.22);
  border-radius: 9px;
  background: rgba(127, 29, 29, 0.13);
  color: #fca5a5;
  font-size: 0.76rem;
}

.session-browser {
  min-width: 0;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.session-browser-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.session-browser-heading h3 {
  margin: 0 0 4px;
  font-size: 0.84rem;
}

.session-browser-heading p {
  margin: 0;
  color: #69707c;
  font-size: 0.68rem;
}

.session-refresh {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: #b7bec9;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease;
}

.session-refresh:hover {
  border-color: rgba(96, 165, 250, 0.48);
  color: #fff;
}

.session-refresh svg {
  width: 14px;
  height: 14px;
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 226px;
  overflow-y: auto;
  padding-right: 3px;
}

.session-list::-webkit-scrollbar {
  width: 4px;
}

.session-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #2d333d;
}

.session-list-message {
  padding: 12px 0 4px;
  color: #707783;
  font-size: 0.76rem;
}

.session-card {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  font: inherit;
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.session-card.selectable {
  cursor: pointer;
}

.session-card.selectable:hover {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(37, 99, 235, 0.09);
  transform: translateY(-1px);
}

.session-card.selected {
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px #2563eb;
  animation: selected-session 520ms ease-out;
}

.code-selected {
  animation: code-selected 720ms ease-out;
}

.join-ready {
  animation: join-ready 900ms ease-in-out 2;
}

.session-card-code {
  font: 750 0.88rem ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.1em;
}

.session-card-meta {
  grid-column: 1 / -1;
  color: #6f7682;
  font-size: 0.66rem;
}

.session-state {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.session-state.open { background: rgba(22, 163, 74, 0.17); color: #bbf7d0; }
.session-state.closed-queue { background: rgba(180, 83, 9, 0.17); color: #fde68a; }
.session-state.ended { background: rgba(113, 113, 122, 0.18); color: #a1a1aa; }

.community-section,
.steps-section {
  padding: clamp(96px, 12vw, 160px) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 0.72fr 1.15fr 0.9fr;
  align-items: end;
  gap: 48px;
}

.section-heading h2,
.steps-intro h2,
.discord-copy h2 {
  font-size: clamp(2.55rem, 5.2vw, 5.25rem);
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.section-heading > p {
  color: #999faa;
  font-size: 0.95rem;
  line-height: 1.72;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 64px;
}

.feature-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
}

.feature-card-primary {
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.18), rgba(14, 19, 29, 0.85));
  border-color: rgba(96, 165, 250, 0.21);
}

.feature-number {
  align-self: flex-end;
  color: #5d6571;
  font: 700 0.7rem ui-monospace, monospace;
  letter-spacing: 0.12em;
}

.feature-card > svg {
  width: 30px;
  height: 30px;
  margin-top: 28px;
  color: #6da8ff;
  stroke-width: 1.5;
}

.feature-card h3 {
  margin: auto 0 13px;
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.feature-card p {
  color: #8f96a1;
  font-size: 0.83rem;
  line-height: 1.62;
}

.steps-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(60px, 10vw, 150px);
}

.steps-intro h2 {
  margin-top: 25px;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
}

.steps-list {
  list-style: none;
}

.steps-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 22px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.steps-list li:first-child {
  padding-top: 0;
}

.steps-list > li > span {
  color: #5892eb;
  font: 750 0.72rem ui-monospace, monospace;
}

.steps-list h3 {
  margin-bottom: 8px;
  font-size: 1.06rem;
}

.steps-list p {
  max-width: 500px;
  color: #8d949f;
  font-size: 0.84rem;
  line-height: 1.65;
}

.discord-banner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  margin: 20px 0 120px;
  padding: clamp(34px, 5vw, 68px);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0, rgba(37, 99, 235, 0.23), transparent 36%),
    linear-gradient(135deg, #111722, #0d1016);
  overflow: hidden;
}

.discord-mark {
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 850;
  letter-spacing: -0.08em;
}

.discord-mark span {
  color: #5f9fff;
}

.discord-copy .eyebrow {
  margin-bottom: 18px;
}

.discord-copy h2 {
  max-width: 650px;
  font-size: clamp(2.25rem, 4.5vw, 4.5rem);
}

.discord-copy > p {
  max-width: 620px;
  margin-top: 18px;
  color: #999faa;
  font-size: 0.9rem;
  line-height: 1.65;
}

.discord-banner > a {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #f8fafc;
  color: #09090b;
  white-space: nowrap;
}

.site-footer {
  padding: 5px 12px;
  border-top: 1px solid #111319;
  background: var(--page);
  color: #6e7480;
  font-size: 0.7rem;
  line-height: 1.25;
  text-align: center;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.78); }
}

@keyframes selected-session {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.65); }
  45% { transform: scale(1.02); box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.18); }
  100% { transform: scale(1); box-shadow: 0 0 0 1px #2563eb; }
}

@keyframes code-selected {
  0% { border-color: rgba(255, 255, 255, 0.11); background: rgba(255, 255, 255, 0.045); }
  35% { border-color: #60a5fa; background: #172554; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2); }
  100% { border-color: #3b82f6; background: rgba(255, 255, 255, 0.045); box-shadow: none; }
}

@keyframes join-ready {
  0%, 100% { transform: translateY(0); box-shadow: none; }
  50% { transform: translateY(-2px); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2); }
}

@media (max-width: 1040px) {
  .landing-hero {
    grid-template-columns: 1fr;
    padding-top: 86px;
  }

  .hero-copy {
    max-width: 800px;
  }

  .queue-entry-panel {
    width: min(680px, 100%);
    justify-self: end;
  }

  .section-heading {
    grid-template-columns: 1fr 1.7fr;
  }

  .section-heading > p {
    grid-column: 2;
  }

  .discord-banner {
    grid-template-columns: auto 1fr;
  }

  .discord-banner > a {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .landing-nav,
  .landing-shell main {
    width: min(100% - 32px, 1240px);
  }

  .landing-nav {
    min-height: 76px;
  }

  .landing-links > a:not(.nav-discord) {
    display: none;
  }

  .brand-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .brand-copy strong {
    font-size: 0.73rem;
  }

  .brand-by {
    font-size: 0.98rem;
  }

  .landing-hero {
    min-height: auto;
    gap: 54px;
    padding: 72px 0 100px;
  }

  .hero-copy h1 {
    font-size: clamp(3.55rem, 17vw, 5.8rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions a {
    width: 100%;
  }

  .trust-list {
    gap: 12px 18px;
  }

  .queue-entry-panel {
    padding: 24px;
    border-radius: 22px;
  }

  .community-section,
  .steps-section {
    padding: 92px 0;
  }

  .section-heading,
  .steps-section {
    display: block;
  }

  .section-heading h2,
  .steps-intro h2 {
    margin-top: 22px;
  }

  .section-heading > p {
    margin-top: 28px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    margin-top: 44px;
  }

  .feature-card {
    min-height: 280px;
  }

  .steps-list {
    margin-top: 54px;
  }

  .discord-banner {
    display: block;
    margin-bottom: 80px;
  }

  .discord-mark {
    margin-bottom: 34px;
  }

  .discord-banner > a {
    width: 100%;
    margin-top: 30px;
  }
}

@media (max-width: 430px) {
  .landing-links {
    display: none;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .panel-icon {
    display: none;
  }

  .trust-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Compact participant landing */
.landing-shell {
  height: calc(100svh - 25px);
  min-height: 660px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 18%, rgba(37, 99, 235, 0.1), transparent 28rem),
    #08090b;
}

.landing-shell::before {
  display: none;
}

.landing-nav {
  width: min(1240px, calc(100% - 48px));
  min-height: 108px;
}

.brand-logo {
  width: 94px;
  height: 94px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  filter: none;
}

.brand-copy {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.brand-copy strong {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.brand-by {
  font-size: 1.28rem;
}

.header-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 52px;
  padding: 0 20px;
  border-radius: 12px;
  background: #5865f2;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 750;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.header-discord:hover {
  background: #4752c4;
  color: #fff;
  transform: translateY(-1px);
}

.header-discord img {
  width: 28px;
  height: 21px;
}

.landing-main,
.landing-shell main {
  width: min(1240px, calc(100% - 48px));
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 520px);
  align-items: center;
  gap: clamp(52px, 7vw, 108px);
  margin: 0 auto;
  padding: clamp(28px, 4vh, 52px) 0;
}

.hero-copy {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(34px, 5vh, 54px);
  padding: 0;
}

.hero-context {
  margin-bottom: 18px;
  color: #8ba3ca;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 700px;
  margin: 0;
  color: #f5f7fa;
  font-size: clamp(3.7rem, 5.45vw, 5.55rem);
  font-weight: 720;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero-intro {
  max-width: 620px;
  margin-top: 24px;
  color: #a4aab4;
  font-size: 1.1rem;
  line-height: 1.65;
}

.discord-card {
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: 132px 1fr;
  align-items: center;
  gap: 24px;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.qr-link {
  display: block;
  width: 132px;
  height: 132px;
  padding: 7px;
  border-radius: 10px;
  background: #fff;
}

.qr-link img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.discord-card-copy h2 {
  margin-bottom: 9px;
  color: #f1f3f6;
  font-size: 1.28rem;
  letter-spacing: -0.025em;
}

.discord-card-copy p {
  max-width: 410px;
  color: #8f96a1;
  font-size: 0.94rem;
  line-height: 1.55;
}

.discord-card-copy .discord-invitation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 9px;
  background: #5865f2;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
  transition: background 160ms ease;
}

.discord-card-copy .discord-invitation:hover {
  background: #4752c4;
  color: #fff;
}

.discord-invitation img {
  width: 23px;
  height: 18px;
}

.queue-entry-panel {
  width: 100%;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: #101217;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.panel-heading {
  display: block;
  margin-bottom: 24px;
}

.panel-heading h2 {
  margin-bottom: 8px;
  color: #f4f5f7;
  font-size: 1.78rem;
  letter-spacing: -0.035em;
}

.panel-heading p {
  max-width: none;
  color: #858c97;
  font-size: 1rem;
  line-height: 1.5;
}

.queue-entry-panel .field-group label {
  margin-bottom: 8px;
  font-size: 0.94rem;
}

.form-fields {
  display: grid;
  grid-template-columns: minmax(145px, 0.75fr) minmax(210px, 1.25fr);
  gap: 12px;
}

.queue-entry-panel input {
  height: 46px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #181b21;
  font-size: 1.02rem;
}

.queue-entry-panel input.code {
  font-size: 1.14rem;
  letter-spacing: 0.2em;
}

.join-help {
  min-height: auto;
  margin: 9px 0 15px;
  color: #6f7681;
  font-size: 0.78rem;
}

.btn {
  min-height: 46px;
  margin-top: 0;
  border-radius: 9px;
  background: #2f7df6;
  font-size: 1rem;
}

.session-browser {
  margin-top: 24px;
  padding-top: 20px;
}

.session-browser-heading {
  margin-bottom: 10px;
}

.session-browser-heading h3 {
  font-size: 1.24rem;
}

.session-browser-heading p {
  font-size: 0.9rem;
  line-height: 1.45;
}

.session-list-message {
  font-size: 0.86rem;
}

.session-card-code {
  font-size: 1rem;
}

.session-card-meta {
  font-size: 0.76rem;
}

.session-state {
  font-size: 0.7rem;
}

.session-list {
  max-height: 178px;
}

.session-list-message {
  padding: 11px 0 2px;
}

@media (max-height: 760px) and (min-width: 821px) {
  .landing-shell {
    min-height: 620px;
  }

  .landing-nav {
    min-height: 96px;
  }

  .brand-logo {
    width: 80px;
    height: 80px;
  }

  .landing-main,
  .landing-shell main {
    padding: 22px 0;
  }

  .hero-copy {
    gap: 28px;
  }

  .hero-copy h1 {
    font-size: clamp(3.1rem, 4.8vw, 4.5rem);
  }

  .hero-intro {
    margin-top: 18px;
  }

  .discord-card {
    grid-template-columns: 110px 1fr;
    padding: 14px;
  }

  .qr-link {
    width: 110px;
    height: 110px;
  }

  .queue-entry-panel {
    padding: 24px;
  }

  .panel-heading {
    margin-bottom: 18px;
  }

  .session-browser {
    margin-top: 18px;
    padding-top: 16px;
  }

  .session-list {
    max-height: 126px;
  }
}

@media (max-width: 820px) {
  .landing-shell {
    height: auto;
    min-height: calc(100svh - 25px);
    overflow: visible;
  }

  .landing-main,
  .landing-shell main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 54px 0 68px;
  }

  .hero-copy {
    gap: 34px;
  }

  .hero-copy h1 {
    max-width: 650px;
    font-size: clamp(3.2rem, 11vw, 5.2rem);
  }

  .queue-entry-panel {
    width: min(600px, 100%);
    justify-self: center;
  }
}

@media (max-width: 560px) {
  .landing-nav,
  .landing-main,
  .landing-shell main {
    width: min(100% - 30px, 1240px);
  }

  .landing-nav {
    min-height: 94px;
  }

  .brand-logo {
    width: 76px;
    height: 76px;
  }

  .brand-copy strong {
    max-width: 180px;
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .brand-by {
    font-size: 1.02rem;
  }

  .header-discord {
    width: 52px;
    min-height: 48px;
    padding: 0;
  }

  .header-discord .discord-label {
    display: none;
  }

  .header-discord img {
    width: 25px;
    height: 19px;
  }

  .landing-main,
  .landing-shell main {
    gap: 34px;
    padding: 42px 0 54px;
  }

  .hero-copy h1 {
    font-size: clamp(3rem, 15vw, 4.3rem);
  }

  .hero-intro {
    margin-top: 20px;
    font-size: 1.02rem;
  }

  .discord-card {
    grid-template-columns: 96px 1fr;
    gap: 16px;
    padding: 15px 0;
  }

  .qr-link {
    width: 96px;
    height: 96px;
    padding: 5px;
  }

  .discord-card-copy h2 {
    font-size: 1.12rem;
  }

  .discord-card-copy p {
    font-size: 0.84rem;
  }

  .queue-entry-panel {
    padding: 22px;
    border-radius: 14px;
  }

  .form-fields {
    grid-template-columns: 1fr;
  }

  .join-help {
    margin-top: 10px;
  }
}

/* Status screens */
.center-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.box {
  width: 100%;
  max-width: 340px;
  padding: 28px;
  border: 1px solid #27272a;
  border-radius: 16px;
  background: #111113;
}

.box h1 {
  margin-bottom: 4px;
  font-size: 1.3rem;
  font-weight: 700;
}

.box p {
  margin-bottom: 24px;
  color: #71717a;
  font-size: 0.8rem;
}

.status-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 12px;
}
.status-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}
.status-sub {
  color: #71717a;
  font-size: 0.82rem;
  text-align: center;
}
.pos-num {
  font-size: 4.5rem;
  font-weight: 800;
  text-align: center;
  color: #f4f4f5;
  margin: 10px 0;
}
.action-row {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.btn-ghost {
  flex: 1;
  background: #1c1c1f;
  border: 1px solid #27272a;
  color: #a1a1aa;
  border-radius: 9px;
  padding: 9px;
  font-size: 0.85rem;
  cursor: pointer;
}
.btn-ghost:hover {
  border-color: #3f3f46;
  color: #e4e4e7;
}
.btn-danger-ghost {
  flex: 1;
  background: #450a0a20;
  border: 1px solid #7f1d1d40;
  color: #f87171;
  border-radius: 9px;
  padding: 9px;
  font-size: 0.85rem;
  cursor: pointer;
}
.btn-danger-ghost:hover {
  background: #450a0a40;
}
.session-tag {
  text-align: center;
  color: #52525b;
  font-size: 0.75rem;
  font-family: monospace;
  margin-bottom: 16px;
}

/* ── Queue display ───────────────────────────── */
#queue-view {
  display: none;
  height: 100vh;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #080b10;
}
#queue-view::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(5, 8, 13, 0.34), rgba(5, 8, 13, 0.7)),
    linear-gradient(90deg, rgba(5, 8, 13, 0.52), rgba(5, 8, 13, 0.12) 52%, rgba(5, 8, 13, 0.36)),
    url('/queue-background.webp');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.42;
}
#queue-view > header,
#queue-view > .columns,
#queue-view > .bottom-bar {
  position: relative;
  z-index: 1;
}
#queue-view > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  position: relative;
  background: rgba(7, 10, 15, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
}
.session-manager-warning {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 12px;
  border: 1px solid #92400e;
  border-radius: 9px;
  background: #451a03;
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #a1a1aa;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.ct-team {
  font-family: 'Caveat', cursive;
  font-size: 1.2rem;
  text-transform: none;
  letter-spacing: normal;
  color: #a1a1aa;
  font-weight: 600;
  margin-left: 8px;
}
.session-code {
  font-family: monospace;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 4px;
  color: #e4e4e7;
  background: #1c1c1f;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 90px;
  text-align: center;
}
.session-code:hover {
  background: #27272a;
}

.recess-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recess-box {
  background: #111113;
  border: 1px solid #27272a;
  border-radius: 12px;
  padding: 24px;
  width: 320px;
  text-align: center;
  box-shadow: 0 8px 32px #00000080;
}

.recess-count {
  font-family: monospace;
  font-size: 3rem;
  font-weight: 800;
  margin: 16px 0;
  color: #f4f4f5;
}

.columns {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1.25fr;
  flex: 1;
  overflow: hidden;
}
.col {
  border-right: 1px solid #1a1a1d;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px;
}
.col:last-child {
  border-right: none;
}
.col-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: clamp(1rem, 1.65vw, 1.65rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #f4f4f5;
  margin-bottom: 18px;
  padding: 0 0 10px;
  border: 0;
  border-radius: 0;
  background: none;
  text-shadow: 0 2px 8px #000;
}
.current-heading {
  align-items: center;
}
.heading-dot {
  color: #f4f4f5;
  font-size: 0.62em;
  line-height: 1;
}
.current-part-label {
  color: #f4f4f5;
  font-size: 0.58em;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.current-next-section {
  min-height: 116px;
  margin-top: 20px;
}
.nested-col-label {
  margin-bottom: 8px;
  padding-bottom: 5px;
  font-size: clamp(0.95rem, 1.3vw, 1.3rem);
}
.be-ready {
  font-size: 0.85em;
  font-weight: inherit;
  text-transform: uppercase;
  letter-spacing: inherit;
  color: #60a5fa;
  margin-left: 0;
}

#queue-view #wv-current {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  background: rgba(7, 10, 15, 0.54);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

#queue-view #wv-my-name,
#queue-view .session-code {
  background: rgba(15, 18, 24, 0.68) !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.speaker-name {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.1;
  color: #f4f4f5;
  word-break: break-all;
}
.current-speaker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.current-speaker-row .speaker-name {
  min-width: 0;
}
.entry-sequence {
  width: 22px;
  flex: 0 0 22px;
  color: #71717a;
  font-family: monospace;
  font-size: 0.9rem;
  text-align: right;
}
.speaker-since {
  color: #52525b;
  font-size: 1rem;
  margin-top: 6px;
  font-family: monospace;
}
.no-speaker {
  color: #3f3f46;
  font-size: 1.5rem;
  margin-top: 8px;
}
.elapsed {
  font-size: 2rem;
  font-weight: 700;
  font-family: monospace;
  margin-top: 16px;
  color: #34d399;
}
.elapsed.yellow {
  color: #fbbf24;
}
.elapsed.red {
  color: #f87171;
}

@keyframes pulse-next {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

.next-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 9px;
  background: rgba(7, 10, 15, 0.56);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.pulse-alert {
  animation: pulse-next 2s infinite ease-in-out;
}
.next-slot:last-child {
  border-bottom: none;
}
.next-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.next-num.first {
  background: #1d4ed8;
  color: #fff;
}
.next-num.second {
  background: #27272a;
  color: #71717a;
}
.next-username {
  font-weight: 600;
  font-size: 1.1rem;
  color: #e4e4e7;
}
.next-empty {
  color: #3f3f46;
  font-size: 1.5rem;
  padding: 8px 0;
}

.queue-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.queue-scroll::-webkit-scrollbar {
  width: 4px;
}
.queue-scroll::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 2px;
}
.queue-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.09);
  background: rgba(7, 10, 15, 0.52);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.queue-entry.mine {
  background: #1e3a8a15;
  border: 1px solid #1e40af30;
}
.q-pos {
  color: #52525b;
  font-family: monospace;
  font-size: 1rem;
  width: 20px;
  text-align: right;
  flex-shrink: 0;
}
.q-name {
  flex: 1;
  font-size: 0.95rem;
  color: #d4d4d8;
  font-weight: 500;
}
.q-name.mine {
  color: #93c5fd;
}
.my-btns {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.my-btn {
  background: #1c1c1f;
  border: 1px solid #27272a;
  color: #a1a1aa;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.72rem;
  cursor: pointer;
}
.my-btn:hover {
  border-color: #3f3f46;
  color: #e4e4e7;
}
.my-btn-leave {
  background: #450a0a20;
  border: 1px solid #7f1d1d40;
  color: #f87171;
}
.my-btn-leave:hover {
  background: #450a0a40;
}
.recess-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 400;
}

.done-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.09);
  background: rgba(7, 10, 15, 0.52);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
}
.done-row:hover {
  background: #1c1c1f;
}
.done-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.done-check.skipped {
  background: #71717a;
}
.done-row-name {
  font-size: 1rem;
  font-weight: 600;
  color: #e4e4e7;
  flex: 1;
}

#queue-view .completed-col {
  display: grid;
  grid-template-rows: minmax(0, 3fr) minmax(0, 1fr);
  padding: 0;
}
.completed-section {
  min-height: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.completed-main-section {
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
#queue-view .completed-section .col-label {
  margin-bottom: 10px;
}
#queue-view .pending-turn-heading {
  font-size: clamp(0.9rem, 1.25vw, 1.25rem);
}
.pending-turn-empty {
  padding: 8px 0;
  margin: 0;
  font-size: 0.95rem;
}
#wv-done-content::-webkit-scrollbar,
#wv-pending-turn-content::-webkit-scrollbar {
  width: 5px;
}
#wv-done-content::-webkit-scrollbar-thumb,
#wv-pending-turn-content::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border-radius: 999px;
}
#wv-done-count::before,
#wv-pending-turn-count::before {
  content: "·";
  color: #a1a1aa;
  margin-right: 0.2em;
}

.bottom-bar {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 10, 15, 0.74);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  backdrop-filter: blur(16px) saturate(120%);
}
.my-status {
  font-size: 1.2rem;
  color: #a1a1aa;
}
.my-status strong {
  color: #f4f4f5;
  font-size: 1.3rem;
}
.bottom-btns {
  display: flex;
  gap: 6px;
}
.b-btn {
  background: #1c1c1f;
  border: 1px solid #27272a;
  color: #a1a1aa;
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}
.b-btn:hover {
  border-color: #3f3f46;
  color: #e4e4e7;
}
.b-btn-leave {
  background: #450a0a20;
  border: 1px solid #7f1d1d40;
  color: #f87171;
}
.b-btn-leave:hover {
  background: #450a0a40;
}

/* Keep dialog content above its own blurred backdrop. */
.recess-modal { isolation: isolate; padding: 16px; }
.recess-modal > .recess-backdrop { position: absolute; z-index: 0; }
.recess-modal > .recess-box { position: relative; z-index: 1; max-width: 100%; max-height: calc(100dvh - 32px); overflow-y: auto; }
#queue-view .columns { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(260px, 1.25fr); }
@media (max-width: 1100px) {
  #queue-view .columns { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow-y: auto; }
  #queue-view .col { min-height: 200px; }
  #queue-view .completed-col { min-height: 500px; overflow: hidden; padding: 0; }
  #queue-view .completed-section { padding: 16px; }
  #queue-view .col-label { font-size: 1.35rem; }
}
@media (max-width: 600px) {
  #queue-view .columns { grid-template-columns: minmax(0, 1fr); }
  #queue-view .current-part-label { font-size: 0.68em; }
}
