[hidden] { display: none !important; }

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

html {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  color: #E7E2D6;
  background: #121417;
  color-scheme: dark;
  font-family: Literata, Palatino, "Palatino Linotype", serif;
  font-size: 1.05rem;
  line-height: 1.55;
  padding-bottom: 5.5rem;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea { max-width: 100%; }

a { color: #E7E2D6; }

:focus-visible {
  outline: 2px solid #B6F25C;
  outline-offset: 2px;
}

::selection {
  background: #B6F25C;
  color: #121417;
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 90;
  background: #B6F25C;
  color: #121417;
  padding: 0.4rem 0.65rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  text-decoration: none;
}

.skip:focus { top: 0.5rem; }

.sheet {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 2.5rem 1.75rem;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(231, 226, 214, 0.38) 0 1px,
    transparent 1px 8px
  );
  background-size: 14px 100%;
  background-repeat: no-repeat;
  background-position: 6px 0;
  border-left: 3px solid #B6F25C;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem 1.2rem;
  padding: 1.05rem 0 1.15rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid #E7E2D6;
  background: #121417;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #E7E2D6;
  text-decoration: none;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.site-nav,
.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1rem;
}

.header-actions { margin-left: auto; }

.site-nav a {
  color: #E7E2D6;
  text-decoration: none;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.92rem;
}

.site-nav a[aria-current="page"],
.kicker,
.site-footer h2 { color: #B6F25C; }

button,
.play-link {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.9rem;
  line-height: 1.2;
  background: #B6F25C;
  color: #121417;
  border: 1px solid #B6F25C;
  padding: 0.55rem 0.8rem;
  text-decoration: none;
  cursor: pointer;
}

button.quiet {
  background: #121417;
  color: #E7E2D6;
  border-color: #E7E2D6;
}

button:hover,
.play-link:hover,
button.quiet:hover {
  background: #E7E2D6;
  border-color: #E7E2D6;
  color: #121417;
}

#player-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

#player-name {
  overflow-wrap: anywhere;
  max-width: 12rem;
}

h1,
h2,
h3 { font-weight: 600; line-height: 1.2; }

h1 {
  margin: 0.15rem 0 0.7rem;
  font-size: clamp(2rem, 4.4vw, 3.35rem);
}

h2 { margin: 0 0 0.7rem; font-size: 1.55rem; }

h3 { margin: 0 0 0.35rem; font-size: 1.15rem; }

p { overflow-wrap: break-word; }

.kicker {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.85rem;
}

.hero,
.how-it-works {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
  gap: 1.35rem;
  align-items: end;
}

.how-it-works { align-items: start; margin-top: 2.6rem; }

.hero img,
.how-it-works img,
.band img {
  width: 100%;
  display: block;
  border: 1px solid #E7E2D6;
}

.hero-copy p:last-child { margin-bottom: 0; }

.text-link {
  display: inline-block;
  margin-top: 0.4rem;
  color: #B6F25C;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 2rem 0 0;
}

.facts p {
  margin: 0;
  padding-top: 0.55rem;
  border-top: 2px solid #B6F25C;
  background: #121417;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1.2rem;
}

.games { margin-top: 2.6rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.game-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem;
  border: 1px solid #E7E2D6;
  background: #121417;
}

.game-card img { width: 100%; display: block; }

.game-card p { margin: 0; flex: 1; }

.play-link { align-self: flex-start; }

.how-it-works ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
  counter-reset: step;
}

.how-it-works li {
  border-top: 1px solid #E7E2D6;
  padding-top: 0.7rem;
  counter-increment: step;
  background: #121417;
}

.how-it-works h3::before {
  content: counter(step);
  display: inline-block;
  min-width: 1.45rem;
  margin-right: 0.4rem;
  background: #B6F25C;
  color: #121417;
  text-align: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 500;
}

.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 2.6rem;
}

.features h2 { grid-column: 1 / -1; }

.features article {
  min-width: 0;
  border-top: 2px solid #E7E2D6;
  padding-top: 0.7rem;
  background: #121417;
}

.band { margin-top: 2.6rem; }

.band img {
  border-left: 0;
  border-right: 0;
  border-top: 2px solid #B6F25C;
  border-bottom: 1px solid #E7E2D6;
}

.prose { max-width: 40rem; }

.prose h1 { margin-top: 0.2rem; }

.prose p { line-height: 1.65; }

.prose a { color: #B6F25C; }

.contact-form {
  display: grid;
  gap: 0.4rem;
  max-width: 32rem;
  margin-top: 0.5rem;
}

label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
}

input,
textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #E7E2D6;
  background: #121417;
  color: #E7E2D6;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.95rem;
}

textarea { min-height: 8rem; resize: vertical; }

input[type="checkbox"] {
  width: auto;
  accent-color: #B6F25C;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.35rem 0;
}

.check-row label { font-size: 0.92rem; }

#contact-ok {
  border-left: 3px solid #B6F25C;
  padding-left: 0.7rem;
}

#login-error,
#signup-error {
  margin: 0.2rem 0;
  padding: 0.45rem 0.6rem;
  background: #B6F25C;
  color: #121417;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.85rem;
}

.site-footer {
  margin-top: 3rem;
  padding-top: 1.15rem;
  border-top: 1px solid #E7E2D6;
  background: #121417;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1.15fr);
  gap: 1.2rem;
}

.footer-brand img { display: block; }

.footer-brand strong {
  display: block;
  margin: 0.45rem 0 0.2rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.site-footer h2 {
  margin: 0 0 0.45rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 500;
}

.site-footer nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
}

.site-footer nav a { text-decoration: none; }

.footer-grid > div > a {
  display: block;
  margin-top: 0.28rem;
  overflow-wrap: anywhere;
}

.age-badge {
  display: inline-block;
  margin-bottom: 0.4rem;
  padding: 0.1rem 0.35rem;
  background: #B6F25C;
  color: #121417;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 500;
}

.footer-base {
  margin: 1.2rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid #E7E2D6;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: auto;
  background: #121417;
}

#age-gate { z-index: 80; }

.dialog-panel {
  width: min(26rem, 100%);
  padding: 1.2rem 1.1rem 1.1rem;
  border: 1px solid #E7E2D6;
  border-left: 4px solid #B6F25C;
  background: #121417;
}

.dialog-panel form { display: grid; gap: 0.4rem; }

.dialog-panel button { margin-top: 0.55rem; margin-right: 0.4rem; }

#age-denied {
  margin: 0.8rem 0 0;
  color: #B6F25C;
}

#cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  background: #121417;
  border-top: 2px solid #B6F25C;
}

#cookie-banner p {
  margin: 0;
  flex: 1 1 16rem;
  min-width: 0;
}

#cookie-banner a { color: #B6F25C; }

@media (max-width: 900px) {
  .hero,
  .how-it-works,
  .card-grid { grid-template-columns: minmax(0, 1fr); }

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

  .facts,
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .facts,
  .features,
  .footer-grid { grid-template-columns: minmax(0, 1fr); }

  .sheet { width: calc(100% - 1rem); }
}
