.game-page,
.games-directory-page {
  overflow-x: hidden;
}

.game-workspace [hidden],
.game-play-section [hidden] {
  display: none !important;
}

.game-kicker,
.game-settings-heading span,
.game-arena-heading > div > span,
.game-intro-strip > div > span,
.game-section-heading > div > span,
.game-directory-card-copy > span,
.games-directory-note > span {
  font: 800 10px var(--font-latin);
  letter-spacing: .17em;
  text-transform: uppercase;
}

.games-directory-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 10% 0, rgba(199, 243, 106, .24), transparent 28%),
    radial-gradient(circle at 88% 84%, rgba(216, 199, 255, .22), transparent 31%),
    #18201c;
}

.games-directory-hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -210px;
  top: -210px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 50%;
}

.games-directory-hero-inner {
  min-height: 570px;
  padding: 88px 0 92px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  align-items: center;
  gap: 78px;
}

.games-directory-hero .game-kicker {
  display: inline-flex;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  color: #c7f36a;
  background: rgba(255,255,255,.06);
}

.games-directory-hero h1 {
  margin: 24px 0 0;
  font-size: clamp(46px, 6.8vw, 78px);
  line-height: 1.07;
  letter-spacing: -.075em;
}

.games-directory-hero h1 em {
  position: relative;
  z-index: 0;
  color: #18201c;
  font-style: normal;
}

.games-directory-hero h1 em::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 5px -10px -2px -7px;
  border-radius: 6px;
  background: #c7f36a;
  transform: rotate(-1.2deg);
}

.games-directory-hero p {
  margin: 25px 0 0;
  color: rgba(255,255,255,.65);
  font-size: 16px;
  line-height: 1.8;
}

.games-hero-scene {
  position: relative;
  min-height: 385px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 42px;
  background:
    linear-gradient(140deg, rgba(255,255,255,.11), rgba(255,255,255,.035)),
    repeating-linear-gradient(90deg, transparent 0 42px, rgba(255,255,255,.03) 42px 43px);
  box-shadow: 0 34px 80px rgba(0,0,0,.26);
  transform: rotate(1.2deg);
}

.scene-wheel {
  position: absolute;
  width: 224px;
  height: 224px;
  left: 50%;
  top: 50%;
  border: 11px solid white;
  border-radius: 50%;
  background: conic-gradient(
    #c7f36a 0 60deg,
    #d8c7ff 60deg 120deg,
    #ffcf96 120deg 180deg,
    #bde8f4 180deg 240deg,
    #f6bfd1 240deg 300deg,
    #9fe2c4 300deg
  );
  box-shadow: 0 22px 55px rgba(0,0,0,.28);
  transform: translate(-50%, -50%) rotate(-16deg);
}

.scene-wheel::after {
  content: "";
  position: absolute;
  width: 62px;
  height: 62px;
  inset: 0;
  margin: auto;
  border: 8px solid white;
  border-radius: 50%;
  background: #18201c;
}

.scene-wheel i {
  position: absolute;
  z-index: 2;
  width: 0;
  height: 0;
  left: 50%;
  top: -31px;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-top: 39px solid #fff;
  transform: translateX(-50%);
}

.scene-ticket {
  position: absolute;
  z-index: 3;
  width: 126px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 4px solid #18201c;
  border-radius: 18px;
  color: #18201c;
  background: #ffe08a;
  box-shadow: 0 16px 30px rgba(0,0,0,.2);
  font: 800 16px var(--font-latin);
  letter-spacing: .14em;
}

.scene-ticket::before,
.scene-ticket::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  border: 4px solid #18201c;
  border-radius: 50%;
  background: #18201c;
  transform: translateY(-50%);
}

