/* =========================================================
   Brunel 8-Ball Pool Society
   Palette taken from the society logo: deep navy + gold.
   Sections: tokens · base · buttons · nav · hero · cards · game ·
             events · tournaments · scoreboard · admin · auth · footer
   ========================================================= */

:root {
  --bg: #060928;
  --bg-2: #0a0f40;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-2: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.11);
  --text: #eef0ff;
  --muted: #a8afe0;
  --gold: #ffc20e;
  --gold-2: #ffd75e;
  --royal: #1722a8;
  --ok: #3ddc84;
  --red: #ff5a5a;
  --radius: 18px;
  --font-display: 'Sora', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(900px 600px at 8% -8%, rgba(255, 194, 14, 0.09), transparent 60%),
    radial-gradient(1000px 700px at 100% 6%, rgba(23, 34, 168, 0.5), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1rem; }
a { color: var(--gold); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
code { background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 6px; font-size: 0.9em; }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(520px, 100% - 2.5rem); }
.center { text-align: center; }
.inline { display: inline; margin: 0; }

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section.tight { padding: clamp(2.5rem, 5vw, 3.8rem) 0; }
.section-alt { background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)); border-block: 1px solid var(--line); }

.eyebrow { display: inline-block; margin-bottom: 0.7rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.section-lead { max-width: 62ch; color: var(--muted); font-size: 1.08rem; margin-bottom: 2rem; }
.group-title { font-size: 1.5rem; margin-bottom: 1.2rem; }
.group-title.spaced { margin-top: 2.6rem; }
.sub-title { font-size: 1.05rem; color: var(--muted); font-weight: 600; margin: 1.8rem 0 0.8rem; }
.fine { font-size: 0.88rem; color: var(--muted); }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 0 0 1rem; }
.crumb { color: var(--gold); text-decoration: none; }
.crumb:hover { text-decoration: underline; }

.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--gold); color: var(--bg); padding: 0.6rem 1rem; border-radius: 0 0 10px 0; font-weight: 600; }
.skip:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  font: 600 0.95rem var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold-2); outline-offset: 3px;
}
.btn-primary { background: var(--gold); color: var(--bg); box-shadow: 0 8px 24px rgba(255, 194, 14, 0.25); }
.btn-primary:hover { transform: translateY(-2px); background: var(--gold-2); box-shadow: 0 14px 32px rgba(255, 194, 14, 0.38); }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(255,255,255,0.26); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.btn-danger { background: transparent; color: var(--red); border-color: rgba(255, 90, 90, 0.45); }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn-small { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.4rem; }

.chip {
  display: inline-block; padding: 0.28rem 0.8rem; border-radius: 999px; background: var(--gold); color: var(--bg);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
}
.chip.small { padding: 0.12rem 0.55rem; font-size: 0.66rem; margin-right: 0.3rem; }
.chip.live { background: var(--red); color: #fff; animation: ping 1.8s infinite; }
.chip.muted { background: var(--surface-2); color: var(--muted); }

/* ---------- Live bar + nav ---------- */
.live-bar {
  position: relative; z-index: 60;
  display: flex; align-items: center; gap: 0.9rem; padding: 0.5rem clamp(0.8rem, 3vw, 1.5rem);
  background: var(--gold); color: var(--bg); font-size: 0.88rem; font-weight: 600;
  animation: slideDown .6s cubic-bezier(.2,.8,.2,1) both;
}
.live-tag { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.2rem 0.7rem 0.2rem 0.55rem; border-radius: 999px; background: var(--bg); color: #fff; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; white-space: nowrap; }
.live-dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--red); animation: ping 1.6s infinite; }
.live-text { margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-link { color: var(--bg); font-weight: 700; white-space: nowrap; }
.live-close { background: none; border: 0; cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--bg); padding: 0 0.3rem; opacity: .65; }
.live-close:hover { opacity: 1; }

