:root{color-scheme:dark;--bg:#0b101b;--surface:#141d2d;--raised:#192438;--edge:#2e3d56;--fg:#eef3fc;--muted:#adbcd4;--accent:#edc477;--accent-text:#20170b;--link:#f3ce8b;--radius:16px;font-family:"Segoe UI",system-ui,sans-serif}
*{box-sizing:border-box} body{margin:0;background:var(--bg);color:var(--fg);line-height:1.55;min-height:100vh} .admin{--accent:#9be3dd;--accent-text:#092521;--link:#a4eae3}
a{color:var(--link);text-underline-offset:.23em} a:hover{text-decoration-thickness:2px} :focus-visible{outline:3px solid var(--accent);outline-offset:4px}
h1,h2,h3,p,dl{margin:0 0 .65em} h1,h2,h3{line-height:1.14;letter-spacing:-.025em} h1{font-size:clamp(2rem,4.5vw,3.5rem)} h2{font-size:clamp(1.24rem,2vw,1.55rem)} h3{font-size:1.1rem}
small{color:var(--muted);font-size:.82rem} .muted{color:var(--muted)} .skip{position:fixed;top:12px;left:12px;transform:translateY(-140%);z-index:7;background:var(--surface);padding:12px}.skip:focus{transform:none}
.header{border-bottom:1px solid var(--edge);background:#101827}.header-inner{max-width:1430px;margin:auto;padding:14px clamp(16px,4vw,48px);display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.brand{display:flex;gap:10px;align-items:center;font-size:1.1rem;font-weight:750;color:var(--fg);text-decoration:none;line-height:1.15;white-space:nowrap}.brand small{display:block;margin-top:4px}
.brand-mark{display:grid;place-items:center;width:37px;height:41px;color:var(--accent);background:#233046;border:1px solid var(--edge);border-radius:7px 7px 14px 14px;font-family:Georgia,serif;font-weight:900}
.nav,.account-nav{display:flex;align-items:center;gap:clamp(8px,1.4vw,20px);flex-wrap:wrap}.nav a{color:var(--muted);text-decoration:none;padding:8px 0;font-size:.95rem}.nav a:hover{color:var(--fg)}.account-nav form{margin:0}
.content{width:min(1280px,100%);margin:auto;padding:clamp(20px,4vw,46px) clamp(16px,4vw,48px) 50px;min-height:75vh}
.footer{border-top:1px solid var(--edge);color:var(--muted)}.footer>div{max-width:1280px;margin:auto;padding:22px clamp(16px,4vw,48px);display:flex;gap:18px;flex-wrap:wrap}
.hero{display:grid;grid-template-columns:1.4fr 1fr;position:relative;overflow:hidden;isolation:isolate;border:1px solid #394359;border-radius:22px;background:linear-gradient(110deg,#121a2a 25%,#222c40 70%,#3e2f23);min-height:360px}
.hero-copy{padding:clamp(24px,5vw,60px);align-self:center}.hero h1{font-size:clamp(2.45rem,5.5vw,5.25rem);letter-spacing:-.055em}.hero h1 em{color:var(--accent);font-style:normal}.hero-copy>p:not(.eyebrow){font-size:1.1rem;color:var(--muted);max-width:34rem;margin-bottom:1.4rem}.eyebrow{font-size:.9rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--accent)}
.hero-art{position:relative;align-self:stretch;background:repeating-linear-gradient(35deg,transparent,transparent 24px,#f7cc6d10 25px,transparent 27px),radial-gradient(ellipse at center,#e6bd6a38,transparent 66%);display:grid;place-items:center}
.crest-ring,.crest-cross,.crest-shield{grid-area:1/1;display:grid;place-items:center;pointer-events:none}.crest-ring{width:75%;aspect-ratio:1;border-radius:50%;border:1px solid #e9c2795e;box-shadow:0 0 0 14px #e9c27910,0 0 0 35px #e9c2790a}.crest-cross{width:52%;aspect-ratio:1;border:1px solid #e9c27947;transform:rotate(45deg)}
.crest-shield{width:48%;max-width:216px;aspect-ratio:.85;color:#ecc77e;font-size:clamp(3.6rem,9vw,8.5rem);font-weight:900;font-family:Georgia,serif;text-shadow:0 6px 18px #080b158f;background:linear-gradient(150deg,#655138,#263347 55%,#141d2b);border:2px solid #a48450;border-radius:15% 15% 43% 43%;box-shadow:0 14px 40px #0d101999}
.metrics,.event-grid,.match-list,.civ-grid,.split{display:grid;gap:14px;grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:20px}.metrics{margin:18px 0 28px}.admin .metrics{grid-template-columns:repeat(4,minmax(0,1fr))}.match-list,.split{grid-template-columns:repeat(2,minmax(0,1fr))}
.metric,.tile,.panel{display:block;border:1px solid var(--edge);border-radius:var(--radius);background:var(--surface);padding:clamp(16px,2.1vw,24px);min-width:0}.metric,.tile{color:var(--fg);text-decoration:none}.metric:hover,.tile:hover{border-color:var(--accent);background:var(--raised)}.metric strong{font-size:2rem;color:var(--accent);display:block;font-variant-numeric:tabular-nums}.metric span,.tile>span,.tile>small{color:var(--muted)}.tile{display:flex;flex-direction:column;gap:8px}.tile strong{font-size:1.2rem;line-height:1.3}.tile .tile-glyph{color:var(--accent);font-size:1.55rem}.panel{margin-bottom:15px}.match-list>.panel,.event-grid>.panel,.split>.panel{margin-bottom:0}
.section{margin-top:28px}.section-head,.page-head,.actions,.meta,.hero-summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.section-head,.page-head{justify-content:space-between;margin-bottom:16px}.section-head h2,.page-head h1,.section-head p{margin-bottom:0}.hero-summary{margin-bottom:24px;color:var(--muted)}.meta{color:var(--muted);font-size:.9rem}.event-admin .meta{margin-bottom:12px}
.status{display:inline-block;color:var(--accent);background:#ffffff0a;border:1px solid var(--edge);border-radius:99px;padding:3px 10px;font-size:.83rem;font-weight:650}
.button,button,.secondary{font:inherit;line-height:1.2;display:inline-flex;min-height:44px;justify-content:center;align-items:center;padding:11px 15px;border:1px solid transparent;border-radius:10px;background:var(--accent);color:var(--accent-text);font-weight:700;cursor:pointer;text-decoration:none;max-width:100%}
button:hover,.button:hover{filter:brightness(1.1)}.secondary{background:var(--raised);border-color:var(--edge);color:var(--fg)}.compact{min-height:38px;padding:8px 12px;font-size:.9rem}button:disabled{opacity:.48;cursor:not-allowed}
input,select{font:inherit;border:1px solid var(--edge);border-radius:9px;min-height:44px;padding:8px 10px;background:var(--bg);color:var(--fg);width:100%}
input[type=checkbox]{width:18px;height:18px;min-height:0;accent-color:var(--accent)}label{display:grid;gap:5px;font-weight:600;min-width:0}.checkbox{display:flex;align-items:center;gap:8px}
.fields{display:grid;gap:13px}.fields>button{justify-self:start}.inline-fields{display:flex;flex-wrap:wrap;gap:12px;align-items:end}.inline-fields>*{flex:1 1 130px}.inline-fields>button{flex:0 1 auto}.search{display:flex;gap:10px;align-items:end;margin:0 0 15px}.search label{width:min(350px,100%)}.form-panel{max-width:520px}.notice{background:#1e323b;border:1px solid #3d6470;padding:12px 15px;border-radius:10px}.notice.problem{background:#3e2530;border-color:#82414e}
.table-wrap{overflow:auto;max-width:100%;border-radius:8px}table{width:100%;border-collapse:collapse;text-align:left;font-variant-numeric:tabular-nums}th,td{padding:10px 12px;border-bottom:1px solid var(--edge);vertical-align:top}th{font-size:.9rem;color:var(--muted);background:var(--raised)}tbody tr:last-child td{border-bottom:0}
.bracket{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:14px;align-items:start}.fixture{border-top:1px solid var(--edge);padding:12px 0}.fixture:first-of-type{border-top:0}.fixture div{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.fixture div+div{justify-content:space-between;color:var(--muted);font-size:.88rem;margin-top:4px}.fixture div+div strong{color:var(--accent)}
.match-panel>header{display:flex;justify-content:space-between;gap:10px;align-items:start}.vs{color:var(--muted);font-weight:400;font-size:.9em}.score strong{color:var(--accent)}details{margin:9px 0 12px}summary{cursor:pointer;color:var(--link);font-weight:650}details>form{margin-top:10px}
.roster{max-height:260px;overflow:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:5px}.roster label,.civ-tile,.plain-list li{display:flex;align-items:center;gap:8px;justify-content:space-between}.roster label{background:var(--raised);padding:8px;border-radius:8px}.roster label span{flex:1}.civ-tile{background:var(--raised);border:1px solid var(--edge);border-radius:9px;padding:10px}.civ-tile small{display:block}.civ-tile input{width:66px}.cart-total{padding:10px 0;color:var(--accent);font-weight:700}.plain-list{list-style:none;padding:0}.plain-list li{border-bottom:1px solid var(--edge);padding:10px 0}.empty{display:flex;gap:7px;align-items:baseline;flex-wrap:wrap}.empty p{margin-bottom:0}dd{margin:0 0 8px;overflow-wrap:anywhere}code{color:var(--accent)}
[hidden]{display:none!important}
@media(max-width:900px){.header-inner{gap:7px 14px}.nav{order:3;width:100%;gap:9px 16px}.hero{min-height:320px}.hero-art .crest-ring{width:82%}}
@media(max-width:680px){.content{padding-top:19px}.hero{grid-template-columns:1fr;min-height:0}.hero-art{position:absolute;inset:0 0 0 48%;z-index:-1;opacity:.26}.hero-copy{padding:26px 20px}.event-grid,.match-list,.split,.civ-grid{grid-template-columns:1fr}.metrics,.admin .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.metric{padding:12px}.metric strong{font-size:1.65rem}.nav a{padding:6px 0}.section-head{align-items:baseline}.match-panel>header{flex-wrap:wrap}.table-wrap table{min-width:455px}}
@media(prefers-reduced-motion:no-preference){.tile,.metric,button,.button{transition:background-color .16s,border-color .16s,filter .16s}}