.scene-ticket::before { left: -13px; }
.scene-ticket::after { right: -13px; }
.scene-ticket-one { left: 12px; top: 38px; transform: rotate(-12deg); }
.scene-ticket-two { right: 6px; bottom: 32px; background: #d8c7ff; transform: rotate(10deg); }

.games-hero-scene > b {
  position: absolute;
  z-index: 4;
  right: 46px;
  top: 38px;
  color: #c7f36a;
  font: 800 62px/1 var(--font-latin);
  transform: rotate(8deg);
}

.games-directory-grid {
  padding: 78px 0 96px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.game-directory-card {
  position: relative;
  min-height: 530px;
  padding: 24px;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(24,32,28,.12);
  border-radius: 30px;
  background:
    radial-gradient(circle at 100% 0, var(--card-secondary), transparent 38%),
    var(--card-accent);
  box-shadow: 0 18px 45px rgba(24,32,28,.08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.game-directory-card:nth-child(2) {
  transform: translateY(22px);
}

.game-directory-card:hover {
  z-index: 2;
  transform: translateY(-7px) rotate(-.7deg);
  box-shadow: 0 30px 70px rgba(24,32,28,.16);
}

.game-directory-card:nth-child(2):hover {
  transform: translateY(15px) rotate(.7deg);
}

.game-directory-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 800 10px var(--font-latin);
  letter-spacing: .13em;
}

.game-directory-card-top > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(24,32,28,.16);
  border-radius: 50%;
  background: rgba(255,255,255,.38);
}

.game-card-preview {
  min-height: 245px;
  display: grid;
  place-items: center;
}

.game-directory-card-copy {
  margin-top: auto;
}

.game-directory-card-copy > span {
  color: rgba(24,32,28,.58);
}

.game-directory-card h2 {
  margin: 8px 0 0;
  font-size: 33px;
  letter-spacing: -.06em;
}

.game-directory-card p {
  margin: 12px 0 0;
  color: rgba(24,32,28,.68);
  font-size: 13px;
  line-height: 1.7;
}

.mini-ladder {
  position: relative;
  width: 214px;
  height: 184px;
  transform: rotate(-2deg);
}

.mini-ladder i {
  position: absolute;
  width: 8px;
  height: 180px;
  top: 2px;
  border-radius: 999px;
  background: #18201c;
}

.mini-ladder i:nth-child(1) { left: 5px; }
.mini-ladder i:nth-child(2) { left: 70px; }
.mini-ladder i:nth-child(3) { left: 136px; }
.mini-ladder i:nth-child(4) { right: 5px; }

.mini-ladder b {
  position: absolute;
  height: 8px;
  border-radius: 999px;
  background: #18201c;
}

.mini-ladder b:nth-of-type(1) { width: 65px; left: 9px; top: 42px; }
.mini-ladder b:nth-of-type(2) { width: 66px; left: 74px; top: 91px; }
.mini-ladder b:nth-of-type(3) { width: 66px; right: 9px; top: 139px; }

.mini-ladder::after {
  content: "";
  position: absolute;
  width: 19px;
  height: 19px;
  right: -1px;
  bottom: -1px;
  border: 5px solid white;
  border-radius: 50%;
  background: #18201c;
}

.mini-wheel {
  position: relative;
  width: 218px;
  height: 218px;
  border: 10px solid #18201c;
  border-radius: 50%;
  background: conic-gradient(
    #c7f36a 0 60deg,
    #d8c7ff 60deg 120deg,
    #f6bfd1 120deg 180deg,
    #bde8f4 180deg 240deg,
    #9fe2c4 240deg 300deg,
    #ffe08a 300deg
  );
  box-shadow: 0 18px 0 rgba(24,32,28,.12);
  transform: rotate(9deg);
}

.mini-wheel::before {
  content: "";
  position: absolute;
  z-index: 2;
  width: 0;
  height: 0;
  left: 50%;
  top: -30px;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 36px solid #18201c;
  transform: translateX(-50%);
}

.mini-wheel::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  inset: 0;
  margin: auto;
  border: 7px solid white;
  border-radius: 50%;
  background: #18201c;
}

.mini-draw {
  position: relative;
  width: 225px;
  height: 184px;
  border-radius: 24px 24px 38px 38px;
  background: #18201c;
  box-shadow: 0 18px 0 rgba(24,32,28,.12);
}

.mini-draw::before {
  content: "";
  position: absolute;
  height: 60px;
  left: 15px;
  right: 15px;
  top: -22px;
  border: 7px solid #18201c;
  border-radius: 24px 24px 12px 12px;
  background: rgba(255,255,255,.78);
}

.mini-draw i {
  position: absolute;
  z-index: 2;
  width: 54px;
  height: 76px;
  top: -47px;
  border: 7px solid #18201c;
  border-radius: 14px;
}

.mini-draw i:nth-child(1) { left: 33px; background: #ffe08a; transform: rotate(-13deg); }
.mini-draw i:nth-child(2) { left: 87px; background: #bde8f4; transform: rotate(4deg); }
.mini-draw i:nth-child(3) { right: 28px; background: #f6bfd1; transform: rotate(15deg); }

.mini-draw b {
  position: absolute;
  width: 78px;
  height: 16px;
  left: 50%;
  bottom: 30px;
  border-radius: 999px;
  background: #c7f36a;
  transform: translateX(-50%);
}

.games-directory-note {
  margin-bottom: 100px;
  padding: 62px;
  border: 1px solid rgba(24,32,28,.09);
  border-radius: 32px;
  background:
    radial-gradient(circle at 88% 24%, rgba(216,199,255,.66), transparent 25%),
    white;
}

.games-directory-note > span {
  color: #78827b;
}

.games-directory-note h2 {
  margin: 12px 0 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.14;
  letter-spacing: -.065em;
}

.games-directory-note p {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.game-main {
  padding-bottom: 96px;
}

.game-page-hero {
  padding: 50px 0 62px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  align-items: center;
  gap: 72px;
}

.game-page-hero-copy {
  max-width: 700px;
}

.game-page-hero .game-kicker {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid rgba(24,32,28,.1);
  border-radius: 999px;
  color: #606b64;
  background: rgba(255,255,255,.65);
}

.game-page-hero h1 {
  margin: 20px 0 0;
  font-size: clamp(48px, 7vw, 76px);
  line-height: 1.03;
  letter-spacing: -.075em;
}

.game-page-hero-copy > p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #59645d;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.8;
}

.game-trust-row {
  margin-top: 27px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  color: #667169;
  font-size: 12px;
  font-weight: 700;
}

.game-trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.game-trust-row i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #86b832;
  box-shadow: 0 0 0 4px rgba(134,184,50,.13);
}

.game-hero-icon {
  position: relative;
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(24,32,28,.08);
  border-radius: 38px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,255,255,.88), transparent 26%),
    linear-gradient(145deg, var(--game-accent), var(--game-secondary));
  box-shadow: var(--shadow);
  transform: rotate(1.3deg);
}

.game-hero-icon::before {
  content: "";
  position: absolute;
  width: 105px;
  height: 105px;
  right: 24px;
  top: 24px;
  border: 1px dashed rgba(24,32,28,.18);
  border-radius: 50%;
}

.game-hero-icon > span {
  position: absolute;
  width: 120px;
  height: 28px;
  left: 26px;
  bottom: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
  transform: rotate(-5deg);
}

.game-hero-icon img {
  position: relative;
  width: 196px;
  height: 196px;
  filter: drop-shadow(0 22px 28px rgba(24,32,28,.16));
  transform: rotate(-1.3deg);
}

.game-play-section {
  scroll-margin-top: 96px;
}

.game-intro-strip {
  margin-bottom: 18px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid rgba(24,32,28,.08);
  border-radius: 20px;
  background: rgba(255,255,255,.62);
}

.game-intro-strip > div {
  max-width: 740px;
}

.game-intro-strip > div > span {
  color: #7a847d;
}

.game-intro-strip p {
  margin: 7px 0 0;
  color: #626d65;
  font-size: 13px;
  line-height: 1.75;
}

.game-intro-strip > strong {
  flex: none;
  padding: 10px 13px;
  border-radius: 999px;
  color: #486121;
  background: rgba(199,243,106,.32);
  font-size: 11px;
}

.game-workspace {
  position: relative;
}

.game-studio {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(24,32,28,.1);
  border-radius: 30px;
  background: white;
  box-shadow: var(--shadow);
}

.game-settings {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 17px;
  border-right: 1px solid rgba(24,32,28,.08);
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--game-accent) 55%, transparent), transparent 34%),
    #f7f8f3;
}

