:root {
  --bg: #09111f;
  --bg-deep: #050914;
  --surface: rgba(12, 19, 35, 0.82);
  --surface-strong: #111b31;
  --ink: #edf1ff;
  --muted: #a6b0c9;
  --accent: #7ea2ff;
  --accent-dark: #9adfca;
  --accent-soft: #18274a;
  --line: rgba(154, 223, 202, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --game-surface: #121624;
  --game-strong: #6d7cff;
  --game-soft: #1a2240;
  --game-accent: #9ee7d7;
  --game-ink: #edf0ff;
  --game-line: rgba(158, 231, 215, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 15%, rgba(126, 162, 255, 0.16), transparent 18%),
    radial-gradient(circle at 84% 12%, rgba(154, 223, 202, 0.12), transparent 20%),
    radial-gradient(circle at 60% 80%, rgba(109, 124, 255, 0.14), transparent 22%),
    linear-gradient(180deg, #0b1220, #060a12 70%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.4) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 28%, rgba(255, 255, 255, 0.25) 0 1px, transparent 2px),
    radial-gradient(circle at 30% 72%, rgba(255, 255, 255, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 64%, rgba(255, 255, 255, 0.22) 0 1px, transparent 2px);
  opacity: 0.75;
}

.page-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 56px;
}

.topbar,
.hero-actions,
.brand,
.studio-head,
.board-header,
.share-box,
.goose-actions {
  display: flex;
  align-items: center;
}

.topbar,
.studio-head,
.board-header {
  justify-content: space-between;
}

.topbar {
  padding: 24px 0 18px;
}

.brand {
  gap: 14px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #4b5cff, #7fd8c0);
  box-shadow: var(--shadow);
}

.brand-kicker,
.brand-name,
.ghost-link,
label,
input,
textarea,
select,
button {
  font: inherit;
}

.brand-kicker {
  margin: 0 0 3px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-dark);
  font-weight: 800;
}

.brand-name {
  font-weight: 800;
}

.ghost-link {
  color: var(--ink);
  text-decoration: none;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 27, 49, 0.72);
  backdrop-filter: blur(12px);
}

.hero {
  padding-bottom: 44px;
}

.hero-grid,
.feature-strip,
.creator-layout,
.play-layout,
.summary-grid,
.report-grid {
  display: grid;
}

.hero-grid {
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px;
  align-items: center;
  min-height: 72vh;
}

.eyebrow,
.feature-kicker,
.card-label,
.summary-label,
.board-cell-type {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 800;
}

.eyebrow,
.feature-kicker,
.card-label,
.summary-label,
.board-cell-type {
  color: var(--accent-dark);
}

.hero-copy h1,
.section-heading h2,
.hero-card h2,
.studio-head h3,
.quiz-dialog h3 {
  font-family: "Fraunces", serif;
  line-height: 0.96;
}

.hero-copy h1 {
  margin: 10px 0 18px;
  font-size: clamp(3.2rem, 8vw, 6rem);
  max-width: 10.5ch;
}

.hero-text,
.section-heading p,
.card-copy,
.panel-note,
.goose-status,
.board-caption,
.empty-state,
.quiz-copy {
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  gap: 14px;
  margin: 28px 0 24px;
}

.primary-button,
.secondary-button,
.quiz-choice,
.quiz-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button,
.secondary-button {
  text-decoration: none;
  padding: 14px 22px;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #5872ff, #6ed5bb);
  box-shadow: 0 16px 36px rgba(88, 114, 255, 0.28);
}

.secondary-button {
  color: var(--ink);
  background: rgba(17, 27, 49, 0.78);
  border: 1px solid var(--line);
}

.primary-button:hover,
.secondary-button:hover,
.quiz-choice:hover,
.quiz-close:hover {
  transform: translateY(-2px);
}

.hero-points,
.insight-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.hero-points li::before,
.insight-card li::before {
  content: "+";
  margin-right: 10px;
  color: var(--accent-dark);
  font-weight: 800;
}

