@font-face {
  font-family: "Fredoka";
  src: url("branding/brand-kit/fonts/Fredoka-variable.ttf") format("truetype");
  font-display: swap;
  font-weight: 300 700;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("branding/brand-kit/fonts/NunitoSans-variable.ttf") format("truetype");
  font-display: swap;
  font-weight: 300 900;
}

:root {
  --deep-teal: #173b3c;
  --cream: #faf5e9;
  --paper: #fffdf7;
  --coral: #f26b4f;
  --gold: #eab94e;
  --sage: #75a99a;
  --muted-teal: #527071;
  --line: rgba(23, 59, 60, 0.14);
  --display: "Fredoka", "Arial Rounded MT Bold", sans-serif;
  --body: "Nunito Sans", system-ui, sans-serif;
  --game-shelf-panel-inset: clamp(28px, min(3.6vw, 5.25dvh), 52px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  color: var(--deep-teal);
  background: var(--cream);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

.site-shell {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  padding: max(22px, env(safe-area-inset-top)) max(30px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(30px, env(safe-area-inset-left));
  overflow: hidden;
  isolation: isolate;
}

.site-shell::before,
.site-shell::after {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.site-shell::before {
  top: -25vw;
  left: -13vw;
  width: 55vw;
  height: 55vw;
  border: 1px solid rgba(23, 59, 60, 0.08);
  box-shadow: 0 0 0 7vw rgba(23, 59, 60, 0.025), 0 0 0 15vw rgba(23, 59, 60, 0.018);
  animation: board-rings-drift 18s ease-in-out infinite alternate;
}

.site-shell::after {
  right: -8vw;
  bottom: -18vw;
  width: 36vw;
  height: 36vw;
  background: rgba(234, 185, 78, 0.1);
  filter: blur(1px);
  animation: warm-glow-drift 15s ease-in-out infinite alternate;
}

.ambient-motion {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.home-game-night {
  position: absolute;
  top: 51%;
  left: 50%;
  width: min(138vw, 1440px);
  aspect-ratio: 3 / 2;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.home-game-night img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  will-change: transform;
}

.game-night-table {
  opacity: 0.12;
  filter: saturate(0.72) contrast(0.9);
  animation: game-night-table-drift 13s ease-in-out infinite alternate;
}

.game-night-player {
  opacity: 0.19;
  filter: saturate(0.82) contrast(0.9);
}

.game-night-player--eager {
  clip-path: inset(0 50% 50% 0);
  transform-origin: 25% 28%;
  animation: game-night-eager 7.5s ease-in-out infinite;
}

.game-night-player--surprised {
  clip-path: inset(0 0 50% 50%);
  transform-origin: 77% 27%;
  animation: game-night-surprised 6.8s ease-in-out 0.7s infinite;
}

.game-night-player--laughing {
  clip-path: inset(48% 50% 0 0);
  transform-origin: 24% 76%;
  animation: game-night-laughing 5.6s ease-in-out 0.25s infinite;
}

.game-night-player--victory {
  clip-path: inset(42% 0 0 50%);
  transform-origin: 78% 78%;
  opacity: 0.23;
  animation: game-night-victory 6.4s cubic-bezier(0.45, 0, 0.2, 1) 1.1s infinite;
}

.ambient-orbit {
  position: absolute;
  top: 8%;
  right: 5%;
  width: clamp(130px, 18vw, 280px);
  aspect-ratio: 1;
  border: 1px solid rgba(23, 59, 60, 0.07);
  border-radius: 50%;
  opacity: 0.72;
  animation: ambient-orbit-turn 34s linear infinite;
}

.ambient-orbit::before {
  position: absolute;
  inset: 24%;
  border: 1px dashed rgba(23, 59, 60, 0.07);
  border-radius: inherit;
  content: "";
}

.ambient-orbit i,
.ambient-orbit b {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(9px, 1vw, 15px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 4px 12px rgba(23, 59, 60, 0.12);
}

.ambient-orbit i:nth-child(1) { top: -6px; left: calc(50% - 6px); }
.ambient-orbit i:nth-child(2) { top: calc(50% - 6px); right: -6px; background: var(--gold); }
.ambient-orbit i:nth-child(3) { bottom: -6px; left: calc(50% - 6px); background: var(--sage); }
.ambient-orbit i:nth-child(4) { top: calc(50% - 6px); left: -6px; background: var(--deep-teal); }

.ambient-orbit b {
  top: 50%;
  left: 50%;
  width: auto;
  color: rgba(234, 185, 78, 0.6);
  background: none;
  box-shadow: none;
  font-size: clamp(0.75rem, 1.3vw, 1.25rem);
  transform: translate(-50%, -50%);
  animation: ambient-orbit-counterturn 34s linear infinite;
}

.ambient-token {
  position: absolute;
  width: clamp(10px, 1.1vw, 17px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.32;
  box-shadow: 0 8px 22px rgba(23, 59, 60, 0.14);
}

.ambient-token--coral {
  top: 15%;
  left: 43%;
  background: var(--coral);
  animation: token-wander-one 12s ease-in-out infinite alternate;
}

.ambient-token--gold {
  right: 38%;
  bottom: 9%;
  background: var(--gold);
  animation: token-wander-two 14s ease-in-out infinite alternate;
}

.ambient-token--sage {
  top: 53%;
  right: 2.5%;
  background: var(--sage);
  animation: token-wander-three 16s ease-in-out infinite alternate;
}

@keyframes board-rings-drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(0.98); }
  to { transform: translate3d(3%, 2%, 0) scale(1.05); }
}

@keyframes warm-glow-drift {
  from { transform: translate3d(2%, 5%, 0) scale(0.92); opacity: 0.66; }
  to { transform: translate3d(-8%, -4%, 0) scale(1.08); opacity: 1; }
}

@keyframes ambient-orbit-turn {
  to { transform: rotate(360deg); }
}

@keyframes ambient-orbit-counterturn {
  from { transform: translate(-50%, -50%) rotate(0); }
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes token-wander-one {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(32px, 18px, 0); }
}

@keyframes token-wander-two {
  from { transform: translate3d(0, 0, 0) scale(0.85); }
  to { transform: translate3d(-42px, -20px, 0) scale(1.12); }
}

@keyframes token-wander-three {
  from { transform: translate3d(0, -12px, 0); }
  to { transform: translate3d(-24px, 22px, 0); }
}

@keyframes game-night-table-drift {
  from { transform: translate3d(-5px, 4px, 0) scale(0.99); }
  to { transform: translate3d(7px, -3px, 0) scale(1.015); }
}

@keyframes game-night-eager {
  0%, 18%, 100% { transform: translate3d(-5px, 3px, 0) rotate(-0.6deg); }
  42%, 58% { transform: translate3d(10px, 7px, 0) rotate(1.1deg) scale(1.015); }
}

@keyframes game-night-surprised {
  0%, 26%, 100% { transform: translate3d(3px, 5px, 0) scale(1); }
  38% { transform: translate3d(10px, -8px, 0) rotate(0.8deg) scale(1.025); }
  48% { transform: translate3d(5px, 1px, 0) scale(1.008); }
}

@keyframes game-night-laughing {
  0%, 22%, 100% { transform: translate3d(-2px, 2px, 0) rotate(0); }
  35% { transform: translate3d(5px, -7px, 0) rotate(0.8deg); }
  44% { transform: translate3d(1px, 2px, 0) rotate(-0.5deg); }
  54% { transform: translate3d(5px, -5px, 0) rotate(0.6deg); }
}

@keyframes game-night-victory {
  0%, 30%, 100% { transform: translate3d(2px, 9px, 0) rotate(0) scale(0.99); }
  42% { transform: translate3d(-5px, -24px, 0) rotate(-1.2deg) scale(1.025); }
  50% { transform: translate3d(3px, -17px, 0) rotate(0.7deg) scale(1.015); }
  60% { transform: translate3d(1px, 6px, 0) scale(0.995); }
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header {
  min-height: 68px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  width: clamp(230px, 22vw, 300px);
  border-radius: 8px;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.brand:focus-visible,
.game-selector:focus-visible,
.arrow-button:focus-visible,
.selector-dot:focus-visible,
.game-action:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 4px;
}

.header-note,
.site-footer p,
.gesture-note {
  margin: 0;
  color: var(--muted-teal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.74fr) minmax(520px, 1.26fr);
  gap: clamp(36px, 6vw, 108px);
  align-items: center;
  min-height: 0;
  padding: clamp(18px, 3vh, 42px) clamp(0px, 2vw, 32px);
}

.intro {
  align-self: center;
  max-width: 560px;
}

.eyebrow,
.section-label,
.game-type {
  margin: 0;
  color: var(--coral);
  font-size: clamp(0.68rem, 0.8vw, 0.78rem);
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  gap: 10px;
  align-items: center;
}

.eyebrow span {
  width: 24px;
  height: 2px;
  background: currentColor;
}

.intro h1 {
  max-width: 10ch;
  margin: clamp(14px, 2vh, 24px) 0 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 5.4vw, 6.4rem);
  font-weight: 590;
  line-height: 0.94;
  letter-spacing: -0.055em;
}

.intro-copy {
  max-width: 32ch;
  margin: clamp(18px, 2.6vh, 28px) 0 0;
  color: var(--muted-teal);
  font-size: clamp(1rem, 1.28vw, 1.25rem);
  line-height: 1.55;
}

.steps {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  margin: clamp(28px, 5vh, 56px) 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--deep-teal);
  font-size: clamp(0.74rem, 0.92vw, 0.88rem);
  font-weight: 750;
  white-space: nowrap;
}

.step-pictogram {
  display: grid;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(117, 169, 154, 0.28);
  border-radius: 14px;
  color: var(--sage);
  background: rgba(117, 169, 154, 0.11);
}

.step-pictogram--gold {
  border-color: rgba(234, 185, 78, 0.3);
  color: #bb8421;
  background: rgba(234, 185, 78, 0.12);
}

.step-pictogram--coral {
  border-color: rgba(242, 107, 79, 0.26);
  color: var(--coral);
  background: rgba(242, 107, 79, 0.1);
}

.step-pictogram svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step-pictogram circle {
  fill: currentColor;
  stroke: none;
}

.step-label {
  display: grid;
  gap: 2px;
}

.step-label small {
  color: var(--sage);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.step-label b {
  font: inherit;
}

.library {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(12px, 1.8vh, 20px);
  width: min(100%, 790px);
  min-width: 0;
  max-height: min(680px, 74dvh);
  justify-self: end;
}

.library-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0 4px;
}

.library-heading h2 {
  margin: 3px 0 0;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  font-weight: 580;
  letter-spacing: -0.03em;
}

.game-count {
  display: flex;
  gap: 6px;
  align-items: baseline;
  margin: 0;
  color: var(--muted-teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.game-count span:first-child {
  color: var(--deep-teal);
  font-size: 1rem;
}

.game-selector {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  border-radius: clamp(26px, 3vw, 42px);
  outline: none;
}

.game-card {
  display: grid;
  grid-template-columns: minmax(230px, 0.95fr) minmax(240px, 1.05fr);
  min-height: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(23, 59, 60, 0.1);
  border-radius: inherit;
  box-shadow: 0 24px 80px rgba(23, 59, 60, 0.1);
}

.game-card.is-entering .game-visual,
.game-card.is-entering .game-copy > * {
  animation: card-enter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.game-card[data-direction="previous"].is-entering .game-visual,
.game-card[data-direction="previous"].is-entering .game-copy > * {
  --entry-x: -18px;
}

.game-copy > :nth-child(2) { animation-delay: 30ms !important; }
.game-copy > :nth-child(3) { animation-delay: 55ms !important; }
.game-copy > :nth-child(4) { animation-delay: 80ms !important; }
.game-copy > :nth-child(5) { animation-delay: 105ms !important; }
.game-copy > :nth-child(6) { animation-delay: 130ms !important; }

@keyframes card-enter {
  from { opacity: 0; transform: translateX(var(--entry-x, 18px)); }
  to { opacity: 1; transform: translateX(0); }
}

.game-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  background: var(--deep-teal);
}

.game-visual::before {
  position: absolute;
  width: 120%;
  aspect-ratio: 1;
  border: 1px solid rgba(250, 245, 233, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(250, 245, 233, 0.025), 0 0 0 82px rgba(250, 245, 233, 0.018);
  content: "";
}

.status-pill {
  position: absolute;
  z-index: 4;
  top: clamp(18px, 2vw, 26px);
  left: clamp(18px, 2vw, 26px);
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--deep-teal);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status-pill--gold::before,
.status-pill--sage::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.status-pill--sage::before { background: var(--sage); }

.edgeword-art {
  position: relative;
  width: min(78%, 310px);
  aspect-ratio: 1;
  animation: art-float 5s ease-in-out infinite;
}

@keyframes art-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}

.letter-ring {
  position: absolute;
  inset: 4%;
  border: clamp(18px, 2.1vw, 31px) solid var(--cream);
  border-radius: 50%;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24), inset 0 0 0 1px rgba(23, 59, 60, 0.12);
}

.letter-ring--inner {
  inset: 24%;
  border-width: clamp(14px, 1.6vw, 23px);
  opacity: 0.98;
  transform: rotate(22.5deg);
}

.letter-ring span {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--deep-teal);
  font-family: var(--display);
  font-size: clamp(0.58rem, 0.92vw, 0.88rem);
  font-style: normal;
  font-weight: 650;
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 45deg)) translateY(calc(clamp(62px, 8.5vw, 106px) * -1)) rotate(calc(var(--i) * -45deg));
}

.letter-ring--inner span {
  font-size: clamp(0.42rem, 0.7vw, 0.68rem);
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 45deg)) translateY(calc(clamp(26px, 3.65vw, 46px) * -1)) rotate(calc(var(--i) * -45deg - 22.5deg));
}