.game-settings-heading,
.game-arena-heading,
.ladder-result-heading,
.wheel-history > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.game-settings-heading span,
.game-arena-heading > div > span {
  color: #78827b;
}

.game-settings-heading h2,
.game-arena-heading h2 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: -.045em;
}

.game-settings-heading > strong {
  min-width: 48px;
  padding: 7px 9px;
  border-radius: 999px;
  background: white;
  text-align: center;
  font: 800 11px var(--font-latin);
}

.game-settings > label:not(.game-check) {
  color: #4f5a53;
  font-size: 11px;
  font-weight: 800;
}

.game-textarea,
.ladder-input-row input {
  width: 100%;
  border: 1px solid #d5dcd2;
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: rgba(255,255,255,.92);
  font: 600 13px/1.65 var(--font-ko);
  transition: border-color .2s, box-shadow .2s;
}

.game-textarea {
  min-height: 210px;
  padding: 14px 15px;
  resize: vertical;
}

.ladder-input-row input {
  min-width: 0;
  height: 43px;
  padding: 0 11px;
}

.game-textarea:focus,
.ladder-input-row input:focus,
.game-button:focus-visible,
.game-text-button:focus-visible,
.game-icon-button:focus-visible,
.wheel-spin-button:focus-visible,
.ladder-starter:focus-visible {
  border-color: #86b832;
  box-shadow: 0 0 0 4px rgba(169,220,69,.22);
  outline: none;
}

