:root {
  color-scheme: dark;
  --ink: #f7f2e8;
  --muted: #a9a29a;
  --bg: #11100f;
  --panel: #1b1917;
  --panel-2: #24211e;
  --line: rgba(255, 255, 255, .09);
  --orange: #ff6b35;
  --orange-soft: #ffb08f;
  --lime: #d8ff5f;
  --purple: #a78bfa;
  --danger: #ff7185;
  --shadow: 0 20px 55px rgba(0, 0, 0, .35);
  font-family: Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}

::selection {
  color: #1b100b;
  background: var(--orange);
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.ambient::before,
.ambient::after {
  content: "";
  position: absolute;
  width: 70vw;
  height: 70vw;
  max-width: 680px;
  max-height: 680px;
  border-radius: 50%;
  filter: blur(105px);
  opacity: .12;
}

.ambient::before {
  top: -25vw;
  right: -25vw;
  background: var(--orange);
}

.ambient::after {
  bottom: -35vw;
  left: -30vw;
  background: var(--purple);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.app-shell {
  width: min(100%, 1040px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.hero {
  max-width: 720px;
  padding: 3px 2px 42px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 42px;
}

.brand-lockup > span:last-child {
  display: grid;
}

.brand-lockup strong {
  font-size: .92rem;
  line-height: 1;
}

.brand-lockup small {
  margin-top: 5px;
  color: var(--muted);
  font-size: .67rem;
}

.brand-mark {
  position: relative;
  width: 30px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 8px 8px 13px 13px;
  background: var(--orange);
  box-shadow: 0 8px 22px rgba(255, 107, 53, .2);
  transform: rotate(-12deg);
}

.brand-mark::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 9px;
  width: 13px;
  height: 10px;
  border-radius: 4px 4px 2px 2px;
  background: var(--lime);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--lime);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.hero h1 {
  max-width: 700px;
  margin: 14px 0 17px;
  font-size: clamp(3.5rem, 13vw, 6.7rem);
  font-weight: 950;
  line-height: .8;
  letter-spacing: -.075em;
}

.hero h1 span {
  display: inline-block;
  color: var(--orange);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -.06em;
}

.intro {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(.93rem, 2.5vw, 1.05rem);
  line-height: 1.55;
}

.game-menu {
  display: grid;
  gap: 15px;
}

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

.section-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(1.45rem, 5vw, 1.8rem);
  letter-spacing: -.04em;
}

.game-count {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .045);
  font-size: .72rem;
  font-weight: 850;
}

.game-grid {
  display: grid;
  gap: 13px;
}

.game-card {
  --accent: var(--orange);
  --accent-soft: rgba(255, 107, 53, .11);
  position: relative;
  display: grid;
  min-height: 154px;
  grid-template-columns: 92px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 14px;
  padding: 18px 14px 18px 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0, var(--accent-soft), transparent 43%),
    linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.game-card::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -54px;
  width: 125px;
  height: 125px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 50%;
}

.game-card:active {
  transform: scale(.985);
}

.game-card:focus-visible {
  outline: 3px solid rgba(216, 255, 95, .55);
  outline-offset: 3px;
}

.bottle-card {
  --accent: var(--orange);
  --accent-soft: rgba(255, 107, 53, .14);
}

.pyramid-card {
  --accent: var(--purple);
  --accent-soft: rgba(167, 139, 250, .12);
}

.king-card {
  --accent: var(--lime);
  --accent-soft: rgba(216, 255, 95, .09);
}

.impostor-card {
  --accent: #ff7185;
  --accent-soft: rgba(255, 113, 133, .11);
}

