/* ========================================================================
   ROS 2026 - Ragnarok Stars tournament site
   Palette:
     --ink       #0b0e14   deep night navy/black (hero, bracket bg)
     --ink-2     #14181f   secondary panel
     --gold      #d8a94e   primary gold (headings, accents)
     --gold-2    #a67b2e   deep bronze gold (gradients, table)
     --cream     #efe6d4   parchment background (timeline section)
     --parchment #e7dcc4   card / table alt
     --wine      #5c2a1a   accent red-brown (dividers)
   Type:
     Display + Body: 'Chonburi' (Thai/Latin display face — used site-wide)
     Fallback: 'Noto Sans Thai', 'Noto Sans KR/SC/TC' for glyphs Chonburi
               doesn't cover (Korean, Chinese), so no language renders broken.
   ======================================================================== */

/* Fonts are loaded via <link> in index.html <head> for faster rendering. */

:root {
  --ink: #0b0e14;
  --ink-2: #161b24;
  --gold: #d8a94e;
  --gold-light: #f1d999;
  --gold-2: #a67b2e;
  --cream: #efe6d4;
  --parchment: #e7dcc4;
  --wine: #5c2a1a;
  --text-light: #f4efe3;
  --text-dim: #c9beac;
  --font-display: 'Chonburi', 'Noto Sans Thai', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', serif;
  --font-body: 'LINE Seed Sans TH', 'Noto Sans Thai', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', sans-serif;
  --max-w: 1220px;
  --seam: clamp(36px, 4.5vw, 86px);  /* depth of the "V" between timeline and prize sections */
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;        /* clear the fixed header on anchor jumps */
}
/* scroll-snap removed — free, smooth scrolling feels less jerky */
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text-light);
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* focus visibility */
a:focus-visible, button:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}

/* ---------------------------------- Header ---------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  /* faint translucent panel so the nav stays readable over the hero */
  background: rgba(8,10,15,.38);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  border-bottom: 1px solid rgba(216,169,78,.12);
  padding: 16px 0;
}
/* keep jumped-to sections clear of the fixed header */
#about, #timeline, #prize, #teams, #bracket, #venue, #community { scroll-margin-top: 84px; }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 40px; }
.brand-name {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 15px;
  letter-spacing: .04em;
}
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.main-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: .02em;
  display: flex; align-items: center; gap: 4px;
  transition: color .2s;
}
.main-nav a:hover { color: var(--gold-light); }
/* 8 menu items: tighten spacing on mid-size screens so the language switcher stays on screen */
@media (max-width: 1180px) and (min-width: 721px) {
  .main-nav ul { gap: 18px; }
  .main-nav a { font-size: 13px; }
}
@media (max-width: 1040px) and (min-width: 721px) {
  .header-right .championship-pill { display: none; }
}
.nav-caret { font-size: 10px; opacity: .7; }

.header-right { display: flex; align-items: center; gap: 18px; }
/* mobile-only nav badge (shown inside the open menu; hidden on desktop) */
.nav-championship { display: none; }
.championship-pill {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-light);
  border: 1px solid rgba(216,169,78,.5);
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.lang-switcher { position: relative; }
.lang-current {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-light);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.15);
  padding: 6px 10px; border-radius: 6px;
}
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--ink-2);
  border: 1px solid rgba(216,169,78,.25);
  border-radius: 8px;
  min-width: 170px;
  padding: 6px;
  display: none;
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.lang-switcher.open .lang-menu { display: block; }
.lang-menu a {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-radius: 6px; font-size: 13px;
}
.lang-menu a:hover { background: rgba(216,169,78,.15); color: var(--gold-light); }
.lang-menu a[aria-current="true"] { color: var(--gold-light); font-weight: 700; }

.nav-toggle {
  display: none;
  background: none; border: none; color: var(--text-light);
  font-size: 24px; padding: 4px 8px;
}

/* Side floating badges */
.side-actions {
  position: fixed;
  right: 22px; top: 130px;
  z-index: 90;
  display: flex; flex-direction: column; gap: 14px; align-items: center;
}
.side-badge {
  width: 112px; height: 112px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  /* diamond button artwork baked into the image (no rotation needed) */
  background: url("../images/common/bg-btn.png") no-repeat center / contain;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.45));
  transition: transform .2s ease, filter .2s ease;
}
.side-badge:hover {
  transform: translateY(-2px) scale(1.04);
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.5)) brightness(1.05);
}
.side-badge span {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--ink);
  line-height: 1.34;
  width: 74px;
}
/* "coming soon" popup shown when a not-yet-live side badge (ROS RULES) is clicked */
.soon-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 5, 3, .78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
  -webkit-tap-highlight-color: transparent;
}
.soon-modal.is-open { opacity: 1; visibility: visible; }
.soon-modal__box {
  position: relative;
  width: min(420px, 90vw);
  text-align: center;
  padding: 40px 34px 38px;
  border-radius: 18px;
  border: 1px solid rgba(216,169,78,.55);
  background: linear-gradient(180deg, rgba(26,20,12,.98), rgba(11,8,5,.98));
  box-shadow: 0 24px 70px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06);
  transform: translateY(14px) scale(.96);
  transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.soon-modal.is-open .soon-modal__box { transform: translateY(0) scale(1); }
.soon-modal__logo { width: 118px; height: auto; margin: 0 auto 18px; display: block; }
.soon-modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--gold-light);
  text-shadow: 0 2px 14px rgba(216,169,78,.35);
}
.soon-modal__close {
  position: absolute;
  top: 12px; right: 12px;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(216,169,78,.6);
  color: var(--gold-light);
  font-size: 16px; line-height: 1;
  cursor: pointer;
  transition: background .2s ease;
}
.soon-modal__close:hover { background: rgba(216,169,78,.22); }
@media (prefers-reduced-motion: reduce) {
  .soon-modal, .soon-modal__box { transition: opacity .2s ease; }
}
.scroll-top {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(11,14,20,.72);
  border: 1px solid rgba(216,169,78,.6);
  color: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1;
  z-index: 95;
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
  /* hidden until the user scrolls down */
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.9);
  transition: opacity .3s ease, transform .3s cubic-bezier(.16,1,.3,1),
              visibility .3s, background .2s, border-color .2s;
}
.scroll-top.show { opacity: 1; visibility: visible; transform: none; }
.scroll-top:hover { background: rgba(216,169,78,.22); border-color: var(--gold-light); }

/* ---------------------------------- Hero ---------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 160px 24px 60px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, #1c2436 0%, var(--ink) 60%);
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .55;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(11,14,20,.15) 0%, rgba(11,14,20,.95) 92%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 900px; }
.hero-banner { width: min(100%, 780px); margin: 0 auto 8px; }
.hero-logo { width: min(100%, 460px); margin: 0 auto; }
.hero-tagline {
  /* Modern refined gold: smaller, airier tracking, smooth polished gradient
     with a soft dimensional glow — no hard outline/bevel (ultra-smooth). */
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(21px, 3.6vw, 40px);
  line-height: 1.12;
  letter-spacing: .06em;
  margin: 20px 0 30px;

  /* smooth multi-stop gold: bright sheen up top, deeper gold at the base */
  background: linear-gradient(177deg, #fff6d8 0%, #f4d488 32%, #d99f42 68%, #b9822f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;

  /* soft layered depth: crisp contact shadow + warm ambient glow (no stroke) */
  filter:
    drop-shadow(0 1px 1px rgba(0, 0, 0, .45))
    drop-shadow(0 3px 10px rgba(0, 0, 0, .3))
    drop-shadow(0 0 22px rgba(255, 214, 120, .22));
}

/* Event news strip */
.news-strip { position: relative; z-index: 2; width: 100%; }
.news-strip-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.news-strip .divider-title {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: 20px;
  text-align: center;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 16px;
}
.news-strip .divider-title::before,
.news-strip .divider-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}
.news-cards { display: flex; gap: 16px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.news-cards::-webkit-scrollbar { display: none; }
.news-card {
  flex: 1 1 260px;
  min-width: 220px;
  display: flex;
  gap: 12px;
  background: rgba(20,24,32,.75);
  border: 1px solid rgba(216,169,78,.25);
  border-radius: 8px;
  padding: 10px;
  align-items: center;
}
.news-card img { width: 76px; height: 76px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.news-card .date { font-size: 11px; color: var(--gold-light); font-weight: 700; }
.news-card .title { font-size: 14px; font-weight: 700; margin: 2px 0; }
.news-card .desc { font-size: 12px; color: var(--text-dim); }
.news-more {
  flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  border: none;
  gap: 2px;
  flex-direction: column;
}
.news-more span { font-size: 16px; }

/* ---------------------------------- Timeline ---------------------------------- */
.timeline-section {
  background: #e2d7bf url("../images/common/bg-sec2.png") center / cover no-repeat;
  background-attachment: fixed;    /* parallax */
  color: #2a2013;
  padding: 90px 24px calc(90px + var(--seam));
  /* bottom edge cut into a "V"; the prize section sits underneath (negative margin) */
  position: relative;
  z-index: 2;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--seam)), 50% 100%, 0 calc(100% - var(--seam)));
}
.section-heading {
  font-family: var(--font-display);
  text-align: center;
  font-size: clamp(34px, 5.2vw, 52px);
  font-weight: 800;
  letter-spacing: .01em;
  margin-bottom: 8px;
}
.timeline-section .section-heading { color: #3a2c14; }
.section-rule {
  width: 240px; margin: 0 auto 44px;
  display: flex; align-items: center; gap: 12px;
  color: var(--gold-2);
  font-size: 13px; letter-spacing: .1em;
  text-transform: uppercase;
}
.section-rule::before, .section-rule::after {
  content: ""; flex: 1; height: 1px; background: var(--gold-2);
}

.timeline-table-wrap {
  max-width: 1050px; margin: 0 auto;
  border: 1px solid var(--gold-2);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(90,60,20,.15);
}
.timeline-table { width: 100%; border-collapse: collapse; background: #fff; }
.timeline-table th {
  background: linear-gradient(180deg, #c99a3f, #a67b2e);
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  padding: 14px 8px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.25);
}
.timeline-table th:last-child { border-right: none; }
.timeline-table td {
  font-size: 12.5px;
  text-align: center;
  padding: 12px 10px;
  border: 1px solid #e6d9bd;
  color: #4a3c22;
  vertical-align: top;
}
.timeline-table tr:nth-child(even) td { background: #faf4e6; }
.timeline-footer {
  text-align: center;
  background: var(--gold-2);
  color: #fff;
  font-weight: 700;
  padding: 16px 12px;
  font-size: 14px;
}
.timeline-footer small { display: block; font-weight: 500; opacity: .9; margin-top: 4px; }

/* ---------------------------------- Bracket ---------------------------------- */
.bracket-section {
  background: var(--ink);
  padding: 100px 24px;
  position: relative;
  overflow: hidden;
  /* V-shaped transition: dark rises at the sides and dips to a point in the centre */
  margin-top: -72px;
  z-index: 1;
  -webkit-clip-path: polygon(0 0, 50% 72px, 100% 0, 100% 100%, 0 100%);
  clip-path: polygon(0 0, 50% 72px, 100% 0, 100% 100%, 0 100%);
}
/* Bracket is a single designed image per language (title + full bracket
   graphic baked in) — same pattern as the hero banner/logo images. */
.bracket-image {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: block;
  /*border: 1px solid rgba(216,169,78,.35);*/
  border-radius: 10px;
}

/* ---------------------------------- Venue ---------------------------------- */
.venue-section {
  background: var(--ink);
  padding: 60px 24px 100px;
}
.venue-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2.1fr;
  gap: 50px;
  align-items: center;
}
.venue-heading {
  font-family: var(--font-display);
  color: var(--gold-light);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  margin-bottom: 16px;
}
.venue-place { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.venue-date { color: var(--gold-light); font-weight: 600; margin-bottom: 16px; }
.venue-schedule { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.venue-schedule li { font-size: 13.5px; color: var(--text-dim); }
.venue-map { position: relative; }

/* Venue slideshow (right column) */
.venue-slider {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  --chamfer: 28px;             /* diagonal cut size (matches Subtract corner) */
  --frame: 5px;                /* gold border thickness */
  /* gold border colour sampled from Subtract.png */
  background: linear-gradient(135deg, #e7cd8a 0%, #d7a94f 48%, #c78f39 100%);
  -webkit-clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer));
  clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer));
}
.venue-slider .venue-slide {
  position: absolute;
  inset: var(--frame);
  overflow: hidden;
  border: 0;
  --ic: calc(var(--chamfer) - var(--frame) * 3.414);
  -webkit-clip-path: polygon(var(--ic) 0, 100% 0, 100% calc(100% - var(--ic)), calc(100% - var(--ic)) 100%, 0 100%, 0 var(--ic));
  clip-path: polygon(var(--ic) 0, 100% 0, 100% calc(100% - var(--ic)), calc(100% - var(--ic)) 100%, 0 100%, 0 var(--ic));
  opacity: 0;
  transform: translateX(100%);
  transition: transform .85s cubic-bezier(.16, 1, .3, 1), opacity .85s ease;
  z-index: 1;
}
.venue-slider .venue-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* slow Ken Burns zoom while a slide is showing */
.venue-slider .venue-slide.is-active img {
  animation: venueKen 9s ease-out both;
}
@keyframes venueKen {
  from { transform: scale(1.02); }
  to   { transform: scale(1.1); }
}
/* Subtract.png gold corner ornaments on the two chamfered corners */
.venue-slider::before,
.venue-slider::after {
  content: "";
  position: absolute;
  width: 42px;
  height: 42px;
  background: url("../images/common/Subtract.png") no-repeat;
  background-size: 100% 100%;
  z-index: 5;
  pointer-events: none;
}
.venue-slider::before { top: 0; left: 0; }
.venue-slider::after { right: 0; bottom: 0; transform: rotate(180deg); }
.venue-slider .venue-slide.is-active  { opacity: 1; transform: translateX(0);     z-index: 2; }
.venue-slider .venue-slide.is-leaving { opacity: 0; transform: translateX(-100%); z-index: 1; }
.venue-slider .venue-slide.is-enter   { transition: none; transform: translateX(100%); opacity: 0; }
.venue-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(216,169,78,.5);
  background: rgba(11,14,20,.55);
  color: var(--gold-light);
  font-size: 22px; line-height: 1;
  border-radius: 50%;
  z-index: 3;
  transition: background .2s;
}
.venue-arrow:hover { background: rgba(11,14,20,.85); }
.venue-arrow.prev { left: 12px; }
.venue-arrow.next { right: 12px; }
.venue-dots button { cursor: pointer; transition: background .2s, transform .2s; }
.venue-dots button[aria-current="true"] { transform: scale(1.3); }
.venue-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.venue-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.3);
}
.venue-dots button[aria-current="true"] { background: var(--gold); }