.game-check {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #556159;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.game-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  clip-path: inset(50%);
  pointer-events: none;
}

.game-check > span {
  width: 21px;
  height: 21px;
  display: grid;
  flex: none;
  place-items: center;
  border: 1px solid #c9d1c6;
  border-radius: 7px;
  background: white;
}

.game-check input:checked + span {
  border-color: #18201c;
  background: #18201c;
}

.game-check input:checked + span::after {
  content: "✓";
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.game-check input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(169,220,69,.22);
}

.game-button,
.game-text-button,
.game-icon-button {
  min-height: 46px;
  border: 0;
  color: var(--ink);
  font-family: var(--font-ko);
  font-weight: 800;
  cursor: pointer;
}

.game-button {
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #d7ddd4;
  border-radius: 13px;
  background: white;
  font-size: 12px;
  transition: transform .2s, box-shadow .2s, background .2s;
}

.game-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 11px 22px rgba(24,32,28,.12);
}

.game-button:disabled,
.game-text-button:disabled,
.game-icon-button:disabled,
.wheel-spin-button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.game-button-primary {
  border-color: #18201c;
  color: white;
  background: #18201c;
}

.game-button-primary:hover:not(:disabled) {
  background: #2b352f;
}

.game-button-secondary {
  background: #f5f7f2;
}

.game-button-quiet {
  border-color: transparent;
  background: transparent;
}

.game-button-wide {
  width: 100%;
  justify-content: space-between;
  min-height: 50px;
  padding-inline: 18px;
}

.game-text-button {
  width: fit-content;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5a655e;
  background: transparent;
  font-size: 11px;
}

.game-text-button:hover:not(:disabled) {
  color: #18201c;
}

.game-icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  flex: none;
  place-items: center;
  border: 1px solid #dce1da;
  border-radius: 50%;
  background: #f8faf6;
  font-size: 20px;
  transition: transform .2s, background .2s;
}

.game-icon-button:hover:not(:disabled) {
  background: var(--game-accent);
  transform: rotate(-24deg);
}

.game-setting-note {
  margin: -3px 0 0;
  color: #7d8780;
  font-size: 10px;
  line-height: 1.55;
}

.game-arena {
  position: relative;
  min-width: 0;
  padding: 30px;
  background:
    linear-gradient(rgba(24,32,28,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24,32,28,.025) 1px, transparent 1px),
    white;
  background-size: 28px 28px;
}

.game-feedback {
  margin: 12px 0 0;
  padding: 13px 15px;
  border-radius: 12px;
  color: #355222;
  background: #eefbd7;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.game-feedback.is-error {
  color: #7f2530;
  background: #fff0f1;
}

.game-live-status {
  min-height: 19px;
  margin: 16px 0 0;
  color: #707b73;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.ladder-input-head,
.ladder-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px;
  align-items: center;
  gap: 7px;
}

.ladder-input-head {
  margin-bottom: -8px;
  color: #7d8780;
  font-size: 9px;
  font-weight: 800;
}

.ladder-input-list {
  display: grid;
  gap: 8px;
}

.ladder-remove {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #8f555a;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
}

.ladder-remove:hover:not(:disabled) {
  background: #fff0f1;
}

.ladder-remove:disabled {
  opacity: .28;
  cursor: not-allowed;
}

.ladder-arena {
  display: flex;
  flex-direction: column;
}

.ladder-scroll {
  max-width: 100%;
  margin-top: 22px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #c5cdc3 transparent;
}

.ladder-scroll:focus-visible {
  border-radius: 15px;
  outline: 4px solid rgba(169,220,69,.22);
}

.ladder-board {
  --ladder-count: 4;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 18px 16px;
  display: grid;
  grid-template-rows: auto 380px auto;
  border: 1px solid rgba(24,32,28,.08);
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 38px rgba(24,32,28,.07);
}

