/* ==========================================================================
   Persatuan Catur Negeri Selangor: main stylesheet
   Mobile-first. Tokens first, then base, layout, components, animations.
   ========================================================================== */

:root {
  --red: #d7141a;
  --red-dark: #a60f14;
  --gold: #ffd200;
  --gold-dark: #e0b800;
  --ink: #111111;
  --ink-2: #1c1c1c;
  --paper: #ffffff;
  --grey-1: #f5f5f5;
  --grey-2: #e8e8e8;
  --grey-3: #6b6b6b;
  --font-head: "Montserrat", "Oswald", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  --header-h: 68px;
  --wrap: 1240px;
  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0; font-family: var(--font-body); font-size: 1rem; line-height: 1.65;
  color: var(--ink); background: var(--paper); overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 0.5em; letter-spacing: -0.01em; font-weight: 800; }
h1 { font-size: clamp(2.2rem, 7vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4.6vw, 2.5rem); text-transform: uppercase; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { padding: 0; margin: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; box-shadow: 0 0 0 5px var(--ink); border-radius: 4px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 1000; background: var(--gold); color: var(--ink); padding: 10px 16px; font-weight: 700; border-radius: 8px; transition: top 0.2s; }
.skip-link:focus { top: 12px; }
.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }

/* ---------- Page loader ----------
   Timeline (about 3s): board fades in 0-0.5s, knight jumps 0.5-2.0s,
   board melts into the logo 1.9-2.5s, then the whole loader fades out (0.6s).
   Plays on fresh open and refresh only (see the inline script in each page's <head>). */
