:root {
  --page: #260b12;
  --header: #220b11;
  --panel: #3c101a;
  --panel-deep: #18070b;
  --red: #d91449;
  --red-dark: #94102f;
  --gold: #f2c52f;
  --gold-light: #ffe49c;
  --cream: #fff6e4;
  --ink: #38272b;
  --muted: #d9c4ad;
  --line: rgba(242, 197, 47, .24);
  --download: linear-gradient(90deg, #f3c934, #ff8b43);
}

* { box-sizing: border-box; }
html {
  background: #16070b;
  color-scheme: dark;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  overflow-x: hidden;
  color: #fff;
  background: #d4d4d4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { overflow-wrap: anywhere; }

.app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: clip;
  background: var(--page);
  box-shadow: 0 0 28px rgba(0, 0, 0, .32);
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

.download-bar {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 42px;
  color: #261500;
  background: var(--download);
  border-bottom: 3px solid #8e1d2e;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.download-bar span {
  position: absolute;
  left: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: #2a2418;
  border: 1px solid rgba(242, 197, 47, .72);
  border-radius: 8px;
  font-size: 1.2rem;
}

.site-header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--header);
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--gold);
  font-size: 1.45rem;
  font-weight: 1000;
  letter-spacing: -.06em;
  text-shadow: 0 0 16px rgba(242, 197, 47, .3);
}
.header-login {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  color: #281500;
  background: var(--gold);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  background: var(--panel);
}
.hero-media {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 3, 7, .1), rgba(18, 3, 7, .9));
}
.hero-overlay {
  position: relative;
  z-index: 1;
  margin-top: -82px;
  padding: 16px 14px 18px;
  background: linear-gradient(180deg, rgba(38, 11, 18, 0), var(--page) 38%);
}
.eyebrow,
.section-kicker {
  margin: 0 0 5px;
  color: var(--gold);
  font-size: .61rem;
  font-weight: 950;
  letter-spacing: .11em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(1.5rem, 7vw, 2rem);
  line-height: 1.12;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.hero-overlay > p:not(.eyebrow) {
  margin: 10px 0 0;
  color: #ead9c1;
  font-size: .78rem;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 10px 12px 8px;
}
.hero-actions a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 950;
  text-transform: uppercase;
}
.action-register {
  color: #fff8e9;
  background: linear-gradient(180deg, #dd3151, var(--red-dark));
  border: 1px solid #ff7087;
}
.action-play {
  color: #2b1700;
  background: linear-gradient(180deg, #ffe375, #dba018);
  border: 1px solid #fff0aa;
}

.category-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 4px 12px 13px;
}
.category-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  color: #ead8c1;
  background: var(--panel);
  border: 1px solid rgba(242, 197, 47, .16);
  border-radius: 9px;
  font-size: .65rem;
  font-weight: 850;
  text-align: center;
}
.category-nav a[aria-current="page"] {
  color: #fff;
  background: var(--red-dark);
  border-color: var(--red);
  box-shadow: inset 0 -2px 0 var(--gold);
}

.game-section {
  padding: 18px 12px 22px;
  background: linear-gradient(180deg, var(--panel), var(--header));
  border-block: 1px solid var(--line);
}
.game-section h2,
.reading-panel h2 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -.025em;
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 13px;
}
.game-card {
  min-width: 0;
  overflow: hidden;
  background: var(--panel-deep);
  border: 1px solid rgba(242, 197, 47, .25);
  border-radius: 13px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
}
.game-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.game-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px;
  color: #dbcbb5;
  font-size: .66rem;
  line-height: 1.42;
}
.game-copy strong {
  color: #fff6e4;
  font-size: .82rem;
  line-height: 1.25;
}
.game-tag {
  color: var(--gold);
  font-size: .56rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.illustration-note {
  color: #c9ad88;
  font-size: .58rem;
  line-height: 1.38;
}

.reading-panel {
  margin: 0;
  padding: 18px 12px 24px;
  color: var(--ink);
  background: var(--cream);
}
.reading-panel .section-kicker { color: #a02037; }
.content-section,
.checklist,
.faq-section,
.related-section {
  margin-bottom: 14px;
  padding: 15px 14px;
  background: #fffdf7;
  border: 1px solid #ead7b7;
  border-radius: 13px;
  box-shadow: 0 4px 13px rgba(69, 28, 35, .06);
}
.content-section p,
.faq-item p {
  margin: 9px 0 0;
  color: #554448;
  font-size: .84rem;
}
.checklist ol {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  counter-reset: checklist;
  list-style: none;
}
.checklist li {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 10px 8px 46px;
  color: #49373b;
  background: #fff2d9;
  border-radius: 9px;
  font-size: .78rem;
}
.checklist li::before {
  counter-increment: checklist;
  content: counter(checklist);
  position: absolute;
  left: 9px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--red-dark);
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 900;
}
.faq-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}
.faq-item {
  padding: 12px;
  background: #fff2d9;
  border-left: 3px solid var(--red);
  border-radius: 8px;
}
.faq-item h3 {
  margin: 0;
  color: #4a1822;
  font-size: .88rem;
  line-height: 1.35;
}
.related-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.related-card {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  color: #fff;
  background: linear-gradient(135deg, #8f1730, #3c101a);
  border-radius: 9px;
}
.related-card span { font-weight: 900; }
.related-card strong {
  color: var(--gold-light);
  font-size: .65rem;
  text-transform: uppercase;
}
.responsible-note {
  margin: 8px 2px 0;
  color: #755e63;
  font-size: .7rem;
  text-align: center;
}

.site-footer {
  padding: 18px 14px 26px;
  color: var(--muted);
  background: var(--header);
  border-top: 1px solid var(--line);
  font-size: .68rem;
  text-align: center;
}
.site-footer strong { color: var(--gold); }

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  width: min(100%, 480px);
  min-height: 64px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-bottom: env(safe-area-inset-bottom);
  color: #ded8ce;
  background: rgba(12, 12, 15, .97);
  border-top: 1px solid rgba(242, 197, 47, .36);
  box-shadow: 0 -8px 22px rgba(0, 0, 0, .34);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}
.bottom-nav a {
  min-width: 0;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 1px;
}
.bottom-nav span {
  color: var(--gold);
  font-size: 1.05rem;
  line-height: 1;
}
.bottom-nav small {
  font-size: .54rem;
  font-weight: 750;
}
.bottom-primary {
  color: #251400;
  background: linear-gradient(180deg, #ffdd74, #dda21b);
}
.bottom-primary span { color: #75192c; }

a:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: -3px;
}
@media (hover: hover) {
  .game-card,
  .category-nav a,
  .related-card,
  .hero-actions a {
    transition: filter .18s ease, transform .18s ease;
  }
  .game-card:hover,
  .category-nav a:hover,
  .related-card:hover,
  .hero-actions a:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
