/* =========================================================
   SIEGEWAKE — guide pages (factions.html, maps.html, guide.html) and the home-page guide teaser.
   Loaded after style.css; reuses its tokens (--gold, --fc, --display ...), .section, .h2, .ftab, .card, .reveal.
   ========================================================= */

/* ---------- Page header of the sub pages ---------- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(130px, 17vw, 210px) var(--pad) clamp(46px, 7vw, 84px); text-align: center; }
.page-hero__bg { position: absolute; inset: 0; z-index: -2; }
.page-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; filter: saturate(.75) brightness(.42) contrast(1.1); }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse 60% 60% at 50% 40%, rgba(255, 140, 60, .14), transparent 70%), linear-gradient(180deg, rgba(7, 11, 18, .78), rgba(7, 11, 18, .35) 40%, var(--bg) 100%); }
.page-hero h1 { font-size: clamp(2.3rem, 6.4vw, 5rem); }
.page-hero .section__lede { max-width: 700px; color: rgba(227, 234, 242, .9); }
.jump { margin: 28px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; text-decoration: none; font: 700 .72rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ivory); background: rgba(7, 11, 18, .6); border: 1px solid rgba(217, 175, 108, .4); transition: background .25s, border-color .25s; }
.jump a:hover { background: rgba(217, 175, 108, .16); border-color: var(--gold-hi); }
.nav__links a[aria-current="page"] { color: var(--gold-hi); }
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.section--tight { padding-top: clamp(40px, 6vw, 80px); }
.section--alt { background: linear-gradient(180deg, var(--bg), var(--bg-2) 45%, var(--bg)); }
.h3 { font: 900 clamp(1.35rem, 2.6vw, 2rem)/1.15 var(--display); color: var(--ivory); letter-spacing: .02em; }
.h3 small { display: block; margin-bottom: 8px; font: 700 .7rem/1 var(--ui); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.gd-block { margin-top: clamp(44px, 6vw, 80px) !important; }
.gd-block > .h3 { margin-bottom: 20px; }
.gd-note { margin-top: 14px; font-size: .86em; color: var(--muted); }
.gd-foot-cta { text-align: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font: 700 .68rem/1.2 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ivory); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); white-space: nowrap; }
.chip svg { width: 13px; height: 13px; flex: none; }
.chip--good { color: #bdf0c9; border-color: rgba(96, 200, 128, .5); background: rgba(57, 165, 91, .14); }
.chip--gold { color: var(--gold-hi); border-color: rgba(246, 214, 141, .5); background: rgba(217, 175, 108, .12); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Tabs (shared by factions.html / maps.html) ---------- */
.gd-tabs { position: sticky; top: 62px; z-index: 40; margin: 0 calc(var(--pad) * -1) clamp(26px, 4vw, 44px) !important; max-width: none !important; padding: 10px var(--pad); display: flex; justify-content: center; gap: 10px; background: rgba(7, 11, 18, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-block: 1px solid rgba(217, 175, 108, .16); overflow-x: auto; scrollbar-width: none; }
.gd-tabs::-webkit-scrollbar { display: none; }
.gd-tab { --c: var(--gold); flex: none; display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 16px 0 12px; border-radius: 999px; cursor: pointer; border: 1px solid rgba(255, 255, 255, .12); background: rgba(12, 20, 34, .7); font: 700 .74rem/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); transition: color .25s, border-color .25s, background .25s, box-shadow .25s; }
.gd-tab svg { width: 20px; height: 20px; color: color-mix(in srgb, var(--c) 70%, #fff); }
.gd-tab i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.gd-tab:hover { color: var(--ivory); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.gd-tab[aria-selected="true"] { color: var(--ivory); border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, rgba(12, 20, 34, .9)); box-shadow: 0 0 0 1px var(--c), 0 10px 26px -12px var(--c); }
@media (max-width: 900px) { .gd-tabs { justify-content: flex-start; } }
.gd-panel { outline: none; }
.gd-panel.is-swapping > * { opacity: 0; transform: translateY(14px); }
.gd-panel > * { transition: opacity .35s var(--ease), transform .45s var(--ease); }

/* ---------- Image placeholder (no picture delivered yet) ---------- */
.ph { position: relative; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--fc) 46%, #101b2a), #0c1422 75%); }
.ph > svg { width: 44%; height: 44%; color: color-mix(in srgb, var(--fc) 45%, #fff); opacity: .9; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.zoomable { cursor: zoom-in; padding: 0; border: 0; background: none; display: block; width: 100%; height: 100%; border-radius: inherit; }
.zoomable img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   FACTION GUIDE
   ========================================================= */
.gd-panel { --fc: #3676d9; }
.fg__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(26px, 4.5vw, 64px); align-items: center; }
.fg__class { font: 700 .74rem/1 var(--ui); letter-spacing: .3em; text-transform: uppercase; color: color-mix(in srgb, var(--fc) 55%, #fff); display: flex; align-items: center; gap: 12px; }
.fg__class svg { width: 34px; height: 34px; color: var(--fc); filter: drop-shadow(0 0 10px var(--fc)); }
.fg__name { margin-top: 12px; font: 900 clamp(2rem, 4.6vw, 3.6rem)/1.04 var(--display); color: var(--ivory); text-shadow: 0 0 40px color-mix(in srgb, var(--fc) 60%, transparent); }
.fg__style { margin-top: 16px; font-size: 1.12em; color: rgba(227, 234, 242, .92); }
.fg__meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font: 700 .7rem/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.diff { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: -1px; }
.diff i { width: 16px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .16); }
.diff i.on { background: var(--gold-hi); box-shadow: 0 0 8px rgba(255, 170, 70, .6); }
.fg__sig { margin-top: 22px; padding: 16px 18px; border-radius: 12px; background: color-mix(in srgb, var(--fc) 14%, rgba(12, 20, 34, .85)); border: 1px solid color-mix(in srgb, var(--fc) 50%, transparent); }
.fg__sig b { display: block; font: 700 1.02rem/1.2 var(--display); color: var(--ivory); }
.fg__sig span { display: block; font: 700 .64rem/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.fg__sig p { margin-top: 6px; font-size: .94em; color: rgba(227, 234, 242, .88); }
.fg__art { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 40px 70px -30px #000, 0 0 0 1px color-mix(in srgb, var(--fc) 60%, transparent), 0 0 70px -20px var(--fc); }
.fg__art img { width: 100%; height: 100%; object-fit: cover; }
.fg__art figcaption, .gd-cap { position: absolute; left: 12px; bottom: 10px; font: 700 .62rem/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--ivory); background: rgba(7, 11, 18, .74); padding: 6px 9px; border-radius: 6px; pointer-events: none; }

.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pc { padding: 22px 24px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(23, 40, 58, .7), rgba(12, 20, 34, .8)); border: 1px solid rgba(255, 255, 255, .08); border-top: 3px solid #4fb873; }
.pc--bad { border-top-color: var(--red); }
.pc h3 { font: 700 .78rem/1 var(--ui); letter-spacing: .22em; text-transform: uppercase; color: #9fe0b4; }
.pc--bad h3 { color: #ffb0a4; }
.pc ul { margin-top: 14px; display: grid; gap: 10px; }
.pc li { position: relative; padding-left: 26px; font-size: .96em; }
.pc li::before { content: "+"; position: absolute; left: 0; top: -.1em; width: 18px; font: 900 1.1em/1.5 var(--ui); color: #6fd391; text-align: center; }
.pc--bad li::before { content: "–"; color: #ff8f7e; }

.lineup { margin: 0 0 16px; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 10 / 3; box-shadow: 0 0 0 1px color-mix(in srgb, var(--fc) 45%, transparent); }
.lineup img { width: 100%; height: 100%; object-fit: cover; }

.ucards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ucard { position: relative; display: grid; grid-template-columns: 104px 1fr; align-content: start; gap: 14px; padding: 14px; border-radius: 14px; background: linear-gradient(180deg, rgba(23, 40, 58, .78), rgba(12, 20, 34, .82)); border: 1px solid rgba(255, 255, 255, .08); overflow: hidden; }
.ucard::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--fc); opacity: .8; }
.ucard__pic { width: 104px; height: 104px; border-radius: 12px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fc) 60%, transparent); }
.ucard__role { display: inline-flex; align-items: center; gap: 6px; font: 700 .62rem/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: color-mix(in srgb, var(--fc) 50%, #fff); }
.ucard__role svg { width: 14px; height: 14px; }
.ucard h4 { margin: 6px 0 2px; font: 700 1.08rem/1.2 var(--display); color: var(--ivory); }
.ucard__from { font-size: .78em; color: rgba(217, 175, 108, .9); }
.ucard__body { grid-column: 1 / -1; }
.ucard__body > p { font-size: .88em; color: var(--muted); }
.stats-row { margin: 12px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; }
.stats-row div { padding: 7px 2px 6px; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.stats-row dt { font: 700 .54rem/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stats-row dd { margin: 5px 0 0; font: 700 .92rem/1 var(--ui); color: var(--ivory); font-variant-numeric: tabular-nums; }
.matchups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  gap: 8px;
  margin: 14px 0 0;
}
.matchups__group {
  padding: 9px 11px 10px;
  border: 1px solid color-mix(in srgb, var(--matchup-accent) 17%, transparent);
  border-inline-start: 2px solid color-mix(in srgb, var(--matchup-accent) 65%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--matchup-accent) 6%, transparent);
}
.matchups__group--strong { --matchup-accent: #9fe0b4; }
.matchups__group--weak { --matchup-accent: #ffb4a8; }
.matchups dt { color: var(--matchup-accent); font: 700 .66rem/1.3 var(--ui); letter-spacing: .09em; text-transform: uppercase; }
.matchups dd { margin: 6px 0 0; }
.matchups ul { display: flex; flex-wrap: wrap; gap: 5px 6px; }
.matchups__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 6px 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  font: 600 .75rem/1.3 var(--ui);
  overflow-wrap: anywhere;
}
.matchups__item svg { width: 14px; height: 14px; flex: none; color: var(--matchup-accent); }
.matchups__factor {
  padding: 1px 4px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--matchup-accent) 12%, transparent);
  color: var(--matchup-accent);
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media (max-width: 1100px) { .ucards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .fg__head { grid-template-columns: 1fr; } .fg__art { order: -1; } }
@media (max-width: 640px) { .ucards, .proscons { grid-template-columns: 1fr; } .ucard { grid-template-columns: 84px 1fr; } .ucard__pic { width: 84px; height: 84px; } }

.legendcard { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: clamp(18px, 3vw, 36px); padding: clamp(18px, 3vw, 30px); border-radius: calc(var(--radius) + 4px); background: linear-gradient(135deg, rgba(217, 175, 108, .2), color-mix(in srgb, var(--fc) 16%, rgba(12, 20, 34, .92)) 45%, rgba(12, 20, 34, .95)); border: 1px solid rgba(246, 214, 141, .5); box-shadow: 0 30px 70px -40px var(--fc); }
.legendcard__pic { aspect-ratio: 1; border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(246, 214, 141, .5); }
.legendcard .ucard__role { color: var(--gold-hi); }
.legendcard__pic.ph--empty { max-width: 180px; }
.legendcard h4 { margin: 8px 0 4px; font: 900 clamp(1.5rem, 3vw, 2.2rem)/1.1 var(--display); color: var(--ivory); }
.legendcard ul { margin-top: 14px; display: grid; gap: 8px; }
.legendcard li { position: relative; padding-left: 22px; font-size: .95em; }
.legendcard li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; rotate: 45deg; background: var(--gold-hi); }
.legendcard .stats-row { max-width: 460px; }
@media (max-width: 700px) { .legendcard { grid-template-columns: 1fr; } .legendcard__pic { max-width: 220px; } }

.bcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.bcard { padding: 14px; border-radius: 14px; background: linear-gradient(180deg, rgba(23, 40, 58, .7), rgba(12, 20, 34, .8)); border: 1px solid rgba(255, 255, 255, .08); }
.bcard__pic { aspect-ratio: 4 / 3; border-radius: 10px; margin-bottom: 12px; }
.bcard__pic > svg { width: 30%; height: 30%; }
.bcard__pic.ph--empty { aspect-ratio: 3 / 1; }
.bcard__pic.ph--empty > svg { width: 34px; height: 34px; }
.bcard h4 { margin: 6px 0 2px; font: 700 1.02rem/1.2 var(--display); color: var(--ivory); }
.bcard p { margin-top: 8px; font-size: .86em; color: var(--muted); }
.bcard .ucard__from { display: block; }
@media (max-width: 1000px) { .bcards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .bcards { grid-template-columns: 1fr; } .bcard { display: grid; grid-template-columns: 96px 1fr; gap: 0 14px; } .bcard__pic { margin: 0; aspect-ratio: 1; grid-row: span 4; align-self: start; } }
.basefig { margin: 16px 0 0; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 7; box-shadow: 0 0 0 1px color-mix(in srgb, var(--fc) 45%, transparent); }
.basefig img { width: 100%; height: 100%; object-fit: cover; }

.tips { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tipbox { padding: 24px 26px; border-radius: var(--radius); background: linear-gradient(180deg, color-mix(in srgb, var(--fc) 14%, rgba(23, 40, 58, .7)), rgba(12, 20, 34, .85)); border: 1px solid color-mix(in srgb, var(--fc) 40%, transparent); }
.tipbox--beat { background: linear-gradient(180deg, rgba(215, 94, 77, .12), rgba(12, 20, 34, .85)); border-color: rgba(215, 94, 77, .4); }
.tipbox h3 { font: 700 1.2rem/1.2 var(--display); color: var(--ivory); display: flex; align-items: center; gap: 10px; }
.tipbox h3 svg { width: 22px; height: 22px; color: var(--gold-hi); }
.tipbox ol { margin-top: 16px; display: grid; gap: 12px; counter-reset: t; }
.tipbox li { position: relative; padding-left: 38px; font-size: .95em; counter-increment: t; }
.tipbox li::before { content: counter(t); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 .76rem/1 var(--ui); color: #1d1408; background: linear-gradient(135deg, var(--gold-hi), var(--gold)); }
@media (max-width: 800px) { .tips { grid-template-columns: 1fr; } }

/* =========================================================
   COUNTER SYSTEM
   ========================================================= */
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rule { padding: 20px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(23, 40, 58, .7), rgba(12, 20, 34, .82)); border: 1px solid rgba(217, 175, 108, .16); }
.rule__pair { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rtile { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; color: var(--gold-hi); background: rgba(217, 175, 108, .12); box-shadow: inset 0 0 0 1px rgba(217, 175, 108, .32); flex: none; }
.rtile svg { width: 24px; height: 24px; }
.rtile--lose { color: #ffb0a4; background: rgba(215, 94, 77, .12); box-shadow: inset 0 0 0 1px rgba(215, 94, 77, .4); }
.rule__factor { font: 700 .78rem/1 var(--ui); color: #9fe0b4; }
.rule h3 { margin-top: 14px; font: 700 1.08rem/1.25 var(--display); color: var(--ivory); }
.rule p { margin-top: 8px; font-size: .9em; color: var(--muted); }
.rule figure { margin: 14px 0 0; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; }
.rule figure img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 960px) { .rules { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .rules { grid-template-columns: 1fr; } }

.wheel-wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.wheel { margin: 0; padding: clamp(8px, 2vw, 20px); border-radius: calc(var(--radius) + 4px); background: radial-gradient(circle at 50% 50%, rgba(54, 118, 217, .14), transparent 65%), rgba(12, 20, 34, .7); border: 1px solid rgba(217, 175, 108, .22); }
.wheel svg { width: 100%; height: auto; display: block; overflow: visible; }
.wheel .edge { fill: none; stroke: #6fd391; stroke-width: 2.5; opacity: .85; transition: opacity .25s, stroke-width .25s; }
.wheel .edge--soft { stroke-dasharray: 5 5; opacity: .6; }
.wheel .elabel { font: 700 11px var(--ui); fill: #bdf0c9; paint-order: stroke; stroke: #0c1422; stroke-width: 4px; transition: opacity .25s; }
.wheel .node circle { fill: #17283a; stroke: var(--gold); stroke-width: 1.5; transition: fill .25s, stroke .25s; }
.wheel .node text { font: 700 9.5px var(--ui); letter-spacing: .06em; text-transform: uppercase; fill: var(--ivory); text-anchor: middle; }
.wheel .node use { color: var(--gold-hi); }
.wheel .node { cursor: pointer; }
.wheel .node:focus-visible circle, .wheel .node.is-sel circle { fill: #3a2c14; stroke: var(--gold-hi); stroke-width: 3; }
.wheel.has-sel .edge:not(.is-on), .wheel.has-sel .elabel:not(.is-on) { opacity: .12; }
.wheel.has-sel .edge.is-on { stroke-width: 3.5; opacity: 1; }
.wheel.has-sel .edge.is-on.is-in { stroke: #ff8f7e; }
.wheel.has-sel .elabel.is-on.is-in { fill: #ffc2b8; }
.wheel figcaption { margin-top: 8px; text-align: center; font-size: .8em; color: var(--muted); }
.rolepick { display: flex; flex-wrap: wrap; gap: 8px; }
.rolebtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border-radius: 999px; cursor: pointer; border: 1px solid rgba(255, 255, 255, .14); background: rgba(12, 20, 34, .7); font: 700 .72rem/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: .25s; }
.rolebtn svg { width: 18px; height: 18px; color: var(--gold); }
.rolebtn:hover { color: var(--ivory); border-color: rgba(217, 175, 108, .5); }
.rolebtn[aria-pressed="true"] { color: #1d1408; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); border-color: var(--gold-hi); }
.rolebtn[aria-pressed="true"] svg { color: #1d1408; }
.roleinfo { margin-top: 18px; padding: 22px 24px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(23, 40, 58, .75), rgba(12, 20, 34, .85)); border: 1px solid rgba(217, 175, 108, .22); min-height: 280px; }
.roleinfo h4 { margin: 0; font: 900 1.4rem/1.15 var(--display); color: var(--ivory); display: flex; align-items: center; gap: 12px; }
.roleinfo > p { margin-top: 10px; color: rgba(227, 234, 242, .88); font-size: .96em; }
.gd-panel, .roleinfo, .hs__list li { scroll-margin-top: 150px; }
#counters, #explorer, #matrix-h, #flow-h, #basics-h { scroll-margin-top: 90px; }
.roleinfo__units { margin-top: 14px; font-size: .84em; color: var(--muted); }
.roleinfo__units b { color: var(--ivory); font-weight: 600; }
@media (max-width: 900px) { .wheel-wrap { grid-template-columns: 1fr; } }

.matrix-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid rgba(217, 175, 108, .22); background: rgba(12, 20, 34, .75); -webkit-overflow-scrolling: touch; }
.matrix-scroll:focus-visible { outline-offset: 0; }
.matrix { border-collapse: collapse; width: 100%; min-width: 760px; font-size: .86rem; font-variant-numeric: tabular-nums; }
.matrix-hint { display: none; }
@media (max-width: 860px) { .matrix-hint { display: inline; color: var(--gold-hi); } }
.matrix th, .matrix td { padding: 10px 6px; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.matrix thead th { font: 700 .62rem/1.3 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); vertical-align: bottom; background: rgba(7, 11, 18, .5); }
.matrix thead th svg, .matrix tbody th svg { width: 18px; height: 18px; color: var(--gold); display: block; margin: 0 auto 6px; }
.matrix tbody th { position: sticky; left: 0; z-index: 1; text-align: left; padding-left: 14px; white-space: nowrap; font: 700 .7rem/1.2 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--ivory); background: #101a29; }
.matrix tbody th svg { display: inline-block; margin: 0 8px 0 0; vertical-align: -4px; }
.matrix td { color: rgba(165, 182, 199, .75); }
.matrix td.s { color: #c9f5d4; font-weight: 700; background: rgba(57, 165, 91, .2); }
.matrix td.s2 { background: rgba(57, 165, 91, .36); color: #e2ffe9; }
.matrix td.w { color: #ffc2b8; font-weight: 600; background: rgba(215, 94, 77, .16); }
.matrix td.x { color: rgba(165, 182, 199, .85); font-size: .74rem; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 6px, transparent 6px 12px); }
.matrix td.me { background: rgba(255, 255, 255, .03); }
.matrix .sep { border-left: 2px solid rgba(217, 175, 108, .3); }
.matrix tbody tr:hover td, .matrix tbody tr:hover th { box-shadow: inset 0 1px 0 rgba(246, 214, 141, .4), inset 0 -1px 0 rgba(246, 214, 141, .4); }
.legendline { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .82em; color: var(--muted); }
.legendline span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; background: var(--k); }

/* =========================================================
   MATCH FLOW
   ========================================================= */
.flow { position: relative; padding: 46px 0 0; }
.flow__bar { position: relative; height: 14px; border-radius: 8px; background: linear-gradient(90deg, #2a5ea8 0%, #3676d9 calc(100% * 600 / 720), #c44c39 calc(100% * 600 / 720), #ff8a3d 100%); box-shadow: 0 0 24px -6px rgba(255, 138, 61, .7), inset 0 0 0 1px rgba(255, 255, 255, .18); }
.flow__tick { position: absolute; top: -34px; left: calc(100% * var(--t) / 720); translate: -50% 0; font: 700 .72rem/1 var(--ui); letter-spacing: .06em; color: var(--gold-hi); white-space: nowrap; }
.flow__tick::after { content: ""; position: absolute; left: 50%; top: 18px; width: 2px; height: 34px; margin-left: -1px; background: var(--gold-hi); }
.flow__tick:first-child { translate: 0 0; } .flow__tick:first-child::after { left: 1px; }
.flow__tick:last-child { translate: -100% 0; } .flow__tick:last-child::after { left: auto; right: 0; }
.flow__steps { margin-top: 26px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.fstep { padding: 18px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(23, 40, 58, .7), rgba(12, 20, 34, .82)); border: 1px solid rgba(217, 175, 108, .16); }
.fstep time, .fstep .when { font: 900 1.25rem/1 var(--display); color: var(--gold-hi); }
.fstep h3 { margin-top: 8px; font: 700 1rem/1.25 var(--display); color: var(--ivory); }
.fstep p { margin-top: 8px; font-size: .88em; color: var(--muted); }
.fstep--ot { border-color: rgba(255, 138, 61, .5); background: linear-gradient(180deg, rgba(196, 76, 57, .18), rgba(12, 20, 34, .85)); }
@media (max-width: 1000px) { .flow__steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .flow__steps { grid-template-columns: 1fr; } .flow__tick:nth-child(2), .flow__tick .ot { display: none; } }

.basics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.basic { position: relative; padding: 24px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(23, 40, 58, .7), rgba(12, 20, 34, .82)); border: 1px solid rgba(217, 175, 108, .16); display: flex; flex-direction: column; }
.basic > svg { width: 44px; height: 44px; padding: 10px; border-radius: 12px; color: var(--gold-hi); background: rgba(217, 175, 108, .12); box-shadow: inset 0 0 0 1px rgba(217, 175, 108, .3); }
.basic h3 { margin-top: 16px; font: 700 1.18rem/1.2 var(--display); color: var(--ivory); }
.basic p { margin-top: 10px; font-size: .93em; color: var(--muted); }
.basic p b, .fstep p b, .rule p b { color: var(--ivory); font-weight: 600; }
.basic figure { margin: 16px 0 0; border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 9; }
.basic figure img { width: 100%; height: 100%; object-fit: cover; }
.basic--wide { grid-column: span 2; }
.ladder { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; }
.ladder span { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 10px; background: rgba(217, 175, 108, .1); border: 1px solid rgba(217, 175, 108, .35); font: 700 1rem/1 var(--ui); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.ladder span small { font: 600 .56rem/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 960px) { .basics { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .basics { grid-template-columns: 1fr; } .basic--wide { grid-column: auto; } }

/* =========================================================
   MAP GUIDE
   ========================================================= */
.mg__head { text-align: center; }
.mg__name { font: 900 clamp(2rem, 4.6vw, 3.6rem)/1.04 var(--display); color: var(--ivory); text-shadow: 0 0 40px color-mix(in srgb, var(--fc) 50%, transparent); }
.mg__blurb { margin-top: 10px; color: color-mix(in srgb, var(--fc) 45%, #fff); font: 700 .78rem/1.5 var(--ui); letter-spacing: .2em; text-transform: uppercase; }
.mg__head .chips { justify-content: center; margin-top: 16px; }
.mg__lede { max-width: 760px; margin: 16px auto 0; color: rgba(227, 234, 242, .9); }

.hsview { margin-top: 26px !important; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 18px; align-items: start; }
.hs { margin: 0; position: relative; }
.hs__toggle { display: flex; gap: 8px; margin-bottom: 10px; }
.hs__toggle button { min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer; border: 1px solid rgba(255, 255, 255, .14); background: rgba(12, 20, 34, .7); font: 700 .68rem/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hs__toggle button[aria-pressed="true"] { color: var(--ivory); border-color: var(--fc); background: color-mix(in srgb, var(--fc) 22%, rgba(12, 20, 34, .9)); }
.hs__stage { position: relative; }
.hs__stage[hidden] { display: none; }
.hs__canvas { position: relative; border-radius: var(--radius); overflow: hidden; background: #0c1422; box-shadow: 0 40px 70px -40px #000, 0 0 0 1px color-mix(in srgb, var(--fc) 50%, transparent); }
.hs__canvas > img, .hs__canvas > svg { display: block; width: 100%; height: auto; }
.hs__canvas > img { aspect-ratio: 16 / 9; object-fit: cover; }
.hs__dot { --s: 36px; position: absolute; left: calc(var(--u) * 100%); top: calc(var(--v) * 100%); width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; z-index: 2; }
.hs__dot span { width: var(--s); height: var(--s); border-radius: 50%; display: grid; place-items: center; font: 800 .82rem/1 var(--ui); color: #1d1408; background: linear-gradient(135deg, var(--gold-hi), var(--gold)); box-shadow: 0 0 0 2px rgba(7, 11, 18, .85), 0 0 0 4px rgba(246, 214, 141, .35), 0 6px 14px rgba(0, 0, 0, .6); transition: transform .25s var(--ease), box-shadow .25s; }
.hs__dot::before { content: ""; position: absolute; width: var(--s); height: var(--s); border-radius: 50%; border: 2px solid var(--gold-hi); opacity: 0; animation: hs-ping 2.6s ease-out infinite; animation-delay: calc(var(--i) * .25s); }
@keyframes hs-ping { 0% { opacity: .7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(2); } }
.hs__dot:hover span, .hs__dot:focus-visible span, .hs__dot[aria-expanded="true"] span { transform: scale(1.18); background: #fff3cf; box-shadow: 0 0 0 2px rgba(7, 11, 18, .85), 0 0 0 5px var(--gold-hi), 0 0 24px var(--ember); }
.hs__dot[aria-expanded="true"] { z-index: 3; }
.hs__dot--blue span { background: linear-gradient(135deg, #a9cdff, #3676d9); color: #06101f; }
.hs__dot--red span { background: linear-gradient(135deg, #ffc0b4, #c44c39); color: #1d0906; }
.hs__tip { position: absolute; z-index: 4; left: calc(var(--u) * 100%); top: calc(var(--v) * 100%); width: min(300px, 70%); translate: var(--tx, -50%) var(--ty, 26px); padding: 14px 16px; border-radius: 12px; background: rgba(7, 11, 18, .95); border: 1px solid var(--gold); box-shadow: 0 20px 40px rgba(0, 0, 0, .7); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.hs__tip.is-on { opacity: 1; visibility: visible; }
.hs__tip b { display: block; font: 700 .98rem/1.2 var(--display); color: var(--gold-hi); }
.hs__tip p { margin-top: 6px; font-size: .86rem; line-height: 1.5; color: var(--text); }
.hs__cap { margin-top: 8px; font-size: .8em; color: var(--muted); }
.hs__list { display: grid; gap: 8px; counter-reset: none; max-height: 640px; overflow-y: auto; padding-right: 4px; }
.hs__list li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(23, 40, 58, .55); border: 1px solid rgba(255, 255, 255, .07); transition: border-color .25s, background .25s; scroll-margin: 150px; }
.hs__list li.is-on { border-color: var(--gold-hi); background: rgba(217, 175, 108, .14); }
.hs__list i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 800 .74rem/1 var(--ui); font-style: normal; color: #1d1408; background: linear-gradient(135deg, var(--gold-hi), var(--gold)); }
.hs__list i.blue { background: linear-gradient(135deg, #a9cdff, #3676d9); } .hs__list i.red { background: linear-gradient(135deg, #ffc0b4, #c44c39); }
.hs__list b { display: block; font: 700 .95rem/1.25 var(--display); color: var(--ivory); }
.hs__list p { margin-top: 4px; font-size: .86em; color: var(--muted); }
@media (max-width: 1000px) { .hsview { grid-template-columns: 1fr; } .hs__list { max-height: none; } }
@media (max-width: 700px) {
  .hs__dot { --s: 24px; width: 30px; height: 30px; margin: -15px 0 0 -15px; } .hs__dot span { font-size: .7rem; box-shadow: 0 0 0 1.5px rgba(7, 11, 18, .85), 0 4px 10px rgba(0, 0, 0, .6); }
  /* phones: the tip is a card right under the map instead of a floating bubble */
  .hs__tip { position: static; translate: none; width: auto; margin-top: 10px; display: none; pointer-events: auto; }
  .hs__tip.is-on { display: block; }
}
/* schematic colours */
.plan .isle { fill: color-mix(in srgb, var(--fc) 26%, #142033); stroke: color-mix(in srgb, var(--fc) 60%, #000); stroke-width: 1; }
.plan .water { fill: none; stroke: #4aa3e0; stroke-width: 7; stroke-linecap: round; opacity: .85; }
.plan .water--gorge { stroke: #1a0f0a; stroke-width: 9; opacity: 1; }
.plan .water--sky { stroke: #070b12; stroke-width: 10; opacity: 1; }
.plan .creek { fill: none; stroke: #4aa3e0; stroke-width: 2.4; stroke-linecap: round; opacity: .5; }
.plan .well { fill: #070b12; stroke: #9db3e0; stroke-width: 1; }
.plan .road { fill: none; stroke: #b8a27a; stroke-width: 5; stroke-linecap: round; opacity: .8; }
.plan .road--main { stroke: #ecd9a8; stroke-width: 7.4; opacity: .95; }
.plan .bridge { fill: #f5e9d3; stroke: #5a4320; stroke-width: .8; }
.plan .plaza { stroke-width: 1; opacity: .8; }
.plan .plaza--blue { fill: rgba(54, 118, 217, .35); stroke: #6aa2f2; } .plan .plaza--red { fill: rgba(196, 76, 57, .35); stroke: #ee8a7a; }
.plan .keep--blue { fill: #3676d9; stroke: #cfe2ff; stroke-width: 1; } .plan .keep--red { fill: #c44c39; stroke: #ffd6cf; stroke-width: 1; }
.plan .pad { stroke-width: 1; } .plan .pad--blue { fill: #17283a; stroke: #6aa2f2; } .plan .pad--red { fill: #17283a; stroke: #ee8a7a; }
.plan text { font: 700 4.6px var(--ui); letter-spacing: .14em; text-transform: uppercase; fill: #f5e9d3; paint-order: stroke; stroke: rgba(7, 11, 18, .85); stroke-width: 1.6px; text-anchor: middle; }
.plan .cmp { font-size: 4px; fill: var(--muted); }

.roadtable { width: 100%; border-collapse: collapse; font-size: .92rem; }
.roadtable th, .roadtable td { padding: 11px 12px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.roadtable thead th { font: 700 .64rem/1.2 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.roadtable tbody th { font: 700 .98rem/1.2 var(--display); color: var(--ivory); white-space: nowrap; }
.roadtable td { color: var(--muted); }
.roadtable .bar { display: inline-block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--fc), color-mix(in srgb, var(--fc) 40%, #fff)); vertical-align: middle; margin-right: 8px; }
.tablewrap { overflow-x: auto; border-radius: var(--radius); background: rgba(12, 20, 34, .7); border: 1px solid rgba(255, 255, 255, .08); padding: 6px 10px; }
.mg__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mg__cols .tipbox h3 { font-size: 1.08rem; }
.mg__cols .tipbox ul { margin-top: 14px; display: grid; gap: 10px; }
.mg__cols .tipbox ul li { padding-left: 20px; }
.mg__cols .tipbox ul li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; rotate: 45deg; border-radius: 0; background: var(--gold-hi); }
.picks { margin-top: 14px; display: grid; gap: 12px; }
.pick { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.pick > span { width: 40px; height: 44px; display: grid; place-items: center; color: #fff; clip-path: polygon(50% 0, 100% 14%, 96% 62%, 50% 100%, 4% 62%, 0 14%); background: linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 60%, #000)); }
.pick > span svg { width: 20px; height: 20px; }
.pick b { display: block; font: 700 .98rem/1.2 var(--display); color: var(--ivory); }
.pick p { font-size: .86em; color: var(--muted); margin-top: 2px; }
.pick a { color: var(--gold-hi); display: inline-block; padding: 3px 0; }
.gd-note a { color: var(--gold-hi); display: inline-block; padding: 3px 0; }
@media (max-width: 1000px) { .mg__cols { grid-template-columns: 1fr; } }
.detailfig { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 7; box-shadow: 0 0 0 1px color-mix(in srgb, var(--fc) 45%, transparent); }
.detailfig img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   HOME: guide teaser
   ========================================================= */
.manual { background: radial-gradient(ellipse 70% 50% at 50% 30%, rgba(217, 175, 108, .08), transparent 70%), var(--bg); }
.manual__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mcard { position: relative; display: flex; flex-direction: column; height: 100%; border-radius: calc(var(--radius) + 2px); overflow: hidden; text-decoration: none; background: linear-gradient(180deg, rgba(23, 40, 58, .8), rgba(12, 20, 34, .9)); border: 1px solid rgba(217, 175, 108, .22); transition: transform .4s var(--ease), border-color .3s, box-shadow .4s; }
.mcard:hover, .mcard:focus-visible { transform: translateY(-6px); border-color: var(--gold-hi); box-shadow: 0 30px 60px -30px rgba(255, 150, 60, .5); }
.mcard__img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.mcard__img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) brightness(.82); transition: transform 1.2s var(--ease), filter .5s; }
.mcard:hover .mcard__img img { transform: scale(1.07); filter: none; }
.mcard__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(12, 20, 34, .95)); }
.mcard__body { padding: 4px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.mcard__body small { font: 700 .66rem/1 var(--ui); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.mcard h3 { margin-top: 10px; font: 900 1.4rem/1.15 var(--display); color: var(--ivory); }
.mcard p { margin-top: 10px; color: var(--muted); font-size: .94em; flex: 1; }
.cycle { margin-top: 26px !important; padding: 22px clamp(16px, 3vw, 30px); border-radius: var(--radius); background: rgba(12, 20, 34, .75); border: 1px solid rgba(217, 175, 108, .22); display: grid; grid-template-columns: auto 1fr auto; gap: 16px 28px; align-items: center; }
.cycle h3 { font: 700 1.1rem/1.2 var(--display); color: var(--ivory); }
.cycle ul { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.cycle li { display: inline-flex; align-items: center; gap: 8px; font: 600 .86rem/1.2 var(--ui); color: var(--text); }
.cycle li svg { width: 20px; height: 20px; color: var(--gold-hi); }
.cycle li em { font-style: normal; color: #9fe0b4; font-weight: 700; }
@media (max-width: 960px) { .manual__grid { grid-template-columns: 1fr; } .mcard { flex-direction: row; } .mcard__img { flex: 0 0 38%; aspect-ratio: auto; } .mcard__img::after { background: linear-gradient(90deg, transparent 50%, rgba(12, 20, 34, .95)); } .mcard__body { padding: 20px; } .cycle { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .mcard { flex-direction: column; } .mcard__img { aspect-ratio: 16 / 8; } .mcard__img::after { background: linear-gradient(180deg, transparent 50%, rgba(12, 20, 34, .95)); } .mcard__body { padding: 4px 20px 22px; } }
.section__more { margin-top: clamp(26px, 4vw, 44px) !important; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .hs__dot::before { display: none; }
  .gd-panel > * { transition: none; }
}
