:root {
  --bg-a: #1a120d;
  --bg-b: #4a3020;
  --panel: #2b1d15;
  --ink: #f6e7d0;
  --line: #6a4a36;
  --hot: #c66b2b;
  --mint: #c99965;
  --sun: #e8b35a;
  --dim: #c3a485;
  --font: "Silkscreen", "Press Start 2P", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, #6b4a33 0%, transparent 42%),
    radial-gradient(circle at 90% 28%, #8a5a39 0%, transparent 36%),
    linear-gradient(160deg, var(--bg-a), var(--bg-b));
  min-height: 100vh;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.06) 0,
    rgba(0, 0, 0, 0.06) 1px,
    transparent 1px,
    transparent 4px
  );
  pointer-events: none;
  z-index: 999;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.pixel-border {
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px #1f1510, 0 4px 0 #160f0b;
}

.btn {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.7rem;
  color: var(--ink);
  background: #70482f;
  cursor: pointer;
  text-decoration: none;
  padding: 0.65rem 1.4rem;
  border: 2px solid #8f5f3e;
  border-top-color: #b88358;
  border-left-color: #b88358;
  border-bottom-color: #3d2518;
  border-right-color: #3d2518;
  border-radius: 4px;
  box-shadow:
    0 4px 0 #2a1b12,
    inset 0 3px 0 #8f5f3e,
    inset 3px 0 0 #8f5f3e,
    inset 0 -3px 0 #5b3824,
    inset -3px 0 0 #5b3824;
  transition: background 80ms;
  line-height: 1;
  letter-spacing: 0.03em;
}

.btn:hover {
  background: #805339;
}

.btn:active {
  box-shadow:
    0 1px 0 #2a1b12,
    inset 0 3px 0 #8f5f3e,
    inset 3px 0 0 #8f5f3e,
    inset 0 -3px 0 #5b3824,
    inset -3px 0 0 #5b3824;
  transform: translateY(3px);
}

.btn-hot {
  background: #7b4320;
  border-color: #a76536;
  border-top-color: #ce8a52;
  border-left-color: #ce8a52;
  border-bottom-color: #3c2213;
  border-right-color: #3c2213;
  box-shadow:
    0 4px 0 #24140b,
    inset 0 3px 0 #b77342,
    inset 3px 0 0 #b77342,
    inset 0 -3px 0 #5e341b,
    inset -3px 0 0 #5e341b;
}

.btn-hot:hover {
  background: #8b4d28;
}

.btn-hot:active {
  box-shadow:
    0 1px 0 #24140b,
    inset 0 3px 0 #b77342,
    inset 3px 0 0 #b77342,
    inset 0 -3px 0 #5e341b,
    inset -3px 0 0 #5e341b;
  transform: translateY(3px);
}

nav {
  border-bottom: 2px solid var(--line);
  background: rgba(26, 18, 13, 0.84);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
  padding: 0.55rem 0;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--mint);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-shadow: 0 0 12px rgba(201, 153, 101, 0.35);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  display: flex;
  gap: 1rem;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--dim);
  text-decoration: none;
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  transition: color 120ms;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem;
  background: rgba(26, 18, 13, 0.75);
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px #1f1510;
}

.lang-link {
  min-width: 38px;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  font-size: 0.54rem;
  color: var(--dim);
}

.lang-link:hover,
.lang-link:focus-visible {
  color: var(--ink);
}

.lang-link.active {
  color: var(--ink);
  background: #70482f;
  box-shadow: inset 0 0 0 1px #9a6b47;
}

.hero {
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.12;
  pointer-events: none;
}

.hero.hero-compact {
  padding: 4rem 0 3rem;
}

.hero-eyebrow {
  font-size: 0.52rem;
  color: var(--hot);
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2.4rem, 10vw, 4.8rem);
  font-weight: 700;
  color: var(--mint);
  line-height: 1.1;
  text-shadow: 4px 4px 0 #2c1a10, 0 0 32px rgba(201, 153, 101, 0.3);
  margin-bottom: 1.5rem;
  letter-spacing: 0.08em;
}