.nav-wrap { position: sticky; top: 0; z-index: 50; background: rgba(6, 9, 40, 0.8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav { width: min(1240px, 100% - 2rem); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--text); }
.brand img { border-radius: 50%; transition: transform .6s cubic-bezier(.3,1.4,.5,1); }
.brand:hover img { transform: rotate(360deg); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-name em { font-style: normal; color: var(--gold); }

.nav-links { display: flex; align-items: center; gap: clamp(0.8rem, 1.6vw, 1.5rem); }
.nav-links > a { position: relative; color: var(--text); text-decoration: none; font-size: 0.92rem; font-weight: 500; padding: 0.3rem 0; display: inline-flex; align-items: center; gap: 0.4rem; }
.nav-links > a::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.nav-links > a:hover::after, .nav-links > a.active::after { transform: scaleX(1); }
.nav-live { width: .55rem; height: .55rem; border-radius: 50%; background: var(--red); animation: ping 1.6s infinite; }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: 0.4rem; }

.nav-toggle { display: none; width: 44px; height: 44px; background: transparent; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; padding: 0; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .2s; }
.nav-toggle span:nth-child(1) { top: 14px; } .nav-toggle span:nth-child(2) { top: 21px; } .nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.flash { padding: 0.8rem 0; font-weight: 600; font-size: 0.95rem; }
.flash.ok { background: rgba(61, 220, 132, 0.14); color: #b9ffd8; border-bottom: 1px solid rgba(61, 220, 132, 0.35); }
.flash.error { background: rgba(255, 90, 90, 0.14); color: #ffd0d0; border-bottom: 1px solid rgba(255, 90, 90, 0.4); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; min-height: calc(100svh - 110px); display: flex; align-items: center; padding: clamp(2.5rem, 7vw, 5rem) 0 5.5rem; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(540px 440px at 78% 45%, rgba(255, 194, 14, 0.13), transparent 70%), radial-gradient(700px 500px at 12% 85%, rgba(23, 34, 168, 0.45), transparent 70%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.4rem 1rem; margin-bottom: 1.3rem; border-radius: 999px; border: 1px solid rgba(255, 194, 14, 0.45); background: rgba(255, 194, 14, 0.09); color: var(--gold-2); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; animation: fadeUp .8s .1s both; }
.pulse { width: .5rem; height: .5rem; border-radius: 50%; background: var(--gold); animation: ping-gold 1.8s infinite; }
.hero h1 { font-size: clamp(2.8rem, 8vw, 5.6rem); font-weight: 800; letter-spacing: -0.03em; }
.hero h1 .line { display: block; animation: rise .9s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.2s + var(--i) * .14s); }
.hero h1 .accent { color: var(--gold); text-shadow: 0 0 44px rgba(255, 194, 14, 0.3); }
.lead { max-width: 52ch; margin-top: 1.4rem; font-size: clamp(1.02rem, 1.8vw, 1.22rem); color: var(--muted); animation: fadeUp .9s .65s both; }
.hero .cta-row { animation: fadeUp .9s .8s both; }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 0.8rem 2.2rem; padding: 0; margin: 2.2rem 0 0; animation: fadeUp .9s .95s both; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-family: var(--font-display); font-size: 1.9rem; color: var(--gold); line-height: 1; }
.hero-facts span { font-size: 0.82rem; color: var(--muted); margin-top: 0.3rem; }

.hero-visual { position: relative; aspect-ratio: 1; width: min(100%, 440px); justify-self: center; display: grid; place-items: center; }
.logo-ring { position: absolute; inset: 4%; border-radius: 50%; background: conic-gradient(from 0deg, var(--gold), transparent 30%, var(--royal) 55%, transparent 80%, var(--gold)); filter: blur(22px); opacity: .55; animation: spin 14s linear infinite; }
.hero-logo { position: relative; width: 82%; height: auto; filter: drop-shadow(0 24px 40px rgba(0,0,0,.55)); animation: bob 7s ease-in-out infinite, fadeUp 1s .3s both; }

.float-ball { position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); display: grid; place-items: center; box-shadow: inset -6px -8px 14px rgba(0,0,0,.35), 0 18px 26px rgba(0,0,0,.4); animation: drift var(--d) ease-in-out infinite alternate; }
.float-ball.stripe { background: linear-gradient(#fff 0 24%, var(--c) 24% 76%, #fff 76%); }
.float-ball::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 24%, rgba(255,255,255,.6), transparent 36%); }
.float-ball i { position: relative; display: grid; place-items: center; width: 44%; height: 44%; border-radius: 50%; background: #fff; color: #111; font-style: normal; font-family: var(--font-display); font-weight: 700; font-size: calc(var(--s) * .2); }

.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: 1.6rem; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.35); border-radius: 20px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--gold); animation: wheel 1.7s infinite; }