.ladder-labels {
  display: grid;
  grid-template-columns: repeat(var(--ladder-count), minmax(0, 1fr));
  align-items: center;
  gap: 6px;
}

.ladder-labels-top {
  padding-bottom: 4px;
}

.ladder-labels-bottom {
  padding-top: 4px;
}

.ladder-starter {
  min-width: 0;
  min-height: 45px;
  padding: 8px 6px;
  overflow: hidden;
  border: 1px solid #d9ded7;
  border-radius: 12px;
  color: var(--ink);
  background: white;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 800 11px var(--font-ko);
  cursor: pointer;
  transition: transform .2s, border-color .2s, background .2s;
}

.ladder-starter:hover:not(:disabled),
.ladder-starter.is-selected {
  border-color: #18201c;
  background: var(--game-accent);
  transform: translateY(-2px);
}

.ladder-outcome {
  min-width: 0;
  min-height: 45px;
  padding: 8px 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(24,32,28,.08);
  border-radius: 12px;
  color: #57625a;
  background: #f4f6f2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
}

.ladder-outcome.is-revealed,
.ladder-outcome.is-arrived {
  color: #18201c;
  background: var(--game-secondary);
}

.ladder-outcome.is-arrived {
  box-shadow: 0 0 0 3px #18201c;
  transform: translateY(2px);
}

.ladder-svg {
  width: 100%;
  height: 380px;
  overflow: visible;
}

.ladder-rail,
.ladder-rung {
  fill: none;
  stroke: #cfd6cd;
  stroke-width: 9;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
}

.ladder-rung {
  stroke: #aeb8af;
}

.ladder-route-shadow,
.ladder-route {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ladder-route-shadow {
  stroke: white;
  stroke-width: 15;
}

.ladder-route {
  stroke: #18201c;
  stroke-width: 8;
}

.ladder-route-shadow.is-animated,
.ladder-route.is-animated {
  animation: ladder-route-draw var(--route-duration, 1.9s) cubic-bezier(.2,.75,.3,1) forwards;
}

.ladder-route-dot {
  fill: var(--game-accent);
  stroke: #18201c;
  stroke-width: 5;
  vector-effect: non-scaling-stroke;
}

@keyframes ladder-route-draw {
  from { stroke-dashoffset: var(--route-length); }
  to { stroke-dashoffset: 0; }
}

.ladder-scroll-note {
  margin: 9px 0 0;
  color: #79837c;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
}

.ladder-controls,
.game-result-actions,
.wheel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ladder-controls {
  margin-top: 17px;
}

.game-winner-card {
  position: relative;
  margin-top: 18px;
  padding: 25px;
  overflow: hidden;
  border: 1px solid rgba(24,32,28,.12);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 0, var(--game-secondary), transparent 38%),
    var(--game-accent);
  text-align: center;
  animation: winner-card-in .45s cubic-bezier(.2,.8,.2,1);
}

.game-winner-card::after {
  content: "✦";
  position: absolute;
  right: 24px;
  top: 16px;
  color: rgba(24,32,28,.24);
  font-size: 28px;
}

.game-winner-card > span {
  color: rgba(24,32,28,.55);
  font: 800 9px var(--font-latin);
  letter-spacing: .18em;
}

.game-winner-card p {
  margin: 8px 0 0;
  color: rgba(24,32,28,.7);
  font-size: 12px;
  font-weight: 700;
}

.game-winner-card h3 {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  font-size: clamp(27px, 4vw, 40px);
  letter-spacing: -.055em;
}

@keyframes winner-card-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ladder-result-table {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(24,32,28,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.92);
}

.ladder-result-heading {
  align-items: flex-start;
}

.ladder-result-heading > strong {
  font-size: 13px;
}

.ladder-result-heading > span {
  color: #7c867f;
  text-align: right;
  font-size: 9px;
  line-height: 1.5;
}

.ladder-result-table ul {
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
}

.ladder-result-table li {
  min-width: 0;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-radius: 11px;
  background: #f5f7f3;
  font-size: 10px;
  font-weight: 800;
}

.ladder-result-table li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ladder-result-table li span:last-child {
  text-align: right;
}

.wheel-candidate-list {
  max-height: 160px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: auto;
}

