:root{color-scheme:dark;--bg:#0f1310;--panel:#182019;--line:rgba(255,255,255,.13);--text:#f4f2e9;--muted:#b4bdb3;--gold:#ead8a8;font-family:Inter,system-ui,sans-serif}
body.tournament-portal{margin:0;background:radial-gradient(circle at 15% 8%,rgba(47,94,58,.22),transparent 30rem),var(--bg);color:var(--text)}
#tournament-portal,#tournament-portal *{box-sizing:border-box}
#tournament-portal{width:min(1320px,calc(100% - 24px));margin:auto;padding-bottom:32px;font-size:15px;line-height:1.5}
#tournament-portal button,#tournament-portal input,#tournament-portal select{font:inherit}
#tournament-portal button,#tournament-portal .button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:9px 13px;border:1px solid var(--line);border-radius:10px;background:#233026;color:var(--text);cursor:pointer;text-decoration:none;white-space:normal}
#tournament-portal button:hover,#tournament-portal .button:hover{border-color:var(--gold)}
#tournament-portal button:disabled{opacity:.55;cursor:wait}
#tournament-portal :focus-visible{outline:2px solid var(--gold);outline-offset:3px}
#tournament-portal [hidden]{display:none!important}
#tournament-portal a{color:var(--gold)}
#tournament-portal h2{font-size:1.35rem;margin:0 0 10px}#tournament-portal h3{font-size:1.08rem;margin:22px 0 10px}#tournament-portal p{margin:8px 0}
#tournament-portal .portal-header{min-height:88px;display:grid;grid-template-columns:1fr auto 1fr;gap:10px;align-items:center;border-bottom:1px solid var(--line)}
#tournament-portal .portal-header>a{text-decoration:none;font-weight:700}#tournament-portal .portal-header>div{text-align:center}#tournament-portal .portal-header h1{font-size:1.7rem;margin:2px 0}#tournament-portal .portal-header span{font-size:.62rem;letter-spacing:.1em;color:var(--gold)}#tournament-portal .portal-header>button{justify-self:end}
#tournament-portal .hero,#tournament-portal .panel,#tournament-portal .details{border:1px solid var(--line);border-radius:18px;background:var(--panel);padding:22px}
#tournament-portal .hero{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:18px 0}#tournament-portal .hero>div:first-child{max-width:750px}#tournament-portal .hero h2{margin:8px 0;font-size:clamp(1.4rem,3vw,2rem);line-height:1.2}#tournament-portal .hero>div>span{font-size:.7rem;letter-spacing:.1em;color:var(--gold)}#tournament-portal .hero p{color:var(--muted)}#tournament-portal .hero-stat{flex-shrink:0;text-align:center}#tournament-portal .hero-stat strong,#tournament-portal .hero-stat span{display:block}#tournament-portal .hero-stat strong{font-size:2.2rem;color:var(--gold)}
#tournament-portal #portal-status{color:var(--muted);min-height:24px}#tournament-portal #portal-status.error{color:#ffb7ac}
#tournament-portal .inbox{margin:16px 0}#tournament-portal .section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}#tournament-portal .section-heading span,#tournament-portal .muted,#tournament-portal small{color:var(--muted)}
#tournament-portal .layout{display:grid;grid-template-columns:350px minmax(0,1fr);gap:16px;align-items:start}#tournament-portal .calendar,#tournament-portal .details{min-width:0}#tournament-portal .list{display:grid;gap:10px;padding:4px}
#tournament-portal .card{width:100%;display:block;padding:16px;text-align:left;background:var(--panel);border-radius:14px}#tournament-portal .card.active{border-color:var(--gold);background:#2a362b}#tournament-portal .card strong,#tournament-portal .card span{display:block;overflow-wrap:anywhere}#tournament-portal .card span{font-size:.85rem;color:var(--muted);margin-top:5px}#tournament-portal .card .tag{color:var(--gold)}
#tournament-portal .filters{display:flex;gap:10px;align-items:center;margin-bottom:10px}#tournament-portal select,#tournament-portal input{background:#101b13;color:var(--text);border:1px solid var(--line);border-radius:9px;padding:10px;min-width:0}#tournament-portal select{flex:1}#tournament-portal input{width:100%;min-height:44px}
#tournament-portal .facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}#tournament-portal .facts div{border:1px solid var(--line);border-radius:10px;padding:12px}#tournament-portal .facts dt{font-size:.8rem;color:var(--muted)}#tournament-portal .facts dd{margin:4px 0 0;font-weight:650;overflow-wrap:anywhere}
#tournament-portal .notice{background:#253426;border-left:3px solid var(--gold);padding:12px;border-radius:8px;margin:12px 0}#tournament-portal .actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}#tournament-portal .actions .primary,#tournament-portal .primary{background:var(--gold);color:#172117;font-weight:700}
#tournament-portal .invitation,#tournament-portal .member,#tournament-portal .match,#tournament-portal .pair{padding:12px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}#tournament-portal .invitation:last-child,#tournament-portal .member:last-child{border-bottom:0}#tournament-portal .invitation small{display:block}#tournament-portal .member{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}#tournament-portal .ready{color:#b5efb6}
#tournament-portal #partner-search{display:flex;gap:8px;margin:12px 0}#tournament-portal #partner-search input{flex:1}#tournament-portal #partner-results{display:grid;gap:8px}#tournament-portal #partner-results button{justify-content:space-between;text-align:left;overflow-wrap:anywhere}
#tournament-portal .group,#tournament-portal .round{padding:12px;border:1px solid var(--line);border-radius:12px;margin-top:12px}#tournament-portal .group h3,#tournament-portal .round h3{margin:0 0 8px}#tournament-portal .match div{display:flex;justify-content:space-between;gap:12px}#tournament-portal .match div span:first-child{min-width:0}#tournament-portal .match .winner{color:#b5efb6;font-weight:700}#tournament-portal .score{flex-shrink:0;font-variant-numeric:tabular-nums}
#tournament-portal .footnote{color:var(--muted);font-size:.85rem;margin-top:20px}#tournament-portal .message{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);max-width:min(620px,calc(100% - 28px));padding:14px 18px;border:1px solid var(--gold);border-radius:12px;background:#1c251e;z-index:10000;box-shadow:0 8px 32px #0008;display:none}#tournament-portal .message.visible{display:block}
@media(max-width:900px){#tournament-portal .layout{grid-template-columns:1fr}#tournament-portal .hero{align-items:flex-start}#tournament-portal .hero-stat{font-size:.8rem}}
@media(max-width:520px){#tournament-portal{width:calc(100% - 16px)}#tournament-portal .portal-header{grid-template-columns:auto 1fr auto}#tournament-portal .portal-header span{display:none}#tournament-portal .hero{display:block}#tournament-portal .hero-stat{display:flex;align-items:center;gap:12px;text-align:left;margin-top:15px}#tournament-portal .hero,#tournament-portal .panel,#tournament-portal .details{padding:15px}#tournament-portal .facts{grid-template-columns:1fr}#tournament-portal .actions>*{flex:1 1 auto}#tournament-portal #partner-search{flex-wrap:wrap}#tournament-portal #partner-search input{flex-basis:100%}}
