:root {
  --midnight: #12348f;
  --royal: #6346c9;
  --violet: #8464e8;
  --ice: #eaf9ff;
  --frost: #c7f4ff;
  --teal: #18aeb8;
  --mint: #6ee3d4;
  --ink: #14245e;
  --soft-ink: #52617f;
  --snow: #ffffff;
  --blush: #ff7bb4;
  --gold: #f6b73c;
  --shadow: 0 18px 50px rgba(37, 59, 143, 0.18);
  --soft-shadow: 0 10px 28px rgba(47, 100, 156, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-y: scroll;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
  background:
    linear-gradient(180deg, #f8fdff 0%, #eaf8ff 45%, #fdfcff 100%),
    repeating-linear-gradient(135deg, transparent 0 38px, rgba(255, 255, 255, 0.4) 39px 40px);
  min-width: 320px;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.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;
}

.snow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.96) 0 2px, transparent 2px),
    radial-gradient(circle, rgba(104, 190, 228, 0.42) 0 1px, transparent 1px);
  background-size: 88px 88px, 52px 52px;
  background-position: 12px 24px, 6px 10px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  background: rgba(18, 52, 143, 0.92);
  color: var(--snow);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 22px rgba(13, 39, 106, 0.18);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  color: var(--snow);
  text-decoration: none;
}

.brand-logo {
  width: clamp(14rem, 25vw, 19.25rem);
  height: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.12rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.56rem 0.58rem;
  border-radius: 999px;
  color: var(--snow);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.active {
  color: #0c8994;
  background: var(--snow);
  outline: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.nav-toggle {
  display: none;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin: 3px 0;
  border-radius: 999px;
  background: var(--snow);
}

.hero {
  position: relative;
  height: clamp(42rem, calc(100vh - 4.6rem), 52rem);
  min-height: clamp(42rem, calc(100vh - 4.6rem), 52rem);
  overflow: hidden;
  display: grid;
  place-items: start center;
  isolation: isolate;
  border-bottom: 8px solid rgba(255, 255, 255, 0.8);
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 43%;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, rgba(12, 37, 114, 0.2) 0%, rgba(255, 255, 255, 0.1) 45%, rgba(244, 252, 255, 0.78) 100%);
}

.hero-content {
  width: min(44rem, calc(100% - 2rem));
  margin-top: clamp(1.4rem, 3.2vh, 2.7rem);
  padding: 0.8rem;
  text-align: center;
}

.hero-kicker,
.section-eyebrow {
  margin: 0 0 0.4rem;
  color: var(--teal);
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  line-height: 1;
}

.hero-title {
  width: min(30rem, 100%);
  margin: 0 auto;
  filter: drop-shadow(0 10px 18px rgba(31, 50, 130, 0.2));
}

.hero-copy {
  width: min(35rem, 100%);
  margin: 0.55rem auto 1rem;
  color: #17326e;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.5;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.72rem 1.25rem;
  border: 3px solid var(--snow);
  border-radius: 999px;
  background: linear-gradient(180deg, #8065e6, #5135b6);
  color: var(--snow);
  font-size: 1.12rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 0 rgba(45, 29, 132, 0.3), 0 18px 26px rgba(23, 45, 123, 0.2);
}

.primary-action:hover,
.primary-action:focus-visible,
.secondary-action:hover,
.secondary-action:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.story-band,
.pups-band,
.videos-band,
.gallery-band {
  padding: 1rem 1rem;
}

section[id] {
  scroll-margin-top: 5.6rem;
}

.layout-grid,
.pup-grid,
.video-grid,
.gallery-grid {
  width: min(74rem, 100%);
  margin: 0 auto;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(24rem, 1.2fr);
  gap: 1rem;
  align-items: start;
}

.story-panel,
.game-panel,
.pup-card,
.video-card {
  border: 2px solid rgba(24, 174, 184, 0.24);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
}

.game-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.7rem;
  row-gap: 0.42rem;
}

.game-heading,
.domain-form,
.rules-text,
.round-state,
.round-board,
.game-message,
.attempt-list {
  grid-column: 1 / -1;
}

.game-stats {
  grid-column: 1;
}

.game-actions {
  grid-column: 1 / -1;
}

.game-panel {
  border-radius: 8px;
  padding: 0.82rem;
}

.story-panel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  padding: 0.82rem;
}