.hero-compact .hero-title {
  font-size: clamp(1.4rem, 6vw, 2.8rem);
  margin-bottom: 1rem;
}

.hero-sub {
  font-size: clamp(0.6rem, 2.2vw, 0.78rem);
  color: var(--dim);
  line-height: 1.9;
  max-width: 560px;
  margin: 0 auto 2.4rem;
}

.hero-cta {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

.dice-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin: 3rem 0;
}

.hero-canvas-crop {
  width: min(100%, clamp(560px, 92vw, 980px));
  overflow: hidden;
  aspect-ratio: 1080 / 540;
}

.hero-dice-canvas {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.55));
  image-rendering: pixelated;
  display: block;
}

section {
  padding: 4rem 0;
}

.section-label {
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  color: var(--hot);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.section-title {
  font-size: clamp(0.9rem, 3.5vw, 1.4rem);
  color: var(--sun);
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45);
}

.section-copy {
  font-size: 0.65rem;
  color: var(--dim);
  line-height: 1.9;
  max-width: 520px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2.4rem;
}

.feature-card {
  background: #2a1c14;
  border: 2px solid #5c3f2d;
  border-radius: 8px;
  padding: 1.2rem 1rem;
  box-shadow: 0 4px 0 #160f0b, inset 0 0 0 1px #21160f;
  display: grid;
  gap: 0.55rem;
}

.feature-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.feature-title {
  font-size: 0.62rem;
  color: var(--mint);
  letter-spacing: 0.04em;
}

.feature-desc {
  font-size: 0.56rem;
  color: var(--dim);
  line-height: 1.75;
}

.cards-section {
  background: rgba(0, 0, 0, 0.18);
}

.shop-badge {
  display: inline-block;
  background: #5a3a27;
  border: 1px solid #8f5f3e;
  border-radius: 4px;
  padding: 0.18rem 0.4rem;
  font-size: 0.58rem;
  color: var(--mint);
  letter-spacing: 0.06em;
}

.floors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.7rem;
  margin-top: 2rem;
}

.floor-tile {
  background: #2a1c14;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 0.7rem 0.6rem;
  text-align: center;
  box-shadow: 0 3px 0 #160f0b;
}

