:root{font-family:"Noto Sans CJK SC",-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#162421;background:#f5f1e8;font-size:14px;--green:#304e42;--muted:#52695e;--line:#d5d7c9}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button,.button{cursor:pointer;border:1px solid var(--line);background:#fff;color:inherit;border-radius:9px;padding:10px 15px;font-weight:600;line-height:1.5;text-decoration:none}button:hover,.button:hover{background:#e9efe5}button:disabled{opacity:.42;cursor:not-allowed}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #c45c31;outline-offset:3px}input,select{width:100%;border:1px solid var(--line);border-radius:8px;background:#fff;padding:11px 12px;min-width:0;color:inherit}input:focus,select:focus{outline:2px solid #93bba6;outline-offset:1px}input[type=color]{width:60px;padding:4px;height:38px}input[type=checkbox]{width:17px;height:17px;accent-color:var(--green)}input[type=file]{padding:8px;font-size:12px}label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:550}h1,h2,h3,p{margin:0}h1{font-size:30px;letter-spacing:-.7px;line-height:1.3}h2{font-size:22px;line-height:1.5}h3{font-size:15px}p{line-height:1.75;color:var(--muted)}[hidden]{display:none!important}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#105241}.secondary{background:#e1eae0;border-color:#e1eae0}.text-btn{background:transparent;border-color:transparent;padding:8px;color:var(--green)}.full{width:100%}.wordmark{color:inherit;text-decoration:none;font-size:23px;letter-spacing:2px;font-weight:800;display:block}.wordmark small{display:block;font-size:9px;letter-spacing:4px;font-weight:500;margin:7px 0 0 29px}.eyebrow{font-size:11px;font-weight:750;letter-spacing:2px;color:#788f7e}.subtle{font-size:12px;color:var(--muted);line-height:1.7}.actions,.section-head,.field-row,.page-heading,.topbar,.list-toolbar,.form-foot,.editor-toolbar,.editor-footer,.canvas-tools{display:flex;align-items:center;gap:12px}.section-head,.page-heading,.topbar,.form-foot,.editor-footer,.canvas-tools{justify-content:space-between}.field-row>*{flex:1;min-width:0}.check,.inline-label{display:flex;flex-direction:row;align-items:center;gap:8px}.check{white-space:nowrap}.inline-label select{width:auto}.panel{border:1px solid var(--line);border-radius:14px;background:white;padding:24px}.pill{border-radius:20px;padding:7px 12px;background:#e7eee6;font-size:12px;color:#527262;white-space:nowrap}.count{font-size:14px;background:#e5ecdf;border-radius:7px;padding:4px 9px;vertical-align:middle;letter-spacing:0}.sidebar{position:fixed;inset:0 auto 0 0;width:220px;padding:32px 20px;background:#162421;color:#f5f1e8;display:flex;flex-direction:column}.sidebar .wordmark{margin:0 6px 55px}.nav-label{font-size:10px;color:#8ba895;letter-spacing:2px;margin:0 14px 14px}.nav-item{display:flex;align-items:center;gap:13px;width:100%;border:0;background:transparent;color:#aec4b6;text-align:left;padding:13px 14px;margin-bottom:5px}.nav-item span{font-size:20px}.nav-item.active{background:#bdd8c8;color:#143c2f}.nav-item:hover{background:#285242;color:white}.sidebar-bottom{margin-top:auto;padding:14px 8px 0;font-size:12px;color:#bdcdb9;border-top:1px solid #3a5848}.sidebar-bottom p{color:#99ad9d;font-size:11px;margin:8px 0}.sidebar-bottom button{color:#e4eedc;padding-left:0}.connection-dot{display:inline-block;background:#bdd8c8;width:6px;height:6px;border-radius:50%;margin-right:8px}.main{margin-left:220px;min-height:100vh}.topbar{height:75px;border-bottom:1px solid var(--line);padding:0 36px;font-size:12px;color:#6d8175}.account{background:#e4ece1;border:1px solid #d7e3d7;border-radius:30px;padding:8px 13px;color:#50765e}.view{padding:30px 36px 48px;max-width:1800px;margin:auto}.page-heading{margin:5px 0 28px}.page-heading h1{margin:8px 0}.page-heading.compact{margin-bottom:18px}.page-heading.compact h1{font-size:25px}.page-heading p{font-size:13px}.match-panel{padding:0;overflow:hidden}.list-toolbar{padding:18px 22px;border-bottom:1px solid var(--line)}.segmented{display:flex;background:#eef2e9;padding:4px;border-radius:9px;gap:3px}.segmented button{border:0;background:transparent;padding:7px 16px;color:#7b8e7e}.segmented [aria-pressed=true]{background:#fff;color:var(--green);box-shadow:0 1px 3px #1832220b}.search{flex-direction:row;align-items:center;max-width:310px;margin-left:auto;border:1px solid var(--line);border-radius:8px;padding-left:12px;color:#819183}.search input{border:0;background:transparent}.table-heading,.match-row{display:grid;grid-template-columns:minmax(220px,1fr) 125px 150px 85px;gap:20px;align-items:center;padding:17px 26px}.table-heading{background:#f4f0e7;color:#879383;font-size:11px;letter-spacing:.5px}.match-row{border-bottom:1px solid #e8ece5}.match-row:last-child{border-bottom:0}.match-name{font-size:15px;margin-bottom:7px;overflow-wrap:anywhere;color:#1f3c31}.match-teams{font-size:12px;color:#829180}.row-score{font-size:21px;font-weight:700;letter-spacing:2px}.row-time{font-size:12px;color:#879383}.list-foot{margin:15px 0}.empty{text-align:center;padding:65px 20px}.empty h2{font-size:20px;margin:12px 0}.empty-symbol{font-size:48px;color:#719180}.tabs{display:flex;gap:26px;margin-bottom:24px;border-bottom:1px solid var(--line)}.tabs button{border:0;border-radius:0;background:transparent;color:#859081;padding:15px 4px}.tabs [aria-selected=true]{border-bottom:3px solid var(--green);color:var(--green)}.score-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.team-card{padding:26px}.team-card>.eyebrow{display:block;margin-bottom:20px;color:#739068}.team-card>label{margin-bottom:20px}.score-input{font-size:56px;font-weight:650;text-align:center;background:#f5f1e8;border-color:transparent;padding:14px;color:#162421;font-variant-numeric:tabular-nums}.quick-scores{display:flex;gap:8px;margin-bottom:26px}.quick-scores button{flex:1}.score-settings{margin-top:20px}.form-foot{margin-top:24px;padding-top:20px;border-top:1px solid var(--line)}.editor-toolbar{flex-wrap:wrap;margin-bottom:18px}.editor-toolbar>span{margin-left:auto}.editor-grid{display:grid;grid-template-columns:190px minmax(240px,1fr) 230px;gap:16px;align-items:start}.layers-panel,.properties{padding:18px}.layers-panel label{margin:18px 0 10px}.layer-row{width:100%;text-align:left;font-size:12px;display:flex;justify-content:space-between;gap:5px;align-items:center;border:0;margin-bottom:5px;background:transparent;padding:12px 8px}.layer-row.active{background:#dce9df}.layer-row small{font-size:10px;opacity:.55}.layer-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#layer-list{margin:18px -6px 12px;max-height:380px;overflow:auto}.layer-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:12px}.layer-actions button{font-size:11px;padding:7px}.canvas-column{min-width:0}.canvas-tools{margin-bottom:12px;font-size:11px}.canvas-tools button{padding:6px;font-size:11px}.canvas-well{background:#e5ebe2;border:1px solid #d7dfd5;border-radius:10px;padding:20px;min-height:320px;display:flex;align-items:center;justify-content:center}.scene{position:relative;color:white;background:#f5f8f1;width:100%;aspect-ratio:16/9;box-shadow:0 5px 18px #30462b0a;touch-action:none;user-select:none;overflow:hidden}.scene:before{content:'';position:absolute;inset:20% 25%;border:1px solid #d9e4d5;background:linear-gradient(90deg,transparent 49.8%,#d9e4d5 50%,transparent 50.2%)}.scene.portrait{aspect-ratio:9/16;max-width:310px}.scene .element{cursor:move}.scene .element.selected{outline:2px solid #168570;outline-offset:-2px}.scene .resize-handle{position:absolute;right:0;bottom:0;padding:0;width:24px;height:24px;display:grid;place-items:center;border:3px solid transparent;background:transparent;border-radius:5px;cursor:nwse-resize;z-index:100}.resize-handle span{width:18px;height:18px;background:#15775f;border:1px solid white;border-radius:4px;color:white;font-size:16px;line-height:16px;display:block}.guide{position:absolute;background:#b38c24;pointer-events:none;z-index:101}.canvas-caption{text-align:center;margin:14px 0;font-size:11px}.properties h3{margin-bottom:18px}.properties label{margin:15px 0}.properties details{border-top:1px solid var(--line);padding-top:16px;margin-top:16px;font-size:11px}.properties summary{cursor:pointer;color:#708471}.geometry-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px}.geometry-fields label{margin-bottom:0}.global-style{border-top:1px solid var(--line);margin-top:20px;padding-top:20px}.editor-footer{padding:20px 0;margin-top:18px;border-top:1px solid var(--line);flex-wrap:wrap}.live-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:20px}.live-grid h2{margin:14px 0}.live-grid label{margin:25px 0}.live-grid .actions{flex-wrap:wrap}.live-grid .subtle{margin-top:14px}.live-status{margin-top:30px;border-top:1px solid var(--line);padding-top:20px;color:#729077;font-size:13px;line-height:1.8}.obs-steps{padding-left:20px}.obs-steps li{padding:12px 0 15px 8px}.obs-steps p{font-size:12px;margin-top:7px}.upload-panel{display:grid;grid-template-columns:1fr 1fr auto;gap:16px;align-items:end;margin-bottom:28px}.upload-panel p{grid-column:1/-1}.asset-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:20px}.asset-card{background:white;border:1px solid var(--line);border-radius:12px;overflow:hidden}.asset-image{height:155px;padding:24px;background:repeating-conic-gradient(#f7f9f4 0% 25%,#edf1e8 0% 50%) 0/20px 20px;display:flex;align-items:center;justify-content:center}.asset-image img{max-width:100%;max-height:100%;object-fit:contain}.asset-body{padding:18px}.asset-body h3{margin-bottom:8px;overflow-wrap:anywhere}.asset-body .actions{justify-content:space-between;margin-top:14px}.asset-body button{font-size:11px;padding:5px 8px}#notice,.warning{margin:18px 36px 0;padding:13px 17px;border:1px solid #d4e2cb;background:#eaf2e2;border-radius:9px;color:#476b47;font-size:13px;line-height:1.7}.warning{background:#fff5dd;border-color:#ead8a9;color:#8a6823}.warning button{margin-left:20px}dialog{border:1px solid var(--line);border-radius:18px;padding:28px;width:450px;max-width:calc(100vw - 40px);color:inherit;box-shadow:0 20px 100px #102f3444}dialog::backdrop{background:#102d2777;backdrop-filter:blur(3px)}dialog label{margin:22px 0}dialog .primary{margin-top:6px}.login-shell{display:grid;grid-template-columns:1fr 1fr;min-height:100vh}.login-brand{background:#162421;color:#eaf3df;padding:50px 10%;display:flex;flex-direction:column;justify-content:space-between;min-height:700px;position:relative;overflow:hidden}.login-brand h1{font-size:clamp(32px,4vw,56px);line-height:1.4;letter-spacing:-2px;margin:18px 0}.login-brand p{color:#aac5ac;font-size:15px}.login-brand .eyebrow{font-size:11px;color:#bdd8c8}.login-brand>span{font-size:10px;letter-spacing:3px;color:#91ab93}.court-art{width:250px;height:420px;border:1px solid #b7d59933;position:absolute;right:-70px;bottom:-50px;transform:rotate(28deg);pointer-events:none}.court-art:before{content:'';position:absolute;inset:18% 10%;border:1px solid #b7d59933}.court-art:after{content:'';position:absolute;left:0;right:0;top:50%;border-top:1px dashed #b7d59933}.login-content{max-width:470px;width:100%;padding:50px 30px;margin:auto}.login-content h2{font-size:32px;margin:18px 0 12px}.login-content>p{font-size:13px}.login-steps{padding-left:20px;line-height:2.8;color:#6c8070;margin:25px 0;font-size:13px}#pair-code{font-size:36px;letter-spacing:10px;color:#195c47;font-weight:700;padding:24px 15px;background:#e3ece4;border:1px solid #dae4d3;text-align:center;border-radius:12px}#pair-status{margin:15px 0 25px}.login-content>.subtle{margin-top:28px;font-size:11px}
@media(min-width:1550px){.editor-grid{grid-template-columns:215px minmax(300px,1fr) 270px}.canvas-well{min-height:480px}}
@media(max-width:1150px){.sidebar{width:180px;padding:26px 14px}.sidebar .wordmark{font-size:20px}.main{margin-left:180px}.view{padding:26px 24px}.topbar{padding:0 24px}.editor-grid{grid-template-columns:170px 1fr}.properties{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:25px}.global-style{border:0;margin:0;padding:0}.table-heading,.match-row{grid-template-columns:minmax(160px,1fr) 100px 110px 75px;gap:12px}.page-heading .actions{flex-direction:column;align-items:flex-end}.live-grid{grid-template-columns:1fr}.page-heading h1{font-size:25px}}
@media(max-width:760px){.sidebar{position:static;width:auto;padding:17px 20px;display:flex;flex-direction:row;align-items:center;gap:15px}.sidebar .wordmark{margin:0;font-size:17px}.sidebar .wordmark small{font-size:7px;margin-left:21px}.nav-label,.sidebar-bottom{display:none}.sidebar nav{display:flex;margin-left:auto}.nav-item{font-size:12px;padding:9px;margin:0}.nav-item span{display:none}.main{margin-left:0}.topbar{height:55px;padding:0 18px}.account{font-size:10px}.view{padding:24px 18px}.page-heading{align-items:flex-start}.page-heading .primary{white-space:nowrap;font-size:12px;padding:9px}.page-heading p{font-size:11px}.list-toolbar{padding:12px;flex-wrap:wrap;gap:8px}.search{max-width:none;width:100%;order:3}.table-heading{display:none}.match-row{grid-template-columns:1fr 65px 65px;padding:18px 15px}.row-time{display:none}.match-name{font-size:13px}.row-score{font-size:17px;letter-spacing:0}.match-row button{padding:7px 9px;font-size:11px}.score-grid{gap:10px}.team-card{padding:16px 12px}.quick-scores{gap:3px}.quick-scores button{padding:6px 2px;font-size:11px}.score-input{font-size:40px}.score-settings{padding:18px}.score-settings .field-row{flex-wrap:wrap}.score-settings .field-row>*{flex-basis:40%}.form-foot{flex-wrap:wrap}.editor-grid{grid-template-columns:1fr}.canvas-column{grid-row:1}.layers-panel{grid-row:2}.canvas-well{padding:12px;min-height:230px}.properties{grid-column:auto;grid-template-columns:1fr}.global-style{border-top:1px solid var(--line);padding-top:15px}.editor-toolbar .segmented{width:100%}.editor-toolbar .segmented button{flex:1}.editor-toolbar>span{font-size:10px}.editor-footer .actions{flex-wrap:wrap}.editor-footer{position:static}.upload-panel{grid-template-columns:1fr}.upload-panel p{grid-column:auto}.login-shell{grid-template-columns:1fr}.login-brand{display:none}.login-content{padding-top:70px}#notice,.warning{margin:15px 18px 0}.page-heading.compact{gap:12px}.page-heading.compact h1{font-size:20px}.pill{font-size:10px;white-space:normal}.tabs{gap:22px}}
#canvas-scene,#canvas-guides{position:absolute;inset:0}#canvas-guides{pointer-events:none}#canvas .element{filter:none}.layer-row:focus-visible{outline-offset:-3px}

.wordmark { position: relative; padding-left: 36px; min-height: 42px; }
.wordmark img { position: absolute; left: 0; top: 0; width: 25px; height: 44px; object-fit: contain; }
.wordmark small, .sidebar .wordmark small { margin-left: 0; }
.panel, .asset-card, dialog { border-radius: 5px; }
.team-card, .login-content h2 { border-left: 4px solid #ea5516; }
.login-content h2 { padding-left: 14px; }
.eyebrow { color: #52715e; }
.team-card > .eyebrow { color: #52715e; }
.player-buttons, .roster-fields {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.player-buttons:not(:empty), .team-serve, .roster-fields { margin-top: 12px; }
.player-choice { min-height: 52px; text-align: left; background: #f5f1e8; overflow-wrap: anywhere; }
.player-choice small { display: block; color: #52715e; }
.player-choice strong { display: block; font-size: 16px; }
.player-choice[aria-pressed=true] { background: #162421; color: #ff8a4f; }
.player-choice[aria-pressed=true] small { color: #bdd8c8; }
.team-serve { display: flex; gap: 6px; }
.team-serve button { font-size: 12px; padding: 7px 12px; }
.team-serve [aria-pressed=true] { background: #bdd8c8; color: #162421; border-color: #52715e; }
.roster-position { display: grid; gap: 6px; align-content: start; }
#roster-form { border-top: 1px solid var(--line); margin-top: 16px; }
#roster-form .actions { margin-top: 14px; }
@media(max-width:760px) {
  .player-buttons, .roster-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sidebar .wordmark { padding-left: 30px; }
}
.server-tools { display: flex; flex-wrap: wrap; }
#profile-form { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
#profile-fields fieldset { margin: 14px 0; border: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(95px,1fr)); gap: 10px; }
#profile-fields legend { padding: 0 6px; color: #52715e; font-weight: 700; }

.director-settings, #event-form { display: grid; gap: 14px; }
.director-settings textarea { resize: vertical; width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.director-settings .field-row > label { min-width: 0; }
@media(max-width:760px) { .tabs { flex-wrap: wrap; gap: 6px 14px; } }

#director-bar {
  position: sticky; top: 0; z-index: 5; display: grid;
  grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px 16px;
  padding: 9px clamp(18px, 3vw, 36px); background: #162421; color: #f5f1e8;
}
.director-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; min-width: 0; }
.director-target { display: flex; align-items: baseline; gap: 12px; min-width: 0; max-width: 100%; }
.director-target span { color: #bdd8c8; white-space: nowrap; }
.director-target strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#director-scene { color: #bdd8c8; white-space: nowrap; font-size: 13px; }
.director-status { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.opening-cue-picker {
  justify-self: end; flex-direction: row; align-items: center; gap: 8px;
  color: #bdd8c8; font-size: .85rem; white-space: nowrap;
}
.opening-cue-picker select {
  width: auto; max-width: 18rem; min-height: 32px; padding: 4px 8px;
  color: #162421; background: #fff;
}
#opening-countdown { font-size: 12px; font-variant-numeric: tabular-nums; }
.director-switches {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 8px;
  border-top: 1px solid #385146; padding-top: 7px;
}
.director-switches button {
  position: relative; white-space: nowrap; min-height: 34px;
  background: #f5f1e8; color: #162421; padding: 5px 12px; border-radius: 5px;
}
.director-switches button:hover:enabled { background: #bdd8c8; }
.director-switches button:disabled { background: transparent; color: #bdd8c8; border-color: #52715e; opacity: 1; }
.director-switches button[aria-keyshortcuts]::after {
  content: attr(aria-keyshortcuts) / ""; position: absolute; z-index: 1;
  top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  padding: 3px 7px; border: 1px solid #52715e; border-radius: 4px;
  background: #162421; color: #f5f1e8; font: 12px/1.4 ui-monospace, monospace;
  visibility: hidden; pointer-events: none;
}
.director-switches button:enabled:focus-visible::after { visibility: visible; }
@media (hover: hover) {
  .director-switches button:enabled:hover::after { visibility: visible; }
}
html:has(#match-view:not([hidden]) #director-bar:not([hidden])) { scroll-padding-top: calc(var(--director-height, 90px) + 6px); }
@media(max-width:760px) {
  .director-summary { flex-direction: column; }
  .director-target { flex-wrap: wrap; gap: 0 8px; }
  .director-target strong { max-width: 100%; }
  .opening-cue-picker { flex-direction: column; align-items: flex-end; gap: 2px; }
  .opening-cue-picker select { max-width: 36vw; }
}

.studio-grid {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(330px, 1fr);
  gap: 18px; align-items: start; margin-top: 12px;
}
#match-view > #director-bar { border-radius: 5px; padding-inline: 14px; }
.studio-screen, .studio-tools { min-width: 0; }
.studio-screen { position: sticky; top: calc(var(--director-height, 56px) + 6px); }
.studio-toolbar, .studio-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.studio-toolbar { margin-bottom: 8px; }
.studio-toolbar h2 { font-size: 16px; }
.studio-toolbar .segmented button { padding: 5px 9px; font-size: 12px; }
.studio-screen .canvas-well { min-height: 0; padding: 12px; border-radius: 5px; }
.preview-frame {
  position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden;
  background: repeating-conic-gradient(#f3f5ef 0 25%, #e8ece5 0 50%) 0 0/20px 20px;
}
.preview-frame.portrait { aspect-ratio: 9/16; max-width: min(70%, 30vh); }
.preview-frame > div { position: absolute; inset: 0; width: 100%; height: 100%; }
#program-scene, #rehearsal-board { background: transparent; box-shadow: none; pointer-events: none; font-family: "Noto Sans CJK SC", Arial, "PingFang SC", sans-serif; }
#program-scene::before, #rehearsal-board::before { content: none; }
#editor-frame:not([data-destination="board"]) #rehearsal-board,
#editor-frame[data-destination="board"] #opening-monitor { visibility: hidden; }
.studio-foot { font-size: 12px; color: var(--muted); margin-top: 6px; }
.studio-foot button { padding: 5px 9px; }
#bracket-sizing { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 10px; }
#bracket-scale { width: min(13rem, 45%); padding: 0; accent-color: var(--green); }
#bracket-scale-value { min-width: 4ch; font-variant-numeric: tabular-nums; }
:is(#bracket-save-feedback, #event-bracket-save-feedback) { flex-basis: 100%; padding: 6px 10px; border-radius: 5px; background: #e5eee8; color: var(--green); font-size: 13px; }
:is(#bracket-save-feedback, #event-bracket-save-feedback):empty { display: none; }
:is(#bracket-save-feedback, #event-bracket-save-feedback)[data-kind=error], :is(#bracket-save-feedback, #event-bracket-save-feedback)[data-kind=uncertain] { color: #873826; background: #fff0e9; }
.studio-tools { container-type: inline-size; }
.studio-tools .tabs { flex-wrap: wrap; gap: 0 10px; margin-bottom: 12px; }
.studio-tools .tabs button { font-size: 13px; padding: 8px 2px; }
.studio-tools .editor-grid, .studio-tools .live-grid { grid-template-columns: minmax(0,1fr); }
.studio-tools .properties { display: block; }
.studio-tools .layers-panel, .studio-tools .properties { grid-row: auto; }
.studio-tools .editor-toolbar { gap: 8px; }
.studio-tools .editor-toolbar > span { margin-left: 0; }
.studio-tools .field-row, .studio-tools .form-foot, .studio-tools .section-head { flex-wrap: wrap; }
.studio-tools .player-buttons, .studio-tools .roster-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
.studio-tools .score-grid { gap: 8px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.studio-tools .team-card { padding: 12px; }
.studio-tools .team-card > label { margin-bottom: 10px; }
.studio-tools .quick-scores { flex-wrap: wrap; }
.studio-tools .quick-scores button { padding: 4px; }
.studio-tools .editor-footer .actions { flex-wrap: wrap; }
@media(max-width:1000px) {
  .studio-grid { display: block; }
  .studio-screen { position: static; margin-bottom: 12px; background: #f5f1e8; }
  .preview-frame { max-width: min(100%, 52vh); }
  .preview-frame.portrait { max-width: 17vh; }
}
@media(max-width:1000px) and (min-height:540px) {
  .studio-screen { position: sticky; top: var(--director-height, 90px); z-index: 2; }
  html:has(#match-view:not([hidden])) { scroll-padding-top: calc(var(--director-height, 90px) + 31vh + 100px); }
}

#score-tab, #info-tab { display: grid; gap: 12px; }
.score-team { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin-bottom: 10px; }
.score-team span { color: var(--muted); font-size: 12px; }
.score-team strong, .live-layer strong { overflow-wrap: anywhere; }
#live-layers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin-top: 8px; }
.live-layer { display: flex; gap: 8px; align-items: center; justify-content: space-between; text-align: left; }
.live-layer[aria-pressed=true] { background: #e3ece3; border-color: #94af9c; }
.live-layer small { white-space: nowrap; }
.roster-settings .server-tools { margin-top: 8px; }
#archive-match { justify-self: start; }

#monitor-layers .live-layers { margin-top: 12px; }
#monitor-layers #live-layers { grid-template-columns: repeat(auto-fit,minmax(min(132px,100%),1fr)); max-height: 18vh; overflow: auto; }

.sidebar { overflow-y: auto; }
#current-match { margin: 18px 0; padding-top: 16px; border-top: 1px solid #3a5848; }
.match-nav-caption { margin: 0 14px 4px; color: #a5bcad; font-size: 11px; }
#nav-match-title { margin: 0 14px 10px; color: #f5f1e8; font-size: 15px; overflow-wrap: anywhere; }
#match-nav .nav-item { padding-block: 9px; }
#breadcrumb { display: flex; align-items: center; gap: 8px; min-width: 0; }
#breadcrumb .text-btn { padding: 4px 0; color: var(--green); font-size: inherit; white-space: nowrap; }
#crumb-match { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#crumb-page { white-space: nowrap; }
#crumb-page::before, #crumb-match::before { content: "/"; margin-right: 8px; color: #7b8e7e; }
.topbar .actions { flex-shrink: 0; }
#settings-view .studio-screen { top: 10px; }
#settings-layout:not(.studio-grid) { max-width: 1080px; }
@media (max-width:760px) {
  .sidebar { flex-wrap: wrap; gap: 8px; }
  #current-match { width: 100%; min-width: 0; margin: 0; padding-top: 8px; }
  .match-nav-caption, #nav-match-title { display: inline; margin: 0 5px; }
  #nav-match-title { font-size: 13px; }
  .sidebar #match-nav { flex-wrap: wrap; margin: 4px 0 0; }
  #match-nav .nav-item { flex: 1 0 auto; width: auto; justify-content: center; white-space: nowrap; }
}
@media (max-width:1000px) and (min-height:540px) {
  html:has(#settings-layout.studio-grid):has(#settings-view:not([hidden])) { scroll-padding-top: calc(31vh + 90px); }
}

:is(#bracket-games-form, #event-bracket-games-form) { display: grid; gap: 12px; }
:is(#bracket-games-form, #event-bracket-games-form) fieldset { border: 1px solid var(--line); border-radius: 5px; min-width: 0; padding: 8px 10px; }
:is(#bracket-games-form, #event-bracket-games-form) fieldset:has([aria-invalid=true]), :is(#bracket-games-form, #event-bracket-games-form) [aria-invalid=true] { border-color: #a24331; }
:is(#bracket-field-error, #event-bracket-field-error) { color: #873826; font-size: 13px; }
:is(#bracket-games-form, #event-bracket-games-form) legend { color: var(--green); font-size: 13px; font-weight: 700; padding-inline: 4px; }
:is(#bracket-games-form, #event-bracket-games-form) fieldset > div { display: grid; grid-template-columns: minmax(0,1fr) 64px; gap: 8px; align-items: center; margin: 5px 0; }
:is(#bracket-games-form, #event-bracket-games-form) .bracket-players { grid-column: 1/-1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 8px; }
.bracket-players label { min-width: 0; }
.bracket-players select { width: 100%; }
:is(#bracket-games-form, #event-bracket-games-form) input { min-width: 0; width: 100%; }
:is(#bracket-games-form, #event-bracket-games-form) fieldset span { overflow-wrap: anywhere; }
#settings-view:has(> #component-picker:not([hidden])) {
  display: grid;
  grid-template-columns: clamp(168px, 15vw, 210px) minmax(0, 1fr);
  align-items: start;
  column-gap: clamp(16px, 1.8vw, 28px);
}
#settings-view > .page-heading { grid-column: 1 / -1; }
.settings-content { min-width: 0; }
#component-picker:not([hidden]) + .settings-content { container: component-work / inline-size; }
#component-picker:not([hidden]) + .settings-content #settings-layout { margin-top: 0; max-width: none; }
#component-picker {
  position: sticky; top: 12px; display: grid; gap: 16px; max-height: calc(100dvh - 24px);
  overflow-y: auto; padding: 2px 12px 4px 2px; border-right: 1px solid var(--line);
}
#component-picker h2 { font-size: 12px; color: var(--muted); margin: 0 0 7px 3px; }
.component-options { display: grid; gap: 5px; }
#component-picker button { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 14px 6px 6px; text-align: left; background: white; }
#component-picker button:hover { background: #edf2ec; }
#component-picker button[aria-pressed=true] { background: #e0ece2; border-color: #698a76; box-shadow: inset 3px 0 var(--green); }
#component-picker button:focus-visible { outline-offset: -3px; }
#component-picker .component-cover { width: 44px; }
#component-picker strong, #component-picker small { display: block; }
#component-picker small { color: var(--muted); font-weight: 500; }
.component-cover { flex: none; width: 54px; aspect-ratio: 16/10; border-radius: 3px; display: flex; justify-content: center; align-items: center; }
.opening-cover { background: #162421; }
.opening-cover img { height: 80%; }
.bracket-cover { background: #e7eee3; gap: 2px; }
.bracket-cover i { width: 10px; height: 3px; background: var(--green); border-radius: 1px; }
.bracket-cover i:first-child { background: transparent; box-shadow: 0 -10px var(--green), 0 -4px var(--green), 0 4px var(--green), 0 10px var(--green); }
.bracket-cover i:nth-child(2) { background: transparent; box-shadow: 0 -6px var(--green), 0 6px var(--green); }

:is(#component-context, #event-bracket-context) { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-bottom: 16px; }
:is(#component-context, #event-bracket-context) label { width: min(100%, 26rem); min-width: 0; }
#component-match { width: 100%; }
@media (max-width:760px) {
  .sidebar nav[aria-label="工作空间"] { flex-wrap: wrap; }
  #settings-view:has(> #component-picker:not([hidden])) { display: block; }
  #component-picker {
    position: static; display: flex; gap: 16px; max-height: none; margin-bottom: 14px;
    padding: 2px 1px 8px; overflow: auto hidden; border: 0; border-bottom: 1px solid var(--line);
  }
  #component-picker section { flex: none; }
  .component-options { display: flex; }
  #component-picker button { white-space: nowrap; }
}

.login-content section { margin-top: 20px; }
.login-content section p { font-size: 13px; }
#mini-login h3 { margin-bottom: 8px; }
#pair-code { margin-top: 18px; font-variant-numeric: tabular-nums; }
#wechat-widget { text-align: center; margin-top: 12px; }
#wechat-widget iframe { max-width: 100%; border: 0; }
.login-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#login-feedback:empty { display: none; }

.account-form { display: grid; gap: 16px; }
.login-content .account-form { margin: 24px 0 12px; }
.account-form button.primary { justify-self: start; }
.login-content .account-form button { width: 100%; }
.account-form p:empty { display: none; }
.directory-heading { align-items: center; }
.directory-panel { padding: 0; overflow: hidden; }
.directory-table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
.directory-table thead { background: #e9eee6; color: #455c50; }
.directory-table thead th { font-size: 12px; font-weight: 600; }
.directory-table th, .directory-table td { padding: 18px 24px; }
.directory-table tbody th, .directory-table td { border-top: 1px solid #e1e6de; }
.directory-table tbody th { overflow-wrap: anywhere; color: #213c32; }
.directory-table tr > :last-child { text-align: right; white-space: nowrap; }
.directory-table .account-identifiers { display: block; margin-top: 4px; color: var(--muted); font-weight: normal; }
.directory-actions .text-btn { min-height: 36px; padding: 6px 8px; }
.directory-table tr > :nth-child(4) { text-align: right; }
.directory-table .role { display: inline-block; padding: 3px 9px; border-radius: 5px; background: #f0f2ed; color: #45584d; font-size: 12px; }
.directory-table .role-admin { background: #dcebe1; color: #204936; }
#directory-status { padding: 12px 24px; margin: 0; border-top: 1px solid var(--line); color: var(--muted); }
#user-dialog { width: 410px; max-height: calc(100dvh - 32px); border-radius: 10px; }
#user-dialog h2, #user-dialog label, #user-dialog p { margin: 0; }
#username-help { margin-top: -10px; line-height: 1.5; }
#user-feedback { color: #9b3325; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.dialog-actions .primary { margin-top: 0; }
#password-dialog label { margin: 0; }
@media(max-width:600px) {
 .directory-table th, .directory-table td { padding: 12px 6px; font-size: 12px; }
 .directory-table tr > :first-child { padding-left: 12px; }
 .directory-table tr > :last-child { padding-right: 12px; }
 .directory-table .role { font-size: 11px; padding: 3px 5px; white-space: nowrap; }
}

@media(max-width:760px) {
 .directory-table, .directory-table tbody { display: block; }
 .directory-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
 .directory-table tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: center; border-top: 1px solid var(--line); padding: 13px; }
 .directory-table tbody tr:first-child { border-top: 0; }
 .directory-table tbody tr > * { border: 0; padding: 0; }
 .directory-table tbody th { font-size: 14px; }
 .directory-table tbody tr > :nth-child(2) { grid-column: 1; grid-row: 2; }
 .directory-table tbody tr > :nth-child(3) { grid-column: 2; grid-row: 1; text-align: right; }
 .directory-table tbody tr > :nth-child(4)::before { content: "名下比赛 "; }
 .directory-table tbody .directory-actions { grid-column: 1 / -1; text-align: left; }
}
.matchup-cover { color: #27473c; background: #ece9df; font: italic 900 18px/1 Arial,sans-serif; }
#matchup-cue-hint, #result-cue-hint { grid-column: 1 / -1; margin: 0; color: #e6f2e9; font-size: 13px; }
#matchup-cue-configure { background: transparent; color: inherit; border: 0; padding: 4px; text-decoration: underline; }
.director-switches button[data-ready=false] { color: #c6ddd0; background: transparent; border-color: #52715e; }
.director-switches button[data-ready=false]:hover { background: #304e42; }
#roster-feedback { margin: 10px 0 0; color: var(--green); font-size: 13px; }
#roster-feedback.error { color: #873826; }
#roster-feedback:empty, #info-roster-settings #slot-done { display: none; }
#matchup-settings { width: 100%; max-width: 1000px; margin-inline: auto; }
.matchup-visual { min-width: 0; }
@media (min-width: 1001px) {
 #components-tab #matchup-settings:has(#result-form:not([hidden])) { max-width: none; }
 #components-tab .matchup-studio:has(#result-form:not([hidden])) {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 30%); gap: 18px; align-items: start;
 }
}
#matchup-settings #result-form { margin-top: 8px; }
#matchup-settings .canvas-well { min-height: 0; padding: 8px; }
#matchup-frame { max-width: min(100%, 105vh); }
#matchup-frame.portrait { max-width: min(100%, 36vh); }
#matchup-transparency { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-block: 12px; }
#matchup-transparency label { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; width: min(190px, 100%); }
#matchup-transparency input { grid-column: 1 / -1; padding: 0; accent-color: var(--green); }
#matchup-transparency label span { color: var(--muted); font-variant-numeric: tabular-nums; }
#matchup-settings.sample #matchup-transparency { display: none; }
#matchup-settings .matchup-card { position: relative; }
.matchup-slot {
 position: absolute; inset: 0; width: 100%; background: transparent; border: 0; border-radius: 0; padding: 0;
}
.matchup-slot::after {
 content: "✎"; position: absolute; right: 4%; top: 4%; font: 600 clamp(12px, 2cqw, 18px)/1 sans-serif;
 color: #244b39; background: #f7faf4; padding: .26em; border-radius: 4px;
}
.matchup-slot:hover, .matchup-slot:focus-visible, .matchup-slot[aria-expanded=true] {
 outline: 2px solid #38664f; outline-offset: -2px; background: transparent;
}
#matchup-settings #roster-form { border: none; margin: 0; }
#matchup-settings #roster-form .actions { justify-content: end; margin-top: 8px; }
#matchup-settings.sample #roster-editors, #matchup-settings #slot-picker:not(:popover-open) { display: none; }
#slot-picker:popover-open {
 position: fixed; inset: auto; margin: 0; padding: 12px; width: min(245px, calc(100vw - 16px));
 max-height: calc(100dvh - 16px); overflow: auto; border: 1px solid #b5c6b7; border-radius: 8px;
 color: #162421; background: #fffdfa; box-shadow: 0 6px 24px #122c2029;
}
#slot-picker:popover-open .roster-fields { display: block; margin: 0; }
#slot-picker:popover-open .roster-position:not(.selected-slot) { display: none; }
#slot-picker:popover-open select, #slot-picker:popover-open input { min-width: 0; width: 100%; }
#slot-picker:popover-open #slot-done { margin-top: 8px; }
#live-matchup-editor #matchup-return { margin-bottom: 6px; }

.result-entry { width: 100%; table-layout: fixed; border-collapse: collapse; }
.result-entry th, .result-entry td { padding: 6px 4px; text-align: left; overflow-wrap: anywhere; }
.result-entry th { color: var(--muted); font-size: 13px; }
.result-entry th:first-child { width: 4.5em; }
#result-add-set { justify-self: start; }
#result-feedback { margin-top: 8px; color: var(--green); }
#result-feedback:empty { display: none; }
#result-feedback.error { color: #973d29; }
#next-result-match { background: transparent; border-color: #52715e; color: #e6eee7; }
#next-result-match:hover { background: #304e42; }

.bio-cover { background: #e6ece3; }
.bio-cover i { display: block; width: 18px; height: 25px; border-radius: 2px; border-left: 2px solid #ea5516; background: linear-gradient(#acc0b5 0 0) center 4px / 11px 9px no-repeat, linear-gradient(#f5f1e8 0 0) 3px 16px / 7px 2px no-repeat, #162421; }
#bio-fields { display: grid; gap: 14px; }
#bio-fields button { justify-self: start; }
#bio-feedback:empty { display: none; }
#player-cues { grid-column: 1/-1; display: flex; gap: 7px; flex-wrap: wrap; color: #bdd8c8; }
#player-cues button { color: #e8f1e7; background: transparent; border-color: #52715e; padding: 6px 10px; }
#player-cues button:hover, #player-cues button[aria-pressed=true] { background: #bdd8c8; color: #162421; }

#bio-monitor .bio-anchor > button {
 position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0;
 background: transparent; overflow: visible;
}
#bio-monitor .bio-edit-action span {
 white-space: nowrap; padding: 5px 9px; border: 1px solid #9cb6a5; border-radius: 6px;
 background: #fffdfa; color: #244b39; font: 600 13px/1.5 system-ui, sans-serif;
}
#bio-monitor .bio-anchor > button span { position: absolute; top: 0; left: calc(100% + 6px); }
#bio-monitor .bio-anchor > button:hover, #bio-monitor .bio-anchor > button:focus-visible {
 outline: 2px solid #739382; outline-offset: 0;
}
@container (orientation: portrait) and (max-width: 320px) {
 #bio-monitor .bio-anchor > button span { left: 0; top: calc(100% + 5px); }
}
#bio-pages { width: fit-content; margin-bottom: 8px; }
[data-bio-fields=bio] { display: grid; gap: 14px; }
.bio-metrics { margin: 0; border: 0; padding: 0; }
.bio-metrics legend { margin-bottom: 12px; font-weight: 700; }
.bio-metric-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
#player-cues, #player-cues label, #player-cue-roster { align-items: center; }
#player-cues label, #player-cue-roster { display: flex; gap: 7px; flex-wrap: wrap; }
#player-cues select { width: auto; padding: 5px 8px; }
#player-cue-feedback:empty { display: none; }
@container component-work (max-width: 710px) {
  #settings-layout.studio-grid { display: block; }
  #settings-preview { z-index: 2; margin-bottom: 12px; background: #f5f1e8; }
  #settings-preview .preview-frame:not(.portrait) { max-width: min(100%, 52vh); }
  #components-tab .matchup-studio:has(#result-form:not([hidden])) { display: block; }
  #brand-settings .upload-panel { grid-template-columns: minmax(0,1fr); }
}
.scoreboard-cover {background:#20322c; color:#bdd8c8; font-variant-numeric:tabular-nums; font-size:.85rem}
.live-section { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.live-section > summary {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px;
  color: var(--green); font-weight: 700; cursor: pointer; list-style: none;
}
.live-section > summary::-webkit-details-marker { display: none; }
.live-section > summary::before {
  content: ""; width: 7px; height: 7px; flex: none; border: solid currentColor;
  border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg);
}
.live-section[open] > summary::before { transform: translateY(-2px) rotate(45deg); }
.live-section > summary > span { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600; }
.live-section-body, #score-form { padding: 0 12px 12px; }
#live-set-fields > .panel { border: 0; margin: 0; padding: 0 12px 12px; }
#live-set-fields .section-head h3 { display: none; }
#phase-options { display: flex; flex-wrap: wrap; gap: 6px; }
#phase-options button { padding: 5px 10px; }
#custom-phase { margin-top: 12px; }
#custom-phase > summary { color: var(--green); cursor: pointer; }
.quick-scores button[aria-pressed="true"], #phase-options button[aria-pressed="true"] {
  color: #fff; background: var(--green); border-color: var(--green); font-weight: 700;
}
#phase-form { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
#phase-form label { flex: 1 1 150px; }
.manual-confirm { margin-top: 10px; }
.match-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.match-phase { padding: 4px 10px; border-radius: 20px; font-size: 13px; font-weight: 700; background: #e9ece7; color: #43564c; }
.match-phase[data-phase="进行中"] { background: #dceee2; color: #24583d; }
.match-phase[data-phase="暂停"] { background: #fff0d3; color: #794815; }
.brand-cover {background:#e4ece4; color:var(--green); font-size:1.5rem}

@media (min-width:761px) { #assets-view .upload-panel { grid-template-columns: minmax(110px,.6fr) 1fr minmax(0,1fr) auto; } }
.asset-body .asset-category { margin-top: 12px; font-size: 12px; }

/* Match details */
#settings-layout:has(#info-tab:not([hidden])) { max-width: 1280px; }
#info-tab {
  grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr);
  align-items: start;
  gap: 20px;
}
#info-tab h2 { margin: 0; font-size: 19px; line-height: 1.3; }
#info-tab .panel, .info-match-card { min-width: 0; border-radius: 12px; }
.info-match-card { grid-column: 1 / -1; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.info-match-surface { position: relative; isolation: isolate; overflow: hidden; padding: 22px 28px 26px; background: #19372e; color: #fffdf7; }
.info-court-lines {
  position: absolute; z-index: -1; pointer-events: none;
  width: 340px; height: 174px; right: -42px; top: -61px; transform: rotate(-21deg);
  border: 1px solid currentColor; color: rgb(189 216 200 / 17%);
}
.info-court-lines::before, .info-court-lines::after { content: ""; position: absolute; }
.info-court-lines::before { inset: 0 16%; border-inline: 1px solid; background: linear-gradient(currentColor,currentColor) center / 100% 1px no-repeat; }
.info-court-lines::after { inset: 0 50% 0 auto; border-left: 1px solid; }
.info-match-heading, .info-section-head, .info-match-foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
#info-sides-heading { display: flex; gap: 9px; align-items: center; }
#info-sides-heading::before { content: ""; width: 4px; height: 17px; border-radius: 2px; background: #fb8650; }
#info-match-status { display: inline-flex; align-items: center; gap: 7px; color: #e4f1e8; font-size: 12px; }
#info-match-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #b2d2b9; }
.info-sides { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: end; gap: clamp(10px,2.5vw,36px); margin-top: 24px; }
.info-sides label { min-width: 0; color: #c5dbce; font-size: 12px; }
.info-sides input {
  font-size: clamp(20px,2.3vw,34px); font-weight: 700; line-height: 1.2; letter-spacing: -.025em;
  color: #fffdf7; background: rgb(12 33 26 / 30%); border: 1px solid #5b7a6b; border-radius: 6px; padding: 9px 14px;
}
.info-sides input:hover { border-color: #bbd1c2; }
.info-sides input:focus { outline-color: #d4ead9; }
.info-versus { align-self: end; padding-bottom: .45em; font: italic 750 clamp(20px,2.4vw,35px)/1 Georgia,serif; color: #ebc4a5; }
.info-match-foot { padding: 16px 26px; gap: 14px; }
.info-match-foot label { flex: 1 1 260px; max-width: 440px; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 14px; }
.info-match-foot .actions { flex-wrap: wrap; }
#info-save-status { color: var(--muted); font-size: 12px; }
#info-save-status:empty { display: none; }
#info-tab :is(.info-event,.roster-settings) { padding: 22px; }
.info-section-head .server-tools { margin: 0; align-items: center; gap: 6px; }
.info-section-head button { padding: 6px 10px; font-size: 12px; }
#info-lineup { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 19px; }
.info-lineup-team { min-width: 0; }
.info-lineup-team h3 { margin: 0; padding: 5px 10px; border-left: 3px solid #60816a; background: #edf2eb; font-size: 12px; }
.info-lineup-team + .info-lineup-team h3 { border-color: #ca6743; background: #f6efe6; }
.info-lineup-player { display: flex; align-items: center; gap: 10px; min-height: 59px; padding: 8px 0; }
.info-lineup-player + .info-lineup-player { border-top: 1px solid #e2e8df; }
.info-lineup-player span:last-child { min-width: 0; }
.info-lineup-player strong, .info-lineup-player small { display: block; overflow-wrap: anywhere; }
.info-lineup-player small { color: var(--muted); font-size: 11px; }
.info-avatar { flex: none; display: grid; place-items: center; position: relative; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: #e6eee6; color: #365747; font-weight: 700; }
.info-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.info-lineup-player.vacant .info-avatar { background: #f2f2ec; color: #8b9a8c; }
.info-lineup-player.vacant strong { color: var(--muted); font-weight: 500; }
#info-roster-settings:has(:is(#roster-form,#profile-form):not([hidden])) #info-lineup { display: none; }
#info-roster-settings .roster-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
#info-tab .info-event { border-top: 3px solid #678572; }
#event-title { display: grid; gap: 6px; margin-block: 18px; }
#info-event-name { font-size: 16px; overflow-wrap: anywhere; }
#info-event-description { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.director-event { border-top: 1px solid var(--line); padding-top: 12px; }
.director-event summary { display: flex; justify-content: space-between; align-items: center; min-height: 32px; font-weight: 650; color: var(--green); cursor: pointer; list-style: none; }
.director-event summary::-webkit-details-marker { display: none; }
.director-event summary::after { content: ""; width: 7px; height: 7px; margin: 0 5px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.director-event[open] summary::after { transform: rotate(225deg); }
#event-form { padding-top: 14px; }
#info-tab #archive-match { grid-column: 1 / -1; }
@media (max-width: 1000px) {
  #info-tab { grid-template-columns: minmax(0,1fr); gap: 14px; }
}
@media (max-width: 600px) {
  .info-match-surface, #info-tab :is(.info-event,.roster-settings) { padding: 16px; }
  .info-sides { gap: 7px; margin-top: 18px; }
  .info-sides input { padding: 9px 7px; }
  .info-versus { font-size: 15px; padding-bottom: .9em; }
  .info-match-foot { padding: 14px 16px; }
  .info-match-foot label { flex-basis: 100%; max-width: none; }
  .info-match-foot .actions { margin-left: auto; }
  #info-lineup { gap: 12px; }
}
@media (max-width: 400px) {
  #info-roster-settings .roster-fields { grid-template-columns: minmax(0,1fr); }
}
.sponsor-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:16px; border-top:1px solid var(--line); }
.sponsor-heading h3 { margin:0; }
#sponsor-form { display:grid; gap:16px; }
#sponsor-form[hidden] { display:none; }
.sponsor-time { display:flex; gap:5px; margin-top:8px; }
.sponsor-time input { min-width:0; }
.sponsor-time select { width:auto; }
#sponsor-items { display:grid; gap:10px; }
.sponsor-item { display:grid; min-width:0; margin:0; gap:8px; padding:12px; border:1px solid var(--line); border-radius:5px; }
.sponsor-item legend { padding:0 5px; font-weight:700; }
.sponsor-item .actions { justify-content:flex-end; }
.sponsor-item .check { margin-right:auto; }
.sponsor-item button { padding:4px 8px; font-size:12px; }
.sponsor-upload { position:relative; display:inline-flex; cursor:pointer; color:var(--green); }
.sponsor-upload input { position:absolute; inset:0; opacity:0; width:100%; cursor:pointer; }
.sponsor-upload:focus-within { outline:2px solid var(--green); }
.sponsor-controls { display:grid; gap:12px; }
.sponsor-controls p { margin:0; }
.sponsor-pick-actions { display:flex; align-items:center; gap:8px; }
.sponsor-pick-actions select { min-width:0; flex:1; }
.sponsor-pick-actions button { flex:none; }
#sponsor-live-status { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }

#video-cues { grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: #bdd8c8; }
#video-cues label { flex-direction: row; align-items: center; }
#video-choice { width: auto; max-width: min(50vw, 28em); padding: 6px; background: #fff; }
#video-cues button { padding: 6px 10px; }
#video-feedback { font-size: 12px; }
#video-dialog { color: #162421; }
#director-scene { white-space: normal; overflow-wrap: anywhere; }
.asset-tabs { display:inline-flex; gap:4px; padding:4px; margin:0 0 16px; background:#e8ede4; border-radius:9px; }
.asset-tabs button { min-width:65px; padding:7px 16px; background:transparent; border:0; color:#476052; }
.asset-tabs button[aria-pressed=true] { background:#fff; color:#20362d; box-shadow:0 1px 4px #17282020; }
.video-library { max-width:880px; }
.video-library-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.video-library-heading h2 { margin:0; font-size:18px; overflow-wrap:anywhere; }
.library-clip { display:flex; align-items:center; gap:12px; padding:14px 0; border-top:1px solid #dce1d7; }
.clip-detail { display:grid; flex:1; min-width:0; gap:4px; overflow-wrap:anywhere; }
.clip-detail small { color:#52695d; }
.clip-symbol { width:44px; height:34px; border-radius:5px; display:grid; place-items:center; background:#e4ede3; color:#305344; flex:none; }
.clip-symbol::after { content:""; border-block:5px solid transparent; border-left:8px solid currentColor; margin-left:2px; }
#video-picker { width:min(540px, 92vw); }
#video-picker-list { max-height:54vh; overflow-y:auto; }
#video-picker footer { margin-top:12px; }
#video-library-state:empty, #video-picker-state:empty { display:none; }
#library-clips, #video-picker-list { margin-top:16px; }
#video-preview { width:min(700px, 92vw); }
#video-preview video { display:block; width:100%; height:min(52vh,400px); margin-top:14px; background:#101815; }
#video-preview-status { margin:8px 0 0; font-size:13px; }
#video-cues { padding:10px 0 2px; border-top:1px solid #3f574b; }
#video-cues select, #video-cues button { color:#213a2e; background:#f5f4ed; }
#video-cues #video-take { color:#173227; background:#c6dfcf; border-color:#a3c2ac; }
#video-cues #video-remove { background:transparent; color:#c6d8cd; border-color:transparent; }
#director-bar .stop-video { background:#ffe3d5; border-color:#eea17b; color:#612b12; }
#director-bar .stop-video::before { content:""; display:inline-block; width:.6em; height:.6em; background:currentColor; margin-right:.48em; }
@media (max-width:520px) {
  .library-clip { gap:6px; }
  .clip-symbol { width:26px; }
  #video-choice { max-width:100%; }
}