.story-panel::after {
  content: "";
  position: absolute;
  right: -1rem;
  bottom: -1.7rem;
  width: 8.5rem;
  height: 8.5rem;
  opacity: 0.34;
  background:
    linear-gradient(135deg, transparent 48%, #4bc5f1 49% 51%, transparent 52%),
    linear-gradient(45deg, transparent 48%, #7459d7 49% 51%, transparent 52%);
  transform: rotate(8deg);
}

h2,
h3 {
  margin: 0;
  color: var(--royal);
  line-height: 1.08;
}

h2 {
  font-size: 1.55rem;
}

h3 {
  font-size: 1.55rem;
}

.story-panel p:not(.section-eyebrow),
.pup-copy p,
.video-card span:last-child,
.rules-text,
.game-message {
  color: var(--soft-ink);
  line-height: 1.35;
}

.story-panel p:not(.section-eyebrow) {
  margin: 0.7rem 0;
  font-size: 0.95rem;
}

.game-heading,
.game-actions,
.game-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.game-heading {
  justify-content: end;
  flex-wrap: wrap;
}

.game-heading > div:first-child {
  flex: 1 1 18rem;
  min-width: 0;
}

.round-timer {
  flex: 0 0 auto;
  min-width: 5.8rem;
  padding: 0.42rem 0.58rem;
  border: 2px solid rgba(24, 174, 184, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(234, 249, 255, 0.96), rgba(255, 255, 255, 0.92));
  color: var(--midnight);
  text-align: center;
  box-shadow: var(--soft-shadow);
}

.round-timer span,
.round-board span {
  display: block;
  color: var(--soft-ink);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.round-timer strong {
  display: block;
  color: var(--teal);
  font-size: 1.55rem;
  line-height: 1;
}

.round-timer.expiring strong {
  color: #b62259;
}

.icon-button {
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: var(--teal);
  color: var(--snow);
  font-weight: 900;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

.rules-text {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px dashed rgba(24, 174, 184, 0.46);
  border-radius: 8px;
  background: rgba(234, 249, 255, 0.78);
}

.domain-form {
  display: grid;
  grid-template-columns: minmax(8rem, 0.48fr) minmax(14rem, 1fr) auto;
  gap: 0.48rem;
  align-items: end;
  margin-top: 0.55rem;
}

.domain-form label {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
}

.domain-form input {
  width: 100%;
  min-height: 2.28rem;
  border: 2px solid rgba(82, 97, 127, 0.18);
  border-radius: 8px;
  padding: 0.45rem 0.68rem;
  color: var(--ink);
  background: var(--snow);
  outline: none;
}

.domain-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(24, 174, 184, 0.12);
}

.submit-button,
.game-actions button {
  min-height: 2.28rem;
  border: 0;
  border-radius: 8px;
  padding: 0.45rem 0.78rem;
  color: var(--snow);
  font-weight: 900;
  background: var(--royal);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.14);
}

.game-actions button:first-child {
  background: var(--teal);
}

.start-lock {
  display: grid;
  grid-template-columns: auto minmax(7rem, 11rem);
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
}

.start-lock input {
  min-height: 2.28rem;
  border: 2px solid rgba(82, 97, 127, 0.18);
  border-radius: 8px;
  padding: 0.45rem 0.68rem;
  color: var(--ink);
  background: var(--snow);
  outline: none;
}

.start-lock input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(24, 174, 184, 0.12);
}

.game-actions button:disabled,
.submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.game-stats {
  align-items: stretch;
  margin-top: 0.55rem;
}

.game-stats div {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.48rem 0.58rem;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(234, 249, 255, 0.94), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(24, 174, 184, 0.18);
  text-align: center;
}

.game-stats span {
  display: block;
  color: var(--soft-ink);
  font-size: 0.68rem;
  font-weight: 900;
}

.game-stats strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--teal);
  font-size: 1.35rem;
  line-height: 1;
}

.round-state {
  margin: 0.5rem 0 0;
  color: var(--midnight);
  font-size: 0.88rem;
  font-weight: 900;
}

.round-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.round-board div {
  min-width: 0;
  padding: 0.48rem 0.58rem;
  border-radius: 8px;
  background: rgba(234, 249, 255, 0.68);
  border: 1px solid rgba(132, 100, 232, 0.18);
}