.edgeword-window {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--cream);
  box-shadow: 0 8px 20px rgba(23, 59, 60, 0.3);
  transform: translate(-50%, -50%);
}

.edgeword-window b {
  font-family: var(--display);
  font-size: clamp(1rem, 1.65vw, 1.45rem);
}

.edgeword-window i {
  opacity: 0.7;
  font-style: normal;
}

.edgeword-window span {
  font-size: clamp(0.5rem, 0.68vw, 0.68rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.score-token {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: clamp(28px, 3vw, 42px);
  aspect-ratio: 1;
  border: 3px solid var(--deep-teal);
  border-radius: 50%;
  color: var(--deep-teal);
  background: var(--gold);
  font-family: var(--display);
  font-weight: 700;
}

.score-token--one { right: -3%; bottom: 18%; transform: rotate(12deg); }
.score-token--two { top: 18%; left: -3%; background: var(--sage); transform: rotate(-15deg); }

.critical-orbit-art {
  position: relative;
  display: grid;
  place-items: center;
  width: min(82%, 330px);
  aspect-ratio: 1;
  animation: art-float 6s ease-in-out infinite;
}

.critical-orbit-art img {
  position: relative;
  z-index: 2;
  display: block;
  width: 90%;
  height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.35));
}

.deed-district-art {
  position: relative;
  width: min(88%, 360px);
  aspect-ratio: 1.15;
  overflow: hidden;
  border: 1px solid rgba(250,245,233,.24);
  border-radius: 28px;
  box-shadow: 0 20px 46px rgba(0,0,0,.3);
  animation: art-float 6.5s ease-in-out infinite;
}