/* ---------------------------------- Community ---------------------------------- */
.community-section {
  position: relative;
  padding: 90px 24px 100px;
  background: #14100b url("../images/common/Frame532.png") center top / cover no-repeat;
  overflow: visible;               /* let the character poke up into the section above */
}
/* dark overlay (bg-toned) — sits ABOVE the character so she blends into the
   misty background; only the part of her that pokes past the section edge
   (outside this overlay) reads clearly */
.community-section::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(123, 112, 98, 0) 0%, #7B7062 100%);
  pointer-events: none;
  z-index: 1;
}
.community-section .container { position: relative; z-index: 2; }
.community-section .section-heading {
  color: var(--gold-light); text-align: left; margin-bottom: 30px;
  position: relative; z-index: 2;
  /* layered dark shadow + warm glow so the title lifts off the misty backdrop */
  text-shadow:
    0 1px 1px rgba(0,0,0,.9),
    0 2px 10px rgba(0,0,0,.85),
    0 4px 26px rgba(0,0,0,.7),
    0 0 30px rgba(216,169,78,.4);
}

/* maid character standing in the bottom-right corner, head poking just past
   the top edge of the section; sits under the bg-toned overlay */
.community-char {
  position: absolute;
  right: clamp(-40px, 1vw, 30px);
  bottom: 0; top: auto;
  width: clamp(340px, 42vw, 540px);   /* head clears the top edge just a little */
  height: auto;
  z-index: 0;                      /* below the overlay + cards → blends into bg */
  pointer-events: none;
}

.community-grid {
  max-width: 1220px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.community-card {
  /* parchment card frame artwork */
  background: url("../images/common/bg-partner.png") no-repeat center / 100% 100%;
  border: none;
  border-radius: 0;
  padding: 26px 22px 24px;
  text-align: left;             /* left-align everything… */
  color: #4a3a20;
}
.community-card .logo { height: 54px; margin: 0 auto 18px; object-fit: contain; display: block; }  /* …except the logo, kept centered */
.community-card .link-row {
  display: flex; align-items: center; justify-content: flex-start; gap: 7px;
  font-size: 13px; color: #5a4626; margin-bottom: 9px; line-height: 1.45;
  word-break: break-word;
}
.community-card .link-row.website { color: #6e4f1e; font-weight: 700; margin-bottom: 4px; }
.community-card .link-row.url { color: #7a5a24; font-weight: 600; margin-bottom: 12px; word-break: break-all; }
.community-card .link-row .ic { width: 18px; height: 18px; flex-shrink: 0; object-fit: contain; }
/* link rows are now <a> — strip default styling, add a hover cue */
.community-card a.link-row { text-decoration: none; cursor: pointer; transition: color .18s ease, opacity .18s ease; }
.community-card a.link-row:hover { color: #b9832b; text-decoration: underline; }
.community-card a.link-row[href="#"] { cursor: default; }
.community-card a.link-row[href="#"]:hover { text-decoration: none; }

/* staggered fade-in for the cards (set up per-card in i18n.js) */
.community-card.card-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.22,.61,.36,1),
              transform .8s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.community-card.card-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .community-card.card-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------- Footer ---------------------------------- */
.site-footer {
  background: linear-gradient(180deg, #0b0d12 0%, #060708 100%);
  color: var(--text-dim);
  font-size: 12px;
  padding: 0;
}
.footer-main {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  padding: 46px 20px 40px;
}
.footer-brand { display: inline-block; flex: 0 0 auto; }
.footer-brand img { height: 96px; width: auto; display: block; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 30px 64px;
  padding-top: 8px;
  flex: 1 1 auto;
}
.footer-col { display: flex; flex-direction: column; gap: 14px; min-width: 90px; }
.footer-col-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--gold-light);
  transition: color .2s;
}
.footer-col-title:hover { color: #fff; }
.footer-link {
  font-size: 14px;
  color: var(--text-dim);
  transition: color .2s;
}
.footer-link:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(216,169,78,.16);
  padding: 16px 0;
}
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-copy { margin: 0; color: var(--text-dim); font-size: 12px; }
.footer-legal {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.footer-legal a { color: var(--text-dim); transition: color .2s; }
.footer-legal a:hover { color: var(--gold-light); }
.footer-sep { color: rgba(216,169,78,.4); }
@media (max-width: 720px) {
  .footer-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
    padding: 38px 20px 30px;
  }
  .footer-brand img { height: 80px; }
  .footer-nav { justify-content: center; gap: 26px 40px; }
  .footer-col { align-items: center; min-width: 0; gap: 10px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; gap: 12px; }
}

/* ---------------------------------- Mascot deco (optional art) ---------------------------------- */
.deco-mascot {
  max-width: 220px;
  margin: -60px auto 0;
  display: block;
}

/* ---------------------------------- Responsive ---------------------------------- */
@media (max-width: 960px) {
  .venue-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .main-nav ul { display: none; }
  .main-nav.nav-open ul {
    display: flex;
    flex-direction: column;
    /* "safe center" keeps items centered when they fit, but falls back to the
       top (reachable via scroll) instead of clipping when they don't */
    justify-content: safe center;
    gap: 2px;
    margin: 0;
    padding: 84px 32px 32px;
    /* NOTE: the fixed header uses backdrop-filter, which makes it the
       containing block for fixed-position descendants. So `inset:0` would only
       fill the header's height and clip the menu. Use viewport height instead
       so the overlay truly covers the whole screen. */
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(160deg, #12161f 0%, #0b0e14 100%);
    /* fit any phone: scroll if the links can't all fit the viewport height */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 300;
    animation: menuIn .45s cubic-bezier(.16, 1, .3, 1) both;
  }
  .main-nav.nav-open ul::before {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -30px;
    width: 82vw;
    max-width: 480px;
    height: 300px;
    background: url("../images/common/ROS2026_logo2.png") no-repeat center / contain;
    opacity: .06;
    pointer-events: none;
    z-index: 0;
  }
  .main-nav.nav-open li {
    position: relative;
    z-index: 1;
    padding: 14px 0;
    border-bottom: 1px solid rgba(216,169,78,.12);
    opacity: 0;
    animation: menuLinkIn .45s ease forwards;
  }
  .main-nav.nav-open li:nth-child(1) { animation-delay: .16s; }
  .main-nav.nav-open li:nth-child(2) { animation-delay: .22s; }
  .main-nav.nav-open li:nth-child(3) { animation-delay: .28s; }
  .main-nav.nav-open li:nth-child(4) { animation-delay: .34s; }
  .main-nav.nav-open li:nth-child(5) { animation-delay: .40s; }
  .main-nav.nav-open li:nth-child(6) { animation-delay: .46s; }
  .main-nav.nav-open li:nth-child(7) { animation-delay: .52s; }
  .main-nav.nav-open li:nth-child(8) { animation-delay: .58s; }
  .main-nav.nav-open li:nth-child(9) { animation-delay: .64s; }
  .main-nav.nav-open a {
    justify-content: flex-start;
    font-size: 21px;
    letter-spacing: .02em;
  }
  .main-nav.nav-open .menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 16px;
    right: 18px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(11,14,20,.6);
    border: 1px solid rgba(216,169,78,.55);
    color: var(--gold-light);
    font-size: 18px;
    line-height: 1;
    z-index: 301;
    cursor: pointer;
    animation: menuLinkIn .4s ease .12s both;
  }
  .main-nav.nav-open .menu-close:hover { background: rgba(216,169,78,.2); }
  @keyframes menuIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
  }
  @keyframes menuLinkIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
  }
  .nav-toggle { display: block; }
  .championship-pill { display: none; }
  /* championship badge brought back inside the mobile menu */
  .nav-championship { display: block; }
  .main-nav.nav-open li:nth-child(6) { animation-delay: .46s; }
  .main-nav.nav-open .nav-championship { border-bottom: none; padding-top: 18px; }
  .main-nav.nav-open .nav-championship span {
    display: inline-block;
    padding: 9px 16px 10px;
    border: 1px solid rgba(216,169,78,.55);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(216,169,78,.18), rgba(216,169,78,.05));
    color: var(--gold-light);
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: .04em;
    line-height: 1.25;
  }
  .side-actions { right: 10px; top: 100px; }
  .side-badge { width: 82px; height: 82px; }
  .side-badge span { width: 56px; font-size: 9px; letter-spacing: .03em; line-height: 1.3; }
  .community-grid { grid-template-columns: repeat(2, 1fr); }
  .news-cards { flex-wrap: wrap; }
  .news-strip .divider-title { display: none; }
}
@media (max-width: 480px) {
  .hero { padding-top: 120px; min-height: 600px; }
  .community-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .timeline-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .timeline-table { min-width: 640px; }
}


/* ---------------------------------- Menu close btn (base) ---------------------------------- */
.menu-close { display: none; }

/* ---------------------------------- Preloader ---------------------------------- */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background: #000;
  isolation: isolate;   /* keep screen-blend bolts/flash within the preloader,
                           so the page behind never shows through during a flash */
  transition: opacity 1s ease, visibility 1s;
}
#preloader.loaded { opacity: 0; visibility: hidden; }
#preloader .pl-logo {
  width: min(72vw, 340px);
  filter: drop-shadow(0 10px 34px rgba(216,169,78,.35));
  animation: plFadeIn 1s ease-out both, plFloat 3s ease-in-out 1s infinite;
}
@keyframes plFadeIn { from { opacity: 0; } to { opacity: 1; } }   /* pure fade, no movement */
@keyframes plFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
#preloader .pl-bar {
  position: relative;
  width: min(58vw, 240px);
  height: 3px;
  border-radius: 3px;
  background: rgba(216,169,78,.16);
  overflow: hidden;
}
#preloader .pl-bar::before {
  content: "";
  position: absolute;
  top: 0; left: 0; height: 100%; width: 40%;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, #e7cd8a, #c78f39, transparent);
  animation: plSlide 1.1s ease-in-out infinite;
}
@keyframes plSlide { 0% { transform: translateX(-130%); } 100% { transform: translateX(360%); } }
#preloader .pl-text {
  font-family: var(--font-display);
  color: var(--gold-light);
  letter-spacing: .42em;
  font-size: 12px;
  text-transform: uppercase;
  text-indent: .42em;
}

/* Preloader: gentle fade-in for the bar and text */
#preloader .pl-bar, #preloader .pl-text { opacity: 0; animation: plSoftIn .8s ease .55s forwards; }
@keyframes plSoftIn { to { opacity: 1; } }

/* ---------------------------------- Scroll reveal ---------------------------------- */
/* Simple, clean fade-up. Replays each time an element re-enters the viewport
   (both scroll directions) via the .reveal-in toggle in main.js. */
.reveal {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity .9s cubic-bezier(.22, .61, .36, 1),
              transform .9s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity, transform;
}
.reveal.reveal-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Lightning FX (ฟ้าผ่าฟ้าแลบ) — decorative bolts for Bracket & Venue sections
   ========================================================================== */