.new-badge {
  position: absolute;
  top: 11px;
  right: 14px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  color: #15170e;
  background: var(--lime);
  font-size: .58rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.game-art {
  position: relative;
  width: 92px;
  height: 104px;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 23px;
  background: rgba(0, 0, 0, .15);
}

.game-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.game-copy .game-meta {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: .61rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.game-copy strong {
  margin-bottom: 7px;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -.04em;
}

.game-copy > span:last-child {
  color: var(--muted);
  font-size: .77rem;
  line-height: 1.4;
}

.open-game {
  z-index: 1;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--accent);
  background: rgba(255, 255, 255, .055);
  font-size: 1.05rem;
  font-weight: 950;
}

.bottle-art {
  display: grid;
  place-items: center;
}

.bottle-cap,
.bottle-neck,
.bottle-body {
  position: absolute;
  left: 50%;
  display: block;
  transform: translateX(-50%) rotate(-9deg);
}

.bottle-cap {
  top: 11px;
  width: 21px;
  height: 12px;
  z-index: 2;
  border-radius: 5px 5px 2px 2px;
  background: var(--lime);
}

.bottle-neck {
  top: 20px;
  width: 20px;
  height: 25px;
  background: #ff8b60;
}

.bottle-body {
  top: 35px;
  width: 47px;
  height: 57px;
  display: grid;
  place-items: center;
  border-radius: 11px 11px 17px 17px;
  color: #34150a;
  background: var(--orange);
  box-shadow: 0 7px 18px rgba(255, 107, 53, .2);
}

.bottle-body b {
  font: 900 1.2rem/1 Georgia, serif;
}

.pyramid-art i {
  position: absolute;
  width: 25px;
  height: 31px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: linear-gradient(145deg, var(--purple), #7558ce);
  box-shadow: 0 4px 0 #3c2c77;
}

.pyramid-art i:nth-child(1) { left: 34px; top: 10px; transform: rotate(-2deg); }
.pyramid-art i:nth-child(2) { left: 20px; top: 41px; transform: rotate(-5deg); }
.pyramid-art i:nth-child(3) { right: 19px; top: 41px; transform: rotate(5deg); }
.pyramid-art i:nth-child(4) { left: 8px; top: 71px; transform: rotate(-7deg); }
.pyramid-art i:nth-child(5) { left: 34px; top: 70px; }
.pyramid-art i:nth-child(6) { right: 7px; top: 71px; transform: rotate(7deg); }

.mini-card {
  position: absolute;
  top: 18px;
  left: 22px;
  width: 48px;
  height: 67px;
  border: 3px solid var(--ink);
  border-radius: 9px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .32);
}

.mini-card-back {
  background: repeating-linear-gradient(45deg, #93b229 0 5px, #566d14 5px 10px);
  transform: translate(-10px, 6px) rotate(-13deg);
}

.mini-card-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #bf3e1d;
  background: var(--ink);
  transform: translate(8px, -3px) rotate(8deg);
}

.mini-card-front b {
  font: 900 1.35rem/1 Georgia, serif;
}

.mini-card-front em {
  font-size: 1.3rem;
  font-style: normal;
}

.impostor-art .body {
  position: absolute;
  top: 29px;
  left: 24px;
  width: 47px;
  height: 58px;
  border: 3px solid #ffc2ca;
  border-radius: 23px 23px 15px 15px;
  background: linear-gradient(145deg, #ff7185, #b63158);
  box-shadow: 0 7px 0 #61223b;
}

.impostor-art .visor {
  position: absolute;
  top: 38px;
  left: 41px;
  z-index: 2;
  width: 39px;
  height: 22px;
  border: 3px solid var(--panel);
  border-radius: 10px;
  background: linear-gradient(145deg, #eaff9e, var(--lime));
}

.impostor-art .leg {
  position: absolute;
  top: 77px;
  z-index: 2;
  width: 17px;
  height: 20px;
  border: 3px solid #ffc2ca;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #b63158;
}

.impostor-art .leg-left { left: 27px; }
.impostor-art .leg-right { left: 53px; }

.impostor-art b {
  position: absolute;
  top: 8px;
  left: 9px;
  z-index: 3;
  color: var(--lime);
  font: 900 1.4rem/1 Georgia, serif;
  transform: rotate(-12deg);
}

.continue-game {
  margin-top: 15px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 39px 1fr auto;
  gap: 11px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, .045);
  text-decoration: none;
}

.continue-game > span:first-child {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  color: #1b100b;
  background: var(--orange);
  font-size: 1.25rem;
}

.continue-game > span:nth-child(2) {
  display: grid;
}

.continue-game small {
  color: var(--muted);
}

.continue-game b {
  color: var(--lime);
}

footer {
  padding: 29px 0 3px;
  color: #77716c;
  text-align: center;
  font-size: .69rem;
  font-weight: 700;
}

.footer-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(216, 255, 95, .5);
}

.is-leaving .game-card:not(.selected) { opacity: .55; }
.is-leaving .game-card.selected { transform: scale(.985); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

@media (min-width: 720px) {
  .app-shell {
    padding-top: 38px;
  }

  .hero {
    padding: 8px 4px 58px;
  }

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

  .game-card:hover {
    border-color: color-mix(in srgb, var(--accent) 42%, transparent);
    transform: translateY(-4px);
  }
}

@media (max-width: 365px) {
  .app-shell { padding-right: 12px; padding-left: 12px; }
  .brand-lockup { margin-bottom: 34px; }
  .game-card { grid-template-columns: 77px minmax(0, 1fr) 29px; gap: 10px; padding-left: 11px; }
  .game-art { width: 77px; transform: scale(.88); transform-origin: center; }
  .game-copy strong { font-size: 1.22rem; }
  .game-copy > span:last-child { font-size: .71rem; }
  .open-game { width: 29px; height: 29px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