.deed-district-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.84) brightness(.76);
}

.district-road {
  position: absolute;
  inset: 14%;
  border: 7px solid rgba(250,245,233,.48);
  border-radius: 37% 43% 35% 45%;
  transform: rotate(-5deg);
}

.district-deed {
  position: absolute;
  z-index: 2;
  width: 48px;
  aspect-ratio: .76;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--deep-teal);
  background: var(--cream);
  border: 3px solid var(--gold);
  box-shadow: 0 9px 18px rgba(0,0,0,.32);
  font: 650 1.25rem/1 var(--display);
}
.district-deed--one { left: 16%; bottom: 18%; transform: rotate(-8deg); }
.district-deed--two { left: 45%; top: 17%; border-color: var(--coral); transform: rotate(4deg); }
.district-deed--three { right: 14%; bottom: 22%; border-color: var(--sage); transform: rotate(9deg); }

.drawn-lots-art {
  position: relative;
  width: min(88%, 360px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(250,245,233,.24);
  border-radius: 30px;
  box-shadow: 0 20px 46px rgba(0,0,0,.32);
  animation: art-float 6.2s ease-in-out infinite;
}
.drawn-lots-art img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; filter:saturate(.86) brightness(.78); }
.drawn-paper { position:absolute; left:34%; top:29%; width:32%; height:42%; border-radius:3px; background:rgba(250,245,233,.9); box-shadow:0 8px 20px rgba(0,0,0,.22); transform:rotate(-2deg); }
.drawn-paper::after { content:""; position:absolute; inset:26% 20%; border:7px solid #173b3c; border-top-color:#ee6c4d; border-radius:48% 52% 44% 56%; transform:rotate(18deg); }
.drawn-token { position:absolute; z-index:3; width:34px; aspect-ratio:1; border-radius:50%; background:#ee6c4d; box-shadow:0 8px 15px rgba(0,0,0,.28); }
.drawn-token--one { left:18%; bottom:23%; }.drawn-token--two { right:16%; top:22%; background:#e4b84f; }

.critical-station-glow {
  position: absolute;
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(234,185,78,.34), transparent 68%);
  animation: critical-glow 3.8s ease-in-out infinite;
}

.orbit-arc {
  position: absolute;
  border: 1px solid rgba(250,245,233,.38);
  border-radius: 50%;
  animation: critical-orbit 18s linear infinite;
}

.orbit-arc::after {
  position: absolute;
  top: 8%;
  left: 14%;
  width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 14px var(--gold);
  content: "";
}

.orbit-arc--one { width: 100%; aspect-ratio: 1; transform: rotate(18deg); }
.orbit-arc--two { width: 67%; aspect-ratio: 1; animation-direction: reverse; animation-duration: 12s; }
.critical-alert { position: absolute; z-index: 4; right: 4%; bottom: 10%; display:grid; place-items:center; width:42px; aspect-ratio:1; border:3px solid var(--cream); border-radius:50%; color:var(--cream); background:var(--coral); font-family:var(--display); font-weight:700; box-shadow:0 8px 18px rgba(0,0,0,.25); }
@keyframes critical-orbit { to { transform: rotate(378deg); } }
@keyframes critical-glow { 50% { transform: scale(1.12); opacity:.62; } }

.fallback-art {
  position: relative;
  width: 62%;
  aspect-ratio: 1;
  border: 12px solid var(--cream);
  border-radius: 28%;
}

.fallback-art span,
.fallback-art i {
  position: absolute;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--game-accent, var(--coral));
}

.fallback-art span:nth-child(1) { top: 8%; left: 42%; }
.fallback-art span:nth-child(2) { top: 42%; right: 8%; background: var(--gold); }
.fallback-art span:nth-child(3) { bottom: 8%; left: 42%; background: var(--sage); }
.fallback-art i { top: 42%; left: 8%; background: var(--cream); }

.game-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--game-shelf-panel-inset);
}

