:root{color-scheme:light;--bg:#edf6fd;--surface:#ffffff;--raised:#ffffff;--border:#cbddea;--text:#16202a;--muted:#40566b;--accent:#47216f;--soft:#e5f2ff;--danger:#973443;--sidebar:246px;--blue:#b9defb;--purple:#47216f;--ink:#111318;font-family:Segoe UI,Arial,sans-serif;font-synthesis:none}
.auth-shell{min-height:100vh;display:grid;place-items:center;padding:24px}
.auth-card{width:min(100%,480px)}
.auth-card form,.account-card form{display:grid;gap:16px}
.auth-card h1{font-size:30px}
.auth-version{margin-top:24px;font-size:11px}
.brand-name{max-width:154px;font-size:12px;letter-spacing:.1px;font-weight:700;line-height:1.4}
#auth-error{color:var(--danger);margin:0}
.account-card{max-width:640px}
.account-grid,.user-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px;align-items:end}
.user-row{padding:20px 0;border-bottom:1px solid var(--border)}
.user-row>b{grid-column:1/-1}
#private-link{margin-top:20px;overflow-wrap:anywhere}
#private-link input{width:100%;margin-bottom:10px}
.edit-conflict{margin-bottom:18px}
.edit-conflict pre{max-height:260px;overflow:auto}
.sidebar{overflow-y:auto}