.round-board strong {
  display: block;
  margin-top: 0.22rem;
  color: var(--midnight);
  font-size: 0.88rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.game-message {
  min-height: 0;
  margin: 0.34rem 0;
  font-size: 0.86rem;
  font-weight: 800;
}

.game-message.success {
  color: #07816d;
}

.game-message.warning {
  color: #9c5a00;
}

.game-message.error {
  color: #b62259;
}

.game-actions {
  justify-content: end;
  align-self: stretch;
  flex-direction: row;
  flex-wrap: wrap;
  margin-top: 0;
}

.attempt-list {
  display: grid;
  gap: 0.24rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  max-height: none;
  overflow: visible;
}

.attempt-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  min-height: 1.45rem;
  padding: 0.24rem 0.45rem;
  font-size: 0.88rem;
  border-radius: 8px;
  background: rgba(241, 251, 255, 0.92);
}

.attempt-list li.current-user {
  background: rgba(110, 227, 212, 0.22);
}

.attempt-list li.out-player {
  background: rgba(255, 235, 240, 0.9);
}

.attempt-list li.out-player .check {
  background: #ffe3ed;
  color: #b62259;
}

.attempt-list li.joined-player .check {
  background: #efeaff;
  color: var(--royal);
}

.attempt-list li.empty-attempt {
  display: block;
  padding: 0.65rem 0.75rem;
  color: var(--soft-ink);
  font-weight: 900;
  text-align: center;
}

.check {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #e6fff8;
  color: #07816d;
  font-weight: 900;
}