.floor-num {
  font-size: 1.1rem;
  color: var(--sun);
  font-weight: 700;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.floor-label {
  font-size: 0.52rem;
  color: var(--dim);
  margin-top: 0.3rem;
  line-height: 1.5;
}

.score-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.score-bubble {
  background:
    repeating-linear-gradient(0deg, #70482f 0 2px, #5b3824 2px 4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, rgba(0, 0, 0, 0.06) 1px 2px, transparent 2px 4px);
  border: 2px solid #8b5d3d;
  border-radius: 4px;
  padding: 0.3rem 0.55rem;
  font-size: 0.6rem;
  color: var(--ink);
  box-shadow:
    0 0 0 2px #21160f,
    0 3px 0 #452b1b,
    inset 0 2px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22);
  white-space: nowrap;
}

.score-bubble-mult {
  border-color: #5a6040;
  background:
    repeating-linear-gradient(0deg, #4a5030 0 2px, #3a4026 2px 4px),
    repeating-linear-gradient(90deg, rgba(246, 201, 86, 0.08) 0 1px, rgba(0, 0, 0, 0.08) 1px 2px, transparent 2px 4px);
  color: var(--sun);
}

.score-bubble-final {
  border-color: #d09040;
  background:
    repeating-linear-gradient(0deg, #a06828 0 2px, #8a5420 2px 4px),
    repeating-linear-gradient(90deg, rgba(246, 201, 86, 0.14) 0 1px, rgba(0, 0, 0, 0.1) 1px 2px, transparent 2px 4px);
  color: #fff0c8;
  text-shadow: 0 0 8px rgba(246, 201, 86, 0.6);
  box-shadow:
    0 0 0 2px #0c1510,
    0 4px 0 #4a2c10,
    inset 0 2px 0 rgba(255, 255, 255, 0.14),
    0 0 14px rgba(246, 201, 86, 0.3);
}

.screenshots-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2.4rem;
  justify-items: center;
}

.screenshot-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  max-width: 240px;
}

.phone-frame {
  width: 220px;
  background: #2a1c14;
  border: 3px solid #6a4a36;
  border-radius: 22px;
  box-shadow:
    0 0 0 2px #1f1510,
    0 24px 0 #160f0b,
    0 0 40px rgba(201, 153, 101, 0.12);
  overflow: hidden;
  position: relative;
}

.phone-notch {
  height: 18px;
  background: #1f1510;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-notch::after {
  content: "";
  width: 60px;
  height: 8px;
  background: #4a3020;
  border-radius: 4px;
}

.screenshot-img {
  width: 100%;
  height: auto;
  display: block;
  image-rendering: pixelated;
  cursor: zoom-in;
}

.screenshot-caption {
  font-size: 0.62rem;
  color: var(--mint);
  letter-spacing: 0.04em;
  text-align: center;
}

.screenshot-sub {
  font-size: 0.54rem;
  color: var(--dim);
  line-height: 1.7;
  text-align: center;
}

.cta-section {
  text-align: center;
  padding: 4.5rem 0 5rem;
  border-top: 2px solid var(--line);
}

.legal-section {
  background: rgba(0, 0, 0, 0.18);
  border-top: 2px solid var(--line);
}

.legal-card {
  background: #241810;
  border: 2px solid #5c3f2d;
  border-radius: 10px;
  box-shadow: 0 4px 0 #160f0b, inset 0 0 0 1px #21160f;
  padding: 1.4rem 1.1rem;
  display: grid;
  gap: 1.1rem;
}

.legal-block {
  display: grid;
  gap: 0.45rem;
}

.legal-heading {
  font-size: 0.62rem;
  color: var(--mint);
  letter-spacing: 0.04em;
}

.legal-text,
.legal-list {
  font-size: 0.56rem;
  color: var(--dim);
  line-height: 1.9;
}

.legal-list {
  list-style: none;
  display: grid;
  gap: 0.35rem;
}

.legal-note {
  color: var(--sun);
}

.legal-link {
  color: var(--sun);
  text-decoration: none;
}

.legal-link:hover,
.legal-link:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  align-items: center;
}

footer {
  border-top: 2px solid var(--line);
  padding: 1.4rem 0;
  text-align: center;
  font-size: 0.52rem;
  color: var(--dim);
  letter-spacing: 0.04em;
}

footer a {
  color: var(--mint);
  text-decoration: none;
}

.lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  touch-action: none;
}

.lb-overlay.open {
  display: flex;
}

.lb-img-wrap {
  position: relative;
  max-width: min(420px, 90vw);
  max-height: 90dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img {
  max-width: 100%;
  max-height: 90dvh;
  border: 2px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 0 0 2px #1f1510, 0 16px 0 #160f0b;
  image-rendering: pixelated;
  display: block;
}

.lb-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  background: var(--hot);
  border: 2px solid #ce8a52;
  border-bottom-color: #3c2213;
  border-right-color: #3c2213;
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 #24140b;
  line-height: 1;
}

.lb-close:hover {
  background: #b17638;
}

.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(32, 22, 16, 0.78);
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.75rem;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 3px 0 #160f0b;
  z-index: 10;
}

.lb-arrow:hover {
  background: rgba(107, 74, 51, 0.9);
}

.lb-prev {
  left: -48px;
}

.lb-next {
  right: -48px;
}

@media (max-width: 760px) {
  .nav-inner,
  .nav-right {
    flex-direction: column;
  }

  .nav-links {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 3.5rem 0 2.8rem;
  }

  .phone-frame {
    width: 170px;
  }

  .lb-prev {
    left: 4px;
  }

  .lb-next {
    right: 4px;
  }

  .lb-arrow {
    font-size: 0.65rem;
    padding: 0.4rem 0.55rem;
  }
}
