:root{--bg:#09111d;--card:#142236;--line:#304055;--gold:#e4ae39;--txt:#f6f5f1;--muted:#a9b4c3}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;color:var(--txt);background:var(--bg);font:15px/1.5 system-ui,-apple-system,Segoe UI,sans-serif}button,input,select{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}.wrap{max-width:1190px;margin:auto;padding:0 20px}.top{position:sticky;top:0;background:#07101cf2;border-bottom:1px solid #344359;z-index:10;backdrop-filter:blur(12px)}.topbar{height:72px;display:flex;justify-content:space-between;align-items:center}.brand{font-size:21px;font-weight:900;letter-spacing:.5px}.brand b,.brand span{color:var(--gold)}nav{display:flex;align-items:center;gap:20px}nav a{font-size:12px;font-weight:800}nav a:hover{color:var(--gold)}.outline,.ghostbtn{background:transparent;border:1px solid #d0a446;border-radius:8px;padding:11px 17px;color:var(--gold);font-weight:800}.goldbtn{display:inline-block;border:0;border-radius:8px;background:linear-gradient(125deg,#f9d46e,#d59a21);color:#17202c;padding:13px 19px;font-weight:900;text-align:center}.hero{position:relative;min-height:480px;display:grid;align-items:end}.heroimg{position:absolute;inset:0;background:url('portada.jpg') center 36% / cover no-repeat}.hero:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#09111d 2%,#09111d70 48%,#09111d26 100%)}.herooverlay{position:relative;z-index:1;max-width:1170px;width:100%;margin:auto;padding:35px 20px 45px;text-shadow:0 2px 8px #111}.hero h1{font-size:clamp(39px,7vw,70px);line-height:1;margin:8px 0;font-weight:950}.hero h1 em{color:var(--gold);font-style:normal}.hero h2{font-size:clamp(17px,3vw,27px);margin:8px 0}.hero h2 strong{color:var(--gold)}.herobuttons{display:flex;gap:10px;margin-top:20px;flex-wrap:wrap}.eyebrow{font-size:11px;font-weight:900;letter-spacing:2px;color:var(--gold)}.miniheading{font-weight:900;text-align:center;letter-spacing:1px;color:#e9d3a4;margin-bottom:13px;font-size:12px}.categories{margin-top:12px}.catgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.catcard{background:linear-gradient(130deg,#152335,#0b1421);border:1px solid var(--line);border-top:3px solid var(--accent);border-radius:12px;text-align:center;padding:14px}.catcard b{font-size:19px;color:var(--accent)}.catcard strong{font-size:27px;display:block}.section{padding-top:57px;padding-bottom:63px}.sectiontitle{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:21px}.section h2,.panel h2{margin:1px 0;font-size:clamp(24px,4vw,34px);line-height:1.2}.livebadge{color:#a0f0be;font-weight:800;font-size:10px}.livebadge i{display:inline-block;width:8px;height:8px;background:#47d47d;border-radius:100%;margin-right:5px}.filters{display:flex;gap:11px;flex-wrap:wrap;margin-bottom:21px}.filters label{font-weight:bold;color:var(--muted);font-size:12px}.filters select{display:block;min-width:185px;margin-top:5px}.filters select,input,select{background:#172539;color:white;border:1px solid #40516a;border-radius:8px;padding:11px}select:focus,input:focus{outline:2px solid var(--gold)}.matchgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}.matchcard{background:var(--card);border:1px solid var(--line);padding:16px;border-radius:12px}.matchtop{display:flex;justify-content:space-between;font-size:11px;color:#bbcadb;font-weight:800}.teamscore{display:grid;grid-template-columns:1fr auto 1fr;gap:9px;align-items:center;margin-top:17px}.team{font-weight:900;font-size:14px;text-align:center}.score{font-size:26px;font-weight:950;color:var(--gold);white-space:nowrap}.details{text-align:center;color:var(--muted);font-size:11px;border-top:1px solid var(--line);margin-top:14px;padding-top:10px}.tag{display:inline-block;padding:4px 9px;border-radius:6px;background:#23354e;font-size:10px;color:#cbd9eb}.tag.live{background:#163f2b;color:#8af4b3}.tag.finished{background:#4a3521;color:#f5c66c}.darksection{background:#101c2e;border-top:1px solid #304055;border-bottom:1px solid #304055}.hint{color:var(--muted)}.round{margin:15px 0;background:#16263a;border-radius:12px;border:1px solid #354762;overflow:hidden}.round summary{cursor:pointer;padding:17px;font-weight:900;display:flex;align-items:center;justify-content:space-between}.round .matchgrid{padding:0 15px 15px}.statstable{width:100%;border-collapse:collapse;min-width:680px}.statstable th,.statstable td{border-bottom:1px solid #34445b;padding:11px;text-align:center}.statstable th:nth-child(2),.statstable td:nth-child(2){text-align:left}.statstable th{color:#ecc36e;font-size:11px}.tablewrap{overflow:auto;border-radius:12px;border:1px solid var(--line);background:var(--card)}.signup{background:linear-gradient(110deg,#1f2f44,#0d1b2c);border:1px solid #6a532b;border-radius:16px;padding:27px;display:grid;grid-template-columns:1fr 1fr;gap:25px}.signup form{display:grid;gap:10px}.signup .check{font-size:12px;color:#d5dce6;display:flex;gap:8px;align-items:flex-start}.check input{width:16px;margin:2px 0}.signup small{color:var(--muted)}footer{background:#050c16;padding:32px 0;border-top:1px solid #2d3c50;font-weight:900;color:#d7b15b}footer span{float:right;font-weight:400;color:#a6b4c7}dialog{background:#121e2e;color:white;border:1px solid #5c7189;border-radius:16px;max-width:min(96vw,1020px);max-height:90vh;padding:0;width:100%}dialog::backdrop{background:#02060abf}.modal{max-width:440px;padding:29px;margin:auto;display:grid;gap:12px}.modal label{display:grid;gap:4px}.close{float:right;justify-self:end;background:transparent;color:white;border:none;font-size:24px}.panel{padding:25px;max-height:85vh;overflow:auto}.panelhead{display:flex;justify-content:space-between;align-items:center;gap:12px}.panelnav{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.panelnav button{border:1px solid #42556c;background:#1b3047;color:white;padding:10px 12px;border-radius:8px}.panelnav button.active{background:var(--gold);color:#15202a;font-weight:900}.panelbox{padding:15px;background:#17283b;border:1px solid #35455b;border-radius:10px;margin:11px 0}.panelbox h3{margin:0 0 10px}.inlineform{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:10px 0}.inlineform input{max-width:230px}.smallbutton{background:#d5a336;color:#121b29;border:0;border-radius:7px;padding:10px;font-weight:800}.danger{color:#f4b5a6}.empty{padding:30px;border:1px dashed #5b6b7a;border-radius:10px;text-align:center;color:#a9bbd0}@media(max-width:750px){nav{gap:8px}nav a{display:none}.topbar{height:59px}.brand{font-size:18px}.hero{min-height:380px}.catgrid{grid-template-columns:repeat(2,1fr)}.section{padding-top:40px;padding-bottom:40px}.signup{grid-template-columns:1fr}.livebadge{font-size:9px}.sectiontitle{align-items:start}footer span{float:none;display:block;margin-top:6px}.panel{padding:12px}.filters label{flex:1}.filters select{min-width:0;width:100%}.teamscore .score{font-size:21px}}

.configgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.configgrid label{display:flex;flex-direction:column;gap:6px;font-weight:700;color:#e3e8f0}.configgrid input,.configgrid textarea,.configgrid select{width:100%;max-width:none}.configgrid textarea{background:#172539;color:#fff;border:1px solid #40516a;border-radius:8px;padding:12px;font:inherit}.configgrid .wide{grid-column:1/-1}.uploadForm{background:#101d2d;padding:13px;border:1px solid #40516a;border-radius:10px}.uploadForm input{max-width:100%;font-size:12px}.editfilters{display:flex;gap:12px;flex-wrap:wrap}.editfilters label{display:grid;gap:5px}.editmatchform input{max-width:250px}.editmatchform button:disabled{opacity:.4;cursor:not-allowed}@media(max-width:650px){.configgrid{grid-template-columns:1fr}.panelnav{flex-wrap:nowrap;overflow-x:auto;padding-bottom:8px}.panelnav button{white-space:nowrap}}

.brand .udalogo{width:38px;height:38px;object-fit:contain;vertical-align:middle;margin-right:9px}

/* V5: Legibilidad, navegación táctil y formularios adaptables. */
:root{--txt:#eef2f7;--muted:#bbc7d5}
body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-size:16px;line-height:1.55;font-weight:400;-webkit-text-size-adjust:100%;overflow-x:hidden}
.brand{font-weight:650;letter-spacing:0}.hero h1{font-weight:750;line-height:1.07}.hero h2{font-weight:550}.eyebrow,.miniheading{font-weight:650;letter-spacing:1px}.section h2,.panel h2{font-weight:650}.team{font-weight:600}.score{font-weight:750}.round summary,.matchtop{font-weight:600}.statstable th,.panelbox h3{font-weight:600}.goldbtn,.smallbutton,.outline,.ghostbtn{font-weight:650}.catcard b{font-weight:650}.catcard strong{font-weight:700}.panelnav button.active{font-weight:650}.tag{font-weight:550}
button,input,select,textarea{font-family:inherit;font-size:inherit}input,select,textarea{min-height:44px}button{min-height:42px}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #ffe18a;outline-offset:2px}.panelbox,.matchcard{min-width:0}.usercards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:12px}.usergrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end}.usergrid label{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:14px;color:#e5eefa}.usergrid input,.usergrid select{width:100%;max-width:none}.usergrid button{align-self:end}.usercard-title{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:12px;overflow-wrap:anywhere}.check-user{display:flex!important;flex-direction:row!important;align-items:center;gap:9px}.check-user input{width:auto;min-height:0;accent-color:#e4ae39}.panelnav{position:sticky;top:0;background:#121e2e;z-index:2;padding:8px 0}.panelnav button{font-weight:500}.panel p,.hint{overflow-wrap:anywhere}
@media(max-width:800px){.wrap{padding-left:14px;padding-right:14px}.topbar{gap:8px}.brand{font-size:clamp(14px,3.8vw,19px);white-space:nowrap}nav{min-width:0}nav button{padding:9px 10px;max-width:44vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.heroimg{background-position:48% center}.herooverlay{padding:28px 17px 35px}.hero h1{font-size:clamp(34px,9vw,58px)}.catgrid{gap:8px}.catcard{padding:10px 5px}.catcard b{font-size:15px}.catcard strong{font-size:23px}.matchgrid{grid-template-columns:repeat(auto-fit,minmax(min(100%,285px),1fr))}.sectiontitle{flex-wrap:wrap}.section h2{font-size:clamp(23px,6vw,32px)}.panel{padding:14px;max-height:calc(100dvh - 28px)}dialog{max-height:calc(100dvh - 20px);max-width:calc(100vw - 12px)}.inlineform input{max-width:100%}.editmatchform input{max-width:100%}.panelbox{padding:13px}.signup{padding:18px}.filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.filters label{min-width:0}}
@media(max-width:480px){.filters{grid-template-columns:1fr}.usergrid{grid-template-columns:1fr}.hero{min-height:345px}.catcard b{font-size:13px}.catcard strong{font-size:21px}.teamscore{gap:5px}.teamscore .team{font-size:13px}.teamscore .score{font-size:21px}.panelhead h2{font-size:22px}.panelhead .outline{padding:7px 9px;font-size:12px}.modal{padding:20px}.matchtop{gap:8px;flex-wrap:wrap}.round summary{gap:8px;flex-wrap:wrap}}

/* V6 - Botón de cierre de sesión junto al usuario autenticado. */
.topbar nav{min-width:0;gap:clamp(7px,1.2vw,20px)}
.header-logout{border:1px solid #db9e52;background:#35201d;color:#ffdebe;border-radius:8px;padding:10px 15px;font-size:13px;font-weight:650;white-space:nowrap;min-height:44px}
.header-logout:hover{background:#63302a;color:#fff}
.header-logout:disabled{opacity:.55;cursor:wait}
.header-logout[hidden]{display:none!important}
@media(max-width:800px){.topbar{height:auto;min-height:64px;padding-top:8px;padding-bottom:8px;flex-wrap:wrap}.topbar nav{margin-left:auto;flex-wrap:wrap;justify-content:flex-end;gap:7px}.topbar nav #access{max-width:min(53vw,310px)}.header-logout{padding:9px 11px;font-size:12px;min-height:40px}}
@media(max-width:420px){.topbar .brand{font-size:15px}.topbar nav{width:100%;justify-content:space-between}.topbar nav #access{max-width:calc(100% - 92px);flex:1}.header-logout{flex:0 0 auto}}
