/* ─── Rules cheat-sheet inside the overlay ───────────────────────────────────── */

/* Rules takes most of the screen: the panel grows large, stays transparent, and
   only the table reads as a box. Content scrolls over the fixed map if it spills. */
/* Rules panel itself does not scroll. A flex chain lets the cheat-body absorb the
   leftover height and be the single scroller — the panel never clips. */
.landing__panel--rules {
  width: min(96vw, 1100px);
  height: 92vh;
  overflow: hidden;
}

.landing-rules {
  width: 100%;
  text-align: left;
}

.landing__panel--rules .landing__panel-body,
.landing__panel--rules .landing-rules {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* No wrapper box — the cheat-body is just the (single, scrollbar-hidden) scroller,
   so the map shows between the section boxes and the lamp glows through. */
.landing-rules .cheat-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  background: transparent;
  scrollbar-width: none; /* Firefox */
}

.landing-rules .cheat-body::-webkit-scrollbar {
  display: none; /* WebKit/Blink */
}

/* Each section (Actions, Location cards, Industry cards) is its own box.
   Frosted-glass backdrop blur keeps the parallax visible without bright
   board ribbons reading through the table area. */
.landing-rules .cheat-section {
  margin-bottom: 1.1rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(184, 134, 30, 0.35);
  border-radius: 10px;
  background: rgba(16, 10, 3, 0.68);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.landing-rules .cheat-section:last-child {
  margin-bottom: 0;
}

.landing-rules .cheat-section h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--brass-gold-soft);
}

.landing-rules .cheat-note {
  font-size: 0.8rem;
  color: var(--brass-gold-light);
  margin: 0 0 0.6rem;
}

.landing-rules .cheat-table-wrap {
  overflow-x: auto;
}

/* Brass-dark table colours, independent of light/dark theme tokens. The grid
   is gone — rows and columns are separated by border-spacing alone. */
.landing-rules .cheat-table {
  border-collapse: separate;
  border-spacing: 0.85rem 0.45rem;
  width: 100%;
  font-size: 0.82rem;
  color: var(--brass-gold-warm-pale);
}

.landing-rules .cheat-table th,
.landing-rules .cheat-table td {
  border: none;
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

/* All header cells (column band + row labels) stay brown as before. No gold
   dividers — the brown band sits on the translucent section box. */
.landing-rules .cheat-table thead th,
.landing-rules .cheat-table tbody th {
  background: rgba(60, 38, 12, 0.7);
  color: var(--brass-gold-bright);
  font-weight: 600;
  border-radius: 4px;
}

.landing-rules .cheat-era,
.landing-rules .cheat-wild-row {
  font-style: italic;
  color: var(--brass-gold-muted);
}

/* Ordered-list style for End of Era steps — matches cheat-table column-band
   tone (brown chip on the gold marker). */
.landing-rules .cheat-list {
  margin: 0;
  padding-left: 1.4rem;
  color: var(--brass-gold-warm-pale);
  font-size: 0.88rem;
  line-height: 1.5;
}

.landing-rules .cheat-list li {
  margin-bottom: 0.45rem;
}

.landing-rules .cheat-list li:last-child {
  margin-bottom: 0;
}

.landing-rules .cheat-list strong {
  color: var(--brass-gold-glow);
  font-weight: 600;
}

/* Tab bar + panels for the Rules cheat-sheet. The tabs are the topmost element
   of the cheat-body scroller — they scroll out of view with the rest of the
   panel content. No sticky band so there's no opaque strip sitting over the map. */
.landing-rules .cheat-tabs__bar {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  background: transparent;
}

.landing-rules .cheat-tabs__btn {
  flex: 1;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(184, 134, 30, 0.3);
  border-radius: 6px;
  background: rgba(20, 12, 4, 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: var(--brass-gold-light);
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}

.landing-rules .cheat-tabs__btn:hover,
.landing-rules .cheat-tabs__btn:focus-visible {
  background: rgba(40, 24, 8, 0.85);
  border-color: rgba(220, 170, 50, 0.55);
  color: var(--brass-gold-bright);
  outline: none;
}

.landing-rules .cheat-tabs__btn.is-active {
  background: rgba(80, 48, 12, 0.92);
  color: var(--brass-gold-glow);
  border-color: rgba(220, 170, 50, 0.75);
}

.landing-rules .cheat-tabs__panel[hidden] {
  display: none;
}
