* { box-sizing: border-box; }
:root {
  --ink: #fff3d6;
  --muted: rgba(255, 235, 200, .72);
  --gold: #ffd27a;
  --gold-soft: #ffe1a2;
  --line: rgba(255, 218, 150, .16);
  --panel: rgba(255, 255, 255, .055);
  --deep: #120c08;
  --brown: #5c3212;
}
html, body { margin: 0; min-height: 100%; }
body {
  min-height: 100vh;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top, rgba(255,180,70,.16), transparent 35%), linear-gradient(180deg, #1a120c 0%, #24170d 40%, #120c08 100%);
}
button, a { font: inherit; }
button { cursor: pointer; }
.site-header {
  position: sticky; top: 0; z-index: 20; width: 100%; padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: rgba(10,8,6,.72); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { color: var(--gold); font-size: 27px; font-weight: 800; letter-spacing: 1px; text-decoration: none; text-shadow: 0 0 12px rgba(255,196,88,.35); }
.rules-button, .icon-button, .round-tab {
  color: var(--ink); border: 1px solid rgba(255,214,140,.24); background: linear-gradient(180deg, #7b4a1e, #5c3212);
  box-shadow: 0 8px 20px rgba(0,0,0,.25); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.rules-button { padding: 10px 20px; border-radius: 10px; }
.rules-button:hover, .icon-button:hover, .round-tab:hover { transform: translateY(-2px); border-color: rgba(255,214,140,.58); box-shadow: 0 12px 24px rgba(0,0,0,.34); }
.page-shell { width: min(1320px, 100%); margin: 0 auto; padding: 42px 24px 70px; }
.intro { text-align: center; padding: 12px 0 34px; }
.eyebrow { margin: 0 0 8px; color: #ffd56c; font-size: 11px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; color: var(--gold-soft); font-size: clamp(32px, 5vw, 54px); line-height: 1.05; text-shadow: 0 0 20px rgba(255,189,80,.18); }
h2 { margin-bottom: 0; color: var(--gold-soft); font-size: 28px; }
h3 { color: #ffe1a2; font-size: 16px; margin-bottom: 16px; }
.intro-copy { color: var(--muted); font-size: 16px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.fighter-strip, .bracket-section, .archive-section { margin-top: 36px; }
.carousel-controls { display: flex; gap: 10px; }
.icon-button { width: 44px; height: 44px; border-radius: 50%; color: var(--gold-soft); font-size: 22px; line-height: 1; }
.fighter-carousel { overflow-x: auto; padding: 15px 10px 24px; scrollbar-width: thin; scrollbar-color: #7b4a1e transparent; }
.fighter-track { display: flex; gap: 18px; width: max-content; }
.fighter-card { width: 180px; padding: 10px; border: 1px solid rgba(255,218,150,.1); border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.03)); box-shadow: 0 18px 40px rgba(0,0,0,.26); transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease; }
.fighter-card:hover { transform: translateY(-8px) rotateX(4deg) rotateY(-4deg) scale(1.03); border-color: rgba(255,210,120,.75); box-shadow: 0 24px 45px rgba(0,0,0,.35), 0 0 24px rgba(255,189,80,.18); }
.fighter-card img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; transition: transform .35s ease; }
.fighter-card:hover img { transform: scale(1.05); }
.fighter-card span { display: block; padding: 12px 2px 3px; color: var(--ink); font-size: 15px; font-weight: 700; text-align: center; }
/* Skill previews: added without changing the existing HTML cards. */
.fighter-card.has-skill { position: relative; cursor: pointer; }
.fighter-card.has-skill:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.fighter-card .skill-hint {
  position: absolute; left: 18px; right: 18px; bottom: 57px;
  padding: 9px 5px; border-radius: 9px; pointer-events: none;
  color: var(--gold-soft); background: rgba(18,12,8,.88);
  border: 1px solid rgba(255,210,120,.55); font-size: 12px;
  opacity: 0; transform: translateY(5px);
  transition: opacity .2s ease, transform .2s ease;
}
.fighter-card.has-skill:hover .skill-hint,
.fighter-card.has-skill:focus-visible .skill-hint { opacity: 1; transform: none; }
@media (hover: none), (pointer: coarse) {
  .fighter-card .skill-hint { opacity: 1; transform: none; }
}
.video-dialog .video-actions[hidden], .video-dialog a[hidden],
.video-error[hidden] { display: none; }
.video-error { padding: 15px 20px; margin: 0; color: var(--gold-soft); }
.bracket-heading { align-items: center; }
.tournament-status { display: inline-flex; align-items: center; gap: 8px; color: #97df7a; font-size: 13px; font-weight: 700; }
.tournament-status i { width: 9px; height: 9px; display: inline-block; border-radius: 50%; background: #7ee35b; box-shadow: 0 0 12px #7ee35b; }
.round-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 18px; }
.round-tab { border-radius: 9px; padding: 9px 13px; color: rgba(255,235,200,.72); white-space: nowrap; }
.round-tab.is-active { color: #24170d; background: linear-gradient(180deg, #ffe1a2, #d99a3c); border-color: #ffe1a2; }
.bracket { min-height: 370px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: rgba(0,0,0,.13); }
.round { display: none; }
.round.is-visible { display: block; animation: reveal .25s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.match-list { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 16px; }
.match-list.compact { max-width: 760px; margin: 0 auto; grid-template-columns: repeat(2, minmax(240px, 1fr)); }
.final-list { max-width: 520px; margin: 58px auto 28px; }
.match-card { min-height: 154px; padding: 17px; border: 1px solid rgba(255,218,150,.12); border-radius: 14px; background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025)); box-shadow: 0 16px 34px rgba(0,0,0,.23); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.match-card:hover { transform: translateY(-4px); border-color: rgba(255,210,120,.48); box-shadow: 0 20px 38px rgba(0,0,0,.3); }
.final-card { border-color: rgba(255,210,120,.38); box-shadow: 0 0 26px rgba(255,196,88,.12); }
.match-top, .match-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: rgba(255,235,200,.58); font-size: 12px; }
.match-top b { color: #ffd56c; font-size: 11px; text-transform: uppercase; letter-spacing: .7px; }
.match-fighters { display: grid; gap: 8px; margin: 18px 0 14px; }
.match-fighters span { padding: 10px 12px; border-radius: 8px; color: #fff3d6; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.07); }
.match-fighters span:first-child { border-left: 3px solid #d99a3c; }
.match-footer { min-height: 28px; }
.preview-button { border: 0; border-radius: 8px; padding: 7px 11px; color: #27170b; background: #ffd27a; font-size: 12px; font-weight: 800; }
.preview-button:hover { background: #ffe1a2; }
.archive-section { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; padding-top: 28px; border-top: 1px solid var(--line); }
.archive-list { display: grid; gap: 10px; }
.archive-link { display: grid; grid-template-columns: 1fr auto 24px; align-items: center; gap: 18px; padding: 17px 18px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.04); transition: transform .2s ease, border-color .2s ease; }
.archive-link:hover { transform: translateX(4px); border-color: rgba(255,210,120,.5); }
.archive-link small { color: var(--muted); }
.archive-link strong { color: var(--gold); font-size: 20px; }
.rules-dialog { width: min(680px, calc(100% - 32px)); height: min(720px, calc(100% - 32px)); padding: 0; color: var(--ink); border: 1px solid rgba(255,218,150,.24); border-radius: 16px; background: #1b110a; box-shadow: 0 28px 80px rgba(0,0,0,.6); }
.rules-dialog::backdrop { background: transparent; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 22px; }
.close-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--gold-soft); background: rgba(255,255,255,.05); }
.rules-dialog iframe { display: block; width: 100%; height: calc(100% - 73px); border: 0; background: #1b110a; }
.modal-backdrop { display: none; position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.72); }
.modal-backdrop.is-visible { display: block; }
.video-dialog { width: min(960px, calc(100% - 28px)); padding: 0; border: 1px solid rgba(255,218,150,.24); border-radius: 16px; background: #100a06; box-shadow: 0 28px 80px rgba(0,0,0,.7); }
.video-dialog::backdrop { background: rgba(0,0,0,.78); }
.video-dialog video { display: block; width: 100%; max-height: 75vh; background: #000; }
.video-dialog .video-actions { display: flex; justify-content: flex-end; padding: 12px 16px; }
.video-dialog a { color: #24170d; background: var(--gold); border-radius: 8px; padding: 9px 13px; text-decoration: none; font-weight: 800; font-size: 13px; }
.rules-page { padding: 30px 18px; }
.rules-document { width: min(720px, 100%); margin: 0 auto; padding: 12px 0 40px; }
.rules-document h1 { font-size: 42px; }
.rules-document section { padding: 20px 0; border-top: 1px solid var(--line); }
.rules-document h2 { margin-bottom: 8px; font-size: 20px; }
.rules-document p { color: var(--muted); line-height: 1.7; }
.rules-document .lead { margin-bottom: 32px; font-size: 17px; }
@media (max-width: 720px) {
  .site-header { padding: 15px 16px; }
  .brand { font-size: 21px; }
  .page-shell { padding: 30px 15px 50px; }
  .section-heading { align-items: center; }
  .bracket { padding: 16px; }
  .match-list, .match-list.compact { grid-template-columns: 1fr; }
  .archive-section { grid-template-columns: 1fr; gap: 16px; }
  .archive-link { grid-template-columns: 1fr 26px; }
  .archive-link small { grid-column: 1; grid-row: 2; }
  .archive-link strong { grid-column: 2; grid-row: 1 / span 2; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