.wheel-candidate-list span {
  max-width: 100%;
  padding: 6px 9px;
  overflow: hidden;
  border: 1px solid rgba(24,32,28,.08);
  border-radius: 999px;
  background: white;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 800;
}

.wheel-arena {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.wheel-arena-heading {
  width: 100%;
}

.wheel-stage {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 1;
  margin: 24px auto 4px;
  display: grid;
  place-items: center;
}

.wheel-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 23px 24px rgba(24,32,28,.16));
}

.wheel-pointer {
  position: absolute;
  z-index: 4;
  width: 48px;
  height: 64px;
  left: 50%;
  top: -5px;
  display: grid;
  place-items: start center;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 8px rgba(24,32,28,.18));
}

.wheel-pointer::before {
  content: "";
  width: 38px;
  height: 22px;
  border: 5px solid white;
  border-radius: 999px;
  background: #18201c;
}

.wheel-pointer span {
  width: 0;
  height: 0;
  margin-top: -5px;
  border-left: 17px solid transparent;
  border-right: 17px solid transparent;
  border-top: 31px solid #18201c;
}

.wheel-spin-button {
  position: absolute;
  z-index: 5;
  width: 112px;
  height: 112px;
  display: grid;
  place-content: center;
  gap: 3px;
  border: 8px solid white;
  border-radius: 50%;
  color: white;
  background: #18201c;
  box-shadow: 0 14px 30px rgba(24,32,28,.25);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}

.wheel-spin-button:hover:not(:disabled) {
  transform: scale(1.04);
  box-shadow: 0 18px 38px rgba(24,32,28,.3);
}

.wheel-spin-button > span {
  color: #c7f36a;
  font: 800 9px var(--font-latin);
  letter-spacing: .16em;
}

.wheel-spin-button > strong {
  font-size: 17px;
}

.wheel-actions {
  min-height: 46px;
}

.wheel-winner-card {
  width: min(100%, 560px);
}

.game-result-actions {
  margin-top: 17px;
}

.wheel-history {
  width: min(100%, 560px);
  margin-top: 13px;
  padding: 16px 18px;
  border: 1px solid rgba(24,32,28,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.88);
}

.wheel-history > div > strong {
  font-size: 11px;
}

.wheel-history > div > span {
  color: #7a847d;
  font-size: 9px;
  font-weight: 700;
}

.wheel-history ol {
  margin: 11px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  counter-reset: recent-result;
  list-style: none;
}

.wheel-history li {
  max-width: 100%;
  padding: 7px 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #f2f4f0;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 800;
}

.wheel-history li::before {
  counter-increment: recent-result;
  content: counter(recent-result) ". ";
  color: #8b948e;
}

.game-content-grid {
  margin-top: 72px;
}

.game-related-section {
  margin-top: 78px;
  padding-top: 52px;
  border-top: 1px solid var(--line);
}

.game-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.game-section-heading > div > span {
  color: #7b857e;
}

.game-section-heading h2 {
  margin: 7px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.055em;
}

.game-section-heading > a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  font-size: 11px;
  font-weight: 800;
}

.game-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.game-related-card {
  min-height: 190px;
  padding: 24px;
  display: grid;
  grid-template-columns: 58px 1fr;
  grid-template-rows: auto auto 1fr;
  gap: 3px 18px;
  border: 1px solid rgba(24,32,28,.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--card-secondary) 60%, transparent), transparent 35%),
    rgba(255,255,255,.82);
  transition: transform .2s, box-shadow .2s;
}

.game-related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(24,32,28,.1);
}

.game-related-card img {
  grid-row: 1 / -1;
  width: 58px;
  height: 58px;
}

.game-related-card > span {
  color: #7d8780;
  font: 800 9px var(--font-latin);
  letter-spacing: .14em;
}

.game-related-card > strong {
  font-size: 19px;
  letter-spacing: -.035em;
}

.game-related-card > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.home-game-directory {
  position: relative;
}

.home-game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-game-card {
  position: relative;
  min-height: 355px;
  padding: 20px;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(24,32,28,.09);
  border-radius: 25px;
  background:
    radial-gradient(circle at 100% 0, var(--card-secondary), transparent 42%),
    var(--card-accent);
  transition: transform .23s, box-shadow .23s;
}

.home-game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 50px rgba(24,32,28,.13);
}

.home-game-number {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(24,32,28,.14);
  border-radius: 50%;
  font: 800 9px var(--font-latin);
}