.game-card[data-game="deed-and-district"] .game-copy h3 { font-size:clamp(2.25rem,3.4vw,3.35rem); }
.game-card[data-game="deed-and-district"] .game-tagline { margin-top:clamp(10px,1.3vh,16px); }
.game-card[data-game="deed-and-district"] .game-description { margin-top:8px; }
.game-card[data-game="deed-and-district"] .game-requirements { margin-top:10px; }
.game-card[data-game="deed-and-district"] .game-bottom-row { padding-top:12px; }

.game-copy h3 {
  margin: clamp(8px, 1.2vh, 14px) 0 0;
  font-family: var(--display);
  font-size: clamp(2.2rem, 4vw, 4rem);
  font-weight: 620;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.game-tagline {
  max-width: 20ch;
  margin: clamp(16px, 2vh, 24px) 0 0;
  font-family: var(--display);
  font-size: clamp(1.02rem, 1.6vw, 1.42rem);
  font-weight: 520;
  line-height: 1.18;
}

.game-description {
  max-width: 32ch;
  margin: clamp(10px, 1.6vh, 17px) 0 0;
  color: var(--muted-teal);
  font-size: clamp(0.82rem, 1vw, 0.98rem);
  line-height: 1.45;
}

.game-requirements {
  display: grid;
  gap: 7px;
  margin-top: clamp(13px, 1.7vh, 18px);
}

.game-requirements > p {
  margin: 0;
  color: var(--muted-teal);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.game-requirements ul {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.requirement-item {
  position: relative;
}

.requirement-pictogram {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--game-accent) 38%, transparent);
  border-radius: 14px;
  color: var(--deep-teal);
  background: color-mix(in srgb, var(--game-accent) 10%, var(--cream));
  cursor: help;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.requirement-pictogram:hover,
.requirement-pictogram:focus-visible,
.requirement-pictogram.is-open {
  z-index: 4;
  border-color: color-mix(in srgb, var(--game-accent) 76%, var(--deep-teal));
  background: color-mix(in srgb, var(--game-accent) 18%, var(--cream));
  transform: translateY(-2px);
}

.requirement-pictogram svg {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.requirement-tooltip {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 0;
  width: max-content;
  max-width: min(220px, 62vw);
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--cream);
  background: var(--deep-teal);
  box-shadow: 0 8px 24px rgba(13, 60, 61, 0.18);
  font-size: clamp(0.72rem, 0.88vw, 0.82rem);
  font-weight: 780;
  line-height: 1.2;
  pointer-events: none;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.requirement-tooltip::after {
  position: absolute;
  top: 100%;
  left: 16px;
  border: 5px solid transparent;
  border-top-color: var(--deep-teal);
  content: "";
}

.requirement-pictogram:hover .requirement-tooltip,
.requirement-pictogram:focus-visible .requirement-tooltip,
.requirement-pictogram.is-open .requirement-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.game-bottom-row {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 20px;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.game-meta li {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 750;
  white-space: nowrap;
}

.game-action {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 17px;
  border-radius: 999px;
  color: var(--cream);
  background: var(--deep-teal);
  font-size: 0.78rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.game-action--disabled {
  color: var(--muted-teal);
  background: rgba(23, 59, 60, 0.08);
  cursor: default;
}

.selector-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 10px 5px 0;
}

.selector-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.arrow-button,
.selector-dot {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
}

.arrow-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  transition: background-color 160ms ease, transform 160ms ease;
}

.arrow-button:not(:disabled):hover {
  background: rgba(23, 59, 60, 0.07);
  transform: translateY(-1px);
}

.arrow-button:disabled {
  opacity: 0.3;
  cursor: default;
}

.arrow-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.selector-dots {
  display: flex;
  gap: 7px;
  align-items: center;
}

.selector-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(23, 59, 60, 0.22);
  transition: width 220ms ease, background-color 220ms ease;
}

.selector-dot[aria-current="true"] {
  width: 25px;
  background: var(--coral);
}

.site-footer {
  min-height: 26px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.footer-spark {
  color: var(--gold);
  font-size: 1rem;
}

.resolve-credit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border-radius: 999px;
  color: var(--deep-teal);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-decoration: none;
}

.resolve-credit span { color: var(--coral); transition: transform .2s ease; }
.resolve-credit:hover span { transform: translate(2px,-2px); }
.resolve-credit:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }

.empty-shelf {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  min-height: 240px;
}

noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 10;
  padding: 12px;
  border-radius: 12px;
  color: var(--cream);
  background: var(--deep-teal);
  text-align: center;
}