.hero-card,
.creator-form,
.insight-card,
.studio-card,
.panel-card,
.feature-strip article,
.quiz-dialog {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  padding: 24px;
  border-radius: 34px;
  overflow: hidden;
  min-height: 470px;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(126, 162, 255, 0.24), transparent 70%);
}

.floating-tag,
.status-pill,
.board-badge,
.turn-pill,
.preview-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.floating-tag {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  width: fit-content;
}

.hero-card-inner {
  margin-top: 20px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(26, 34, 64, 0.9), rgba(12, 19, 35, 0.96));
  padding: 24px;
}

.hero-card h2 {
  font-size: 2.6rem;
  margin: 12px 0;
}

.hero-preview-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
}

.preview-pill {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
}

.mini-track {
  display: grid;
  gap: 10px;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(237, 241, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: 76%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5872ff, #6ed5bb);
}

.feature-strip {
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 72px;
}

.feature-strip article,
.creator-form,
.insight-card,
.studio-card,
.panel-card,
.quiz-dialog {
  border-radius: 28px;
}

.feature-strip article {
  padding: 22px;
}

.creator-section,
.preview-section {
  padding: 34px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin: 8px 0 16px;
}

.creator-layout,
.play-layout {
  gap: 20px;
  align-items: start;
}

.creator-layout {
  grid-template-columns: 1fr 320px;
}

.play-layout {
  grid-template-columns: 1.08fr 340px;
}

.creator-form,
.join-form {
  display: grid;
  gap: 16px;
}

.creator-form {
  padding: 24px;
}

.creator-form label,
.join-form label,
.share-field {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.creator-form input,
.creator-form select,
.creator-form textarea,
.join-form input,
.share-field input {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(7, 11, 21, 0.9);
  padding: 14px 16px;
  color: var(--ink);
}

.creator-form input:focus,
.creator-form select:focus,
.creator-form textarea:focus,
.join-form input:focus {
  outline: 2px solid rgba(110, 213, 187, 0.18);
  border-color: rgba(110, 213, 187, 0.36);
}

.full-width {
  width: 100%;
}

.insight-panel,
.control-column,
.goose-actions,
.player-list,
.quiz-choices {
  display: grid;
  gap: 16px;
}

.insight-card,
.studio-card,
.panel-card {
  padding: 24px;
}

.insight-card.soft,
.panel-card.soft {
  background: linear-gradient(180deg, rgba(18, 29, 52, 0.95), rgba(10, 17, 31, 0.95));
}

.studio-head h3 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.status-pill {
  padding: 10px 14px;
  background: rgba(126, 162, 255, 0.12);
  color: var(--accent-dark);
}

.summary-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 24px 0;
}

.summary-tile {
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.share-box {
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
}

.share-field {
  flex: 1;
}

.board-shell {
  position: relative;
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(14, 19, 38, 0.95), rgba(9, 13, 25, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.board-badge,
.turn-pill {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--game-ink);
}

.board-scene {
  position: relative;
  margin-top: 18px;
  padding: 28px;
  border-radius: 30px;
  overflow: hidden;
  min-height: 820px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.board-scene::before,
.board-scene::after {
  position: absolute;
  pointer-events: none;
}

.board-scene::before {
  content: "";
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 10, 20, 0.08), rgba(7, 10, 20, 0.24) 35%, rgba(7, 10, 20, 0.56)),
    radial-gradient(circle at 20% 16%, rgba(255, 255, 255, 0.10), transparent 14%),
    radial-gradient(circle at 82% 14%, rgba(255, 255, 255, 0.08), transparent 14%);
}

.board-scene::after {
  content: attr(data-mascot) "  " attr(data-mascot);
  top: 12px;
  right: 22px;
  font-size: 2rem;
  opacity: 0.16;
  letter-spacing: 0.3em;
}

.board-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: visible;
}

.board-links path {
  fill: none;
  stroke: rgba(236, 244, 255, 0.72);
  stroke-width: 34;
  stroke-linecap: round;
  stroke-dasharray: 1 0;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.30));
}