.loader { display: none; position: fixed; inset: 0; z-index: 2000; place-items: center; background: radial-gradient(circle at 50% 45%, #1d1d1d, var(--ink) 70%); transition: opacity 0.6s ease, visibility 0.6s; touch-action: none; overscroll-behavior: contain; }
.js:not(.no-loader) .loader { display: grid; }
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
html.loader-on, html.loader-on body { overflow: hidden; }
.loader-inner { --c: clamp(50px, 16vmin, 84px); display: grid; justify-items: center; gap: clamp(34px, 8vmin, 60px); padding: 16px; }
.loader-stage { position: relative; width: calc(var(--c) * 3); height: calc(var(--c) * 3); }
.loader-board { position: absolute; inset: 0; display: grid; grid-template: repeat(3, var(--c)) / repeat(3, var(--c)); border: 4px solid var(--gold); border-radius: 8px; box-sizing: content-box; margin: -4px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); animation: board-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both, board-out 0.5s ease-in 1.95s forwards; }
.loader-board i { background: #f1f1f1; }
.loader-board i:nth-child(even) { background: #2c2c2c; }
/* only boxes 3, 4 and 9 light up, as the knight lands on them */
.loader-board i:nth-child(3), .loader-board i:nth-child(4), .loader-board i:nth-child(9) { animation: tile-lit 0.35s ease forwards; }
.loader-board i:nth-child(3) { animation-delay: 0.5s; } .loader-board i:nth-child(4) { animation-delay: 0.95s; } .loader-board i:nth-child(9) { animation-delay: 1.55s; }
.loader-knight { position: absolute; left: 0; top: 0; width: var(--c); height: var(--c); animation: knight-path 2s both; }
.loader-knight svg { position: relative; width: 100%; height: 100%; padding: 6px; color: var(--red); transform-origin: 50% 90%; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.75)); animation: hop 0.375s 0.6s 1 both, hop 0.375s 1.2s 1 both; }
.k-shadow { position: absolute; left: 22%; right: 22%; bottom: 7%; height: 10%; border-radius: 50%; background: rgba(0, 0, 0, 0.5); filter: blur(2px); animation: shadow 0.375s 0.6s 1 both, shadow 0.375s 1.2s 1 both; }
.loader-text { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 0 16px; }
.loader-text span { display: block; opacity: 0; animation: fade-up 0.7s ease forwards; }
.lt-name { text-wrap: balance; font-family: var(--font-head); font-weight: 800; letter-spacing: 0.16em; color: var(--gold); font-size: clamp(0.95rem, 3.8vw, 1.3rem); text-transform: uppercase; animation-delay: 2.9s !important; }
.lt-sub { font-family: var(--font-body); font-weight: 400; letter-spacing: 0.26em; color: rgba(255, 255, 255, 0.72); font-size: clamp(0.7rem, 2.6vw, 0.85rem); animation-delay: 3.2s !important; }
@keyframes board-in { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes board-out { to { opacity: 0; transform: scale(0.82); } }
@keyframes tile-lit { to { background: var(--gold); } }
/* starts on box 3, hops to box 4, then to box 9 and stays there */
@keyframes knight-path {
  0%, 30% { transform: translate(calc(var(--c) * 2), 0); animation-timing-function: cubic-bezier(0.45, 0.05, 0.25, 1); }
  48.75%, 60% { transform: translate(0, var(--c)); animation-timing-function: cubic-bezier(0.45, 0.05, 0.25, 1); }
  78.75%, 100% { transform: translate(calc(var(--c) * 2), calc(var(--c) * 2)); }
}
/* jump up, come down, tiny squash-and-settle on landing */
@keyframes hop {
  0% { transform: translateY(0) scale(1); animation-timing-function: cubic-bezier(0.3, 0, 0.5, 1); }
  45% { transform: translateY(-58%) scale(1.18); animation-timing-function: cubic-bezier(0.5, 0, 0.7, 1); }
  78% { transform: translateY(0) scale(1.1, 0.88); animation-timing-function: ease-out; }
  90% { transform: translateY(-4%) scale(0.98, 1.03); animation-timing-function: ease-in; }
  100% { transform: translateY(0) scale(1); }
}
@keyframes shadow { 0%, 100% { transform: scale(1); opacity: 1; } 45% { transform: scale(0.5); opacity: 0.35; } 78% { transform: scale(1.15, 1); opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* Emblem: the logo fades in and scales 0.92 -> 1 with a glow that blooms and settles, then one shine sweep.
   Timeline (s): logo + glow 2.4-3.4 | shine 3.2-4.1 | text lines 2.9 and 3.2 | hold to ~4.8 */
.loader-glow { position: absolute; left: 50%; top: 50%; width: calc(var(--c) * 6.4); height: calc(var(--c) * 6.4); translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 0, 0.34) 0%, rgba(215, 20, 26, 0.26) 38%, transparent 68%); opacity: 0; pointer-events: none; animation: glow-bloom 1.5s ease-out 2.4s forwards; }
.loader-emblem { position: absolute; left: 50%; top: 50%; width: calc(var(--c) * 3.5); height: calc(var(--c) * 3.5); translate: -50% -50%; }
.loader-logo { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; opacity: 0; transform: scale(0.92); animation: logo-bloom 1s cubic-bezier(0.22, 0.8, 0.28, 1) 2.4s forwards; }
.loader-shine { position: absolute; inset: 0; overflow: hidden; pointer-events: none; -webkit-mask: url(assets/logo-1024.webp) center / contain no-repeat; mask: url(assets/logo-1024.webp) center / contain no-repeat; }
.loader-shine::before { content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 38%; background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0) 15%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 85%, transparent 100%); transform: translateX(-160%) skewX(-20deg); animation: shine 0.9s ease-in-out 3.2s both; }
@keyframes shine { from { transform: translateX(-160%) skewX(-20deg); } to { transform: translateX(380%) skewX(-20deg); } }
@keyframes logo-bloom { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes glow-bloom { 0% { opacity: 0; transform: scale(0.7); } 55% { opacity: 1; transform: scale(1.08); } 100% { opacity: 0.8; transform: scale(1); } }
/* hold the hero entrance until the loader has gone */
.loader-on .hero-logo img { animation-play-state: paused; }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: var(--ink); color: #fff; border-bottom: 4px solid var(--gold); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; min-width: 0; }
.brand img, .logo-circle { width: 46px; height: 46px; object-fit: contain; background: transparent; flex: none; }
.brand span { font-family: var(--font-head); font-weight: 800; font-size: 0.82rem; line-height: 1.15; text-transform: uppercase; letter-spacing: 0.03em; }
.brand span b { display: block; color: var(--gold); font-weight: 800; }
.nav-toggle { display: grid; place-items: center; width: 46px; height: 46px; border: 2px solid rgba(255, 255, 255, 0.25); border-radius: 10px; background: transparent; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 22px; height: 2.5px; background: #fff; border-radius: 2px; transition: transform 0.3s, background 0.3s; content: ""; }
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }
.main-nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); border-bottom: 4px solid var(--gold); padding: 8px 16px 18px; transform-origin: top; transform: scaleY(0); opacity: 0; visibility: hidden; transition: transform 0.3s var(--ease), opacity 0.2s, visibility 0.3s; }
.nav-open .main-nav { transform: scaleY(1); opacity: 1; visibility: visible; }
.main-nav a { display: block; padding: 14px 6px; color: #fff; text-decoration: none; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.9rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--gold); }
.main-nav a.nav-cta { margin-top: 14px; text-align: center; background: var(--gold); color: var(--ink); border-radius: 999px; border: 0; }
.main-nav a.nav-cta:hover { background: #fff; color: var(--ink); }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .main-nav { position: static; display: flex; align-items: center; gap: 4px; padding: 0; transform: none; opacity: 1; visibility: visible; background: transparent; border: 0; }
  .main-nav a { border: 0; padding: 10px 12px; font-size: 0.82rem; position: relative; }
  .main-nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 3px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
  .main-nav a:not(.nav-cta):hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
  .main-nav a.nav-cta { margin: 0 0 0 10px; padding: 10px 18px; }
  .brand span { font-size: 0.9rem; }
}

/* ---------- Buttons (a small chess piece slides in on hover) ---------- */
.btn { --bg: var(--red); --fg: #fff; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0; padding: 14px 26px; border: 2px solid var(--bg); border-radius: 999px; background: var(--bg); color: var(--fg); font-family: var(--font-head); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; overflow: hidden; transition: background 0.25s, color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s, gap 0.3s var(--ease); }
.btn .btn-piece { width: 0; height: 1.25em; opacity: 0; transform: translateX(-14px) rotate(-20deg); transition: width 0.3s var(--ease), opacity 0.3s, transform 0.35s var(--ease); }
.btn:hover, .btn:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); gap: 8px; }
.btn:hover .btn-piece, .btn:focus-visible .btn-piece { width: 1.25em; opacity: 1; transform: none; }
.btn:active { transform: translateY(0); }
.btn-gold { --bg: var(--gold); --fg: var(--ink); } .btn-gold:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-dark { --bg: var(--ink); --fg: #fff; } .btn-dark:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); } .btn-outline:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-outline-dark { background: transparent; color: var(--ink); border-color: var(--ink); } .btn-outline-dark:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: 10px 20px; font-size: 0.82rem; }
.btn[disabled] { opacity: 0.6; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.hero-board { position: absolute; inset: 0; z-index: -2; display: grid; grid-template-columns: repeat(var(--cols, 12), 1fr); grid-auto-rows: 1fr; }
.hero-board i { background: transparent; }
.hero-board i.dk { background: rgba(255, 255, 255, 0.045); animation: shimmer 7s ease-in-out infinite; animation-delay: calc((var(--x) + var(--y)) * 0.22s); }
@keyframes shimmer { 0%, 100% { background: rgba(255, 255, 255, 0.04); } 45% { background: rgba(255, 210, 0, 0.2); } 60% { background: rgba(215, 20, 26, 0.18); } }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 90% at 25% 40%, rgba(17, 17, 17, 0.2), rgba(17, 17, 17, 0.88)), linear-gradient(180deg, transparent 70%, var(--ink)); }
.float-piece { position: absolute; z-index: -1; color: var(--gold); opacity: 0.1; animation: float 18s ease-in-out infinite alternate; pointer-events: none; }
.float-piece:nth-of-type(2n) { color: #fff; opacity: 0.07; }
@keyframes float { from { transform: translate3d(0, 0, 0) rotate(-6deg); } to { transform: translate3d(18px, -34px, 0) rotate(8deg); } }
.hero-inner { display: grid; gap: 36px; padding: 48px 0 72px; align-items: center; }
.hero-logo { justify-self: center; position: relative; width: min(64vw, 300px); aspect-ratio: 1; }
.hero-logo img { position: relative; width: 100%; height: 100%; object-fit: contain; animation: hero-in 1.1s var(--ease) both, hero-float 8s ease-in-out 1.2s infinite; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.8rem; color: var(--gold); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 28px; height: 4px; background: var(--red); border-radius: 2px; }
.hero h1 { text-transform: uppercase; margin-bottom: 0.3em; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { color: rgba(255, 255, 255, 0.82); font-size: 1.06rem; max-width: 56ch; margin-bottom: 1.6em; }
.hero-text { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-text .btn-row { justify-content: center; }
.hero-stats { display: flex; gap: 28px; margin-top: 32px; justify-content: center; }
.hero-stats b { display: block; font-family: var(--font-head); font-size: 1.7rem; color: var(--gold); line-height: 1; }
.hero-stats span { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.7); }
@media (min-width: 860px) {
  .hero-inner { grid-template-columns: 1.25fr 1fr; padding: 72px 0 96px; }
  .hero-text { text-align: left; align-items: flex-start; order: 1; }
  .hero-text .btn-row, .hero-stats { justify-content: flex-start; }
  .hero-logo { order: 2; width: min(100%, 380px); }
}

/* Inner page header */
.page-head { position: relative; background: var(--ink); color: #fff; padding: clamp(30px, 6vw, 46px) 0 clamp(28px, 5.5vw, 42px); overflow: hidden; isolation: isolate; }
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.1; background: conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0) 0 0 / 80px 80px; mask-image: linear-gradient(90deg, transparent 30%, #000); -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); }
.page-head h1 { font-size: clamp(2rem, 6vw, 3.2rem); text-transform: uppercase; margin: 0; }
.page-head h1 span { color: var(--gold); }
.page-head p { color: rgba(255, 255, 255, 0.8); max-width: 60ch; margin: 0; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--grey-1); }
.section.dark { background: var(--ink); color: #fff; --tile: var(--gold); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; margin-bottom: 32px; }
.section-head h2 { margin: 0; }
.section-head .eyebrow { color: var(--red); }
.dark .section-head .eyebrow { color: var(--gold); }
.link-arrow { font-family: var(--font-head); font-weight: 800; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.08em; text-decoration: none; color: var(--red); display: inline-flex; gap: 6px; align-items: center; }
.link-arrow::after { content: "\2192"; transition: transform 0.25s var(--ease); }
.link-arrow:hover::after { transform: translateX(5px); }
.dark .link-arrow { color: var(--gold); }
.empty { padding: 36px 20px; text-align: center; color: var(--grey-3); border: 2px dashed var(--grey-2); border-radius: var(--radius); }

/* Checkerboard-tile heading reveal */
.tile-reveal { --tile: var(--red); position: relative; display: inline-block; }
.dark .tile-reveal { --tile: var(--gold); }
.tile-reveal::before, .tile-reveal::after { content: ""; position: absolute; inset: -2px -4px; pointer-events: none; transition: opacity 0.35s ease; }
.tile-reveal::before { background: conic-gradient(var(--tile) 25%, transparent 0 50%, var(--tile) 0 75%, transparent 0) 0 0 / 22px 22px; transition-delay: 0.1s; }
.tile-reveal::after { background: conic-gradient(transparent 25%, var(--tile) 0 50%, transparent 0 75%, var(--tile) 0) 0 0 / 22px 22px; transition-delay: 0.4s; }
.in .tile-reveal::before, .in .tile-reveal::after, .tile-reveal.in::before, .tile-reveal.in::after { opacity: 0; }
.js .tile-reveal { color: inherit; }

/* Scroll reveal: elements arrive like pieces sliding in from a square */
.js .reveal { opacity: 0; transition: opacity 0.7s ease, transform 0.8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal[data-from="left"] { transform: translateX(-48px); }
.js .reveal[data-from="right"] { transform: translateX(48px); }
.js .reveal[data-from="up"], .js .reveal:not([data-from]) { transform: translateY(40px); }
.js .reveal[data-from="knight"] { transform: translate(-36px, 56px) rotate(-3deg); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Checkerboard divider with knight ---------- */
.divider { --cell: 24px; position: relative; height: 56px; background: var(--paper); overflow: hidden; }
.divider.alt-bg { background: var(--grey-1); }
.divider-strip { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; background: conic-gradient(var(--ink) 25%, #fff 0 50%, var(--ink) 0 75%, #fff 0) 0 0 / 48px 48px; background-position: 0 0; border-block: 2px solid var(--ink); }
.divider-strip::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--red) 0 4px, transparent 4px calc(100% - 4px), var(--gold) calc(100% - 4px)); }
.divider-knight { position: absolute; bottom: 24px; left: 0; width: 32px; height: 32px; color: var(--red); transform: translateX(calc(var(--i, 0) * var(--cell))); transition: transform 0.35s var(--ease); filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.18)); }
.divider-knight.hop svg { animation: hop 0.35s ease-in-out; }

/* ---------- Next-event countdown: four flip-clock tiles ---------- */
.meta-list { display: grid; gap: 4px; margin: 0 0 16px; font-size: 0.95rem; }
.meta-list li { display: flex; gap: 8px; align-items: flex-start; }
.meta-list .icon { margin-top: 0.32em; color: var(--red); }
.dark .meta-list .icon { color: var(--gold); }

.next-wrap { display: grid; justify-items: center; text-align: center; gap: 6px; }
.next-title { margin: 8px 0 0; max-width: 24ch; font-size: clamp(1.4rem, 5.2vw, 2.4rem); text-transform: uppercase; }
.next-when { margin: 0; color: var(--gold); font-family: var(--font-head); font-weight: 800; font-size: clamp(1rem, 3.4vw, 1.25rem); letter-spacing: 0.03em; }
.next-where { margin: 0 0 18px; color: rgba(255, 255, 255, 0.82); }
.next-wrap .btn-row { justify-content: center; margin-top: 26px; }

.cd { width: min(100%, 600px); padding: clamp(10px, 3vw, 22px); border: 2px solid var(--gold); border-radius: 22px; background: #0c0c0c; box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 210, 0, 0.12); }
.cd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(6px, 2.2vw, 16px); }
.cd-unit { display: grid; justify-items: center; align-content: start; gap: clamp(6px, 1.6vw, 10px); min-width: 0; }
.cd-unit.light { --tbg: #f2efe6; --tfg: #111; --tline: rgba(0, 0, 0, 0.3); }
.cd-unit.dark { --tbg: #111; --tfg: #fff; --tline: rgba(255, 255, 255, 0.22); }
.cd-piece { width: clamp(26px, 8vw, 42px); height: clamp(26px, 8vw, 42px); color: var(--gold); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)); }
.cd-tile { position: relative; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; container-type: size; background: var(--tbg); color: var(--tfg); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4); }
.cd-unit.dark .cd-tile { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 6px 14px rgba(0, 0, 0, 0.4); }

/* flip digits: the top half flips down to reveal the new number */
.fnum { position: absolute; left: 0; right: 0; top: 0; height: 76%; perspective: 420px; }
.fnum::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--tline); z-index: 6; }
.fh { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: var(--tbg); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fh span { position: absolute; left: 0; right: 0; height: 200%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 50cqw; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fnum.d3 .fh span { font-size: 38cqw; }
.fh.top, .fh.flap-top { top: 0; }
.fh.top span, .fh.flap-top span { top: 0; }
.fh.bot, .fh.flap-bot { bottom: 0; }
.fh.bot span, .fh.flap-bot span { bottom: 0; }
.fh.flap-top, .fh.flap-bot { display: none; z-index: 3; }
.fnum.flipping .flap-top, .fnum.flipping .flap-bot { display: block; }
.flap-top { transform-origin: 50% 100%; animation: flip-top 0.3s ease-in forwards; }
.flap-bot { transform-origin: 50% 0; transform: rotateX(90deg); animation: flip-bot 0.3s ease-out 0.3s forwards; }
@keyframes flip-top { to { transform: rotateX(-90deg); } }
@keyframes flip-bot { to { transform: rotateX(0deg); } }
.cd-label { position: absolute; left: 0; right: 0; bottom: 0; height: 24%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: clamp(0.72rem, 11cqw, 0.95rem); letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.8; }

/* "Happening Now!" replaces the tiles once the event has started */
.cd-live { display: flex; align-items: center; justify-content: center; gap: 14px; padding: clamp(22px, 6vw, 40px) clamp(18px, 5vw, 48px); font-family: var(--font-head); font-weight: 800; text-transform: uppercase; font-size: clamp(1.5rem, 6vw, 2.6rem); color: var(--gold); }
.live-dot { flex: none; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--red); animation: live-ping 1.4s ease-out infinite; }
@keyframes live-ping { 0% { box-shadow: 0 0 0 0 rgba(215, 20, 26, 0.75); } 100% { box-shadow: 0 0 0 0.6em rgba(215, 20, 26, 0); } }

/* very narrow phones: 2 x 2 */
@media (max-width: 359px) {
  .cd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .cd-piece { width: 36px; height: 36px; }
}

/* ---------- Announcement cards ---------- */
.card-grid { display: grid; gap: 22px; }
.card-grid.three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.news { position: relative; display: flex; flex-direction: column; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; transition: transform 0.3s var(--ease), box-shadow 0.3s; }
@media (hover: hover) { .news:hover { transform: translateY(-4px); box-shadow: 8px 8px 0 var(--gold); } }
.news.is-pinned { border-color: var(--red); }
.news-img { aspect-ratio: 3/2; object-fit: cover; object-position: center top; width: 100%; background: var(--grey-2); border-bottom: 2px solid var(--ink); }
.news-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--grey-3); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--gold); color: var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.badge.red { background: var(--red); color: #fff; }
.badge.dark { background: var(--ink); color: var(--gold); }
.news h3 { margin: 0; font-size: 1.15rem; }
.news p { margin: 0; color: #333; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-list { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }

/* ---------- Tabs, filters ---------- */
.tabs { display: inline-flex; background: var(--ink); padding: 5px; border-radius: 999px; gap: 4px; margin-bottom: 20px; }
.tabs button { border: 0; background: transparent; color: #fff; padding: 10px 22px; border-radius: 999px; font-family: var(--font-head); font-weight: 800; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; transition: background 0.25s, color 0.25s; }
.tabs button[aria-selected="true"] { background: var(--gold); color: var(--ink); }
.tabs button:not([aria-selected="true"]):hover { background: rgba(255, 255, 255, 0.14); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.chip { border: 2px solid var(--ink); background: #fff; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: 0.92rem; transition: background 0.2s, color 0.2s; }
.chip:hover { background: var(--grey-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--gold); }

/* ---------- Event cards ---------- */
.event-grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
.ev-card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--ink); background: var(--ink); color: #fff; }
.js .ev-card.reveal[data-from="up"] { transform: translateY(24px); }
.js .ev-card.reveal.in { transform: none; }
.ev-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--ink); }
.ev-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-media.has-logo { background: #fff; }
.ev-media.has-logo > img { object-fit: contain; padding: 66px 22px 14px; }
.ev-media::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent); transform: skewX(-18deg) translateX(0); opacity: 0; pointer-events: none; }
.ev-card .tag-row { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 1; display: flex; justify-content: space-between; gap: 8px; }
.ev-media.has-logo .tag-row .badge { box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15); }
.date-chip { display: grid; place-items: center; background: #fff; color: var(--ink); border-radius: 10px; padding: 6px 12px; line-height: 1; text-align: center; border: 2px solid var(--ink); }
.date-chip b { font-family: var(--font-head); font-size: 1.5rem; display: block; }
.date-chip small { font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.75rem; color: var(--red); }
.ev-body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; }
.ev-body h3 { margin: 0; text-transform: uppercase; font-size: 1.05rem; line-height: 1.25; }
.ev-when { font-family: var(--font-head); font-weight: 800; color: var(--gold); font-size: 0.95rem; }
.ev-where { font-size: 0.9rem; opacity: 0.88; }
.ev-register { margin-top: auto; align-self: stretch; display: flex; align-items: center; justify-content: center; min-height: 54px; padding: 12px 18px; border-radius: 12px; background: #FFD200; color: #000; font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; transition: filter 0.2s, transform 0.2s; }
.ev-register:first-of-type { margin-top: 14px; }
.ev-register:hover { filter: brightness(1.08); }
.ev-register:active { transform: scale(0.98); }
.ev-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ev-btns .ev-btn:only-child { grid-column: 1 / -1; }
.ev-btn { border: 2px solid var(--gold); background: transparent; color: var(--gold); min-height: 44px; padding: 8px 12px; border-radius: 999px; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase; display: inline-flex; gap: 6px; align-items: center; justify-content: center; text-decoration: none; transition: background 0.2s, color 0.2s; }
.ev-btn:hover { background: var(--gold); color: var(--ink); }

/* hover (mouse only): lift, soft shadow, gold glow, one logo shine */
@media (hover: hover) {
  .ev-card, .js .ev-card.reveal.in.settled { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
  .js .ev-card.reveal.in:hover { transform: translateY(-6px); border-color: var(--gold); box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28), 0 0 0 1px var(--gold), 0 0 18px rgba(255, 210, 0, 0.45); }
  .ev-card:hover .ev-media::after { animation: ev-shine 0.9s ease-out 1; }
  .ev-card:hover .ev-register { animation: none; }
}
@keyframes ev-shine { 0% { opacity: 0; transform: skewX(-18deg) translateX(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: skewX(-18deg) translateX(480%); } }
@keyframes ev-pulse { 0%, 80%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 0, 0); } 90% { box-shadow: 0 0 14px 3px rgba(255, 210, 0, 0.45); } }
@media (prefers-reduced-motion: no-preference) { .ev-register { animation: ev-pulse 3s ease-in-out infinite; } }
.past-badge { background: #fff; color: var(--ink); }


/* ---------- Gallery ---------- */

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1500; display: none; background: rgba(8, 8, 8, 0.94); color: #fff; touch-action: pan-y; }
.lightbox.open { display: block; animation: fade-in 0.25s ease; }
@keyframes fade-in { from { opacity: 0; } }
.lb-bar { position: absolute; left: 0; right: 0; top: 0; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 0 18px; font-weight: 700; font-size: 0.9rem; }
.lb-cap { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; display: grid; place-items: center; padding: 0 70px; text-align: center; font-size: 0.85rem; color: rgba(255, 255, 255, 0.75); }
.lb-btn { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); background: rgba(0, 0, 0, 0.5); color: #fff; display: grid; place-items: center; font-size: 1.4rem; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.lb-btn:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.lb-prev, .lb-next { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 8px; translate: none; } .lb-cap { padding: 0 66px; } }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 40px; }
.about-grid .prose p { font-size: 1.04rem; }
.mv { display: grid; gap: 18px; }
.mv-card { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 26px; border-left: 8px solid var(--gold); }
.mv-card:nth-child(2) { border-left-color: var(--red); }
.mv-card h3 { color: var(--gold); text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.mv-card p { margin: 0; color: rgba(255, 255, 255, 0.85); }
.values { display: grid; gap: 16px; margin-top: 38px; }
.value { padding: 20px 22px; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); }
.value .icon { width: 34px; height: 34px; color: var(--red); margin-bottom: 8px; }
.value h3 { margin-bottom: 4px; text-transform: uppercase; }
.value p { margin: 0; color: #444; font-size: 0.95rem; }
.committee { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.member { text-align: center; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; transition: transform 0.3s var(--ease), box-shadow 0.3s; }
@media (hover: hover) { .member:hover { transform: translateY(-4px); box-shadow: 6px 6px 0 var(--red); } }
.member img { width: 100%; aspect-ratio: 1; object-fit: cover; border-bottom: 4px solid var(--gold); background: var(--grey-2); }
.member div { padding: 14px 10px 18px; }
.member h3 { font-size: 1rem; margin: 0 0 4px; }
.member p { margin: 0; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--red); }
@media (min-width: 720px) { .committee { grid-template-columns: repeat(4, 1fr); } .values { grid-template-columns: repeat(3, 1fr); } .mv { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .about-grid { grid-template-columns: 1.2fr 1fr; align-items: start; } .mv { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 36px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.1fr 1fr; gap: 54px; } }
.form { display: grid; gap: 16px; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); padding: 24px; box-shadow: 8px 8px 0 var(--gold); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 0.88rem; }
.field input, .field textarea, .field select { width: 100%; padding: 13px 14px; font: inherit; border: 2px solid var(--ink); border-radius: 10px; background: #fff; transition: box-shadow 0.2s, border-color 0.2s; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(215, 20, 26, 0.18); }
.field textarea { min-height: 150px; resize: vertical; }
.field .err { color: var(--red-dark); font-size: 0.88rem; min-height: 1em; font-weight: 600; }
.hp { position: absolute; left: -9999px; }
.form-status { padding: 12px 14px; border-radius: 10px; font-weight: 600; display: none; }
.form-status.show { display: block; }
.form-status.ok { background: #e7f7e9; color: #14591f; border: 2px solid #14591f; }
.form-status.bad { background: #fdeaea; color: var(--red-dark); border: 2px solid var(--red); }
.info-list { display: grid; gap: 14px; margin-bottom: 26px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list .ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--gold); }
.info-list .ico .icon { width: 20px; height: 20px; }
.info-list b { display: block; font-family: var(--font-head); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.info-list a { color: var(--ink); font-weight: 600; }
.placeholder-note { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 6px; background: var(--gold); color: var(--ink); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; vertical-align: middle; }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.socials a { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: #fff; transition: background 0.25s, color 0.25s, transform 0.25s var(--ease); }
.socials a:hover { background: var(--gold); color: var(--ink); transform: translateY(-3px) rotate(-6deg); }
.socials .icon { width: 22px; height: 22px; }
.wa-float { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); transition: transform 0.25s var(--ease); }
.wa-float:hover { transform: scale(1.1) rotate(-6deg); color: #fff; }
.wa-float .icon { width: 30px; height: 30px; }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid #25d366; animation: ring 2.6s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.6); opacity: 0; } }

/* Checkmate confetti */
.confetti { position: fixed; z-index: 3000; pointer-events: none; font-size: 1.4rem; line-height: 1; will-change: transform, opacity; animation: confetti 1.5s cubic-bezier(0.15, 0.7, 0.35, 1) forwards; }
@keyframes confetti { 0% { transform: translate(0, 0) scale(0.4) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--rot)); opacity: 0; } }
.checkmate { position: fixed; z-index: 3001; left: 50%; top: 40%; translate: -50% -50%; pointer-events: none; font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 9vw, 4.5rem); text-transform: uppercase; color: var(--gold); background: var(--ink); padding: 8px 28px; border: 4px solid var(--gold); border-radius: 12px; animation: pop 2.2s var(--ease) forwards; }
@keyframes pop { 0% { transform: scale(0.3) rotate(-8deg); opacity: 0; } 15% { transform: scale(1.1) rotate(2deg); opacity: 1; } 25% { transform: scale(1); } 80% { opacity: 1; } 100% { transform: scale(1) translateY(-20px); opacity: 0; } }

/* ---------- CTA band ---------- */
.cta { position: relative; background: var(--red); color: #fff; overflow: hidden; isolation: isolate; text-align: center; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.12; background: conic-gradient(#000 25%, transparent 0 50%, #000 0 75%, transparent 0) 0 0 / 70px 70px; }
.cta h2 { color: #fff; }
.cta p { max-width: 52ch; margin: 0 auto 1.6em; font-size: 1.08rem; }
.cta .btn-row { justify-content: center; }
.cta .tile-reveal { --tile: var(--gold); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.78); border-top: 4px solid var(--gold); font-size: 0.92rem; }
.footer-grid { display: grid; gap: 34px; padding: 52px 0 36px; }
.footer-brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; margin-bottom: 14px; font-family: var(--font-head); font-weight: 800; text-transform: uppercase; line-height: 1.2; }
.footer-brand img { width: 62px; height: 62px; }
.site-footer h4 { color: var(--gold); text-transform: uppercase; font-size: 0.875rem; letter-spacing: 0.14em; margin-bottom: 14px; }
.site-footer a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-links { display: grid; gap: 8px; }
.footer-contact { display: grid; gap: 10px; }
.site-footer .socials a { background: rgba(255, 255, 255, 0.1); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 18px 0 24px; font-size: 0.875rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; } }

/* ---------- 404 ---------- */

/* ---------- Reduced motion: switch off the heavy stuff ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .float-piece, .wa-float::before, .hero-board i { display: none !important; }
  /* loader: just a quick logo fade (under 0.5s) */
  .loader { transition-duration: 0.2s !important; }
  .loader-board, .loader-text, .loader-glow, .loader-knight, .loader-shine { display: none !important; }
  .loader-logo { animation: logo-fade 0.2s ease both !important; animation-duration: 0.2s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .tile-reveal::before, .tile-reveal::after { display: none; }
  .ev-card, .ev-card:hover { transform: none !important; }
  .ev-media::after { display: none !important; }
  .ev-register { animation: none !important; }
  .divider-knight { display: none; }
}
@media print { .site-header, .wa-float, .loader, .divider { display: none; } }

/* fixes */
.eyebrow { display: flex; width: fit-content; }
.divider-knight svg { width: 100%; height: 100%; }

/* ==========================================================================
   Responsive + usability pass
   ========================================================================== */
@media (min-width: 1600px) { :root { --wrap: 1360px; } html { font-size: 112.5%; } }
h1, h2, h3 { overflow-wrap: break-word; }
@media (max-width: 719px) {
  .js .reveal[data-from="left"] { transform: translateX(-20px); }
  .js .reveal[data-from="right"] { transform: translateX(20px); }
  .js .reveal[data-from="knight"] { transform: translate(-14px, 28px); }
  .js .reveal.in { transform: none; }
  .section { padding: 48px 0; }
}

/* tap targets: at least 44px */
.btn { min-height: 48px; }
.btn-sm { min-height: 44px; }
.chip, .tabs button, .link-arrow, .main-nav a { min-height: 44px; }
.chip { padding: 8px 18px; display: inline-flex; align-items: center; }
.tabs button { padding-inline: 20px; }
.link-arrow { display: inline-flex; align-items: center; }
.main-nav a { display: flex; align-items: center; }
.footer-links a, .footer-contact a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-links { gap: 0; }
.footer-contact { gap: 2px; }
.info-list a { display: inline-flex; align-items: center; min-height: 44px; }
.field input, .field select { min-height: 50px; }

/* nav: scrolls if the phone is short (landscape) */
.main-nav { max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
@media (min-width: 900px) { .main-nav { max-height: none; overflow: visible; } }

/* hero: compact on phones (logo first, smaller), fills the screen on large displays */
.hero h1 { font-size: clamp(2rem, 8.4vw, 4.2rem); }
@media (max-width: 859px) {
  .hero-inner { padding: 28px 0 44px; gap: 22px; }
  .hero-logo { order: -1; width: min(40vw, 170px); }
  .hero .lead { font-size: 1rem; margin-bottom: 1.2em; }
  .hero-text .eyebrow { margin-bottom: 10px; }
}
@media (min-width: 860px) {
  .hero { display: grid; align-items: center; min-height: clamp(520px, 74vh, 760px); }
  .hero-inner { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
}
@media (min-width: 860px) and (max-width: 1100px) { .hero-logo { width: min(100%, 300px); } }

/* hero board: opacity-only animation (cheap on phones), paused when scrolled away */
.hero-board { background: conic-gradient(rgba(255, 255, 255, 0.035) 25%, transparent 0 50%, rgba(255, 255, 255, 0.035) 0 75%, transparent 0) 0 0 / 14.2857% 25%; }
.hero-board i.dk { background: var(--gold); opacity: 0; animation: shimmer-o 7s ease-in-out infinite; animation-delay: calc((var(--x) + var(--y)) * 0.22s); }
.hero-board i.dk:nth-child(3n) { background: var(--red); }
@keyframes shimmer-o { 0%, 100% { opacity: 0; } 45% { opacity: 0.2; } 60% { opacity: 0.14; } }
.hero.is-off *, .hero.is-off::before { animation-play-state: paused !important; }
@media (max-width: 639px) {
  .float-piece:nth-of-type(n+4) { display: none; }
  .hero-board i.dk { animation-duration: 9s; }
}

/* touch devices: no hover lift effects that stick */
@media (hover: none) {
  .news:hover, .cat-card:hover, .member:hover { transform: none; box-shadow: none; }
  .btn:hover { transform: none; box-shadow: none; }
}

/* lightbox: safe areas, roomy controls */
.lb-bar { padding-top: env(safe-area-inset-top); height: calc(56px + env(safe-area-inset-top)); }
.lb-stage { inset: calc(56px + env(safe-area-inset-top)) 0 calc(64px + env(safe-area-inset-bottom)); }
.lb-cap { height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
.lb-close { width: 52px; height: 52px; font-size: 1.8rem; }
.lb-count { font-size: 0.95rem; }

/* WhatsApp button: smaller on phones, room reserved so it never covers content */
@media (max-width: 719px) {
  .wa-float { width: 52px; height: 52px; right: 12px; bottom: 12px; }
  .wa-float .icon { width: 26px; height: 26px; }
  .footer-bottom { padding-bottom: 84px; }
}

/* footer stacking */
@media (max-width: 799px) { .footer-grid { padding-top: 40px; gap: 26px; } .footer-brand img { width: 56px; height: 56px; } }
.footer-links a { display: flex; }
.eyebrow::before { flex: none; }
@media (max-width: 479px) { .eyebrow { letter-spacing: 0.1em; font-size: 0.75rem; } }
.main-nav a.nav-cta { justify-content: center; }
.footer-contact li { align-items: flex-start; }
.footer-contact li .icon { margin-top: 0.85em; width: 1.1em; height: 1.1em; }
.footer-contact li a { min-height: 44px; }

/* ---------- Gallery: competition -> category cards -> photos ---------- */
.gallery-sub .gallery-comp { display: block; font-family: var(--font-head); font-weight: 800; color: #fff; font-size: clamp(1.1rem, 3.6vw, 1.6rem); line-height: 1.25; }
.gallery-sub .gallery-date { display: block; margin-top: 4px; color: var(--gold); font-weight: 700; }
.gallery-line { margin: 0 0 20px; }
.gallery-line a { color: var(--ink); text-decoration: none; }
.gallery-line a:hover { color: var(--red); }

.cat-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.cat-grid-top { margin-top: 26px; }
@media (min-width: 600px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.cat-card { touch-action: manipulation; -webkit-tap-highlight-color: transparent; display: flex; flex-direction: column; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.cat-card:focus-visible { box-shadow: 8px 8px 0 var(--gold); color: var(--ink); }
@media (hover: hover) { .cat-card:hover { transform: translateY(-6px); box-shadow: 8px 8px 0 var(--gold); color: var(--ink); } }
.cat-media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--grey-2); border-bottom: 4px solid var(--red); }
.cat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
@media (hover: hover) { .cat-card:hover .cat-media img { transform: scale(1.07); } }
.cat-card:focus-visible .cat-media img { transform: scale(1.07); }
.cat-body { display: grid; gap: 4px; align-content: start; flex: 1; padding: 16px 18px 20px; }
.cat-body h3 { margin: 0; font-size: 1.1rem; line-height: 1.25; }
.cat-body p { margin: 0; color: var(--grey-3); font-size: 0.95rem; font-weight: 600; }

.back-btn { max-width: 100%; white-space: normal; text-align: left; border-radius: 28px; line-height: 1.3; }
.cat-head { margin: 24px 0 26px; }
.cat-head h2 { margin: 0 0 4px; }
.cat-head p { margin: 0; color: var(--grey-3); font-weight: 600; }

/* photo grid (columns are built in JS so photos never jump around while more load) */
.mason { display: flex; gap: 12px; align-items: flex-start; }
.m-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.m-item { position: relative; border-radius: 10px; overflow: hidden; background: var(--grey-2); }
.m-open { display: block; width: 100%; padding: 0; border: 0; background: none; line-height: 0; cursor: zoom-in; }
.m-open img { display: block; width: 100%; height: auto; transition: transform 0.5s var(--ease), filter 0.3s; }
.m-open:focus-visible { outline-offset: -4px; }
.m-dl { position: absolute; right: 8px; bottom: 8px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--ink); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.25s var(--ease), background 0.2s; }
.m-dl .icon { width: 20px; height: 20px; }
.m-dl:hover { background: #fff; color: var(--ink); }
@media (hover: hover) {
  .m-item:hover .m-open img { transform: scale(1.04); filter: brightness(0.88); }
  .m-item:hover .m-dl, .m-item:focus-within .m-dl { opacity: 1; transform: none; }
}
@media (hover: none) { .m-dl { display: none; } }
.more { display: grid; place-items: center; padding: 28px 0 8px; min-height: 40px; }

/* lightbox: download button */
.lb-actions { display: flex; align-items: center; gap: 10px; }
.lb-dl { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--gold); background: var(--gold); color: var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; transition: background 0.2s, border-color 0.2s; }
.lb-dl:hover { background: #fff; border-color: #fff; color: var(--ink); }
.lb-dl .icon { width: 1.2em; height: 1.2em; }
@media (max-width: 340px) { .lb-dl span { display: none; } .lb-dl { padding: 0; width: 44px; justify-content: center; } }

/* after the scroll-in entrance, cards use quick hover transitions (and the hover lift is not overridden by .reveal.in) */
.js .reveal.in.settled { transition: transform 0.3s var(--ease), box-shadow 0.3s, opacity 0.3s; transition-delay: 0s; }
@media (hover: hover) {
  .js .cat-card.reveal.in:hover, .js .cat-card.reveal.in:focus-visible { transform: translateY(-6px); }
  .js .news.reveal.in:hover, .js .member.reveal.in:hover { transform: translateY(-4px); }
}

/* ==========================================================================
   Featured event (WACC 2026): logo card + details, event card with logo, gallery logo
   ========================================================================== */
.next-grid { display: grid; gap: clamp(28px, 6vw, 40px); justify-items: center; }
.status-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: 999px; background: var(--gold); color: var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.status-badge.live, .badge.live { background: var(--red); color: #fff; }
.status-badge .live-dot, .badge .live-dot { width: 0.6em; height: 0.6em; background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8); animation-name: live-ping-w; }
.badge.live { display: inline-flex; align-items: center; gap: 6px; }
@keyframes live-ping-w { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8); } 100% { box-shadow: 0 0 0 0.7em rgba(255, 255, 255, 0); } }

/* the logo sits on a clean white card (it is not round, so it is never cropped) */
.logo-stage { position: relative; isolation: isolate; width: min(62vw, 250px); }
.logo-stage::before, .logo-stage::after { content: ""; position: absolute; inset: -12% -24%; border-radius: 50%; z-index: -1; pointer-events: none; filter: blur(16px); }
.logo-stage::before { background: radial-gradient(closest-side, rgba(215, 20, 26, 0.7), transparent 74%); animation: glow-red 5s ease-in-out infinite; }
.logo-stage::after { background: radial-gradient(closest-side, rgba(255, 210, 0, 0.62), transparent 74%); animation: glow-gold 5s ease-in-out infinite; }
@keyframes glow-red { 0%, 100% { opacity: 0.95; } 50% { opacity: 0.12; } }
@keyframes glow-gold { 0%, 100% { opacity: 0.12; } 50% { opacity: 0.95; } }
.js .logo-entry { opacity: 0; }
.js .reveal.in .logo-entry { animation: logo-pop 0.95s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes logo-pop { 0% { opacity: 0; transform: scale(0.9); } 55% { opacity: 1; transform: scale(1.04); } 80% { transform: scale(0.99); } 100% { opacity: 1; transform: scale(1); } }
.logo-float { perspective: 900px; animation: logo-float 2s ease-in-out infinite alternate; }
@keyframes logo-float { from { transform: translateY(0); } to { transform: translateY(-12px); } }
.logo-tilt { transform-style: preserve-3d; transition: transform 0.5s var(--ease); will-change: transform; }
.logo-tilt.is-tilting { transition: transform 0.12s linear; }
.logo-card { position: relative; overflow: hidden; background: #fff; border-radius: 24px; padding: clamp(14px, 4vw, 20px); box-shadow: 0 26px 50px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(255, 210, 0, 0.55); }
.logo-card img { display: block; width: 100%; height: auto; object-fit: contain; }
.logo-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 36%, rgba(255, 233, 160, 0.15) 43%, rgba(255, 224, 130, 0.7) 50%, rgba(255, 233, 160, 0.15) 57%, transparent 64%); transform: translateX(-130%); animation: logo-shine 6s ease-in-out 2.4s infinite; }
@keyframes logo-shine { 0% { transform: translateX(-130%); } 20%, 100% { transform: translateX(130%); } }

@media (min-width: 600px) { .logo-stage { width: 300px; } }
@media (min-width: 900px) {
  .next-grid.has-logo { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); justify-items: stretch; align-items: center; gap: clamp(44px, 6vw, 76px); }
  .next-grid.has-logo .logo-stage { width: 100%; max-width: 340px; justify-self: center; }
  .next-grid.has-logo .next-wrap { justify-items: start; text-align: left; }
  .next-grid.has-logo .next-title { max-width: 26ch; }
  .next-grid.has-logo .cd { margin-inline: 0; }
  .next-grid.has-logo .next-wrap .btn-row { justify-content: flex-start; }
}
.next-wrap .cd { margin-top: 14px; }
.next-wrap .status-badge { margin-bottom: 4px; }

/* reduced motion: the logo just fades in, nothing loops */
@media (prefers-reduced-motion: reduce) {
  .js .reveal.in .logo-entry { animation: logo-fade 0.4s ease both !important; animation-duration: 0.4s !important; }
  .logo-float, .logo-card::after, .logo-stage::before { animation: none !important; }
  .logo-card::after { display: none; }
  .logo-stage::before { opacity: 0.35; }
  .logo-stage::after { display: none; }
  .logo-tilt { transition: none; }
}

/* gallery: competition logos */
.cat-media { position: relative; }
.cat-media.is-logo { background: #fff; }
.cat-media.is-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.gallery-sub.has-logo { display: flex; align-items: center; gap: 20px; }
.gallery-logo { flex: none; display: block; padding: 8px 12px; background: #fff; border-radius: 16px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(255, 210, 0, 0.6); }
.gallery-logo img { display: block; height: 104px; width: auto; max-width: 110px; object-fit: contain; }
.gallery-text { min-width: 0; }
@media (max-width: 479px) { .gallery-logo img { height: 88px; } .gallery-sub.has-logo { gap: 16px; } }

@keyframes logo-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- navbar subtitle ---------- */
.brand span small { display: block; margin-top: 2px; font-family: var(--font-body); font-weight: 500; font-size: 0.7rem; line-height: 1.2; letter-spacing: 0.05em; text-transform: none; color: #d4d4d4; white-space: nowrap; }
@media (max-width: 349px) { .brand span small { display: none; } }

/* home hero without the intro paragraph; gallery heading without its caption */
.hero h1 { margin-bottom: 0.7em; }
.gallery-sub:empty { display: none; }

/* albums with no photos yet */
.cat-media.is-empty { display: grid; place-items: center; background: var(--ink) conic-gradient(rgba(255, 255, 255, 0.07) 25%, transparent 0 50%, rgba(255, 255, 255, 0.07) 0 75%, transparent 0) 0 0 / 56px 56px; }
.cat-empty-icon { width: 24%; height: auto; aspect-ratio: 1; color: var(--gold); opacity: 0.92; }
.soon-tag { position: absolute; left: 12px; bottom: 12px; padding: 4px 12px; border-radius: 999px; background: var(--gold); color: var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.coming-soon { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 56px 20px; margin-top: 8px; border: 2px dashed var(--grey-2); border-radius: var(--radius); }
.coming-soon-icon { width: 64px; height: 64px; color: var(--red); }
.coming-soon h3 { margin: 8px 0 0; text-transform: uppercase; }
.coming-soon p { margin: 0; color: var(--grey-3); max-width: 40ch; }

/* ==========================================================================
   Lightbox sharing + chess-themed 404 page
   ========================================================================== */
.lb-share { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.6); background: rgba(0, 0, 0, 0.45); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.lb-share:hover, .lb-share[aria-expanded="true"] { background: #fff; border-color: #fff; color: var(--ink); }
.lb-share .icon { width: 1.15em; height: 1.15em; }
@media (max-width: 480px) { .lb-share span { display: none; } .lb-share { width: 44px; padding: 0; } .lb-actions { gap: 8px; } }
.lb-sharemenu { position: absolute; z-index: 5; right: 12px; top: calc(62px + env(safe-area-inset-top)); display: grid; gap: 2px; min-width: 220px; padding: 8px; background: #111; border: 2px solid var(--gold); border-radius: 16px; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65); animation: menu-in 0.18s ease both; }
.lb-sharemenu[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
.lb-sharemenu a, .lb-sharemenu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: #fff; font-family: var(--font-body); font-weight: 600; font-size: 1rem; text-align: left; text-decoration: none; cursor: pointer; }
.lb-sharemenu a:hover, .lb-sharemenu button:hover { background: rgba(255, 210, 0, 0.18); color: var(--gold); }
.lb-sharemenu .icon { width: 22px; height: 22px; flex: none; }
.lb-toast { position: absolute; z-index: 6; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); translate: -50% 12px; padding: 10px 20px; border-radius: 999px; background: var(--gold); color: var(--ink); font-weight: 800; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.2s, translate 0.25s var(--ease); }
.lb-toast.show { opacity: 1; translate: -50% 0; }

/* ---------- 404: "This square is empty" ---------- */
.notfound { position: relative; overflow: hidden; isolation: isolate; background: var(--ink); color: #fff; text-align: center; padding: clamp(48px, 9vw, 100px) 0 clamp(60px, 10vw, 120px); min-height: min(70vh, 640px); display: grid; align-items: center; }
.notfound::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.07; background: conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0) 0 0 / 96px 96px; mask-image: radial-gradient(70% 80% at 50% 45%, #000, transparent); -webkit-mask-image: radial-gradient(70% 80% at 50% 45%, #000, transparent); }
.nf-code { display: flex; align-items: center; justify-content: center; gap: 0.07em; margin: 0 0 0.16em; font-family: var(--font-head); font-weight: 800; font-size: clamp(6rem, 27vw, 13.5rem); line-height: 1; color: var(--gold); }
.nf-4 { display: block; text-shadow: 0 0.04em 0 rgba(0, 0, 0, 0.45); }
/* the "0" is an empty board square */
.nf-square { position: relative; flex: none; width: 0.7em; height: 0.7em; border-radius: 0.07em; background: conic-gradient(var(--ink) 25%, #f2efe6 0 50%, var(--ink) 0 75%, #f2efe6 0) 0 0 / 50% 50%; box-shadow: 0 0 0 0.04em var(--gold), 0 0.1em 0.22em rgba(0, 0, 0, 0.55); }
.nf-target { position: absolute; inset: 14%; border-radius: 0.05em; border: 0.025em dashed var(--red); background: rgba(215, 20, 26, 0.12); animation: nf-pulse 7s ease-in-out infinite; }
.nf-knight { position: absolute; left: 50%; top: 50%; z-index: 2; width: 0.5em; height: 0.5em; margin: -0.25em 0 0 -0.25em; color: var(--red); opacity: 0; transform: translate(-2.8em, 0); animation: nf-path 7s ease-in-out infinite; }
.nf-knight svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 0.012em 0 #fff) drop-shadow(0 0.03em 0.03em rgba(0, 0, 0, 0.5)); transform-origin: 50% 90%; animation: nf-arc 7s ease-in-out infinite; }
/* two L-shaped hops onto the square (2 + 1 squares each), a rest, and a hop away (up and to the right) */
@keyframes nf-path {
  0% { opacity: 0; transform: translate(-2.8em, 0); }
  3% { opacity: 1; transform: translate(-2.8em, 0); }
  18% { transform: translate(-1.4em, -0.7em); }
  24% { transform: translate(-1.4em, -0.7em); }
  38% { transform: translate(0, 0); }
  62% { opacity: 1; transform: translate(0, 0); }
  76% { opacity: 1; transform: translate(1.4em, -0.7em); }
  80%, 100% { opacity: 0; transform: translate(1.4em, -0.7em); }
}
@keyframes nf-arc {
  0%, 3% { transform: translateY(0); }
  10.5% { transform: translateY(-0.34em) rotate(-8deg); }
  18% { transform: translateY(0) scale(1.12, 0.88); }
  20% { transform: scale(1); }
  24% { transform: translateY(0); }
  31% { transform: translateY(-0.36em) rotate(-8deg); }
  38% { transform: translateY(0) scale(1.14, 0.86); }
  41%, 62% { transform: scale(1); }
  69% { transform: translateY(-0.34em) rotate(8deg); }
  76%, 100% { transform: translateY(0); }
}
@keyframes nf-pulse { 0%, 36%, 52%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 0, 0); border-color: var(--red); } 42% { box-shadow: 0 0 0.3em 0.07em rgba(255, 210, 0, 0.85); border-color: var(--gold); } }
.notfound h1 { margin: 0 0 12px; font-size: clamp(1.7rem, 5.4vw, 2.8rem); text-transform: uppercase; color: #fff; }
.nf-text { max-width: 44ch; margin: 0 auto 28px; font-size: 1.1rem; color: rgba(255, 255, 255, 0.86); }
.notfound .btn-row { justify-content: center; }
@media (prefers-reduced-motion: reduce) {
  .nf-knight { display: none; }
  .nf-target, .nf-knight svg { animation: none !important; }
}

/* ==========================================================================
   Photo viewer: crossfade and zoom; album finder
   ========================================================================== */
.lb-stage { position: absolute; inset: calc(56px + env(safe-area-inset-top)) 0 calc(126px + env(safe-area-inset-bottom)); overflow: hidden; touch-action: none; display: block; cursor: default; user-select: none; -webkit-user-select: none; }
.lightbox.zoomed .lb-stage { cursor: grab; }
.lightbox.dragging .lb-stage { cursor: grabbing; }
.lb-pan { width: 100%; height: 100%; display: grid; place-items: center; transform-origin: 50% 50%; will-change: transform; }
.lb-pan.animating { transition: transform 0.28s var(--ease); }
.lb-img { grid-area: 1 / 1; max-width: min(100%, 1600px); max-height: 100%; width: auto; height: auto; object-fit: contain; opacity: 0; transition: opacity 0.6s ease; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.lb-img.on { opacity: 1; }

.lb-tools { position: absolute; z-index: 3; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 12px; padding: 0 12px; pointer-events: none; }
.lb-group { pointer-events: auto; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, 0.62); border: 1px solid rgba(255, 255, 255, 0.22); }
.lb-tool { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #fff; transition: background 0.2s, color 0.2s; }
.lb-tool:hover:not(:disabled) { background: rgba(255, 210, 0, 0.22); color: var(--gold); }
.lb-tool:disabled { opacity: 0.4; cursor: default; }
.lb-tool .icon { width: 22px; height: 22px; }

@media (max-width: 345px) { .lb-tools { gap: 6px; padding: 0 4px; } .lb-stage { bottom: calc(178px + env(safe-area-inset-bottom)); } } /* very narrow: the tools wrap onto two full-size rows */
@media (min-width: 641px) { .lb-stage { bottom: calc(112px + env(safe-area-inset-bottom)); } }

/* ---------- album finder: search + day chips ---------- */
.finder { display: grid; gap: 14px; margin: 26px 0 4px; }
.finder-box { position: relative; max-width: 520px; }
.finder-box input { width: 100%; min-height: 52px; padding: 0 46px 0 48px; font: inherit; font-size: 1rem; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); -webkit-appearance: none; appearance: none; }
.finder-box input::-webkit-search-cancel-button { display: none; }
.finder-box input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(215, 20, 26, 0.18); }
.finder-icon { position: absolute; left: 18px; top: 50%; translate: 0 -50%; width: 20px; height: 20px; color: var(--grey-3); pointer-events: none; }
.finder-clear { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.6rem; line-height: 1; }
.finder-clear:hover { background: var(--grey-2); }
.day-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.day-chip { flex: none; min-height: 44px; padding: 0 18px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; font-size: 0.92rem; white-space: nowrap; transition: background 0.2s, color 0.2s; scroll-snap-align: center; }
.day-chip:hover { background: var(--grey-2); }
.day-chip[aria-pressed="true"] { background: var(--ink); color: var(--gold); }
@media (max-width: 719px) { /* phones: one row that scrolls sideways */
  .day-chips { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; margin-inline: -16px; padding: 2px 16px 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .day-chips::-webkit-scrollbar { display: none; }
}
.finder-empty { margin-top: 26px; }
.finder-empty[hidden], #album-grid[hidden] { display: none; }
.finder-empty p { margin: 0 0 6px; }
.finder-empty .btn { margin-top: 12px; }

/* ==========================================================================
   Share panel icons, competition schedule, schedule modal
   ========================================================================== */
.lb-sharemenu { min-width: 250px; }
.lb-sharemenu .sm-ico { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 50%; color: #fff; }
.lb-sharemenu .sm-ico .icon { width: 21px; height: 21px; }
.ico-more { background: var(--gold); color: var(--ink) !important; }
.ico-wa { background: #25d366; }
.ico-fb { background: #1877f2; }
.ico-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.ico-copy { background: var(--red); }

/* ---------- schedule (one row per day) ---------- */
.sched { list-style: none; margin: 0; padding: 0; background: #fff; border: 2px solid var(--ink); border-radius: 18px; overflow: hidden; }
.sched-day { position: relative; display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 10px 22px; align-items: center; padding: 16px 22px 16px 26px; border-top: 1px solid var(--grey-2); transition: opacity 0.3s, background-color 0.3s; }
.sched-day:first-child { border-top: 0; }
.sd-date { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "num wd" "num short" "extra extra"; column-gap: 12px; align-items: center; }
.sd-num { grid-area: num; font-family: var(--font-head); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--ink); min-width: 1.1ch; text-align: center; }
.sd-wd { grid-area: wd; align-self: end; font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.06em; }
.sd-short { grid-area: short; align-self: start; color: var(--grey-3); font-weight: 600; font-size: 0.95rem; }
.sd-extra { grid-area: extra; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sd-label { padding: 2px 10px; border-radius: 999px; background: var(--gold); color: var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.today-badge { display: none; padding: 2px 10px; border-radius: 999px; background: var(--red); color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.sd-items { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.sd-item { position: relative; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 2px solid transparent; background: #ececec; font-weight: 600; line-height: 1.25; transition: opacity 0.3s, box-shadow 0.3s, border-color 0.3s; }
.sd-time { font-family: var(--font-head); font-weight: 800; font-size: 0.88rem; letter-spacing: 0.02em; }
.sd-item .icon { width: 22px; height: 22px; color: var(--red); }
.t-round { background: #ececec; }
.t-ceremony { background: #fff0b0; border-color: #f2cf3f; }
.t-meeting { background: #fff; border-color: #bdbdbd; }
.t-travel { background: none; padding-inline: 0; font-weight: 800; font-size: 1.05rem; }
.t-travel.is-now { padding-inline: 16px; }
.t-free { background: #fff; border-color: var(--gold); font-weight: 800; }
.sched-day.is-free { background-image: repeating-linear-gradient(135deg, rgba(255, 210, 0, 0.18) 0 14px, rgba(255, 210, 0, 0) 14px 28px); }

/* live status */
.sched-day.is-past { opacity: 0.52; }
.sched-day.is-today { background-color: #fff6d6; box-shadow: inset 7px 0 0 var(--red); }
.sched-day.is-today .today-badge { display: inline-block; }
.sd-item.is-done { opacity: 0.5; }
.sd-item.is-now { background: #fff; border-color: var(--red); box-shadow: 0 0 0 4px rgba(215, 20, 26, 0.14); }
.now-tag { display: none; align-items: center; gap: 6px; color: var(--red); font-family: var(--font-head); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
.sd-item.is-now .now-tag { display: inline-flex; }
.now-tag i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: live-ping 1.4s ease-out infinite; }
.sched-note { margin: 14px 4px 0; color: var(--grey-3); font-size: 0.95rem; font-weight: 600; }
.sched-actions { margin-top: 26px; }

/* phones: every day becomes a card, the date on top and the items wrapping underneath */
@media (max-width: 719px) {
  .sched { background: none; border: 0; border-radius: 0; overflow: visible; display: grid; gap: 14px; }
  .sched-day { display: block; padding: 14px 16px 16px 18px; background: #fff; border: 2px solid var(--ink); border-radius: 16px; }
  .sched-day:first-child { border-top: 2px solid var(--ink); }
  .sched-day.is-today { box-shadow: inset 7px 0 0 var(--red); border-color: var(--red); }
  .sched-day.is-free { background-color: #fff; }
  .sd-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; }
  .sd-num { font-size: 2.3rem; min-width: 0; }
  .sd-extra { margin-top: 0; align-self: center; margin-left: auto; }
  .sd-items { gap: 8px; }
}

/* ---------- schedule modal ---------- */
.sched-modal { position: fixed; inset: 0; z-index: 1700; display: grid; place-items: center; padding: 22px; background: rgba(10, 10, 10, 0.74); animation: fade-in 0.2s ease; }
.sm-card { width: min(100%, 1040px); height: min(100%, 900px); display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.sm-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 14px 14px 22px; background: var(--ink); color: #fff; border-bottom: 4px solid var(--gold); }
.sm-kicker { margin: 0; color: var(--gold); font-family: var(--font-head); font-weight: 800; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; }
.sm-head h2 { margin: 2px 0 0; font-size: clamp(1.05rem, 3.4vw, 1.5rem); text-transform: none; line-height: 1.2; }
.sm-head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.sm-page { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.4); color: #fff; font-weight: 700; font-size: 0.85rem; text-decoration: none; white-space: nowrap; }
.sm-page:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.sm-close { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4); background: transparent; color: #fff; font-size: 1.8rem; line-height: 1; }
.sm-close:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.sm-body { flex: 1; overflow: auto; padding: 22px; -webkit-overflow-scrolling: touch; background: var(--grey-1); }
@media (max-width: 719px) {
  .sched-modal { padding: 0; }
  .sm-card { width: 100%; height: 100%; border-radius: 0; }
  .sm-body { padding: 16px; }
  .sm-page { display: none; }
}

/* event card + home: the Schedule buttons */

/* tidy spacing now that the headers and the call-to-action have no captions */
.gallery-sub:not(:empty) { margin-top: 16px; }
.cta h2 { margin-bottom: 0.9em; }

/* designed album covers: chessboard + big notation-style code */
.cat-media.is-code { --c1: #D7141A; --c2: #b01015; --edge: #FFD200; display: grid; place-items: center; background: conic-gradient(var(--c2) 25%, var(--c1) 0 50%, var(--c2) 0 75%, var(--c1) 0) 0 0 / 25% 33.34%; container-type: inline-size; }
.cat-media.is-code.theme-black { --c1: #111; --c2: #262626; }
.cat-media.is-code.theme-gold { --c1: #FFD200; --c2: #e6bc00; --edge: #111; }
.cat-media.is-code.theme-grey { --c1: #3a3a3a; --c2: #2a2a2a; }
.tile-in { display: grid; justify-items: center; gap: 2cqw; padding: 5cqw 9cqw 6cqw; background: rgba(17, 17, 17, 0.88); border: 0.9cqw solid var(--edge); transition: transform 0.6s var(--ease); }
.theme-gold .tile-in { background: rgba(255, 255, 255, 0.92); }
.tile-piece { width: 11cqw; height: 11cqw; color: var(--edge); }
.theme-black .tile-piece, .theme-grey .tile-piece { color: var(--edge); }
.tile-code { font-family: var(--font-head); font-weight: 900; font-size: 25cqw; line-height: 1; letter-spacing: -0.02em; color: #fff; }
.theme-gold .tile-code { color: #111; }
.tile-code.long { font-size: 19cqw; }
@media (hover: hover) { .cat-card:hover .tile-in { transform: scale(1.07); } }
.cat-card:focus-visible .tile-in { transform: scale(1.07); }
@media (prefers-reduced-motion: reduce) { .tile-in { transition: none; } }

/* hero tagline: Playfair Display Italic 600, gold highlight, gentle entrance */
.hero h1 { font-family: 'Playfair Display', Georgia, 'Times New Roman', serif; font-style: italic; font-weight: 600; text-transform: none; letter-spacing: 0.02em; line-height: 1.18; color: #fff; font-size: clamp(2.25rem, 9vw, 4.7rem); text-wrap: balance; animation: tagline-in 0.9s 0.15s var(--ease) both; }
.hero h1 em { font-style: italic; color: var(--gold); }
@keyframes tagline-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero h1 { animation: none; } }

/* hero logo: soft glow fade-in, then a very slow float */
.hero-logo::before { content: ""; position: absolute; inset: -12%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 0, 0.2) 0%, rgba(215, 20, 26, 0.18) 40%, transparent 68%); opacity: 0; animation: hero-glow 1.4s ease-out both; }
.loader-on .hero-logo::before { animation-play-state: paused; }
@keyframes hero-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }
@keyframes hero-glow { 0% { opacity: 0; transform: scale(0.7); } 60% { opacity: 1; transform: scale(1.06); } 100% { opacity: 0.75; transform: scale(1); } }
@keyframes hero-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .hero-logo img, .hero-logo::before { animation: none; opacity: 1; } .hero-logo::before { opacity: 0.6; } }

/* ---------- hero background variants (?bg=current | a | b) ---------- */
.hero-bgv { position: absolute; inset: 0; z-index: -2; display: none; overflow: hidden; pointer-events: none; }
.hero-bgv > span { position: absolute; display: none; }
.hero[data-bg="a"] .hero-board, .hero[data-bg="b"] .hero-board, .hero[data-bg="a"]::before, .hero[data-bg="b"]::before, .hero[data-bg="a"]::after, .hero[data-bg="b"]::after { display: none; }
.hero[data-bg="a"], .hero[data-bg="b"] { --sx: 50%; --sy: 24%; }
.hero[data-bg="a"] .hero-bgv, .hero[data-bg="b"] .hero-bgv { display: block; }
@media (min-width: 860px) { .hero[data-bg="a"], .hero[data-bg="b"] { --sx: 76%; --sy: 48%; } }

/* A: dark spotlight + perspective board */
.hero[data-bg="a"] { background: #0b0b0b; }
.hero[data-bg="a"] .bg-spot { display: block; left: calc(var(--sx) - 45vmax); top: calc(var(--sy) - 45vmax); width: 90vmax; height: 90vmax; border-radius: 50%; background: radial-gradient(circle, rgba(215, 20, 26, 0.5) 0%, rgba(255, 210, 0, 0.18) 30%, transparent 62%); animation: bg-breathe 6s ease-in-out infinite; will-change: transform, opacity; }
.hero[data-bg="a"] .bg-stage { display: block; left: 0; right: 0; bottom: 0; height: 52%; perspective: 520px; perspective-origin: 50% 0%; -webkit-mask-image: linear-gradient(to top, #000 15%, transparent 92%); mask-image: linear-gradient(to top, #000 15%, transparent 92%); opacity: 0.8; }
.hero[data-bg="a"] .bg-floor { position: absolute; left: -60%; right: -60%; top: 0; bottom: 0; transform-origin: 50% 0%; transform: rotateX(58deg); background:
    linear-gradient(rgba(255, 210, 0, 0.45) 1px, transparent 1px) 0 0 / 90px 90px,
    linear-gradient(90deg, rgba(255, 210, 0, 0.45) 1px, transparent 1px) 0 0 / 90px 90px,
    conic-gradient(#1c1c1c 25%, #0b0b0b 0 50%, #1c1c1c 0 75%, #0b0b0b 0) 0 0 / 180px 180px;
  animation: bg-scroll 20s linear infinite; }
.hero[data-bg="a"] .bg-grain { display: block; inset: 0; opacity: 0.05; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes bg-breathe { 0%, 100% { transform: scale(0.94); opacity: 0.75; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes bg-scroll { to { background-position: 0 90px, 0 0, 0 180px; } }
@media (max-width: 599px) { .hero[data-bg="a"] .bg-stage { height: 40%; } .hero[data-bg="a"] .bg-grain { display: none; } }

/* B: gradient + fine grid + drifting gold light */
.hero[data-bg="b"] { background: linear-gradient(135deg, #0b0b0b 0%, #3a0507 100%); }
.hero[data-bg="b"] .bg-grid { display: block; inset: 0; opacity: 0.07; background: linear-gradient(#fff 1px, transparent 1px) 0 0 / 72px 72px, linear-gradient(90deg, #fff 1px, transparent 1px) 0 0 / 72px 72px; }
.hero[data-bg="b"] .bg-drift { display: block; left: -30vmax; top: 10%; width: 60vmax; height: 60vmax; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 0, 0.16) 0%, transparent 62%); animation: bg-drift 15s ease-in-out infinite alternate; will-change: transform; }
@keyframes bg-drift { from { transform: translate(0, 0); } to { transform: translate(110vw, 18vh); } }

/* keep the words readable on A and B */
.hero[data-bg="a"] .hero-text, .hero[data-bg="b"] .hero-text { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55); }
@media (prefers-reduced-motion: reduce) { .hero-bgv *, .hero-bgv { animation: none !important; } .hero[data-bg="b"] .bg-drift { left: 30%; } }

/* local-only switcher */
.bg-switch { position: fixed; left: max(12px, env(safe-area-inset-left)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 1500; display: flex; gap: 4px; padding: 4px; background: rgba(17, 17, 17, 0.92); border: 1px solid rgba(255, 210, 0, 0.5); border-radius: 999px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); }
.bg-switch button { min-width: 44px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: #fff; font: 700 0.78rem var(--font-head); cursor: pointer; }
.bg-switch button[aria-pressed="true"] { background: var(--gold); color: #111; }

/* ==========================================================================
   Players (players.html): two big choices, category / country grids, player cards, player page
   ========================================================================== */
.pl-summary { margin: 0; color: var(--grey-3); font-weight: 600; }
.pl-head { display: flex; align-items: center; gap: 14px; margin: 26px 0 22px; }
.pl-head h2 { margin: 0; }
.pl-head p { margin: 2px 0 0; color: var(--grey-3); font-weight: 600; }
.pl-head-flag { flex: none; width: 64px; height: 48px; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 2px var(--ink); }
.pl-head-tile { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 10px; background: var(--ink); border: 3px solid var(--gold); }
.pl-head-tile.theme-red { background: var(--red); }
.pl-head-tile .icon { width: 32px; height: 32px; color: var(--gold); }
.pl-code { font-family: var(--font-head); font-weight: 800; letter-spacing: 0.06em; }

/* the two big options */
.pl-choice { display: grid; gap: 20px; margin-top: 18px; }
@media (min-width: 720px) { .pl-choice { grid-template-columns: 1fr 1fr; gap: 26px; } }
.pl-choice-card { position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 26px; align-content: space-between; min-height: clamp(220px, 32vw, 300px); padding: clamp(22px, 4vw, 34px); border: 2px solid var(--ink); border-radius: var(--radius); color: #fff; text-decoration: none; transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.pl-choice-card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.08; background: conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0) 0 0 / 64px 64px; mask-image: linear-gradient(135deg, transparent 20%, #000); -webkit-mask-image: linear-gradient(135deg, transparent 20%, #000); }
.pl-choice-card.is-cat { background: var(--ink); }
.pl-choice-card.is-country { background: var(--red); }
.pl-choice-card:hover, .pl-choice-card:focus-visible { color: #fff; }
.pl-choice-card:focus-visible { box-shadow: 8px 8px 0 var(--gold); }
@media (hover: hover) { .js .pl-choice-card.reveal.in:hover, .pl-choice-card:hover { transform: translateY(-6px); box-shadow: 8px 8px 0 var(--gold); } }
.pl-choice-art { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.pl-choice-art .icon { width: clamp(32px, 6vw, 50px); height: clamp(32px, 6vw, 50px); color: var(--gold); }
.pl-choice-art .icon:nth-child(even) { color: #fff; }
.pl-choice-art img { width: clamp(48px, 7vw, 64px); height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 5px; box-shadow: 0 0 0 2px #fff, 0 6px 14px rgba(0, 0, 0, 0.35); }
.pl-choice-text { padding-right: 64px; }
.pl-choice-text strong { display: block; font-family: var(--font-head); font-weight: 800; text-transform: uppercase; font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.05; }
.pl-choice-text span { display: block; margin-top: 6px; color: rgba(255, 255, 255, 0.85); font-weight: 600; }
.pl-choice-go { position: absolute; right: clamp(18px, 3vw, 28px); bottom: clamp(18px, 3vw, 28px); display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: 1.4rem; font-weight: 800; transition: transform 0.3s var(--ease); }
@media (hover: hover) { .pl-choice-card:hover .pl-choice-go { transform: translateX(5px); } }

/* category and country grids (small cards: 2 columns on phones up to 6 on wide screens) */
.pl-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .pl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 900px) { .pl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .pl-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.pl-grid .cat-body { padding: 12px 14px 14px; }
.pl-grid .cat-body h3 { font-size: 1rem; }
.pl-grid .cat-body p { font-size: 0.88rem; }
.cat-card.is-none { opacity: 0.55; border-style: dashed; cursor: default; }
.cat-card.is-none .tile-in { filter: grayscale(1); }
@media (hover: hover) { .js .cat-card.is-none.reveal.in:hover, .cat-card.is-none:hover { transform: none; box-shadow: none; } .cat-card.is-none:hover .tile-in { transform: none; } }
.cat-media.pl-flag-media { display: grid; place-items: center; background: var(--grey-1) conic-gradient(rgba(0, 0, 0, 0.04) 25%, transparent 0 50%, rgba(0, 0, 0, 0.04) 0 75%, transparent 0) 0 0 / 40px 40px; }
.cat-media.pl-flag-media img { width: 62%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 2px var(--ink), 0 8px 18px rgba(0, 0, 0, 0.18); }

/* player cards */
.pl-list { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .pl-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 900px) { .pl-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .pl-list { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.pl-card { display: flex; flex-direction: column; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; transition: transform 0.3s var(--ease), box-shadow 0.3s; -webkit-tap-highlight-color: transparent; }
.pl-card:hover, .pl-card:focus-visible { color: var(--ink); }
.pl-card:focus-visible { box-shadow: 8px 8px 0 var(--gold); }
@media (hover: hover) { .js .pl-card.reveal.in:hover, .pl-card:hover { transform: translateY(-6px); box-shadow: 8px 8px 0 var(--gold); } .pl-card:hover .pl-img { transform: scale(1.05); } }
.pl-photo, .pp-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink) conic-gradient(rgba(255, 255, 255, 0.07) 25%, transparent 0 50%, rgba(255, 255, 255, 0.07) 0 75%, transparent 0) 0 0 / 48px 48px; border-bottom: 4px solid var(--red); }
.pl-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.pl-noimg { display: none; position: absolute; left: 22%; top: 18%; width: 56%; height: 56%; color: var(--gold); opacity: 0.6; }
.no-photo .pl-img { display: none; }
.no-photo .pl-noimg { display: block; }
.pl-flag { position: absolute; left: 10px; bottom: 10px; width: 36px; height: 27px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(0, 0, 0, 0.45); }
.pl-body { flex: 1; display: grid; gap: 6px; align-content: start; padding: 12px 14px 14px; }
.pl-body h3 { margin: 0; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.pl-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--grey-3); font-size: 0.85rem; font-weight: 600; line-height: 1.3; }
.pl-cat { background: var(--ink); color: var(--gold); border-radius: 6px; padding: 1px 7px; font-family: var(--font-head); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.04em; }
.pl-rt { margin: 2px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.4; }
.pl-rt span { white-space: nowrap; }
.pl-rt b { margin-right: 3px; color: var(--red); font-family: var(--font-head); font-weight: 800; }
.pl-rt i { margin: 0 5px; font-style: normal; color: #bbb; }
@media (max-width: 419px) { .pl-body { padding: 10px 10px 12px; } .pl-rt { font-size: 0.74rem; letter-spacing: -0.01em; } .pl-rt b { margin-right: 2px; } .pl-rt i { margin: 0 2px; } }

/* player page: profile on the left, photos on the right (stacked on phones) */
.pp { display: grid; gap: 28px; margin-top: 26px; align-items: start; }
@media (min-width: 900px) { .pp { grid-template-columns: minmax(300px, 390px) minmax(0, 1fr); gap: 40px; } }
.pp-card { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: 8px 8px 0 var(--gold); }
@media (min-width: 600px) and (max-width: 899px) { .pp-card { display: grid; grid-template-columns: 250px minmax(0, 1fr); } .pp-photo { border-bottom: 0; border-right: 4px solid var(--red); align-self: stretch; aspect-ratio: auto; min-height: 312px; } }
.pp-photo .pl-flag { left: 14px; bottom: 14px; width: 60px; height: 45px; border-radius: 5px; box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(0, 0, 0, 0.5); }
.pp-info { display: grid; gap: 14px; align-content: start; padding: 20px 22px 24px; }
.pp-name { margin: 0; text-transform: none; font-size: clamp(1.5rem, 4vw, 2rem); overflow-wrap: anywhere; }
.pp-tags { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pp-tag { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px 4px 10px; border: 2px solid var(--ink); border-radius: 999px; color: var(--ink); font-weight: 700; font-size: 0.9rem; text-decoration: none; transition: background 0.2s, color 0.2s; }
.pp-tag:hover { background: var(--ink); color: #fff; }
.pp-tag b { background: var(--ink); color: var(--gold); border-radius: 999px; padding: 0 8px; font-family: var(--font-head); font-size: 0.8rem; }
.pp-tag:hover b { background: var(--gold); color: var(--ink); }
.pp-tag img { width: 24px; height: 18px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.pp-tag .pl-code { font-size: 0.78rem; opacity: 0.7; }
.pp-fide { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pp-fide > span { color: var(--grey-3); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; }
.pp-fide a { font-weight: 800; font-variant-numeric: tabular-nums; }
.pp-ratings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pp-rating { display: grid; gap: 2px; padding: 10px 6px; text-align: center; background: var(--ink); color: #fff; border-radius: 10px; }
.pp-rating span { color: rgba(255, 255, 255, 0.72); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.pp-rating b { color: var(--gold); font-family: var(--font-head); font-size: 1.35rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pp-rating.is-none b { color: rgba(255, 255, 255, 0.45); }
.pp-photos h3 { margin: 0 0 16px; text-transform: uppercase; font-size: 1.3rem; }
.pp-count { color: var(--grey-3); font-size: 0.9em; }
.pp-photos .coming-soon { margin-top: 0; }
.pp-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(45%, 160px), 1fr)); }
.pp-thumb { position: relative; display: block; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--grey-2); cursor: zoom-in; }
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease), filter 0.3s; }
.pp-thumb span { position: absolute; left: 6px; bottom: 6px; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 8px; border-radius: 999px; background: rgba(17, 17, 17, 0.82); color: #fff; font-size: 0.72rem; font-weight: 700; }
.pp-thumb:focus-visible { outline-offset: -4px; }
@media (hover: hover) { .pp-thumb:hover img { transform: scale(1.05); filter: brightness(0.9); } }
@media (prefers-reduced-motion: reduce) { .pl-img, .pp-thumb img, .pl-choice-go { transition: none; } }