/* Sections must clip + stack the bolts behind their content */
.bracket-section,
.venue-section { position: relative; overflow: hidden; }
.bracket-section > .container,
.venue-section  > .container { position: relative; z-index: 3; }

/* Base bolt element — bigger & fiercer */
.fx-bolt {
  position: absolute;
  z-index: 1;
  width: clamp(190px, 22vw, 360px);
  height: auto;
  pointer-events: none;
  user-select: none;
  opacity: .9;
  mix-blend-mode: screen;              /* melt any residual matte into the dark bg */
  will-change: opacity, filter;
  animation: boltFlicker 8s infinite;
}

/* ---- Placements (match the marked spots in the reference) ---- */
/* Bracket: top-left corner */
.fx-bolt--tl {
  top: -26px; left: -30px;
  transform: translate3d(0, var(--py, 0), 0) rotate(-8deg);
  animation-duration: 8s;
}
/* Bracket: right edge, middle */
.fx-bolt--r {
  top: 50%; right: -56px;
  transform: translate3d(0, var(--py, 0), 0) scaleX(-1) rotate(6deg);
  width: clamp(170px, 19vw, 320px);
  animation-duration: 9.5s;
  animation-delay: 2.2s;
}
/* Venue: bottom-left corner */
.fx-bolt--bl {
  bottom: -34px; left: -34px;
  transform: translate3d(0, var(--py, 0), 0) rotate(4deg);
  animation-duration: 8.6s;
  animation-delay: 1.3s;
}
/* Venue: right edge, upper */
.fx-bolt--vr {
  top: 18%; right: -62px;
  transform: translate3d(0, var(--py, 0), 0) scaleX(-1) rotate(-6deg);
  width: clamp(170px, 19vw, 320px);
  animation-duration: 10.5s;
  animation-delay: 3.4s;
}

/* ---- Calm steady glow + a single clean strike now and then ----
   Mostly a bright, stable glow; blinks only briefly once per long cycle. */
@keyframes boltFlicker {
  0%, 46%, 100% {
    opacity: .9;
    filter: brightness(1.18) drop-shadow(0 0 18px rgba(255,206,96,.62));   /* steady glow */
  }
  50% { opacity: .55; filter: brightness(1); }                            /* one quick dip */
  53% { opacity: 1;   filter: brightness(2.3) drop-shadow(0 0 46px rgba(255,234,150,1)); }  /* single strike */
  58% { opacity: .82; filter: brightness(1.35) drop-shadow(0 0 20px rgba(255,208,98,.7)); }
  62% { opacity: .9;  filter: brightness(1.18) drop-shadow(0 0 18px rgba(255,206,96,.62)); } /* settle back to glow */
}

/* Fresh strike burst when the section scrolls into view (added via JS) */
.fx-bolt.is-striking { animation: boltStrike .9s ease-out; }
@keyframes boltStrike {
  0%   { opacity: 0;   filter: brightness(1); }
  8%   { opacity: 1;   filter: brightness(3) drop-shadow(0 0 60px rgba(255,244,190,1)); }   /* big hit */
  16%  { opacity: .2;  filter: brightness(1); }
  24%  { opacity: 1;   filter: brightness(2.7) drop-shadow(0 0 52px rgba(255,238,170,1)); }
  34%  { opacity: .5;  filter: brightness(1.4); }
  44%  { opacity: 1;   filter: brightness(2.3) drop-shadow(0 0 42px rgba(255,228,140,1)); }
  60%  { opacity: .75; filter: brightness(1.3) drop-shadow(0 0 18px rgba(255,204,90,.7)); }
  100% { opacity: .9;  filter: brightness(1.2) drop-shadow(0 0 14px rgba(255,198,82,.6)); }
}

@media (max-width: 720px) {
  .fx-bolt { width: clamp(120px, 34vw, 210px); opacity: .78; }
  .fx-bolt--r, .fx-bolt--vr { width: clamp(110px, 30vw, 190px); }
}

/* Respect reduced-motion: keep a soft static glow, no flashing */
@media (prefers-reduced-motion: reduce) {
  .fx-bolt { animation: none !important; opacity: .7;
             filter: drop-shadow(0 0 10px rgba(255,190,70,.4)); }
}

/* ==========================================================================
   Load-screen lightning + header logo charge
   ========================================================================== */

/* --- Preloader lightning — two corner bolts, restrained --- */
#preloader .pl-bolt {
  position: absolute;
  width: clamp(160px, 30vw, 340px);
  height: auto;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  z-index: 1;
  animation: plBolt 3s ease-in-out infinite;
}
#preloader .pl-bolt--tl { top: -24px;   left: -24px;   transform: rotate(-6deg);  animation-delay: .3s;  }
#preloader .pl-bolt--br { bottom: -24px; right: -24px; transform: rotate(180deg); animation-delay: 1.7s; }
@keyframes plBolt {
  0%, 100% { opacity: 0; filter: brightness(1); }
  5%  { opacity: 1;  filter: brightness(2.6) drop-shadow(0 0 16px rgba(255,232,150,.9)); }   /* strike — crisp */
  10% { opacity: .2; filter: brightness(1); }
  15% { opacity: .85; filter: brightness(2) drop-shadow(0 0 10px rgba(255,216,112,.7)); }    /* soft trailing */
  24% { opacity: 0;  filter: brightness(1); }
}

/* Gentle full-screen flash synced with the strike (tighter, less hazy) */
#preloader .pl-flash {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0;
  background: radial-gradient(90% 60% at 50% 42%, rgba(255,236,170,.16), transparent 62%);
  animation: plFlash 3s ease-in-out infinite;
}
@keyframes plFlash {
  0%, 100% { opacity: 0; }
  5%  { opacity: .55; }
  10% { opacity: .1; }
  15% { opacity: .3; }
  24% { opacity: 0; }
}

/* Keep the loading logo + text above the bolts; give it a soft glow on each
   strike (no scale pop — kept subtle) */
#preloader .pl-logo, #preloader .pl-bar, #preloader .pl-text { position: relative; z-index: 2; }
#preloader .pl-logo {
  animation: plFadeIn 1s ease-out both;   /* appear once, then stay perfectly still */
}
@keyframes plLogoZap {
  0%, 100% { filter: drop-shadow(0 10px 30px rgba(216,169,78,.3)); }
  5%  { filter: drop-shadow(0 10px 30px rgba(216,169,78,.3)) drop-shadow(0 0 10px rgba(255,230,150,.7)) brightness(1.28); }
  15% { filter: drop-shadow(0 10px 30px rgba(216,169,78,.3)) drop-shadow(0 0 6px rgba(255,222,120,.45)) brightness(1.12); }
  24% { filter: drop-shadow(0 10px 30px rgba(216,169,78,.3)); }
}

/* --- Finale: one big bolt cracks down the centre, then a white flash, then
       the overlay fades to reveal the hero. Triggered by JS adding .pl-finale. --- */
#preloader .pl-strike {
  position: absolute; top: 50%; left: 0;
  width: clamp(480px, 72vw, 900px);
  height: auto;
  /* pushed to the left edge (its box bleeds off-screen) + vertical flip so the
     bolt cracks down from the top; radial mask fades every edge so no
     rectangular boundary of the image is ever visible */
  transform: translate(-26%, -50%) scaleY(-1) rotate(4deg);
  transform-origin: 50% 50%;
  -webkit-mask-image: radial-gradient(78% 82% at 42% 50%, #000 52%, transparent 88%);
          mask-image: radial-gradient(78% 82% at 42% 50%, #000 52%, transparent 88%);
  opacity: 0; z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
}
#preloader .pl-finale-flash {
  position: absolute; inset: 0; z-index: 3;
  pointer-events: none; opacity: 0;
  background: #fff;
}
#preloader.pl-finale .pl-strike      { animation: plStrikeBig .75s ease-out both; }
#preloader.pl-finale .pl-finale-flash { animation: plFinaleFlash .75s ease-out both; }
@keyframes plStrikeBig {
  0%   { opacity: 0;  filter: brightness(1); }
  16%  { opacity: 1;  filter: brightness(3) drop-shadow(0 0 18px rgba(255,244,190,.95)); }   /* CRACK — เปรี้ยง */
  30%  { opacity: .35; filter: brightness(1.4); }
  42%  { opacity: 1;  filter: brightness(2.6) drop-shadow(0 0 12px rgba(255,236,160,.85)); }
  64%  { opacity: .5; filter: brightness(1.5); }
  100% { opacity: 0;  filter: brightness(1); }
}
@keyframes plFinaleFlash {
  0%   { opacity: 0; }
  16%  { opacity: .92; }   /* screen-wide white crack */
  26%  { opacity: .12; }
  40%  { opacity: .45; }
  100% { opacity: 0; }
}
/* on the strike, the loading logo zooms IN to fill the screen and fades out —
   handing off to the hero logo which zooms back OUT (continuous shot) */
#preloader.pl-finale .pl-logo {
  will-change: transform, opacity;
  animation: plLogoZoom .8s cubic-bezier(.55, 0, .9, .35) forwards;
}
/* transform + opacity only → GPU-composited, no per-frame repaint (no stutter) */
@keyframes plLogoZoom {
  0%   { transform: scale(1);   opacity: 1; }
  35%  { transform: scale(1.6); opacity: 1; }
  100% { transform: scale(5.2); opacity: 0; }
}

/* --- Header logo: one soft strike when the site is revealed, then settle
       to a faint steady glow (no looping pulse) --- */