.generated-board {
  position: relative;
  z-index: 2;
  margin: 0 auto;
}

.board-cell {
  position: relative;
  width: 132px;
  height: 132px;
  padding: 10px;
  border-radius: 40px;
  border: 4px solid rgba(255, 255, 255, 0.18);
  background-color: rgba(255, 255, 255, 0.04);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 28px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  position: absolute;
  transform: rotate(calc((var(--cell-tilt, 0)) * 1deg));
}

.board-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 10, 19, 0.12), rgba(5, 10, 19, 0.56));
}

.board-cell.start::after,
.board-cell.finish::after,
.board-cell.boost::after,
.board-cell.trap::after {
  content: "";
  position: absolute;
  inset: auto auto 14px 14px;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
}

.board-cell.quiz-target {
  box-shadow: 0 0 0 6px rgba(158, 231, 215, 0.42), 0 18px 28px rgba(0, 0, 0, 0.26);
}

.board-cell:nth-child(odd) {
  --cell-tilt: -1;
}

.board-cell:nth-child(even) {
  --cell-tilt: 1;
}

.board-cell-top,
.player-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.board-cell-top,
.board-cell-label,
.token-row,
.board-cell-visual {
  position: relative;
  z-index: 2;
}

.board-cell-number {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  color: #09111f;
  font-weight: 800;
}

.board-cell-label {
  padding: 8px 10px;
  border-radius: 18px;
  background: rgba(7, 10, 20, 0.58);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}

.board-cell-visual {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cell-character {
  font-size: 2.2rem;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  opacity: 0.96;
}

.token-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.player-token {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.86);
  color: #09111f;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.panel-note {
  margin-bottom: 0;
}

.dice-value {
  width: 94px;
  height: 94px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
  font-size: 2.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(88, 114, 255, 0.18), rgba(110, 213, 187, 0.2));
}

.goose-status {
  min-height: 76px;
}

.report-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.report-grid article {
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 8px;
}

.report-grid strong,
.summary-tile strong,
.player-card strong {
  font-size: 1.02rem;
}

.player-card {
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.player-card.active {
  border-color: rgba(126, 162, 255, 0.42);
  box-shadow: 0 12px 28px rgba(126, 162, 255, 0.14);
}

.player-card.mine {
  background: linear-gradient(180deg, rgba(126, 162, 255, 0.08), rgba(110, 213, 187, 0.08));
}

.player-card p,
.empty-state {
  margin: 4px 0 0;
}

.quiz-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.quiz-modal.hidden {
  display: none;
}

.quiz-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.74);
  backdrop-filter: blur(4px);
}

.quiz-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100% - 24px));
  margin: 8vh auto 0;
  padding: 24px;
}

.quiz-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
}

.quiz-dialog h3 {
  margin: 8px 0 12px;
  font-size: 2rem;
}

.quiz-choice {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.quiz-choice:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.quiz-feedback {
  min-height: 28px;
  margin: 4px 0 0;
  color: var(--accent-dark);
  font-weight: 700;
}

.play-mode .preview-section {
  padding-top: 22px;
}

@media (max-width: 980px) {
  .hero-grid,
  .feature-strip,
  .creator-layout,
  .play-layout,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 12ch;
  }

  .hero-card {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 100%);
  }

  .ghost-link {
    display: none;
  }

  .topbar {
    padding-top: 18px;
  }

  .hero-actions,
  .share-box {
    flex-direction: column;
    align-items: stretch;
  }

  .generated-board {
    transform: scale(0.78);
    transform-origin: top center;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }

  .board-scene {
    padding: 16px;
  }

  .hero-card,
  .creator-form,
  .insight-card,
  .studio-card,
  .panel-card,
  .feature-strip article,
  .quiz-dialog {
    border-radius: 24px;
  }
}
