/* ===== Quisqueya: shared styles for every page ===== */
:root {
  --blue: #0b3c8c;
  --blue-2: #1558c0;
  --red: #ce1126;
  --green: #1e7b4f;
  --gold: #e8a317;
  --bg: #fbf6ea;
  --surface: #ffffff;
  --surface-2: #f4e9d2;
  --ink: #14213d;
  --muted: #56617a;
  --line: #e6dcc4;
  --shadow: 0 10px 30px rgba(20, 33, 61, 0.12);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] {
  --bg: #0b1324;
  --surface: #14213d;
  --surface-2: #1b2b4d;
  --ink: #f4efe1;
  --muted: #aeb8d0;
  --line: #2a3b60;
  --blue: #6ea0ff;
  --blue-2: #8db4ff;
  --red: #ff5a6b;
  --green: #4fc98a;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  transition: background 0.3s, color 0.3s;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--red); color: #fff; padding: 0.6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* ----- Navigation (same place on every page) ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--blue);
}
.site-header::after {
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, var(--blue) 0 33%, #fff 33% 66%, var(--red) 66%);
  position: absolute; left: 0; right: 0; bottom: -6px;
}
.bar { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 800; font-size: 1.45rem;
  color: var(--ink); text-decoration: none; margin-right: auto;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 6px; flex: none;
  background:
    linear-gradient(#fff, #fff) center / 100% 6px no-repeat,
    linear-gradient(#fff, #fff) center / 6px 100% no-repeat,
    linear-gradient(135deg, var(--blue) 0 50%, var(--red) 50%);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.15);
}
.nav { display: flex; gap: 0.25rem; }
.nav a {
  padding: 0.5rem 0.9rem; border-radius: 999px; text-decoration: none;
  color: var(--ink); font-weight: 700; transition: background 0.2s, color 0.2s;
}
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--blue); color: #fff; }
:root[data-theme="dark"] .nav a[aria-current="page"] { color: #0b1324; }
.tools { display: flex; gap: 0.4rem; }
.icon-btn {
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  min-width: 44px; height: 44px; border-radius: 12px; font: 800 0.95rem var(--font-body);
  cursor: pointer; transition: transform 0.15s, border-color 0.2s;
}
.icon-btn:hover { border-color: var(--blue); transform: translateY(-1px); }
.nav-toggle { display: none; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--red); color: #fff; border: 0; cursor: pointer;
  padding: 0.8rem 1.4rem; border-radius: 999px; font: 800 1rem var(--font-body);
  text-decoration: none; transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 6px 16px rgba(206, 17, 38, 0.3);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn.alt { background: var(--blue); box-shadow: 0 6px 16px rgba(11, 60, 140, 0.3); }
:root[data-theme="dark"] .btn.alt { color: #0b1324; }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); box-shadow: none; }
.btn.small { padding: 0.5rem 1rem; font-size: 0.9rem; }

/* ----- Sections ----- */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.tinted { background: var(--surface-2); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-weight: 800; font-size: 0.8rem; color: var(--red); margin-bottom: 0.5rem; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.section-head { margin-bottom: 2rem; }

/* ----- Hero ----- */
.hero {
  position: relative; color: #fff; padding: clamp(5rem, 14vw, 9rem) 0;
  background-color: #0b2a5c;
  background-position: center;
  background-size: cover;
}
.hero.short { padding: clamp(3.5rem, 9vw, 6rem) 0; }
.hero h1 { color: #fff; max-width: 17ch; text-shadow: 0 3px 20px rgba(0, 0, 0, 0.4); }
.hero p { font-size: 1.25rem; max-width: 52ch; }
.hero .eyebrow { color: #ffd166; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }
.hero .btn.ghost { color: #fff; border-color: #fff; }

/* ----- Stats strip ----- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-top: -3rem; position: relative; z-index: 2; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 1.3rem; text-align: center; box-shadow: var(--shadow); border-top: 5px solid var(--blue); }
.stat:nth-child(even) { border-top-color: var(--red); }
.stat .num { font: 800 2.2rem var(--font-display); color: var(--blue); }
.stat:nth-child(even) .num { color: var(--red); }
.stat .label { font-size: 0.9rem; color: var(--muted); font-weight: 700; }

/* ----- Cards ----- */
.grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  display: flex; flex-direction: column; transition: transform 0.2s;
}
.card:hover { transform: translateY(-4px); }
.card img { width: 100%; height: 190px; object-fit: cover; }
.card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.card-body h3 { margin: 0; }
.card-body p { color: var(--muted); font-size: 0.97rem; margin: 0; flex: 1; }
.tag {
  display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem; border-radius: 999px; color: #fff; background: var(--blue); width: fit-content;
}
.tag.beach { background: #0a8fb3; } .tag.city { background: var(--red); }
.tag.nature { background: var(--green); } .tag.history { background: #8a5a14; }
.card.text-card { padding: 1.4rem; border-left: 6px solid var(--red); }
.card.text-card:nth-child(even) { border-left-color: var(--blue); }
.card.text-card h3 { margin-bottom: 0.3rem; }
.card.text-card p { color: var(--muted); }

/* ----- Two column ----- */
.split { display: grid; gap: 2.5rem; grid-template-columns: 1fr 1fr; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 100%; max-height: 420px; object-fit: cover; }
.checklist { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.checklist li { padding-left: 1.9rem; position: relative; margin-bottom: 0.6rem; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }

/* ----- Fact box ----- */
.fact-box {
  background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff;
  border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.6rem); text-align: center; box-shadow: var(--shadow);
}
:root[data-theme="dark"] .fact-box { background: linear-gradient(135deg, #1a3a78, #2b56a8); }
.fact-box .fact-text { font: 600 clamp(1.2rem, 2.6vw, 1.6rem) var(--font-display); min-height: 4.5em; display: grid; place-items: center; }
.fact-box .btn { background: #fff; color: var(--blue); box-shadow: none; }
:root[data-theme="dark"] .fact-box .btn { color: #0b1324; }

/* ----- Filters ----- */
.toolbar { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; margin-bottom: 1.6rem; }
.chip {
  border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 0.45rem 1rem; border-radius: 999px; font: 800 0.9rem var(--font-body); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
:root[data-theme="dark"] .chip[aria-pressed="true"] { color: #0b1324; }
.search {
  flex: 1; min-width: 200px; padding: 0.65rem 1rem; border-radius: 999px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 1rem var(--font-body);
}
.empty { text-align: center; color: var(--muted); padding: 2rem; }

/* ----- Modal ----- */
.modal-back { position: fixed; inset: 0; background: rgba(5, 12, 28, 0.7); display: none; place-items: center; z-index: 80; padding: 1rem; }
.modal-back.open { display: grid; }
.modal { background: var(--surface); border-radius: var(--radius); max-width: 760px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: var(--shadow); position: relative; }
.modal img { width: 100%; height: 280px; object-fit: cover; }
.modal-body { padding: 1.5rem 1.8rem 1.8rem; }
.modal-close { position: absolute; top: 12px; right: 12px; background: var(--surface); }
.modal dl { display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 1rem; margin: 1rem 0 0; }
.modal dt { font-weight: 800; color: var(--red); }
.modal dd { margin: 0; }
.credit { font-size: 0.8rem; color: var(--muted); margin-top: 1rem; }

/* ----- Island map ----- */
.map-wrap { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; border: 1px solid var(--line); }
.map-wrap svg { width: 100%; height: auto; display: block; }
.sea { fill: color-mix(in srgb, var(--blue) 14%, var(--surface)); }
.land { fill: color-mix(in srgb, var(--green) 35%, var(--surface-2)); stroke: var(--green); stroke-width: 2; stroke-linejoin: round; }
.pin { cursor: pointer; }
.pin circle { fill: var(--red); stroke: #fff; stroke-width: 3; transition: r 0.15s; }
.pin:hover circle, .pin:focus circle { r: 13; }
.pin text { font: 700 15px var(--font-body); fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.map-note { color: var(--muted); font-size: 0.9rem; margin: 0.6rem 0 0; }

/* ----- Timeline slider ----- */
.timeline { background: var(--surface); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); border: 1px solid var(--line); }
.timeline input[type="range"] { width: 100%; accent-color: var(--red); height: 2rem; }
.timeline .year { font: 800 3rem var(--font-display); color: var(--red); line-height: 1; }
.timeline-ticks { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); font-weight: 700; }

/* ----- Accordion (glossary) ----- */
.acc { display: grid; gap: 0.7rem; }
.acc-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.acc-item button {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer; color: var(--ink);
  padding: 1rem 1.2rem; font: 800 1.1rem var(--font-body); display: flex; justify-content: space-between; gap: 1rem;
}
.acc-item button::after { content: "+"; color: var(--red); font-size: 1.4rem; line-height: 1; }
.acc-item button[aria-expanded="true"]::after { content: "–"; }
.acc-panel { padding: 0 1.2rem 1rem; color: var(--muted); display: none; }
.acc-panel.open { display: block; }

/* ----- Timeline of food etc. ----- */
.pill-list { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; list-style: none; margin: 0; }
.pill-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.9rem; font-weight: 700; }

/* ----- True / false quiz ----- */
.tf { background: var(--surface); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); border: 1px solid var(--line); text-align: center; }
.tf .q { font: 600 1.4rem var(--font-display); min-height: 3.5em; display: grid; place-items: center; }
.tf-actions { display: flex; gap: 0.8rem; justify-content: center; margin: 1rem 0; }
.tf-result { min-height: 3.2em; font-weight: 700; }
.good { color: var(--green); } .bad { color: var(--red); }

/* ----- Credits table ----- */
.credits { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.credits th, .credits td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); }
.credits th { color: var(--red); }

/* ----- Footer ----- */
.site-footer { background: #0b1d44; color: #dfe6f7; padding: 3rem 0 1.5rem; margin-top: 2rem; border-top: 6px solid var(--red); }
.site-footer a { color: #ffd166; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: center; }
.site-footer small { opacity: 0.75; }

/* ----- Reveal on scroll ----- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s, transform 0.6s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ========== GAMES ========== */
.game-tabs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.4rem; }
.game-tabs .chip { padding: 0.7rem 1.2rem; font-size: 1rem; }
.game-panel { display: none; }
.game-panel.active { display: block; }
.game-box { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: clamp(1rem, 3vw, 1.8rem); }
.game-top { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.hud { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.hud > span { background: var(--surface-2); padding: 0.3rem 0.9rem; border-radius: 999px; font-weight: 800; font-size: 0.95rem; white-space: nowrap; }
.hud b { color: var(--red); }
.overlay-msg { text-align: center; padding: 1.5rem 0.5rem; }
.overlay-msg h3 { font-size: 1.7rem; }

/* rhythm */
#rhythm-canvas { width: 100%; max-width: 560px; display: block; margin: 0 auto; border-radius: 14px; background: #0b1d44; touch-action: manipulation; }
.lane-help { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 0.6rem; }
.judge { text-align: center; font: 800 1.4rem var(--font-display); min-height: 2rem; margin-top: 0.4rem; }

/* map challenge */
.map-feedback { text-align: center; min-height: 2.4rem; font-weight: 700; margin: 0.6rem 0; }

/* quiz */
.quiz-q { font: 700 1.5rem var(--font-display); text-align: center; margin: 1rem 0; }
.quiz-q small { display: block; font: 600 0.95rem var(--font-body); color: var(--muted); }
.options { display: grid; gap: 0.7rem; grid-template-columns: 1fr 1fr; }
.opt {
  padding: 0.9rem 1rem; border-radius: 14px; border: 2px solid var(--line); background: var(--surface);
  color: var(--ink); font: 700 1rem var(--font-body); cursor: pointer; text-align: left;
}
.opt:hover:not(:disabled) { border-color: var(--blue); }
.opt.correct { background: color-mix(in srgb, var(--green) 25%, var(--surface)); border-color: var(--green); }
.opt.wrong { background: color-mix(in srgb, var(--red) 22%, var(--surface)); border-color: var(--red); }
.timer-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 0.4rem; }
.timer-bar i { display: block; height: 100%; width: 100%; background: var(--green); transform-origin: left; }

/* ========== RESPONSIVE ========== */
@media (max-width: 820px) {
  .nav-toggle { display: inline-block; order: 3; }
  .tools { order: 2; }
  .bar { flex-wrap: wrap; }
  .nav {
    display: none; order: 4; width: 100%; flex-direction: column; padding-bottom: 0.8rem;
  }
  .nav.open { display: flex; }
  .split { grid-template-columns: 1fr; }
  .options { grid-template-columns: 1fr; }
  .stats { margin-top: -2rem; }
}

/* ========== HOME: INTERACTIVE MAP ========== */
.stats.flat { margin-top: 2.5rem; }
.home-map { padding-top: clamp(2.5rem, 5vw, 4rem); }
.map-controls { display: grid; gap: 1rem 1.4rem; grid-template-columns: 1fr auto; align-items: end; margin-bottom: 1.2rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; grid-column: 1 / -1; }
.month-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0.7rem 1rem; }
.month-box label { font-weight: 800; display: block; }
.month-box strong { color: var(--red); }
.month-box input { width: 100%; accent-color: var(--red); }
.month-events { display: flex; flex-wrap: wrap; gap: 0.4rem; min-height: 2rem; align-items: center; }
.muted { color: var(--muted); font-size: 0.92rem; }
.event-pill { border: 0; border-radius: 999px; padding: 0.3rem 0.8rem; font: 800 0.85rem var(--font-body); cursor: pointer; background: var(--red); color: #fff; animation: glow 2s infinite; }
:root[data-theme="dark"] .event-pill { color: #0b1324; }
@keyframes glow { 50% { box-shadow: 0 0 0 6px rgba(206, 17, 38, 0.18); } }

.map-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 1.4rem; align-items: start; }
.big-map { padding: 0.5rem; overflow: hidden; }
#home-map, #places-map { user-select: none; }
#home-map .sea, #places-map .sea { fill: color-mix(in srgb, var(--blue) 16%, var(--surface)); }
.wave { fill: none; stroke: color-mix(in srgb, var(--blue) 40%, transparent); stroke-width: 2; opacity: 0.5; }
.waves { animation: drift 6s linear infinite; }
@keyframes drift { to { transform: translate(-54px, 0); } }
.sea-label { font: 800 15px var(--font-body); letter-spacing: 0.35em; fill: color-mix(in srgb, var(--blue) 55%, var(--muted)); opacity: 0.7; }
.peak { font-size: 20px; fill: var(--green); opacity: 0.35; pointer-events: none; }
.lake { fill: color-mix(in srgb, var(--blue) 40%, var(--surface)); stroke: var(--blue); stroke-width: 1.5; opacity: 0.8; }
.compass circle { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.compass path { fill: var(--red); }
.compass text { font: 800 16px var(--font-body); fill: var(--ink); }
.route { fill: none; stroke: var(--red); stroke-width: 4; stroke-dasharray: 3 11; stroke-linecap: round; stroke-linejoin: round; }



@media (prefers-reduced-motion: reduce) { .waves, .spot.live .halo, .event-pill { animation: none; } }

.spot-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; position: sticky; top: 90px; min-height: 360px; }
.spot-panel.pop { animation: pop 0.35s ease; }
@keyframes pop { from { transform: scale(0.97); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sp-welcome { padding: 2.2rem 1.6rem; text-align: center; display: grid; gap: 0.6rem; justify-items: center; }
.big-emoji { font-size: 4rem; line-height: 1; }
.spot-photo { height: 210px; display: grid; place-items: center; overflow: hidden; }
.spot-photo img { width: 100%; height: 100%; object-fit: cover; }
.spot-body { padding: 1.1rem 1.3rem 1.4rem; }
.spot-body h3 { margin: 0.4rem 0 0.4rem; }
.spot-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.now-badge { font-size: 0.75rem; font-weight: 800; color: var(--red); animation: glow 2s infinite; border: 2px solid var(--red); border-radius: 999px; padding: 0.1rem 0.6rem; }
.spot-fact { background: var(--surface-2); border-radius: 12px; padding: 0.7rem 0.9rem; font-size: 0.97rem; }
.spot-dist { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.8rem; }
.spot-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-controls { grid-template-columns: 1fr; }
  .spot-panel { position: static; }
}

[hidden] { display: none !important; }

/* ========== DOMINOES (square table) ========== */
.dom-frame {
  width: min(100%, 700px); margin: 0 auto; aspect-ratio: 1; padding: 2.4%;
  container-type: inline-size; border-radius: 22px;
  background: linear-gradient(145deg, #7a4a24, #4a2a12 55%, #6b3f1d);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.25);
}
.dom-table {
  position: relative; width: 100%; height: 100%; border-radius: 12px; overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.12), transparent 60%),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 5px),
    #1b7f4d;
  box-shadow: inset 0 0 0 0.5cqw rgba(0, 0, 0, 0.25), inset 0 0 6cqw rgba(0, 0, 0, 0.45);
  color: #fff;
}
.dom-opp { position: absolute; top: 2.5%; left: 3%; right: 3%; display: flex; align-items: center; gap: 2cqw; }
.dom-name { font-weight: 800; font-size: 2.6cqw; background: rgba(0, 0, 0, 0.3); padding: 0.6cqw 2cqw; border-radius: 99px; white-space: nowrap; }
.dom-opp-tiles { display: flex; flex-wrap: wrap; gap: 0.7cqw; }
.dom-ends { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 1.2cqw; font-size: 2.4cqw; font-weight: 800; }
.dom-ends span { opacity: 0.85; }
.dom-ends b { background: var(--gold); color: #3b2300; min-width: 4.2cqw; height: 4.2cqw; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 0 0 0.5cqw rgba(255, 255, 255, 0.4); }
.dom-board { position: absolute; inset: 0; pointer-events: none; }

.tile {
  --w: 9cqw; width: var(--w); height: calc(var(--w) / 2); display: flex; flex: none;
  background: linear-gradient(160deg, #fffdf6, #eee3c8); border-radius: calc(var(--w) * 0.12);
  box-shadow: 0 0.5cqw 0.9cqw rgba(0, 0, 0, 0.45), inset 0 0 0 0.25cqw #c9bc98; position: relative;
}
.tile .half { flex: 1; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 7% 5%; place-items: center; }
.tile .half:first-child { border-right: 0.3cqw solid #9d916f; }
.tile .pip { width: 64%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #555, #0d0d0d); }
.tile::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1cqw; height: 1cqw; margin: -0.5cqw; border-radius: 50%; background: #b8892b; }
.tile.laid { position: absolute; }
.tile.laid.fresh { animation: lay 0.4s ease-out; }
.tile.laid.last { box-shadow: 0 0 0 0.5cqw var(--gold), 0 0.5cqw 0.9cqw rgba(0, 0, 0, 0.45); }
@keyframes lay { from { transform: scale(1.5) translateY(-4cqw); opacity: 0; } to { transform: none; opacity: 1; } }
.tile.back { background: repeating-linear-gradient(45deg, #0b3c8c 0 0.8cqw, #14529f 0.8cqw 1.6cqw); box-shadow: 0 0.3cqw 0.6cqw rgba(0, 0, 0, 0.5), inset 0 0 0 0.2cqw #fff; }
.tile.back .half { display: none; }
.tile.back::after { display: none; }
.tile.mini { --w: 4.6cqw; }

.dom-hand { position: absolute; left: 3%; right: 3%; bottom: 3%; display: flex; flex-wrap: wrap; gap: 1.4cqw; justify-content: center; align-items: flex-end; }
.tile.hand { --w: 11.4cqw; cursor: pointer; transition: transform 0.18s, opacity 0.2s, box-shadow 0.2s; }
.tile.hand.playable { box-shadow: 0 0 0 0.6cqw var(--gold), 0 0 3cqw rgba(232, 163, 23, 0.9); transform: translateY(-1cqw); }
.tile.hand.playable:hover, .tile.hand.picked { transform: translateY(-3cqw); }
.tile.hand.picked { box-shadow: 0 0 0 0.7cqw var(--red), 0 0 3cqw rgba(206, 17, 38, 0.8); }
.tile.hand.blocked { opacity: 0.55; cursor: not-allowed; }
.dom-msg {
  position: absolute; left: 50%; bottom: 27%; transform: translateX(-50%); width: max-content; max-width: 92%;
  background: rgba(0, 0, 0, 0.55); padding: 0.8cqw 3cqw; border-radius: 99px; font-weight: 800; font-size: 2.5cqw; text-align: center;
}
.dom-pick { position: absolute; left: 50%; bottom: 33%; transform: translateX(-50%); display: flex; gap: 2cqw; z-index: 3; }
.dom-pick .btn { font-size: 3cqw; padding: 0.8cqw 3.5cqw; }
.dom-over {
  position: absolute; inset: 0; background: rgba(8, 20, 40, 0.82); display: grid; place-content: center; gap: 1cqw;
  text-align: center; z-index: 5; animation: lay 0.4s ease-out; padding: 4cqw;
}
.dom-over[hidden] { display: none; }
.dom-over h3 { font-size: 8cqw; color: var(--gold); margin: 0; }
.dom-over p { font-size: 3cqw; margin: 0 0 2cqw; }
.dom-over[data-who="cpu"] h3 { color: #ff9aa5; }
.dom-controls { text-align: center; margin: 1.2rem 0 0.6rem; display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.btn.pulse { animation: glow 1.6s infinite; }
@media (prefers-reduced-motion: reduce) { .tile.laid, .dom-over, .btn.pulse { animation: none; } }

.modal-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }
.modal-links .btn.ghost { color: var(--ink); border-color: var(--line); }

/* ========== MAP CHALLENGE (Leaflet) ========== */
.mg-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 1.2rem; align-items: stretch; }
.mg-card { margin: 0; background: var(--surface-2); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); }
.mg-card img { width: 100%; flex: 1; min-height: 220px; max-height: 420px; object-fit: cover; background: var(--line); }
.mg-card figcaption { padding: 0.9rem 1.1rem 1.1rem; display: grid; gap: 0.2rem; }
.mg-card strong { font: 800 1.35rem var(--font-display); }
.mg-mapwrap { position: relative; min-height: 380px; border-radius: 16px; overflow: hidden; border: 2px solid var(--line); }
#mg-map { position: absolute; inset: 0; background: var(--surface-2); cursor: crosshair; }
.mg-offline { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1rem; margin: 0; background: var(--surface-2); font-weight: 700; }
.leaflet-container { font-family: var(--font-body); }
.mg-pin { width: 22px; height: 22px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.mg-pin.you { background: #0b3c8c; } .mg-pin.answer { background: #1e7b4f; }
.mg-tip { font-weight: 800; }
@media (max-width: 820px) { .mg-layout { grid-template-columns: 1fr; } .mg-mapwrap { min-height: 340px; } .mg-card img { min-height: 200px; } }

/* ========== LEGENDS ========== */
.hof-wall { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.plaque {
  position: relative; cursor: pointer; text-align: center; padding: 1.4rem 1rem 1.2rem; color: #2b1a05; font-family: var(--font-body);
  border: 0; border-radius: 14px 14px 40px 40px; display: grid; justify-items: center; gap: 0.4rem;
  background: linear-gradient(160deg, #e9c779, #b7863a 45%, #d9ab55 70%, #8d5f1f);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3), inset 0 0 0 3px rgba(255, 240, 200, 0.55), inset 0 0 0 7px rgba(110, 70, 15, 0.35);
  transition: transform 0.2s;
}
.plaque:hover, .plaque:focus-visible { transform: translateY(-6px) rotate(-0.8deg); }
.plaque strong { font: 800 1.1rem var(--font-display); }
.plaque-year { font: 800 1.9rem var(--font-display); letter-spacing: 0.04em; }
.plaque-role { font-size: 0.82rem; font-weight: 700; opacity: 0.85; }
.avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 1.3rem var(--font-display); border: 3px solid rgba(255, 255, 255, 0.85); flex: none; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); }
.hof-info { align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.hof-count { text-align: center; }
.hof-count .num { font: 800 4.5rem var(--font-display); color: var(--red); line-height: 1; }
.legend-card { padding: 1.2rem; gap: 0.6rem; }
.legend-head { display: flex; gap: 0.9rem; align-items: center; }
.legend-head h3 { margin: 0.2rem 0 0; }
.legend-role { margin: 0; color: var(--ink); font-weight: 700; }
.stat-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.stat-chip { background: var(--surface-2); border-radius: 999px; padding: 0.2rem 0.75rem; font-size: 0.85rem; font-weight: 700; }
.stat-chip b { color: var(--red); }
.legend-card .btn { margin-top: auto; width: fit-content; }
.lg-top { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.8rem; }
.lg-top .avatar { width: 76px; height: 76px; }
.lg-year { color: var(--red); font-weight: 800; margin-bottom: 0.4rem; }
#legends-filters { display: flex; }

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }

/* ---- Interactive map v2: smooth pins, zoom and pan ---- */
:root { --land-a: #cfe5c9; --land-b: #a9d1a8; }
:root[data-theme="dark"] { --land-a: #2f6b53; --land-b: #1f4f3f; }
.big-map { position: relative; padding: 0.5rem; overflow: hidden; }
#home-map, #places-map { display: block; width: 100%; height: auto; touch-action: pan-y; cursor: default; --pin: 1; border-radius: 12px; }
#home-map.zoomed, #places-map.zoomed { cursor: grab; }
#home-map.panning, #places-map.panning { cursor: grabbing; }
#home-map .land, #places-map .land { fill: url(#land-fill); stroke: var(--green); stroke-width: 2.5; }
.pin-s { transform: scale(var(--pin)); }
.spot { cursor: pointer; outline: none; }
.spot .hit { fill: transparent; }
.spot .pin-a { transform-box: fill-box; transform-origin: 50% 100%; animation: drop 0.55s cubic-bezier(0.3, 1.5, 0.5, 1) both; transition: transform 0.18s ease, filter 0.18s; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.35)); }
@keyframes drop { from { transform: translateY(-40px) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.spot .body { stroke: #fff; stroke-width: 2.5; stroke-linejoin: round; }
.spot .bubble { fill: #fff; }
.spot .emo { font-size: 18px; pointer-events: none; }
.spot .shadow { fill: rgba(0, 0, 0, 0.3); }
.spot .halo { fill: none; stroke: var(--gold); stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; }
.spot:hover .pin-a, .spot:focus-visible .pin-a { transform: translateY(-4px) scale(1.14); }
.spot.active .pin-a { animation: hop 0.5s ease; transform: translateY(-4px) scale(1.18); filter: drop-shadow(0 4px 6px rgba(206, 17, 38, 0.55)); }
@keyframes hop { 40% { transform: translateY(-16px) scale(1.18); } }
.spot.active .halo { opacity: 1; stroke: var(--red); }
.spot.live .halo { opacity: 1; animation: ping 1.7s ease-out infinite; }
@keyframes ping { from { transform: scale(0.7); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.spot:focus-visible .body { stroke: var(--gold); stroke-width: 4; }
.spot { transition: opacity 0.3s; }
.spot.dim { opacity: 0.15; pointer-events: none; }
.tripping .spot { pointer-events: none; }
.tip { pointer-events: none; }
.tip rect { fill: var(--ink); opacity: 0.94; }
.tip text { fill: var(--bg); font: 800 16px var(--font-body); }
.tip .tip-s { transform: scale(var(--pin)); }
.traveler { pointer-events: none; }
.traveler circle { fill: #fff; stroke: var(--red); stroke-width: 4; }
.traveler .pin-s { transform: scale(var(--pin)); }
.traveler text { font-size: 22px; }
.zoom-ctl { position: absolute; top: 1rem; right: 1rem; display: grid; gap: 0.4rem; z-index: 2; }
.zoom-ctl button { width: 42px; height: 42px; border-radius: 12px; border: 2px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); color: var(--ink); font: 800 1.3rem var(--font-body); cursor: pointer; box-shadow: var(--shadow); backdrop-filter: blur(6px); transition: transform 0.15s, border-color 0.2s; }
.zoom-ctl button:hover:not(:disabled) { border-color: var(--blue); transform: translateY(-1px); }
.zoom-ctl button:disabled { opacity: 0.4; cursor: not-allowed; }
.map-hint { position: absolute; left: 1rem; bottom: 0.9rem; margin: 0; font-size: 0.78rem; font-weight: 700; color: var(--muted); background: color-mix(in srgb, var(--surface) 88%, transparent); padding: 0.2rem 0.7rem; border-radius: 99px; pointer-events: none; }
.spot-body.swap { animation: slidein 0.4s ease both; }
.spot-photo.swap img { animation: fadein 0.5s ease both; }
@keyframes slidein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .spot .pin-a, .spot.active .pin-a, .spot.live .halo, .spot-body.swap, .spot-photo.swap img { animation: none; } }
.compass-badge { position: absolute; right: 1rem; bottom: 0.9rem; width: 46px; height: 46px; border-radius: 50%; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 2px solid var(--line); display: grid; place-items: center; pointer-events: none; box-shadow: var(--shadow); }
.compass-badge b { font: 800 0.7rem var(--font-body); color: var(--ink); position: absolute; top: 2px; }
.compass-badge::after { content: ""; width: 8px; height: 22px; margin-top: 8px; background: linear-gradient(var(--red) 50%, var(--muted) 50%); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

.explore-map { max-width: 860px; margin-inline: auto; }

/* board tiles sit on the cell grid; vertical ones are used for the perpendicular turns */
.tile.board-tile { --w: 8.4cqw; }
.tile.board-tile.v { width: calc(var(--w) / 2); height: var(--w); flex-direction: column; }
.tile.board-tile.v .half:first-child { border-right: 0; border-bottom: 0.3cqw solid #9d916f; }
.tile.board-tile .half { padding: 6% 5%; }
.tile.board-tile.v .half { padding: 5% 6%; }

/* person photos: the monogram stays underneath as a fallback */
.avatar { position: relative; overflow: hidden; }
.avatar.has-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.plaque .avatar { width: 92px; height: 92px; }
.legend-head .avatar { width: 76px; height: 76px; }
.lg-top .avatar { width: 112px; height: 112px; }
.photo-credits { font-size: 0.85rem; color: var(--muted); }
.photo-credits summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.photo-credits ul { columns: 2 280px; padding-left: 1.1rem; margin: 0.8rem 0 0; }
.photo-credits li { margin-bottom: 0.25rem; break-inside: avoid; }

/* ========== FINAL POLISH ========== */
html { scroll-padding-top: 92px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
#places-grid { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 1.1rem; }
#places-grid .card img { height: 150px; }
#places-grid .card-body h3 { font-size: 1.1rem; }
.food-banner { height: 150px; display: grid; place-items: center; font-size: 4.2rem; background: linear-gradient(135deg, color-mix(in srgb, var(--red) 25%, var(--surface-2)), color-mix(in srgb, var(--gold) 30%, var(--surface-2))); }
.card:nth-child(even) .food-banner { background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 25%, var(--surface-2)), color-mix(in srgb, var(--green) 28%, var(--surface-2))); }

/* footer */
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2rem 3rem; align-items: start; }
.footer-grid p { margin: 0.5rem 0; opacity: 0.85; }
.footer-grid nav { display: grid; gap: 0.35rem; }
.footer-grid strong { font-family: var(--font-display); font-size: 1.05rem; color: #fff; display: block; margin-bottom: 0.4rem; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { text-decoration: underline; }
.footer-brand { color: #fff; margin-bottom: 0.4rem; }
.footer-base { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, 0.15); text-align: center; opacity: 0.7; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* hero entrance */
.hero .wrap > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero .wrap > :nth-child(2) { animation-delay: 0.08s; } .hero .wrap > :nth-child(3) { animation-delay: 0.16s; } .hero .wrap > :nth-child(4) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* images fade in once loaded */
img.img-fade { opacity: 0; transition: opacity 0.5s ease; }
img.img-fade.loaded { opacity: 1; }

/* back to top */
.to-top { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 40; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer; background: var(--red); color: #fff; font-size: 1.3rem; box-shadow: var(--shadow); opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity 0.25s, transform 0.25s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { filter: brightness(1.1); }

/* collapsible credits */
.credits-box summary, .photo-credits summary { cursor: pointer; font-weight: 800; padding: 0.7rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; list-style: none; }
.credits-box summary::after, .photo-credits summary::after { content: "+"; float: right; color: var(--red); font-size: 1.3rem; line-height: 1; }
.credits-box[open] summary::after, .photo-credits[open] summary::after { content: "–"; }
.credits-box > div { margin-top: 1rem; }
.credits a { word-break: break-word; }

/* 404 */
.lost { text-align: center; padding: 6rem 0; }
.lost .big { font: 800 clamp(5rem, 18vw, 10rem) var(--font-display); color: var(--red); line-height: 1; }

@media (prefers-reduced-motion: reduce) { .hero .wrap > *, img.img-fade { animation: none; transition: none; opacity: 1; } .to-top { transition: none; } }

/* ---- mobile refinements ---- */
@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; margin-top: -1.5rem; }
  .stats.flat { margin-top: 1.5rem; }
  .stat { padding: 0.9rem 0.6rem; }
  .stat .num { font-size: 1.6rem; }
  .stat .label { font-size: 0.8rem; }
  .game-box { padding: 0.9rem; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
}
/* dominoes: keep text readable and tiles tappable when the table is small */
.dom-name { font-size: max(11px, 2.6cqw); }
.dom-ends { font-size: max(11px, 2.4cqw); }
.dom-ends b { min-width: max(20px, 4.2cqw); height: max(20px, 4.2cqw); }
.dom-msg { font-size: max(12px, 2.5cqw); bottom: 29%; }
.dom-pick .btn { font-size: max(13px, 3cqw); }
@container (max-width: 520px) {
  .tile.hand { --w: 15.5cqw; }
  .dom-hand { gap: 1.6cqw; bottom: 2.5%; }
  .dom-msg { bottom: 33%; }
  .dom-pick { bottom: 40%; }
}

/* ========== LEGENDS REDESIGN ========== */
.legends-hero { background-image: radial-gradient(circle at 85% 20%, rgba(206, 17, 38, 0.55), transparent 45%), radial-gradient(circle at 10% 90%, rgba(21, 88, 192, 0.6), transparent 50%), linear-gradient(135deg, #07204a, #0b3c8c 60%, #3b0f1f); background-color: #07204a; position: relative; overflow: hidden; }
.legends-hero::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 26px); pointer-events: none; }
.legends-hero-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; position: relative; }
.legends-hero h1 { max-width: 12ch; }
.hero-faces { display: flex; justify-content: center; padding-left: 20px; }
.hero-faces img { width: clamp(70px, 9vw, 118px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; object-position: center 22%; border: 4px solid #fff; margin-left: -22px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); background: #1a2b52; transition: transform 0.3s; }
.hero-faces img:nth-child(even) { transform: translateY(14px); }
.hero-faces img:hover { transform: translateY(-6px) scale(1.06); z-index: 2; position: relative; }
@media (max-width: 820px) { .legends-hero-in { grid-template-columns: 1fr; } .hero-faces { justify-content: flex-start; padding-left: 22px; } }

.hof-info { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 2rem; box-shadow: var(--shadow); }
.hof-count { text-align: center; max-width: 150px; }
.hof-count .medal { width: 112px; height: 112px; margin: 0 auto 0.5rem; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #f6dc9a, #c18b2f 60%, #8d5f1f); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3), inset 0 0 0 4px rgba(255, 240, 200, 0.6), inset 0 0 0 8px rgba(110, 70, 15, 0.35); }
.hof-count .num { font: 800 3.4rem var(--font-display); color: #2b1a05; line-height: 1; }
.hof-count p { margin: 0; font-weight: 800; font-size: 0.9rem; color: var(--muted); }
.hof-text h3 { margin-bottom: 0.4rem; }
@media (max-width: 640px) { .hof-info { grid-template-columns: 1fr; text-align: center; padding: 1.4rem; } .hof-count { margin: 0 auto; } }

#legend-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem; }
.legend-card { padding: 0; gap: 0; overflow: hidden; }
.legend-top { position: relative; cursor: pointer; }
.legend-photo { height: 210px; overflow: hidden; display: grid; place-items: center; }
.legend-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.legend-card:hover .legend-photo img { transform: scale(1.06); }
.legend-photo .mono { font: 800 3.6rem var(--font-display); color: rgba(255, 255, 255, 0.9); }
.legend-top .tag { position: absolute; left: 0.7rem; bottom: 0.7rem; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); }
.year-badge { position: absolute; right: 0.7rem; top: 0.7rem; font: 800 0.8rem var(--font-body); color: #2b1a05; background: linear-gradient(135deg, #f6dc9a, #c18b2f); padding: 0.2rem 0.65rem; border-radius: 999px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); }
.legend-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.legend-body h3 { margin: 0; font-size: 1.25rem; }
.legend-role { margin: 0; font-weight: 700; font-size: 0.95rem; }
.legend-from { margin: 0; color: var(--muted); font-size: 0.85rem; }
.legend-body .stat-chips { margin-top: 0.3rem; }
.legend-body .btn { margin-top: auto; width: fit-content; }
.legend-body .stat-chips + .btn { margin-top: 0.7rem; }

/* ========== SITE-WIDE FINISHING TOUCHES ========== */
::selection { background: var(--red); color: #fff; }
.section-head h2::after { content: ""; display: block; width: 64px; height: 5px; margin-top: 0.6rem; border-radius: 3px; background: linear-gradient(90deg, var(--blue) 0 33%, var(--surface-2) 33% 66%, var(--red) 66%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); }
.site-header { transition: box-shadow 0.3s, background 0.3s; }
.site-header.scrolled { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.card { transition: transform 0.25s, box-shadow 0.25s; }
.card:hover { box-shadow: 0 16px 38px rgba(20, 33, 61, 0.22); }
:root[data-theme="dark"] .card:hover { box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55); }
.btn:active { transform: translateY(0) scale(0.98); }
.chip { transition: background 0.2s, border-color 0.2s, transform 0.15s; }
.chip:hover { border-color: var(--blue); transform: translateY(-1px); }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 55%, transparent) transparent; }
/* soft curved edges where a tinted band meets the page */
.tinted { position: relative; }
.tinted::before, .tinted::after { content: ""; position: absolute; left: 0; right: 0; height: 26px; background: var(--bg); pointer-events: none; }
.tinted::before { top: -1px; clip-path: ellipse(55% 100% at 50% 0); }
.tinted::after { bottom: -1px; clip-path: ellipse(55% 100% at 50% 100%); }
.hero + .tinted::before, .hero + section.tinted::before { display: none; }

@media (max-width: 560px) {
  #legend-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .legend-photo { height: 150px; }
  .legend-body { padding: 0.7rem 0.75rem 0.9rem; }
  .legend-body h3 { font-size: 1rem; }
  .legend-role { font-size: 0.82rem; }
  .legend-from { font-size: 0.75rem; }
  .legend-top .tag { font-size: 0.62rem; padding: 0.15rem 0.45rem; left: 0.4rem; bottom: 0.4rem; }
  .year-badge { font-size: 0.7rem; right: 0.4rem; top: 0.4rem; }
  .stat-chip { font-size: 0.72rem; padding: 0.12rem 0.5rem; }
  .legend-body .btn { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
}

#wq-feedback { min-height: 96px; display: grid; place-items: center; }
.reveal-person { display: inline-flex; align-items: center; gap: 0.9rem; text-align: left; animation: slidein 0.4s ease both; font-weight: 700; }
.reveal-person .avatar { width: 76px; height: 76px; }
.reveal-person.good b { color: var(--green); } .reveal-person.bad b { color: var(--red); }
.face-collage { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.face-collage img { width: 100%; height: 100%; max-height: none; aspect-ratio: 1; object-fit: cover; object-position: center 22%; border-radius: 14px; box-shadow: var(--shadow); }
.face-collage img:nth-child(2) { object-position: center 32%; }
.face-collage img:nth-child(odd) { transform: translateY(8px); }
.face-collage img:nth-child(1) { object-position: center 30%; }