.home-game-visual {
  height: 146px;
  display: grid;
  place-items: center;
  transform: scale(.66);
}

.home-game-card > strong {
  margin-top: 5px;
  font-size: 21px;
  letter-spacing: -.045em;
}

.home-game-card > span:not(.home-game-number) {
  margin-top: 8px;
  color: rgba(24,32,28,.67);
  font-size: 11px;
  line-height: 1.65;
}

.home-game-card > b {
  margin-top: auto;
  padding-top: 16px;
  font-size: 10px;
}

@media (max-width: 980px) {
  .games-directory-hero-inner,
  .game-page-hero {
    grid-template-columns: 1fr;
  }

  .games-directory-hero-inner {
    gap: 48px;
  }

  .games-hero-scene {
    min-height: 330px;
  }

  .game-page-hero {
    gap: 34px;
  }

  .game-hero-icon {
    min-height: 240px;
  }

  .game-studio {
    grid-template-columns: 1fr;
  }

  .game-settings {
    border-right: 0;
    border-bottom: 1px solid rgba(24,32,28,.08);
  }
}

@media (max-width: 840px) {
  .games-directory-grid {
    grid-template-columns: 1fr;
  }

  .game-directory-card,
  .game-directory-card:nth-child(2) {
    min-height: 420px;
    transform: none;
  }

  .game-directory-card:nth-child(2):hover {
    transform: translateY(-7px) rotate(.7deg);
  }

  .home-game-grid {
    grid-template-columns: 1fr;
  }

  .home-game-card {
    min-height: 310px;
  }
}

@media (max-width: 680px) {
  .games-directory-hero-inner {
    min-height: auto;
    padding: 58px 0 62px;
  }

  .games-directory-hero h1 {
    font-size: 45px;
  }

  .games-directory-hero p br {
    display: none;
  }

  .games-hero-scene {
    min-height: 285px;
    border-radius: 30px;
  }

  .scene-wheel {
    width: 180px;
    height: 180px;
  }

  .scene-ticket {
    width: 101px;
    height: 62px;
  }

  .games-directory-grid {
    padding: 52px 0 72px;
  }

  .game-directory-card {
    min-height: 390px;
    padding: 20px;
    border-radius: 25px;
  }

  .game-card-preview {
    min-height: 190px;
    transform: scale(.78);
  }

  .games-directory-note {
    margin-bottom: 72px;
    padding: 34px 26px;
    border-radius: 26px;
  }

  .game-page-hero {
    padding: 36px 0 44px;
  }

  .game-page-hero h1 {
    font-size: 47px;
  }

  .game-hero-icon {
    min-height: 210px;
    border-radius: 28px;
  }

  .game-hero-icon img {
    width: 144px;
    height: 144px;
  }

  .game-intro-strip {
    padding: 20px;
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .game-studio {
    border-radius: 24px;
  }

  .game-settings,
  .game-arena {
    padding: 22px 18px;
  }

  .ladder-board {
    grid-template-rows: auto 340px auto;
    padding-inline: 12px;
  }

  .ladder-svg {
    height: 340px;
  }

  .ladder-result-table ul {
    grid-template-columns: 1fr;
  }

  .wheel-spin-button {
    width: 88px;
    height: 88px;
    border-width: 6px;
  }

  .wheel-spin-button > strong {
    font-size: 14px;
  }

  .wheel-pointer {
    transform: translateX(-50%) scale(.8);
    transform-origin: top center;
  }

  .game-result-actions .game-button {
    flex: 1 1 130px;
  }

  .game-content-grid {
    margin-top: 52px;
  }

  .game-related-section {
    margin-top: 56px;
    padding-top: 40px;
  }

  .game-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .game-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .ladder-input-head {
    display: none;
  }

  .ladder-input-row {
    padding-bottom: 8px;
    grid-template-columns: 1fr 36px;
    border-bottom: 1px solid rgba(24,32,28,.08);
  }

  .ladder-input-row input:first-child,
  .ladder-input-row input:nth-child(2) {
    grid-column: 1;
  }

  .ladder-input-row .ladder-remove {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .game-settings,
  .game-arena {
    padding-inline: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-directory-card,
  .home-game-card,
  .game-button,
  .game-icon-button,
  .wheel-spin-button,
  .ladder-starter,
  .game-winner-card {
    animation: none !important;
    transition: none !important;
  }

  .ladder-route-shadow.is-animated,
  .ladder-route.is-animated {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }
}
