[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;
  background: #E7F0D8;
  color: #3D2B1F;
  font-family: Nunito, "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
}

body:has(#cookie-banner:not([hidden])) {
  padding-bottom: 5.5rem;
}

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

h1, h2, h3 {
  font-family: Lora, Georgia, serif;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

h1 { font-size: clamp(2rem, 4vw, 3.35rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); margin: 0 0 0.7rem; }
h3 { font-size: 1.25rem; margin: 0 0 0.35rem; }

p, li { overflow-wrap: anywhere; }

a { color: #5C7A3A; }

button, .btn, .play-link {
  font-family: Nunito, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  background: #5C7A3A;
  color: #E7F0D8;
  border: 1px solid #3D2B1F;
  border-radius: 4px;
  padding: 0.55rem 0.95rem;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  line-height: 1.3;
}

button:hover, .btn:hover, .play-link:hover {
  background: #3D2B1F;
  color: #E7F0D8;
}

button.quiet {
  background: transparent;
  color: #3D2B1F;
}

button.quiet:hover {
  background: #3D2B1F;
  color: #E7F0D8;
}

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

.site-header {
  background: #3D2B1F;
  color: #E7F0D8;
}

.header-row {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.1rem;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #E7F0D8;
  text-decoration: none;
  font-weight: 700;
  min-width: 0;
}

.brand img { width: 40px; height: 40px; flex: 0 0 auto; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
}

.site-nav a {
  color: #E7F0D8;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
}

.account-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

#player-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

#player-name { color: #E7F0D8; font-weight: 700; }

.bed {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  border-top: 1px solid #5C7A3A;
  min-width: 0;
}

.bed-mark {
  background: #3D2B1F;
  color: #E7F0D8;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  font-family: Lora, Georgia, serif;
  letter-spacing: 0.14em;
  font-size: 0.92rem;
  padding: 1rem 0;
}

.bed-body {
  min-width: 0;
  padding: 1.8rem 1.25rem 2.1rem;
  background: #E7F0D8;
}

.bed-soil .bed-body { background: #3D2B1F; color: #E7F0D8; }
.bed-soil .bed-body a { color: #E7F0D8; }

.bed-inner { max-width: 1080px; min-width: 0; }

.eyebrow {
  margin: 0 0 0.35rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: #5C7A3A;
  font-weight: 700;
}

.hero-grid, .how-grid {
  display: grid;
  gap: 1.4rem;
  align-items: center;
  min-width: 0;
}

.hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); }
.how-grid { grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); align-items: start; }

.hero-grid img, .how-grid img, .plot img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 1px solid #3D2B1F;
}

.hero-grid img { aspect-ratio: 3 / 2; }
.how-grid img { aspect-ratio: 1; }
.plot img { aspect-ratio: 4 / 3; }

.lede { font-size: 1.12rem; margin: 0 0 0.8rem; }

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

.fact-row p, .plot, .steps li, .features li {
  margin: 0;
  border: 1px solid #3D2B1F;
  background: #E7F0D8;
  min-width: 0;
}

.fact-row p { padding: 1rem 0.95rem; }
.fact-row strong { display: block; font-family: Lora, Georgia, serif; font-size: 1.55rem; font-weight: 500; }

.plot {
  display: flex;
  flex-direction: column;
  padding: 0 0 0.95rem;
}

.plot h3, .plot p { margin-left: 0.9rem; margin-right: 0.9rem; }
.plot h3 { margin-top: 0.85rem; }
.plot .play-link { margin: auto 0.9rem 0; align-self: flex-start; }

.plot:hover { outline: 2px solid #5C7A3A; outline-offset: -2px; }

.steps, .features {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.steps { grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: step; }
.features { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.steps li, .features li { padding: 0.85rem; }

.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: Lora, Georgia, serif;
  color: #5C7A3A;
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.band-row { border-top: 1px solid #5C7A3A; min-width: 0; }
.band-row img {
  width: 100%;
  height: min(42vw, 420px);
  max-height: 420px;
  object-fit: cover;
}

.prose { display: grid; gap: 0.9rem; }
.prose p { margin: 0; }
.prose h1 { margin-bottom: 0.4rem; }

form {
  display: grid;
  gap: 0.4rem;
  max-width: 36rem;
  min-width: 0;
}

label { font-weight: 700; }

input, textarea {
  width: 100%;
  max-width: 100%;
  background: #E7F0D8;
  color: #3D2B1F;
  border: 1px solid #3D2B1F;
  border-radius: 4px;
  padding: 0.6rem 0.7rem;
  font: inherit;
}

.age-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin: 0.35rem 0;
}

.age-line input { width: auto; }

.form-actions, .sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.form-error, #age-denied, #contact-ok {
  margin: 0.4rem 0 0;
  padding: 0.65rem 0.75rem;
  background: #3D2B1F;
  color: #E7F0D8;
}

#contact-ok { max-width: 36rem; }

#age-gate, #login-modal, #signup-modal {
  position: fixed;
  inset: 0;
  background: rgba(61, 43, 31, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

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

.sheet {
  width: min(28rem, 100%);
  max-height: min(90vh, 42rem);
  overflow-x: hidden;
  overflow-y: auto;
  background: #E7F0D8;
  color: #3D2B1F;
  border: 2px solid #5C7A3A;
  border-radius: 6px;
  padding: 1.2rem 1.15rem 1.3rem;
}

.sheet form { max-width: none; }
.sheet h2 { margin-top: 0; }

#cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  background: #3D2B1F;
  color: #E7F0D8;
  padding: 0.9rem 1.25rem;
}

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

.site-footer {
  background: #3D2B1F;
  color: #E7F0D8;
  border-top: 1px solid #5C7A3A;
}

.site-footer a { color: #E7F0D8; }

.footer-grid {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.25rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.4rem;
}

.footer-grid nav, .footer-grid > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

.site-footer h2 {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
  color: #E7F0D8;
}

.footer-brand p, .footer-base { margin: 0; }
.footer-brand img { width: 40px; height: 40px; }

.age-badge {
  display: inline-block;
  border: 2px solid #E7F0D8;
  color: #E7F0D8;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.footer-base {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.4rem 1.25rem 1.5rem;
  font-size: 0.92rem;
}

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

@media (max-width: 800px) {
  .hero-grid, .how-grid, .fact-row, .card-row, .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .bed { grid-template-columns: minmax(0, 1fr); }
  .bed-mark {
    writing-mode: horizontal-tb;
    letter-spacing: 0.08em;
    justify-content: flex-start;
    padding: 0.4rem 1rem;
  }
  .features, .footer-grid { grid-template-columns: 1fr; }
  .band-row img { height: auto; max-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
