/* Play Flags — shared stylesheet
   Matches the original site's visual grammar as closely as possible:
   - ONE blue outer frame (#0000FF) around the whole page, sharp corners.
   - Yellow (#FFFF00) used ONLY as thin, full-width horizontal divider
     lines between major sections — never as an underline/accent/box border.
   - No grey panel boxes. White page, white frame interior.
   - No rounded corners anywhere. */
:root {
  --blue: #0000ff;          /* exact original blue */
  --blue-hover: #0000cc;
  --blue-ink: #000a80;
  --yellow: #ffff00;        /* exact original yellow */
  --ink: #16181d;
  --muted: #5b616e;
  --bg: #ffffff;
  --line: #dcdfe8;          /* neutral gray for incidental borders only */
  --wrap: 66rem;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.06);
  --divider-h: 5px;         /* thickness of the yellow divider rule */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}

img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: var(--blue-hover); }

h1, h2, h3 { line-height: 1.2; color: var(--ink); }
h2 { font-size: 1.55rem; margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 1.75rem 0 .5rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

/* ---------- The single outer frame ---------- */
.site-frame {
  max-width: var(--wrap);
  margin: 1.25rem auto;
  border: 4px solid var(--blue);
  border-radius: 0;
  background: #fff;
}

/* ---------- Yellow divider rule ---------- */
/* The only other use of the theme colors: a plain yellow line marking a
   section break, same as the original site's <hr color=yellow>. */
.divider {
  border: 0; height: var(--divider-h); margin: 0;
  background: var(--yellow); border-radius: 0;
}

/* ---------- Logo + nav (same on every page, not sticky) ---------- */
.logo-band { text-align: center; padding: 1.75rem 1.25rem; }
.logo-band img { height: 120px; width: auto; }

.nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .5rem 2.5rem; padding: 1rem 1.25rem;
}
.nav-links {
  display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0;
  width: 100%; gap: .5rem 1rem;
}
.nav-links li { flex: 1 1 0; text-align: center; }
.nav-links a {
  display: inline-block; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.75rem;
}
.nav-links a:hover { color: var(--blue); }
.nav-links a[aria-current="page"] { color: var(--blue); }
.nav-toggle, .burger { display: none; }

@media (max-width: 560px) {
  .nav-links li { flex: 1 1 45%; }
  .nav-links a { font-size: 1.25rem; }
}

/* ---------- Page shell ---------- */
main { padding: 0; }
main > .wrap { padding-top: 1.75rem; padding-bottom: 1.75rem; }
.page-title { margin: 0 0 .25rem; font-size: 2rem; }
.lede { color: var(--muted); font-size: 1.1rem; margin: 0 0 1.25rem; }

.intro-grid { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; align-items: start; }
.intro-grid img { border-radius: 0; width: 100%; object-fit: cover; border: 1px solid var(--line); }
@media (max-width: 620px) { .intro-grid { grid-template-columns: 1fr; } }

.sec { scroll-margin-top: 20px; }

/* ---------- Two-column split on wide screens ---------- */
.split { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }

/* ---------- Buttons / social ---------- */
.btn {
  display: inline-block; background: var(--blue); color: #fff; text-decoration: none;
  font-weight: 700; padding: .7rem 1.15rem; border-radius: 0; border: 0; cursor: pointer;
}
.btn:hover { background: var(--blue-hover); color: #fff; }
.social { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1rem 0; }
.social a {
  display: inline-flex; align-items: center; gap: .45rem; text-decoration: none;
  border: 1px solid var(--line); background: #fff; padding: .4rem .8rem; border-radius: 0;
  font-weight: 600; color: var(--ink);
}
.social a:hover { border-color: var(--blue); color: var(--blue); }
.social img { height: 18px; width: auto; }

/* ---------- Signup form ---------- */
.signup { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .75rem; }
.signup input[type=email] {
  flex: 1 1 240px; padding: .7rem .9rem; border: 1px solid var(--line);
  border-radius: 0; font-size: 1rem;
}
.signup input[type=email]:focus { outline: 2px solid var(--blue); border-color: var(--blue); }

/* ---------- Responsive embeds ---------- */
.embed { position: relative; width: 100%; border-radius: 0; overflow: hidden; border: 1px solid var(--line); }
.embed::before { content: ""; display: block; padding-top: 66%; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed.tall::before { padding-top: 120%; }
.embed.short { height: 380px; }
.embed.short::before { display: none; }
.embed.match-h { height: 480px; }
.embed.match-h::before { display: none; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem; }
.card {
  display: block; text-decoration: none; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 0;
  padding: 1rem 1.1rem; font-weight: 600;
}
.card:hover, .card.active { border-color: var(--blue); background: #f5f6ff; }
.card .place { color: var(--muted); font-weight: 500; font-size: .9rem; }
.group-label { margin: 2rem 0 .75rem; font-weight: 700; color: var(--ink); }

/* ---------- Arenae interactive map ---------- */
.arenae-layout { display: grid; grid-template-columns: 380px 1fr; gap: 1.5rem; align-items: start; }
.arena-map-col { position: sticky; top: 1.25rem; }
#arena-map {
  height: min(70vh, 620px); min-height: 320px;
  border: 1px solid var(--line); border-radius: 0;
}
.arena-pin {
  background: transparent; border: 0; transform-origin: 50% 100%;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.5));
  transition: transform .15s ease-out;
}
.arena-pin-active { transform: scale(1.35); filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
@media (max-width: 860px) {
  .arenae-layout { grid-template-columns: 1fr; }
  .arena-map-col { position: static; top: auto; }
  #arena-map { height: 320px; }
}

/* ---------- Arena variants ---------- */
.variant { border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 1.5rem; }
.variant:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.variant .row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.variant.with-thumb .row { grid-template-columns: 1fr 160px; align-items: start; }
.variant .thumb img { border-radius: 0; border: 1px solid var(--line); }
@media (max-width: 560px) { .variant.with-thumb .row { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 0; }
table.data { border-collapse: collapse; width: 100%; min-width: 460px; font-size: .96rem; }
table.data th, table.data td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid var(--line); }
table.data thead th { font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--ink); }
table.data a { text-decoration: none; font-weight: 600; }
table.data tr.record { background: #fffbdd; }
table.data tr.record td { font-weight: 700; }

/* ---------- Rules ---------- */
.rules-buy { display: grid; grid-template-columns: 180px 1fr; gap: 1.25rem; align-items: center; }
.rules-buy img.cover { border-radius: 0; width: 100%; border: 1px solid var(--line); }
@media (max-width: 560px) { .rules-buy { grid-template-columns: 1fr; text-align: center; } }
.rules h3 { color: var(--blue-ink); }
.rules ul { padding-left: 1.2rem; }
.rules li { margin: .5rem 0; }

/* ---------- History: stat tiles ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; margin: 1.75rem 0 0; }
.stat { border: 1px solid var(--line); border-radius: 0; padding: 1rem 1.1rem; background: #fff; }
.stat b { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--blue); }
.stat span { color: var(--muted); font-size: .9rem; font-weight: 600; }

/* ---------- History: timeline ---------- */
.timeline { position: relative; margin: 1.5rem 0 0; padding-left: 1.75rem; }
.timeline::before { content: ""; position: absolute; left: 6px; top: .4rem; bottom: .4rem; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 1.5rem; }
.tl-item::before { content: ""; position: absolute; left: -1.75rem; top: .35rem; width: 12px; height: 12px;
  background: var(--blue); border-radius: 50%; }
.tl-item .yr { font-weight: 800; color: var(--blue); letter-spacing: .01em; }
.tl-item h3 { margin: .1rem 0 .35rem; }
.tl-item p { margin: 0; }

/* ---------- Image detail page ---------- */
.figure { text-align: center; }
.figure img { border-radius: 0; border: 1px solid var(--line); }
.figure figcaption { color: var(--muted); margin-top: .9rem; }

/* ---------- Footer ---------- */
.site-footer { color: var(--muted); font-size: .92rem; }
.site-footer .wrap { padding-top: 1.75rem; padding-bottom: 1.75rem; text-align: center; }
.site-footer a { color: var(--blue); }
.back-link { display: inline-block; margin-bottom: 1rem; font-weight: 600; text-decoration: none; }