.brand img { transition: filter .3s ease; }
.brand.is-charged img {
  animation: logoStrike 1s ease-out both;
}
@keyframes logoStrike {
  0%   { filter: brightness(1) drop-shadow(0 0 0 rgba(255,222,130,0)); transform: scale(1); }
  18%  { filter: brightness(1.4) drop-shadow(0 0 12px rgba(255,224,140,.5)); transform: scale(1.03); }  /* soft hit */
  100% { filter: brightness(1) drop-shadow(0 0 4px rgba(255,210,110,.22)); transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  #preloader .pl-bolt, #preloader .pl-flash,
  #preloader .pl-strike, #preloader .pl-finale-flash { display: none; }
  #preloader .pl-logo { animation: plFadeIn 1s ease-out both; }
  .brand.is-charged img { animation: none; filter: drop-shadow(0 0 5px rgba(255,206,96,.3)); }
}

/* ==========================================================================
   Hero cinematic entrance — cool fade-in after the loading screen closes
   ========================================================================== */
.hero.hero-prep .hero-logo,
.hero.hero-prep .hero-tagline { opacity: 0; }

/* soft gold light bloom that rises behind the logo during the entrance */
.hero .hero-bloom {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none; opacity: 0;
  background: radial-gradient(50% 40% at 50% 70%, rgba(255,224,140,.10), transparent 64%);
  mix-blend-mode: screen;
}

/* ~1s beat after the reveal, then a smooth (no-bounce) zoom-out */
.hero.hero-in .hero-logo    { will-change: transform, opacity; animation: heroLogoIn 1.05s cubic-bezier(.33, 0, .2, 1) 1s both; }
.hero.hero-in .hero-bloom   { animation: heroBloom  1.5s ease-out 1s both; }
.hero.hero-in .hero-tagline { animation: heroTagIn  .8s  cubic-bezier(.33, 0, .2, 1) 1.55s both; }

/* hero logo ZOOMS OUT from big → normal, continuing the loading-logo zoom-in.
   transform + opacity only → GPU-composited, no repaint stutter */
@keyframes heroLogoIn {
  0%   { opacity: 0; transform: scale(2.8); }
  30%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes heroTagIn {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: none; }
}
@keyframes heroBloom {
  0%   { opacity: 0; transform: scale(.96); }
  38%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
  .hero.hero-prep .hero-logo,
  .hero.hero-prep .hero-tagline { opacity: 1; }
  .hero .hero-bloom { display: none; }
  .hero.hero-in .hero-logo,
  .hero.hero-in .hero-tagline { animation: none; }
}

/* smoother scroll: promote parallax layers */
.hero-content { will-change: transform, opacity; }

/* ==========================================================================
   Neon power-on (ปิ้ง ๆ) — logo + floating side buttons flicker on after reveal
   (nav intentionally excluded)
   ========================================================================== */
/* armed = hidden until lit (JS adds .header-arm only when a preloader exists,
   so no-JS visitors always see everything) */
body.header-arm .brand img,
body.header-arm .side-badge { opacity: 0; }

/* mist puff that rolls in first, then the logo lights up through it */
.brand { position: relative; }
.brand img, .brand-name { position: relative; z-index: 1; }
.brand::before {
  content: "";
  position: absolute;
  left: -34px; top: 50%;
  width: 180px; height: 96px;
  transform: translateY(-50%);
  background: radial-gradient(closest-side,
              rgba(226,206,168,.55), rgba(226,206,168,.12) 55%, rgba(226,206,168,0) 76%);
  filter: blur(9px);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}
body.header-lit .brand::before { animation: brandMist 1.5s ease-out both; }
@keyframes brandMist {
  0%   { opacity: 0;   transform: translate(-14%, -50%) scale(.55); }
  28%  { opacity: .85; transform: translate(-4%, -52%) scale(1); }
  60%  { opacity: .5;  }
  100% { opacity: 0;   transform: translate(12%, -58%) scale(1.7); }
}

body.header-lit .brand img { animation: neonOnLogo 1s both .4s; }   /* emerge after the mist */
/* side buttons: simple soft fade-in (no flicker) */
body.header-lit .side-badge { animation: fadeInSoft .6s ease both; }
body.header-lit .side-badge:nth-child(1) { animation-delay: .35s; }
body.header-lit .side-badge:nth-child(2) { animation-delay: .5s; }

@keyframes fadeInSoft {
  from { opacity: 0; transform: scale(.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* neon flicker for the logo — bright gold zaps on the "on" beats */
@keyframes neonOnLogo {
  0%   { opacity: 0;  filter: none; }
  8%   { opacity: .9; filter: drop-shadow(0 0 12px rgba(255,232,155,.9)) brightness(1.35); }
  10%  { opacity: .15; filter: none; }
  15%  { opacity: 1;  filter: drop-shadow(0 0 14px rgba(255,234,160,.95)) brightness(1.45); }
  18%  { opacity: .3; filter: none; }
  23%  { opacity: 1;  filter: drop-shadow(0 0 8px rgba(255,224,130,.6)) brightness(1.18); }
  30%  { opacity: .6; filter: none; }
  38%  { opacity: 1;  filter: drop-shadow(0 0 6px rgba(255,216,112,.4)); }
  100% { opacity: 1;  filter: drop-shadow(0 0 4px rgba(255,210,110,.22)); }
}
/* neon flicker for text — quick blinks + a warm glow */
@keyframes neonOnText {
  0%   { opacity: 0; }
  8%   { opacity: .9; text-shadow: 0 0 8px rgba(255,228,145,.85); }
  10%  { opacity: .15; text-shadow: none; }
  15%  { opacity: 1;  text-shadow: 0 0 10px rgba(255,228,145,.9); }
  18%  { opacity: .3; text-shadow: none; }
  23%  { opacity: 1;  text-shadow: 0 0 6px rgba(255,220,120,.5); }
  30%  { opacity: .55; text-shadow: none; }
  40%  { opacity: 1; }
  100% { opacity: 1; text-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.header-arm .brand img,
  body.header-arm .side-badge { opacity: 1; }
  body.header-lit .brand img,
  body.header-lit .side-badge { animation: none; opacity: 1; }
  .brand::before { animation: none !important; opacity: 0; }
}

/* hide the overlapping character on narrow screens */
@media (max-width: 960px) { .community-char { display: none; } }

/* ---- Bracket flanking characters + trophy (floating motion) ---- */
.brk-char {
  position: absolute; z-index: 2;
  height: auto; display: block; pointer-events: none;
  will-change: transform;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,.55));
}
.brk-mage    { left: 0;
    top: 38%;
    width: clamp(250px, 28vw, 470px);
    animation: brkFloatA 6s ease-in-out infinite;
    filter: drop-shadow(-20px -5px 18px black); }
.brk-fighter { right: clamp(-90px,-3vw,-16px); bottom: -15%;  width: clamp(260px,29vw,450px); animation: brkFloatB 6.4s ease-in-out .2s infinite; }
.brk-archer  { right: 6px;  top: 6%; width: clamp(230px,25vw,390px); animation: brkFloatA 7s ease-in-out .6s infinite; }
.brk-trophy  { left: 14px;  top: 8%; width: clamp(450px,30vw,450px);
  animation: brkFloatB 5.5s ease-in-out .4s infinite;
  filter: brightness(1.12) drop-shadow(0 0 18px rgba(255,232,150,.6)) drop-shadow(0 14px 26px rgba(0,0,0,.55));
}
@keyframes brkFloatA { 0%,100% { transform: translateY(0); }   50% { transform: translateY(-16px); } }
@keyframes brkFloatB { 0%,100% { transform: translateY(0); }   50% { transform: translateY(-22px); } }
@media (max-width: 1180px) { .brk-char { display: none; } }
@media (prefers-reduced-motion: reduce) { .brk-char { animation: none !important; } }

/* ---------------------------------- Prize Details (#prize) ---------------------------------- */
/* V-shaped seam: the timeline above is clipped into a "V" (see .timeline-section in style.css)
   and this section slides up underneath it by --seam. */
.prize-section {
    position: relative;
    z-index: 1;
    overflow: hidden;
    isolation: isolate;
    margin-top: calc(-1 * var(--seam,60px));
    padding: calc(var(--seam,60px) + 70px) 24px 110px;
    background: radial-gradient(ellipse 55% 60% at 50% 58%,rgba(120,86,30,.38),rgba(0,0,0,0) 70%),#050505;
    font-family: 'LINE Seed Sans TH','Noto Sans Thai','Noto Sans KR','Segoe UI',system-ui,sans-serif;
}
/* gold edge glowing along the V */
.pz-seam {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: var(--seam,60px);
    z-index: 5;
    pointer-events: none;
    overflow: visible;
    filter: drop-shadow(0 0 6px rgba(255,214,120,.9));
}

    .pz-seam polyline {
        fill: none;
        stroke: url(#pzSeamGrad);
        stroke-width: 2;
        vector-effect: non-scaling-stroke;
    }

/* gold wedges at both sides (flash with the lightning) */
.pz-wedge {
    position: absolute;
    top: 0;
    width: clamp(120px,16vw,300px);
    height: 78%;
    z-index: 0;
    pointer-events: none;
    animation: pzWedge 5s linear infinite;
}

    .pz-wedge.l {
        left: 0;
        clip-path: polygon(0 0,100% 0,0 100%);
        background: linear-gradient(160deg,rgba(214,166,80,.55),rgba(120,84,30,.15) 55%,rgba(0,0,0,0) 80%);
    }

    .pz-wedge.r {
        right: 0;
        clip-path: polygon(0 0,100% 0,100% 100%);
        animation-delay: -2.5s;
        background: linear-gradient(200deg,rgba(214,166,80,.55),rgba(120,84,30,.15) 55%,rgba(0,0,0,0) 80%);
    }
/* background light flashes (แสงวาบ) — lightning-style double flash + slow warm pulse */
.pz-flash {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: screen;
}

    .pz-flash.a {
        background: radial-gradient(ellipse 45% 55% at 22% 18%,rgba(255,226,150,.55),rgba(255,200,90,0) 70%);
        animation: pzFlash 5s linear infinite;
    }

    .pz-flash.b {
        background: radial-gradient(ellipse 45% 55% at 80% 30%,rgba(255,236,180,.45),rgba(255,200,90,0) 70%);
        animation: pzFlash 5s linear 2.5s infinite;
    }

    .pz-flash.c {
        background: radial-gradient(ellipse 60% 50% at 50% 62%,rgba(255,210,120,.28),rgba(255,200,90,0) 70%);
        animation: pzWarm 3.2s ease-in-out infinite;
    }

.pz-bolt {
    position: absolute;
    left: 2%;
    top: calc(var(--seam,60px) - 20px);
    width: clamp(300px,36vw,620px);
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: .85;
    animation: pzBolt 5s linear infinite;
}

.pz-char {
    position: absolute;
    bottom: 0;
    z-index: 2;
    pointer-events: none;
    height: auto;
    filter: drop-shadow(0 14px 30px rgba(0,0,0,.7));
}

.pz-knight {
    left: max(-80px,calc(50% - 1000px));
    width: clamp(380px,40vw,780px);
}

.pz-paladin {
    right: max(-70px,calc(50% - 980px));
    width: clamp(350px,37vw,720px);
}

.pz-dust {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

    .pz-dust i {
        position: absolute;
        bottom: -8px;
        width: 4px;
        height: 4px;
        border-radius: 50%;
        opacity: 0;
        background: radial-gradient(closest-side,#fff6d6,rgba(255,200,90,0) 80%);
        filter: drop-shadow(0 0 5px rgba(255,200,90,.95));
        animation: pzDust 8s linear infinite;
    }

.pz-inner {
    position: relative;
    z-index: 4;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.pz-title {
    margin: 0;
    font-family: 'Chonburi','Noto Sans Thai','Noto Sans KR','Noto Sans SC','Noto Sans TC',serif;
    font-weight: 400;
    line-height: 1.12;
    color: #fbefcf;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.7)) drop-shadow(0 0 18px rgba(255,214,120,.2));
}

    .pz-title small {
        display: block;
        font-size: clamp(24px,2.6vw,38px);
        letter-spacing: .02em;
    }

    .pz-title span {
        display: block;
        font-size: clamp(38px,4.4vw,66px);
        background: linear-gradient(177deg,#fffaf0 0%,#fbecc4 50%,#e6c27a 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.pz-divider {
    position: relative;
    height: 14px;
    margin: 16px auto 26px;
    max-width: 520px;
}

    .pz-divider::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        height: 1px;
        background: linear-gradient(90deg,transparent,rgba(242,215,154,.9) 30%,#fff3cf 50%,rgba(242,215,154,.9) 70%,transparent);
    }

    .pz-divider::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 8px;
        height: 8px;
        transform: translate(-50%,-50%) rotate(45deg);
        background: #f2d79a;
        box-shadow: 0 0 10px rgba(242,215,154,.9);
    }

/* ===== prize cards + effects (positions are % of the cards image) ===== */
.pz-cards {
    position: relative;
    width: min(100%,880px);
    margin: 0 auto;
}

    .pz-cards img {
        position: relative;
        display: block;
        width: 100%;
        height: auto;
        transition: transform .4s ease,filter .4s ease;
    }

    .pz-cards:hover img {
        transform: scale(1.025);
        filter: brightness(1.08);
    }
    /* warm glow behind the 1st-place card */
    .pz-cards::before {
        content: "";
        position: absolute;
        left: 50%;
        top: 40%;
        width: 80%;
        aspect-ratio: 1;
        filter: blur(18px);
        transform: translate(-50%,-50%);
        border-radius: 50%;
        background: radial-gradient(closest-side,rgba(255,232,165,.5),rgba(255,210,110,.18) 45%,rgba(255,200,90,0) 80%);
        animation: pzGlow 3s ease-in-out infinite;
    }
/* rotating god-rays behind the trophy */
.pz-rays {
    position: absolute;
    left: 50%;
    top: 32%;
    width: 95%;
    aspect-ratio: 1;
    pointer-events: none;
    transform: translate(-50%,-50%);
    border-radius: 50%;
    mix-blend-mode: screen;
    opacity: .5;
    filter: blur(6px);
    background: repeating-conic-gradient(from 0deg,rgba(255,226,150,0) 0deg,rgba(255,226,150,.32) 5deg,rgba(255,226,150,0) 10deg 20deg);
    -webkit-mask: radial-gradient(closest-side,#000 8%,rgba(0,0,0,.6) 35%,transparent 72%);
    mask: radial-gradient(closest-side,#000 8%,rgba(0,0,0,.6) 35%,transparent 72%);
    animation: pzSpin 40s linear infinite;
}
/* expanding gold rings from the trophy */
.pz-ring {
    position: absolute;
    left: 50%;
    top: 30%;
    width: 22%;
    aspect-ratio: 1;
    pointer-events: none;
    border-radius: 50%;
    border: 2px solid rgba(255,226,150,.45);
    box-shadow: 0 0 24px 6px rgba(255,214,120,.35),inset 0 0 24px 6px rgba(255,214,120,.25);
    filter: blur(2px);
    transform: translate(-50%,-50%) scale(.5);
    opacity: 0;
    animation: pzRing 4.5s ease-out infinite;
}
/* shine sweep across the cards (masked to the card shapes) */
.pz-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    -webkit-mask: var(--pz-mask) center/100% 100% no-repeat;
    mask: var(--pz-mask) center/100% 100% no-repeat;
    background: linear-gradient(110deg,transparent 30%,rgba(255,250,225,.22) 42%,rgba(255,250,225,.45) 50%,rgba(255,250,225,.22) 58%,transparent 70%) -150% 0/250% 100% no-repeat;
    animation: pzShine 6s ease-in-out 2s infinite;
}
/* 4-point twinkling sparkles on the card frames + trophy */
.pz-spark {
    position: absolute;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    background: radial-gradient(closest-side,#fff 0%,rgba(255,240,180,.85) 36%,rgba(255,220,120,0) 78%);
    box-shadow: 0 0 18px 8px rgba(255,226,150,.35);
    filter: blur(.6px);
    animation: pzTwinkle 3.6s ease-in-out infinite;
}

    .pz-spark::before, .pz-spark::after {
        content: "";
        position: absolute;
        filter: blur(2px);
    }

    .pz-spark::before {
        left: 50%;
        top: -14px;
        width: 3px;
        height: calc(100% + 28px);
        transform: translateX(-50%);
        background: linear-gradient(180deg,rgba(255,255,255,0),#fff 50%,rgba(255,255,255,0));
    }

    .pz-spark::after {
        top: 50%;
        left: -14px;
        height: 3px;
        width: calc(100% + 28px);
        transform: translateY(-50%);
        background: linear-gradient(90deg,rgba(255,255,255,0),#fff 50%,rgba(255,255,255,0));
    }

    .pz-spark.s1 {
        left: 50%;
        top: 12%;
        animation-delay: 0s;
        width: 26px;
        height: 26px;
        margin: -13px 0 0 -13px;
    }

    .pz-spark.s2 {
        left: 36%;
        top: 22%;
        animation-delay: .6s;
    }

    .pz-spark.s3 {
        left: 65%;
        top: 24%;
        animation-delay: 1.2s;
    }

    .pz-spark.s4 {
        left: 8%;
        top: 30%;
        animation-delay: .3s;
    }
/* entrance burst of light when the cards appear */
.pz-burst {
    position: absolute;
    left: 50%;
    top: 45%;
    width: 120%;
    aspect-ratio: 1;
    pointer-events: none;
    border-radius: 50%;
    transform: translate(-50%,-50%) scale(.2);
    opacity: 0;
    mix-blend-mode: screen;
    background: radial-gradient(closest-side,rgba(255,250,230,.6),rgba(255,214,120,.25) 35%,rgba(255,200,90,0) 70%);
}

.prize-section.pz-in .pz-burst {
    animation: pzBurst 1.3s ease-out .55s both;
}

/* reveal */
.prize-section.pz-js .pz-rv {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .8s ease,transform .9s cubic-bezier(.22,.7,.25,1);
}

.prize-section.pz-js.pz-in .pz-rv {
    opacity: 1;
    transform: none;
}

.prize-section.pz-js.pz-in .pz-divider {
    transition-delay: .15s;
}

.prize-section.pz-js .pz-cards.pz-rv {
    transform: none;
    transition: none;
}

.prize-section.pz-js.pz-in .pz-cards {
    animation: pzPop 1.1s cubic-bezier(.2,.9,.3,1.25) .4s both;
}

.prize-section.pz-js .pz-knight {
    opacity: 0;
    transform: translateX(-140px);
}

.prize-section.pz-js .pz-paladin {
    opacity: 0;
    transform: translateX(140px);
}

.prize-section.pz-js.pz-in .pz-knight {
    animation: pzInL 1s cubic-bezier(.22,.7,.25,1) .2s both,pzFloat 6.5s ease-in-out 1.2s infinite;
}

.prize-section.pz-js.pz-in .pz-paladin {
    animation: pzInR 1s cubic-bezier(.22,.7,.25,1) .35s both,pzFloat 7s ease-in-out 1.4s infinite;
}

@keyframes pzWedge {
    0%,100% {
        opacity: .55;
    }

    3% {
        opacity: 1;
        filter: brightness(1.6);
    }

    6% {
        opacity: .6;
        filter: none;
    }

    9% {
        opacity: .95;
    }

    14% {
        opacity: .55;
    }
}

@keyframes pzFlash {
    0%,100% {
        opacity: 0;
    }

    2% {
        opacity: 1;
    }

    5% {
        opacity: .15;
    }

    8% {
        opacity: .85;
    }

    16% {
        opacity: 0;
    }
}

@keyframes pzWarm {
    0%,100% {
        opacity: .45;
    }

    50% {
        opacity: 1;
    }
}

@keyframes pzBolt {
    0%,100% {
        opacity: .7;
    }

    2% {
        opacity: 1;
        filter: brightness(1.7);
    }

    5% {
        opacity: .3;
        filter: none;
    }

    8% {
        opacity: 1;
        filter: brightness(1.4);
    }

    14% {
        opacity: .75;
        filter: none;
    }

    60% {
        opacity: .8;
    }

    62% {
        opacity: .35;
    }

    64% {
        opacity: .95;
    }
}

@keyframes pzDust {
    0% {
        opacity: 0;
        transform: translateY(0) scale(.6);
    }

    15% {
        opacity: 1;
    }

    80% {
        opacity: .5;
    }

    100% {
        opacity: 0;
        transform: translate(var(--dx,15px),-600px) scale(1);
    }
}

@keyframes pzGlow {
    0%,100% {
        opacity: .55;
        transform: translate(-50%,-50%) scale(.92);
    }

    50% {
        opacity: 1;
        transform: translate(-50%,-50%) scale(1.12);
    }
}

@keyframes pzSpin {
    to {
        transform: translate(-50%,-50%) rotate(360deg);
    }
}

@keyframes pzRing {
    0% {
        opacity: 0;
        transform: translate(-50%,-50%) scale(.6);
    }

    20% {
        opacity: .6;
    }

    70%,100% {
        opacity: 0;
        transform: translate(-50%,-50%) scale(2.2);
    }
}

@keyframes pzShine {
    0% {
        background-position: -150% 0;
    }

    40%,100% {
        background-position: 250% 0;
    }
}

@keyframes pzTwinkle {
    0%,100% {
        opacity: 0;
        transform: scale(.3) rotate(0deg);
    }

    45%,55% {
        opacity: 1;
    }

    50% {
        transform: scale(1) rotate(45deg);
    }
}

@keyframes pzBurst {
    0% {
        opacity: 0;
        transform: translate(-50%,-50%) scale(.2);
    }

    25% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%,-50%) scale(1.15);
    }
}

@keyframes pzPop {
    0% {
        opacity: 0;
        transform: scale(.6) translateY(30px);
    }

    60% {
        opacity: 1;
        transform: scale(1.04);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

@keyframes pzInL {
    from {
        opacity: 0;
        transform: translateX(-140px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pzInR {
    from {
        opacity: 0;
        transform: translateX(140px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pzFloat {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@media (max-width:1100px) {
    .pz-knight {
        width: clamp(260px,36vw,400px);
        left: -80px;
        opacity: .6;
    }

    .pz-paladin {
        width: clamp(240px,33vw,370px);
        right: -70px;
        opacity: .6;
    }
}

@media (max-width:760px) {
    .prize-section {
        padding: calc(var(--seam,60px) + 44px) 14px 80px;
    }

    .pz-char {
        display: none;
    }

    .pz-bolt {
        width: 300px;
    }
}

@media (prefers-reduced-motion:reduce) {
    .prize-section *, .prize-section *::before, .prize-section *::after {
        animation: none !important;
        transition: none !important;
    }

    .prize-section.pz-js .pz-rv, .prize-section.pz-js .pz-char, .prize-section.pz-js .pz-cards {
        opacity: 1;
        transform: none;
    }

    .pz-dust, .pz-flash.a, .pz-flash.b, .pz-spark, .pz-ring, .pz-burst {
        display: none;
    }
}

/* ---------------------------------- About ROS (#about) ---------------------------------- */
.about-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #0b0b0d;
    aspect-ratio: 16/9;
    min-height: 620px;
    max-height: 1080px;
    display: flex;
    align-items: center;
    font-family: 'LINE Seed Sans TH','Noto Sans Thai','Noto Sans KR','Segoe UI',system-ui,sans-serif;
}
/* background: dark castle, slow Ken-Burns drift */
.ab-bg {
    position: absolute;
    inset: -4%;
    z-index: 0;
    background: url('../images/common/bg1.png') center/cover no-repeat;
    opacity: .62;
    animation: abDrift 26s ease-in-out infinite alternate;
    will-change: transform;
}

.about-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(90deg,rgba(8,8,10,.92) 0%,rgba(8,8,10,.55) 38%,rgba(8,8,10,0) 62%), linear-gradient(180deg,rgba(8,8,10,.55) 0%,rgba(8,8,10,0) 18%,rgba(8,8,10,0) 80%,rgba(8,8,10,.8) 100%);
}

/* character art layer: always 16:9, anchored bottom-right, so FX % positions stay on the art */
.ab-art {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 100%;
    aspect-ratio: 16/9;
    z-index: 2;
    pointer-events: none;
}

.ab-art-inner {
    position: absolute;
    inset: 0;
    will-change: transform;
    transition: transform .5s cubic-bezier(.2,.7,.3,1);
}

.ab-chars {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 18px 40px rgba(0,0,0,.6));
}

.ab-fx {
    position: absolute;
    display: block;
    border-radius: 50%;
    mix-blend-mode: screen;
    pointer-events: none;
}
/* red magic circle in the healer's hand */
.ab-circle {
    left: 54%;
    top: 37.5%;
    width: 11%;
    aspect-ratio: 1;
    transform: translate(-50%,-50%);
    background: radial-gradient(closest-side,rgba(255,90,70,.75),rgba(255,40,40,.25) 55%,rgba(255,0,0,0) 75%);
    animation: abPulse 2.4s ease-in-out infinite;
}

.ab-ring {
    left: 54%;
    top: 37.5%;
    width: 9%;
    aspect-ratio: 1;
    transform: translate(-50%,-50%) scale(.6);
    border: 2px solid rgba(255,120,100,.85);
    box-shadow: 0 0 18px rgba(255,60,60,.9),inset 0 0 12px rgba(255,60,60,.6);
    opacity: 0;
    animation: abRing 2.4s ease-out infinite;
}
/* purple aura around the fighter's fist */
.ab-aura {
    left: 60%;
    top: 64%;
    width: 22%;
    aspect-ratio: 1;
    transform: translate(-50%,-50%);
    filter: blur(6px);
    background: radial-gradient(closest-side,rgba(190,110,255,.55),rgba(140,60,255,.2) 55%,rgba(140,60,255,0) 75%);
    animation: abAura 3s ease-in-out infinite;
}
/* gold glint on the paladin shield */
.ab-glint {
    left: 80%;
    top: 33%;
    width: 14%;
    aspect-ratio: 1;
    transform: translate(-50%,-50%);
    background: radial-gradient(closest-side,rgba(255,236,170,.55),rgba(255,214,120,0) 70%);
    animation: abFlash 3.6s ease-in-out 1s infinite;
}
/* rising embers */
.ab-embers {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

    .ab-embers i {
        position: absolute;
        bottom: -10px;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        opacity: 0;
        background: radial-gradient(closest-side,#fff3c8,rgba(255,170,70,0) 80%);
        filter: drop-shadow(0 0 6px rgba(255,170,70,.95));
        animation: abEmber 7s linear infinite;
    }

        .ab-embers i.v {
            background: radial-gradient(closest-side,#f3e6ff,rgba(170,110,255,0) 80%);
            filter: drop-shadow(0 0 6px rgba(170,110,255,.95));
        }

/* text column */
.ab-content {
    position: relative;
    z-index: 4;
    width: min(46%,600px);
    margin-left: max(24px,calc((100% - var(--max-w,1220px))/2));
    padding: 40px 0;
    text-align: center;
    color: #f4efe3;
}

.ab-logo-wrap {
    position: relative;
    width: min(100%,440px);
    margin: 0 auto;
}

.ab-logo {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,.6));
}

.ab-logo-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    -webkit-mask: url('../images/common/ROS2026_logo2.png') center/contain no-repeat;
    mask: url('../images/common/ROS2026_logo2.png') center/contain no-repeat;
    background: linear-gradient(110deg,transparent 35%,rgba(255,250,225,.85) 50%,transparent 65%) -150% 0/250% 100% no-repeat;
    mix-blend-mode: screen;
    animation: abShine 4.5s ease-in-out 1.6s infinite;
}

.ab-title {
    margin: 4px 0 14px;
    font-family: 'Chonburi','Noto Sans Thai',serif;
    font-weight: 400;
    font-size: clamp(30px,3.2vw,46px);
    line-height: 1.2;
    letter-spacing: .02em;
    background: linear-gradient(177deg,#fffaf0 0%,#fbecc4 45%,#e6c27a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)) drop-shadow(0 0 18px rgba(255,214,120,.18));
}

.ab-divider {
    position: relative;
    height: 14px;
    margin: 0 auto 22px;
    width: 100%;
    max-width: 560px;
}

    .ab-divider::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        height: 1px;
        transform-origin: center;
        background: linear-gradient(90deg,transparent,rgba(242,215,154,.9) 30%,#fff3cf 50%,rgba(242,215,154,.9) 70%,transparent);
    }

    .ab-divider::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 9px;
        height: 9px;
        transform: translate(-50%,-50%) rotate(45deg);
        border: 1.5px solid #f2d79a;
        background: #1a1510;
        box-shadow: 0 0 10px rgba(242,215,154,.8);
    }

.ab-desc {
    max-width: 470px;
    margin: 0 auto 30px;
    font-size: clamp(14px,1.05vw,16px);
    line-height: 1.75;
    color: #f4efe3;
    text-shadow: 0 1px 3px rgba(0,0,0,.8);
}

/* button: dark plate with gold hex ends + shimmer sweep */
.ab-btn {
    position: relative;
    display: inline-block;
    padding: 2px;
    text-decoration: none;
    clip-path: polygon(16px 0,calc(100% - 16px) 0,100% 50%,calc(100% - 16px) 100%,16px 100%,0 50%);
    background: linear-gradient(180deg,#fbe7a8,#c99536 55%,#8c5d1c);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,.55));
    transition: transform .25s ease,filter .25s ease;
}

    .ab-btn span {
        position: relative;
        display: block;
        min-width: 150px;
        padding: 11px 42px 12px;
        overflow: hidden;
        clip-path: inherit;
        background: linear-gradient(180deg,#6b4520 0%,#3e2510 60%,#2c190a 100%);
        color: #fdf0cf;
        font-weight: 700;
        font-size: 16px;
        letter-spacing: .04em;
        text-shadow: 0 1px 2px rgba(0,0,0,.7);
    }

        .ab-btn span::after {
            content: "";
            position: absolute;
            top: 0;
            bottom: 0;
            left: -60%;
            width: 40%;
            background: linear-gradient(100deg,transparent,rgba(255,240,200,.45),transparent);
            transform: skewX(-20deg);
            animation: abSweep 3.2s ease-in-out 2s infinite;
        }

    .ab-btn:hover {
        transform: translateY(-2px);
        filter: drop-shadow(0 6px 16px rgba(0,0,0,.6)) drop-shadow(0 0 14px rgba(242,200,110,.55));
    }

    .ab-btn:focus-visible {
        outline: 2px solid #f2d79a;
        outline-offset: 4px;
    }

/* scroll-in reveal (progressive: everything visible if JS is off) */
.about-section.ab-js .ab-rv {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s ease,transform .9s cubic-bezier(.22,.7,.25,1);
}

.about-section.ab-js.ab-in .ab-rv {
    opacity: 1;
    transform: none;
}

    .about-section.ab-js.ab-in .ab-rv:nth-child(2) {
        transition-delay: .15s;
    }

    .about-section.ab-js.ab-in .ab-rv:nth-child(3) {
        transition-delay: .3s;
    }

    .about-section.ab-js.ab-in .ab-rv:nth-child(4) {
        transition-delay: .42s;
    }

    .about-section.ab-js.ab-in .ab-rv:nth-child(5) {
        transition-delay: .55s;
    }

.about-section.ab-js .ab-divider::before {
    transform: scaleX(0);
    transition: transform 1.1s cubic-bezier(.22,.7,.25,1) .45s;
}

.about-section.ab-js.ab-in .ab-divider::before {
    transform: scaleX(1);
}

.about-section.ab-js .ab-art {
    opacity: 0;
    transform: translateX(12%);
    transition: opacity 1.1s ease .1s,transform 1.3s cubic-bezier(.22,.7,.25,1) .1s;
}

.about-section.ab-js.ab-in .ab-art {
    opacity: 1;
    transform: none;
}

.about-section.ab-in .ab-chars {
    animation: abFloat 7s ease-in-out 1.4s infinite;
}

@keyframes abDrift {
    from {
        transform: scale(1) translate(0,0);
    }

    to {
        transform: scale(1.08) translate(-1.5%,-1%);
    }
}

@keyframes abPulse {
    0%,100% {
        opacity: .55;
        transform: translate(-50%,-50%) scale(.92);
    }

    50% {
        opacity: 1;
        transform: translate(-50%,-50%) scale(1.12);
    }
}

@keyframes abRing {
    0% {
        opacity: 0;
        transform: translate(-50%,-50%) scale(.6);
    }

    25% {
        opacity: .9;
    }

    100% {
        opacity: 0;
        transform: translate(-50%,-50%) scale(1.7);
    }
}

@keyframes abAura {
    0%,100% {
        opacity: .45;
        transform: translate(-50%,-50%) scale(.95);
    }

    50% {
        opacity: .9;
        transform: translate(-50%,-50%) scale(1.1);
    }
}

@keyframes abFlash {
    0%,70%,100% {
        opacity: 0;
    }

    82% {
        opacity: .9;
    }
}

@keyframes abEmber {
    0% {
        opacity: 0;
        transform: translate(0,0) scale(.6);
    }

    12% {
        opacity: 1;
    }

    80% {
        opacity: .6;
    }

    100% {
        opacity: 0;
        transform: translate(var(--dx,20px),-82vh) scale(1);
    }
}

@keyframes abShine {
    0% {
        background-position: -150% 0;
    }

    45%,100% {
        background-position: 250% 0;
    }
}

@keyframes abSweep {
    0% {
        left: -60%;
    }

    40%,100% {
        left: 130%;
    }
}

@keyframes abFloat {
    0%,100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* tablet / mobile: text on top, character art below (cropped to the right half of the art) */
@media (max-width:900px) {
    .about-section {
        aspect-ratio: auto;
        min-height: 0;
        max-height: none;
        flex-direction: column;
        align-items: stretch;
    }

        .about-section::before {
            background: linear-gradient(180deg,rgba(8,8,10,.85) 0%,rgba(8,8,10,.5) 45%,rgba(8,8,10,.1) 70%,rgba(8,8,10,.85) 100%);
        }

    .ab-content {
        width: auto;
        margin: 0;
        padding: 24px 20px 64px;
    }

    .ab-logo-wrap {
        width: min(78%,340px);
    }

    .ab-art {
        position: relative;
        right: auto;
        bottom: auto;
        height: auto;
        width: 190%;
        margin-left: -90%;
        margin-top: 56px;
    }
}

@media (prefers-reduced-motion:reduce) {
    .about-section *, .about-section *::before, .about-section *::after {
        animation: none !important;
        transition: none !important;
    }

    .about-section.ab-js .ab-rv, .about-section.ab-js .ab-art {
        opacity: 1;
        transform: none;
    }

    .about-section.ab-js .ab-divider::before {
        transform: none;
    }

    .ab-embers {
        display: none;
    }
}

/* ---------------------------------- Participating Teams (#teams) ---------------------------------- */
.teams-section {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 110px 24px 120px;
    background: #0a0a0a url('../images/common/Frame619.png') center/cover no-repeat;
    font-family: 'LINE Seed Sans TH','Noto Sans Thai','Noto Sans KR','Segoe UI',system-ui,sans-serif;
}

    .teams-section::before {
        content: "";
        position: absolute;
        left: 50%;
        top: 38%;
        width: min(900px,90vw);
        aspect-ratio: 1.6;
        z-index: 0;
        transform: translate(-50%,-50%);
        border-radius: 50%;
        pointer-events: none;
        mix-blend-mode: screen;
        background: radial-gradient(closest-side,rgba(255,236,170,.22),rgba(255,236,170,0) 70%);
        animation: tmGlow 5s ease-in-out infinite;
    }

.tm-dust {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

    .tm-dust i {
        position: absolute;
        width: 3px;
        height: 3px;
        border-radius: 50%;
        opacity: 0;
        background: #fff6dc;
        box-shadow: 0 0 6px 1px rgba(255,236,170,.8);
        animation: tmDust 9s ease-in-out infinite;
    }
/* generated particles (see script): embers rise, bokeh drifts, stars twinkle; .tm-front sits above the banners */
.tm-front {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.tm-p {
    position: absolute;
    display: block;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    will-change: transform,opacity;
}

    .tm-p.ember {
        width: var(--s);
        height: var(--s);
        background: radial-gradient(closest-side,#fff8e0,rgba(255,200,100,.9) 45%,rgba(255,170,60,0) 80%);
        box-shadow: 0 0 8px 2px rgba(255,200,110,.55);
        animation: tmEmber var(--d) linear var(--dl) infinite;
    }

    .tm-p.bokeh {
        width: var(--s);
        height: var(--s);
        filter: blur(3px);
        mix-blend-mode: screen;
        background: radial-gradient(closest-side,rgba(var(--c),.55),rgba(var(--c),.18) 60%,rgba(var(--c),0) 100%);
        animation: tmBokeh var(--d) ease-in-out var(--dl) infinite;
    }

    .tm-p.star {
        width: var(--s);
        height: var(--s);
        background: radial-gradient(closest-side,#fff,rgba(255,240,190,.8) 40%,rgba(255,220,130,0) 80%);
        box-shadow: 0 0 10px 3px rgba(255,230,160,.35);
        animation: tmStar var(--d) ease-in-out var(--dl) infinite;
    }

        .tm-p.star::before, .tm-p.star::after {
            content: "";
            position: absolute;
            left: 50%;
            top: 50%;
            filter: blur(1px);
            background: linear-gradient(var(--a,180deg),rgba(255,255,255,0),#fff 50%,rgba(255,255,255,0));
        }

        .tm-p.star::before {
            width: 2px;
            height: calc(var(--s) * 3.4);
            transform: translate(-50%,-50%);
        }

        .tm-p.star::after {
            height: 2px;
            width: calc(var(--s) * 3.4);
            transform: translate(-50%,-50%);
            --a: 90deg;
        }

    .tm-p.mote {
        width: var(--s);
        height: var(--s);
        background: rgba(var(--c),.95);
        box-shadow: 0 0 10px 3px rgba(var(--c),.6);
        animation: tmMote var(--d) ease-in-out var(--dl) infinite;
    }

.tm-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}

.tm-title {
    margin: 0;
    font-family: 'Chonburi','Noto Sans Thai','Noto Sans KR','Noto Sans SC','Noto Sans TC',serif;
    font-weight: 400;
    line-height: 1.15;
    color: #fbefcf;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.7)) drop-shadow(0 0 18px rgba(255,214,120,.2));
}

    .tm-title span {
        display: block;
        font-size: clamp(38px,4.6vw,70px);
        background: linear-gradient(177deg,#fffaf0 0%,#fbecc4 50%,#e6c27a 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .tm-title small {
        display: block;
        font-size: clamp(22px,2.3vw,34px);
        margin-top: 4px;
    }

.tm-divider {
    position: relative;
    height: 14px;
    margin: 18px auto 36px;
    max-width: 680px;
}

    .tm-divider::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        height: 1px;
        background: linear-gradient(90deg,transparent,rgba(242,215,154,.9) 30%,#fff3cf 50%,rgba(242,215,154,.9) 70%,transparent);
    }

    .tm-divider::after {
        content: "";
        position: absolute;
        left: 50%;
        top: 50%;
        width: 8px;
        height: 8px;
        transform: translate(-50%,-50%) rotate(45deg);
        background: #f2d79a;
        box-shadow: 0 0 10px rgba(242,215,154,.9);
    }

/* banners */
.tm-list {
    display: flex;
    justify-content: center;
    gap: clamp(10px,1.5vw,24px);
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tm-flag {
    --glow: 255,80,80;
    position: relative;
    width: clamp(150px,13.5vw,208px);
    aspect-ratio: 208/500;
    container-type: inline-size;
    transform-origin: 50% 0;
    transition: transform .35s cubic-bezier(.2,.7,.3,1),filter .35s ease;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,.55));
}

    .tm-flag.red {
        --glow: 255,70,70;
    }

    .tm-flag.brown {
        --glow: 220,150,70;
    }

    .tm-flag.green {
        --glow: 90,220,140;
    }

    .tm-flag.purple {
        --glow: 200,110,255;
    }

    .tm-flag.blue {
        --glow: 90,160,255;
    }

.tm-flag-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.tm-body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10cqw 8cqw 0;
    color: #fff;
}

.tm-org {
    height: 20cqw;
    width: auto;
    max-width: 62cqw;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: .95;
}

.tm-team {
    margin: 6cqw 0 0;
    font-family: 'Chonburi',serif;
    line-height: 1.1;
    text-shadow: 0 1px 3px rgba(0,0,0,.6);
}

    .tm-team small {
        display: block;
        font-size: 8.5cqw;
    }

    .tm-team b {
        display: block;
        font-weight: 400;
        font-size: 10cqw;
        white-space: nowrap;
    }

.tm-logo {
    width: 76cqw;
    height: 76cqw;
    margin-top: 6cqw;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.5));
    transition: transform .35s ease;
}

.tm-btn {
    margin-top: auto;
    margin-bottom: 58cqw;
    padding: 2.5cqw 7cqw;
    border-radius: 999px;
    font-size: 6.2cqw;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    background: rgba(255,255,255,.22);
    border: 1px solid rgba(255,255,255,.28);
    transition: background .25s ease;
}

    .tm-btn:hover, .tm-btn:focus-visible {
        background: rgba(255,255,255,.4);
        outline: none;
    }
/* "View Team Details" hidden for now — delete this line to show the buttons again */
.tm-btn {
    display: none !important;
}

.tm-flag:hover {
    transform: translateY(-8px);
    filter: drop-shadow(0 14px 22px rgba(0,0,0,.6)) drop-shadow(0 0 18px rgba(var(--glow),.75));
}

    .tm-flag:hover .tm-logo {
        transform: scale(1.07);
    }

/* reveal: banners unfurl downward one by one, then sway gently */
.teams-section.tm-js .tm-rv {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .8s ease,transform .9s cubic-bezier(.22,.7,.25,1);
}

.teams-section.tm-js.tm-in .tm-rv {
    opacity: 1;
    transform: none;
}

.teams-section.tm-js.tm-in .tm-divider {
    transition-delay: .15s;
}

.teams-section.tm-js .tm-flag {
    opacity: 0;
    clip-path: inset(-30% -30% 100% -30%);
}

.teams-section.tm-js.tm-in .tm-flag {
    animation: tmUnfurl 1s cubic-bezier(.22,.7,.25,1) both,tmSway 6s ease-in-out infinite;
    animation-delay: calc(.35s + var(--i) * .15s),calc(1.4s + var(--i) * .4s);
}

    .teams-section.tm-js.tm-in .tm-flag:hover {
        animation-play-state: paused;
    }

@keyframes tmUnfurl {
    from {
        opacity: 0;
        clip-path: inset(-30% -30% 100% -30%);
    }

    to {
        opacity: 1;
        clip-path: inset(-30% -30% -30% -30%);
    }
}

@keyframes tmSway {
    0%,100% {
        rotate: 0deg;
    }

    25% {
        rotate: .8deg;
    }

    75% {
        rotate: -.8deg;
    }
}

@keyframes tmGlow {
    0%,100% {
        opacity: .6;
    }

    50% {
        opacity: 1;
    }
}

@keyframes tmDust {
    0% {
        opacity: 0;
        transform: translate(0,0);
    }

    30% {
        opacity: .9;
    }

    70% {
        opacity: .6;
    }

    100% {
        opacity: 0;
        transform: translate(var(--dx,30px),-120px);
    }
}

@keyframes tmEmber {
    0% {
        opacity: 0;
        transform: translate(0,0) scale(.6);
    }

    10% {
        opacity: .95;
    }

    75% {
        opacity: .6;
    }

    100% {
        opacity: 0;
        transform: translate(var(--dx),var(--dy)) scale(1);
    }
}

@keyframes tmBokeh {
    0%,100% {
        opacity: 0;
        transform: translate(0,0) scale(.8);
    }

    30%,70% {
        opacity: .9;
    }

    50% {
        transform: translate(var(--dx),calc(var(--dy) * .5)) scale(1.1);
    }
}

@keyframes tmStar {
    0%,100% {
        opacity: 0;
        transform: scale(.3) rotate(0deg);
    }

    45%,55% {
        opacity: 1;
    }

    50% {
        transform: scale(1) rotate(45deg);
    }
}

@keyframes tmMote {
    0%,100% {
        opacity: 0;
        transform: translate(0,0);
    }

    20%,80% {
        opacity: .9;
    }

    50% {
        transform: translate(var(--dx),var(--dy));
    }
}

@media (max-width:760px) {
    .teams-section {
        padding: 72px 12px 80px;
    }

    .tm-list {
        gap: 10px;
    }

    .tm-flag {
        width: calc((100% - 20px) / 3);
        max-width: 190px;
    }
}

@media (max-width:420px) {
    .tm-flag {
        width: calc((100% - 10px) / 2);
    }
}

@media (prefers-reduced-motion:reduce) {
    .teams-section *, .teams-section::before {
        animation: none !important;
        transition: none !important;
    }

    .teams-section.tm-js .tm-rv, .teams-section.tm-js .tm-flag {
        opacity: 1;
        transform: none;
        clip-path: none;
    }

    .tm-dust, .tm-front {
        display: none;
    }
}

/* ---------------------------------- Tournament Bracket (#bracket) ---------------------------------- */
/* character entrance: fade + slide in from the sides, then settle into the float loop.
   (progressive enhancement: chars stay visible & static if JS is off) */
.bracket-section.brk-js .brk-char {
    opacity: 0;
    transition: opacity 1s ease;
}

.bracket-section.brk-js.brk-in .brk-char {
    opacity: 1;
}
/* left group slides in from the left, right group from the right; float begins after the slide */
.bracket-section.brk-js.brk-in .brk-mage {
    animation: brkSlideL .9s cubic-bezier(.22,.7,.25,1) both, brkFloatA 6s ease-in-out .9s infinite;
}

.bracket-section.brk-js.brk-in .brk-trophy {
    animation: brkSlideL 1s cubic-bezier(.22,.7,.25,1) both, brkFloatB 5.5s ease-in-out 1s infinite;
}

.bracket-section.brk-js.brk-in .brk-archer {
    animation: brkSlideR .9s cubic-bezier(.22,.7,.25,1) .12s both, brkFloatA 7s ease-in-out 1.05s infinite;
}

.bracket-section.brk-js.brk-in .brk-fighter {
    animation: brkSlideR 1s cubic-bezier(.22,.7,.25,1) .18s both, brkFloatB 6.4s ease-in-out 1.2s infinite;
}

@keyframes brkSlideL {
    from {
        transform: translateX(-135px);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes brkSlideR {
    from {
        transform: translateX(135px);
    }

    to {
        transform: translateX(0);
    }
}

/* clickable bracket image + hint */
#bracket-img {
    cursor: zoom-in;
    transition: transform .25s ease, box-shadow .25s ease;
}

    #bracket-img:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 32px rgba(0,0,0,.45);
    }

.brk-zoom-hint {
    display: block;
    text-align: center;
    margin: 14px auto 0;
    color: #f2d79a;
    font-size: 13px;
    letter-spacing: .02em;
    opacity: .85;
    font-family: 'Noto Sans Thai','LINE Seed Sans TH','Segoe UI',system-ui,sans-serif;
}

    .brk-zoom-hint svg {
        vertical-align: -3px;
        margin-right: 5px;
    }

/* popup / lightbox (element is moved to <body> by the script) */
.brklb {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8,6,4,.93);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease;
    -webkit-tap-highlight-color: transparent;
}

    .brklb.is-open {
        opacity: 1;
        visibility: visible;
    }

.brklb__scroll {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 22px;
    box-sizing: border-box;
}

.brklb__img {
    max-width: 96vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(0,0,0,.6);
    cursor: zoom-out;
    user-select: none;
    -webkit-user-drag: none;
}

.brklb__close {
    position: fixed;
    top: 14px;
    right: 16px;
    width: 44px;
    height: 44px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fdf3dd;
    font-size: 22px;
    cursor: pointer;
    border: 1.5px solid rgba(201,162,74,.7);
    z-index: 1;
}

    .brklb__close:hover {
        background: rgba(0,0,0,.85);
    }

@media (prefers-reduced-motion:reduce) {
    .brklb, .bracket-section.brk-js .brk-char {
        transition: none !important;
    }
}

/* ===== Battle FX: trophy sparkle/flash + magic spell effects (desktop only) ===== */
.brk-fx {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.bracket-section.brk-js .brk-fx {
    opacity: 0;
    transition: opacity 1.2s ease .25s;
}

.bracket-section.brk-js.brk-in .brk-fx {
    opacity: 1;
}

.brk-fx span {
    position: absolute;
    display: block;
}

/* --- magic auras behind the characters (เรืองแสงเวทรอบตัวละคร) --- */
.brk-aura {
    border-radius: 50%;
    mix-blend-mode: screen;
    filter: blur(5px);
    opacity: .5;
    animation: brkAura 3.4s ease-in-out infinite;
}

    .brk-aura.mage {
        left: -50px;
        top: 38%;
        width: 300px;
        height: 300px;
        animation-delay: 0s;
        background: radial-gradient(closest-side,rgba(120,215,255,.6),rgba(120,215,255,0) 70%);
    }

    .brk-aura.archer {
        right: -40px;
        top: 0;
        width: 260px;
        height: 260px;
        animation-delay: 1s;
        background: radial-gradient(closest-side,rgba(190,150,255,.55),rgba(190,150,255,0) 70%);
    }

    .brk-aura.fighter {
        right: -40px;
        bottom: -8%;
        width: 290px;
        height: 290px;
        animation-delay: 1.9s;
        background: radial-gradient(closest-side,rgba(255,150,120,.5),rgba(255,150,120,0) 70%);
    }

/* --- trophy bloom flash (แสงวาบเรืองรองที่ถ้วย) --- */
.brk-flash {
    left: 20px;
    top: 2%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    mix-blend-mode: screen;
    opacity: .2;
    background: radial-gradient(closest-side,rgba(255,240,180,.62),rgba(255,215,110,0) 68%);
    animation: brkFlash 3s ease-in-out infinite;
}

/* --- trophy sparkles (ประกายดาว 4 แฉก วาบๆ) --- */
.brk-spark {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    opacity: 0;
    filter: blur(.4px);
    background: radial-gradient(closest-side,#fff 0%,rgba(255,240,180,.85) 36%,rgba(255,220,120,0) 78%);
    animation: brkTwinkle 2.6s ease-in-out infinite;
}
    /* soft, glowing 4-point rays that fade out at the tips (ฟุ้ง) */
    .brk-spark::before, .brk-spark::after {
        content: "";
        position: absolute;
        filter: blur(1.5px);
    }

    .brk-spark::before {
        left: 50%;
        top: -10px;
        width: 3px;
        height: calc(100% + 20px);
        transform: translateX(-50%);
        background: linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.95) 50%,rgba(255,255,255,0));
    }

    .brk-spark::after {
        top: 50%;
        left: -10px;
        height: 3px;
        width: calc(100% + 20px);
        transform: translateY(-50%);
        background: linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.95) 50%,rgba(255,255,255,0));
    }
    /* left / trophy sparkles */
    .brk-spark.k1 {
        left: 95px;
        top: 12%;
        animation-delay: 0s;
    }

    .brk-spark.k2 {
        left: 250px;
        top: 8%;
        animation-delay: .5s;
    }

    .brk-spark.k3 {
        left: 150px;
        top: 32%;
        animation-delay: 1.0s;
    }

    .brk-spark.k4 {
        left: 300px;
        top: 22%;
        animation-delay: 1.5s;
    }

    .brk-spark.k5 {
        left: 60px;
        top: 38%;
        animation-delay: 2.0s;
    }

    .brk-spark.k6 {
        left: 210px;
        top: 18%;
        animation-delay: 1.3s;
    }
    /* right / archer + fighter sparkles */
    .brk-spark.r1 {
        right: 95px;
        top: 15%;
        animation-delay: .35s;
    }

    .brk-spark.r2 {
        right: 165px;
        top: 9%;
        animation-delay: 1.25s;
    }

    .brk-spark.r3 {
        right: 70px;
        bottom: 26%;
        animation-delay: 1.9s;
    }

    .brk-spark.r4 {
        right: 150px;
        bottom: 20%;
        animation-delay: .8s;
    }

/* --- magic spell orbs (ลูกเวท ลอยข้างตัวละคร ในโซนมืด) --- */
.brk-orb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    mix-blend-mode: screen;
    opacity: .7;
    animation: brkOrb 4s ease-in-out infinite;
}

    .brk-orb.cyan {
        background: radial-gradient(closest-side,#e6fbff,#54d6ff 52%,rgba(84,214,255,0) 72%);
        filter: drop-shadow(0 0 12px rgba(84,214,255,.95));
    }

    .brk-orb.violet {
        background: radial-gradient(closest-side,#f4ecff,#b98cff 52%,rgba(185,140,255,0) 72%);
        filter: drop-shadow(0 0 12px rgba(185,140,255,.95));
    }

    .brk-orb.o1 {
        left: 45px;
        top: 52%;
        animation-delay: 0s;
    }

    .brk-orb.o2 {
        left: 100px;
        top: 66%;
        width: 16px;
        height: 16px;
        animation-delay: 1.2s;
    }

    .brk-orb.o3 {
        right: 55px;
        top: 20%;
        animation-delay: .6s;
    }

    .brk-orb.o4 {
        right: 40px;
        bottom: 24%;
        width: 20px;
        height: 20px;
        animation-delay: 1.8s;
    }

    .brk-orb.o5 {
        right: 130px;
        top: 40%;
        width: 18px;
        height: 18px;
        animation-delay: 2.4s;
    }

    .brk-orb.o6 {
        right: 85px;
        top: 52%;
        animation-delay: 1.0s;
    }

/* --- drifting magic motes (ละอองเวทลอยขึ้น) --- */
.brk-mote {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    opacity: 0;
    mix-blend-mode: screen;
    background: radial-gradient(closest-side,#fff,rgba(180,230,255,0) 76%);
    filter: drop-shadow(0 0 5px rgba(150,220,255,.9));
    animation: brkMote 5.5s linear infinite;
}

    .brk-mote.violet {
        filter: drop-shadow(0 0 5px rgba(200,150,255,.9));
    }

    .brk-mote.p1 {
        left: 80px;
        bottom: 22%;
        animation-delay: 0s;
    }

    .brk-mote.p2 {
        left: 140px;
        bottom: 14%;
        animation-delay: 1.8s;
    }

    .brk-mote.p3 {
        left: 40px;
        bottom: 30%;
        animation-delay: 3.4s;
    }

    .brk-mote.p4 {
        right: 95px;
        bottom: 24%;
        animation-delay: .9s;
    }

    .brk-mote.p5 {
        right: 150px;
        bottom: 16%;
        animation-delay: 2.6s;
    }

    .brk-mote.p6 {
        right: 55px;
        bottom: 34%;
        animation-delay: 4.2s;
    }

@keyframes brkAura {
    0%,100% {
        opacity: .3;
        transform: scale(1);
    }

    50% {
        opacity: .7;
        transform: scale(1.12);
    }
}

@keyframes brkTwinkle {
    0%,100% {
        opacity: 0;
        transform: scale(.3);
    }

    45%,55% {
        opacity: 1;
    }

    50% {
        transform: scale(1);
    }
}

@keyframes brkFlash {
    0%,100% {
        opacity: .12;
    }

    50% {
        opacity: .5;
    }
}

@keyframes brkOrb {
    0%,100% {
        transform: translateY(0) scale(1);
        opacity: .45;
    }

    50% {
        transform: translateY(-14px) scale(1.18);
        opacity: .95;
    }
}

@keyframes brkMote {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(.5);
    }

    18% {
        opacity: .9;
    }

    70% {
        opacity: .55;
    }

    100% {
        opacity: 0;
        transform: translateY(-70px) scale(1);
    }
}

/* enlarge the right-side characters (นักธนู + นักรบ) */
.bracket-section .brk-archer {
    width: clamp(300px,30vw,500px);
}

.bracket-section .brk-fighter {
    width: clamp(330px,35vw,560px);
}

@media (max-width:1180px) {
    .brk-fx {
        display: none;
    }
}

@media (prefers-reduced-motion:reduce) {
    .brk-fx * {
        animation: none !important;
    }
}

.bracket-section .bracket-wrap {
    margin-top: 100px;
}

/* ---------------------------------- Tournament Timeline (#timeline) ---------------------------------- */
/* (was inline style="" attributes in index.html) */
.tl-wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 8px 10px 24px;
    position: relative;
    font-family: 'Noto Sans Thai', 'LINE Seed Sans TH', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', 'Segoe UI', system-ui, sans-serif;
}

.tl-heading {
    text-align: center;
    margin: 0 0 12px;
    font-family: 'Chonburi', 'Noto Sans Thai', 'Noto Sans KR', 'Noto Sans SC', 'Noto Sans TC', serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    color: #4a3418;
    letter-spacing: .01em;
    text-shadow: 0 2px 6px rgba(120,90,30,.18);
}

.tl-badge-row {
    text-align: center;
    margin: 0 0 26px;
}

.tl-badge {
    display: inline-block;
    min-width: 340px;
    padding: 11px 40px 12px;
    background: url('../images/common/bg-roadto.png') center / 100% 100% no-repeat;
    color: #f2d79a;
    font-weight: 700;
    font-size: clamp(15px, 1.8vw, 19px);
    letter-spacing: .03em;
    text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

.tl-frame {
    position: relative;
    padding: 42px 44px 48px;
    background: url('../images/common/Frame565.png') center / 100% 100% no-repeat;
}

.tl-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.tl-col {
    min-width: 0;
    border-radius: 13px;
    box-shadow: 0 6px 16px rgba(50,32,8,.22);
}

.tl-head {
    background: url('https://img.gnjoy.in.th/ROTournament/News/b1ec4942-114a-4dcc-ab55-bfd6cecbba4a_bg-head-roadto.png') center / 100% 100% no-repeat;
    padding: 13px 6px;
    text-align: center;
    border-radius: 13px 13px 0 0;
    font-family: 'Chonburi', serif;
    color: #3a2408;
    font-weight: 800;
    letter-spacing: .05em;
    font-size: 17px;
    text-shadow: 0 1px 0 rgba(255,255,255,.3);
}

.tl-body {
    background: url('../images/common/bg-detail-tl.png') center / cover no-repeat, #f7f4ee;
    border: 1.5px solid #d9b45c;
    border-top: none;
    border-radius: 0 0 13px 13px;
    padding: 6px 13px 16px;
}

.tl-step {
    position: relative;
    border: 1.5px solid #d9b45c;
    border-radius: 11px;
    background: #fff;
    padding: 21px 12px 13px;
    margin-top: 16px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(120,90,30,.12);
}

.tl-tag {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
}

    .tl-tag span {
        display: inline-block;
        min-width: 132px;
        padding: 7px 16px 8px;
        background: url('https://img.gnjoy.in.th/ROTournament/News/a3751d6c-db76-4c41-98e2-b5f6558c3f99_bg-red.png') center / 100% 100% no-repeat;
        color: #fff3da;
        font-size: 12.5px;
        font-weight: 700;
        letter-spacing: .02em;
        line-height: 1;
        text-shadow: 0 1px 1px rgba(0,0,0,.55);
        white-space: nowrap;
    }

.tl-step-name {
    font-weight: 700;
    color: #3a2a12;
    font-size: 14.5px;
    line-height: 1.3;
}

.tl-step-date {
    color: #6a5636;
    font-size: 13px;
    line-height: 1.3;
    margin-top: 3px;
}

.tl-arrow {
    text-align: center;
    margin: 9px 0 1px;
    line-height: 0;
}

    .tl-arrow img {
        width: 17px;
        height: auto;
        display: inline-block;
        filter: drop-shadow(0 2px 2px rgba(90,60,20,.3));
    }

.tl-down {
    text-align: center;
    margin: 8px 0 4px;
}

    .tl-down img {
        width: 30px;
        height: auto;
        display: inline-block;
        filter: drop-shadow(0 3px 4px rgba(90,60,20,.3));
    }

.tl-festa {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../images/common/Frame483.png') center / 100% 100% no-repeat;
    padding: 20px 56px 20px 210px;
}

    .tl-festa .ros-trophy {
        position: absolute;
        left: 100px;
        top: 50%;
        transform: translateY(-50%);
        width: 210px;
        height: auto;
    }

.tl-festa-text {
    text-align: center;
}

.tl-title {
    font-family: 'Chonburi', serif;
    font-size: clamp(27px, 3.6vw, 40px);
    font-weight: 800;
    color: #3a2408;
    line-height: 1.05;
    text-shadow: 0 1px 0 rgba(255,255,255,.3);
}

.tl-sub {
    font-size: clamp(13px, 1.6vw, 18px);
    color: #4a2f10;
    font-weight: 600;
    letter-spacing: .04em;
    margin: 3px 0 11px;
}

.tl-date {
    display: inline-block;
    padding: 9px 28px 10px;
    border-radius: 22px;
    background: linear-gradient(180deg, #3b3229 0%, #201a13 100%);
    border: 1.5px solid #c9a24a;
    color: #fdf3dd;
    font-weight: 700;
    font-size: clamp(14px, 1.6vw, 17px);
    letter-spacing: .02em;
    box-shadow: 0 2px 6px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.1);
    white-space: nowrap;
}

/* ---------------------------------- Tournament Timeline — responsive + trophy glow ---------------------------------- */
.ros-trophy {
    filter: brightness(1.16) saturate(1.05) drop-shadow(0 8px 12px rgba(60,40,10,.45)) drop-shadow(0 0 12px rgba(255,232,150,.6));
    animation: rosTrophyGlow 2.4s ease-in-out infinite;
    will-change: filter;
}

@keyframes rosTrophyGlow {
    0%,100% {
        filter: brightness(1.16) saturate(1.05) drop-shadow(0 8px 12px rgba(60,40,10,.45)) drop-shadow(0 0 12px rgba(255,232,150,.6));
    }

    50% {
        filter: brightness(1.4) saturate(1.1) drop-shadow(0 8px 12px rgba(60,40,10,.45)) drop-shadow(0 0 32px rgba(255,242,180,1));
    }
}

@media (prefers-reduced-motion:reduce) {
    .ros-trophy {
        animation: none;
    }
}

/* ---- Responsive: Tournament Timeline ---- */
@media (max-width:820px) {
    .tl-frame {
        padding: 28px 18px 32px !important;
    }

    .tl-grid {
        grid-template-columns: repeat(3,1fr) !important;
        gap: 12px !important;
    }

    .tl-festa {
        padding: 20px 40px 20px 180px !important;
    }

        .tl-festa .ros-trophy {
            left: 70px !important;
            width: 170px !important;
        }
}

@media (max-width:560px) {
    .tl-frame {
        padding: 20px 12px 24px !important;
    }

    .tl-grid {
        grid-template-columns: repeat(2,1fr) !important;
        gap: 10px !important;
    }

    .tl-badge {
        min-width: 0 !important;
        width: 100% !important;
        padding: 11px 14px 12px !important;
        box-sizing: border-box !important;
    }

    .tl-festa {
        padding: 14px 12px 14px 95px !important;
        min-height: 126px !important;
        align-items: center !important;
        text-align: center !important;
    }

        .tl-festa .ros-trophy {
            left: -8px !important;
            top: 50% !important;
            transform: translateY(-50%) !important;
            width: 152px !important;
        }

    .tl-title {
        font-size: 18px !important;
    }

    .tl-sub {
        font-size: 11px !important;
        margin: 2px 0 8px !important;
    }

    .tl-date {
        font-size: 12.5px !important;
        padding: 7px 18px 8px !important;
    }
}

@media (max-width:370px) {
    .tl-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ---------------------------------- Particle positions (were inline style="" in index.html) ---------------------------------- */
.ab-embers i:nth-child(1) {
    left: 8%;
    animation-delay: 0s;
}

.ab-embers i:nth-child(2) {
    left: 22%;
    animation-delay: 2.4s;
    --dx: -30px;
}

.ab-embers i:nth-child(3) {
    left: 35%;
    animation-delay: 4.6s;
}

.ab-embers i:nth-child(4) {
    left: 48%;
    animation-delay: 1.2s;
    --dx: -15px;
}

.ab-embers i:nth-child(5) {
    left: 58%;
    animation-delay: 3.3s;
}

.ab-embers i:nth-child(6) {
    left: 66%;
    animation-delay: 5.5s;
    --dx: 35px;
}

.ab-embers i:nth-child(7) {
    left: 74%;
    animation-delay: .7s;
    --dx: -25px;
}

.ab-embers i:nth-child(8) {
    left: 83%;
    animation-delay: 2.9s;
}

.ab-embers i:nth-child(9) {
    left: 91%;
    animation-delay: 4.1s;
    --dx: -40px;
}

.ab-embers i:nth-child(10) {
    left: 15%;
    animation-delay: 6.1s;
    --dx: 25px;
}

.pz-dust i:nth-child(1) {
    left: 12%;
    animation-delay: 0s;
}

.pz-dust i:nth-child(2) {
    left: 26%;
    animation-delay: 2.6s;
    --dx: -20px;
}

.pz-dust i:nth-child(3) {
    left: 38%;
    animation-delay: 5.1s;
}

.pz-dust i:nth-child(4) {
    left: 47%;
    animation-delay: 1.4s;
    --dx: -10px;
}

.pz-dust i:nth-child(5) {
    left: 55%;
    animation-delay: 3.8s;
    --dx: 25px;
}

.pz-dust i:nth-child(6) {
    left: 63%;
    animation-delay: 6.2s;
}

.pz-dust i:nth-child(7) {
    left: 74%;
    animation-delay: .8s;
    --dx: -25px;
}

.pz-dust i:nth-child(8) {
    left: 88%;
    animation-delay: 4.4s;
}

.tm-dust i:nth-child(1) {
    left: 22%;
    top: 30%;
    animation-delay: 0s;
}

.tm-dust i:nth-child(2) {
    left: 34%;
    top: 60%;
    animation-delay: 2.2s;
    --dx: -25px;
}

.tm-dust i:nth-child(3) {
    left: 48%;
    top: 20%;
    animation-delay: 4.1s;
}

.tm-dust i:nth-child(4) {
    left: 58%;
    top: 70%;
    animation-delay: 1.3s;
    --dx: -15px;
}

.tm-dust i:nth-child(5) {
    left: 66%;
    top: 40%;
    animation-delay: 3.3s;
}

.tm-dust i:nth-child(6) {
    left: 78%;
    top: 55%;
    animation-delay: 5.6s;
    --dx: -30px;
}

.tm-dust i:nth-child(7) {
    left: 14%;
    top: 65%;
    animation-delay: 6.4s;
}

.tm-dust i:nth-child(8) {
    left: 86%;
    top: 25%;
    animation-delay: 7.2s;
}

.tm-list .tm-flag:nth-child(1) {
    --i: 0;
}

.tm-list .tm-flag:nth-child(2) {
    --i: 1;
}

.tm-list .tm-flag:nth-child(3) {
    --i: 2;
}

.tm-list .tm-flag:nth-child(4) {
    --i: 3;
}

.tm-list .tm-flag:nth-child(5) {
    --i: 4;
}


.timeline-section,
#timeline-db-container {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.timeline-table-wrap,
.timeline-table,
.timeline-table td,
.timeline-table th {
    border: none !important;
    box-shadow: none !important;
}

#timeline-db-container .tl-body,
#timeline-db-container .tl-step {
    border: none !important;
}

#timeline-db-container div[style*="border"] {
    border: none !important;
}