@media (max-width: 980px) {
  :root { --game-shelf-panel-inset: clamp(24px, min(3vw, 5dvh), 34px); }

  .site-shell {
    padding-inline: max(22px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-left));
  }

  .home-layout {
    grid-template-columns: minmax(220px, 0.65fr) minmax(440px, 1.35fr);
    gap: 30px;
  }

  .game-card {
    grid-template-columns: minmax(185px, 0.85fr) minmax(220px, 1.15fr);
  }

  .steps {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 720px), (orientation: portrait) and (max-width: 900px) {
  .home-game-night {
    top: 45%;
    width: 148vw;
  }

  .game-night-table { opacity: 0.09; }
  .game-night-player { opacity: 0.14; }
  .game-night-player--victory { opacity: 0.18; }

  .site-shell {
    padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  }

  .site-header { min-height: 58px; }

  .brand { width: clamp(190px, 32vw, 240px); }
  .header-note { display: none; }

  .home-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(15px, 2.2vh, 24px);
    align-items: stretch;
    padding: clamp(9px, 1.5vh, 16px) 0;
  }

  .intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 20px;
    align-items: end;
    max-width: none;
  }

  .eyebrow { display: none; }

  .intro h1 {
    max-width: 12ch;
    margin: 0;
    font-size: clamp(2rem, 7vw, 3.4rem);
  }

  .intro-copy {
    grid-column: 1;
    margin: 4px 0 0;
    font-size: clamp(0.8rem, 2.3vw, 1rem);
    line-height: 1.35;
  }

  .steps {
    grid-row: 1 / span 2;
    grid-column: 2;
    gap: 4px;
    align-self: center;
    margin: 0;
  }

  .steps li { gap: 7px; font-size: 0.68rem; }
  .step-pictogram { width: 32px; height: 32px; border-radius: 10px; }
  .step-pictogram svg { width: 19px; height: 19px; }
  .step-label small { font-size: 0.56rem; }

  .library {
    width: 100%;
    height: 100%;
    max-height: none;
    justify-self: stretch;
  }

  .library-heading h2 { font-size: 1.25rem; }

  .game-card {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  }

  .game-copy h3 { font-size: clamp(1.9rem, 7vw, 3rem); }
  .game-description { font-size: clamp(0.72rem, 2vw, 0.88rem); }
  .game-requirements { margin-top: 10px; }
  .game-bottom-row { flex-direction: column; align-items: flex-start; }
  .game-action { min-height: 40px; }
  .gesture-note { display: none; }

  .site-footer {
    min-height: 20px;
    padding-top: 8px;
  }

  .site-footer p { font-size: 0.62rem; }
}