/* ---------- Cards, features ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; margin-top: 1.6rem; }
.card { border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, rgba(23,34,168,.5), rgba(10,15,64,.7)); padding: clamp(1.4rem, 3vw, 2.2rem); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.feature-card { display: flex; flex-direction: column; align-items: flex-start; }
.feature-card h3 { font-size: 1.6rem; margin: 0.9rem 0 0.8rem; }
.feature-card p { color: var(--muted); }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.8rem 1.4rem; margin: 0 0 1.1rem; width: 100%; }
.meta dt { font-size: 0.7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: .15rem 0 0; font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--gold); }
.past-list { list-style: none; margin: 1.4rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--line); width: 100%; display: grid; gap: .5rem; }
.past-list li { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .9rem; }
.past-date { color: var(--muted); }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; width: 100%; max-width: 420px; margin: .4rem 0 .4rem; }
.count-box { text-align: center; padding: .8rem .2rem; border-radius: 14px; border: 1px solid rgba(255,194,14,.32); background: rgba(255,255,255,.05); }
.count-box span { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.count-box small { display: block; margin-top: .35rem; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.countdown.small { max-width: 340px; }
.countdown.small .count-box { padding: .5rem .2rem; }
.countdown.small .count-box span { font-size: 1.3rem; }
.count-done { font-family: var(--font-display); font-weight: 600; color: var(--gold); margin: 0; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 1.1rem; margin-top: 1.4rem; }
.feature { padding: 1.6rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: transform .3s ease, border-color .3s ease, background .3s ease; }
.feature:hover { transform: translateY(-5px); border-color: rgba(255,194,14,.5); background: var(--surface-2); }
.feature h3 { margin: 1rem 0 .5rem; }
.feature p { color: var(--muted); margin: 0; font-size: .96rem; }
.icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(255,194,14,.13); color: var(--gold); }
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.red { background: rgba(255,90,90,.15); color: #ff8a8a; }
.icon.purple { background: rgba(176,110,255,.16); color: #cba0ff; }
.icon.blue { background: rgba(80,150,255,.16); color: #8fbcff; }
.icon.orange { background: rgba(255,150,60,.16); color: #ffb072; }
.icon.membership { background: rgba(176,110,255,.16); color: #cba0ff; }
.icon.whatsapp { background: rgba(61,220,132,.15); color: var(--ok); }
.icon.instagram { background: rgba(255,90,140,.15); color: #ff8fb3; }

/* ---------- Committee, join ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.person { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.person h3 { font-size: 1.15rem; }
.person p { margin: .1rem 0 0; color: var(--muted); font-size: .92rem; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, var(--gold), #e59e00); color: var(--bg); font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; object-fit: cover; }

.join-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.1rem; margin-top: .6rem; }
.join-card { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; padding: 1.6rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); transition: transform .3s ease, border-color .3s ease, background .3s ease; }
.join-card:hover { transform: translateY(-5px); border-color: rgba(255,194,14,.5); background: var(--surface-2); }
.join-card h3 { margin: .8rem 0 .2rem; }
.join-card p { color: var(--muted); font-size: .95rem; margin-bottom: .8rem; }
.join-link { margin-top: auto; color: var(--gold); font-weight: 600; font-size: .92rem; }

/* ---------- Game ---------- */
.game-wrap { max-width: 940px; margin: 1.4rem auto 0; padding: clamp(.8rem, 2.5vw, 1.6rem); border-radius: 28px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.game-hud { display: flex; align-items: center; gap: clamp(1rem, 4vw, 2.2rem); flex-wrap: wrap; padding: .2rem .4rem 1rem; }
.hud-item { display: flex; flex-direction: column; }
.hud-label { font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hud-value { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--gold); line-height: 1.1; transition: transform .25s; }
.hud-value.bump { transform: scale(1.35); }
.power { margin-left: auto; display: flex; flex-direction: column; gap: .35rem; }
.power-track { width: min(240px, 42vw); height: 12px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.power-fill { width: 0; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #3ddc84, var(--gold) 60%, var(--red)); }
.table-stage { position: relative; }
#table { display: block; width: 100%; height: auto; border-radius: 22px; cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.result { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 22px; background: rgba(6,9,40,.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .4s both; }
.result-card { width: min(400px, 90%); text-align: center; padding: clamp(1.1rem, 4vw, 2rem); border-radius: 24px; border: 1px solid rgba(255,194,14,.5); background: linear-gradient(160deg, var(--royal), var(--bg-2)); box-shadow: 0 24px 60px rgba(0,0,0,.6); animation: pop .55s cubic-bezier(.2,1.4,.4,1) both; }
.result-kicker { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.result-card h3 { font-size: clamp(1.5rem, 5vw, 2rem); color: var(--gold); }
.result-count { margin: .5rem 0; display: flex; align-items: baseline; justify-content: center; gap: .6rem; }
.result-count span { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.6rem, 9vw, 4rem); line-height: 1; }
.result-count small { color: var(--muted); font-size: .9rem; }
.result-card p#resultText { color: var(--muted); font-size: .94rem; }
.result-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: .4rem; }
.game-actions { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: 1.2rem; }
.game-hint { text-align: center; color: var(--muted); font-size: .92rem; margin: .9rem 0 0; min-height: 1.5em; }

/* ---------- Page headers ---------- */
.page-hero { padding: clamp(2.6rem, 6vw, 4.2rem) 0 1rem; }
.page-hero.compact { padding-bottom: .4rem; }
.page-hero h1 { margin-bottom: 1rem; }
.page-hero .section-lead { margin-bottom: 1.2rem; }
.message-page { padding: clamp(4rem, 12vw, 8rem) 0; }
.message-logo { border-radius: 50%; margin-bottom: 1rem; }

/* ---------- Events ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.filter { font: 600 .88rem var(--font-body); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .5rem 1rem; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.filter:hover { border-color: var(--gold); }
.filter.active { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.filter .count, summary .count { margin-left: .3rem; font-size: .75rem; opacity: .75; font-weight: 600; }
.event-group { padding-top: 2rem; padding-bottom: 1.4rem; }
.event-list { display: grid; gap: 1.2rem; }
.event { display: grid; grid-template-columns: 92px 1fr; gap: 1.4rem; padding: clamp(1.1rem, 3vw, 1.8rem); border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 108px; border-radius: 18px; background: linear-gradient(160deg, var(--royal), var(--bg-2)); border: 1px solid rgba(255,194,14,.35); text-align: center; }
.date-tile .d { font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; line-height: 1; color: var(--gold); }
.date-tile .m { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-top: .25rem; }
.date-tile .y { font-size: .7rem; color: var(--muted); }
.event-top { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: .5rem; }
.event-top h3 { font-size: 1.45rem; }
.event-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; color: var(--muted); font-size: .93rem; margin-bottom: .8rem; }
.event-meta > span:not(.chip)::before { content: "\2022"; color: var(--gold); margin-right: .5rem; }
.event-summary { color: var(--muted); max-width: 66ch; }
.agenda { margin: .6rem 0 .4rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(0,0,0,.18); }
.agenda summary { cursor: pointer; padding: .8rem 1.1rem; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.agenda summary::-webkit-details-marker { display: none; }
.agenda summary::after { content: "+"; font-size: 1.3rem; color: var(--gold); transition: transform .25s; }
.agenda[open] summary::after { transform: rotate(45deg); }
.timeline { list-style: none; margin: 0; padding: .3rem 1.1rem 1.1rem; }
.timeline li { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: .9rem; padding-bottom: 1rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: linear-gradient(var(--gold), rgba(255,194,14,.1)); }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--bg); font-family: var(--font-display); font-weight: 700; font-size: .85rem; z-index: 1; }
.timeline h4 { font-size: 1rem; margin-top: .3rem; }
.timeline p { margin: .1rem 0 0; color: var(--muted); font-size: .92rem; }
.agenda[open] .timeline li { animation: fadeUp .5s both; animation-delay: calc(var(--i) * 60ms); }

/* ---------- Tournaments ---------- */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.1rem; }
.t-card { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); transition: transform .3s, border-color .3s, background .3s; }
.t-card:hover { transform: translateY(-4px); border-color: rgba(255,194,14,.5); background: var(--surface-2); }
.t-card .event-meta { margin: 0; }
.t-winner { margin: 0; color: var(--muted); }
.t-winner strong { color: var(--gold); }
.champion { display: inline-flex; align-items: center; gap: 1rem; margin-top: .6rem; padding: .9rem 1.4rem; border-radius: 18px; border: 1px solid rgba(255,194,14,.5); background: rgba(255,194,14,.09); }
.champion small { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.champion strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--gold); }
.trophy { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--gold); color: var(--bg); }
.trophy svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.bracket { display: flex; gap: 1.6rem; overflow-x: auto; padding-bottom: 1rem; }
.round { min-width: 230px; flex: 1; display: flex; flex-direction: column; }
.round h4 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .8rem; }
.round-matches { display: flex; flex-direction: column; justify-content: space-around; gap: .9rem; flex: 1; }
.fixtures { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.4rem; }
.fixture-day { display: grid; gap: .7rem; align-content: start; }
.fixture-day h4 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }

.mbox { position: relative; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.mbox.live { border-color: rgba(255,90,90,.6); box-shadow: 0 0 0 3px rgba(255,90,90,.12); }
.mbox.bye { opacity: .55; }
.mrow { display: flex; justify-content: space-between; gap: .8rem; padding: .55rem .9rem; font-size: .93rem; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mrow.win { background: rgba(255,194,14,.1); font-weight: 700; }
.mrow.win .mname::after { content: " \2713"; color: var(--gold); }
.mname.tbd { color: var(--muted); font-style: italic; }
.mscore { font-family: var(--font-display); font-weight: 700; min-width: 1.2rem; text-align: right; font-variant-numeric: tabular-nums; }
.mtag { display: flex; align-items: center; gap: .4rem; padding: .3rem .9rem; border-top: 1px solid var(--line); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: rgba(0,0,0,.18); }
.mtag.live { color: #ffb3b3; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { padding: .75rem 1rem; text-align: center; font-variant-numeric: tabular-nums; }
table.data th.l, table.data td.l { text-align: left; }
table.data thead th { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: rgba(0,0,0,.2); }
table.data tbody tr + tr td { border-top: 1px solid var(--line); }
table.data tbody tr:first-child td { color: var(--gold); font-weight: 700; }

/* ---------- Live scoreboard ---------- */
.sb { padding: clamp(2rem, 5vw, 3.2rem) 0 4rem; min-height: 70vh; }
.sb-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.sb-tools { display: flex; align-items: center; gap: .8rem; }
.conn { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600; color: var(--muted); padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.conn-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #888; }
.conn[data-state="online"] .conn-dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(61,220,132,.7); animation: ping-ok 2s infinite; }
.conn[data-state="offline"] .conn-dot { background: var(--red); }
.sb-live { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 1.4rem; margin-bottom: 2rem; }

.mcard { border: 1px solid rgba(255,255,255,.14); border-radius: 26px; background: linear-gradient(150deg, rgba(23,34,168,.6), rgba(10,15,64,.85)); box-shadow: 0 30px 70px rgba(0,0,0,.45); padding: clamp(1.1rem, 2.6vw, 1.8rem); animation: pop .5s cubic-bezier(.2,1.2,.4,1) both; }
.mc-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1.2rem; }
.mc-tour { font-weight: 700; }
.mc-round { color: var(--muted); font-size: .9rem; }
.live-pill { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .7rem; border-radius: 999px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.live-pill .live-dot { background: #fff; animation: none; }
.mc-body { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(.6rem, 2vw, 1.4rem); }
.side { display: flex; flex-direction: column; align-items: center; gap: .4rem; min-width: 0; text-align: center; }
.pname { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 2.4vw, 1.7rem); overflow-wrap: anywhere; line-height: 1.15; }
.pscore { font-family: var(--font-display); font-weight: 800; font-size: clamp(3.6rem, 9vw, 6.2rem); line-height: 1; color: #fff; font-variant-numeric: tabular-nums; transition: transform .25s; }
.pscore.bump { transform: scale(1.25); color: var(--gold); }
.side.winner .pname, .side.winner .pscore { color: var(--gold); }
.pips { display: flex; gap: .3rem; }
.pip { width: .8rem; height: .8rem; border-radius: 50%; background: rgba(255,255,255,.14); transition: background .25s, transform .25s; }
.pip.on { background: var(--gold); transform: scale(1.1); }
.mc-mid { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.clock { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.4rem); font-variant-numeric: tabular-nums; padding: .3rem .9rem; border-radius: 14px; background: rgba(0,0,0,.3); border: 1px solid var(--line); min-width: 5.2ch; text-align: center; }
.clock.paused { color: var(--muted); }
.clock.low { color: var(--gold); border-color: rgba(255,194,14,.6); }
.clock.over { color: #fff; background: var(--red); border-color: var(--red); animation: ping 1.4s infinite; }
.vs { font-size: .72rem; letter-spacing: .2em; color: var(--muted); font-weight: 700; }
.mc-foot { margin: 1.2rem 0 0; text-align: center; font-size: .86rem; color: var(--muted); min-height: 1.3em; }

.sb-empty { text-align: center; padding: clamp(2rem, 6vw, 4rem) 1rem; border: 1px dashed var(--line); border-radius: 28px; background: var(--surface); margin-bottom: 2rem; }
.sb-empty-ball { width: 84px; height: 84px; margin: 0 auto 1.2rem; border-radius: 50%; background: #111; display: grid; place-items: center; box-shadow: inset -8px -10px 18px rgba(0,0,0,.5), 0 18px 28px rgba(0,0,0,.4); animation: bob 5s ease-in-out infinite; }
.sb-empty-ball i { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font-style: normal; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; }
.sb-empty h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .5rem; }
.sb-empty p { color: var(--muted); }
.sb-next { margin: 1.4rem auto 0; max-width: 520px; text-align: left; display: grid; gap: .7rem; }
.sb-next a { display: block; padding: 1rem 1.2rem; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); text-decoration: none; color: var(--text); }
.sb-next small { color: var(--gold); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .68rem; }
.sb-next strong { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.sb-next span { color: var(--muted); font-size: .9rem; }

.sb-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.sb-list { display: grid; gap: .7rem; align-content: start; }
.sb-row { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; align-items: center; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.sb-row .sb-tag { grid-column: 1 / -1; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sb-row .vs-line { font-weight: 600; }
.sb-row .vs-line .w { color: var(--gold); }
.sb-row .res { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.sb-row .row-actions { grid-column: 1 / -1; display: flex; gap: .5rem; margin-top: .3rem; }

.tv-exit { position: fixed; top: 1rem; right: 1rem; z-index: 90; opacity: .25; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: .5rem 1rem; font: 600 .8rem var(--font-body); cursor: pointer; transition: opacity .2s; }
.tv-exit:hover, .tv-exit:focus-visible { opacity: 1; }

/* TV mode: nothing but the scoreboard, sized for a room */
body.tv .live-bar, body.tv .nav-wrap, body.tv .footer, body.tv .flash, body.tv #tvBtn { display: none !important; }
body.tv .sb { min-height: 100vh; padding: 2vw 0 2vw; display: flex; align-items: center; }
body.tv .sb > .container { width: min(1800px, 100% - 4vw); }
body.tv .sb-head h1 { font-size: clamp(2rem, 4vw, 4rem); }
body.tv .sb-live { grid-template-columns: repeat(auto-fit, minmax(min(100%, 760px), 1fr)); }
body.tv .pname { font-size: clamp(1.6rem, 3.4vw, 3.6rem); }
body.tv .pscore { font-size: clamp(6rem, 15vw, 14rem); }
body.tv .clock { font-size: clamp(2.4rem, 5vw, 5rem); }
body.tv .pip { width: 1.3vw; height: 1.3vw; max-width: 1.4rem; max-height: 1.4rem; }
body.tv .mc-tour { font-size: clamp(1.1rem, 2vw, 2rem); }
body.tv .mc-round { font-size: clamp(1rem, 1.6vw, 1.6rem); }
body.tv .sb-row { font-size: clamp(1rem, 1.7vw, 1.7rem); }

/* ---------- Referee console (admin) ---------- */
.subnav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.subnav a { padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: .88rem; text-decoration: none; }
.subnav a:hover { border-color: var(--gold); color: var(--gold); }
.console-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.console-head .group-title { margin: 0; }
.ref-live { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); gap: 1.2rem; margin-top: 1.2rem; }
.rcard { border: 1px solid rgba(255,90,90,.5); border-radius: 24px; background: linear-gradient(150deg, rgba(23,34,168,.55), rgba(10,15,64,.85)); padding: 1.2rem; box-shadow: 0 24px 60px rgba(0,0,0,.4); }
.rcard .mc-head { margin-bottom: .9rem; }
.r-clockrow { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1rem; }
.r-sides { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.r-side { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 1rem .7rem; border-radius: 18px; border: 1px solid var(--line); background: rgba(0,0,0,.2); }
.r-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; text-align: center; overflow-wrap: anywhere; }
.r-score { font-family: var(--font-display); font-weight: 800; font-size: 3.6rem; line-height: 1; font-variant-numeric: tabular-nums; }
.r-btns { display: grid; grid-template-columns: 1fr 2fr; gap: .5rem; width: 100%; }
.r-btns .btn { min-height: 58px; font-size: 1.15rem; padding: .5rem; }
.r-actions { display: grid; gap: .6rem; margin-top: 1rem; }
.r-actions h5 { margin: .4rem 0 0; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-family: var(--font-body); font-weight: 700; }
.r-actions .pair { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.r-actions .btn { min-height: 50px; white-space: normal; text-align: center; line-height: 1.2; }
.btn.armed { background: var(--red); border-color: var(--red); color: #fff; animation: ping 1.2s infinite; }
.ref-ready { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.ready-card { display: flex; flex-direction: column; gap: .6rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.ready-card .vs-line { font-weight: 700; }
.ready-card small { color: var(--muted); }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start; margin-top: 1.2rem; }
.panel { padding: 1.5rem; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); display: grid; gap: .9rem; }
.panel h3 { margin-bottom: .2rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
label small { font-weight: 400; font-size: .78rem; }
label.check { grid-template-columns: auto 1fr; align-items: center; gap: .6rem; font-weight: 500; }
input, select, textarea { width: 100%; font: 500 .95rem var(--font-body); color: var(--text); background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; }
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--gold); }
input::placeholder, textarea::placeholder { color: rgba(168,175,224,.55); }
input:focus, select:focus, textarea:focus { border-color: var(--gold); }
select option { background: var(--bg-2); color: var(--text); }
textarea { resize: vertical; }
.admin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.admin-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.16); }
.admin-item .fine { margin: .2rem 0 0; }
.item-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.item-actions form { margin: 0; }

/* ---------- Auth ---------- */
.auth { padding: clamp(2.5rem, 8vw, 5rem) 0; }
.auth-card { padding: clamp(1.4rem, 4vw, 2.2rem); border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(160deg, rgba(23,34,168,.4), rgba(10,15,64,.7)); box-shadow: 0 30px 70px rgba(0,0,0,.45); text-align: center; }
.auth-card h1 { font-size: 2rem; margin-bottom: .6rem; }
.auth-card .section-lead { font-size: .98rem; margin-bottom: 1.4rem; }
.stack { display: grid; gap: 1rem; text-align: left; margin-bottom: 1.2rem; }
.form-error { padding: .7rem 1rem; border-radius: 12px; background: rgba(255,90,90,.14); border: 1px solid rgba(255,90,90,.45); color: #ffd0d0; font-size: .92rem; text-align: left; }

/* ---------- Footer, toasts ---------- */
.footer { border-top: 1px solid var(--line); background: rgba(0,0,0,.25); margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding: 3rem 0 2rem; }
.footer-brand p { color: var(--muted); font-size: .92rem; margin-top: .8rem; max-width: 36ch; }
.footer h4 { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; font-family: var(--font-body); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer ul a { color: var(--text); text-decoration: none; font-size: .93rem; }
.footer ul a:hover { color: var(--gold); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; padding: 1.2rem 0 1.8rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.footer-base p { margin: 0; }

.toasts { position: fixed; z-index: 120; left: 50%; bottom: 1.2rem; transform: translateX(-50%); display: grid; gap: .5rem; width: min(440px, 92vw); pointer-events: none; }
.toast { padding: .8rem 1.1rem; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0,0,0,.5); font-weight: 600; font-size: .92rem; animation: fadeUp .3s both; }
.toast.error { border-color: rgba(255,90,90,.6); color: #ffd0d0; }
.toast.ok { border-color: rgba(61,220,132,.5); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(50px) rotate(1.5deg); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes drift { from { transform: translate3d(0,0,0) rotate(0); } to { transform: translate3d(-10px,-22px,0) rotate(12deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255,90,90,.7); } 70% { box-shadow: 0 0 0 10px rgba(255,90,90,0); } 100% { box-shadow: 0 0 0 0 rgba(255,90,90,0); } }
@keyframes ping-ok { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.7); } 70% { box-shadow: 0 0 0 8px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
@keyframes ping-gold { 0% { box-shadow: 0 0 0 0 rgba(255,194,14,.7); } 70% { box-shadow: 0 0 0 9px rgba(255,194,14,0); } 100% { box-shadow: 0 0 0 0 rgba(255,194,14,0); } }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 80% { opacity: 0; transform: translateY(14px); } 100% { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Admin: edit panels, activity log, phone-safe fields ---------- */
/* Grid and flex children default to min-width:auto, so a wide <input type=datetime-local> or long text
   could push fields out of their card on phones. Letting them shrink fixes that without touching the design. */
.admin-grid > *, .panel > *, .row > *, .admin-item > *, .edit-form > * { min-width: 0; }
input, select, textarea { max-width: 100%; min-width: 0; box-sizing: border-box; }
input[type="date"], input[type="datetime-local"] { -webkit-appearance: none; appearance: none; min-height: 2.9rem; }
.admin-item strong, .admin-item .fine { overflow-wrap: anywhere; }
.admin-list > li { min-width: 0; }
.item-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.item-edit { margin-top: .5rem; }
.item-edit > summary { cursor: pointer; color: var(--gold); font-weight: 600; font-size: .85rem; padding: .3rem .2rem; }
.edit-form { display: grid; gap: .8rem; padding: 1rem; margin-top: .4rem; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.16); }
.edit-form:disabled, input:disabled { opacity: .45; }

.log-actors { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.chip-btn { font: 600 .85rem var(--font-body); color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .9rem; cursor: pointer; }
.chip-btn span { color: var(--muted); font-weight: 500; margin-left: .25rem; }
.chip-btn:hover { border-color: var(--gold); }
.chip-btn.active { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.chip-btn.active span { color: var(--bg); }
.log-filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: .8rem; margin-bottom: .6rem; }
.log-filters > * { min-width: 0; }
.log-list { list-style: none; margin: .6rem 0 1rem; padding: 0; display: grid; gap: .5rem; }
.log-item { display: grid; grid-template-columns: 11rem 1fr; gap: .2rem 1rem; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.log-item time { color: var(--muted); font-size: .8rem; }
.log-item p { margin: 0; overflow-wrap: anywhere; }
.log-item .who { color: var(--gold); font-weight: 700; }
.log-item .tag { display: inline-block; margin-right: .4rem; padding: .05rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.log-item .tag.bad { background: var(--red); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; width: min(60vw, 300px); }
  .hero { min-height: auto; padding-bottom: 5rem; }
  .grid-2, .admin-grid, .sb-cols { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .nav-toggle { display: block; }
  .nav-links { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: .6rem 1.2rem 1.2rem; background: rgba(6, 9, 40, .97); border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links > a { padding: .8rem .2rem; border-bottom: 1px solid var(--line); }
  .nav-links > a::after { display: none; }
  .nav-actions { margin: 1rem 0 0; flex-wrap: wrap; }
  .nav { position: relative; }
}
@media (max-width: 640px) {
  .live-bar { gap: .6rem; font-size: .8rem; }
  .live-text { white-space: normal; line-height: 1.3; }
  .live-link { display: none; }
  .brand-name { font-size: .95rem; }
  .event { grid-template-columns: 1fr; }
  .date-tile { flex-direction: row; gap: .6rem; height: auto; width: fit-content; padding: .5rem 1rem; }
  .date-tile .d { font-size: 1.4rem; }
  .row, .r-sides { grid-template-columns: 1fr; }
  .panel { padding: 1.1rem; }
  .log-filters { grid-template-columns: 1fr 1fr; }
  .log-filters label:first-child { grid-column: 1 / -1; }
  .log-item { grid-template-columns: 1fr; }
  .mc-body { grid-template-columns: 1fr 1fr; }
  .mc-mid { grid-column: 1 / -1; grid-row: 1; flex-direction: row; justify-content: center; }
  .power { margin-left: 0; width: 100%; }
  .power-track { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .r-sides { grid-template-columns: 1fr 1fr; }
  .hero-facts { gap: .8rem 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
