/* ── Homepage v2 (flag: homepage_v2) ─────────────────────────────────────
   All v2 band styling lives here (program plan R3: keep it out of menu.css /
   settings.css / style.css so the Phase-9 v1 deletion is a clean sweep).
   Everything rides the theme tokens so all 16 themes work untouched.
   #screen-menu already carries the tall-page override in menu.css — nothing
   here re-centers the screen. */

.home-panels {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 24px 40px 0;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.home-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* display:flex above would beat the UA's [hidden] rule — conditional bands
   (live-now, recently-played) hide via this attribute, so it must win. */
.home-panel[hidden] {
  display: none;
}

.home-panel-heading {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-pixel);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--text);
}

.home-panel-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.home-zero-label {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.home-zero-copy {
  margin: 0;
  max-width: 620px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
  text-wrap: pretty;
}

.home-zero-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 12px;
  white-space: nowrap;
}

.home-panel-error {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
}

.home-panel-retry {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.home-panel-retry:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 768px) {
  .home-panels {
    padding: 16px 16px 0;
    gap: 28px;
  }
}

/* ── Hero band (Phase 2) ─────────────────────────────────────────────── */
/* The section hosts the relocated #theme-showcase as its backdrop layer;
   hero content renders above it. The showcase's own readout pills are the
   old content-free hero — hidden here, untouched in the 16 theme templates. */

.home-hero-section {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.home-hero-section > #theme-showcase {
  position: absolute;
  inset: 0;
  height: 100% !important;
  z-index: 0;
  /* Backdrop, never UI: showcase templates carry knobs/wordmarks that must
     not intercept or overlap hero controls (PR #203 review: the Game Boy
     wordmark sat over the starter tiles). */
  pointer-events: none;
}

/* Theme-agnostic scrim between the showcase (z 0) and hero content (z 2):
   every template — aurora bands or Game Boy console art — reads as dimmed
   texture, matching the design mock's own gradient overlay. Hiding
   per-template foregrounds would mean editing 16 showcase templates. */
/* The scrim mixes from the THEME's own background, never a fixed dark:
   hero text uses var(--text)/var(--text-dim), whose contrast is audited
   against each theme's --bg (a11y-static) — a hardcoded dark scrim put
   light themes' dark text on a dark film at ~1.1:1 (PR #203 re-review). */
.home-hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--bg) 90%, transparent) 0%,
    color-mix(in srgb, var(--bg) 74%, transparent) 52%,
    color-mix(in srgb, var(--bg) 90%, transparent) 100%);
}

.home-hero-section .sc-aurora-panel { display: none; }

.home-hero-section .home-panel-heading {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.home-hero-section .home-panel-body { position: relative; z-index: 2; }

.home-hero { display: flex; flex-direction: column; }

.home-hero-content {
  display: grid;
  grid-template-columns: auto 1fr minmax(240px, 320px);
  gap: 36px;
  align-items: center;
  padding: 30px 34px 26px;
}

.home-hero-art, .home-hero-cover-blank.home-hero-art {
  width: 152px;
  height: 202px;
  border-radius: 6px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.home-hero-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.home-hero-chips { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.home-hero-chip {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 5px 9px;
  border-radius: 3px;
  white-space: nowrap;
}

.home-hero-chip-accent {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.home-hero-proof { font-size: 12px; color: var(--text-dim); white-space: nowrap; }

.home-hero-title {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(18px, 2.4vw, 30px);
  line-height: 1.4;
  letter-spacing: 1px;
  color: var(--text);
  text-shadow: 0 0 22px rgba(0, 229, 160, 0.35);
}

.home-hero-blurb {
  margin: 0;
  max-width: 560px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
  text-wrap: pretty;
}

.home-hero-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px; }

.home-hero-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 13px;
  letter-spacing: 2px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 16px 30px;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 0 28px rgba(0, 229, 160, 0.4);
}

.home-hero-queue {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  padding: 16px 22px;
  border-radius: var(--radius);
  cursor: pointer;
}
.home-hero-queue[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); cursor: default; }

.home-hero-lb-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }

.home-hero-status { margin: 0; min-height: 1em; font-size: 11px; color: var(--text-dim); }

.home-hero-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

.home-hero-side-label {
  display: block;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.home-hero-join {
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-hero-join-row { display: flex; gap: 8px; }

.home-hero-join-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-pixel);
  font-size: 13px;
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
  padding: 12px 0;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent2);
}

.home-hero-join-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent2);
  background: transparent;
  border: 1px solid var(--accent2);
  padding: 0 16px;
  border-radius: var(--radius);
  cursor: pointer;
}

.home-hero-surprise {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "label die" "sub die";
  align-items: center;
  gap: 2px 12px;
  text-align: left;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  color: var(--text);
}
.home-hero-surprise .home-hero-side-label { grid-area: label; color: var(--text); }
.home-hero-surprise-sub { grid-area: sub; font-size: 11px; color: var(--text-dim); }
.home-hero-surprise-die { grid-area: die; font-size: 20px; }

.home-hero-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 34px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
}

.home-hero-strip-label {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--text-dim);
  white-space: nowrap;
}

.home-hero-strip-art, .home-hero-cover-blank.home-hero-strip-art {
  width: 30px; height: 40px;
  border-radius: 3px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}

.home-hero-strip-title { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-hero-strip-meta { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.home-hero-strip-spacer { flex: 1; }
.home-hero-strip-more { font-size: 12px; color: var(--text-dim); white-space: nowrap; }

.home-hero-continue {
  font-size: 12px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  padding: 8px 14px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.home-hero-starters { display: flex; gap: 16px; flex-wrap: wrap; }

.home-hero-starter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 140px;
}

.home-hero-starter-art, .home-hero-cover-blank.home-hero-starter-art {
  width: 140px; height: 186px;
  border-radius: 6px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--surface);
}

.home-hero-starter-title { font-size: 12px; color: var(--text); }

.home-hero-starter-play {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 1px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 12px 0;
  border-radius: 5px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .home-hero-content { grid-template-columns: 1fr; gap: 20px; padding: 20px 16px; }
  .home-hero-art { display: none; }
  .home-hero-strip { flex-wrap: wrap; padding: 12px 16px; }
}