*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font-size:14px;line-height:1.55}
button,input,select,textarea{font:inherit}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
button{cursor:pointer}
button:disabled{opacity:.45;cursor:wait}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
button{border:0}
h1,h2,h3,p{margin-top:0}
h1{font-size:36px;letter-spacing:-1.1px;line-height:1.2;margin-bottom:10px;font-weight:740}
h2{font-size:19px;letter-spacing:-.4px;margin-bottom:12px;line-height:1.3}
h3{font-size:15px;margin-bottom:12px}
p{color:var(--muted);margin-bottom:16px}
small{font-size:12px;color:var(--muted)}
code{background:#ebf2f9;padding:3px 6px;border-radius:4px;font-size:12px;color:#47216f}
pre{white-space:pre-wrap;word-break:break-word;color:var(--muted);font-size:12px}
b,strong{font-weight:650}
.accent{color:var(--accent)}

.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar);padding:32px 22px 22px;border-right:1px solid var(--border);display:flex;flex-direction:column;background:#dceeff;z-index:10}
.brand{display:flex;align-items:center;gap:12px;color:var(--text);font-size:10px;letter-spacing:1.2px;line-height:1.6}
.brand:hover{text-decoration:none}
.brand strong{font-size:13px;letter-spacing:1.1px}
.brand-mark{display:block;border:1px solid #badbf5;border-radius:8px;font-size:20px;letter-spacing:-1px;padding:8px;color:var(--accent);font-weight:800}
.brand-mark span{font-size:13px}
.workspace{margin:40px 0 30px;padding:13px 10px;background:var(--surface);border:1px solid var(--border);border-radius:9px;display:flex;align-items:center;gap:10px}
.workspace small{display:block;font-size:10px}
.workspace b{font-size:12px;letter-spacing:1px}
.workspace-icon{display:grid;place-items:center;width:32px;height:34px;background:var(--soft);border-radius:7px;color:var(--accent);font-weight:750}
.dot{width:6px;height:6px;background:var(--accent);border-radius:50%;display:inline-block}
.workspace>.dot{margin-left:auto}
nav{display:flex;flex-direction:column;gap:6px}
nav button{display:flex;gap:15px;text-align:left;align-items:center;background:transparent;color:#40566b;font-size:13px;padding:13px 12px;border-radius:7px}
nav button>span{color:#52687c;font-size:10px;letter-spacing:1px}
nav button.active{color:var(--accent);background:#e5f2ff}
nav button.active>span{color:#47216f}
nav button:hover{background:var(--raised)}
nav em{font-size:10px;font-style:normal;margin-left:auto;background:#e9f3fc;padding:1px 6px;border-radius:5px}
.sidebar-bottom{margin-top:auto;padding-top:40px;font-size:11px}
.sidebar-bottom p{font-size:11px;margin-top:14px}
.local-pill{color:#47216f;letter-spacing:1px;font-size:9px}
.local-pill>.dot{margin-right:6px}
.sidebar-bottom a{color:var(--muted)}

.main-shell{margin-left:var(--sidebar);min-height:100vh;display:flex;flex-direction:column}
.topbar{height:69px;padding:0 36px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;gap:15px;font-size:10px;color:var(--muted);letter-spacing:.35px}
.topbar i{font-style:normal;margin:0 12px;color:#52687c}
.topbar b{color:#40566b;font-weight:500}
.topbar>div{font-size:11px;letter-spacing:0;display:flex;align-items:center;gap:8px}
.status-dot{width:6px;height:6px;border-radius:50%;background:#735221;display:inline-block}
.status-dot.on{background:var(--accent)}
main{width:100%;max-width:1680px;margin:0 auto;padding:37px 36px 24px;flex:1}
.heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:26px}
.heading p{margin-bottom:0;font-size:13px}
.eyebrow{color:var(--accent);font-size:10px;font-weight:650;letter-spacing:1.7px;margin-bottom:12px}
.card{border:1px solid var(--border);background:var(--surface);border-radius:12px;padding:23px}
.primary{background:var(--accent);color:#ffffff;padding:11px 18px;border-radius:6px;font-weight:650;font-size:12px;white-space:nowrap;min-height:40px}
.primary:hover{background:#e9dcf6}
.quiet{background:transparent;color:#40566b;padding:8px 0;font-size:12px}
.quiet:hover{color:var(--accent)}
.badge{font-size:10px;line-height:1.5;border:1px solid #badbf5;background:#eae1f6;color:#47216f;border-radius:20px;padding:4px 10px;white-space:nowrap}
.badge.success{color:var(--accent);border-color:#c8b4dc}
.filters{padding:17px 20px;margin-bottom:24px;background:#f6fbff}
.filter-line{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}
.filter-line label{flex:1;min-width:120px}
.filter-line label:first-child{min-width:140px}
.filter-line .reset{margin-left:auto;min-height:37px;font-size:11px}
.filters label,label{display:flex;flex-direction:column;font-size:10px;gap:6px;color:#40566b;font-weight:500}
input,select,textarea{background:#ffffff;border:1px solid #cbddea;border-radius:5px;padding:9px 10px;min-width:0;color:#16202a;width:100%;font-size:12px}
select{cursor:pointer}
textarea{resize:vertical}
input::placeholder,textarea::placeholder{color:#52687c}
input[type=checkbox]{width:auto;accent-color:var(--accent)}
input[type=file]{font-size:11px;padding:8px}
input::file-selector-button{background:#ebf2f9;color:var(--text);border:0;border-radius:4px;margin-right:12px;padding:7px;cursor:pointer}
summary{cursor:pointer;font-size:12px;color:#40566b;padding:12px 0}
summary span{margin-left:12px;color:var(--muted);font-size:10px}
.filters details{border-top:1px solid var(--border);margin-top:14px}
.filters summary{padding-bottom:0}
.filters details[open] summary{padding-bottom:12px}
.lineup-options{display:flex;align-items:center;gap:20px;margin-bottom:12px}
.lineup-options>select{width:auto;min-width:200px}
label.inline{flex-direction:row;align-items:center;gap:10px}
.chips{display:flex;flex-wrap:wrap;gap:7px}
.chip{background:#e9f3fc;border:1px solid #cbddea;border-radius:5px;color:#40566b;font-size:11px;padding:7px 11px}
.chip.selected{color:var(--accent);background:#e5f2ff;border-color:#badbf5}
.chip.mini{padding:4px 8px;font-size:10px}
.hint{font-size:11px;color:#52687c;line-height:1.65;margin-top:12px;margin-bottom:0}
.notice{padding:16px 20px;background:#faf5e6;border:1px solid #bda875;border-radius:8px;color:#735221;font-size:12px;margin:0 0 22px}
.notice p{color:inherit;margin:5px 0 0;font-size:12px}
.notice.danger{border-color:#dbb2b8;background:#f8eff0;color:#973443}
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:30px}
.kpis .card{padding:19px 22px}
.kpis span{font-size:9px;color:var(--muted);letter-spacing:1px;display:block}
.kpis strong{font-size:40px;letter-spacing:-1.5px;display:block;margin:3px 0 0;line-height:1.45}
.kpis strong em{font-style:normal;font-size:20px;color:#52687c;letter-spacing:-.5px}
.kpis small{font-size:10px;display:block}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.section-title h2{margin:0;font-size:16px}
.section-title>span,.section-title>a{font-size:10px;color:var(--muted)}
.section-title>a:hover{color:var(--accent)}
.highlights{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:24px}
.highlight{padding:14px 14px 12px;border:1px solid var(--border);border-radius:8px;background:#f6fbff;min-width:0}
.highlight:first-child{border-color:#badbf5;background:#e5f2ff;grid-column:span 2;position:relative}
.highlight:first-child:after{content:'DESTAQUE / ADR';position:absolute;right:15px;top:16px;font-size:8px;letter-spacing:1px;color:#47216f}
.highlight span{display:block;font-size:10px;color:var(--muted);white-space:nowrap}
.highlight strong{font-size:25px;color:#16202a;display:block;letter-spacing:-.6px;line-height:1.5}
.highlight:first-child strong{color:var(--accent)}
.highlight small{display:block;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#40566b}
.stats-card{padding:21px 22px 12px;margin-bottom:22px}
.table-scroll{overflow-x:auto;width:100%;scrollbar-width:thin;scrollbar-color:#8da9be transparent}
table{width:100%;border-collapse:collapse;font-size:12px;font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}
th{font-weight:500;color:#52687c;font-size:9px;letter-spacing:.4px;padding:12px 10px;background:#e9f3fc;border-bottom:1px solid #cbddea}
th:first-child,td:first-child{text-align:left}
td{padding:15px 10px;border-bottom:1px solid #cbddea;color:#40566b}
td:first-child{color:#16202a}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover td{background:#e9f3fc}
.rank{color:#52687c;font-size:9px;display:inline-block;width:22px}
td.number{font-weight:700}
.table-note{font-size:10px;line-height:1.6;margin-top:13px;margin-bottom:2px;color:#52687c}
.bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:24px}
.bottom-grid h2{font-size:18px}
.bottom-grid p{font-size:12px;margin-bottom:8px;line-height:1.75}
.bottom-grid .eyebrow{font-size:9px}
.swing{background:linear-gradient(120deg,#e5f2ff,#e5f2ff);border-color:#badbf5}
.swing h2{color:#47216f}
.page-footer{border-top:1px solid var(--border);margin:18px 36px 0;padding:18px 0;display:flex;justify-content:space-between;gap:15px;font-size:9px;color:#52687c}
.page-footer>span{text-align:right}
.empty{padding:55px 35px;text-align:center}
.empty p{max-width:620px;margin:12px auto 22px;font-size:13px}
.empty.tall{padding:70px 25px}
.empty-symbol{font-weight:800;color:#47216f;font-size:28px;letter-spacing:10px;margin-bottom:20px}

.match-list{display:flex;gap:10px;overflow-x:auto;margin-bottom:20px}
.match-pill{background:#f6fbff;border:1px solid var(--border);border-radius:8px;color:var(--text);text-align:left;min-width:220px;max-width:330px;padding:14px 16px;display:grid;grid-template-columns:1fr auto;gap:5px 24px}
.match-pill.active{border-color:#badbf5}
.match-pill span{color:var(--muted);font-size:10px;grid-column:1/-1}
.match-pill b{font-size:12px}
.match-pill strong{color:var(--accent)}
.match-hero{display:flex;justify-content:space-between;align-items:center;gap:35px;padding:33px;margin-bottom:22px;background:linear-gradient(120deg,#e9f3fc,#e5f2ff 70%,#e5f2ff)}
.match-hero h2{font-size:44px;margin-bottom:6px;letter-spacing:-1.7px}
.match-hero p{font-size:11px;margin-bottom:20px}
.match-hero .eyebrow{font-size:9px}
.scoreboard{text-align:center;display:flex;flex-direction:column;min-width:250px;padding:0 18px}
.scoreboard>span{font-size:12px;color:#47216f}
.scoreboard strong{font-size:70px;line-height:1.3;letter-spacing:-3px;color:#16202a;font-weight:750}
.scoreboard i{font-style:normal;font-size:38px;padding:0 14px;color:#8da9be}
.rounds-card{margin-bottom:22px}
.rounds{display:flex;gap:5px;overflow:auto;padding-bottom:4px}
.round{display:flex;flex:1;min-width:25px;flex-direction:column;text-align:center;gap:7px;padding:7px 3px;border-radius:4px;border:1px solid #dbb2b8;background:#f8eff0;color:#973443;font-size:10px}
.round.won{border-color:#c8b4dc;background:#eae1f6;color:var(--accent)}
.round span{font-size:9px;opacity:.7}
.round b{font-size:12px}
.round small{font-size:8px;color:inherit}
.round.switch{margin-left:10px}
.roster-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.player-card{padding:22px}
.player-top{display:flex;gap:13px;align-items:center;margin-bottom:18px}
.avatar{width:43px;height:43px;border:1px solid #badbf5;border-radius:9px;background:#e5f2ff;display:grid;place-items:center;color:#47216f;font-size:14px;font-weight:750}
.player-card h2{margin:0 0 4px;font-size:17px;overflow-wrap:anywhere}
.player-card .badge{font-size:8px;padding:3px 6px}
.player-card dl{margin:16px 0;font-size:10px}
.player-card dt{color:#52687c;letter-spacing:.5px;font-size:9px}
.player-card dd{margin:2px 0 11px;color:#40566b;overflow-wrap:anywhere}
.player-card a{font-size:10px}
.player-card .hint{font-size:10px}

.toolbar{display:flex;gap:15px;align-items:flex-end;margin-bottom:22px}
.toolbar label{min-width:200px}
.defaults-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.default-card{display:flex;flex-direction:column;min-width:0}
.default-card h2{font-size:22px;overflow-wrap:anywhere}
.default-card p{font-size:12px;overflow-wrap:anywhere}
.default-card .section-title>span{color:var(--accent)}
.default-card details{border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin-bottom:14px}
.prewrap{white-space:pre-wrap}
.role-line{padding:11px 0;border-bottom:1px solid #cbddea;display:flex;flex-direction:column;gap:4px;font-size:11px;overflow-wrap:anywhere}
.role-line b{color:#40566b}
.role-line b small{font-size:10px;margin-left:10px;font-weight:400}
.role-line>span{color:var(--muted)}
.video-area{margin-top:18px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;font-size:11px}
.video-button{background:#eae1f6;border:1px solid #c8b4dc;color:var(--accent);padding:12px 20px;border-radius:7px}
.video-area iframe{width:100%;aspect-ratio:16/9;border:0;border-radius:6px}
.prints{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:16px}
.prints img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:5px;border:1px solid var(--border)}
.default-card footer{margin-top:auto;padding-top:20px;font-size:9px;display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;color:var(--muted)}
.default-card footer div{display:flex;gap:16px}
.step-number{font-size:11px;color:var(--accent);letter-spacing:2px;display:inline-block;border:1px solid #badbf5;border-radius:5px;padding:6px 10px;margin-bottom:18px}
.import-grid{margin-top:0}
.import-grid>.card>p{margin-bottom:18px}
.import-grid button.primary{margin-top:20px}
.dropzone{display:flex;align-items:center;justify-content:center;border:1px dashed #badbf5;border-radius:8px;background:#e5f2ff;min-height:135px;padding:15px;text-align:center;cursor:pointer}
.dropzone strong{font-size:14px;color:#47216f}
.dropzone span{font-size:10px}
.dropzone input{margin-top:6px;border:0;background:transparent;max-width:100%}
.setup-steps{background:#f6fbff;padding:12px 15px;border-radius:6px;margin-bottom:14px}
.setup-steps p{font-size:11px;margin:0 0 9px}
.setup-steps p:last-child{margin:0}
.setup-steps b{color:#47216f}
.import-grid label{margin-top:16px}
.progress-card{margin:22px 0}
.progress-card p{font-size:11px;margin:10px 0 0;overflow-wrap:anywhere}
progress{display:block;width:100%;height:5px;border:none;border-radius:10px;overflow:hidden;background:#ebf2f9;accent-color:var(--accent)}
progress::-webkit-progress-bar{background:#ebf2f9}
progress::-webkit-progress-value{background:var(--accent)}
.api-details{padding:6px 0;border-top:1px solid var(--border)}
.api-details p{font-size:11px}
.api-details a{font-size:11px}
.api-details pre{max-height:320px;overflow:auto;background:#f6fbff;padding:15px}

dialog{padding:28px;max-width:860px;width:calc(100% - 40px);max-height:calc(100vh - 60px);border:1px solid #badbf5;border-radius:13px;background:#ffffff;color:var(--text);box-shadow:0 20px 90px #14283e25}
dialog::backdrop{background:#09162588;backdrop-filter:blur(3px)}
dialog .section-title{margin-bottom:24px}
dialog .section-title h2{font-size:24px}
dialog label{font-size:11px;margin-bottom:16px}
dialog .eyebrow{font-size:9px}
dialog h3{margin-top:26px}
dialog .hint{margin:5px 0 18px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}
.role-editor{display:grid;grid-template-columns:1fr 1fr 1.5fr;gap:8px;margin-bottom:10px}
.role-editor:last-of-type{margin-bottom:18px}
.form-actions{display:flex;justify-content:flex-end;align-items:center;gap:24px;border-top:1px solid var(--border);padding-top:22px;margin-top:20px}
.existing-images{display:flex;gap:12px;flex-wrap:wrap}
.image-option{width:110px}
.image-option img{width:100%;height:80px;object-fit:cover;border-radius:5px}
.image-option>span{display:flex;gap:5px;align-items:center}
.history-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 0;border-bottom:1px solid var(--border);font-size:13px}
.history-row p{margin:5px 0 0;font-size:11px}
#toast{position:fixed;bottom:25px;left:calc(var(--sidebar) + 30px);max-width:calc(100vw - var(--sidebar) - 60px);padding:14px 20px;border-radius:8px;border:1px solid #c8b4dc;color:#34204e;background:#eae1f6;box-shadow:0 12px 40px #17344a18;z-index:100;transform:translateY(150px);opacity:0;transition:transform .2s,opacity .2s;font-size:13px}
#toast.show{transform:translateY(0);opacity:1}
#toast.error{border-color:#dbb2b8;background:#f8eff0;color:#973443}
.loading{margin:80px auto;padding:40px;max-width:750px}
.loading p{font-size:14px}
noscript{display:block;padding:30px;color:var(--danger)}

@media(min-width:1550px){.highlights{grid-template-columns:repeat(12,minmax(0,1fr))}
.highlight{padding:15px 12px}
.highlight:first-child:after{display:none}
.roster-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.player-card{padding:18px}
.player-top{flex-direction:column;align-items:flex-start}
.player-card h2{font-size:15px}
}

@media(max-width:1250px){:root{--sidebar:210px}
.sidebar{padding:26px 16px}
.brand{gap:8px;font-size:9px}
.brand strong{font-size:11px}
.topbar{padding:0 25px}
main{padding:30px 25px 20px}
.heading h1{font-size:31px}
.kpis{gap:10px}
.kpis .card{padding:18px 15px}
.highlights{gap:9px}
.highlight{padding:12px 10px}
.highlight:first-child:after{display:none}
.roster-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.match-hero{gap:15px}
.scoreboard{min-width:200px}
.scoreboard strong{font-size:58px}
.page-footer{margin-left:25px;margin-right:25px}
}

@media(max-width:980px){:root{--sidebar:184px}
.brand-mark{font-size:17px;padding:7px}
.brand strong{font-size:9px}
.brand{font-size:8px}
.workspace{padding:10px 8px}
.workspace small{font-size:8px}
nav button{padding:12px 7px;gap:9px;font-size:12px}
.topbar{font-size:9px}
.topbar>div{font-size:9px}
.topbar>span{max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.heading{align-items:flex-start}
.heading h1{font-size:27px}
.heading .primary{font-size:11px;padding:9px 12px}
.heading>span.badge{white-space:normal;max-width:190px;text-align:center}
.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
.highlights{grid-template-columns:repeat(4,minmax(0,1fr))}
.highlight:first-child{grid-column:auto}
.highlight:last-child{grid-column:span 2}
.bottom-grid,.defaults-grid{grid-template-columns:1fr}
.scoreboard{min-width:155px;padding:0}
.scoreboard strong{font-size:50px}
.match-hero h2{font-size:37px}
.page-footer{flex-direction:column;gap:5px}
.page-footer>span{text-align:left}
.section-title>span{max-width:45%;text-align:right}
.match-hero .eyebrow{font-size:8px}
.role-editor{grid-template-columns:1fr 1fr}
.role-editor input:last-child{grid-column:1/-1}
.round{min-width:26px}
}

@media(max-width:700px){:root{--sidebar:0px}
.sidebar{position:static;width:100%;height:auto;padding:16px 18px 0;border-right:0;border-bottom:1px solid var(--border);display:block}
.brand{font-size:9px}
.brand strong{font-size:12px}
.brand-mark{font-size:21px}
.workspace{display:none}
.sidebar-bottom{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:0;padding:8px 0 12px}
.sidebar-bottom>p{margin:0;font-size:11px}
.sidebar-bottom>.hint{flex-basis:100%;margin:0}
.sidebar-bottom>.local-pill{font-size:10px}
nav{flex-direction:row;overflow-x:auto;gap:4px;margin:18px -4px 0;padding-bottom:10px}
nav button{white-space:nowrap;padding:9px 10px;font-size:11px;gap:7px}
nav button>span{font-size:8px}
nav em{font-size:8px}
.main-shell{margin-left:0}
.topbar{height:45px;padding:0 18px;font-size:8px}
.topbar i{margin:0 6px}
.topbar>div{font-size:8px}
main{padding:25px 18px 15px}
.heading{gap:10px;margin-bottom:22px;flex-wrap:wrap}
.heading h1{font-size:29px}
.heading p{font-size:12px}
.heading>.primary{margin-top:6px}
.eyebrow{font-size:9px}
.filters{padding:13px 14px}
.filter-line{gap:10px}
.filter-line label,.filter-line label:first-child{min-width:calc(50% - 10px);flex:1}
.filter-line label:nth-child(5){flex:1}
.filter-line .reset{margin-left:0;font-size:10px}
.lineup-options{flex-direction:column;align-items:stretch;gap:10px}
.lineup-options>select{width:100%}
.lineup-options .inline>select{flex:1}
.chip{font-size:10px;padding:6px 9px}
.kpis{margin-bottom:25px;gap:10px}
.kpis strong{font-size:34px}
.kpis span{font-size:8px}
.kpis small{font-size:9px}
.highlights{grid-template-columns:repeat(3,minmax(0,1fr))}
.highlight{padding:12px 9px}
.highlight span{font-size:9px}
.highlight:first-child{grid-column:span 2}
.highlight:last-child{grid-column:auto}
.highlight strong{font-size:25px}
.highlight small{font-size:9px}
.section-title{gap:8px}
.section-title h2{font-size:15px}
.section-title>span,.section-title>a{font-size:9px}
.card{padding:19px}
.stats-card{padding:18px 14px 10px}
.bottom-grid{gap:16px;margin-top:20px}
.bottom-grid h2{font-size:17px}
.page-footer{margin:18px 18px 0;padding:15px 0;font-size:8px}
.table-scroll{margin-top:5px}
td{padding:13px 8px;font-size:11px}
.rank{width:16px}
th{padding:11px 8px}
.match-hero{flex-direction:column;align-items:stretch;gap:25px;padding:23px}
.scoreboard{border-top:1px solid #badbf5;padding-top:20px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px}
.scoreboard strong{font-size:38px;letter-spacing:-1.5px}
.scoreboard i{font-size:27px;padding:0 8px}
.scoreboard>span{font-size:10px;overflow-wrap:anywhere}
.scoreboard>span:first-child{text-align:left}
.scoreboard>span:last-child{text-align:right}
.rounds-card .section-title{align-items:flex-start}
.roster-grid{grid-template-columns:1fr;gap:13px}
.toolbar{flex-direction:column;align-items:stretch;gap:10px}
.toolbar label{min-width:0}
.default-card h2{font-size:21px}
.default-card footer{align-items:flex-start;flex-direction:column}
.form-grid{grid-template-columns:1fr}
.role-editor{padding:10px 0;border-bottom:1px solid var(--border)}
dialog{padding:20px;width:calc(100% - 24px);max-height:calc(100dvh - 24px)}
dialog .section-title h2{font-size:22px}
.notice{padding:14px;font-size:11px}
.notice p{font-size:11px}
#toast{left:16px;right:16px;max-width:none;bottom:16px;font-size:12px}
.empty.tall{padding:45px 20px}
.loading{margin:30px auto;padding:25px}
.loading h1{font-size:26px}
}

@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}
}

/* Keep content and essential actions reachable at narrow widths. */
.card,.heading>* ,.section-title>*{min-width:0}
.card h1,.card h2,.card h3,.section-title{overflow-wrap:anywhere}
.section-title,.form-actions,.pagination{flex-wrap:wrap}
.section-title>.badge{max-width:100%;white-space:normal;text-align:left}
fieldset{min-width:0}
.table-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:768px){
  .heading{flex-wrap:wrap}
  .primary{white-space:normal;overflow-wrap:anywhere}
  .form-actions{gap:12px}
}
@media(max-width:700px){
  .sidebar-bottom>button,.study-actions>button,.form-actions>button,[data-operations-root] button,[data-match-status-host] button{min-height:44px}
  .sidebar-bottom>button{margin:0;padding:10px 6px}
}


.player-card>code{display:block;font-size:10px;overflow-wrap:anywhere;padding:8px;margin:12px 0}
.player-card>a{display:inline-block;margin-top:6px}
.player-card>p{font-size:11px;margin-top:8px}
.filter-line.compact{margin-bottom:22px;max-width:540px}
.notice.subtle{background:#e9f3fc;border-color:#cbddea;color:#40566b}


/* CSTC 0.1.1 — light blue / black / deep purple identity. */
:root { --text: #111318; }
body { background: linear-gradient(145deg, #edf6fd, #f8fbff 75%); }
.sidebar { background: #dfedfa; border-color: #c2d9eb; }
.brand-mark { background: #111318; color: #b9defb; border-color: #111318; }
.brand-mark span { color: #cab6e2; }
.brand, .brand strong { color: #111318; }
.workspace { background: #f5faff; }
.workspace-icon { background: #bedffa; color: #111318; }
nav button { color: #344b60; }
nav button.active { color: #111318; background: #b9defb; box-shadow: inset 3px 0 #47216f; font-weight: 650; }
nav button.active > span { color: #47216f; }
nav button:hover { background: #cce6fb; }
.topbar { background: #f6fbff; }
.topbar b { color: #111318; }
.card { box-shadow: 0 3px 16px #153b5c04; }
.primary { background: #111318; color: #ffffff; border: 1px solid #111318; display: inline-block; text-align: center; }
.primary:hover { background: #47216f; border-color: #47216f; text-decoration: none; }
.primary:disabled { cursor: not-allowed; }
a { color: #47216f; }
code { color: #47216f; background: #eaf3fb; overflow-wrap: anywhere; }
.filters { background: #f7fbff; }
input, select, textarea { background: #ffffff; border-color: #bed2e4; color: #111318; }
input::file-selector-button { background: #d7edff; color: #111318; }
input::placeholder, textarea::placeholder { color: #64768a; }
.badge { background: #f1ebf8; color: #47216f; border-color: #d0c0e3; }
.badge.success { background: #e2f2ff; color: #243f59; border-color: #9fccec; }
.highlight { background: #ffffff; }
.highlight:first-child { background: #dcedfc; border-color: #a9cce6; }
.highlight:first-child:after { color: #47216f; }
.highlight strong, .kpis strong { color: #111318; }
.highlight:first-child strong { color: #47216f; }
.highlight small { color: #344b60; }
th { background: #eaf4fc; color: #3d566b; }
td, td:first-child { color: #18222c; }
tbody tr:hover td { background: #f0f8ff; }
.table-note, .hint { color: #53687b; }
.chip.selected { color: #111318; background: #cbe7ff; border-color: #86b9dc; }
.match-hero { background: linear-gradient(110deg, #e4f3ff, #f5faff 65%, #ede5f7); }
.scoreboard strong { color: #111318; }
.scoreboard > span { color: #384f64; }
.round.won { background: #cbe5fa; color: #172c3d; border-color: #90bfe1; }
.round.lost { background: #eee7f5; color: #563478; border-color: #c7b1dc; }
.avatar { background: #d9edff; border-color: #a9cde8; color: #111318; }
.swing { background: linear-gradient(120deg, #edf3fc, #f4effa); border-color: #d3c7e0; }
.swing h2 { color: #111318; }
.dropzone { background: #f0f8ff; border-color: #80b7df; }
.dropzone strong, .setup-steps b { color: #111318; }
.step-number { background: #e1f1fd; border-color: #acd0ed; color: #47216f; }
.notice.subtle { color: #29475f; background: #edf6ff; border-color: #c0d9ed; }
.api-details pre { background: #f2f6fb; color: #344b60; }
dialog { background: #ffffff; border-color: #b4cfe3; }
#toast { color: #ffffff; background: #47216f; border-color: #5f3688; }
#toast.error { background: #782a3b; color: #ffffff; border-color: #9c4957; }
.impact-hero { margin: 0 0 27px; background: linear-gradient(105deg, #daeeff, #edf6ff 64%, #eae0f4); border-color: #b6d5ee; display: flex; gap: 28px; align-items: center; justify-content: space-between; padding: 25px 27px; }
.impact-hero h2 { font-size: 23px; letter-spacing: -.6px; margin-bottom: 9px; }
.impact-hero p { max-width: 750px; margin-bottom: 10px; font-size: 12px; color: #364e63; }
.impact-hero small { color: #52687b; font-size: 10px; }
.impact-action { display: flex; flex-direction: column; gap: 14px; align-items: flex-end; flex-shrink: 0; }
.impact-heading { color: #47216f; font-weight: 650; }
.impact-cell { text-align: center; }
.metric-empty { color: #8496a7; }
.raw-metric { color: #47216f; font-weight: 650; }
.metric-caption { font-size: 8px; display: block; color: #5c4772; }
.api-wizard { margin-bottom: 22px; padding: 26px; }
.wizard-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 26px; margin: 23px 0; }
.wizard-step { min-width: 0; }
.wizard-step .step-number { margin-bottom: 13px; }
.wizard-step p { font-size: 12px; line-height: 1.8; margin-bottom: 0; }
.wizard-step p b { color: #202733; }
.connection-check { display: flex; justify-content: space-between; align-items: center; gap: 25px; }
.connection-check h3 { margin: 0 0 6px; }
.connection-check p { font-size: 12px; margin: 0; }
.api-wizard .notice { margin-bottom: 22px; }
.report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin: 15px 0; }
.api-details .primary { color: #ffffff; font-size: 11px; }
@media (max-width: 1100px) {
  .impact-hero { align-items: flex-start; flex-direction: column; gap: 18px; }
  .impact-action { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .wizard-grid { grid-template-columns: 1fr; gap: 18px; }
  .wizard-step { border-bottom: 1px solid #d5e3ee; padding-bottom: 18px; }
  .wizard-step:last-child { border: 0; padding: 0; }
}
@media (max-width: 700px) {
  .impact-hero { padding: 20px; }
  .impact-hero h2 { font-size: 22px; }
  .impact-action { align-items: flex-start; flex-direction: column; }
  .api-wizard { padding: 20px; }
  .connection-check { flex-direction: column; align-items: flex-start; gap: 17px; }
  .connection-check > button { width: 100%; }
}

/* v0.2.0 · data preservation workspace */
.source-notice{margin-bottom:20px;background:#e3f0fc;border-left:4px solid var(--purple)}
.source-notice p{margin:6px 0 0}.source-notice .quiet{padding:3px 8px}
.data-explorer{padding:24px;margin:24px 0}.data-explorer .filter-line{margin-bottom:18px;flex-wrap:wrap}
.wide-label{flex:1;min-width:250px}.data-search{display:flex;align-items:end;gap:8px;flex:1;min-width:210px}.data-search label{flex:1}
.data-table{min-width:760px}.data-table small,.archive-card td small{display:block;margin-top:4px}
.data-table td{vertical-align:top}.data-table details{margin-top:6px;font-size:11px}.data-table details code{display:block;max-width:420px;white-space:normal;overflow-wrap:anywhere}
.data-table .raw-value code{white-space:pre-wrap;overflow-wrap:anywhere;max-width:300px;display:inline-block}
.pagination{display:flex;align-items:center;justify-content:space-between;margin:18px 0}
.backup-path{margin-top:16px}.backup-path code{display:block;white-space:normal;overflow-wrap:anywhere}
.archive-card{padding:24px;margin:24px 0}.data-explorer select{max-width:100%}
@media(max-width:650px){.data-explorer{padding:16px}.wide-label{min-width:0;flex-basis:100%}.data-search{flex-basis:100%}.data-explorer .section-title{align-items:start;gap:12px;flex-wrap:wrap}.pagination{gap:8px;font-size:12px}}

/* v0.3 local sync module — same light-blue/black/purple palette */
.sync-card,.diagnostic-shortcut{margin:0 0 22px}.sync-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:18px 0}.sync-options{margin:18px 0;align-items:end}.sync-counts{display:flex;flex-wrap:wrap;gap:20px;padding:14px 0}.sync-counts span{display:flex;flex-direction:column;gap:6px}.sync-counts b{font-size:26px}.setup-details{margin:18px 0 26px}.setup-details>summary{cursor:pointer;padding:16px;font-weight:700}.diagnostic-shortcut>label{display:block;max-width:700px;margin:16px 0}.sync-errors p{overflow-wrap:anywhere}#sync-live{min-height:45px}.sync-card code{overflow-wrap:anywhere}.sync-card td{max-width:440px;white-space:normal}.sync-card{scroll-margin-top:20px}

/* v0.4: explicit metric coverage and reversible roster management. */
.coverage-card { margin: 16px 0; padding: 18px 22px; }
.coverage-card summary { cursor:pointer; font-weight:700; }
.coverage-card summary span { font-weight:400; margin-left:12px; font-size:12px; }
.coverage-card p { line-height:1.6; }
.coverage-partial { color:#542580; white-space:nowrap; font-size:10px; margin-top:3px; }
.partial-value { text-decoration: underline dotted #542580; text-underline-offset:4px; }
.highlight-sample { display:block; font-size:10px; line-height:1.4; white-space:normal; margin-top:4px; }
.roster-group-title { margin-top:24px; }
.roster-actions { display:flex; flex-wrap:wrap; justify-content:space-between; gap:10px; margin-top:18px; }
.archived-player { border-style:dashed; }
#roster-form { display:grid; gap:18px; }
.filter-line { flex-wrap:wrap; }
.impact-action a { text-align:center; }

.highlight:first-child:after { content:none; }
.highlight span,.highlight .highlight-sample { white-space:normal; }

/* v0.5 — Player / map dossiers and optional pistol annotation. */
.text-link {background:none;border:0;color:inherit;font:inherit;text-align:left;padding:0;cursor:pointer;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px;}
.text-link:hover,.text-link:focus-visible {color:var(--purple,#432176);text-decoration-color:currentColor;}
.profiles-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:22px 0;}
.profile-tile,.map-tile {text-align:left;cursor:pointer;font:inherit;color:inherit;transition:transform .15s,border-color .15s;min-width:0;}
.profile-tile:hover,.map-tile:hover {transform:translateY(-3px);border-color:#749dcc;}
.tile-top {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.avatar-initials {display:flex;align-items:center;justify-content:center;flex:none;width:54px;height:54px;border-radius:16px;background:#dcedfe;color:#422166;font-size:21px;font-weight:800;border:1px solid #bad6f5;}
.profile-tile h2,.map-tile h2 {font-size:23px;margin:16px 0 6px;overflow-wrap:anywhere;}
.tile-metrics {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;border-top:1px solid #d9e6f2;margin:18px 0 14px;padding-top:14px;}
.tile-metrics>div>span {font-size:10px;letter-spacing:.04em;display:block;color:#546579;}
.tile-metrics b {display:block;margin-top:5px;font-size:20px;}
.tile-metrics .metric-caption {font-size:10px;font-weight:400;}
.tile-link {font-size:12px;color:#45246b;font-weight:700;}
.map-tile {background:linear-gradient(140deg,#ffffff,#edf6ff);}
.detail-tabs {display:flex;gap:6px;border-bottom:1px solid #cadceb;padding:0 0 8px;margin:20px 0 24px;overflow:auto;}
.detail-tabs button {flex:none;border:0;border-radius:9px;background:transparent;padding:10px 16px;cursor:pointer;font:inherit;color:#516073;}
.detail-tabs button.active {background:#dceeff;color:#201830;font-weight:700;}
.profile-context {display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:22px 0 8px;}
.profile-context p {margin:4px 0;font-size:12px;}
.profile-context>label {margin-left:auto;min-width:260px;}
.secondary-kpis strong {font-size:27px;}
.pistol-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:20px 0;}
.big-rate {display:block;font-size:40px;line-height:1.2;margin:15px 0 4px;color:#21152e;}
.mini-kpis {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:22px;}
.mini-kpis b {display:block;font-size:23px;}
.mini-kpis span,.mini-kpis small {display:block;font-size:12px;margin-top:4px;}
.mini-kpis small {color:#617187;}
.opening-strip {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;border-top:1px solid #d6e4f1;margin-top:20px;padding-top:16px;}
.opening-strip b,.opening-strip span {display:block;font-size:12px;}
.opening-strip span {color:#617187;font-size:10px;margin-top:4px;}
.pistol-table {min-width:880px;}
.pistol-table td:first-child,.pistol-table th:first-child {min-width:165px;}
.pistol-table td:nth-child(6) {min-width:220px;white-space:normal;}
.positive {color:#126542;}.negative {color:#913442;}.muted{color:#637386;}
.stats-card {margin-bottom:20px;}
#pistol-form>label {display:block;margin:15px 0;}
.kpis .metric-value {font-size:inherit;}
.kpis strong .metric-caption {font-size:11px;font-weight:500;}
@media(max-width:1150px){.profiles-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:650px){.profiles-grid,.pistol-grid{grid-template-columns:minmax(0,1fr);}.profile-context>label{margin-left:0;min-width:0;width:100%;}.section-title>label{max-width:100%;}.big-rate{font-size:34px;}.tile-metrics b{font-size:19px;}}
/* Keep dossier tabs horizontal; sidebar nav rules must not leak into them. */
nav.detail-tabs {flex-direction:row;flex-wrap:nowrap;margin:20px 0 24px;}
nav.detail-tabs button {box-shadow:none;}
nav.detail-tabs button.active {box-shadow:inset 0 -2px #47216f;}
.filters .filter-line {grid-template-columns:repeat(4,minmax(0,1fr));}
.filters .filter-line .reset {justify-self:start;}
@media(max-width:800px){.filters .filter-line{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:450px){.filters .filter-line{grid-template-columns:minmax(0,1fr);}}
.filters .filter-line {display:grid;}
.filters .filter-line label,.filters .filter-line label:first-child {min-width:0;}
.filters .filter-line .reset {grid-column:1/-1;margin-left:0;justify-self:end;min-height:24px;}
.round-kpis {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0;}
.round-kpi {text-align:left;font:inherit;color:inherit;cursor:pointer;min-width:0;}
.round-kpi>span,.round-kpi>small {display:block;}
.round-kpi>strong {display:block;font-size:34px;margin:14px 0 6px;}
.round-kpi-link {margin-top:18px;color:#45246b;font-size:12px;}
.round-controls {display:flex;gap:20px;align-items:end;flex-wrap:wrap;}
.round-controls label {min-width:180px;}
.round-controls p {flex:1;min-width:240px;}
.rounds-page .selected {outline:2px solid #624083;outline-offset:-2px;background:#f3edfc;}
.round-matrix {min-width:620px;}
.round-matrix caption {text-align:left;padding:0 0 12px;color:#546579;}
.round-matrix th,.round-matrix td {text-align:center;}
.round-matrix th:first-child {max-width:150px;white-space:normal;}
.matrix-cell {width:100%;min-width:64px;padding:12px 8px;border:1px solid #c9ddef;background:#edf6ff;border-radius:8px;color:#21152e;cursor:pointer;font:inherit;}
.matrix-cell small {display:block;margin-top:4px;color:#546579;}
.round-selected {background:#f3edfc;}
.round-kpi:focus-visible,.matrix-cell:focus-visible {outline:3px solid #624083;}
#round-details {scroll-margin-top:20px;}
.danger-text {color:#9b2032;}
[data-content-error] {color:#9b2032;}
[data-content-form] {max-width:620px;}
@media(max-width:1100px){.round-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:550px){.round-kpis{grid-template-columns:minmax(0,1fr);}.round-controls label{min-width:0;width:100%;}}