.domain-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.player-name {
  color: var(--soft-ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.section-heading {
  width: min(74rem, 100%);
  margin: 0 auto 0.85rem;
  text-align: center;
}

.feature-row {
  width: min(74rem, 100%);
  margin: 0 auto;
  padding: 0 1rem 1.45rem;
  display: grid;
  grid-template-columns: minmax(19rem, 0.72fr) minmax(30rem, 1.28fr);
  gap: 1rem;
}

.pups-band {
  padding: 1rem;
  border: 2px solid rgba(24, 174, 184, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
}

.pup-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.pup-card {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.45fr) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border-radius: 8px;
}

.pup-card img {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.pup-copy {
  align-self: center;
  padding: 0.75rem;
  text-align: left;
}

.pup-copy p:last-child {
  margin: 0.55rem 0 0;
  font-size: 0.83rem;
}

.tag {
  display: inline-flex;
  margin: 0.35rem 0 0.1rem;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  color: var(--snow);
  background: var(--teal);
  font-weight: 900;
}

.boba-card .tag {
  background: #d48924;
}

.omi-card .tag {
  background: #61b7e7;
}

.videos-band {
  padding: 1rem;
  border: 2px solid rgba(132, 100, 232, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(132, 100, 232, 0.12), rgba(255, 255, 255, 0.3)),
    linear-gradient(90deg, rgba(234, 249, 255, 0.78), rgba(255, 255, 255, 0.78));
  text-align: center;
  box-shadow: var(--soft-shadow);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  text-align: left;
}

.video-card {
  display: grid;
  gap: 0.48rem;
  padding: 0.58rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.video-card:hover,
.video-card:focus-visible {
  transform: translateY(-2px);
  outline: none;
  box-shadow: var(--shadow);
}

.thumb-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  background: var(--ice);
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.duration {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  min-width: 2.5rem;
  padding: 0.18rem 0.35rem;
  border-radius: 6px;
  background: rgba(11, 20, 55, 0.88);
  color: var(--snow);
  font-size: 0.75rem;
  font-weight: 900;
  text-align: center;
}

.video-card strong {
  color: var(--midnight);
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.secondary-action {
  margin-top: 0.85rem;
  min-height: 2.55rem;
  font-size: 0.95rem;
}

.gallery-band {
  padding-top: 0;
  padding-bottom: 1.15rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.75rem;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 2px solid rgba(24, 174, 184, 0.24);
  background: var(--snow);
  box-shadow: var(--soft-shadow);
  aspect-ratio: 1 / 1;
}

.gallery-grid figure:first-child {
  grid-row: auto;
  aspect-ratio: 1 / 1;
}

.gallery-thumb {
  width: 100%;
  height: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.gallery-thumb:hover img,
.gallery-thumb:focus-visible img {
  transform: scale(1.04);
}

.gallery-thumb:focus-visible {
  outline: 4px solid rgba(110, 227, 212, 0.82);
  outline-offset: -4px;
}

.gallery-grid img,
.gallery-grid video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-grid img {
  display: block;
  transition: transform 180ms ease;
}

.gallery-grid video {
  display: block;
  background: var(--midnight);
}

.gallery-more {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 0.55rem;
  border: 2px solid rgba(24, 174, 184, 0.28);
  border-radius: 8px;
  color: var(--snow);
  background: linear-gradient(180deg, rgba(110, 227, 212, 0.94), rgba(24, 174, 184, 0.94));
  box-shadow: var(--soft-shadow);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

body.lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(0.8rem, 3vw, 2rem);
}

.gallery-lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 24, 65, 0.78);
  backdrop-filter: blur(5px);
}

.lightbox-frame {
  position: relative;
  z-index: 1;
  width: min(72rem, 100%);
  max-height: calc(100vh - 2rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.85rem;
  border: 2px solid rgba(110, 227, 212, 0.58);
  border-radius: 8px;
  background: rgba(241, 251, 255, 0.96);
  box-shadow: 0 28px 80px rgba(7, 20, 54, 0.34);
}

.lightbox-frame img {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-height: calc(100vh - 8.8rem);
  object-fit: contain;
  border-radius: 8px;
  background: var(--midnight);
}

.lightbox-frame p {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  color: var(--midnight);
  font-weight: 900;
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  border: 0;
  color: var(--snow);
  background: var(--royal);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.14);
}

.lightbox-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 900;
}

.lightbox-nav {
  width: 2.45rem;
  height: 3.25rem;
  border-radius: 8px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-prev {
  grid-column: 1;
  grid-row: 1;
}

.lightbox-next {
  grid-column: 3;
  grid-row: 1;
}

.site-footer {
  position: relative;
  padding: 1rem 1rem 1.2rem;
  color: var(--midnight);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(214, 244, 255, 0.84)),
    repeating-linear-gradient(-7deg, transparent 0 22px, rgba(255, 255, 255, 0.4) 23px 24px);
}

.site-footer p {
  margin: 0.2rem 0;
  font-weight: 900;
}

.story-hero {
  position: relative;
  min-height: 31rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 8px solid rgba(255, 255, 255, 0.8);
}

.story-hero-image,
.story-hero-shade {
  position: absolute;
  inset: 0;
}

.story-hero-image {
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.story-hero-shade {
  z-index: -2;
  background: linear-gradient(180deg, rgba(10, 28, 92, 0.28), rgba(244, 252, 255, 0.72));
}

.story-hero-content {
  width: min(58rem, calc(100% - 2rem));
  padding: 1rem;
  text-align: center;
}

.story-title-art {
  width: min(48rem, 100%);
  margin: 0 auto;
  filter: drop-shadow(0 14px 22px rgba(26, 41, 122, 0.24));
}

.story-edition {
  display: inline-block;
  margin: 0.1rem auto 0;
  padding: 0.3rem 0.75rem;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  color: #28409a;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(26, 41, 122, 0.14);
  font-size: 0.94rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.story-hero-content > p:last-child {
  width: min(43rem, 100%);
  margin: 0.8rem auto 0;
  color: #17326e;
  font-size: 1.14rem;
  font-weight: 900;
  line-height: 1.45;
}

.story-layout {
  width: min(74rem, calc(100% - 2rem));
  margin: 1rem auto;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.chapter-nav {
  position: sticky;
  top: 5rem;
  padding: 1rem;
  border: 2px solid rgba(24, 174, 184, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.chapter-nav nav {
  display: grid;
  gap: 0.45rem;
}

.chapter-nav a {
  display: block;
  padding: 0.58rem 0.7rem;
  border-radius: 8px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(234, 249, 255, 0.94), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(24, 174, 184, 0.2);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
}

.chapter-nav a:hover,
.chapter-nav a:focus-visible {
  color: var(--snow);
  background: var(--teal);
  outline: none;
}

.lore-grid,
.power-grid {
  display: grid;
  gap: 0.8rem;
}

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

.power-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.lore-grid article,
.power-grid article,
.quest-list li {
  border: 1px solid rgba(24, 174, 184, 0.2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(234, 249, 255, 0.94), rgba(255, 255, 255, 0.9));
}

.lore-grid article {
  padding: 0.85rem;
}

.lore-grid h3 {
  font-size: 1.15rem;
}

.lore-grid p,
.quest-list li,
.power-grid span {
  color: var(--soft-ink);
  line-height: 1.42;
}

.lore-grid p {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
}

.power-grid article {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  padding: 0.75rem;
}

.power-grid strong {
  color: var(--royal);
  font-size: 1.08rem;
}

.power-grid span {
  font-size: 0.86rem;
}

.quest-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: quest;
}

.quest-list li {
  position: relative;
  padding: 0.75rem 0.75rem 0.75rem 2.45rem;
  font-size: 0.92rem;
}

.quest-list li::before {
  counter-increment: quest;
  content: counter(quest);
  position: absolute;
  left: 0.65rem;
  top: 0.65rem;
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--snow);
  background: var(--teal);
  font-weight: 900;
}

.story-reader {
  width: 100%;
  padding: 1.2rem min(4vw, 2.2rem) 2rem;
  border: 2px solid rgba(24, 174, 184, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.story-chapter {
  scroll-margin-top: 5.5rem;
}

.story-reader p {
  margin: 0.85rem 0;
  color: #253966;
  font-size: 1.04rem;
  line-height: 1.72;
}

.story-copy {
  margin: 0.95rem 0 2rem;
  color: #253966;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.78;
}

.story-copy em {
  color: #4b329f;
}

.story-reader h3 {
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 2px dashed rgba(24, 174, 184, 0.22);
  font-size: 1.55rem;
}

.chapter-art {
  margin: 1rem 0 1.15rem;
  overflow: hidden;
  border: 2px solid rgba(24, 174, 184, 0.24);
  border-radius: 8px;
  background: var(--ice);
  box-shadow: var(--soft-shadow);
}

.chapter-art img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: grid;
  }

  .site-nav {
    display: none;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .site-nav.open {
    display: grid;
  }

  .site-nav a {
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
  }

  .hero {
    height: 35rem;
    min-height: 35rem;
  }

  .hero-title {
    width: min(29rem, 100%);
  }

  .layout-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .feature-row {
    grid-template-columns: 1fr;
  }

  .story-layout {
    grid-template-columns: 1fr;
  }

  .chapter-nav {
    position: static;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery-more {
    min-height: 5rem;
  }
}

@media (max-width: 680px) {
  .brand {
    max-width: calc(100% - 3.5rem);
  }

  .brand-logo {
    width: min(17rem, 100%);
  }

  .hero {
    align-items: end;
    height: 34rem;
    min-height: 34rem;
  }

  .story-hero {
    min-height: 28rem;
  }

  .hero-image {
    object-position: center top;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(12, 37, 114, 0.16) 0%, rgba(255, 255, 255, 0.1) 30%, rgba(244, 252, 255, 0.9) 100%);
  }

  .hero-content {
    padding-bottom: 2.2rem;
  }

  .hero-title {
    width: min(19.5rem, 100%);
  }

  .hero-copy {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  h3 {
    font-size: 1.7rem;
  }

  .story-band,
  .pups-band,
  .videos-band,
  .gallery-band,
  .feature-row {
    padding: 2rem 0.8rem;
  }

  .domain-form {
    grid-template-columns: 1fr;
  }

  .game-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .round-board {
    grid-template-columns: 1fr 1fr;
  }

  .game-stats div {
    padding: 0.75rem 0.5rem;
  }

  .game-stats strong {
    font-size: 1.55rem;
  }

  .game-actions {
    justify-content: stretch;
  }

  .game-actions button {
    flex: 1 1 9rem;
  }

  .round-timer {
    min-width: 5.2rem;
  }

  .attempt-list li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .player-name {
    grid-column: 2;
  }

  .pup-card {
    grid-template-columns: 1fr;
  }

  .pup-card img {
    height: auto;
    min-height: 0;
    aspect-ratio: 1 / 1;
  }

  .pup-copy {
    padding: 0 1rem 1.15rem;
    text-align: center;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-more {
    min-height: 5.5rem;
  }

  .gallery-lightbox {
    padding: 0.55rem;
  }

  .lightbox-frame {
    grid-template-columns: 2.2rem minmax(0, 1fr) 2.2rem;
    padding: 0.65rem;
  }

  .lightbox-frame img {
    max-height: calc(100vh - 8rem);
  }

  .lightbox-nav {
    width: 2.2rem;
    height: 2.75rem;
  }

  .story-layout {
    width: min(100% - 1.6rem, 74rem);
  }
}
