/* Medali v2 - PORPROV XV Jawa Barat 2026. Hand-written CSS, no build step.
   Night-stadium look: deep navy stage and bands, white raised cards on a cool canvas,
   gold reserved for medals and the one call to action. Colors come from the official logo. */

:root {
  --night: #070C2B;
  --night-2: #0D1550;
  --night-3: #16207A;
  --royal: #0A1FA8;
  --royal-2: #2236D8;
  --royal-soft: #EAEEFE;
  --canvas: #F2F4F9;
  --paper: #FFFFFF;
  --ink: #0B1233;
  --ink-2: #2B3354;
  --muted: #5D6680;
  --line: #E4E8F1;
  --line-2: #D5DBE8;
  --gold: #F5C542;
  --gold-2: #E2A50B;
  --gold-ink: #7A5500;
  --red: #E31B23;
  --green: #0B7A34;
  --yellow: #FFD100;
  --emas: #D9A514;
  --emas-soft: #FFF4CF;
  --perak: #A9B3C2;
  --perak-soft: #EEF1F6;
  --perunggu: #B9692D;
  --perunggu-soft: #F8E9DD;
  --on-dark: rgba(255, 255, 255, .74);
  --on-dark-2: rgba(255, 255, 255, .56);
  --glass: rgba(255, 255, 255, .07);
  --glass-line: rgba(255, 255, 255, .14);
  --shadow-sm: 0 1px 2px rgba(7, 12, 43, .06), 0 2px 8px -4px rgba(7, 12, 43, .10);
  --shadow: 0 1px 2px rgba(7, 12, 43, .05), 0 10px 30px -14px rgba(7, 12, 43, .22);
  --shadow-lg: 0 2px 4px rgba(7, 12, 43, .06), 0 22px 50px -18px rgba(7, 12, 43, .34);
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --wrap: 1200px;
  --tabbar: 64px;
  /* Aliases kept for the big-screen page and older markup. */
  --blue: var(--royal);
  --blue-deep: #071577;
  --blue-soft: var(--royal-soft);
  --surface: var(--canvas);
  --dot: #E2AE1B;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--royal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--royal-2); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.site-main { flex: 1 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--royal); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 60; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.sep::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .45; margin: 0 .55em; vertical-align: middle; }
.ico { width: 24px; height: 24px; flex: 0 0 auto; }
.print-only, .print-foot { display: none; }

/* Presentation copy only (config 'demo'). */
.demo-bar { padding: 6px 16px; text-align: center; font-size: .8rem; font-weight: 600; color: #2A1D00; background: linear-gradient(90deg, #FFDA6B, var(--gold-2)); }
@media print { .demo-bar { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 12, 43, .88);
  -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-tile { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .6); }
.brand-mark { width: 36px; height: 36px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-title { font-family: var(--font-display); font-weight: 800; font-size: 1.28rem; letter-spacing: .01em; }
.brand-sub { font-family: var(--font-display); font-weight: 700; font-size: .92rem; color: var(--gold); margin-top: 3px; }
/* Supporting bodies beside the brand, KONI Jabar first. Narrow phones keep only the first. */
.org-logos { display: flex; align-items: center; gap: 6px; margin-left: -6px; padding-left: 14px; border-left: 1px solid var(--glass-line); }
.org-tile { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .6); }
.org-tile img { width: 34px; height: 34px; object-fit: contain; }
@media (max-width: 479px) { .org-extra { display: none; } }
.main-nav { display: none; margin-left: auto; gap: 2px; }
.main-nav a { position: relative; color: var(--on-dark); font-weight: 600; font-size: .96rem; padding: 21px 12px; transition: color .2s; }
.main-nav a:hover { color: #fff; text-decoration: none; }
.main-nav a[aria-current="page"] { color: #fff; }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--gold); }
.header-search { margin-left: auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); transition: background .2s; }
.header-search:hover { background: rgba(255, 255, 255, .14); }
.header-search .ico { width: 20px; height: 20px; }

/* ---------- Dark surfaces: stage (home) and bands (inner pages) ---------- */
.stage, .band {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 520px at 88% -12%, rgba(34, 54, 216, .55), transparent 62%),
    radial-gradient(700px 420px at -6% 115%, rgba(226, 165, 11, .14), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, #0A1144 100%);
}
.stage::after, .band::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.stage-art, .band::before {
  position: absolute; z-index: -1; pointer-events: none;
  background: var(--art-tall, url("../img/hero/ribbons-tall.webp")) right top / cover no-repeat;
}
.stage-art { top: 0; right: 0; width: 100%; height: 100%; opacity: .34; -webkit-mask-image: linear-gradient(200deg, #000 20%, transparent 70%); mask-image: linear-gradient(200deg, #000 20%, transparent 70%); }
.band::before { content: ""; top: -10%; right: -8%; width: 520px; height: 130%; opacity: .2; background-image: url("../img/hero/ribbons-wide.webp"); background-size: cover; background-position: right center; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
@media (min-width: 720px) {
  .stage-art { left: auto; width: 68%; opacity: .85; background-image: var(--art-wide, url("../img/hero/ribbons-wide.webp")); background-position: right 0 center; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 42%); mask-image: linear-gradient(90deg, transparent 0, #000 42%); }
  .band::before { width: 760px; opacity: .3; }
}

/* Floating ribbons (tablet and up): a short Kling loop on black, screened onto the stage so the
   black disappears. It fades in over the still art only once it is actually playing. */
.stage-video { display: none; }
@media (min-width: 720px) {
  .stage-video { display: block; position: absolute; z-index: -1; top: 0; right: 0; width: 76%; height: 100%; object-fit: cover; object-position: right center; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity 1.6s ease; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38%); mask-image: linear-gradient(90deg, transparent 0, #000 38%); }
  .stage.is-video .stage-video { opacity: .95; }
  .stage.is-video .stage-art { opacity: 0; transition: opacity 1.6s ease; }
}

.stage { padding: 30px 0 86px; }
.stage-inner { position: relative; display: grid; gap: 22px; }
.stage-copy { min-width: 0; }
.stage-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 1.15rem + 3.6vw, 4.1rem);
  line-height: .96; letter-spacing: -.012em; max-width: 17ch; margin-top: 16px;
  text-wrap: balance;
}
.stage-sub { color: var(--on-dark); max-width: 54ch; margin-top: 14px; font-size: 1.05rem; }
.stage-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.status-chip {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; color: #fff;
  padding: 6px 14px 6px 12px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line);
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot-blue { background: var(--royal-2); }
.dot-gold { background: var(--gold); box-shadow: 0 0 10px rgba(245, 197, 66, .8); }
.dot-red { background: #FF3B43; box-shadow: 0 0 0 0 rgba(255, 59, 67, .6); animation: pulse 1.8s infinite; }
.dot-live { width: 7px; height: 7px; background: #3CD27A; box-shadow: 0 0 8px rgba(60, 210, 122, .7); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(255, 59, 67, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 67, 0); } }

/* Scorecard: frosted glass on the stage. */
.scorecard {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 16px;
  padding: 16px 18px; border-radius: 20px; color: #fff;
  background: linear-gradient(160deg, rgba(22, 32, 122, .62), rgba(7, 12, 43, .72));
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: inset 0 0 0 1px var(--glass-line), 0 24px 60px -30px rgba(0, 0, 0, .8);
}
.sc-count { display: flex; align-items: baseline; gap: 8px; }
.sc-big { font-family: var(--font-display); font-weight: 800; font-size: 3.6rem; line-height: .9; color: var(--gold); font-variant-numeric: tabular-nums; }
.sc-unit { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.sc-caption { font-size: .9rem; color: var(--on-dark); line-height: 1.35; }
.sc-caption strong { color: #fff; }
.sc-ring { position: relative; width: 84px; height: 84px; grid-row: span 2; }
.sc-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 10; }
.ring-fill { fill: none; stroke: url(#ringGold); stroke-width: 10; stroke-linecap: round; animation: ring-in 1.4s var(--ease) .35s backwards; filter: drop-shadow(0 0 6px rgba(245, 197, 66, .45)); }
@keyframes ring-in { from { stroke-dashoffset: var(--ring-c); } }
.sc-ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.sc-ring-text strong { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; }
.sc-ring-text span { font-size: .7rem; color: var(--on-dark); margin-top: 2px; }
.sc-medals { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--glass-line); }
.scm dt { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--on-dark); }
.scm dt .medal-dot { width: 10px; height: 10px; }
.scm dd { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sc-updated { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--on-dark-2); margin-top: 4px; }

/* Podium on the stage. */
.podium { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1fr); align-items: end; gap: 10px; margin-top: 34px; }
.podium-step { min-width: 0; }
.podium-step a {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 26px 8px 16px; border-radius: 20px; color: #fff; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .03));
  box-shadow: inset 0 0 0 1px var(--glass-line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s;
}
.podium-step a:hover { text-decoration: none; transform: translateY(-6px); background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05)); }
.podium-step.step-1 a { padding-top: 34px; padding-bottom: 22px; background: linear-gradient(180deg, rgba(245, 197, 66, .26), rgba(245, 197, 66, .05) 70%); box-shadow: inset 0 0 0 1px rgba(245, 197, 66, .5), 0 26px 60px -24px rgba(245, 180, 40, .65); }
.podium-step.step-2 a { box-shadow: inset 0 0 0 1px rgba(200, 210, 225, .32); }
.podium-step.step-3 a { box-shadow: inset 0 0 0 1px rgba(205, 130, 70, .38); }
.podium-step a::before { content: ""; position: absolute; left: 50%; top: -60px; width: 160px; height: 120px; transform: translateX(-50%); border-radius: 50%; filter: blur(30px); opacity: .5; pointer-events: none; }
.podium-step.step-1 a::before { background: var(--gold); }
.podium-step.step-2 a::before { background: #C9D2E0; opacity: .25; }
.podium-step.step-3 a::before { background: #D9823F; opacity: .3; }
.podium-medal-wrap { position: relative; }
.podium-medal { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.step-1 .podium-medal { width: 62px; height: 62px; }
.podium-rank { position: absolute; right: -8px; bottom: -4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--night); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: .85rem; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); }
.podium-disc { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: #fff; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); }
.step-1 .podium-disc { width: 80px; height: 80px; }
.podium .badge-lg { width: 48px; height: 48px; box-shadow: none; }
.podium .step-1 .badge-lg { width: 66px; height: 66px; }
.podium-name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.1; overflow-wrap: anywhere; }
.step-1 .podium-name { font-size: 1.2rem; }
.podium-medals { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }

/* Medal count pills. */
.pm { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 7px; border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums; }
.pm-emas { background: linear-gradient(180deg, #FFD965, #E2A50B); color: #3A2700; }
.pm-perak { background: linear-gradient(180deg, #E4E9F0, #A9B3C2); color: #1E2430; }
.pm-perunggu { background: linear-gradient(180deg, #E39A5E, #B0622A); color: #fff; }

/* Inner page band. */
.band { padding: 30px 0 34px; }
.band-slim { padding: 18px 0 20px; }
.band-inner { position: relative; }
.band-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 1.3rem + 2.8vw, 3.4rem); line-height: 1; letter-spacing: -.01em; text-wrap: balance; }
.page-lead { color: var(--on-dark); margin-top: 10px; font-size: 1.05rem; max-width: 62ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: .9rem; margin-bottom: 14px; }
.crumbs a { color: var(--on-dark); font-weight: 600; }
.crumbs a:hover { color: #fff; }
.crumbs a + a::before { content: "/"; margin: 0 9px; color: var(--on-dark-2); }

/* Identity hero (contingent, sport, athlete). */
.band-hero { padding: 26px 0 32px; }
.hero-id { display: grid; grid-template-columns: auto 1fr; gap: 18px 20px; align-items: center; }
.hero-id-body { min-width: 0; }
.hero-disc { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: #fff; box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .7), 0 0 0 4px rgba(255, 255, 255, .08); }
.hero-disc .badge-lg { width: 66px; height: 66px; box-shadow: none; }
.hero-disc-sport { border-radius: 24px; }
.hero-disc-sport .sport-icon-lg { width: 62px; height: 62px; }
.hero-avatar { position: relative; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: #fff; background: linear-gradient(135deg, var(--royal-2), var(--night-2)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22), 0 16px 40px -16px rgba(0, 0, 0, .7); }
.hero-avatar-badge { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, .35); }
.hero-avatar-badge .badge-sm { width: 28px; height: 28px; box-shadow: none; }
.hero-id .page-title { font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3rem); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hero-facts > * { display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px; border-radius: 999px; font-size: .88rem; font-weight: 600; color: #fff; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); }
.hero-facts a:hover { background: rgba(255, 255, 255, .14); text-decoration: none; }
.hero-rank { background: linear-gradient(180deg, rgba(245, 197, 66, .3), rgba(245, 197, 66, .12)) !important; box-shadow: inset 0 0 0 1px rgba(245, 197, 66, .5) !important; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.hero-links .share { margin-top: 0; }
.hero-id-body > .share { margin-top: 14px; }
.medal-count { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mc { position: relative; overflow: hidden; border-radius: 16px; padding: 12px 14px 14px; background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03)); box-shadow: inset 0 0 0 1px var(--glass-line); }
.mc::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.mc-emas::after { background: linear-gradient(90deg, #FFD965, #E2A50B); }
.mc-perak::after { background: linear-gradient(90deg, #E4E9F0, #A9B3C2); }
.mc-perunggu::after { background: linear-gradient(90deg, #E39A5E, #B0622A); }
.mc dt { display: flex; align-items: center; gap: 7px; font-size: .84rem; color: var(--on-dark); font-weight: 600; }
.mc-img { width: 24px; height: 24px; object-fit: contain; }
.mc dd { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.mini-progress { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.mini-track { width: 180px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.mini-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #FFE08A, var(--gold-2)); }
.mini-text { font-size: .88rem; color: var(--on-dark); }
.mini-text strong { color: #fff; }

/* ---------- Buttons and controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 0; cursor: pointer; font-weight: 700; font-size: .95rem; color: #fff;
  background: linear-gradient(180deg, var(--royal-2), var(--royal)); box-shadow: 0 8px 20px -10px rgba(10, 31, 168, .8);
  transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(10, 31, 168, .85); }
.btn-ghost { color: var(--royal); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: var(--royal-soft); box-shadow: inset 0 0 0 1px #C9D2F5; }
.btn-gold { color: #2A1D00; background: linear-gradient(180deg, #FFDA6B, var(--gold-2)); box-shadow: 0 10px 28px -12px rgba(233, 169, 11, .9); }
.btn-gold:hover { box-shadow: 0 14px 32px -12px rgba(233, 169, 11, 1); }
.btn-glass { color: #fff; background: var(--glass); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255, 255, 255, .15); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32); }
.btn-sm { min-height: 36px; padding: 0 15px; font-size: .88rem; }
.btn .ico { width: 19px; height: 19px; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer; color: var(--ink-2); background: var(--canvas); transition: background .2s; }
.icon-btn:hover { background: var(--royal-soft); color: var(--royal); }
.icon-btn .ico { width: 19px; height: 19px; }

.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line); }
.seg a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px; font-weight: 600; color: var(--ink-2); transition: background .2s, color .2s; }
.seg a:hover { text-decoration: none; color: var(--ink); }
.seg a[aria-current="page"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg-sm a { min-height: 30px; padding: 0 13px; font-size: .88rem; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.filters-card { padding: 12px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.select { position: relative; display: flex; flex-direction: column; flex: 1 1 150px; min-width: 0; }
.select-label { font-size: .74rem; font-weight: 700; color: var(--muted); margin: 0 0 4px 14px; }
.select select {
  width: 100%; max-width: 100%; appearance: none; -webkit-appearance: none;
  font: inherit; font-weight: 600; font-size: .94rem; color: var(--ink);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235D6680' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") right 14px center no-repeat;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 38px 9px 15px; min-height: 44px; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.select select:hover { border-color: #B9C2D8; }
.select select:focus-visible { outline: 0; border-color: var(--royal-2); box-shadow: 0 0 0 3px rgba(34, 54, 216, .16); }
@media (min-width: 640px) { .select { flex: 0 1 auto; } .select select { width: auto; } .select-wide select { min-width: min(100%, 440px); } }
.filters-reset { font-weight: 600; font-size: .9rem; padding: 0 6px; }

.search { display: flex; align-items: center; gap: 10px; max-width: 560px; padding: 0 18px; min-height: 48px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--paper); transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--royal-2); box-shadow: 0 0 0 4px rgba(34, 54, 216, .12); }
.search .ico { width: 20px; height: 20px; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--ink); }
.search-lg { max-width: none; min-height: 56px; font-size: 1.05rem; }
.list-tools { margin-bottom: 16px; }
.list-tools .muted { margin-top: 10px; }

/* ---------- Layout ---------- */
.page { padding-top: 26px; padding-bottom: 56px; }
.page-narrow { max-width: 760px; }
.home-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: -56px; padding-bottom: 56px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.side { display: flex; flex-direction: column; gap: 18px; }
.section { margin-bottom: 34px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; margin-bottom: 14px; }
.section-title { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; line-height: 1.1; margin-bottom: 12px; }
.section-head .section-title { margin-bottom: 0; }
.section-sub { color: var(--muted); font-size: .92rem; }
.section-title .count { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 26px; padding: 0 9px; margin-left: 6px; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow-sm); font-family: var(--font); font-weight: 600; font-size: .82rem; color: var(--muted); vertical-align: 5px; }
.group-title { font-size: .92rem; font-weight: 700; color: var(--muted); margin: 18px 0 8px; }
.panel { position: relative; padding: 18px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-title { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 800; font-size: 1.38rem; line-height: 1.15; }
.panel-sub { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.note { font-size: .84rem; color: var(--muted); }
.more { display: inline-block; font-weight: 700; font-size: .92rem; }

/* ---------- Medal table ---------- */
.board { padding-bottom: 14px; }
.board-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.board-tools { display: flex; align-items: center; gap: 8px; }
.board-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.board-foot .share { margin-top: 0; }
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -18px; padding: 0 18px; }
.tally { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.tally thead th { font-size: .78rem; font-weight: 700; color: var(--muted); text-align: left; padding: 8px 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tally td, .tally tbody th { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; transition: background .2s; }
.tally tbody tr:last-child td, .tally tbody tr:last-child th { border-bottom: 0; }
.tally tbody tr:hover td, .tally tbody tr:hover th { background: #F7F8FC; }
/* Rows rise out of the table on hover (mouse only, so a tap on a phone never leaves a row lifted). */
@media (hover: hover) and (pointer: fine) {
  .tally tbody tr { position: relative; transition: transform .28s var(--ease), box-shadow .28s var(--ease); }
  .tally tbody tr:hover { z-index: 2; transform: translateY(-3px) scale(1.006); box-shadow: 0 14px 28px -12px rgba(7, 12, 43, .34); }
  .tally tbody tr:hover td, .tally tbody tr:hover th { background: var(--paper); border-bottom-color: transparent; }
  .tally tbody tr:hover > :first-child { border-radius: 12px 0 0 12px; }
  .tally tbody tr:hover > :last-child { border-radius: 0 12px 12px 0; }
  .tally tbody tr:hover .col-name .name { color: var(--royal); }
  .tally tbody tr:hover .medal-bar { filter: saturate(1.15) brightness(1.04); }
}
.tally tbody th { font-weight: 600; text-align: left; }
.tally tfoot th, .tally tfoot td { padding: 12px 8px; font-weight: 700; border-top: 1px solid var(--line-2); text-align: left; color: var(--ink-2); }
.col-rank { width: 46px; text-align: center !important; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink-2); }
.tally-row.is-podium .col-rank { color: #2A1D00; background-repeat: no-repeat; background-position: center; background-size: 30px 30px; }
.tally-row.is-rank-1 .col-rank { background-image: radial-gradient(circle, #FFD965 0 54%, #E2A50B 56% 68%, transparent 70%); }
.tally-row.is-rank-2 .col-rank { background-image: radial-gradient(circle, #EEF1F6 0 54%, #A9B3C2 56% 68%, transparent 70%); }
.tally-row.is-rank-3 .col-rank { color: #fff; background-image: radial-gradient(circle, #DC915A 0 54%, #A75A24 56% 68%, transparent 70%); }
.col-name a { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.col-name a:hover { text-decoration: none; }
.col-name a:hover .name { color: var(--royal); }
.col-name .name { line-height: 1.2; }
.col-num { width: 54px; text-align: center !important; font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; }
.col-num.is-zero { color: #B4BBCB; font-weight: 600; }
.tally tbody .col-emas { font-weight: 800; }
.tally thead .col-num { font-family: var(--font); }
.col-total { font-weight: 800; color: var(--ink); }
.col-bar { display: none; }
.medal-head { width: 26px; height: 26px; object-fit: contain; margin: 0 auto; }
.medal-head-dot { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; }
.tally-row.is-changed td, .tally-row.is-changed th { animation: changed 2.6s ease-out 1; }
@keyframes changed { 0% { background: #FFF1B0; } 100% { background: transparent; } }
.medal-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; min-width: 6px; background: var(--canvas); }
.medal-bar i { display: block; height: 100%; }
.b-emas { background: linear-gradient(180deg, #FFD965, #E2A50B); }
.b-perak { background: var(--perak); }
.b-perunggu { background: var(--perunggu); }
.tally-compact .col-num { width: 40px; font-size: 1.05rem; }
.side .table-wrap, .panel .tally-compact { margin: 0; padding: 0; }

/* Logos and pictograms */
.badge { flex: 0 0 auto; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1px var(--line); object-fit: contain; }
.badge-xs { width: 22px; height: 22px; }
.badge-sm { width: 32px; height: 32px; }
.badge-md { width: 46px; height: 46px; }
.badge-lg { width: 84px; height: 84px; }
.badge-img { padding: 2px; }
.badge-text { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; color: var(--royal); background: var(--royal-soft); box-shadow: none; }
.badge-xs.badge-text { font-size: .62rem; }
.badge-sm.badge-text { font-size: .8rem; }
.badge-md.badge-text { font-size: 1rem; }
.badge-lg.badge-text { font-size: 1.8rem; }
.sport-icon { flex: 0 0 auto; object-fit: contain; }
.sport-icon-xs { width: 22px; height: 22px; }
.sport-icon-sm { width: 36px; height: 36px; }
.sport-icon-md { width: 48px; height: 48px; }
.sport-icon-lg { width: 84px; height: 84px; }
.sport-icon-text {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  font-family: var(--font-display); font-weight: 700; color: var(--royal);
  background: linear-gradient(var(--paper), var(--paper)) padding-box, conic-gradient(var(--green) 0 25%, var(--yellow) 0 50%, var(--red) 0 75%, var(--royal) 0) border-box;
  border: 2px solid transparent;
}
.sport-icon-xs.sport-icon-text { font-size: .55rem; border-width: 1.5px; }
.sport-icon-sm.sport-icon-text { font-size: .78rem; }
.sport-icon-md.sport-icon-text { font-size: 1rem; }
.sport-icon-lg.sport-icon-text { font-size: 1.7rem; border-width: 3px; }
.medal-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .16), 0 0 0 1px rgba(0, 0, 0, .04); }
.medal-dot-emas { background: radial-gradient(circle at 35% 30%, #FFE69A, #E2A50B 70%); }
.medal-dot-perak { background: radial-gradient(circle at 35% 30%, #F4F6FA, #A0AABA 70%); }
.medal-dot-perunggu { background: radial-gradient(circle at 35% 30%, #F0B07C, #A75A24 70%); }

/* Empty states */
.empty { text-align: center; padding: 30px 18px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.empty-soft { box-shadow: none; background: rgba(255, 255, 255, .6); border: 1px dashed var(--line-2); }
.empty-art { width: min(200px, 56%); height: auto; margin: 0 auto 8px; mix-blend-mode: multiply; }
.empty-row { display: grid; gap: 4px; align-items: center; box-shadow: none; background: var(--canvas); }
.empty-title { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; }
.empty-text { color: var(--muted); max-width: 48ch; margin: 6px auto 0; }
.empty .btn { margin-top: 16px; }
.empty-page { padding: 34px 18px 38px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.empty-text a { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 640px) {
  .empty-row { grid-template-columns: 160px 1fr; gap: 20px; text-align: left; padding: 18px 24px; }
  .empty-row .empty-art { width: 160px; margin: 0; }
  .empty-row .empty-text { margin-left: 0; }
}

/* ---------- Rail ---------- */
.rail { display: flex; flex-direction: column; gap: 18px; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.rail-block .panel-title { margin-bottom: 8px; }
.rail-head .panel-title { margin-bottom: 0; }
.rail-block .more { margin-top: 12px; }
.rail-empty { color: var(--muted); padding: 8px 0 4px; }

/* Results */
.results > li + li { border-top: 1px solid var(--line); }
.result { padding: 12px 0; }
.result-head { display: flex; gap: 12px; align-items: flex-start; }
.result-head-text { min-width: 0; }
.result-event { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.result-link { color: var(--ink); background-image: linear-gradient(currentColor, currentColor); background-size: 0 1.5px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .3s var(--ease), color .2s; }
.result-link:hover { text-decoration: none; color: var(--royal); background-size: 100% 1.5px; }
.result-meta { font-size: .84rem; color: var(--muted); margin-top: 2px; }
.result-meta a { color: var(--muted); font-weight: 600; }
.result-medals { margin: 8px 0 0 48px; display: grid; gap: 5px; }
.rm { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; font-size: .94rem; }
.rm .medal-dot { align-self: center; }
.rm-team { font-weight: 700; color: var(--ink); }
.rm-athletes { color: var(--muted); font-size: .87rem; }
.rm.is-hl { background: var(--emas-soft); border-radius: 8px; padding: 2px 8px; margin-left: -8px; }
.ath { color: inherit; }
.ath:hover { color: var(--royal); }
.ath-more { font-weight: 600; color: var(--muted); }
.results-grid { display: grid; gap: 0 18px; }
.results-grid > li { border-top: 0 !important; }
.results-grid .result { padding: 14px 16px; margin-bottom: 12px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.results-grid .result:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.results-count { margin-bottom: 4px; font-size: .9rem; }
.date-head { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; margin: 26px 0 12px; display: flex; align-items: center; gap: 12px; }
.date-head::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.pager { display: flex; gap: 10px; margin-top: 22px; }

/* ---------- Match rows (open the match window) ---------- */
.mrows { border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-sm); overflow: hidden; }
.mrows-inner, .mrows-compact { box-shadow: none; border-radius: 0; background: transparent; }
.mrows-inner { border-top: 1px solid var(--line); }
.mrows-compact { margin: 0 -18px; }
.mrow { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); border-bottom: 1px solid var(--line); transition: background .2s; }
.mrows-compact .mrow { padding-left: 18px; padding-right: 14px; }
.mrow:last-child { border-bottom: 0; }
.mrow:hover { text-decoration: none; background: #F6F8FD; }
.mrow:hover .chev { transform: translateX(3px); color: var(--royal); }
.mrow-when { display: flex; flex-direction: column; line-height: 1.1; }
.mrow-date { font-size: .74rem; font-weight: 700; color: var(--muted); }
.mrow-time { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; }
.mrow-body { display: flex; flex-direction: column; min-width: 0; }
.mrow-event { font-weight: 700; line-height: 1.25; }
.mrow-meta { font-size: .83rem; color: var(--muted); }
.mrow-teams { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: .9rem; margin-top: 3px; color: var(--ink-2); }
.mrow-teams.is-h2h { gap: 2px 6px; }
.mt { display: inline-flex; align-items: center; gap: 5px; }
.mt.is-win { font-weight: 700; color: var(--ink); }
.mt .medal-dot { width: 10px; height: 10px; }
.mt b { font-family: var(--font-display); font-size: 1.02rem; }
.mt-more { color: var(--muted); }
.vs { color: var(--muted); font-size: .78rem; }
.mrow-own { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .84rem; font-weight: 700; color: var(--gold-ink); }
.mrow-own .medal-dot { width: 10px; height: 10px; }
.mrow-status { display: flex; align-items: center; gap: 6px; }
.chev { width: 18px; height: 18px; color: #A9B1C4; transition: transform .2s var(--ease), color .2s; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--canvas); color: var(--muted); }
.status-pill .dot { width: 6px; height: 6px; }
.status-pill.is-live { background: #FFE9EA; color: #B3121A; }
.status-pill.is-done { background: #E7F6EE; color: #0B6B33; }
.status-pill.is-medal { background: var(--emas-soft); color: var(--gold-ink); }
.status-pill.is-medal .medal-dot { width: 9px; height: 9px; }
.status-pill.is-off { background: #F1F2F5; color: #8A93A3; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--canvas); color: var(--muted); white-space: nowrap; }
.chip-live { background: #FFE9EA; color: #B3121A; }
.chip-blue { background: var(--royal-soft); color: var(--royal); }
.chip-gold { background: var(--emas-soft); color: var(--gold-ink); }

/* ---------- Match window ---------- */
.match-dialog { width: min(680px, calc(100vw - 24px)); max-height: min(88vh, 900px); padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: var(--paper); box-shadow: 0 40px 100px -30px rgba(7, 12, 43, .7); overflow: hidden; }
.match-dialog::backdrop { background: rgba(5, 9, 32, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.match-dialog[open] { animation: md-in .38s var(--ease); }
.match-dialog[open]::backdrop { animation: fade-in .3s ease; }
@keyframes md-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes fade-in { from { opacity: 0; } }
.md-frame { position: relative; max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }
.md-close { position: absolute; top: 14px; right: 14px; z-index: 3; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); transition: background .2s; }
.md-close:hover { background: rgba(255, 255, 255, .22); }
.md-close .ico { width: 18px; height: 18px; }
.md-loading { padding: 80px 24px; text-align: center; color: var(--muted); }
.md-loading::before { content: ""; display: block; width: 34px; height: 34px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--royal-2); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.md-head { position: relative; isolation: isolate; overflow: hidden; display: flex; gap: 14px; align-items: flex-start; padding: 22px 64px 22px 22px; color: #fff; background: radial-gradient(500px 260px at 100% 0, rgba(34, 54, 216, .55), transparent 70%), linear-gradient(180deg, var(--night), #0B1348); }
.md-head::before { content: ""; position: absolute; z-index: -1; right: -60px; top: -20px; width: 300px; height: 160%; background: url("../img/hero/ribbons-wide.webp") right center / cover no-repeat; opacity: .22; -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000); }
.md-head .sport-icon { display: block; width: 52px; height: 52px; padding: 6px; border-radius: 16px; background: #fff; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .7); }
.md-head-text { min-width: 0; }
.md-kicker { font-size: .86rem; font-weight: 600; color: var(--on-dark); }
.md-kicker a { color: var(--on-dark); }
.md-kicker a:hover { color: #fff; }
.md-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); line-height: 1.04; margin-top: 2px; }
.md-phase { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: .9rem; color: var(--on-dark); font-weight: 600; }
.md-no { padding: 2px 8px; border-radius: 6px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line); font-size: .8rem; color: #fff; }
.md-medal-flag { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); }
.md-medal-flag .medal-dot { width: 10px; height: 10px; }
.md-head .status-pill.is-soon { background: var(--glass); color: #fff; box-shadow: inset 0 0 0 1px var(--glass-line); }
.md-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.md-facts > div { padding: 12px 22px; background: var(--paper); }
.md-facts dt { font-size: .76rem; font-weight: 700; color: var(--muted); }
.md-facts dd { font-weight: 600; font-size: .95rem; line-height: 1.3; margin-top: 2px; }
.md-venue:last-child { grid-column: 1 / -1; }
.md-map { display: inline-block; margin-left: 8px; font-size: .84rem; font-weight: 700; }
.md-empty { padding: 26px 22px; color: var(--muted); }
.md-duel { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 10px; padding: 24px 18px 18px; }
.duel-side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; min-width: 0; }
.duel-team { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.1; }
.duel-team:hover { text-decoration: none; color: var(--royal); }
.duel-team .badge-lg { width: 76px; height: 76px; box-shadow: 0 0 0 1px var(--line), 0 14px 30px -18px rgba(7, 12, 43, .55); }
.duel-side.is-dsq .duel-team span { text-decoration: line-through; color: var(--muted); }
.md-duel.is-final .duel-side:not(.is-win) .badge { filter: grayscale(.4); opacity: .85; }
.duel-athletes { font-size: .86rem; color: var(--muted); line-height: 1.35; }
.duel-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.duel-score { display: flex; align-items: center; gap: 6px; padding-top: 18px; font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; }
.ds-n { font-size: 3rem; line-height: 1; color: #9AA3B8; min-width: 1ch; text-align: center; }
.ds-n.is-win { color: var(--ink); }
.ds-colon { font-size: 2rem; color: var(--line-2); }
.ds-vs { font-size: 1.3rem; color: var(--muted); padding: 0 8px; }
.medal-tag, .win-tag, .dsq-tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.medal-tag .medal-dot { width: 10px; height: 10px; }
.tag-emas { background: var(--emas-soft); color: var(--gold-ink); }
.tag-perak { background: var(--perak-soft); color: #3F4859; }
.tag-perunggu { background: var(--perunggu-soft); color: #7A3F14; }
.win-tag { background: #E7F6EE; color: #0B6B33; }
.dsq-tag { background: #FFE9EA; color: #B3121A; }
.md-field { padding: 8px 0; }
.fld { display: grid; grid-template-columns: 30px auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 22px; border-bottom: 1px solid var(--line); }
.fld:last-child { border-bottom: 0; }
.fld.has-medal { background: linear-gradient(90deg, rgba(255, 244, 207, .55), transparent 60%); }
.fld.fld-perak { background: linear-gradient(90deg, rgba(238, 241, 246, .9), transparent 60%); }
.fld.fld-perunggu { background: linear-gradient(90deg, rgba(248, 233, 221, .8), transparent 60%); }
.fld.is-dsq .fld-names, .fld.is-dsq .fld-team { text-decoration: line-through; color: var(--muted); }
.fld-rank { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink-2); text-align: center; }
.fld-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.fld-names { font-weight: 700; }
.fld-names .ath { color: var(--ink); }
.fld-team { font-size: .84rem; color: var(--muted); font-weight: 600; }
.fld-score { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; text-align: right; }
.md-path { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--line); background: #FAFBFD; }
.md-path-title { font-size: .76rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.md-path li { font-weight: 700; font-size: .92rem; padding: 2px 0; }
.md-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 22px 20px; border-top: 1px solid var(--line); }
.md-foot .share { margin: 0 0 0 auto; }
.md-page { padding: 0; overflow: hidden; }
.md-page .md-head { padding-right: 22px; }
@media (max-width: 639px) {
  .match-dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .match-dialog[open] { animation: sheet-in .4s var(--ease); }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
  .md-head { padding: 20px 60px 18px 16px; }
  .md-head .sport-icon { width: 44px; height: 44px; }
  .md-facts > div { padding: 10px 16px; }
  .md-duel { padding: 20px 8px 14px; gap: 4px; }
  .duel-team { font-size: 1rem; }
  .duel-team .badge-lg { width: 60px; height: 60px; }
  .ds-n { font-size: 2.3rem; }
  .fld { grid-template-columns: 24px auto minmax(0, 1fr) auto; padding: 10px 16px; gap: 8px; }
  .fld .mt-word { display: none; }
  .fld .medal-tag { padding: 0 6px; }
  .fld-score { grid-column: 3 / -1; text-align: left; font-size: 1rem; margin-top: -6px; }
  .md-path, .md-foot { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Bracket (computed layout, after the Futscore renderer) ---------- */
.bk-panel { padding-bottom: 8px; }
.bk-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 4px 0 6px; font-size: .84rem; color: var(--muted); }
.bk-legend li { display: flex; align-items: center; gap: 7px; }
.bk-legend .lg { width: 18px; height: 12px; border-radius: 3px; }
.lg-win { background: var(--paper); box-shadow: inset 3px 0 0 var(--royal), 0 0 0 1px var(--line-2); }
.lg-lose { background: #F1F3F7; box-shadow: 0 0 0 1px var(--line-2); }
.lg-champ { background: linear-gradient(90deg, #FFE7A0, #F8D46A); }
.bk-legend-hint { margin-left: auto; }
.bk-scroll { position: relative; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; margin: 0 -18px; padding: 8px 18px 18px; background-image: radial-gradient(#DEE3EE 1px, transparent 1.2px); background-size: 18px 18px; border-radius: 0 0 var(--radius) var(--radius); }
.bk-canvas { position: relative; margin: 0 auto 0 0; }
.bk-lines { position: absolute; inset: 0; z-index: 0; }
.bk-h, .bk-v { position: absolute; display: block; border: 0 solid #C3CBDB; }
.bk-h { height: 0; border-top-width: 2px; }
.bk-v { width: 0; border-left-width: 2px; }
.bk-h.is-on, .bk-v.is-on { border-color: var(--gold-2); }
.bk-head { position: absolute; top: 0; height: 32px; display: grid; place-items: center; border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: .98rem; color: #fff; background: linear-gradient(180deg, var(--night-3), var(--night-2)); box-shadow: 0 8px 18px -12px rgba(7, 12, 43, .8); }
.bk-head.is-final { color: #2A1D00; background: linear-gradient(180deg, #FFDA6B, var(--gold-2)); }
.bk-card { position: absolute; z-index: 1; display: flex; flex-direction: column; justify-content: center; border-radius: 12px; background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2), 0 8px 20px -14px rgba(7, 12, 43, .5); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.bk-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 0 0 1px #B8C3DA, 0 16px 30px -16px rgba(7, 12, 43, .55); }
.bk-card.is-live { box-shadow: 0 0 0 2px #FF8A90, 0 8px 20px -14px rgba(227, 27, 35, .6); }
.bk-meta { position: absolute; left: 4px; right: 4px; bottom: 100%; padding-bottom: 4px; font-size: .74rem; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-live { position: absolute; top: -10px; right: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 8px; border-radius: 9px; font-size: .68rem; font-weight: 800; color: #fff; background: var(--red); box-shadow: 0 2px 6px rgba(227, 27, 35, .4); }
.bk-live .dot { width: 5px; height: 5px; background: #fff; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }
.bk-side { position: relative; flex: 1; display: flex; align-items: center; gap: 8px; min-height: 0; padding: 0 10px; transition: background .15s, box-shadow .15s; }
.bk-side + .bk-side { border-top: 1px solid #EDF0F5; }
.bk-side:first-child { border-radius: 12px 12px 0 0; }
.bk-side:last-child { border-radius: 0 0 12px 12px; }
.bk-side .badge { width: 20px; height: 20px; }
.bk-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.bk-score { min-width: 22px; text-align: right; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.bk-side .medal-dot { width: 10px; height: 10px; }
.bk-side.is-win .bk-name { font-weight: 800; }
.bk-side.is-win::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--royal); }
.bk-side.is-lose { background: #F4F5F8; color: #7A8296; }
.bk-side.is-lose .badge { filter: grayscale(.5); opacity: .85; }
.bk-side.is-lose .bk-score { color: #9AA2B4; }
.bk-side.is-champ { background: linear-gradient(90deg, #FFEDB5, #FADB7E); color: #3A2700; }
.bk-side.is-champ::before { background: var(--gold-2); }
.bk-side.is-dsq .bk-name { text-decoration: line-through; }
.bk-side.is-tbd .bk-name { color: #98A1B5; font-style: italic; font-weight: 500; }
.bk-side.is-hl { background: var(--royal-soft); box-shadow: inset 0 0 0 2px var(--royal-2); color: var(--ink); }
.bk-side.is-hl.is-champ { background: #FFE38F; }
.bk-third-label { position: absolute; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: .92rem; color: var(--muted); }
.bk-card.is-third { box-shadow: 0 0 0 1px var(--line-2), 0 0 0 4px rgba(185, 105, 45, .1), 0 8px 20px -14px rgba(7, 12, 43, .5); }

/* Bagan published by GAMES v2 (partials/slot_board.php): empty slots, byes, groups */
.bk-card.bk-static { position: relative; left: auto; top: auto; min-height: 70px; }
.bk-card.is-empty { background: #FAFBFD; box-shadow: 0 0 0 1px var(--line), 0 6px 16px -14px rgba(7, 12, 43, .35); }
.bk-card.is-empty:hover { transform: none; }
.bk-hint { flex: none; font-size: .72rem; font-weight: 600; color: #98A1B5; }
.bk-side .rd-rank { flex: none; }
.sg-group { margin: 6px 0 26px; }
.sg-title { margin: 0 0 10px; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.sg-count { margin-left: 8px; font-family: inherit; font-size: .8rem; font-weight: 600; color: var(--muted); }
.sg-body { max-width: 560px; margin-bottom: 30px; }
.sg-list { list-style: none; margin: 0; padding: 0; }
.sg-list li { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.sg-list li:last-child { border-bottom: 0; }
.sg-rank { min-width: 26px; font-family: var(--font-display); font-weight: 800; color: var(--muted); }
.sg-name { flex: 1; min-width: 0; font-weight: 600; }
.sg-name.is-tbd { color: #98A1B5; font-style: italic; font-weight: 500; }
.sg-pts { font-size: .85rem; color: var(--muted); }
.sg-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .9rem; }
.sg-table th { font-size: .76rem; font-weight: 700; color: var(--muted); text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.sg-table td { text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.sg-table th:nth-child(2), .sg-table td.sg-who { text-align: left; }
.sg-table td.sg-who { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.sg-note { margin: 6px 0 0; font-size: .8rem; color: var(--muted); }
.sg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 34px 14px; }

/* Rounds board: events that are not a knockout (heats, direct finals, single bouts), same look as the bracket */
.rd-other { margin: 22px 0 6px; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.rd-scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -18px; padding: 10px 18px 20px; background-image: radial-gradient(#DEE3EE 1px, transparent 1.2px); background-size: 18px 18px; border-radius: 0 0 var(--radius) var(--radius); }
.rd-board { display: flex; align-items: flex-start; gap: 44px; width: max-content; }
.rd-col { position: relative; display: flex; flex-direction: column; gap: 18px; width: 310px; }
.rd-col.has-prev::before { content: ""; position: absolute; left: -30px; top: 10px; width: 12px; height: 12px; border-right: 2px solid #C3CBDB; border-top: 2px solid #C3CBDB; transform: rotate(45deg); }
.rd-head { height: 32px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: .98rem; color: #fff; background: linear-gradient(180deg, var(--night-3), var(--night-2)); box-shadow: 0 8px 18px -12px rgba(7, 12, 43, .8); }
.rd-head.is-final { color: #2A1D00; background: linear-gradient(180deg, #FFDA6B, var(--gold-2)); }
.rd-count { font-size: .72rem; font-weight: 600; opacity: .75; }
.rd-card { position: relative; display: flex; flex-direction: column; border-radius: 12px; background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2), 0 8px 20px -14px rgba(7, 12, 43, .5); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.rd-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 0 0 1px #B8C3DA, 0 16px 30px -16px rgba(7, 12, 43, .55); }
.rd-card.is-live { box-shadow: 0 0 0 2px #FF8A90, 0 8px 20px -14px rgba(227, 27, 35, .6); }
.rd-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; padding: 6px 10px 4px; border-bottom: 1px solid #EDF0F5; font-size: .74rem; font-weight: 700; color: var(--muted); }
.rd-when { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-live { position: static; }
.rd-state { flex: none; padding: 1px 8px; border-radius: 9px; font-size: .68rem; font-weight: 700; color: var(--royal); background: var(--royal-soft); }
.rd-row { position: relative; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 5px 10px; }
.rd-row + .rd-row { border-top: 1px solid #EDF0F5; }
.rd-row:last-child { border-radius: 0 0 12px 12px; }
.rd-row .badge { width: 20px; height: 20px; flex: none; }
.rd-rank { flex: none; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 6px; font-family: var(--font-display); font-weight: 800; font-size: .86rem; font-variant-numeric: tabular-nums; color: var(--muted); background: #F1F3F8; }
.rd-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.rd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.rd-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; color: var(--muted); }
.rd-score { flex: none; min-width: 22px; text-align: right; font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.rd-adv { flex: none; padding: 1px 7px; border-radius: 9px; font-size: .66rem; font-weight: 800; letter-spacing: .02em; color: var(--royal); background: var(--royal-soft); }
.rd-row .medal-dot { width: 10px; height: 10px; flex: none; }
.rd-row.is-win .rd-name { font-weight: 800; }
.rd-row.is-win::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--royal); }
.rd-row.is-lose { background: #F4F5F8; color: #7A8296; }
.rd-row.is-m-emas { background: linear-gradient(90deg, #FFF4CF, #FFEAA6); }
.rd-row.is-m-emas .rd-rank { color: #3A2700; background: var(--gold); }
.rd-row.is-m-perak { background: var(--perak-soft); }
.rd-row.is-m-perak .rd-rank { color: #fff; background: var(--perak); }
.rd-row.is-m-perunggu { background: var(--perunggu-soft); }
.rd-row.is-m-perunggu .rd-rank { color: #fff; background: var(--perunggu); }
.rd-row.is-dsq .rd-name { text-decoration: line-through; color: #7A8296; }
.rd-row.is-tbd .rd-name { color: #98A1B5; font-style: italic; font-weight: 500; }
.rd-row.is-hl { background: var(--royal-soft); box-shadow: inset 0 0 0 2px var(--royal-2); }
.rd-more { padding: 7px 10px 9px; border-top: 1px solid #EDF0F5; font-size: .76rem; font-weight: 700; color: var(--royal); }
.bk-legend .rd-rank, .bk-legend .rd-adv { display: inline-grid; }
@media (max-width: 639px) {
  .rd-scroll { margin: 0 -14px; padding: 10px 14px 18px; overflow-x: visible; }
  .rd-board { flex-direction: column; align-items: stretch; width: auto; gap: 30px; }
  .rd-col { width: 100%; }
  .rd-col.has-prev::before { left: 50%; top: -22px; margin-left: -6px; transform: rotate(135deg); }
}

/* Bagan finder: one search box over every event with matches */
.nf { position: relative; display: grid; gap: 6px; margin-bottom: 18px; padding: 14px; }
.nf-box { position: relative; display: flex; align-items: center; gap: 8px; }
.nf-icon { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.nf-input { flex: 1; min-width: 0; height: 48px; padding: 0 14px 0 42px; border: 1px solid var(--line-2); border-radius: 999px; font: inherit; font-size: 1rem; color: var(--ink); background: #F8F9FC; }
.nf-input:focus { outline: none; border-color: var(--royal-2); background: #fff; box-shadow: 0 0 0 4px var(--royal-soft); }
.nf-go { flex: none; height: 48px; }
.nf-hint { margin: 2px 0 0 14px; font-size: .78rem; color: var(--muted); }
.nf-list { position: absolute; z-index: 30; left: 14px; right: 14px; top: 78px; max-height: min(62vh, 520px); overflow-y: auto; padding: 6px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line-2), 0 24px 50px -20px rgba(7, 12, 43, .45); }
.nf-group { margin: 8px 10px 4px; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nf-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); cursor: pointer; }
.nf-opt:hover, .nf-opt.is-active { text-decoration: none; background: var(--royal-soft); }
.nf-name { flex: 1; min-width: 0; font-weight: 600; }
.nf-name mark { padding: 0; color: inherit; background: #FFE9A3; border-radius: 3px; }
.nf-cur { margin-left: 6px; font-size: .7rem; font-weight: 700; color: var(--royal); }
.nf-meta { flex: none; font-size: .76rem; color: var(--muted); }
.nf-live { flex: none; padding: 1px 7px; border-radius: 9px; font-size: .64rem; font-weight: 800; color: #fff; background: var(--red); }
.nf-none { padding: 14px 10px; color: var(--muted); }
.nf-results { margin-bottom: 18px; }
.nf-res-list { display: grid; gap: 2px; margin: 0 0 8px; padding: 0; list-style: none; }
.nf-res-list a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); }
.nf-res-list a:hover { text-decoration: none; background: var(--royal-soft); }
@media (max-width: 639px) { .nf-go { display: none; } .nf-list { left: 8px; right: 8px; } }

/* ---------- Athletes ---------- */
.finder { display: grid; gap: 12px; margin-bottom: 26px; }
.finder-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.results-title { font-size: 1.35rem; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 10px; }
.person { display: flex; align-items: center; gap: 12px; height: 100%; padding: 12px 14px; border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.person:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); }
.person-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--royal); background: linear-gradient(135deg, #EEF1FF, #DCE3FD); }
.person-avatar.sm { width: 30px; height: 30px; font-size: .75rem; }
.person-avatar.xs { width: 24px; height: 24px; font-size: .62rem; }
img.person-avatar { object-fit: cover; background: var(--royal-soft); box-shadow: 0 0 0 2px #fff, 0 2px 6px -2px rgba(7, 12, 43, .35); }
.hero-avatar.has-photo { background: var(--royal-soft); }
.hero-avatar.has-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.ath-chip { display: inline-flex; align-items: center; gap: 6px; margin: 3px 4px; padding: 2px 10px 2px 2px; border-radius: 999px; background: var(--canvas); color: var(--ink-2); font-size: .84rem; font-weight: 600; }
.ath-chip:hover { text-decoration: none; background: var(--royal-soft); color: var(--royal); }
.duel-athletes { display: flex; flex-wrap: wrap; justify-content: center; }
.fld-photo { width: 32px; height: 32px; }
.ath-stack { display: inline-flex; vertical-align: middle; margin-right: 8px; }
.ath-stack .person-avatar { width: 22px; height: 22px; font-size: .55rem; box-shadow: 0 0 0 2px #fff; }
.ath-stack .person-avatar + .person-avatar { margin-left: -7px; }
.mini-leaders .person-avatar, .mate-list .person-avatar { flex: 0 0 auto; }
.mini-leaders a { justify-content: flex-start; }
.mini-leaders .leader-medals { margin-left: auto; }
.person-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.person-name { font-weight: 700; line-height: 1.2; }
.person-meta { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); min-width: 0; }
.person-meta .badge, .person-meta .sport-icon { width: 18px; height: 18px; }
.leaders { display: grid; gap: 8px; }
@media (min-width: 720px) { .leaders { grid-template-columns: 1fr 1fr; } }
.leader { display: grid; grid-template-columns: 34px 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.leader:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); }
.leader-rank { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: var(--ink-2); background: var(--canvas); }
.is-top-1 .leader-rank { background: linear-gradient(180deg, #FFD965, #E2A50B); color: #2A1D00; }
.is-top-2 .leader-rank { background: linear-gradient(180deg, #F2F4F8, #A9B3C2); color: #1E2430; }
.is-top-3 .leader-rank { background: linear-gradient(180deg, #E39A5E, #B0622A); color: #fff; }
.leader-body { display: flex; flex-direction: column; min-width: 0; }
.leader-name { font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-meta { display: flex; align-items: center; gap: 6px; font-size: .83rem; color: var(--muted); white-space: nowrap; overflow: hidden; }
.leader-meta .badge { width: 18px; height: 18px; }
.leader-medals { display: flex; gap: 4px; }
.leader-medals .pm { min-width: 24px; height: 22px; font-size: .88rem; padding: 0 6px; }
.medal-cards { display: grid; gap: 10px; }
@media (min-width: 640px) { .medal-cards { grid-template-columns: 1fr 1fr; } }
.medal-card { display: flex; align-items: center; gap: 14px; height: 100%; padding: 14px 16px; border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.medal-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.medal-card.mc-emas::before { background: linear-gradient(180deg, #FFD965, #E2A50B); }
.medal-card.mc-perak::before { background: linear-gradient(180deg, #E4E9F0, #A9B3C2); }
.medal-card.mc-perunggu::before { background: linear-gradient(180deg, #E39A5E, #B0622A); }
.medal-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); }
.medal-card-img { width: 44px; height: 44px; object-fit: contain; flex: 0 0 auto; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .2)); }
.medal-card-body { display: flex; flex-direction: column; min-width: 0; }
.medal-card-word { font-size: .76rem; font-weight: 800; color: var(--gold-ink); }
.mc-perak .medal-card-word { color: #4E5868; }
.mc-perunggu .medal-card-word { color: #8A4A1C; }
.medal-card-event { font-weight: 700; line-height: 1.25; }
.medal-card-meta { font-size: .82rem; color: var(--muted); }
.mate-list { margin-top: 10px; }
.mate-list li + li { border-top: 1px solid var(--line); }
.mate-list a { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-weight: 600; color: var(--ink); }
.mate-list a:hover { color: var(--royal); text-decoration: none; }
.mate-list + .more { margin-top: 10px; }
.mini-leaders { margin-top: 8px; }
.mini-leaders li + li { border-top: 1px solid var(--line); }
.mini-leaders a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; color: var(--ink); font-weight: 600; }
.mini-leaders a:hover { color: var(--royal); text-decoration: none; }
.ml-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Tiles (contingents, sports) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.tiles-compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.tile { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 13px; align-items: center; height: 100%; padding: 14px 16px; border-radius: 16px; color: var(--ink); background: var(--paper); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.tile:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tile > :first-child { grid-row: 1 / span 2; }
.tile-name { font-weight: 700; line-height: 1.2; }
.tile-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 3px; font-size: .85rem; color: var(--muted); }
.tiles-sport .tile-meta { display: block; }
.tile-rank { font-weight: 700; color: var(--ink-2); margin-right: 4px; }
.tile-chip { position: absolute; top: 10px; right: 10px; height: 22px; font-size: .72rem; }
.tile-has-chip .tile-name { padding-right: 92px; }
.list-sort { margin-bottom: 16px; }

/* ---------- Detail sections ---------- */
.sport-medals { display: grid; gap: 10px; }
.sport-block { border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-sm); overflow: hidden; }
.sport-block summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; transition: background .2s; }
.sport-block summary:hover { background: #FAFBFD; }
.sport-block summary::-webkit-details-marker { display: none; }
.sport-block summary::after { content: ""; width: 9px; height: 9px; margin-left: 2px; border-right: 2px solid #A9B1C4; border-bottom: 2px solid #A9B1C4; transform: rotate(45deg) translate(-2px, -2px); transition: transform .25s var(--ease); }
.sport-block[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.sb-name { flex: 1; font-weight: 700; }
.sb-count { display: flex; gap: 4px; }
.medal-list { padding: 2px 14px 14px 60px; display: grid; gap: 7px; }
.medal-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.medal-list .medal-dot { align-self: center; }
.ml-event { font-weight: 700; color: var(--ink); }
.ml-event:hover { color: var(--royal); }
.ml-athletes { color: var(--muted); font-size: .87rem; }
.count-list { margin-top: 8px; }
.count-list li + li { border-top: 1px solid var(--line); }
.count-list a { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--ink); font-weight: 600; }
.count-list a:hover { text-decoration: none; color: var(--royal); }
.count-list a span:not(.num) { flex: 1; }
.count-list .num { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink-2); }
.discipline { margin-bottom: 14px; scroll-margin-top: 84px; }
.discipline-name { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.discipline-when { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.event-list { margin-top: 10px; }
.event { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.event-name { font-weight: 700; }
.event-name > a:not(.event-bracket) { color: var(--ink); }
.event-name > a:not(.event-bracket):hover { color: var(--royal); }
.event-pending { font-size: .84rem; color: var(--muted); }
.event-medals { display: grid; gap: 3px; font-size: .92rem; }
.event-medals li { display: flex; align-items: center; flex-wrap: wrap; gap: 0 7px; }
.event-medals a { font-weight: 600; }
.event-bracket { display: inline-flex; align-items: center; height: 22px; margin-left: 8px; padding: 0 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--royal-soft); vertical-align: 1px; }
.event-bracket:hover { text-decoration: none; background: #DCE2FA; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.jump a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s; }
.jump a:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.jump-n { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--canvas); font-size: .76rem; color: var(--muted); }
.sport-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sport-chips a { display: inline-flex; align-items: center; gap: 7px; padding: 4px 13px 4px 4px; border-radius: 999px; background: var(--canvas); color: var(--ink); font-weight: 600; font-size: .88rem; transition: background .2s, transform .2s var(--ease); }
.sport-chips a:hover { text-decoration: none; background: var(--royal-soft); transform: translateY(-1px); }
.sport-chips .sport-icon-sm { width: 28px; height: 28px; }
.sport-chips .sport-icon-text { font-size: .62rem; }

/* ---------- Schedule ---------- */
.jadwal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 16px; }
.jadwal-bar .filters { margin: 0; flex: 1 1 320px; }
.datestrip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 4px 16px 12px; scroll-snap-type: x proximity; }
.datestrip::-webkit-scrollbar { display: none; }
.datestrip a { position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; width: 56px; padding: 7px 0; border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); scroll-snap-align: center; transition: transform .2s var(--ease), box-shadow .2s; }
.datestrip a:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.datestrip a[aria-current="date"] { color: #fff; background: linear-gradient(180deg, var(--night-3), var(--night)); box-shadow: 0 10px 22px -12px rgba(7, 12, 43, .9); }
.datestrip a.is-today::after { content: ""; position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.ds-day, .ds-mon { font-size: .72rem; font-weight: 600; opacity: .75; }
.ds-num { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; line-height: 1.05; }
.day-section { margin-top: 24px; }
.plan-list { margin-top: 8px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-sm); overflow: hidden; }
.plan-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.plan-item:last-child { border-bottom: 0; }
.plan-sport { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; min-width: 0; flex: 0 1 230px; }
.plan-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.plan-disc { font-weight: 600; }
.plan-meta { font-size: .86rem; color: var(--muted); }

.matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-variant-numeric: tabular-nums; }
.matrix th, .matrix td { padding: 0; border-bottom: 1px solid var(--line); text-align: center; }
.matrix .mx-name { position: sticky; left: 0; z-index: 2; background: var(--paper); text-align: left; min-width: 172px; max-width: 220px; padding: 6px 12px; border-right: 1px solid var(--line); font-weight: 600; font-size: .9rem; }
.matrix .mx-name a { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.matrix .mx-name span { line-height: 1.2; }
.matrix .mx-name .mx-label { display: flex; align-items: center; gap: 8px; }
.mx-months th { font-size: .78rem; font-weight: 700; color: var(--muted); padding: 8px 0 2px 6px; text-align: left; border-bottom: 0; }
.mx-months .mx-name { vertical-align: bottom; color: var(--muted); font-size: .8rem; }
.mx-days th { min-width: 30px; }
.mx-days th a { position: relative; display: flex; flex-direction: column; align-items: center; padding: 2px 0 6px; color: var(--ink); }
.mx-days th a:hover { text-decoration: none; background: var(--canvas); }
.mx-wd { font-size: .64rem; font-weight: 600; color: var(--muted); }
.mx-dn { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.1; }
.mx-days th.is-weekend .mx-wd { color: var(--red); }
.mx-days th.is-today a { background: var(--night); border-radius: 8px 8px 0 0; }
.mx-days th.is-today .mx-wd, .mx-days th.is-today .mx-dn { color: #fff; }
.mx-cer { display: inline-block; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: var(--red); }
.mx-days .mx-cer { position: absolute; top: -2px; right: 2px; width: 6px; height: 6px; }
.mx-cell { height: 30px; }
.mx-cell.is-today, .mx-sum.is-today { background: rgba(10, 31, 168, .05); }
.mx-on { position: relative; display: block; width: 22px; height: 18px; margin: 0 auto; border-radius: 5px; background: var(--royal-soft); box-shadow: inset 0 0 0 1px #C9D2F5; transition: transform .15s; }
.mx-on:hover { transform: scale(1.12); background: #CBD5FA; }
.mx-on.has-medal { background: linear-gradient(180deg, var(--night-3), var(--night-2)); box-shadow: none; }
.mx-medal { position: absolute; inset: 0; margin: auto; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFE69A, #E2A50B 70%); box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.mx-sum { font-family: var(--font-display); font-weight: 700; font-size: .9rem; height: 30px; color: var(--ink); background: #F7F8FC; }
.matrix tfoot .mx-name { background: #F7F8FC; font-size: .82rem; color: var(--muted); }
.matrix tbody tr:hover .mx-name, .matrix tbody tr:hover td { background-color: #FAFBFE; }
.mx-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 12px; font-size: .86rem; color: var(--muted); }
.mx-legend li { display: flex; align-items: center; gap: 8px; }
.mx-legend .lg { width: 22px; height: 16px; margin: 0; }
.lg-today { width: 22px; height: 16px; border-radius: 5px; background: rgba(10, 31, 168, .1); box-shadow: inset 0 0 0 2px var(--royal); }

/* Clusters */
.cluster { margin-top: 18px; padding: 18px; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-sm); scroll-margin-top: 84px; }
.cluster-head .section-title { margin-bottom: 0; }
.cluster-head p { margin-top: 2px; }
.venue-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; margin-top: 14px; }
.venue { padding: 12px 14px; border-radius: 14px; background: var(--canvas); }
.venue-name { font-weight: 700; }
.venue-addr { font-size: .86rem; margin-top: 2px; }
.venue-sports { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: .88rem; font-weight: 600; }
.venue-map { display: inline-block; font-size: .84rem; font-weight: 700; margin-top: 4px; }

/* Info + check pages */
.prose-page { position: relative; }
.prose-page section { margin-top: 26px; max-width: 72ch; }
.prose-page section:first-of-type { margin-top: 0; }
.prose-page p { margin-top: 8px; color: var(--ink-2); }
.prose-page p a { text-decoration: underline; text-underline-offset: 3px; }
.prose-page h3 { font-size: 1.02rem; margin-top: 16px; }
.facts { display: grid; margin-top: 10px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-sm); overflow: hidden; }
.facts div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-weight: 600; }
.info-brand { display: none; }
@media (min-width: 960px) {
  .info-brand { display: grid; place-items: center; position: absolute; right: 16px; top: 26px; width: 320px; aspect-ratio: 1; border-radius: 28px; background: var(--paper); box-shadow: var(--shadow-lg); }
  .info-brand img { width: 64%; height: auto; }
}
/* Home: "Kenali PORPROV XV" invite, mascots standing on the dark stage. */
.meet-wrap { padding-bottom: 56px; }
.meet {
  position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 22px; padding: 26px 20px 0; border-radius: 24px; color: #fff; box-shadow: var(--shadow-lg);
  background:
    radial-gradient(620px 360px at 100% 0%, rgba(34, 54, 216, .55), transparent 65%),
    radial-gradient(520px 320px at 0% 100%, rgba(226, 165, 11, .16), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, #0A1144 100%);
}
.meet::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px); background-size: 22px 22px; }
.meet-kicker { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.meet-title { margin-top: 6px; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); line-height: 1.05; text-wrap: balance; }
.meet-text { margin-top: 10px; color: var(--on-dark); max-width: 54ch; }
.meet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.meet-cast { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin: 0; padding: 0; list-style: none; background: radial-gradient(60% 55% at 50% 62%, rgba(120, 140, 255, .26), transparent 70%); }
.meet-cast li { display: grid; justify-items: center; min-width: 0; text-align: center; padding-bottom: 16px; }
.meet-cast img { display: block; width: auto; max-width: 100%; height: 104px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .45)); }
@media (min-width: 520px) { .meet-cast img { height: 130px; } .meet-cast { gap: 10px; } }
.meet-name { margin-top: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.1; }
.meet-city { font-size: .78rem; color: var(--on-dark-2); }
@media (min-width: 900px) {
  .meet { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: end; gap: 28px; padding: 40px 40px 0; }
  .meet-copy { align-self: center; padding-bottom: 40px; }
  .meet-cast img { height: 190px; }
  .meet-cast li { padding-bottom: 26px; }
}

/* /info: numbers, host cities with their mascots, sources. */
.stat-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0 0; padding: 0; list-style: none; }
.stat-tiles li { display: grid; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--paper); box-shadow: var(--shadow-sm); }
.stat-tiles strong { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; line-height: 1; color: var(--royal); font-variant-numeric: tabular-nums; }
.stat-tiles span { font-size: .86rem; color: var(--muted); line-height: 1.3; }
.prose-page .note { font-size: .84rem; color: var(--muted); }
.host-list { display: grid; gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.host-card { display: grid; gap: 14px; padding: 16px; border-radius: 18px; background: var(--paper); box-shadow: var(--shadow-sm); }
.host-art { display: grid; place-items: center; height: 160px; border-radius: 14px; background: radial-gradient(70% 70% at 50% 60%, var(--royal-soft), transparent 75%); }
.host-art img { display: block; width: auto; max-width: 100%; height: 140px; object-fit: contain; }
.host-city { margin: 0 !important; font-weight: 700; color: var(--royal) !important; font-size: .9rem; }
.host-city span { margin-left: 6px; font-weight: 500; color: var(--muted); }
.host-mascot { margin: 2px 0 0 !important; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem !important; line-height: 1.1; }
.host-tagline { font-style: italic; font-weight: 600; color: var(--ink) !important; }
.host-link { font-size: .9rem; }
.source-list { margin: 8px 0 0; padding-left: 18px; font-size: .9rem; color: var(--ink-2); }
.source-list li + li { margin-top: 4px; }
.source-list a { text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 640px) {
  .stat-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .host-card { grid-template-columns: 190px minmax(0, 1fr); align-items: start; }
  .host-art { height: 190px; }
  .host-art img { height: 160px; }
}
.check { margin-top: 22px; }
.check .section-title { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.plain { border-collapse: collapse; font-size: .88rem; margin-top: 8px; background: var(--paper); }
.plain th, .plain td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; }
.plain th { background: var(--canvas); }

/* Share */
.share { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px 0 12px; margin-top: 10px; border-radius: 999px; background: #E3F6EA; color: #0B6B33; font-weight: 700; font-size: .9rem; transition: background .2s, transform .2s var(--ease); }
.share:hover { background: #CDEFD9; text-decoration: none; transform: translateY(-1px); }
.share svg { width: 19px; height: 19px; }
.band .share, .stage .share { color: #fff; background: rgba(37, 211, 102, .2); box-shadow: inset 0 0 0 1px rgba(37, 211, 102, .45); }
.band .share:hover { background: rgba(37, 211, 102, .3); }

/* ---------- Footer + tab bar ---------- */
.site-footer { position: relative; color: var(--on-dark); background: linear-gradient(180deg, #0A1144, var(--night)); padding: 36px 0 0; }
.footer-inner { display: grid; gap: 22px; padding-bottom: 30px; }
.footer-brand { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center; }
.footer-logo { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 20px; background: #fff; box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .8); }
.footer-logo img { width: 70px; height: auto; }
.footer-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: #fff; line-height: 1.2; }
.footer-text { font-size: .88rem; max-width: 56ch; margin-top: 4px; }
.footer-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; font-weight: 600; font-size: .92rem; }
.footer-nav a { color: rgba(255, 255, 255, .82); }
.footer-nav a:hover { color: #fff; }
.footer-partners { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--glass-line); }
.footer-partners-label { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-2); }
.partner-list { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 0; padding: 0; list-style: none; }
.partner-item { display: flex; align-items: center; gap: 12px; }
.partner-tile { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 16px; background: #fff; box-shadow: 0 14px 30px -16px rgba(0, 0, 0, .8); }
.partner-tile img { width: 58px; height: 58px; object-fit: contain; }
.partner-name { max-width: 14ch; font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.15; color: #fff; }
.footer-ribbon { display: flex; height: 4px; }
.footer-ribbon span { flex: 1; }
.footer-ribbon span:nth-child(1) { background: var(--green); }
.footer-ribbon span:nth-child(2) { background: var(--yellow); }
.footer-ribbon span:nth-child(3) { background: var(--red); }
.footer-ribbon span:nth-child(4) { background: var(--royal-2); }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom, 0px); background: rgba(7, 12, 43, .94); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid rgba(255, 255, 255, .08); }
.tabbar > a, .tab-more summary { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--tabbar); color: rgba(255, 255, 255, .6); font-size: .7rem; font-weight: 600; cursor: pointer; transition: color .2s; }
.tabbar > a:hover, .tab-more summary:hover { text-decoration: none; color: #fff; }
.tabbar > a[aria-current="page"], .tab-more summary.is-current { color: var(--gold); }
.tabbar .ico { width: 23px; height: 23px; }
.tab-more { position: relative; }
.tab-more summary { list-style: none; }
.tab-more summary::-webkit-details-marker { display: none; }
.tab-more[open] summary { color: #fff; }
.tab-sheet { position: absolute; right: 8px; bottom: calc(100% + 10px); width: min(280px, calc(100vw - 16px)); padding: 6px; border-radius: 18px; background: var(--paper); box-shadow: 0 30px 70px -20px rgba(7, 12, 43, .7); animation: md-in .3s var(--ease); }
.tab-sheet a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--ink); font-weight: 600; }
.tab-sheet a:hover, .tab-sheet a[aria-current="page"] { text-decoration: none; background: var(--canvas); }
.tab-sheet .ico { width: 21px; height: 21px; color: var(--royal); }

/* ---------- Motion: appear and rise ---------- */
.js .rv { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 55ms); }
.js .rv.is-in { opacity: 1; transform: none; }
.js .stage-copy > *, .js .stage .scorecard, .js .podium-step, .js .band-inner > * { animation: rise .9s var(--ease) backwards; }
.js .stage-copy > :nth-child(2) { animation-delay: .08s; }
.js .stage-copy > :nth-child(3) { animation-delay: .16s; }
.js .stage-copy > :nth-child(4) { animation-delay: .24s; }
.js .stage .scorecard { animation-delay: .2s; }
.js .podium-step.step-2 { animation-delay: .34s; }
.js .podium-step.step-3 { animation-delay: .44s; }
.js .podium-step.step-1 { animation-delay: .56s; animation-duration: 1.1s; }
.js .band-inner > :nth-child(2) { animation-delay: .07s; }
.js .band-inner > :nth-child(3) { animation-delay: .14s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
/* Headlines are the largest paint: they rise but never start invisible. */
.js .stage-copy > .stage-title, .js .band-inner > .page-title, .js .band-inner > .hero-id { animation-name: rise-solid; }
@keyframes rise-solid { from { transform: translateY(18px); } }
.js .step-1 .podium-medal { animation: medal-drop 1.2s var(--ease) .75s backwards; }
@keyframes medal-drop { from { opacity: 0; transform: translateY(-18px) rotate(-14deg) scale(.8); } }

/* ---------- Breakpoints ---------- */
@media (max-width: 639px) {
  .stage { padding: 22px 0 76px; }
  .stage-sub { font-size: .98rem; }
  .scorecard { gap: 2px 14px; padding: 12px 14px; }
  .sc-ring { width: 66px; height: 66px; }
  .sc-ring-text strong { font-size: 1.12rem; }
  .sc-ring-text span { display: none; }
  .scorecard .sc-caption { display: none; }
  .sc-medals { grid-column: 2; margin-top: 0; padding-top: 0; border-top: 0; }
  .scm dd { font-size: 1.35rem; }
  .sc-updated { grid-column: 2; margin-top: 0; }
  .sc-count + .sc-caption { display: block; grid-column: 1 / -1; }
  .sc-big { font-size: 2.9rem; }
  .podium { gap: 6px; margin-top: 26px; }
  .podium-step a { padding: 22px 4px 12px; gap: 6px; border-radius: 16px; }
  .podium-step.step-1 a { padding-top: 26px; }
  .podium-disc { width: 50px; height: 50px; }
  .step-1 .podium-disc { width: 64px; height: 64px; }
  .podium .badge-lg { width: 40px; height: 40px; }
  .podium .step-1 .badge-lg { width: 52px; height: 52px; }
  .podium-name { font-size: .9rem; }
  .step-1 .podium-name { font-size: 1rem; }
  .podium-medal { width: 38px; height: 38px; }
  .step-1 .podium-medal { width: 50px; height: 50px; }
  .podium .pm { min-width: 22px; height: 20px; font-size: .8rem; padding: 0 5px; }
  .panel { padding: 14px; border-radius: 16px; }
  .table-wrap { margin: 0 -14px; padding: 0 7px; }
  .mrows-compact { margin: 0 -14px; }
  .bk-scroll { margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
  .tally td, .tally tbody th { padding: 8px 3px; }
  .tally thead th { padding: 6px 3px 8px; }
  .col-rank { width: 26px; font-size: 1rem; }
  .tally-row.is-podium .col-rank { background-size: 25px 25px; }
  .col-num { width: 30px; font-size: 1.02rem; }
  .col-total { width: 36px; }
  .col-name a { gap: 7px; }
  .col-name .badge-sm { width: 26px; height: 26px; }
  .col-name .name { font-size: .9rem; }
  .medal-head { width: 22px; height: 22px; }
  .tally tfoot .col-num { font-size: .86rem; }
  .tally tfoot th { font-size: .82rem; }
  .medal-label { display: none; }
  .hero-id { gap: 14px 16px; }
  .hero-disc, .hero-avatar { width: 68px; height: 68px; }
  .hero-disc .badge-lg { width: 54px; height: 54px; }
  .hero-disc-sport .sport-icon-lg { width: 50px; height: 50px; }
  .hero-avatar { font-size: 1.6rem; }
  .mc dd { font-size: 2rem; }
  .mc { padding: 10px 12px 12px; }
  .matrix .mx-name { min-width: 104px; max-width: 120px; padding: 4px 8px; font-size: .8rem; }
  .matrix .mx-name .sport-icon { display: none; }
  .mx-days th { min-width: 28px; }
  .mx-on { width: 20px; }
  .mrow { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; padding: 11px 12px; }
  .mrow-status .status-pill { padding: 0 8px; }
  .bk-legend-hint { display: none; }
  .facts div { grid-template-columns: 120px 1fr; }
}
@media (min-width: 640px) {
  .col-bar { display: table-cell; width: 20%; }
  .col-num { width: 64px; }
  .badge-sm { width: 34px; height: 34px; }
  .podium { gap: 16px; }
  .hero-id { grid-template-columns: auto 1fr auto; }
  .medal-count { grid-column: auto; grid-template-columns: repeat(3, 108px); }
  .results-grid { grid-template-columns: 1fr 1fr; }
  .footer-nav { grid-template-columns: repeat(4, auto); }
}
@media (min-width: 720px) {
  .stage { padding: 52px 0 96px; }
  .stage-inner { grid-template-columns: minmax(0, 1fr) 320px; align-items: center; gap: 32px; }
  .podium { max-width: 820px; margin-top: 44px; }
}
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .main-nav { display: flex; }
  .header-search { margin-left: 4px; }
  .stage { padding: 64px 0 104px; }
  .stage-inner { grid-template-columns: minmax(0, 1fr) 350px; gap: 48px; }
  .scorecard { padding: 20px 22px; }
  .sc-ring { width: 108px; height: 108px; }
  .sc-ring-text strong { font-size: 1.8rem; }
  .sc-big { font-size: 4.6rem; }
  .home-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; }
  .rail { position: sticky; top: 84px; }
  .two-col { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
  .side { position: sticky; top: 84px; }
  .panel { padding: 22px; }
  .table-wrap { margin: 0 -22px; padding: 0 22px; }
  .mrows-compact { margin: 0 -22px; }
  .mrows-compact .mrow { padding-left: 22px; padding-right: 18px; }
  .bk-scroll { margin: 0 -22px; padding-left: 22px; padding-right: 22px; }
  .band { padding: 40px 0 44px; }
  .band-hero { padding: 34px 0 40px; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
  .datestrip { margin: 0 0 12px; padding-left: 2px; padding-right: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1; transform: none; }
}

/* ---------- Big-screen mode (/layar) ---------- */
body.tv { padding: 0; min-height: 100vh; background: radial-gradient(120% 90% at 85% 0%, #1A2FC0 0%, #0A1FA8 38%, #061366 100%); color: #fff; overflow: hidden; display: block; }
.tv-frame { height: 100vh; display: flex; flex-direction: column; padding: 2.2vw 2.6vw 0; font-size: 1.05vw; }
.tv-head { display: flex; align-items: center; gap: 1.4vw; }
.tv-mark { width: 4.4vw; height: 4.4vw; background: #fff; border-radius: 50%; padding: .35vw; }
.tv-org { object-fit: contain; padding: .55vw; margin-left: -.6vw; }
.tv-title h1 { font-family: var(--font-display); font-weight: 800; font-size: 3.2vw; line-height: 1; }
.tv-title p { font-family: var(--font-display); font-weight: 700; font-size: 1.5vw; color: var(--yellow); margin-top: .2vw; }
.tv-progress { margin-left: auto; text-align: right; display: flex; flex-direction: column; }
.tv-pct { font-family: var(--font-display); font-weight: 800; font-size: 3vw; line-height: 1; color: var(--yellow); }
.tv-pct-label { font-size: 1vw; opacity: .8; }
.tv-clock { font-family: var(--font-display); font-weight: 800; font-size: 3vw; padding-left: 1.6vw; margin-left: 1.6vw; border-left: 1px solid rgba(255,255,255,.25); }
.tv-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 28vw; gap: 2.4vw; margin-top: 1.8vw; min-height: 0; }
.tv-board { position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.tv-row { display: grid; grid-template-columns: 4vw minmax(0, 1fr) 7vw 7vw 8vw 7vw; align-items: center; gap: .6vw; padding: .5vw 1vw; border-radius: .7vw; font-size: 1.55vw; }
.tv-row + .tv-row { margin-top: .45vw; }
.tv-row-head { font-size: 1vw; opacity: .75; padding-top: 0; padding-bottom: .4vw; }
.tv-row-head .medal-dot { width: .8vw; height: .8vw; vertical-align: 0; }
.tv-page { display: none; }
.tv-page.is-active { display: block; animation: tv-in .6s ease; }
@keyframes tv-in { from { opacity: 0; transform: translateY(1vw); } }
.tv-page .tv-row { background: rgba(255,255,255,.07); }
.tv-top-1 { background: linear-gradient(90deg, rgba(212,160,23,.38), rgba(255,255,255,.07)) !important; }
.tv-top-2 { background: linear-gradient(90deg, rgba(167,176,190,.32), rgba(255,255,255,.07)) !important; }
.tv-top-3 { background: linear-gradient(90deg, rgba(181,103,44,.36), rgba(255,255,255,.07)) !important; }
.tv-rank { font-family: var(--font-display); font-weight: 800; font-size: 2.1vw; text-align: center; }
.tv-name { display: flex; align-items: center; gap: .9vw; font-weight: 700; min-width: 0; }
.tv-name .badge { width: 2.6vw; height: 2.6vw; }
.tv-name .badge-text { font-size: 1vw; }
.tv-n { text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 2vw; }
.tv-row-head .tv-n { font-family: var(--font); font-weight: 600; font-size: 1vw; }
.tv-emas { color: #FFD45C; }
.tv-total { font-weight: 800; }
.tv-dots { display: flex; gap: .5vw; justify-content: center; margin-top: auto; padding: 1vw 0; }
.tv-dots span { width: .7vw; height: .7vw; border-radius: 50%; background: rgba(255,255,255,.3); }
.tv-dots span.is-active { background: var(--yellow); }
.tv-feed { background: rgba(255,255,255,.07); border-radius: 1vw; padding: 1.4vw 1.6vw; min-height: 0; overflow: hidden; }
.tv-feed h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.9vw; margin-bottom: .8vw; }
.tv-feed li { padding: .9vw 0; border-top: 1px solid rgba(255,255,255,.15); }
.tv-ev { font-weight: 700; font-size: 1.25vw; line-height: 1.2; }
.tv-sport { font-size: .95vw; opacity: .7; margin-bottom: .3vw; }
.tv-win { display: flex; align-items: center; gap: .55vw; font-size: 1.1vw; }
.tv-win .medal-dot { width: .85vw; height: .85vw; }
.tv-empty { opacity: .8; font-size: 1.2vw; }
.tv-foot { display: flex; gap: 2.4vw; align-items: center; padding: 1.2vw 0; font-family: var(--font-display); font-weight: 700; font-size: 1.5vw; }
.tv-foot .medal-dot { width: 1vw; height: 1vw; vertical-align: -.05vw; }
.tv-url { margin-left: auto; opacity: .75; font-family: var(--font); font-weight: 600; font-size: 1.1vw; }
.tv-band { height: .6vw; margin: 0 -2.6vw; }

/* ---------- Print ---------- */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { padding: 0; background: #fff; display: block; }
  .site-header, .tabbar, .site-footer, .match-dialog, .print-hide, .stage, .rail, .board-foot, .empty, .share, .hero-links, .crumbs, .stage-actions, .finder, .pager, .filters, .jadwal-bar, .datestrip, .bk-legend-hint, .side { display: none !important; }
  /* Bands print as plain ink on paper; the schedule and medal table carry their own print title. */
  .band { color: var(--ink); background: none !important; padding: 0 0 5mm !important; overflow: visible; }
  .band::before, .band::after { display: none !important; }
  .nav-jadwal .band, .nav-klasemen .band { display: none !important; }
  .band .page-title { font-size: 22pt; }
  .band .page-lead, .mc dt, .mini-text { color: var(--muted); }
  .hero-facts > * { color: var(--ink); background: none; box-shadow: inset 0 0 0 1px var(--line-2); }
  .hero-disc, .hero-avatar { box-shadow: 0 0 0 1px var(--line-2); }
  .hero-avatar { color: var(--royal); background: var(--royal-soft); }
  .mc { background: none; box-shadow: inset 0 0 0 1px var(--line-2); }
  .mc dd { color: var(--ink); }
  .mini-track { background: var(--line); }
  .js .band-inner > *, .js .stage-copy > *, .js .podium-step { animation: none !important; }
  .two-col { display: block; }
  .section { margin-bottom: 6mm; }
  .sport-block, .medal-card, .person, .leader, .tile, .result, .discipline, .fld { break-inside: avoid; }
  .medal-cards, .people, .leaders, .tiles, .results-grid { gap: 2mm; }
  .tile:hover, .person:hover, .medal-card:hover, .bk-card:hover { transform: none; }
  .bk-panel { break-inside: avoid; }
  .bk-scroll { margin: 0; padding: 0; }
  .bk-canvas { zoom: .78; }
  .nav-bagan .band .page-lead, .sport-block summary::after { display: none !important; }
  .sport-block { break-inside: auto; }
  .sport-block summary { padding: 2mm 0; }
  .medal-list { columns: 2; column-gap: 8mm; padding: 0 0 3mm 9mm; display: block; font-size: 9pt; }
  .medal-list li { break-inside: avoid; margin-bottom: 1mm; }
  .medal-list .ml-event { font-size: 9pt; }
  .medal-list .ml-athletes { font-size: 8pt; }
  .sport-block summary .sport-icon { width: 7mm; height: 7mm; }
  /* Medal table: the whole table on one A4 sheet. */
  .board-head { display: none !important; }
  .tally thead th { padding: 0 2mm 1.5mm; font-size: 8pt; }
  .tally td, .tally tbody th { padding: .5mm 2mm; font-size: 9.5pt; line-height: 1.1; }
  .tally .col-name a { gap: 2.5mm; }
  .tally .col-num { font-size: 10.5pt; width: 18mm; }
  .tally .col-name .badge { width: 4.2mm; height: 4.2mm; padding: 0; }
  .tally .col-rank { font-size: 10pt; background-size: 4.8mm 4.8mm !important; }
  .tally .medal-head { display: none; }
  .results-grid { display: block; columns: 3; column-gap: 4mm; }
  .results-grid > li { break-inside: avoid; margin-bottom: 3mm; }
  .results-grid .result { margin: 0; padding: 2.5mm 3mm; box-shadow: none; border: 1px solid var(--line-2); border-radius: 3mm; font-size: 9pt; }
  .result-medals { margin-left: 0; }
  .result-head .sport-icon { width: 6mm; height: 6mm; }
  .date-head { margin: 4mm 0 2.5mm; font-size: 12pt; break-after: avoid; }
  .page-lead { font-size: 10pt; }
  .tally tfoot th { font-size: 10pt; }
  .mrow { padding: 1.6mm 0; gap: 3mm; }
  .mrow-time { font-size: 10.5pt; }
  .plan-item { padding: 1.6mm 0; }
  .tally tfoot { display: table-row-group; }
  .tally tfoot th, .tally tfoot td { padding: 1.5mm 2mm; }
  .tally tbody tr:hover td, .tally tbody tr:hover th { background: none; }
  .print-foot { display: block; margin-top: 3mm; padding-top: 2mm; border-top: 1px solid var(--line-2); font-size: 8pt; color: var(--muted); }
  .print-only { display: block; }
  .print-title { font-family: var(--font-display); font-weight: 800; font-size: 16pt; margin-bottom: 6mm; }
  .js .rv { opacity: 1 !important; transform: none !important; }
  .page, .home-grid { padding: 0; margin: 0; display: block; }
  .wrap { max-width: none; padding: 0; }
  .panel, .matrix-wrap, .mrows, .sport-block, .plan-list { box-shadow: none; border-radius: 0; padding: 0; }
  .table-wrap { margin: 0; padding: 0; }
  .col-bar { display: none !important; }
  .matrix-wrap { overflow: visible; }
  .matrix { font-size: 7pt; }
  .matrix .mx-name { position: static; min-width: 0; padding: 1mm 2mm; font-size: 7pt; }
  .matrix .sport-icon { display: none; }
  .mx-days th { min-width: 0; }
  .mx-dn { font-size: 8pt; }
  .mx-wd { font-size: 6pt; }
  .mx-cell, .mx-sum { height: auto; padding: .6mm 0; }
  .mx-on { width: 4mm; height: 3mm; border-radius: 1mm; }
  .mx-medal { width: 1.8mm; height: 1.8mm; box-shadow: none; }
  .matrix tfoot { display: table-row-group; }
  details.sport-block > *:not(summary) { display: block !important; }
  .plan-item, .mrow, .sport-block summary { break-inside: avoid; }
  .chev { display: none; }
  .bk-scroll { overflow: visible; background: none; }
  a { color: inherit !important; text-decoration: none !important; }
}
.trial-bar { background: #F5C542; color: #070C2B; padding: 8px 16px; font-size: .86rem; text-align: center; position: relative; z-index: 60; }
.trial-bar b { margin-right: 6px; letter-spacing: .06em; }
.sg-babak .sg-name { flex: 0 0 13em; }
.sg-files { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sg-files .is-tbd { color: #98A1B5; font-style: italic; }
/* score detail from GAMES v2: set scores, partai of a beregu tie, battle-royale placement + kill */
.md-sets { padding: 0 22px 14px; text-align: center; font-variant-numeric: tabular-nums; }
.md-partai { padding: 14px 22px; border-top: 1px solid var(--line); }
.md-partai-tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.md-partai-tbl th, .md-partai-tbl td { padding: 6px 4px; border-top: 1px solid var(--line); vertical-align: top; }
.md-partai-tbl th { text-align: left; font-weight: 600; white-space: nowrap; }
.md-partai-tbl td:last-child { text-align: right; }
.md-partai-tbl .pt-score { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.md-partai-tbl .is-win { font-weight: 700; }
.fld-br { display: block; font-family: var(--font); font-weight: 500; font-size: .72rem; color: var(--muted); }
@media (max-width: 560px) { .md-partai { padding: 12px 10px; } .md-partai-tbl { font-size: .82rem; } }
/* sandbox (app/mode.php): a GAMES user in Sandbox mode sees practice data; the bar on top, and a striped edge on the
   sticky header so it stays visible while scrolling */
.sandbox-bar { padding: 9px 16px; text-align: center; font-size: .9rem; font-weight: 600; color: #1A1A1A; position: relative; z-index: 60;
  background: repeating-linear-gradient(-45deg, var(--gold) 0 18px, #FFD95E 18px 36px); border-bottom: 3px solid #1A1A1A; }
.sandbox-bar b { margin-right: 8px; padding: 2px 8px; border-radius: 6px; background: #1A1A1A; color: var(--gold); letter-spacing: .08em; }
.sandbox-bar a { color: #1A1A1A; text-decoration: underline; }
.is-sandbox .site-header::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 6px;
  background: repeating-linear-gradient(-45deg, var(--gold) 0 10px, #1A1A1A 10px 20px); }
@media (max-width: 560px) { .sandbox-bar { font-size: .8rem; } }
.sb-badge { flex: none; padding: 5px 10px; border-radius: 8px; background: var(--gold); color: #1A1A1A; font-weight: 800; font-size: .78rem; letter-spacing: .08em; border: 2px solid #1A1A1A; }
.sb-badge:hover { text-decoration: none; background: #FFD95E; }