@media (max-width: 540px) {
  .home-game-night {
    top: 43%;
    width: 175vw;
  }

  .game-night-player { opacity: 0.11; }
  .game-night-player--victory { opacity: 0.15; }

  :root { --game-shelf-panel-inset: clamp(18px, 5vw, 26px); }

  .intro { display: block; }
  .intro h1 { font-size: clamp(1.85rem, 9vw, 2.7rem); }
  .steps { display: none; }

  .library-heading {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .library { display: block; min-height: 0; }

  .game-selector {
    height: 100%;
    grid-template-rows: minmax(0, 1fr) 48px;
  }

  .game-card {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(150px, 0.95fr) minmax(190px, 1.05fr);
  }

  .status-pill { top: 14px; left: 14px; }
  .edgeword-art { width: min(56%, 210px); }
  .letter-ring span {
    transform: translate(-50%, -50%) rotate(calc(var(--i) * 45deg)) translateY(-74px) rotate(calc(var(--i) * -45deg));
  }
  .letter-ring--inner span {
    transform: translate(-50%, -50%) rotate(calc(var(--i) * 45deg)) translateY(-32px) rotate(calc(var(--i) * -45deg - 22.5deg));
  }

  .game-tagline { margin-top: 9px; }
  .game-description { margin-top: 7px; }
  .game-requirements { gap: 5px; margin-top: 8px; }
  .game-requirements > p { font-size: 0.59rem; }
  .requirement-pictogram { width: 36px; height: 36px; border-radius: 12px; }
  .requirement-pictogram svg { width: 21px; height: 21px; }
  .game-bottom-row { flex-direction: row; align-items: end; padding-top: 10px; }
  .game-meta li { padding: 4px 7px; font-size: 0.59rem; }
  .game-action { min-height: 36px; padding-inline: 13px; font-size: 0.68rem; }
  .selector-footer { min-height: 48px; justify-content: center; }
}

@media (max-height: 700px) and (min-width: 721px) {
  .site-shell { padding-block: 14px 10px; }
  .home-layout { padding-block: 10px; }
  .intro h1 { font-size: clamp(2.7rem, 5vw, 4.8rem); }
  .intro-copy { margin-top: 14px; }
  .steps { margin-top: 22px; }
  .library { max-height: calc(100dvh - 120px); }
  .game-copy { padding-block: 26px; }
  .game-description { line-height: 1.35; }
}

@media (max-height: 670px) and (max-width: 540px) {
  .site-header { min-height: 42px; }
  .brand { width: 175px; }
  .intro-copy { display: none; }
  .home-layout { gap: 8px; padding-block: 5px; }
  .intro h1 { font-size: 1.85rem; }
  .game-card { grid-template-rows: minmax(125px, 0.8fr) minmax(180px, 1.2fr); }
  .game-description { display: none; }
  .game-requirements { margin-top: 7px; }
  .game-copy h3 { font-size: 1.9rem; }
  .game-tagline { font-size: 0.92rem; }
  .site-footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
