:root{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;color:#e5e7eb;background:#020617;--panel:#0f172a;--line:#334155;--accent:#38bdf8;--good:#16a34a;--bad:#b91c1c;--muted:#94a3b8;touch-action:manipulation}*{box-sizing:border-box}html,body{margin:0;height:100%;background:#020617}[hidden]{display:none!important}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid #475569;border-radius:10px;background:#1e293b;color:#f8fafc;font-weight:700;padding:.58rem .68rem;min-height:44px}button:active{transform:translateY(1px)}button:disabled{opacity:.35}.primary{background:#0369a1;border-color:#0ea5e9}.danger{background:#7f1d1d}.ghost{background:transparent}.huge{font-size:1.22rem;padding:1rem}.full{width:100%}.mt{margin-top:12px}.selected{outline:3px solid #38bdf8;background:#075985}.start-gate{position:fixed;inset:0;z-index:40;display:grid;place-items:center;background:radial-gradient(circle at 50% 35%,#183b62,#020617 65%);padding:24px}.start-card{position:relative;width:min(540px,94vw);text-align:center;padding:30px;background:#0f172af2;border:1px solid #334155;border-radius:20px;box-shadow:0 30px 80px #0008}.start-card img{width:116px}.start-card p,.start-card small{color:#94a3b8}.start-card button{width:100%;margin:1rem 0}
.app-shell{height:100dvh;min-height:600px;display:grid;grid-template-rows:70px 1fr 30px;overflow:hidden}.topbar{display:grid;grid-template-columns:minmax(190px,auto) 1fr minmax(360px,auto);gap:10px;align-items:center;padding:6px 10px;background:#0f172a;border-bottom:1px solid var(--line)}.top-left,.brand{display:flex;align-items:center;gap:8px}.menu-btn{font-size:1.35rem;width:48px;padding:.35rem}.brand img{width:42px;height:42px}.brand div{display:flex;flex-direction:column}.brand span,.match-meta{font-size:.72rem;color:var(--muted)}.match-head{text-align:center;min-width:0}.match-teams{display:grid;grid-template-columns:minmax(70px,1fr) auto minmax(70px,1fr);align-items:center;gap:12px}.match-teams strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.match-teams #headerScore{font-size:1.55rem;font-weight:900;letter-spacing:.03em}.match-meta{display:flex;justify-content:center;gap:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.head-actions{display:flex;align-items:center;justify-content:flex-end;gap:6px}.header-pill,.badge{border-radius:999px;padding:.34rem .58rem;font-size:.74rem;min-height:40px;background:#164e63;border:1px solid #356071}.clock-pill{display:flex;gap:7px;align-items:center}.clock-pill strong{font-size:.95rem}.badge{display:inline-flex;align-items:center}.badge.muted{background:#334155}.badge.ok{background:#14532d}.badge.warn{background:#78350f}
.workspace{min-height:0;padding:8px}.scout-layout{display:grid;grid-template-columns:minmax(180px,19vw) minmax(390px,1fr) minmax(310px,31vw);grid-template-rows:minmax(0,1fr) 64px;gap:8px}.panel{min-height:0;background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:10px;overflow:hidden}.section-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;font-weight:800}.subheading{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:800;margin:8px 0 6px}.capture-tabs{display:flex;gap:5px;margin-bottom:8px}.capture-tabs button{flex:1}.control-panel{display:flex;flex-direction:column;overflow:auto}.control-panel .section-title #selectionLabel{font-size:.7rem;color:var(--muted);text-align:right}.quality-stack{display:grid;grid-template-columns:1fr;gap:6px}.quality-stack button{font-size:1.35rem;min-height:48px}.correction-block{margin-top:auto;padding-top:8px}.compact-buttons{display:grid;grid-template-columns:1fr 1fr;gap:5px}.correction-block>.full{margin-top:6px}.compact{display:flex;align-items:center;justify-content:space-between;color:var(--muted)}.compact input,input,select{background:#020617;color:#f8fafc;border:1px solid #475569;border-radius:8px;padding:.48rem}.set-inline{margin-top:7px}.set-inline input{width:62px}
.protocol-panel{display:grid;grid-template-rows:auto minmax(0,1fr) auto}.protocol-wrap{min-height:0;overflow:auto;border:1px solid #253247;border-radius:8px}.protocol-wrap table{border-collapse:collapse;width:100%;font-size:.78rem}.protocol-wrap th{position:sticky;top:0;background:#1e293b;z-index:1}.protocol-wrap th,.protocol-wrap td{padding:6px;border-bottom:1px solid #253247;text-align:left;white-space:nowrap}.protocol-wrap tbody tr:first-child{background:#13243a}.note-label{display:flex;gap:10px;align-items:center;margin-top:7px}.note-label span{font-weight:800}.note-label textarea{flex:1;min-height:76px;max-height:76px;resize:none;font-size:1.15rem;line-height:1.3;padding:10px 12px;border-radius:9px;border:1px solid #475569;background:#0b1220;color:#f8fafc}.abbr-hint{grid-column:2;color:var(--muted);font-size:.7rem;margin-top:-5px}.court-panel{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto}.court-wrap{min-height:0}.court{height:100%;position:relative;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:26px 1fr 1fr;gap:7px;padding:7px;border:2px solid #94a3b8;background:linear-gradient(90deg,#713f12,#854d0e)}.court.opponent{background:linear-gradient(90deg,#334155,#475569)}.court .net{grid-column:1/-1;text-align:center;font-size:.7rem;font-weight:900;background:#e2e8f0;color:#111827;align-self:center}.pos{min-height:82px;border:2px solid #cbd5e1;background:#f8fafce9;color:#0f172a;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;padding:.35rem}.pos b{font-size:1.1rem}.pos span{font-weight:900}.pos small{font-size:.68rem;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pos.selectedpos{outline:5px solid #38bdf8}.opponent .pos.selectedpos{outline-color:#fb923c}.target-hint{margin-top:7px;padding:7px;background:#78350f;border-radius:8px;text-align:center;font-weight:800}.rotation-controls{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:7px}.action-dock{grid-column:1/-1;background:#0f172a;border:1px solid #334155;border-radius:14px;padding:7px;display:flex;align-items:center}.action-row{width:100%;display:grid;grid-template-columns:repeat(6,1fr);gap:6px}.action-row button{min-height:48px}.statusbar{display:flex;justify-content:space-between;align-items:center;padding:0 10px;background:#0f172a;border-top:1px solid var(--line);font-size:.76rem}
.drawer-backdrop{position:fixed;inset:0;z-index:50;background:#0009;display:flex;justify-content:flex-start}.drawer{width:min(760px,90vw);height:100%;background:#0f172a;border-right:1px solid #475569;box-shadow:10px 0 40px #0008;display:grid;grid-template-rows:58px auto 1fr}.drawer>header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--line)}.drawer-nav{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:8px;border-bottom:1px solid var(--line);background:#0b1220}.drawer-nav button{text-align:left}.drawer-body{overflow:auto;padding:14px}.iconclose{font-size:1.2rem;padding:.4rem .65rem}.toolbar{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}.data-table{width:100%;border-collapse:collapse}.data-table th,.data-table td{border-bottom:1px solid #334155;padding:7px;text-align:left}.data-table tr.inactive{opacity:.5}.data-table button{padding:.35rem .5rem}.form-grid{display:grid;grid-template-columns:150px 1fr;gap:8px;align-items:center}.form-grid label{color:var(--muted)}.form-grid input,.form-grid select{width:100%}.card{border:1px solid #334155;border-radius:12px;padding:12px;margin:8px 0;background:#111c2e}.small{font-size:.76rem;color:var(--muted)}.checklist{display:grid;gap:5px}.checkrow{display:grid;grid-template-columns:auto 1fr 80px 100px;gap:7px;align-items:center;padding:5px;border-bottom:1px solid #253247}.dialog-backdrop{position:fixed;inset:0;z-index:60;background:#000a;display:grid;place-items:center;padding:20px}.dialog{width:min(560px,95vw);max-height:88vh;overflow:auto;background:#0f172a;border:1px solid #475569;border-radius:16px;padding:18px}.dialog h2{margin-top:0}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:15px}.dialog #dialogBody{display:grid;gap:9px}.dialog label{display:grid;grid-template-columns:145px 1fr;align-items:center;gap:8px}.lineup-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.lineup-grid label{display:flex;flex-direction:column;align-items:stretch}.sync-log{white-space:pre-wrap;background:#020617;border-radius:8px;padding:8px;min-height:80px}.diagnostics pre{white-space:pre-wrap;font-size:.7rem}.camera-state{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.camera-state>div{padding:8px;background:#020617;border-radius:8px;text-align:center}.camera-state span{display:block;color:var(--muted);font-size:.7rem}.camera-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.camera-actions button:first-child{grid-column:1/-1}
.quality-switches{margin-top:14px;padding-top:10px;border-top:1px solid rgba(148,163,184,.25)}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:8px 0 2px;font-weight:600}.switch-row+small,.quality-switches small{display:block;opacity:.72;margin:0 0 8px}.switch{position:relative;display:inline-block;width:54px;height:30px;flex:0 0 54px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;inset:0;cursor:pointer;background:#475569;border-radius:999px;transition:.18s}.slider:before{content:'';position:absolute;width:22px;height:22px;left:4px;top:4px;background:white;border-radius:50%;transition:.18s}.switch input:checked+.slider{background:#0ea5e9}.switch input:checked+.slider:before{transform:translateX(24px)}
@media(max-width:1050px){.topbar{grid-template-columns:auto 1fr auto}.compact-brand div{display:none}.head-actions .badge{display:none}.scout-layout{grid-template-columns:minmax(155px,20vw) 1fr minmax(280px,34vw)}.protocol-wrap table{font-size:.7rem}.pos small{display:none}}
@media(max-width:820px){.app-shell{min-height:700px}.topbar{grid-template-columns:auto 1fr}.head-actions{grid-column:1/-1;justify-content:center}.scout-layout{grid-template-columns:150px 1fr;grid-template-rows:minmax(0,1fr) minmax(300px,.85fr) 64px}.court-panel{grid-column:2}.protocol-panel{grid-column:1/-1;grid-row:2}.control-panel{grid-row:1}.action-dock{grid-row:3}.drawer-nav{grid-template-columns:repeat(2,1fr)}}
@media(max-height:720px) and (min-width:821px){
  .app-shell{grid-template-rows:64px 1fr 28px}
  .quality-stack{gap:4px}.quality-stack button{min-height:40px;padding:.35rem;font-size:1.18rem}
  .correction-block{padding-top:5px}.correction-block>.full{margin-top:4px;min-height:38px;padding:.34rem}.compact-buttons button{min-height:38px;padding:.32rem}
  .capture-tabs button{min-height:38px}.subheading{margin:5px 0 4px}.set-inline{margin-top:4px}
  .action-dock{height:58px}.action-row button{min-height:42px;padding:.4rem}
  .court{gap:5px;padding:5px}.pos{min-height:68px}
}

/* Rev. 13 – Bluetooth-Diagnose */
.ble-diag{margin-top:10px;border:1px solid #334155;border-radius:12px;background:#0b1220;overflow:hidden}
.ble-diag h3{margin:0;padding:10px 12px;border-bottom:1px solid #334155;font-size:.95rem}
.ble-diag-grid{display:grid;grid-template-columns:1fr auto;gap:0}
.ble-diag-grid>span,.ble-diag-grid>strong{padding:8px 12px;border-bottom:1px solid #1e293b}
.ble-diag-grid>span{color:var(--muted)}
.ble-diag-grid>strong{text-align:right;max-width:300px;overflow-wrap:anywhere}
.diag-ok{color:#86efac}.diag-warn{color:#fde68a}.diag-bad{color:#fca5a5}.diag-neutral{color:#cbd5e1}
.ble-diag-actions{display:flex;gap:6px;flex-wrap:wrap;padding:10px 12px}
.ble-diag-log{margin:0 12px 12px;max-height:210px;overflow:auto;white-space:pre-wrap;background:#020617;border:1px solid #1e293b;border-radius:8px;padding:9px;font-size:.74rem;line-height:1.35;user-select:text}

/* ==============================================================
   Rev. 13e – konsolidiertes Layout
   Ziel: identische Grundstruktur in Chromium/Samsung Internet/Firefox,
   Landscape-first für Tablet und Smartphone in Desktopdarstellung.
   ============================================================== */

/* Header: brand is one compact clickable unit; score is truly centered. */
.topbar{
  position:relative;
  grid-template-columns:minmax(210px,1fr) minmax(240px,1fr) minmax(300px,1fr);
  min-width:0;
  height:70px;
}
.brand-menu{
  justify-self:start;
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-width:0;
  max-width:260px;
  height:52px;
  padding:5px 9px 5px 6px;
  border-radius:12px;
  background:#111c2e;
  border:1px solid #334155;
  text-align:left;
}
.brand-menu img{width:40px!important;height:40px!important;min-width:40px;max-width:40px;object-fit:contain;border-radius:8px}
.brand-copy{display:flex;flex-direction:column;min-width:0;line-height:1.05}
.brand-copy strong{font-size:.90rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-copy small{font-size:.64rem;color:var(--muted);margin-top:4px;white-space:nowrap}
.brand-hamburger{font-size:1.15rem;line-height:1;margin-left:2px}
.match-center{
  position:absolute;
  left:50%;top:50%;transform:translate(-50%,-50%);
  display:flex;align-items:center;justify-content:center;
  width:min(46vw,620px);min-width:0;pointer-events:none;
}
.match-center>*{pointer-events:auto}
.match-setup-link{min-height:42px;padding:.45rem .8rem;background:#111c2e}
.match-score-block{display:grid;grid-template-columns:minmax(60px,1fr) auto minmax(60px,1fr);align-items:center;gap:12px;width:100%;text-align:center}
.match-score-block strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.match-score-block #headerScore{font-size:1.35rem;font-weight:900;white-space:nowrap}
.header-set{font-weight:800;white-space:nowrap}
.head-actions{min-width:0;overflow:hidden}

/* Main desktop/landscape workspace: fixed three panels + one bottom correction row. */
.workspace.scout-layout{
  display:grid;
  grid-template-columns:minmax(240px,19%) minmax(480px,1fr) minmax(390px,31%);
  grid-template-rows:minmax(0,1fr) 66px;
  grid-template-areas:
    "controls protocol court"
    "corrections corrections corrections";
  gap:8px;
  min-width:0;
  min-height:0;
  overflow:hidden;
}
.control-panel{grid-area:controls;min-width:0}
.protocol-panel{grid-area:protocol;min-width:0}
.court-panel{grid-area:court;min-width:0}
.correction-dock{
  grid-area:corrections;
  display:grid;
  grid-template-columns:auto repeat(7,minmax(105px,1fr));
  align-items:stretch;
  gap:6px;
  min-width:0;
  padding:7px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--panel);
  overflow:hidden;
}
.correction-label{display:flex;align-items:center;padding:0 3px;font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:800;white-space:nowrap}
.correction-dock button{min-width:0;min-height:50px;padding:.45rem .55rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Left scouting panel. */
.inline-quality-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:58px;
  padding:9px 10px;
  margin:4px 0 10px;
  border:1px solid #334155;
  border-radius:12px;
  background:#111c2e;
  font-weight:800;
}
.inline-quality-toggle>span:first-child{min-width:0;line-height:1.15}
.large-switch{width:58px;height:32px;flex-basis:58px}
.large-switch .slider:before{width:24px;height:24px}
.large-switch input:checked+.slider:before{transform:translateX(26px)}
.technique-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
.technique-grid button{width:100%;min-width:0;min-height:66px;padding:.55rem .35rem;font-size:1rem;white-space:normal}
.quality-stack{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%}
.quality-stack button{width:100%;min-width:0;min-height:68px;font-size:1.28rem;padding:.45rem}

/* Protocol and doubled note field. */
.protocol-panel{grid-template-rows:auto minmax(0,1fr) auto}
.note-label{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:center;margin-top:8px}
.note-label textarea{width:100%;height:78px;min-height:78px;max-height:78px;font-size:1.18rem;line-height:1.25;padding:12px 14px}
.protocol-wrap{width:100%;min-width:0}
.protocol-wrap table{table-layout:auto}

/* Court always retains six fixed visual slots. Only player content rotates. */
.court-panel{grid-template-rows:auto minmax(0,1fr) auto auto;overflow:hidden}
.court-title{min-width:0}
.opponent-switch{display:inline-flex;align-items:center;gap:7px;margin-left:auto;white-space:nowrap}
.court-wrap{min-width:0;min-height:0;overflow:hidden}
.court{width:100%;min-width:0;overflow:hidden;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:26px repeat(2,minmax(0,1fr))}
.pos{min-width:0;min-height:0;height:auto;overflow:hidden}
.pos b{font-size:1.15rem}
.pos span,.pos small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rotation-controls button{min-height:54px}

/* Status bar never competes with workspace. */
.statusbar{min-width:0;overflow:hidden}
.status-right{display:flex;align-items:center;gap:6px;min-width:0;white-space:nowrap}

/* Landscape phone / small desktop viewport: preserve 3-column concept, compact it. */
@media (max-width:1250px) and (orientation:landscape){
  .app-shell{grid-template-rows:62px minmax(0,1fr) 28px;min-height:0}
  .topbar{height:62px;grid-template-columns:minmax(175px,1fr) 1fr minmax(250px,1fr);padding:5px 7px}
  .brand-menu{height:48px;max-width:215px;gap:6px;padding:4px 7px 4px 5px}
  .brand-menu img{width:36px!important;height:36px!important;min-width:36px;max-width:36px}
  .brand-copy strong{font-size:.78rem}.brand-copy small{font-size:.58rem}.brand-hamburger{font-size:1rem}
  .match-center{width:min(42vw,460px)}
  .match-score-block{gap:7px}.match-score-block #headerScore{font-size:1.15rem}
  .head-actions{gap:4px}.header-pill{font-size:.66rem;min-height:38px;padding:.30rem .45rem}.header-set{font-size:.75rem}
  .workspace.scout-layout{
    grid-template-columns:minmax(205px,20%) minmax(390px,1fr) minmax(330px,32%);
    grid-template-rows:minmax(0,1fr) 58px;
    gap:6px;padding:6px;
  }
  .panel{padding:8px;border-radius:12px}
  .section-title{margin-bottom:6px;font-size:.92rem}
  .inline-quality-toggle{min-height:50px;padding:7px 8px;margin-bottom:7px;font-size:.86rem}
  .technique-grid{gap:6px}.technique-grid button{min-height:55px;font-size:.90rem}
  .quality-stack{gap:6px}.quality-stack button{min-height:52px;font-size:1.12rem}
  .subheading{margin:5px 0 4px;font-size:.68rem}
  .protocol-wrap table{font-size:.68rem}.protocol-wrap th,.protocol-wrap td{padding:5px}
  .note-label textarea{height:66px;min-height:66px;max-height:66px;font-size:1rem}
  .court{gap:5px;padding:5px}.court .net{font-size:.62rem}.pos b{font-size:1rem}.pos span{font-size:.82rem}.pos small{font-size:.60rem}
  .rotation-controls{gap:5px;margin-top:5px}.rotation-controls button{min-height:46px;padding:.35rem;font-size:.82rem}
  .correction-dock{grid-template-columns:auto repeat(7,minmax(82px,1fr));padding:5px;gap:5px}
  .correction-dock button{min-height:46px;font-size:.75rem;padding:.3rem}.correction-label{font-size:.60rem}
}

/* Very wide tablet/desktop: retain comfortable touch targets. */
@media (min-width:1600px) and (orientation:landscape){
  .workspace.scout-layout{grid-template-columns:minmax(280px,19%) minmax(620px,1fr) minmax(470px,31%)}
  .technique-grid button{min-height:72px;font-size:1.04rem}
  .quality-stack button{min-height:72px}
}

/* Portrait is not the primary scouting mode; keep it usable without reordering chaos. */
@media (orientation:portrait) and (max-width:900px){
  .app-shell{height:auto;min-height:100dvh;overflow:auto;grid-template-rows:auto auto 30px}
  .topbar{position:sticky;top:0;z-index:20;height:auto;min-height:64px;grid-template-columns:1fr auto;padding:6px}
  .match-center{position:static;transform:none;width:auto;grid-column:1/-1;grid-row:2;padding:4px 0}
  .head-actions{grid-column:2;grid-row:1;max-width:48vw}
  .workspace.scout-layout{display:grid;grid-template-columns:1fr;grid-template-rows:auto;grid-template-areas:"controls" "court" "protocol" "corrections";overflow:visible}
  .control-panel,.protocol-panel,.court-panel{overflow:visible;min-height:420px}
  .correction-dock{grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}
  .correction-label{grid-column:1/-1}
  .court-wrap{min-height:520px}
}


/* ==============================================================
   Rev. 14 – adaptive Viewport-/Fensterbasis
   Die Live-Oberfläche richtet sich an der tatsächlich verfügbaren
   Visual-Viewport-Größe aus. Keine gerätespezifische Skalierung.
   ============================================================== */
:root{
  --vsw-vw:100vw;
  --vsw-vh:100dvh;
  --vsw-scale:1;
  --vsw-hscale:1;
  --vsw-gap:clamp(4px,calc(8px * var(--vsw-scale)),8px);
  --vsw-panel-pad:clamp(6px,calc(10px * var(--vsw-scale)),10px);
  --vsw-control-font:clamp(.74rem,calc(.90rem * var(--vsw-scale)),1rem);
}
html,body{width:100%;height:100%;max-width:100%;overflow:hidden}
body{min-width:0}
.app-shell{
  width:100%;
  height:var(--vsw-vh,100dvh);
  min-height:0!important;
  max-width:100%;
  grid-template-rows:clamp(52px,calc(70px * var(--vsw-hscale)),70px) minmax(0,1fr) clamp(24px,calc(30px * var(--vsw-hscale)),30px);
  overflow:hidden;
}
.topbar{
  height:auto!important;
  min-width:0;
  grid-template-columns:minmax(0,1fr) minmax(150px,auto) minmax(0,1fr)!important;
  gap:var(--vsw-gap);
  padding:clamp(4px,calc(6px * var(--vsw-scale)),6px) clamp(6px,calc(10px * var(--vsw-scale)),10px);
}
.brand-menu{grid-column:1;justify-self:start;max-width:min(270px,100%);min-width:0;height:clamp(42px,calc(52px * var(--vsw-hscale)),52px)}
.brand-menu img{width:clamp(32px,calc(40px * var(--vsw-scale)),40px)!important;height:clamp(32px,calc(40px * var(--vsw-scale)),40px)!important;min-width:clamp(32px,calc(40px * var(--vsw-scale)),40px)!important;max-width:40px!important}
.brand-copy strong{font-size:clamp(.70rem,calc(.90rem * var(--vsw-scale)),.90rem)}
.brand-copy small{font-size:clamp(.52rem,calc(.64rem * var(--vsw-scale)),.64rem)}
.match-center{
  position:static!important;
  transform:none!important;
  grid-column:2;
  justify-self:center;
  width:auto!important;
  max-width:min(46vw,620px);
  min-width:0;
}
.match-setup-link{min-height:clamp(38px,calc(42px * var(--vsw-hscale)),42px);font-size:clamp(.78rem,calc(1rem * var(--vsw-scale)),1rem);padding:.35rem clamp(.45rem,calc(.8rem * var(--vsw-scale)),.8rem)}
.match-score-block{width:min(46vw,620px);grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:clamp(4px,calc(12px * var(--vsw-scale)),12px)}
.match-score-block strong{font-size:clamp(.68rem,calc(1rem * var(--vsw-scale)),1rem)}
.match-score-block #headerScore{font-size:clamp(1rem,calc(1.35rem * var(--vsw-scale)),1.35rem)}
.head-actions{grid-column:3;justify-self:end;max-width:100%;min-width:0;gap:clamp(3px,calc(6px * var(--vsw-scale)),6px)}
.header-set{font-size:clamp(.64rem,calc(.84rem * var(--vsw-scale)),.84rem)}
.header-pill{min-width:0;min-height:clamp(34px,calc(40px * var(--vsw-hscale)),40px);font-size:clamp(.60rem,calc(.74rem * var(--vsw-scale)),.74rem);padding:.25rem clamp(.30rem,calc(.58rem * var(--vsw-scale)),.58rem);white-space:nowrap}
.clock-pill strong{font-size:clamp(.72rem,calc(.95rem * var(--vsw-scale)),.95rem)}
.workspace.scout-layout{
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  padding:var(--vsw-gap)!important;
  gap:var(--vsw-gap)!important;
  grid-template-columns:minmax(0,24fr) minmax(0,47fr) minmax(0,29fr)!important;
  grid-template-rows:minmax(0,1fr) clamp(48px,calc(66px * var(--vsw-hscale)),66px)!important;
  overflow:hidden;
}
.panel{min-width:0!important;min-height:0!important;padding:var(--vsw-panel-pad);border-radius:clamp(9px,calc(14px * var(--vsw-scale)),14px)}
.control-panel{overflow:hidden!important}
.section-title{font-size:clamp(.78rem,calc(1rem * var(--vsw-scale)),1rem);margin-bottom:clamp(3px,calc(8px * var(--vsw-hscale)),8px)}
.control-panel .section-title #selectionLabel{font-size:clamp(.56rem,calc(.70rem * var(--vsw-scale)),.70rem)}
.inline-quality-toggle{min-height:clamp(42px,calc(58px * var(--vsw-hscale)),58px);padding:clamp(5px,calc(9px * var(--vsw-hscale)),9px) clamp(6px,calc(10px * var(--vsw-scale)),10px);margin:2px 0 clamp(4px,calc(10px * var(--vsw-hscale)),10px);font-size:var(--vsw-control-font)}
.large-switch{transform:scale(clamp(.78,var(--vsw-scale),1));transform-origin:right center}
.subheading{font-size:clamp(.58rem,calc(.78rem * var(--vsw-scale)),.78rem);margin:clamp(3px,calc(8px * var(--vsw-hscale)),8px) 0 clamp(3px,calc(6px * var(--vsw-hscale)),6px)}
.technique-grid{gap:clamp(4px,calc(8px * var(--vsw-scale)),8px)!important}
.technique-grid button{min-height:clamp(42px,calc(66px * var(--vsw-hscale)),66px)!important;font-size:clamp(.72rem,calc(1rem * var(--vsw-scale)),1rem)!important;padding:.25rem .30rem!important}
.quality-stack{gap:clamp(4px,calc(8px * var(--vsw-scale)),8px)!important}
.quality-stack button{min-height:clamp(38px,calc(58px * var(--vsw-hscale)),68px)!important;font-size:clamp(.92rem,calc(1.28rem * var(--vsw-scale)),1.28rem)!important;padding:.2rem!important}
.protocol-panel{overflow:hidden!important}
.protocol-wrap table{font-size:clamp(.58rem,calc(.78rem * var(--vsw-scale)),.78rem)}
.protocol-wrap th,.protocol-wrap td{padding:clamp(3px,calc(6px * var(--vsw-hscale)),6px) clamp(3px,calc(6px * var(--vsw-scale)),6px)}
.note-label{gap:clamp(5px,calc(10px * var(--vsw-scale)),10px);margin-top:clamp(4px,calc(8px * var(--vsw-hscale)),8px);font-size:clamp(.72rem,calc(1rem * var(--vsw-scale)),1rem)}
.note-label textarea{height:clamp(52px,calc(78px * var(--vsw-hscale)),78px)!important;min-height:clamp(52px,calc(78px * var(--vsw-hscale)),78px)!important;max-height:clamp(52px,calc(78px * var(--vsw-hscale)),78px)!important;font-size:clamp(.82rem,calc(1.18rem * var(--vsw-scale)),1.18rem)!important;padding:clamp(6px,calc(12px * var(--vsw-hscale)),12px) clamp(8px,calc(14px * var(--vsw-scale)),14px)}
.court-panel{overflow:hidden!important}
.court-title{font-size:clamp(.68rem,calc(1rem * var(--vsw-scale)),1rem)}
.opponent-switch{gap:clamp(3px,calc(7px * var(--vsw-scale)),7px)}
.court{gap:clamp(3px,calc(7px * var(--vsw-scale)),7px);padding:clamp(3px,calc(7px * var(--vsw-scale)),7px);grid-template-rows:clamp(18px,calc(26px * var(--vsw-hscale)),26px) repeat(2,minmax(0,1fr))}
.court .net{font-size:clamp(.54rem,calc(.70rem * var(--vsw-scale)),.70rem)}
.pos{padding:clamp(.15rem,calc(.35rem * var(--vsw-scale)),.35rem)!important}
.pos b{font-size:clamp(.82rem,calc(1.15rem * var(--vsw-scale)),1.15rem)}
.pos span{font-size:clamp(.66rem,calc(1rem * var(--vsw-scale)),1rem)}
.pos small{font-size:clamp(.52rem,calc(.68rem * var(--vsw-scale)),.68rem)}
.rotation-controls{gap:clamp(3px,calc(6px * var(--vsw-scale)),6px);margin-top:clamp(3px,calc(7px * var(--vsw-hscale)),7px)}
.rotation-controls button{min-height:clamp(38px,calc(54px * var(--vsw-hscale)),54px);font-size:clamp(.68rem,calc(.9rem * var(--vsw-scale)),.9rem);padding:.25rem}
.correction-dock{
  grid-template-columns:auto repeat(7,minmax(0,1fr))!important;
  gap:clamp(3px,calc(6px * var(--vsw-scale)),6px)!important;
  padding:clamp(4px,calc(7px * var(--vsw-hscale)),7px)!important;
  min-width:0;
  overflow:hidden;
}
.correction-label{font-size:clamp(.50rem,calc(.72rem * var(--vsw-scale)),.72rem);padding:0 clamp(1px,calc(3px * var(--vsw-scale)),3px)}
.correction-dock button{min-width:0!important;min-height:clamp(38px,calc(50px * var(--vsw-hscale)),50px)!important;font-size:clamp(.58rem,calc(.80rem * var(--vsw-scale)),.80rem);padding:.22rem .25rem!important;white-space:normal;line-height:1.05}
.statusbar{font-size:clamp(.58rem,calc(.76rem * var(--vsw-scale)),.76rem);padding:0 clamp(6px,calc(10px * var(--vsw-scale)),10px);min-width:0}
.status-right{overflow:hidden;gap:clamp(3px,calc(6px * var(--vsw-scale)),6px)}
.badge{font-size:clamp(.56rem,calc(.74rem * var(--vsw-scale)),.74rem);padding:.2rem clamp(.30rem,calc(.58rem * var(--vsw-scale)),.58rem);min-height:0}

/* Sehr schmale Multitasking-Fenster: drei Spalten bleiben zunächst erhalten,
   aber Meta-Informationen werden reduziert. Erst unter 820 px wird auf zwei
   Arbeitsbereiche umgestellt, damit Touchziele nicht unbrauchbar klein werden. */
@media (max-width:1050px) and (orientation:landscape){
  .brand-copy small,.header-set{display:none}
  .brand-menu{max-width:170px}
  .head-actions{gap:2px}
  .header-pill{padding:.20rem .28rem}
  .workspace.scout-layout{grid-template-columns:minmax(0,25fr) minmax(0,43fr) minmax(0,32fr)!important}
  .correction-label{display:none}
  .correction-dock{grid-template-columns:repeat(7,minmax(0,1fr))!important}
}
@media (max-width:820px) and (orientation:landscape){
  .topbar{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important}
  .brand-copy strong{max-width:92px}
  .clock-pill #clockMode{display:none}
  .workspace.scout-layout{
    grid-template-columns:minmax(0,40fr) minmax(0,60fr)!important;
    grid-template-areas:"controls court" "corrections corrections"!important;
  }
  .protocol-panel{display:none!important}
  .technique-grid button{font-size:clamp(.66rem,2vw,.82rem)!important}
}

/* JS-gesteuerte Klassen aus visualViewport. Sie reagieren auch auf Split-Screen,
   DeX und frei skalierte Desktopfenster ohne Geräteerkennung. */
.viewport-compact .header-set{display:none}.viewport-compact .brand-copy small{display:block!important}
.viewport-compact .correction-label{display:none}
.viewport-compact .correction-dock{grid-template-columns:repeat(7,minmax(0,1fr))!important}
.viewport-low .technique-grid button{min-height:42px!important}
.viewport-low .quality-stack button{min-height:38px!important}
.viewport-low .inline-quality-toggle{min-height:42px!important;margin-bottom:4px!important}
.viewport-low .note-label textarea{height:52px!important;min-height:52px!important;max-height:52px!important}
.viewport-low .rotation-controls button{min-height:38px!important}
.viewport-low .subheading{margin:3px 0!important}


/* ==============================================================
   Rev. 14 – globally coupled viewport scaling
   Every live-scouting UI family consumes the same --vsw-ui-scale.
   Height and width therefore shrink/grow together in split-screen,
   DeX and ordinary desktop windows. Individual controls keep only
   safety min/max limits for usability.
   ============================================================== */
:root{
  --vsw-ui-scale:1;
  --vsw-switch-w:clamp(40px,calc(54px * var(--vsw-ui-scale)),54px);
  --vsw-switch-h:clamp(23px,calc(30px * var(--vsw-ui-scale)),30px);
  --vsw-switch-inset:clamp(3px,calc(4px * var(--vsw-ui-scale)),4px);
  --vsw-switch-knob:calc(var(--vsw-switch-h) - (2 * var(--vsw-switch-inset)));
  --vsw-tech-h:clamp(38px,calc(58px * var(--vsw-ui-scale)),58px);
  --vsw-quality-h:clamp(36px,calc(50px * var(--vsw-ui-scale)),50px);
  --vsw-touch-h:clamp(36px,calc(48px * var(--vsw-ui-scale)),48px);
  --vsw-radius:clamp(7px,calc(14px * var(--vsw-ui-scale)),14px);
}

/* Global geometry coupling */
.app-shell{
  grid-template-rows:
    clamp(48px,calc(66px * var(--vsw-ui-scale)),66px)
    minmax(0,1fr)
    clamp(22px,calc(28px * var(--vsw-ui-scale)),28px)!important;
}
.topbar{gap:clamp(3px,calc(8px * var(--vsw-ui-scale)),8px)!important;padding:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px) clamp(4px,calc(9px * var(--vsw-ui-scale)),9px)!important}
.brand-menu{height:clamp(38px,calc(50px * var(--vsw-ui-scale)),50px)!important;border-radius:var(--vsw-radius)!important;padding:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important;gap:clamp(4px,calc(8px * var(--vsw-ui-scale)),8px)!important}
.brand-menu img{width:clamp(30px,calc(40px * var(--vsw-ui-scale)),40px)!important;height:clamp(30px,calc(40px * var(--vsw-ui-scale)),40px)!important;min-width:clamp(30px,calc(40px * var(--vsw-ui-scale)),40px)!important}
.brand-hamburger{font-size:clamp(.88rem,calc(1.25rem * var(--vsw-ui-scale)),1.25rem)!important}
.brand-copy strong{font-size:clamp(.66rem,calc(.90rem * var(--vsw-ui-scale)),.90rem)!important}
.brand-copy small{font-size:clamp(.48rem,calc(.64rem * var(--vsw-ui-scale)),.64rem)!important}
.match-setup-link{min-height:clamp(34px,calc(42px * var(--vsw-ui-scale)),42px)!important;font-size:clamp(.72rem,calc(1rem * var(--vsw-ui-scale)),1rem)!important;border-radius:clamp(7px,calc(11px * var(--vsw-ui-scale)),11px)!important}
.match-score-block{gap:clamp(3px,calc(10px * var(--vsw-ui-scale)),10px)!important}
.match-score-block strong{font-size:clamp(.64rem,calc(.95rem * var(--vsw-ui-scale)),.95rem)!important}.match-score-block #headerScore{font-size:clamp(.92rem,calc(1.30rem * var(--vsw-ui-scale)),1.30rem)!important}
.header-set{font-size:clamp(.58rem,calc(.80rem * var(--vsw-ui-scale)),.80rem)!important}.head-actions{gap:clamp(2px,calc(5px * var(--vsw-ui-scale)),5px)!important}
.header-pill{min-height:clamp(32px,calc(40px * var(--vsw-ui-scale)),40px)!important;font-size:clamp(.56rem,calc(.74rem * var(--vsw-ui-scale)),.74rem)!important;padding:clamp(.16rem,calc(.28rem * var(--vsw-ui-scale)),.28rem) clamp(.24rem,calc(.54rem * var(--vsw-ui-scale)),.54rem)!important}
.clock-pill strong{font-size:clamp(.68rem,calc(.95rem * var(--vsw-ui-scale)),.95rem)!important}

.workspace.scout-layout{padding:clamp(4px,calc(8px * var(--vsw-ui-scale)),8px)!important;gap:clamp(4px,calc(8px * var(--vsw-ui-scale)),8px)!important;grid-template-rows:minmax(0,1fr) clamp(44px,calc(62px * var(--vsw-ui-scale)),62px)!important}
.panel{padding:clamp(5px,calc(10px * var(--vsw-ui-scale)),10px)!important;border-radius:var(--vsw-radius)!important}
.section-title{font-size:clamp(.72rem,calc(1rem * var(--vsw-ui-scale)),1rem)!important;gap:clamp(3px,calc(8px * var(--vsw-ui-scale)),8px)!important;margin-bottom:clamp(3px,calc(7px * var(--vsw-ui-scale)),7px)!important}
.control-panel .section-title #selectionLabel{font-size:clamp(.52rem,calc(.70rem * var(--vsw-ui-scale)),.70rem)!important}
.subheading{font-size:clamp(.54rem,calc(.76rem * var(--vsw-ui-scale)),.76rem)!important;margin:clamp(2px,calc(6px * var(--vsw-ui-scale)),6px) 0 clamp(2px,calc(5px * var(--vsw-ui-scale)),5px)!important}

/* Left panel gets a deterministic height budget: detailed switch, all three
   technique rows and both possible detailed-quality rows always fit. */
.control-panel{display:grid!important;grid-template-rows:auto auto auto auto auto auto;align-content:start;overflow:hidden!important}
.inline-quality-toggle{min-height:clamp(36px,calc(50px * var(--vsw-ui-scale)),50px)!important;padding:clamp(4px,calc(7px * var(--vsw-ui-scale)),7px) clamp(5px,calc(9px * var(--vsw-ui-scale)),9px)!important;margin:1px 0 clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important;font-size:clamp(.66rem,calc(.90rem * var(--vsw-ui-scale)),.90rem)!important;border-radius:var(--vsw-radius)!important}
.technique-grid{gap:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important;grid-auto-rows:var(--vsw-tech-h)!important}
.technique-grid button{height:var(--vsw-tech-h)!important;min-height:0!important;max-height:var(--vsw-tech-h)!important;font-size:clamp(.66rem,calc(.96rem * var(--vsw-ui-scale)),.96rem)!important;padding:clamp(.14rem,calc(.30rem * var(--vsw-ui-scale)),.30rem)!important;border-radius:var(--vsw-radius)!important}
.quality-stack{gap:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important;grid-auto-rows:var(--vsw-quality-h)!important}
.quality-stack button{height:var(--vsw-quality-h)!important;min-height:0!important;max-height:var(--vsw-quality-h)!important;font-size:clamp(.84rem,calc(1.18rem * var(--vsw-ui-scale)),1.18rem)!important;padding:.12rem!important;border-radius:var(--vsw-radius)!important}

/* All switches, including Detaillierte Bewertung and Gegner, use the same scale. */
.switch,.large-switch{width:var(--vsw-switch-w)!important;height:var(--vsw-switch-h)!important;flex:0 0 var(--vsw-switch-w)!important;transform:none!important}
.slider{border-radius:999px!important}.slider:before{width:var(--vsw-switch-knob)!important;height:var(--vsw-switch-knob)!important;left:var(--vsw-switch-inset)!important;top:var(--vsw-switch-inset)!important}
.switch input:checked+.slider:before{transform:translateX(calc(var(--vsw-switch-w) - var(--vsw-switch-h)))!important}

/* Protocol / note */
.protocol-wrap table{font-size:clamp(.54rem,calc(.76rem * var(--vsw-ui-scale)),.76rem)!important}
.protocol-wrap th,.protocol-wrap td{padding:clamp(2px,calc(5px * var(--vsw-ui-scale)),5px)!important}
.note-label{gap:clamp(4px,calc(8px * var(--vsw-ui-scale)),8px)!important;margin-top:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important;font-size:clamp(.66rem,calc(.92rem * var(--vsw-ui-scale)),.92rem)!important}
.note-label textarea{height:clamp(46px,calc(72px * var(--vsw-ui-scale)),72px)!important;min-height:clamp(46px,calc(72px * var(--vsw-ui-scale)),72px)!important;max-height:clamp(46px,calc(72px * var(--vsw-ui-scale)),72px)!important;font-size:clamp(.76rem,calc(1.08rem * var(--vsw-ui-scale)),1.08rem)!important;padding:clamp(5px,calc(9px * var(--vsw-ui-scale)),9px) clamp(6px,calc(11px * var(--vsw-ui-scale)),11px)!important;border-radius:var(--vsw-radius)!important}

/* Court / rotations */
.court-title{font-size:clamp(.66rem,calc(.96rem * var(--vsw-ui-scale)),.96rem)!important}.opponent-switch{gap:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important}
.court{gap:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important;padding:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important;grid-template-rows:clamp(17px,calc(24px * var(--vsw-ui-scale)),24px) repeat(2,minmax(0,1fr))!important}
.court .net{font-size:clamp(.50rem,calc(.68rem * var(--vsw-ui-scale)),.68rem)!important}.pos{padding:clamp(.10rem,calc(.30rem * var(--vsw-ui-scale)),.30rem)!important;border-width:clamp(1px,calc(2px * var(--vsw-ui-scale)),2px)!important;border-radius:var(--vsw-radius)!important}
.pos b{font-size:clamp(.76rem,calc(1.08rem * var(--vsw-ui-scale)),1.08rem)!important}.pos span{font-size:clamp(.62rem,calc(.92rem * var(--vsw-ui-scale)),.92rem)!important}.pos small{font-size:clamp(.48rem,calc(.66rem * var(--vsw-ui-scale)),.66rem)!important}
.rotation-controls{gap:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important;margin-top:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important}.rotation-controls button{min-height:var(--vsw-touch-h)!important;font-size:clamp(.62rem,calc(.86rem * var(--vsw-ui-scale)),.86rem)!important;padding:.18rem!important;border-radius:var(--vsw-radius)!important}

/* Corrections / status */
.correction-dock{gap:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important;padding:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important;border-radius:var(--vsw-radius)!important}
.correction-label{font-size:clamp(.48rem,calc(.68rem * var(--vsw-ui-scale)),.68rem)!important}.correction-dock button{min-height:var(--vsw-touch-h)!important;font-size:clamp(.54rem,calc(.76rem * var(--vsw-ui-scale)),.76rem)!important;padding:.16rem .20rem!important;border-radius:var(--vsw-radius)!important}
.statusbar{font-size:clamp(.54rem,calc(.74rem * var(--vsw-ui-scale)),.74rem)!important;padding:0 clamp(4px,calc(9px * var(--vsw-ui-scale)),9px)!important}.status-right{gap:clamp(2px,calc(5px * var(--vsw-ui-scale)),5px)!important}.badge{font-size:clamp(.52rem,calc(.70rem * var(--vsw-ui-scale)),.70rem)!important;padding:.14rem clamp(.24rem,calc(.48rem * var(--vsw-ui-scale)),.48rem)!important;border-radius:999px!important}

/* Drawers/dialogs follow the same density as the live surface. */
.drawer{width:min(calc(760px * var(--vsw-ui-scale) + 120px),90vw)!important}.drawer>header{padding:clamp(6px,calc(10px * var(--vsw-ui-scale)),10px) clamp(8px,calc(14px * var(--vsw-ui-scale)),14px)!important}.drawer-nav{gap:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important;padding:clamp(5px,calc(8px * var(--vsw-ui-scale)),8px)!important}.drawer-nav button,.toolbar button,.dialog button{font-size:clamp(.64rem,calc(.88rem * var(--vsw-ui-scale)),.88rem)!important;min-height:var(--vsw-touch-h)!important}.drawer-body{padding:clamp(8px,calc(14px * var(--vsw-ui-scale)),14px)!important;font-size:clamp(.66rem,calc(.90rem * var(--vsw-ui-scale)),.90rem)!important}.card{padding:clamp(7px,calc(12px * var(--vsw-ui-scale)),12px)!important;border-radius:var(--vsw-radius)!important}.dialog{padding:clamp(10px,calc(18px * var(--vsw-ui-scale)),18px)!important;border-radius:var(--vsw-radius)!important}.form-grid,.dialog label{gap:clamp(4px,calc(8px * var(--vsw-ui-scale)),8px)!important}input,select,textarea{font-size:clamp(.66rem,calc(.90rem * var(--vsw-ui-scale)),.90rem);padding:clamp(.30rem,calc(.48rem * var(--vsw-ui-scale)),.48rem)!important;border-radius:clamp(6px,calc(8px * var(--vsw-ui-scale)),8px)!important}

/* Old low-viewport overrides from the prior viewport pass are neutralized: 13g's shared variables
   now own those dimensions so one control family cannot remain oversized. */
.viewport-low .technique-grid button{height:var(--vsw-tech-h)!important;min-height:0!important;max-height:var(--vsw-tech-h)!important}
.viewport-low .quality-stack button{height:var(--vsw-quality-h)!important;min-height:0!important;max-height:var(--vsw-quality-h)!important}
.viewport-low .inline-quality-toggle{min-height:clamp(36px,calc(50px * var(--vsw-ui-scale)),50px)!important;margin-bottom:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important}
.viewport-low .note-label textarea{height:clamp(46px,calc(72px * var(--vsw-ui-scale)),72px)!important;min-height:clamp(46px,calc(72px * var(--vsw-ui-scale)),72px)!important;max-height:clamp(46px,calc(72px * var(--vsw-ui-scale)),72px)!important}
.viewport-low .rotation-controls button{min-height:var(--vsw-touch-h)!important}
.viewport-low .subheading{margin:clamp(2px,calc(6px * var(--vsw-ui-scale)),6px) 0 clamp(2px,calc(5px * var(--vsw-ui-scale)),5px)!important}


/* === Rev. 14: compact detailed quality + scalable menu/header interaction === */
/* Logo + hamburger are the only menu click target. The title sits beside them as information. */
.brand-shell{
  grid-column:1;
  justify-self:start;
  display:flex;
  align-items:center;
  gap:clamp(5px,calc(9px * var(--vsw-ui-scale)),9px);
  min-width:0;
  max-width:100%;
}
.brand-shell .brand-menu{
  grid-column:auto!important;
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  gap:clamp(3px,calc(6px * var(--vsw-ui-scale)),6px)!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  height:clamp(38px,calc(50px * var(--vsw-ui-scale)),50px)!important;
  padding:clamp(3px,calc(5px * var(--vsw-ui-scale)),5px)!important;
  border-radius:var(--vsw-radius)!important;
  flex:0 0 auto;
}
.brand-shell .brand-menu img{
  width:clamp(30px,calc(40px * var(--vsw-ui-scale)),40px)!important;
  height:clamp(30px,calc(40px * var(--vsw-ui-scale)),40px)!important;
  min-width:clamp(30px,calc(40px * var(--vsw-ui-scale)),40px)!important;
}
.brand-shell .brand-hamburger{
  font-size:clamp(.82rem,calc(1.22rem * var(--vsw-ui-scale)),1.22rem)!important;
  margin:0!important;
  line-height:1;
}
.brand-shell>.brand-copy{
  display:flex!important;
  flex-direction:column;
  min-width:0;
  line-height:1.05;
  pointer-events:none;
  user-select:none;
}
.brand-shell>.brand-copy strong{
  font-size:clamp(.64rem,calc(.90rem * var(--vsw-ui-scale)),.90rem)!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.brand-shell>.brand-copy small{
  font-size:clamp(.46rem,calc(.62rem * var(--vsw-ui-scale)),.62rem)!important;
  margin-top:clamp(1px,calc(3px * var(--vsw-ui-scale)),3px);
  color:var(--muted);
  white-space:nowrap;
}

/* Six-value mode differs only in content: six values use two rows.
   Touch sizing remains shared with simple scouting. */
.quality-stack.detailed{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,var(--vsw-quality-h))!important;
  flex:0 0 auto;
}

/* Drawer follows the same viewport scale and scrolls internally at low heights. */
.drawer{
  height:var(--vsw-vh,100dvh)!important;
  max-height:var(--vsw-vh,100dvh)!important;
  display:flex!important;
  flex-direction:column;
  overflow:hidden!important;
}
.drawer>header{
  flex:0 0 auto;
  min-height:clamp(38px,calc(56px * var(--vsw-ui-scale)),56px);
}
.drawer>header h2{font-size:clamp(.82rem,calc(1.25rem * var(--vsw-ui-scale)),1.25rem);margin:0}
.iconclose{font-size:clamp(.78rem,calc(1.15rem * var(--vsw-ui-scale)),1.15rem)!important;padding:clamp(.20rem,calc(.40rem * var(--vsw-ui-scale)),.40rem) clamp(.34rem,calc(.62rem * var(--vsw-ui-scale)),.62rem)!important}
.drawer-nav{
  flex:0 1 auto;
  min-height:0;
  max-height:min(46dvh,calc(360px * var(--vsw-ui-scale) + 80px));
  overflow-y:auto!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  -webkit-overflow-scrolling:touch;
}
.drawer-nav button{
  min-height:clamp(34px,calc(46px * var(--vsw-ui-scale)),46px)!important;
  padding:clamp(.24rem,calc(.42rem * var(--vsw-ui-scale)),.42rem) clamp(.34rem,calc(.58rem * var(--vsw-ui-scale)),.58rem)!important;
}
.drawer-body{
  flex:1 1 auto;
  min-height:0!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  -webkit-overflow-scrolling:touch;
}
@media (max-height:560px){
  .drawer-nav{grid-template-columns:repeat(3,minmax(0,1fr))!important;max-height:42dvh}
}

/* Rev. 14: Drawer-Navigation und Inhalt dürfen sich nicht überlagern. */
.drawer{
  display:grid!important;
  grid-template-rows:auto auto minmax(0,1fr)!important;
  overflow:hidden!important;
}
.drawer-nav{
  position:relative!important;
  z-index:2!important;
  max-height:none!important;
  overflow:visible!important;
  flex:none!important;
}
.drawer-body{
  position:relative!important;
  z-index:1!important;
  min-height:0!important;
  overflow:auto!important;
  padding-top:clamp(10px,calc(16px * var(--vsw-ui-scale)),16px)!important;
}
@media (max-height:560px){
  .drawer-nav{max-height:none!important;overflow:visible!important}
}

/* Anbieterabhängige Sync-Felder bleiben Teil des zweispaltigen Formularrasters. */
.sync-field{display:contents}
.sync-field[hidden],[data-sync-provider][hidden]{display:none!important}
.sync-card .form-grid{align-items:center}
.save-hint{margin:0 0 4px;color:var(--muted);font-size:.78rem}

/* Rev. 14.1: Startaufstellung Wir/Gegner responsiv und vollständig im Viewport. */
.dialog:has(.lineup-grid){
  width:min(860px,calc(100vw - 32px))!important;
  max-width:calc(100vw - 32px)!important;
  box-sizing:border-box!important;
  overflow-x:hidden!important;
}
.dialog:has(.lineup-grid) #dialogBody,
.dialog:has(.lineup-grid) .lineup-grid{
  min-width:0!important;
  max-width:100%!important;
}
.lineup-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  width:100%!important;
  box-sizing:border-box!important;
}
.lineup-grid label,
.lineup-grid select{
  min-width:0!important;
  max-width:100%!important;
  width:100%!important;
  box-sizing:border-box!important;
}
@media (max-width:720px){
  .lineup-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width:460px){
  .lineup-grid{grid-template-columns:minmax(0,1fr)!important}
}

/* Rev14.2 Fix2: centered court identity, no jersey placeholder. */
.pos .pos-position{font-size:clamp(1.15rem,calc(1.55rem * var(--vsw-ui-scale,1)),1.7rem)!important;font-weight:900!important;letter-spacing:.01em;white-space:nowrap;line-height:1}
.pos .pos-playerline{display:flex;align-items:baseline;justify-content:center;gap:.28em;width:100%;min-height:1.15em;line-height:1.05;text-align:center}
.pos .pos-jersey{font-size:clamp(1rem,calc(1.28rem * var(--vsw-ui-scale,1)),1.42rem)!important;font-weight:900!important;white-space:nowrap}
.pos .pos-sep{font-size:clamp(.72rem,calc(.9rem * var(--vsw-ui-scale,1)),.96rem);font-weight:700}
.pos .pos-abbr{font-size:clamp(.78rem,calc(.98rem * var(--vsw-ui-scale,1)),1.05rem)!important;font-weight:800!important;line-height:1.1}
.pos .pos-name{font-size:clamp(.62rem,calc(.78rem * var(--vsw-ui-scale,1)),.84rem)!important;font-weight:600;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.1;text-align:center}


/* Rev14.2b: Satzstand + Spielerwechsel/Libero. */
.header-set{display:inline-flex!important;align-items:center;justify-content:center;font-weight:800;white-space:nowrap}
.player-change-controls{display:grid;grid-template-columns:1fr 1fr;gap:clamp(4px,calc(6px * var(--vsw-ui-scale)),6px);margin-top:clamp(3px,calc(5px * var(--vsw-ui-scale)),5px)}
.player-change-controls button{min-height:clamp(34px,calc(44px * var(--vsw-ui-scale)),44px);font-size:clamp(.60rem,calc(.78rem * var(--vsw-ui-scale)),.78rem);font-weight:800}
@media(max-width:900px){.player-change-controls{grid-template-columns:1fr 1fr}}


/* Rev14.2c: sichtbarer Aufschlagindikator auf Position I bei eigenem Aufschlag. */
.pos{position:relative}
.service-ball{position:absolute;bottom:clamp(8px,calc(12px * var(--vsw-ui-scale,1)),16px);right:clamp(8px,calc(12px * var(--vsw-ui-scale,1)),16px);width:clamp(26px,calc(38px * var(--vsw-ui-scale,1)),44px);height:clamp(26px,calc(38px * var(--vsw-ui-scale,1)),44px);object-fit:contain;pointer-events:none;filter:drop-shadow(0 1px 1px rgba(0,0,0,.28));z-index:2}

/* Rev14.2 Fix: About-Bereich */
.about-card h3{margin-top:0}.about-card .about-version{font-size:1.08rem;font-weight:700;margin:.25rem 0 .65rem}.about-card .about-meta{display:grid;gap:.35rem}.about-card a{color:inherit;text-decoration:underline}.about-card .about-license{margin-top:.8rem;padding-top:.7rem;border-top:1px solid var(--border,#34445a)}



/* 0.2.4: kompakte, vollständig klickbare Wechsel-/Libero-Auswahllisten. */
.player-change-summary{padding:.65rem .75rem;border:1px solid #334155;border-radius:10px;background:#111c2e;margin-bottom:.55rem}
.player-pick-heading{font-size:.78rem;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;margin:.35rem 0 .4rem}
.player-pick-list{display:grid;gap:7px}
.player-pick-row{display:grid!important;grid-template-columns:24px minmax(0,1fr) auto!important;gap:11px!important;align-items:center!important;width:100%;min-height:56px;padding:9px 12px;border:1px solid #334155;border-radius:10px;background:#111827;cursor:pointer;box-sizing:border-box;user-select:none}
.player-pick-row:hover{border-color:#64748b;background:#172033}
.player-pick-row:has(input:checked){outline:2px solid #60a5fa;border-color:#60a5fa;background:#172554}
.player-pick-row input{width:20px!important;height:20px!important;margin:0;accent-color:#38bdf8}
.player-pick-main{min-width:0;display:flex;align-items:baseline;gap:.38rem;overflow:hidden}
.player-pick-id{flex:0 0 auto;white-space:nowrap}
.player-pick-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.player-pick-role{justify-self:end;font-size:.76rem;font-weight:800;color:var(--muted);white-space:nowrap;padding:.2rem .42rem;border:1px solid #334155;border-radius:999px}
.player-pick-row.is-libero .player-pick-role{color:#93c5fd;border-color:#3b82f6}
.player-pick-divider{display:flex;align-items:center;gap:10px;margin:10px 0 6px;color:var(--muted);font-size:.76rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.player-pick-divider::before,.player-pick-divider::after{content:"";height:1px;flex:1;background:#475569}
@media(max-width:620px){.player-pick-row{grid-template-columns:24px minmax(0,1fr)!important}.player-pick-role{grid-column:2;justify-self:start}.player-pick-main{display:grid;gap:1px}}


/* 0.2.4 Rev2: Einstellungen, konfigurierbare Tastaturkürzel, Einführung und Hilfe. */
.settings-links{display:grid;gap:8px}.settings-links h3{margin-bottom:.25rem}.settings-links button{text-align:left;min-height:44px}
.drawer-subhead{display:flex;align-items:center;gap:12px;position:sticky;top:0;z-index:4;background:var(--panel,#0f172a);padding:4px 0 10px}.drawer-subhead h3{margin:0}.drawer-subhead button{min-height:36px}
.shortcut-list{display:grid;gap:6px}.shortcut-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,150px);gap:10px;align-items:center;padding:6px 0;border-bottom:1px solid #26364a}.shortcut-input{text-align:center;font-weight:900;cursor:pointer}.shortcut-input.invalid{border-color:#ef4444!important;outline:2px solid rgba(239,68,68,.35)}.form-error{color:#fecaca;background:#450a0a;border:1px solid #ef4444;border-radius:8px;padding:8px;margin-top:8px}
.help-doc{display:block;scroll-behavior:smooth;padding-bottom:40px}.help-toc nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:10px}.help-toc a,.help-back{color:#93c5fd;text-decoration:none}.help-toc a{display:block;padding:9px 10px;border:1px solid #334155;border-radius:8px;background:#111827}.help-section{padding:10px 4px 16px;border-bottom:1px solid #334155;scroll-margin-top:58px}.help-section h3{margin-bottom:.45rem}.help-section p{line-height:1.5}.help-back{display:inline-block;margin-top:8px;font-weight:700}.help-doc #help-toc{scroll-margin-top:58px}
.tour-overlay{position:fixed;inset:0;z-index:5000;background:rgba(2,6,23,.58);pointer-events:none}.tour-card{position:absolute;right:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));width:min(440px,calc(100vw - 36px));background:#0f172a;border:1px solid #60a5fa;border-radius:14px;box-shadow:0 18px 50px rgba(0,0,0,.45);padding:16px;pointer-events:auto}.tour-head{display:flex;align-items:center;justify-content:space-between;color:#94a3b8;font-size:.8rem}.tour-head button{min-width:36px;min-height:36px}.tour-card h2{margin:.2rem 0 .45rem}.tour-card p{line-height:1.45;margin:.25rem 0 1rem}.tour-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.tour-nav{display:flex;gap:8px}.tour-highlight{position:relative!important;z-index:5001!important;outline:4px solid #38bdf8!important;outline-offset:4px!important;border-radius:8px!important;box-shadow:0 0 0 7px rgba(56,189,248,.18)!important}
@media(max-width:620px){.help-toc nav{grid-template-columns:1fr}.shortcut-row{grid-template-columns:minmax(0,1fr) 110px}.tour-card{left:12px;right:12px;bottom:12px;width:auto}}


/* 0.2.4 Rev3: kontextnahe, dynamisch skalierende Einführung. */
.tour-overlay{position:fixed;inset:0;z-index:2147483000;background:transparent;pointer-events:none;overflow:hidden}
.tour-spotlight{position:fixed;z-index:1;border:3px solid #38bdf8;border-radius:10px;box-shadow:0 0 0 9999px rgba(2,6,23,.58),0 0 0 7px rgba(56,189,248,.18);pointer-events:none;transition:left .16s ease,top .16s ease,width .16s ease,height .16s ease}
.tour-card{position:fixed;z-index:3;right:auto;bottom:auto;width:min(440px,calc(100vw - 24px));max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);overflow:auto;background:#0f172a;border:1px solid #60a5fa;border-radius:clamp(10px,1.2vw,14px);box-shadow:0 18px 50px rgba(0,0,0,.5);padding:clamp(11px,1.5vw,16px);pointer-events:auto;font-size:clamp(.86rem,1.35vw,1rem)}
.tour-card h2{font-size:clamp(1.05rem,1.8vw,1.35rem)}
.tour-card p{font-size:clamp(.84rem,1.3vw,.98rem);line-height:1.42;margin:.25rem 0 .8rem}
.tour-head{font-size:clamp(.7rem,1.05vw,.8rem)}
.tour-head button{min-width:clamp(30px,4vw,36px);min-height:clamp(30px,4vw,36px);padding:4px 8px}
.tour-actions{gap:clamp(6px,1vw,10px)}
.tour-nav{gap:clamp(6px,1vw,8px)}
.tour-nav button{min-height:clamp(34px,4.8vw,42px);padding:.45rem .8rem}
.tour-dismiss{border:0;background:transparent;color:#94a3b8;text-decoration:underline;text-underline-offset:2px;font-size:clamp(.68rem,1vw,.78rem);line-height:1.1;min-height:28px;padding:3px 5px;box-shadow:none}
.tour-dismiss:hover,.tour-dismiss:focus-visible{color:#e2e8f0;background:rgba(148,163,184,.12);border-radius:6px}
.tour-highlight{position:relative!important;z-index:auto!important;outline:none!important;box-shadow:none!important}
@media(max-width:620px){.tour-card{width:min(390px,calc(100vw - 20px));max-height:calc(100dvh - 16px);padding:11px}.tour-actions{align-items:flex-end}.tour-dismiss{font-size:.7rem}.tour-nav button{padding:.4rem .65rem}}


/* Rev5: Analyse */
.analysis-top{display:flex;gap:16px;align-items:end;flex-wrap:wrap;margin:10px 0 14px}.analysis-top label{display:grid;gap:6px}.analysis-compare-toggle{display:flex!important;align-items:center;gap:8px}.analysis-filter{border:1px solid #334155;border-radius:12px;padding:12px;margin-top:10px}.analysis-filter h4{margin:0 0 10px}.analysis-filter-grid{display:grid;grid-template-columns:repeat(5,minmax(135px,1fr));gap:10px}.analysis-filter-grid label{display:grid;gap:5px;font-size:.9rem}.analysis-kpis{display:grid;grid-template-columns:repeat(5,minmax(105px,1fr));gap:10px;margin:10px 0 16px}.analysis-kpis>div{background:#081225;border:1px solid #334155;border-radius:10px;padding:12px;text-align:center}.analysis-kpis strong{display:block;font-size:1.35rem}.analysis-kpis span{display:block;font-size:.78rem;color:#94a3b8;margin-top:3px}.data-table.compact th,.data-table.compact td{padding:7px 9px}.analysis-compare-result{margin-top:12px}@media(max-width:1100px){.analysis-filter-grid{grid-template-columns:repeat(3,minmax(130px,1fr))}.analysis-kpis{grid-template-columns:repeat(3,minmax(100px,1fr))}}@media(max-width:700px){.analysis-filter-grid{grid-template-columns:1fr 1fr}.analysis-kpis{grid-template-columns:1fr 1fr}}

/* 0.2.4 Rev6 – responsive Analyse: Filter und Tabellen */
.analysis-filter-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(clamp(140px,16vw,180px),1fr));
  column-gap:clamp(12px,1.25vw,20px);
  row-gap:clamp(10px,1.0vw,16px);
  align-items:end;
}
.analysis-filter-grid label{
  min-width:0;
  width:100%;
  font-size:clamp(.78rem,calc(.72rem + .18vw),.92rem);
}
.analysis-filter-grid input,
.analysis-filter-grid select{
  display:block;
  width:100%;
  min-width:0;
  max-width:100%;
  min-height:clamp(38px,calc(34px + .45vw),44px);
  padding:clamp(.38rem,.3rem + .12vw,.52rem);
  font-size:clamp(.78rem,calc(.72rem + .18vw),.94rem);
}
.analysis-filter-grid select{
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
/* Beim Auswählen darf die Spielerliste/Selectfläche über Nachbarfelder liegen.
   Nach focus/blur nimmt sie wieder exakt die normale Grid-Breite ein. */
.analysis-player-filter{position:relative;z-index:2}
.analysis-player-filter:focus-within{z-index:120}
.analysis-player-filter select:focus{
  position:relative;
  z-index:121;
  width:min(430px,calc(100vw - 72px));
  max-width:none;
  box-shadow:0 12px 32px rgba(0,0,0,.48);
}
.analysis-technique-filter{margin-left:clamp(2px,.25vw,6px)}

/* .compact ist historisch auch eine Flex-Hilfsklasse. Analysetabellen müssen
   ausdrücklich Tabellen bleiben, sonst werden Kopf und tbody auseinandergezogen. */
#analysisResult{min-width:0}
#analysisResult .card{min-width:0;overflow-x:auto}
#analysisResult .data-table.compact{
  display:table!important;
  width:100%!important;
  min-width:max-content;
  border-collapse:collapse;
  table-layout:auto;
  color:inherit;
}
#analysisResult .data-table.compact thead{display:table-header-group}
#analysisResult .data-table.compact tbody{display:table-row-group}
#analysisResult .data-table.compact tr{display:table-row}
#analysisResult .data-table.compact th,
#analysisResult .data-table.compact td{
  display:table-cell;
  padding:clamp(6px,calc(5px + .18vw),9px) clamp(7px,calc(6px + .2vw),11px);
  font-size:clamp(.76rem,calc(.70rem + .18vw),.92rem);
  white-space:nowrap;
  vertical-align:middle;
}
#analysisResult .data-table.compact th:first-child,
#analysisResult .data-table.compact td:first-child{text-align:left}
#analysisResult .data-table.compact th:not(:first-child),
#analysisResult .data-table.compact td:not(:first-child){text-align:right}

@media(max-width:900px){
  .analysis-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
}
@media(max-width:650px){
  .analysis-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .analysis-player-filter select:focus{width:min(360px,calc(100vw - 48px))}
}
@media(max-width:430px){
  .analysis-filter-grid{grid-template-columns:1fr}
  .analysis-player-filter select:focus{width:100%;max-width:100%}
}


/* 0.2.4 Rev7 – kompakte Analyse und Spielerinnen-Gesamtübersicht */
.analysis-card{padding:clamp(9px,1vw,13px)!important}
.analysis-heading{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:4px}
.analysis-heading h3{margin:0}.analysis-heading p{margin:0}
.analysis-top{margin:5px 0 7px;gap:clamp(8px,1vw,12px);align-items:center}
.analysis-top label{gap:3px;font-size:clamp(.76rem,.72rem + .15vw,.9rem)}
.analysis-top select{min-height:clamp(34px,3.5vw,39px);padding:.3rem .45rem;font-size:clamp(.76rem,.72rem + .16vw,.9rem)}
.analysis-filter{padding:clamp(7px,.75vw,10px);margin-top:6px;border-radius:10px}
.analysis-filter h4{margin:0 0 5px;font-size:clamp(.82rem,.78rem + .18vw,.96rem)}
.analysis-filter-grid{grid-template-columns:repeat(auto-fit,minmax(clamp(116px,12.5vw,156px),1fr));column-gap:clamp(7px,.7vw,11px);row-gap:clamp(6px,.65vw,10px)}
.analysis-filter-grid label{gap:3px;font-size:clamp(.72rem,.68rem + .16vw,.84rem)}
.analysis-filter-grid input,.analysis-filter-grid select{min-height:clamp(33px,3.25vw,39px);padding:clamp(.28rem,.25rem + .08vw,.4rem);font-size:clamp(.73rem,.69rem + .16vw,.86rem)}
.analysis-card>.toolbar.mt{margin-top:7px!important}.analysis-card>.toolbar.mt button{min-height:36px;padding:.4rem .72rem}
.analysis-kpis{gap:7px;margin:7px 0 10px}.analysis-kpis>div{padding:8px}.analysis-kpis strong{font-size:1.15rem}
.analysis-table-wrap{width:100%;overflow-x:auto}
.players-overview{min-width:880px!important}
.players-overview th,.players-overview td{font-variant-numeric:tabular-nums}
@media(max-width:900px){.analysis-filter-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:680px){.analysis-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:430px){.analysis-filter-grid{grid-template-columns:1fr}.analysis-heading{display:block}}


/* Rev9 – Browser-/Web-Bluetooth-Hinweis */
.browser-camera-notice{
  margin:12px auto 2px;
  width:min(100%,620px);
  padding:clamp(9px,1.1vw,13px) clamp(11px,1.4vw,16px);
  border:1px solid #f59e0b;
  border-radius:12px;
  background:rgba(120,53,15,.38);
  color:#fde68a;
  font-size:clamp(.76rem,.72rem + .22vw,.93rem);
  line-height:1.4;
  font-weight:700;
  text-align:left;
}
.browser-camera-notice[hidden]{display:none!important}
.camera-support-note{display:grid;gap:4px;margin:0 0 10px;padding:10px 12px;border-radius:11px;border:1px solid #334155;background:#0b1220;font-size:.78rem;line-height:1.35}
.camera-support-note span{color:var(--muted)}
.camera-support-note.warning{border-color:#f59e0b;background:rgba(120,53,15,.28)}
.camera-support-note.warning strong,.camera-support-note.warning span{color:#fde68a}
.camera-support-note.ok{border-color:#166534;background:rgba(20,83,45,.26)}
.camera-support-note.ok strong{color:#86efac}
@media(max-width:820px){.browser-camera-notice{font-size:clamp(.72rem,2.1vw,.86rem);padding:8px 10px}}


/* 0.3.0 Preview 7 */
.preview-pill{display:inline-block;font-size:.72em;font-weight:700;padding:.15em .45em;border-radius:999px;border:1px solid currentColor;vertical-align:middle;opacity:.85}
.quick-scout-card{border-style:dashed}
.quick-scout-card .analysis-heading{margin-bottom:.5rem}
.pos{touch-action:manipulation}

/* 0.3.0 Preview 7 – compact Controls & Help / Bedienung & Hilfe */
.settings-links{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:clamp(6px,0.7vw,10px);
  padding-block:clamp(10px,1.1vw,14px);
}
.settings-links h3,.settings-links p{grid-column:1/-1;margin-block:0}
.settings-links h3{margin-bottom:2px}
.settings-links button{width:100%;min-height:clamp(38px,4.2vh,44px);padding:clamp(7px,0.8vw,10px) clamp(10px,1vw,14px);text-align:left}
.settings-links p.small{margin-top:2px;line-height:1.3}
@media (max-width:720px){.settings-links{grid-template-columns:1fr}}


/* 0.3.0 Preview 7 – compact administration UI – analysis, master data, settings and dialogs. */
.drawer-body{padding:10px}
.drawer-body>.card{margin:6px 0;padding:9px 10px}
.drawer-body .toolbar{margin-bottom:7px;gap:5px}
.drawer-body .toolbar button:not(.huge){min-height:36px;padding:.38rem .62rem}
.drawer-body .form-grid{gap:6px;grid-template-columns:145px minmax(0,1fr)}
.drawer-body .form-grid input,.drawer-body .form-grid select{min-height:34px;padding:.32rem .45rem}
.drawer-body .data-table th,.drawer-body .data-table td{padding:5px 6px}
.drawer-body .data-table button{min-height:32px;padding:.25rem .42rem}
.dialog{padding:13px;border-radius:13px}
.dialog #dialogBody{gap:6px}.dialog-actions{margin-top:10px;gap:6px}
.dialog label{gap:6px}.dialog input,.dialog select{min-height:35px;padding:.34rem .46rem}

.settings-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding-block:9px}
.settings-links h3,.settings-links p{grid-column:1/-1;margin-block:0}.settings-links h3{margin-bottom:1px}
.settings-links button{width:100%;min-height:36px;padding:.38rem .58rem;text-align:left}
.settings-links p.small{margin-top:1px;line-height:1.25}

.analysis-card{padding:8px 9px!important}
.analysis-heading{margin-bottom:2px;gap:8px}.analysis-heading h3,.analysis-heading p{margin:0}
.analysis-top{margin:3px 0 5px;gap:8px;align-items:center}
.analysis-top label{gap:2px}.analysis-top select{min-height:32px;padding:.25rem .4rem}
.analysis-compare-toggle input{width:auto}
.analysis-filter{padding:5px;margin-top:5px;border-radius:9px}
.analysis-filter-shell{display:grid;grid-template-columns:142px minmax(0,1fr);gap:8px;align-items:stretch}
.analysis-filter-title{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:1px solid #334155;border-radius:8px;padding:6px 8px;text-align:center;line-height:1.15;min-width:0}
.analysis-filter-title span{font-size:1.05rem}.analysis-filter-title strong{font-size:.82rem}
.analysis-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:8px;row-gap:5px;align-items:end}
.analysis-filter-grid label{gap:2px;font-size:.75rem;min-width:0}
.analysis-filter-grid input,.analysis-filter-grid select{min-height:31px;height:31px;padding:.22rem .38rem;font-size:.79rem;min-width:0;width:100%}
.analysis-technique-filter{margin-left:0}
.analysis-card>.toolbar.mt{margin-top:5px!important;margin-bottom:0}.analysis-card>.toolbar.mt button{min-height:33px;padding:.3rem .6rem}
.analysis-kpis{gap:5px;margin:5px 0 8px}.analysis-kpis>div{padding:6px}.analysis-kpis strong{font-size:1.08rem}
@media(max-width:900px){.analysis-filter-shell{grid-template-columns:112px minmax(0,1fr)}.analysis-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){.analysis-filter-shell{grid-template-columns:1fr}.analysis-filter-title{flex-direction:row;justify-content:flex-start;text-align:left}.analysis-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:430px){.analysis-filter-grid{grid-template-columns:1fr}.settings-links{grid-template-columns:1fr}.settings-links h3,.settings-links p{grid-column:1}}


/* Camera controls on main scouting screen */
.main-camera-panel{flex:0 0 auto;border:1px solid #334155;border-radius:10px;background:#0b1220;padding:6px 7px;margin-bottom:6px;display:grid;gap:5px}
.main-camera-panel[hidden]{display:none!important}
.main-camera-head{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;align-items:center;gap:6px;font-size:.68rem;min-width:0}
.main-camera-head strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.72rem}
#mainCameraLink{color:var(--muted);white-space:nowrap}
.camera-quality{white-space:nowrap;font-weight:800}
.camera-battery{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.battery-shell{position:relative;width:24px;height:11px;border:1px solid #94a3b8;border-radius:2px;padding:1px;display:inline-block}
.battery-shell:after{content:"";position:absolute;right:-4px;top:3px;width:2px;height:5px;background:#94a3b8;border-radius:0 1px 1px 0}
.battery-fill{display:block;height:100%;width:0%;background:currentColor;border-radius:1px}
.camera-battery small{font-size:.62rem;color:var(--muted)}
.main-camera-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:5px;align-items:center}
.main-camera-controls button{min-height:34px!important;padding:.28rem .4rem!important;font-size:.7rem!important}
.main-camera-time{display:flex;flex-direction:column;align-items:flex-end;min-width:72px;line-height:1.05}
.main-camera-time strong{font-size:.82rem}
.main-camera-time small{font-size:.56rem;color:var(--muted);white-space:nowrap}
@media(max-width:1050px){.main-camera-head{grid-template-columns:minmax(0,1fr) auto auto}.main-camera-controls{grid-template-columns:1fr 1fr}.main-camera-time{grid-column:1/-1;flex-direction:row;justify-content:space-between;align-items:center}}

/* Compact camera menu – one-line status on tablet/desktop */
.camera-compact-card{padding:8px 10px}.camera-compact-row{display:grid;grid-template-columns:minmax(250px,2.2fr) minmax(92px,.8fr) minmax(86px,.65fr) minmax(78px,.6fr) minmax(100px,.8fr) minmax(150px,1fr);gap:6px;align-items:end}.camera-adapter-inline{display:grid;gap:3px;min-width:0}.camera-adapter-inline>span,.camera-inline-stat>span{font-size:.68rem;color:var(--muted);line-height:1}.camera-adapter-inline select{width:100%;min-width:0;height:36px;padding:.32rem .45rem}.camera-inline-stat{min-width:0;height:36px;padding:4px 7px;background:#020617;border-radius:8px;text-align:center;display:flex;flex-direction:column;justify-content:center}.camera-inline-stat strong{font-size:.78rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.camera-connect-inline{min-height:36px;height:36px;padding:.3rem .55rem;white-space:nowrap}.camera-quick-guide{margin:6px 0 0;color:var(--muted);font-size:.72rem;line-height:1.25}.camera-record-actions{margin-top:6px;grid-template-columns:1fr 1fr}.camera-record-actions button:first-child{grid-column:auto}.camera-local-time{margin-top:6px;margin-bottom:0}.camera-local-time button{min-height:36px;padding:.35rem .55rem}@media(max-width:900px){.camera-compact-row{grid-template-columns:1fr 1fr 1fr}.camera-adapter-inline{grid-column:1/-1}.camera-connect-inline{grid-column:1/-1}.camera-inline-stat{height:34px}}


/* 0.3.0 Preview 7 compact camera row: fits the 760 px drawer without horizontal overflow */
.camera-compact-card{padding:7px 9px}
.camera-compact-row{display:grid;grid-template-columns:minmax(190px,1.8fr) minmax(102px,.85fr) minmax(72px,.62fr) minmax(58px,.5fr) minmax(82px,.68fr) minmax(104px,.85fr);gap:5px;align-items:end;min-width:0}
.camera-adapter-inline{display:grid;gap:2px;min-width:0}.camera-adapter-inline>span,.camera-inline-stat>span{font-size:.62rem;color:var(--muted);line-height:1}
.camera-adapter-inline select{width:100%;min-width:0;height:32px;padding:.22rem .38rem;font-size:.76rem}
.camera-inline-stat{min-width:0;height:32px;padding:3px 5px;background:#020617;border-radius:7px;text-align:center;display:flex;flex-direction:column;justify-content:center}
.camera-inline-stat strong{font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.camera-inline-stat.status strong{font-size:.69rem}
.camera-connect-inline{min-width:104px;min-height:32px;height:32px;padding:.22rem .42rem;font-size:.72rem;white-space:nowrap}
.camera-quick-guide{margin:5px 0 0;color:var(--muted);font-size:.69rem;line-height:1.2}
.camera-record-actions{margin-top:5px;grid-template-columns:1fr 1fr}.camera-record-actions button:first-child{grid-column:auto}.camera-record-actions button{min-height:34px!important;padding:.28rem .45rem!important}
.camera-local-time{margin-top:5px;margin-bottom:0;gap:5px}.camera-local-time button{min-height:32px;padding:.25rem .45rem;font-size:.72rem}
@media(max-width:720px){.camera-compact-row{grid-template-columns:1fr 1fr 1fr}.camera-adapter-inline{grid-column:1/-1}.camera-connect-inline{grid-column:1/-1;width:100%}.camera-inline-stat{height:32px}}


/* Preview 8: WER → WAS → WIE → WO */
.input-step-indicator{display:grid;grid-template-columns:1fr auto 1fr auto 1fr auto 1fr auto 1fr;align-items:center;gap:4px;margin:-2px 0 8px;font-size:.72rem;font-weight:900;text-align:center}
.input-step-indicator span{padding:5px 3px;border:1px solid #475569;border-radius:7px;color:#94a3b8;background:#0b1220}
.input-step-indicator span.done{color:#cbd5e1;border-color:#64748b}.input-step-indicator span.current{color:#fff;border-width:2px;border-color:#38bdf8;background:#123047}
.pos.selectedpos{outline:5px solid #38bdf8;outline-offset:1px}
.opponent .pos.selectedpos{outline-color:#fb923c}
.pos.actionzone{box-shadow:inset 0 0 0 5px #facc15}
.pos.selectedpos.actionzone{box-shadow:inset 0 0 0 5px #facc15}


/* 0.3.0 Preview 9 – detailed 9-zone courts, target court and setter details */
.court-wrap.dual-court{display:grid;grid-template-rows:minmax(0,1fr) minmax(0,.72fr);gap:6px}
.court-wrap.dual-court .court{min-height:0}
.court-wrap.dual-court .target-court{display:grid}
.court.nine-zone{grid-template-rows:clamp(18px,calc(24px * var(--vsw-ui-scale,1)),24px) repeat(3,minmax(0,1fr))!important}
.pos.zone-only{background:#e2e8f0;color:#334155;border-style:dashed}
.pos.zone-only .pos-abbr{font-size:.62rem;font-weight:700;color:#64748b}
.pos.targetzone{box-shadow:inset 0 0 0 5px #22c55e!important}
.target-court .pos{min-height:0;padding:.18rem}.target-court .pos-playerline{display:none}.target-court .pos-position{font-size:.90rem}.target-court .pos-name{display:none}
.set-detail-panel{margin-top:8px;padding:8px;border:1px solid #475569;border-radius:10px;background:#111827;max-height:34vh;overflow:auto}
.set-detail-title{font-weight:900;margin-bottom:6px}.set-detail-group>span{display:block;color:#cbd5e1;font-size:.72rem;font-weight:800;margin:5px 0 4px}
.set-detail-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.set-detail-buttons.compact{grid-template-columns:repeat(2,minmax(0,1fr))}
.set-detail-buttons button{min-height:38px;padding:.3rem;font-size:.72rem}.set-detail-buttons button.selected{outline:3px solid #38bdf8;background:#0c4a6e}
@media (max-width:1250px) and (orientation:landscape){.set-detail-panel{max-height:30vh;padding:5px}.set-detail-buttons button{min-height:32px;font-size:.64rem}.court-wrap.dual-court{gap:4px}.court-wrap.dual-court .pos{padding:.12rem}.court-wrap.dual-court .pos-playerline{font-size:.66rem}.court-wrap.dual-court .pos-name{display:none}}

/* Preview 9 court-orientation correction: opponent above net, own below */
.court-wrap.dual-court{grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:0}
.court-wrap.dual-court .court{border-radius:0}
.court-wrap.dual-court .court.opponent{border-bottom-width:1px}
.court-wrap.dual-court .court.own{border-top-width:1px}
.court.nine-zone.opponent{grid-template-rows:repeat(3,minmax(0,1fr)) clamp(18px,calc(24px * var(--vsw-ui-scale,1)),24px)!important}
.court.nine-zone.own{grid-template-rows:clamp(18px,calc(24px * var(--vsw-ui-scale,1)),24px) repeat(3,minmax(0,1fr))!important}
.court.inactive-court .pos{opacity:.78}
.court.inactive-court .pos:disabled{cursor:default}
/* P7-P9 are clickable overlays only after WER; their visual area is shared by adjacent base positions. */
.pos.zone-only{position:relative;isolation:isolate;background:linear-gradient(to bottom,rgba(248,250,252,.92) 0 50%,rgba(226,232,240,.92) 50% 100%);border-style:dashed}
.pos.zone-only>*{position:relative;z-index:2}
.pos.zone-only::before,.pos.zone-only::after{content:"";position:absolute;left:0;right:0;height:50%;z-index:1;pointer-events:none;opacity:0;transition:opacity .12s ease}
.pos.zone-only::before{top:0}.pos.zone-only::after{bottom:0}
.pos.zone-only.base-half-near-net::before,.pos.zone-only.base-half-near-back::after{opacity:1;background:rgba(56,189,248,.24)}
.opponent .pos.zone-only.base-half-near-net::before,.opponent .pos.zone-only.base-half-near-back::after{background:rgba(251,146,60,.24)}
.pos.zone-only:disabled{filter:saturate(.72)}

/* Preview 9 hotfix: one shared net, clean middle zones, reliable WO/ZIEL hit areas */
.court-wrap.dual-court{grid-template-rows:minmax(0,1fr) auto minmax(0,1fr)!important}
.shared-net{height:clamp(14px,calc(20px * var(--vsw-ui-scale,1)),20px);display:flex;align-items:center;justify-content:center;background:#e2e8f0;color:#111827;font-size:clamp(.50rem,calc(.68rem * var(--vsw-ui-scale,1)),.68rem);font-weight:900;border-left:2px solid #94a3b8;border-right:2px solid #94a3b8}
.shared-net[hidden]{display:none!important}
.court-wrap.dual-court .court.nine-zone{grid-template-rows:repeat(3,minmax(0,1fr))!important}
.court-wrap.dual-court .court>.net{display:none!important}
.pos.zone-only{background:rgba(248,250,252,.92)!important}
.court.opponent .pos.zone-only{background:rgba(226,232,240,.92)!important}
.pos.zone-only::before,.pos.zone-only::after{opacity:0;background:transparent}
.pos.zone-only.base-half-near-net::before,.pos.zone-only.base-half-near-back::after{opacity:1;background:rgba(56,189,248,.24)}
.opponent .pos.zone-only.base-half-near-net::before,.opponent .pos.zone-only.base-half-near-back::after{background:rgba(251,146,60,.24)}
.pos.zone-only:not(:disabled){cursor:pointer}

/* 0.3.1 Preview 1 – five-step workflow and compact quality legend */
.quality-meaning{font-size:.64rem;line-height:1.25;color:#94a3b8;margin:5px 1px 2px;min-height:1.6em}
@media (max-width:1250px) and (orientation:landscape){.input-step-indicator{font-size:.62rem;gap:2px}.input-step-indicator span{padding:4px 2px}.quality-meaning{font-size:.58rem}}


/* 0.3.1 Preview 1 UI touch hotfix – larger scouting targets and readable quality legend */
.control-panel{
  --vsw-tech-h:clamp(52px,calc(66px * var(--vsw-ui-scale)),68px);
  --vsw-quality-h:clamp(48px,calc(58px * var(--vsw-ui-scale)),62px);
}
.technique-grid button{
  font-size:clamp(.78rem,calc(1rem * var(--vsw-ui-scale)),1.02rem)!important;
  padding:.34rem .42rem!important;
}
.quality-stack button{
  font-size:clamp(1rem,calc(1.28rem * var(--vsw-ui-scale)),1.32rem)!important;
  padding:.26rem!important;
}
.quality-meaning{
  display:grid;
  gap:clamp(3px,calc(5px * var(--vsw-ui-scale)),6px);
  margin:clamp(8px,calc(11px * var(--vsw-ui-scale)),12px) clamp(8px,calc(14px * var(--vsw-ui-scale)),16px) 4px!important;
  padding:0 clamp(4px,calc(6px * var(--vsw-ui-scale)),8px);
  min-height:0;
  font-size:clamp(.70rem,calc(.82rem * var(--vsw-ui-scale)),.86rem)!important;
  line-height:1.25;
  color:#a9b6c9;
}
.quality-meaning-row{
  display:grid;
  grid-template-columns:2.2rem minmax(0,1fr);
  align-items:baseline;
  column-gap:clamp(10px,calc(14px * var(--vsw-ui-scale)),16px);
}
.quality-meaning-key{
  justify-self:center;
  color:#f8fafc;
  font-weight:900;
  font-size:1.08em;
}
.quality-meaning-text{
  color:#a9b6c9;
}
@media (max-width:1250px) and (orientation:landscape){
  .quality-meaning{font-size:clamp(.66rem,calc(.78rem * var(--vsw-ui-scale)),.80rem)!important;margin-inline:8px!important}
}


/* 0.3.1 Preview 1 correction p1d – ONE shared responsive Scout UI.
   Simple vs detailed changes content only, never touch-target sizing or legend layout. */
.control-panel{
  --vsw-tech-h:clamp(52px,calc(66px * var(--vsw-ui-scale)),68px);
  --vsw-quality-h:clamp(48px,calc(58px * var(--vsw-ui-scale)),62px);
}
.control-panel .technique-grid button{
  height:var(--vsw-tech-h)!important;
  min-height:var(--vsw-tech-h)!important;
  max-height:var(--vsw-tech-h)!important;
  font-size:clamp(.78rem,calc(1rem * var(--vsw-ui-scale)),1.02rem)!important;
  padding:clamp(.30rem,calc(.42rem * var(--vsw-ui-scale)),.48rem)!important;
}
.control-panel .quality-stack button{
  height:var(--vsw-quality-h)!important;
  min-height:var(--vsw-quality-h)!important;
  max-height:var(--vsw-quality-h)!important;
  font-size:clamp(1rem,calc(1.28rem * var(--vsw-ui-scale)),1.32rem)!important;
  padding:clamp(.24rem,calc(.32rem * var(--vsw-ui-scale)),.38rem)!important;
}
.control-panel .quality-meaning{
  display:grid!important;
  gap:clamp(4px,calc(6px * var(--vsw-ui-scale)),7px)!important;
  margin:clamp(9px,calc(12px * var(--vsw-ui-scale)),14px) clamp(10px,calc(16px * var(--vsw-ui-scale)),18px) 5px!important;
  padding-inline:clamp(5px,calc(8px * var(--vsw-ui-scale)),10px)!important;
  font-size:clamp(.72rem,calc(.84rem * var(--vsw-ui-scale)),.88rem)!important;
  line-height:1.3!important;
}
.control-panel .quality-meaning-row{
  grid-template-columns:2.35rem minmax(0,1fr)!important;
  column-gap:clamp(12px,calc(16px * var(--vsw-ui-scale)),18px)!important;
}
@media (max-width:1250px) and (orientation:landscape){
  .control-panel{
    --vsw-tech-h:clamp(46px,calc(60px * var(--vsw-ui-scale)),62px);
    --vsw-quality-h:clamp(44px,calc(54px * var(--vsw-ui-scale)),58px);
  }
}

/* 0.3.1 Preview 2 – trainer-oriented analysis */
.analysis-split{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:clamp(8px,1vw,14px);align-items:start;margin-top:10px}
.analysis-split section{min-width:0;background:#081225;border:1px solid #334155;border-radius:10px;padding:clamp(8px,1vw,12px)}
.analysis-split h4,.card>h4{margin:.35rem 0 .55rem}
.analysis-mini-bars{display:grid;gap:6px}.analysis-mini-bars>div{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #25324a;padding:5px 2px}.analysis-mini-bars strong{font-variant-numeric:tabular-nums}
.analysis-insights{margin:.25rem 0;padding-left:1.25rem}.analysis-insights li{margin:.35rem 0;line-height:1.35}
.analysis-table-wrap .data-table{min-width:max-content;width:100%}.analysis-table-wrap th{white-space:nowrap}.analysis-table-wrap td{font-variant-numeric:tabular-nums}
@media(max-width:680px){.analysis-split{grid-template-columns:1fr}}


/* 0.3.1 Preview 2b: reguläres und spontanes Scouting optisch eindeutig trennen. */
.court.quick-scout-court{background:linear-gradient(90deg,#3f4754,#566171)!important;border-color:#64748b!important}
.court.quick-scout-court .pos{background:#e2e8f0!important;border-color:#94a3b8!important}
.court.regular-scout-court.own{background:linear-gradient(90deg,#713f12,#854d0e)!important}
.court.regular-scout-court.opponent{background:linear-gradient(90deg,#334155,#475569)!important}


/* 0.3.1 Preview 2e – responsive Scout settings layout.
   Uses available card width rather than a fixed device class. */
.settings-scout-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:clamp(14px,2vw,28px);
  align-items:start;
  margin-top:4px;
}
.settings-scout-options{
  display:grid;
  gap:clamp(7px,1vh,10px);
  min-width:0;
}
.settings-scout-options label{
  display:flex;
  align-items:flex-start;
  gap:7px;
  line-height:1.3;
}
.settings-player-sort{
  display:grid;
  grid-template-columns:minmax(max-content,auto) minmax(130px,220px);
  gap:clamp(10px,1.4vw,18px);
  align-items:center;
  justify-content:start;
  min-width:0;
}
.settings-player-sort select{width:100%}
@media (max-width:620px){
  .settings-scout-grid{grid-template-columns:1fr}
  .settings-player-sort{grid-template-columns:1fr;gap:6px}
}

/* 0.3.1 Preview 2f: sortable player table headers */
.data-table th .table-sort{display:inline-flex;align-items:center;gap:.35rem;background:transparent;border:0;color:inherit;padding:0;min-height:0;font:inherit;font-weight:inherit;cursor:pointer}.data-table th .table-sort span{font-size:.72em;opacity:.65}.data-table th .table-sort.active span{opacity:1}.data-table th .table-sort:focus-visible{outline:2px solid #38bdf8;outline-offset:3px;border-radius:4px}

/* Preview 2h: kompakter Felddarstellungs-Umschalter, nur eine aktive/farbige Seite. */
.court-title{gap:.55rem}
.court-title-tools{display:flex;align-items:center;justify-content:flex-end;gap:clamp(.4rem,1vw,.8rem);min-width:0}
.field-orientation-btn{width:38px;height:34px;min-width:38px;padding:3px 6px;border:1px solid #64748b;border-radius:8px;background:#172033;display:grid;place-items:center;cursor:pointer}
.field-orientation-btn:hover{border-color:#38bdf8;background:#1e293b}
.orientation-icon{position:relative;width:22px;height:25px;display:block}
.orientation-half{position:absolute;left:4px;width:14px;height:10px;border:2px solid #cbd5e1;background:#334155;box-sizing:border-box}
.orientation-half.top{top:1px}.orientation-half.bottom{bottom:1px}
.orientation-midline{position:absolute;left:0;right:0;top:11px;height:3px;border-radius:2px;background:#e2e8f0}
.field-orientation-btn.active-top .orientation-half.top,.field-orientation-btn.active-bottom .orientation-half.bottom{background:#0ea5e9;border-color:#7dd3fc}
.field-orientation-btn.active-top .orientation-half.bottom,.field-orientation-btn.active-bottom .orientation-half.top{background:#334155;border-color:#94a3b8}
@media(max-width:760px){.court-title-tools{gap:.35rem}.field-orientation-btn{width:34px;min-width:34px;height:32px}}

/* 0.3.1 Preview 2i – single-field view follows the marked physical side. */
.court.net-after{grid-template-rows:repeat(2,minmax(0,1fr)) clamp(18px,calc(24px * var(--vsw-ui-scale,1)),24px)!important}
.court.net-before{grid-template-rows:clamp(18px,calc(24px * var(--vsw-ui-scale,1)),24px) repeat(2,minmax(0,1fr))!important}
.court.nine-zone.net-after{grid-template-rows:repeat(3,minmax(0,1fr)) clamp(18px,calc(24px * var(--vsw-ui-scale,1)),24px)!important}
.court.nine-zone.net-before{grid-template-rows:clamp(18px,calc(24px * var(--vsw-ui-scale,1)),24px) repeat(3,minmax(0,1fr))!important}


/* 0.3.2 Preview2 – Offline-first Spielbibliothek */
.match-library-card{border-color:rgba(89,170,230,.34)}
.match-library-list{display:grid;gap:10px;margin-top:12px}
.match-library-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 14px;padding:12px;border:1px solid rgba(255,255,255,.10);border-radius:12px;background:rgba(255,255,255,.025)}
.match-library-main strong{display:block;font-size:1rem}.match-library-date,.match-library-meta{font-size:.78rem;color:var(--muted,#9fb0c2);margin-bottom:2px}.match-library-availability{display:flex;align-items:flex-start;gap:7px;font-size:1.25rem}.match-library-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:7px}.library-cloud-icon{line-height:20px}.library-device-icon{display:inline-block;width:14px;height:20px;border:2px solid currentColor;border-radius:3px;position:relative;opacity:.9}.library-device-icon:after{content:'';position:absolute;width:4px;height:1px;background:currentColor;bottom:2px;left:3px}.library-empty{padding:12px 0;color:var(--muted,#9fb0c2)}
.video-assignment-list{display:grid;gap:10px}.video-assignment{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}.video-assignment div:first-child{display:grid;gap:3px}.video-assignment span,.video-assignment small{color:var(--muted,#9fb0c2)}
.analysis-pinned{display:grid;grid-template-columns:1fr auto;gap:4px 12px;align-items:center}.analysis-pinned span{color:var(--muted,#9fb0c2);font-size:.82rem}.analysis-pinned button{grid-row:1/3;grid-column:2}
.analysis-result-backdrop{position:fixed;inset:0;z-index:2200;background:rgba(2,6,23,.82);display:grid;place-items:center;padding:clamp(8px,2vw,24px)}
.analysis-result-backdrop[hidden]{display:none}
.analysis-result-window{display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(1180px,calc(100vw - 24px));height:min(900px,calc(100dvh - 24px));background:var(--panel,#0f172a);border:1px solid #475569;border-radius:14px;box-shadow:0 24px 80px #0009;overflow:hidden}
.analysis-result-window>header,.analysis-result-window>footer{padding:12px 16px;background:#0b1427;border-color:#334155}.analysis-result-window>header{border-bottom:1px solid #334155}.analysis-result-window>header h2,.analysis-result-window>header p{margin:0}.analysis-result-window>header p{color:var(--muted,#9fb0c2);font-size:.82rem;margin-top:3px}.analysis-result-window>main{overflow:auto;padding:14px}.analysis-result-window>footer{display:flex;justify-content:flex-end;gap:8px;border-top:1px solid #334155}.analysis-result-window>footer button{min-width:92px}
.analysis-cluster>h3{margin-top:0}.analysis-signal-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:8px;margin:10px 0}.analysis-signal-grid>div{display:grid;gap:3px;background:#081225;border:1px solid #334155;border-radius:10px;padding:10px}.analysis-signal-grid span,.analysis-signal-grid small{color:var(--muted,#9fb0c2)}
@media(max-width:680px){.analysis-result-backdrop{padding:0}.analysis-result-window{width:100vw;height:100dvh;border-radius:0}.analysis-result-window>footer{justify-content:stretch}.analysis-result-window>footer button{flex:1;min-width:0}}
.review-summary{display:grid;gap:4px;margin-bottom:10px}.review-table-wrap{max-height:52vh;overflow:auto}.review-table-wrap table{width:100%;border-collapse:collapse}.review-table-wrap th,.review-table-wrap td{padding:5px 7px;border-bottom:1px solid rgba(255,255,255,.08);font-size:.78rem;text-align:left}
@media(max-width:700px){.match-library-item{grid-template-columns:1fr auto}.video-assignment{display:grid}.analysis-pinned{grid-template-columns:1fr}.analysis-pinned button{grid-row:auto;grid-column:auto}}

/* 0.3.2 Preview2 – responsive Absicherung der neuen Spiel-/Videooberflächen */
.match-library-main,
.match-library-actions,
.video-assignment > *{
  min-width:0;
}
.match-library-main strong,
.match-library-meta,
.video-assignment small,
.video-assignment span{
  overflow-wrap:anywhere;
  word-break:normal;
}
.match-library-actions button{
  max-width:100%;
}
@media(max-width:560px){
  .drawer{
    width:100vw!important;
    max-width:100vw!important;
  }
  .drawer-body .form-grid{
    grid-template-columns:minmax(0,1fr)!important;
    align-items:stretch!important;
  }
  .drawer-body .form-grid > label{
    margin-top:2px;
  }
  .dialog-backdrop{
    padding:8px!important;
  }
  .dialog{
    width:calc(100vw - 16px)!important;
    max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
  }
  .dialog label{
    grid-template-columns:minmax(0,1fr)!important;
    align-items:stretch!important;
  }
  .dialog input,
  .dialog select,
  .dialog textarea{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  .match-library-item{
    gap:7px 9px;
    padding:10px;
  }
  .match-library-actions{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .match-library-actions button{
    width:100%;
    padding-left:.38rem;
    padding-right:.38rem;
  }
}
@media(max-width:390px){
  .match-library-actions{
    grid-template-columns:1fr;
  }
}

/* Court grid correction:
   simple = exactly 2 position rows,
   detailed = exactly 3 position rows.
   In dual-court mode the shared net is outside each court, so no internal
   net row may remain reserved for a simple 6-zone court. */
.court-wrap.dual-court .court:not(.nine-zone){
  grid-template-rows:repeat(2,minmax(0,1fr))!important;
}
.court-wrap.dual-court .court:not(.nine-zone)>.net{
  display:none!important;
}

/* === Court 6-zone structural fix r1 ===
   A simple court always consists of exactly 6 position cells.
   Single court: 2 position rows plus one net row.
   Dual court: 2 position rows; the single shared net lives between courts.
   These rules intentionally override all older generic court row rules. */
.court:not(.nine-zone).net-before{
  grid-template-rows:clamp(17px,calc(24px * var(--vsw-ui-scale,1)),24px) repeat(2,minmax(0,1fr))!important;
}
.court:not(.nine-zone).net-after{
  grid-template-rows:repeat(2,minmax(0,1fr)) clamp(17px,calc(24px * var(--vsw-ui-scale,1)),24px)!important;
}
.court-wrap.dual-court .court:not(.nine-zone){
  grid-template-rows:repeat(2,minmax(0,1fr))!important;
}
.court-wrap.dual-court .court:not(.nine-zone)>.net{
  display:none!important;
}


/* Preview2 – version remains visible on compact viewports */
.viewport-compact .brand-copy small{display:block!important}

/* 0.3.2 Preview2-r1 – camera acceptance fixes */
.camera-compact-row{
  grid-template-columns:minmax(180px,1.75fr) minmax(82px,.72fr) minmax(92px,.72fr) minmax(86px,.72fr) minmax(132px,.9fr)!important;
  gap:5px!important;align-items:end;min-width:0
}
.camera-inline-stat.battery-stat{overflow:visible}
.camera-drawer-battery{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0}
.camera-drawer-battery small{font-size:.66rem;white-space:nowrap;color:var(--text)}
.camera-battery-shell{position:relative;display:inline-block;width:27px;height:12px;border:1.5px solid currentColor;border-radius:3px;overflow:visible;flex:0 0 auto}
.camera-battery-shell:after{content:"";position:absolute;right:-4px;top:3px;width:3px;height:5px;background:currentColor;border-radius:0 2px 2px 0}
.camera-battery-shell i{position:absolute;left:1px;top:1px;bottom:1px;max-width:calc(100% - 2px);background:currentColor;border-radius:1px}
.camera-quality-note{margin:3px 0 0;font-size:.6rem;color:var(--muted);line-height:1.15}
.ble-diag-reason{margin:8px 12px 0}
@media(max-width:680px){
 .camera-compact-row{grid-template-columns:minmax(0,1.7fr) minmax(78px,.7fr) minmax(82px,.7fr)!important}
 .camera-adapter-inline{grid-column:1/-1!important}
 .camera-connect-inline{grid-column:auto!important;width:auto!important;min-width:0!important}
}
@media(max-width:430px){
 .camera-compact-row{grid-template-columns:1fr 1fr!important}
 .camera-adapter-inline,.camera-connect-inline{grid-column:1/-1!important;width:100%!important}
}

/* 0.3.2 Preview2-r2 – simplified camera family labels and compatibility info */
.camera-label-row{display:flex;align-items:center;gap:5px}
.camera-info-btn{padding:0;width:20px;height:20px;min-height:20px;border-radius:50%;font-size:.72rem;line-height:1;display:inline-flex;align-items:center;justify-content:center}
.camera-compat-help{margin:5px 0 0;padding:7px 9px;border:1px solid var(--border);border-radius:8px;background:rgba(15,23,42,.35);font-size:.68rem;line-height:1.3;color:var(--muted)}
.camera-compat-help strong{color:var(--text)}

/* 0.3.2 Preview2-r3 – match library video action */
.match-library-actions{grid-template-columns:repeat(4,minmax(0,1fr))}
.new-match-ready{margin:8px 0 0;padding:7px 9px;border-left:3px solid var(--accent);background:rgba(14,165,233,.07)}
@media(max-width:620px){.match-library-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:390px){.match-library-actions{grid-template-columns:1fr}}


/* 0.3.2 Preview2-r5 — Scouting1/2/4/7: responsive smartphone landscape + unified visual language */
.phone-only{display:none!important}
.technique-button{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:3px;line-height:1.05}
.technique-icon{display:block;width:30px;height:30px;flex:0 0 30px;color:#f8fafc}
.technique-icon svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.technique-icon svg circle:first-child{fill:currentColor;stroke:none}
.technique-label{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;font-size:.82em}
.quality-button,.quality-chip,.quality-meaning-key{font-weight:900}
.quality-button.q-error,.quality-chip.q-error,.quality-meaning-key.q-error{background:#dc2626!important;border-color:#ef4444!important;color:#fff!important}
.quality-button.q-negative,.quality-chip.q-negative,.quality-meaning-key.q-negative{background:#f97316!important;border-color:#fb923c!important;color:#fff!important}
.quality-button.q-limited,.quality-chip.q-limited,.quality-meaning-key.q-limited{background:#d97706!important;border-color:#f59e0b!important;color:#fff!important}
.quality-button.q-poor,.quality-chip.q-poor,.quality-meaning-key.q-poor{background:#ca8a04!important;border-color:#eab308!important;color:#fff!important}
.quality-button.q-neutral,.quality-chip.q-neutral,.quality-meaning-key.q-neutral{background:#64748b!important;border-color:#94a3b8!important;color:#fff!important}
.quality-button.q-positive,.quality-chip.q-positive,.quality-meaning-key.q-positive{background:#16a34a!important;border-color:#22c55e!important;color:#fff!important}
.quality-button.q-perfect,.quality-chip.q-perfect,.quality-meaning-key.q-perfect{background:#047857!important;border-color:#10b981!important;color:#fff!important}
.quality-button.selected{outline:3px solid #e0f2fe!important;box-shadow:0 0 0 2px #0284c7 inset}
.quality-chip{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:25px;border:1px solid transparent;border-radius:6px;padding:0 7px;line-height:1}
.quality-meaning-key{display:inline-flex;align-items:center;justify-content:center;min-width:24px;border-radius:5px;padding:1px 4px}
.help-quality-table{overflow:auto;margin:8px 0}.help-quality-table table{min-width:820px;font-size:.76rem}
.protocol-head-actions{display:flex;align-items:center;gap:6px}

/* Low-height coarse-pointer landscape is the smartphone scouting mode. It intentionally does not detect Android/iOS. */
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse){
  :root{--phone-gap:5px}
  .app-shell{min-height:0!important;grid-template-rows:48px minmax(0,1fr) 22px!important}
  .topbar{height:48px!important;padding:3px 6px!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:5px!important}
  .menu-btn{width:38px!important;min-height:36px!important;height:36px!important;padding:.15rem!important}
  .brand img{width:32px!important;height:32px!important}.brand-copy small{font-size:.58rem}.brand-copy strong{font-size:.78rem}
  .match-head{font-size:.72rem}.match-teams{gap:5px!important}.match-teams #headerScore{font-size:1.05rem!important}.match-meta{font-size:.58rem!important;gap:5px!important}
  .head-actions{gap:3px!important}.header-pill,.badge{min-height:32px!important;padding:.2rem .38rem!important;font-size:.62rem!important}.clock-pill strong{font-size:.75rem!important}
  .workspace{padding:4px!important;min-height:0!important;overflow:hidden!important}
  .scout-layout{height:100%!important;grid-template-columns:minmax(310px,43%) minmax(360px,57%)!important;grid-template-rows:minmax(0,1fr) 44px!important;gap:var(--phone-gap)!important}
  .control-panel{grid-column:1;grid-row:1;padding:5px!important;overflow:hidden!important}
  .court-panel{grid-column:2;grid-row:1;padding:5px!important;min-height:0!important}
  .protocol-panel{display:none!important;position:fixed!important;z-index:70;inset:52px 5px 27px 5px;border:2px solid #38bdf8;box-shadow:0 12px 45px #000d;padding:7px!important;background:#0f172af5!important}
  body.phone-protocol-open .protocol-panel{display:grid!important}
  .phone-only{display:inline-flex!important}.phone-protocol-close{min-height:30px!important;height:30px;padding:.1rem .45rem!important}.phone-protocol-btn{min-height:30px!important;height:30px;padding:.18rem .45rem!important;font-size:.63rem!important;white-space:nowrap}
  .section-title{margin-bottom:3px!important;font-size:.72rem!important}.control-panel .section-title{min-height:20px!important}.control-panel #selectionLabel{max-width:62%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .input-step-indicator{font-size:.56rem!important;gap:2px!important;margin:0 0 3px!important}.input-step-indicator span{padding:3px 2px!important;border-radius:5px!important}.input-step-indicator b{font-size:.54rem}
  .inline-quality-toggle{min-height:30px!important;height:30px!important;padding:2px 5px!important;margin:0 0 3px!important;border-radius:7px!important;font-size:.64rem!important}.inline-quality-toggle .switch{transform:scale(.74);transform-origin:right center;margin-left:-10px}
  .subheading{font-size:.58rem!important;margin:3px 0 2px!important;letter-spacing:.04em!important}
  .technique-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important;grid-auto-rows:46px!important}
  .technique-grid button{height:46px!important;min-height:46px!important;max-height:46px!important;padding:2px!important;border-radius:7px!important}
  .technique-icon{width:21px;height:21px;flex-basis:21px}.technique-label{font-size:.58rem!important}
  .quality-stack{grid-template-columns:repeat(var(--quality-count,6),minmax(0,1fr))!important;gap:3px!important;grid-auto-rows:35px!important}
  .quality-stack button{height:35px!important;min-height:35px!important;max-height:35px!important;font-size:.92rem!important;padding:0!important;border-radius:6px!important}
  .quality-meaning{display:none!important}
  .set-detail-panel{max-height:70px!important;overflow:auto!important;padding:3px!important;margin-top:3px!important}.set-detail-buttons button{min-height:28px!important;height:28px!important;font-size:.55rem!important;padding:.1rem!important}
  /* Context priority: once location capture begins, previous WAS/WIE controls collapse but selection remains visible above. */
  html[data-scout-step="wo"] .technique-grid,html[data-scout-step="wohin"] .technique-grid,html[data-scout-step="wo"] .technique-heading,html[data-scout-step="wohin"] .technique-heading{display:none!important}
  html[data-scout-step="wo"] .quality-stack,html[data-scout-step="wohin"] .quality-stack,html[data-scout-step="wo"] .quality-heading,html[data-scout-step="wohin"] .quality-heading{display:none!important}
  .court-title{min-height:30px!important;margin-bottom:3px!important}.court-title-tools{gap:3px!important}.court-title-tools .switch{transform:scale(.72);transform-origin:center}.opponent-switch{font-size:.6rem!important;gap:2px!important}.field-orientation-btn{width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important}.court-title #captureTitle{font-size:.65rem!important}
  .court-wrap{min-height:0!important;overflow:hidden!important}.court{gap:2px!important;padding:2px!important;border-width:1px!important}.court:not(.nine-zone){grid-template-rows:repeat(2,minmax(0,1fr))!important}.court.nine-zone{grid-template-rows:repeat(3,minmax(0,1fr))!important}.court>.net{height:14px!important;line-height:14px!important;font-size:.48rem!important}
  .court:not(.nine-zone).net-before{grid-template-rows:14px repeat(2,minmax(0,1fr))!important}.court:not(.nine-zone).net-after{grid-template-rows:repeat(2,minmax(0,1fr)) 14px!important}.court.nine-zone.net-before{grid-template-rows:14px repeat(3,minmax(0,1fr))!important}.court.nine-zone.net-after{grid-template-rows:repeat(3,minmax(0,1fr)) 14px!important}
  .court-wrap.dual-court{grid-template-rows:minmax(0,1fr) 14px minmax(0,1fr)!important}.shared-net{height:14px!important;line-height:14px!important;font-size:.48rem!important}
  .pos{gap:0!important;padding:1px!important;border-width:1px!important;border-radius:4px!important;min-height:0!important}.pos-position{font-size:clamp(.74rem,3.1vh,1.12rem)!important;line-height:1!important}.pos-playerline{font-size:clamp(.48rem,1.8vh,.67rem)!important;line-height:1!important}.pos-name{font-size:clamp(.43rem,1.45vh,.58rem)!important;line-height:1!important}.pos:empty{display:none!important}
  .rotation-controls,.player-change-controls{gap:3px!important;margin-top:3px!important}.rotation-controls button,.player-change-controls button{min-height:32px!important;height:32px!important;padding:.15rem .25rem!important;font-size:.63rem!important;border-radius:7px!important}
  .target-hint{margin-top:2px!important;padding:2px 5px!important;font-size:.56rem!important;line-height:1.05!important}
  .correction-dock{grid-column:1/-1!important;grid-row:2!important;height:44px!important;padding:3px!important;gap:3px!important;grid-template-columns:repeat(7,minmax(0,1fr))!important}.correction-label{display:none!important}.correction-dock button{height:36px!important;min-height:36px!important;padding:.15rem .25rem!important;font-size:.59rem!important;border-radius:7px!important}
  .statusbar{height:22px!important;padding:0 5px!important;font-size:.55rem!important}.status-right{gap:3px!important}.statusbar .badge{min-height:18px!important;height:18px!important;padding:0 .25rem!important;font-size:.52rem!important}
  .note-label textarea{height:50px!important;min-height:50px!important;max-height:50px!important;font-size:.78rem!important;padding:5px!important}
  .protocol-wrap table{font-size:.65rem!important}.protocol-wrap th,.protocol-wrap td{padding:4px!important}
}

/* 0.3.2 Preview2-r7 rebuild3-fix2 — original technique pictograms, optional serve detail, contextual DataVolley legend */
.technique-icon img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.technique-icon{display:flex;align-items:center;justify-content:center;overflow:hidden}
.quality-meaning-context{grid-column:1/-1;font-size:.82em;font-weight:800;letter-spacing:.02em;color:#7dd3fc;margin-bottom:2px}
.detail-optional{font-size:.72em;font-weight:600;color:var(--muted);margin-left:.35rem}
.serve-detail-buttons{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.serve-detail-buttons button{white-space:normal;line-height:1.05}
@media(max-width:700px){.serve-detail-buttons{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(orientation:landscape) and (max-height:520px){
  #serveDetailPanel{max-height:none!important;overflow:visible!important}
  .serve-detail-buttons{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:3px!important}
  .serve-detail-buttons button{height:26px!important;min-height:26px!important;font-size:.51rem!important;padding:.08rem .12rem!important}
  .quality-meaning-context{display:none!important}
}


/* 0.3.2 Preview2-r7 rebuild3-fix2 — pictogram assets + adaptive usable-height layout */
.technique-button .technique-icon{width:clamp(34px,calc(46px * var(--vsw-ui-scale)),48px);height:clamp(28px,calc(40px * var(--vsw-ui-scale)),42px);flex:0 0 auto}
.technique-button{display:flex!important;align-items:center!important;justify-content:center!important;gap:clamp(4px,calc(7px * var(--vsw-ui-scale)),8px)!important}
.viewport-browser-low .workspace.scout-layout{padding:4px!important;gap:4px!important;grid-template-rows:minmax(0,1fr) 46px!important}
.viewport-browser-low .panel{padding:5px!important}.viewport-browser-low .section-title{margin-bottom:3px!important}.viewport-browser-low .input-step-indicator{margin-bottom:3px!important}
.viewport-browser-low .inline-quality-toggle{min-height:34px!important;height:34px!important;padding:3px 6px!important;margin-bottom:3px!important}
.viewport-browser-low .technique-grid{gap:3px!important;grid-auto-rows:44px!important}.viewport-browser-low .technique-grid button{height:44px!important;font-size:.72rem!important}
.viewport-browser-low .technique-button .technique-icon{width:34px!important;height:30px!important}.viewport-browser-low .quality-stack{gap:3px!important;grid-auto-rows:38px!important}.viewport-browser-low .quality-stack button{height:38px!important}
.viewport-browser-low .quality-meaning{margin:3px 4px!important;font-size:.64rem!important;column-gap:8px!important;row-gap:2px!important}.viewport-browser-low .subheading{margin:3px 0!important}
.viewport-browser-low .rotation-controls{margin-top:3px!important;gap:3px!important}.viewport-browser-low .rotation-controls button{min-height:36px!important}.viewport-browser-low .note-label textarea{height:48px!important;min-height:48px!important;max-height:48px!important}
.viewport-browser-low .correction-dock{height:48px!important;padding:3px!important;gap:3px!important}.viewport-browser-low .correction-dock button{min-height:36px!important}
@media (orientation:landscape) and (max-height:760px){.quality-meaning{grid-template-columns:repeat(3,minmax(0,1fr))!important}.quality-meaning-row{min-width:0}.quality-meaning-text{white-space:normal}}


/* Preview2-r7 pictogram correction — apply the separate SVG assets visibly to the technique buttons. */
.technique-button{
  display:grid!important;
  grid-template-rows:minmax(34px,1fr) auto!important;
  justify-items:center!important;
  align-items:center!important;
  align-content:center!important;
  gap:2px!important;
  min-height:66px!important;
  padding:4px 6px!important;
  overflow:hidden!important;
}
.technique-button .technique-icon{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:52px!important;
  height:38px!important;
  min-width:0!important;
  flex:none!important;
  overflow:visible!important;
}
.technique-button .technique-icon img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
}
.technique-button .technique-label{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
  text-overflow:clip!important;
  white-space:nowrap!important;
  line-height:1.05!important;
  font-size:.78rem!important;
  font-weight:700!important;
  text-align:center!important;
}
.viewport-browser-low .technique-grid{grid-auto-rows:56px!important}
.viewport-browser-low .technique-grid .technique-button{
  height:56px!important;
  min-height:56px!important;
  max-height:56px!important;
  grid-template-rows:32px 14px!important;
  padding:2px 4px!important;
  gap:1px!important;
}
.viewport-browser-low .technique-button .technique-icon{width:43px!important;height:30px!important}
.viewport-browser-low .technique-button .technique-label{font-size:.64rem!important;line-height:1!important}
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse){
  .technique-grid{grid-auto-rows:54px!important}
  .technique-grid .technique-button{height:54px!important;min-height:54px!important;max-height:54px!important;grid-template-rows:31px 14px!important;padding:2px 3px!important}
  .technique-button .technique-icon{width:42px!important;height:29px!important}
  .technique-button .technique-label{font-size:.62rem!important}
}

/* 0.3.2 Preview2-r7 rebuild3-fix2 — accepted technique pictograms, horizontal labels, robust quality legend */
.technique-grid .technique-button{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:clamp(8px,1vw,14px)!important;min-height:58px!important;height:auto!important;max-height:none!important;padding:6px 10px!important;overflow:hidden!important}
.technique-grid .technique-button .technique-icon{width:clamp(38px,3.2vw,56px)!important;height:clamp(38px,3.2vw,56px)!important;flex:0 0 clamp(38px,3.2vw,56px)!important;overflow:visible!important}
.technique-grid .technique-button .technique-icon img{width:100%!important;height:100%!important;object-fit:contain!important;object-position:center!important}
.technique-grid .technique-button .technique-label{display:block!important;width:auto!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:clamp(.72rem,.9vw,.96rem)!important;line-height:1.1!important;text-align:left!important;font-weight:750!important}
.control-panel .quality-meaning{position:relative!important;clear:both!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important;gap:5px 12px!important;margin:10px 4px 8px!important;padding:2px 4px 0!important;min-height:max-content!important;overflow:visible!important}
.control-panel .quality-meaning-context{grid-column:1/-1!important;margin:0 0 2px!important}
.control-panel .quality-meaning-row{display:grid!important;grid-template-columns:28px minmax(0,1fr)!important;gap:7px!important;align-items:center!important;min-width:0!important;min-height:25px!important}
.control-panel .quality-meaning-text{white-space:normal!important;overflow:visible!important;line-height:1.2!important}
.control-panel #serveDetailPanel,.control-panel #setDetailPanel{position:relative!important;clear:both!important;margin-top:8px!important}
@media (min-width:821px){.workspace.scout-layout{grid-template-columns:minmax(330px,30%) minmax(320px,1fr) minmax(360px,31%)!important}}
@media (min-width:821px) and (max-width:1250px){.workspace.scout-layout{grid-template-columns:minmax(320px,34%) minmax(260px,1fr) minmax(330px,34%)!important}.control-panel .quality-meaning{grid-template-columns:1fr!important}}
@media (min-width:1251px) and (max-width:1550px){.workspace.scout-layout{grid-template-columns:minmax(340px,30%) minmax(360px,1fr) minmax(380px,31%)!important}}
.viewport-browser-low .technique-grid{grid-auto-rows:auto!important}
.viewport-browser-low .technique-grid .technique-button{min-height:48px!important;height:48px!important;display:flex!important;flex-direction:row!important;padding:3px 7px!important}
.viewport-browser-low .technique-button .technique-icon{width:34px!important;height:34px!important;flex-basis:34px!important}
.viewport-browser-low .technique-button .technique-label{font-size:.66rem!important;text-align:left!important}
.viewport-browser-low .quality-meaning{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;margin:6px 2px 6px!important;padding:1px 2px!important;gap:3px 7px!important;font-size:.62rem!important}
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse){.technique-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:44px!important}.technique-grid .technique-button{height:44px!important;min-height:44px!important;padding:2px 6px!important;gap:5px!important}.technique-grid .technique-button .technique-icon{width:30px!important;height:30px!important;flex-basis:30px!important}.technique-grid .technique-button .technique-label{font-size:.59rem!important;text-align:left!important}.quality-meaning{display:none!important}}


/* 0.3.2 Preview2-r7 rebuild3-fix2 — start gate, mobile safe-area and equal detailed court zones */
html,body{width:100%;max-width:100%;min-width:0;overflow-x:hidden;background:#020617}
.start-gate{overflow:auto;overscroll-behavior:contain;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
.start-card{max-height:calc(100dvh - max(20px,env(safe-area-inset-top)) - max(20px,env(safe-area-inset-bottom)));overflow:auto;scrollbar-gutter:stable;padding:clamp(14px,4vh,30px)}
.start-card img{width:clamp(72px,18vh,116px);height:auto}
.start-card h1{margin:.45rem 0;font-size:clamp(1.7rem,5vh,2.3rem)}
.start-card p{margin:.4rem 0;line-height:1.25}
.start-card button{position:relative;z-index:1;margin:.65rem 0;min-height:48px}
.start-card small{display:block;line-height:1.25}
@media (max-height:620px){
  .start-card{padding:12px 16px;max-height:calc(100dvh - 12px)}
  .start-card img{width:64px}
  .start-card h1{font-size:1.45rem;margin:.25rem 0}
  .start-card p{font-size:.78rem;margin:.2rem 0}
  .start-card button{margin:.4rem 0;min-height:44px;padding:.55rem;font-size:1rem}
  .start-card small{font-size:.7rem}
}
@media (orientation:landscape) and (max-height:480px){
  .start-gate{place-items:stretch center;padding:6px max(8px,env(safe-area-inset-right)) 6px max(8px,env(safe-area-inset-left))}
  .start-card{width:min(760px,96vw);max-height:calc(100dvh - 12px);display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"logo title" "logo meta" "button button" "note note";column-gap:16px;align-items:center;text-align:left;padding:8px 14px}
  .start-card img{grid-area:logo;width:72px}
  .start-card h1{grid-area:title;margin:0;font-size:1.35rem}
  .start-card p{grid-area:meta;margin:0;font-size:.72rem}
  .start-card button{grid-area:button;margin:.35rem 0;width:100%;text-align:center}
  .start-card small{grid-area:note;font-size:.62rem;text-align:center}
}
/* P1-P9 are nine equal court cells in detailed mode. P7-P9 are semantic zones, not half-height overlays. */
.court.nine-zone,.court-wrap.dual-court .court.nine-zone{grid-auto-rows:minmax(0,1fr)!important}
.court.nine-zone.net-before{grid-template-rows:clamp(18px,calc(24px * var(--vsw-ui-scale,1)),24px) repeat(3,minmax(0,1fr))!important}
.court.nine-zone.net-after{grid-template-rows:repeat(3,minmax(0,1fr)) clamp(18px,calc(24px * var(--vsw-ui-scale,1)),24px)!important}
.court-wrap.dual-court .court.nine-zone{grid-template-rows:repeat(3,minmax(0,1fr))!important}
.court.nine-zone .pos{min-height:0!important;height:100%!important;padding-block:clamp(2px,.5vh,6px)!important}
.court.nine-zone .pos.zone-only{min-height:0!important;height:100%!important}
@media (orientation:landscape) and (max-height:600px) and (pointer:coarse){
  .court.nine-zone .pos-position{font-size:clamp(.72rem,3vh,1.05rem)!important}
  .court.nine-zone .pos.zone-only .pos-playerline{display:none!important}
}


/* 0.4.0 RC4-r2 — quality controls and legend are independent flow blocks */
.control-panel .quality-stack{position:relative!important;display:grid!important;flex:0 0 auto!important;min-height:0!important;margin-bottom:0!important;overflow:visible!important}
.control-panel .quality-meaning{position:relative!important;display:grid!important;float:none!important;flex:0 0 auto!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;margin-top:10px!important;align-self:stretch!important}
.control-panel #serveDetailPanel,.control-panel #setDetailPanel{position:relative!important;float:none!important;flex:0 0 auto!important;height:auto!important;min-height:0!important}
@media (max-width:1250px) and (orientation:landscape){.control-panel .quality-meaning{grid-template-columns:1fr!important}}

/* 0.4.0 RC4-r2 — scouting-state clarity and quality layout regression guard */
.control-panel .quality-stack,
.control-panel .quality-meaning,
.control-panel #serveDetailPanel,
.control-panel #setDetailPanel{position:relative!important;float:none!important;clear:both!important;width:100%!important;flex:0 0 auto!important;overflow:visible!important}
.control-panel .quality-meaning{height:auto!important;max-height:none!important;margin-top:10px!important}
/* Middle-zone half hints describe WHO/WO context only; target courts must never inherit them. */
.target-court .pos.base-half-near-net,.target-court .pos.base-half-near-back{background:#f8fafce9!important}
.target-court .pos.zone-only.base-half-near-net,.target-court .pos.zone-only.base-half-near-back{background:#e2e8f0!important}

/* 0.4.0 RC4-r2 — dedicated player-change mode feedback */
.player-change-controls button.selected{outline:3px solid #38bdf8;outline-offset:1px;background:#0c4a6e;box-shadow:0 0 0 2px rgba(56,189,248,.18) inset}


/* 0.4.0 RC4-r2 – compact library removal and safe scope selection */
.match-library-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center}
.match-library-actions .library-trash{min-width:44px;font-size:1rem;padding-inline:10px}
.match-library-actions .library-trash:disabled{opacity:.35;cursor:not-allowed}
.library-remove-options{display:grid;gap:10px;margin-top:12px}
.library-remove-choice{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:10px;padding:10px;border:1px solid var(--border);border-radius:10px;background:rgba(255,255,255,.025)}
.library-remove-choice input{margin-top:4px}
.library-remove-choice span{display:grid;gap:3px}.library-remove-choice small{color:var(--muted);line-height:1.35}
@media(max-width:760px){.match-library-actions{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){.match-library-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* 0.4.0 RC4-r2 · FE-UI10 — Spontanscouting-Feldzellen im kompakten Landscape-Modus.
   Nur Darstellung: Positionsarrays/Scoutinglogik und Desktopansicht bleiben unverändert. */
@media (orientation:landscape) and (max-height:900px) and (pointer:coarse){
  .court.quick-scout-court .pos-playerline.quick-redundant-playerline{display:none!important}
  .court.quick-scout-court .quick-default-abbr,.court.quick-scout-court .quick-default-sep{display:none!important}
  .court.quick-scout-court .pos-playerline.quick-default-abbr-line{min-height:0!important}
  .court.quick-scout-court .pos-name{display:none!important}
}
@media (orientation:landscape) and (max-height:620px) and (pointer:coarse){
  .court.quick-scout-court .pos-playerline{font-size:clamp(.48rem,1.7vh,.64rem)!important;min-height:0!important}
  .court.quick-scout-court .pos-position{font-size:clamp(.82rem,3.3vh,1.18rem)!important}
}

/* 0.4.0 RC4-r2 — one geometry model for detailed courts on every viewport.
   P1–P9 always occupy three equal rows; there is no smaller middle row on mobile. */
.court.nine-zone,
.court-wrap.dual-court .court.nine-zone{
  grid-auto-rows:minmax(0,1fr)!important;
}
.court-wrap.dual-court .court.nine-zone{
  grid-template-rows:repeat(3,minmax(0,1fr))!important;
}
.court.nine-zone.net-before{
  grid-template-rows:clamp(14px,calc(20px * var(--vsw-ui-scale,1)),20px) repeat(3,minmax(0,1fr))!important;
}
.court.nine-zone.net-after{
  grid-template-rows:repeat(3,minmax(0,1fr)) clamp(14px,calc(20px * var(--vsw-ui-scale,1)),20px)!important;
}
.court.nine-zone .pos,
.court.nine-zone .pos.zone-only{
  min-height:0!important;
  height:100%!important;
  align-self:stretch!important;
}


/* 0.4.0 RC4-r2 · FE-SCOUT8 / FE-UI11 / FE-UI12 */
.start-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:.65rem 0}.start-actions button{margin:0!important}.start-actions .quick-start{background:#12314a;border-color:#38bdf8}
.opponent-switch.quick-opponent-ready{outline:1px solid rgba(56,189,248,.35);outline-offset:3px}
.match-library-card #matchLibrary{margin-top:10px}.match-library-list{max-height:min(46dvh,440px);overflow-y:auto;overflow-x:hidden;padding-right:6px;scrollbar-gutter:stable}.match-library-item{padding:8px 10px;gap:5px 10px;border-radius:10px}.match-library-main strong{font-size:.92rem}.match-library-date,.match-library-meta{font-size:.7rem;margin-bottom:0}.match-library-actions{gap:5px}.match-library-actions button{min-height:36px;padding:.35rem .5rem;font-size:.78rem}.match-library-availability{font-size:1rem}.match-library-card>.toolbar{margin-top:4px}
@media(max-width:760px){.start-actions{grid-template-columns:1fr}.match-library-list{max-height:42dvh}.match-library-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:520px){.match-library-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
.start-card .start-actions{grid-area:button}.start-card .start-actions button{grid-area:auto!important}

/* RC4-r2: FE-SCOUT8 mode toggles */
.scout-mode-toggles{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin:2px 0 8px}
.scout-mode-toggles .inline-quality-toggle{margin:0!important;min-width:0}
@media (max-width:520px){.scout-mode-toggles{grid-template-columns:1fr}}

/* 0.4.0 RC4-r2 · FE-UI13 — technical entry gate only */
.start-actions{grid-template-columns:1fr!important;justify-items:center!important}
.start-actions #startAppBtn{width:min(300px,100%)!important;justify-self:center!important;text-align:center!important}

/* 0.4.0 RC4-r2 · FE-UI14 — new-match editor belongs to the match library and is collapsed by default */
.match-library-card .match-editor-card{margin-top:12px;margin-bottom:0;background:rgba(2,6,23,.26);border-color:rgba(56,189,248,.28)}
.match-editor-head{position:static;padding:0 0 10px;background:transparent;justify-content:space-between}
.match-editor-head h3{margin:0}

/* 0.4.0 RC7 · FE-UI15 — stable court-header geometry */
.court-title{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:10px}
.court-title-tools{display:grid!important;grid-template-columns:38px 126px 92px;align-items:center;justify-content:end;gap:8px!important}
.court-title-tools .field-orientation-btn{grid-column:1}
.court-title-tools .opponent-switch{grid-column:2;width:126px;min-width:126px;margin:0!important;justify-content:space-between}
.court-title-tools #rotationLabel{grid-column:3;display:block;width:92px;min-width:92px;text-align:left;white-space:nowrap}
@media(max-width:620px){.court-title{column-gap:5px}.court-title-tools{grid-template-columns:32px 105px 76px;gap:4px!important}.court-title-tools .opponent-switch{width:105px;min-width:105px}.court-title-tools #rotationLabel{width:76px;min-width:76px;font-size:.72rem}}

/* 0.4.0 RC7 · FE-UI16 — compact, balanced match-library cards */
.match-library-list{gap:8px!important}
.match-library-item{grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;align-items:start!important;padding:8px 10px!important;gap:6px 10px!important;min-height:0!important;height:auto!important}
.match-library-main{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:baseline;column-gap:8px;row-gap:1px}
.match-library-main .match-library-date{grid-column:1}.match-library-main strong{grid-column:2}.match-library-main .match-library-meta{grid-column:1/-1}
.match-library-availability{grid-column:2;grid-row:1;align-self:start;white-space:nowrap}
.match-library-actions{grid-column:1/-1;grid-row:2;display:grid!important;grid-template-columns:repeat(auto-fit,minmax(112px,1fr))!important;gap:5px!important;margin:0!important}
.match-library-actions button{width:100%;min-height:36px!important}
@media(max-width:620px){.match-library-main{grid-template-columns:1fr}.match-library-main .match-library-date,.match-library-main strong,.match-library-main .match-library-meta{grid-column:1}.match-library-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* 0.4.0 RC7 · FE-UI17/18/Analyse10 */
button.is-busy{cursor:progress;opacity:.82}
.analysis-result-error{color:#fecaca!important;background:#450a0a;border:1px solid #ef4444;border-radius:8px;padding:7px 9px;margin-top:8px!important}
.analysis-section-nav{position:sticky;top:-14px;z-index:5;display:flex;flex-wrap:wrap;gap:6px;padding:8px 0;background:var(--panel,#0f172a)}
.analysis-section-nav button{min-height:34px;padding:.35rem .65rem}.analysis-section-nav button.selected{background:#0369a1;border-color:#38bdf8;color:#fff}
.analysis-detail-section{scroll-margin-top:52px}.analysis-detail-section[hidden]{display:none!important}
.analysis-print-sheet{min-height:100%;background:#111c31;color:var(--text,#e5edf7);border:1px solid #334155;border-radius:10px;padding:18px}.analysis-print-sheet>h1{margin-top:0}
@media print{
  body>*:not(.analysis-result-backdrop){display:none!important}
  .analysis-result-backdrop{position:static!important;display:block!important;background:#fff!important;padding:0!important}
  .analysis-result-window{display:block!important;width:auto!important;height:auto!important;border:0!important;box-shadow:none!important;background:#fff!important;color:#111!important}
  .analysis-result-window>header,.analysis-result-window>footer{display:none!important}
  .analysis-result-window>main{overflow:visible!important;padding:0!important}
  .analysis-print-sheet{background:#fff!important;color:#111!important;border:0!important;border-radius:0!important;padding:0!important}
  .analysis-print-sheet .card,.analysis-print-sheet section,.analysis-print-sheet .analysis-kpis>div{background:#fff!important;color:#111!important;border-color:#aaa!important}
  .analysis-print-sheet .analysis-section-nav{display:none!important}.analysis-print-sheet .analysis-detail-section[hidden]{display:block!important}
  .analysis-print-sheet table{color:#111!important}.analysis-print-sheet th,.analysis-print-sheet td{border-color:#aaa!important}
}

/* 0.4.0 RC8 · FE-UI16 — teams and compact metadata share the title row */
.match-library-main{display:flex!important;align-items:baseline!important;gap:8px!important;min-width:0}
.match-library-date{flex:0 0 auto;white-space:nowrap}
.match-library-summary{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 8px;min-width:0}
.match-library-summary strong{flex:0 1 auto;font-size:.92rem;white-space:normal}
.match-library-summary .match-library-meta{flex:0 1 auto;font-size:.7rem!important;color:var(--muted,#9fb0c2);white-space:normal}
@media(max-width:700px){.match-library-main{align-items:flex-start!important}.match-library-summary .match-library-meta{flex-basis:100%}}

/* ==============================================================
   0.4.1 RC1 — device-class layouts without duplicated app logic
   Classification is applied by js/ui/layout/device-layout.js from the
   usable CSS viewport. Components and scouting behaviour remain shared.
   ============================================================== */
.portrait-rotate-overlay{display:none}
html.layout-phone-portrait .portrait-rotate-overlay{
  position:fixed;inset:0;z-index:10000;display:grid!important;place-items:center;
  padding:max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));
  background:rgba(2,6,23,.72);backdrop-filter:blur(16px) saturate(.75);-webkit-backdrop-filter:blur(16px) saturate(.75);
  color:#f8fafc;text-align:center;touch-action:none;overscroll-behavior:none
}
html.layout-phone-portrait body{overflow:hidden!important}
html.layout-phone-portrait #app,html.layout-phone-portrait #startGate{filter:blur(13px) brightness(.42);pointer-events:none;user-select:none}
.portrait-rotate-card{width:min(92vw,430px);padding:30px 24px 28px;border:1px solid rgba(148,163,184,.32);border-radius:24px;background:rgba(15,23,42,.92);box-shadow:0 22px 70px rgba(0,0,0,.45)}
.portrait-rotate-card h1{margin:18px 0 9px;font-size:clamp(1.45rem,6vw,2rem);line-height:1.12;letter-spacing:-.02em}
.portrait-rotate-card p{margin:0;color:#cbd5e1;font-size:clamp(.95rem,3.7vw,1.08rem);line-height:1.45}
.rotate-device-icon{position:relative;width:92px;height:72px;margin:0 auto}
.rotate-device-icon span{position:absolute;left:25px;top:9px;width:44px;height:66px;border:4px solid #38bdf8;border-radius:10px;transform:rotate(90deg);box-shadow:0 0 28px rgba(56,189,248,.22)}
.rotate-device-icon span:after{content:"";position:absolute;left:50%;bottom:4px;width:10px;height:2px;border-radius:2px;background:#38bdf8;transform:translateX(-50%)}
.rotate-device-icon i{position:absolute;right:-2px;top:-5px;font-style:normal;font-size:38px;line-height:1;color:#f8fafc}

html.layout-phone-landscape{
  --phone-gap:5px;
  --vsw-ui-scale:.64!important
}
html.layout-phone-landscape .app-shell{min-height:0!important;height:100dvh!important;grid-template-rows:44px minmax(0,1fr) 20px!important}
html.layout-phone-landscape .topbar{height:44px!important;min-height:44px!important;padding:2px 5px!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:4px!important}
html.layout-phone-landscape .brand-menu{height:34px!important;min-height:34px!important;width:43px!important;padding:2px!important}
html.layout-phone-landscape .brand-menu img{width:28px!important;height:28px!important;min-width:28px!important}
html.layout-phone-landscape .brand-copy{display:none!important}
html.layout-phone-landscape .head-actions{gap:2px!important;grid-column:auto!important}
html.layout-phone-landscape .header-pill{min-height:30px!important;height:30px!important;padding:.14rem .30rem!important;font-size:.58rem!important}
html.layout-phone-landscape .header-set{display:none!important}
html.layout-phone-landscape .clock-pill #clockMode{display:none!important}
html.layout-phone-landscape .clock-pill strong{font-size:.70rem!important}
html.layout-phone-landscape .workspace.scout-layout{
  height:100%!important;min-height:0!important;padding:4px!important;gap:var(--phone-gap)!important;overflow:hidden!important;
  grid-template-columns:minmax(285px,44%) minmax(0,56%)!important;
  grid-template-rows:minmax(0,1fr) 40px!important;
  grid-template-areas:"controls court" "corrections corrections"!important
}
html.layout-phone-landscape .control-panel{grid-area:controls!important;display:grid!important;grid-template-rows:auto auto auto auto auto auto auto auto!important;align-content:start!important;padding:4px!important;overflow:auto!important;overscroll-behavior:contain;scrollbar-width:thin}
html.layout-phone-landscape .control-panel .section-title{min-height:18px!important;margin-bottom:1px!important;font-size:.67rem!important}
html.layout-phone-landscape .control-panel #selectionLabel{max-width:68%;font-size:.54rem!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.layout-phone-landscape .input-step-indicator{font-size:.51rem!important;gap:1px!important;margin:0 0 2px!important}
html.layout-phone-landscape .input-step-indicator span{padding:2px 2px!important;border-radius:4px!important}
html.layout-phone-landscape .scout-mode-toggles{grid-template-columns:1fr 1fr!important;gap:3px!important;margin:1px 0 2px!important}
html.layout-phone-landscape .inline-quality-toggle{min-height:26px!important;height:26px!important;padding:1px 4px!important;margin:0!important;font-size:.56rem!important;border-radius:6px!important}
html.layout-phone-landscape .inline-quality-toggle .switch{transform:scale(.66)!important;transform-origin:right center!important;margin-left:-13px!important}
html.layout-phone-landscape .subheading{font-size:.53rem!important;margin:2px 0 1px!important;letter-spacing:.03em!important}
html.layout-phone-landscape .technique-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important;grid-auto-rows:39px!important}
html.layout-phone-landscape .technique-grid .technique-button{height:39px!important;min-height:39px!important;max-height:39px!important;display:flex!important;flex-direction:row!important;justify-content:flex-start!important;gap:4px!important;padding:2px 5px!important;border-radius:6px!important}
html.layout-phone-landscape .technique-button .technique-icon{width:24px!important;height:24px!important;flex-basis:24px!important}
html.layout-phone-landscape .technique-button .technique-label{font-size:.55rem!important;text-align:left!important}
html.layout-phone-landscape .quality-stack{display:grid!important;grid-template-columns:repeat(var(--quality-count,6),minmax(0,1fr))!important;gap:3px!important;grid-auto-rows:34px!important;overflow:visible!important}
html.layout-phone-landscape .quality-stack button{display:block!important;height:34px!important;min-height:34px!important;max-height:34px!important;font-size:.92rem!important;padding:0!important;border-radius:6px!important}
html.layout-phone-landscape .quality-meaning{display:none!important}
html.layout-phone-landscape .set-detail-panel{max-height:58px!important;overflow:auto!important;padding:2px!important;margin-top:2px!important}
html.layout-phone-landscape .set-detail-buttons button{min-height:26px!important;height:26px!important;font-size:.52rem!important;padding:.08rem!important}
html.layout-phone-landscape .court-panel{grid-area:court!important;position:relative!important;padding:4px!important;min-height:0!important;overflow:hidden!important}
html.layout-phone-landscape .court-title{min-height:27px!important;margin-bottom:2px!important;padding-right:0!important}
html.layout-phone-landscape .court-title #captureTitle{font-size:.60rem!important}
html.layout-phone-landscape .court-title-tools{gap:3px!important}
html.layout-phone-landscape .court-title-tools .switch{transform:scale(.66)!important;transform-origin:center!important}
html.layout-phone-landscape .opponent-switch{font-size:.56rem!important;gap:1px!important}
html.layout-phone-landscape .field-orientation-btn{width:27px!important;min-width:27px!important;height:27px!important;min-height:27px!important}
html.layout-phone-landscape .court-wrap{min-height:0!important;overflow:hidden!important}
html.layout-phone-landscape .court{gap:2px!important;padding:2px!important;border-width:1px!important}
html.layout-phone-landscape .court .pos{min-height:0!important;padding:1px!important}
html.layout-phone-landscape .court .pos-position{font-size:clamp(.78rem,3.5vh,1.05rem)!important}
html.layout-phone-landscape .court .pos-playerline{font-size:.50rem!important}
html.layout-phone-landscape .rotation-controls,html.layout-phone-landscape .player-change-controls{gap:3px!important;margin-top:2px!important}
html.layout-phone-landscape .rotation-controls button,html.layout-phone-landscape .player-change-controls button{height:28px!important;min-height:28px!important;padding:.1rem!important;font-size:.55rem!important}
html.layout-phone-landscape .protocol-panel{display:none!important;position:fixed!important;z-index:900;inset:48px 5px 24px 5px;border:2px solid #38bdf8;box-shadow:0 12px 45px #000d;padding:6px!important;background:#0f172af7!important}
html.layout-phone-landscape body.phone-protocol-open .protocol-panel{display:grid!important}
html.layout-phone-landscape .phone-only{display:inline-flex!important}
html.layout-phone-landscape .phone-protocol-btn{position:fixed!important;right:max(7px,env(safe-area-inset-right));bottom:max(27px,calc(env(safe-area-inset-bottom) + 27px));z-index:80;min-height:32px!important;height:32px!important;padding:.18rem .55rem!important;font-size:.62rem!important;border-radius:999px!important;box-shadow:0 5px 18px #0009;background:#1e293b!important;border-color:#38bdf8!important}
html.layout-phone-landscape .phone-protocol-close{min-height:28px!important;height:28px!important;padding:.1rem .42rem!important}
html.layout-phone-landscape .correction-dock{grid-area:corrections!important;height:40px!important;display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:3px!important;padding:3px!important}
html.layout-phone-landscape .correction-label{display:none!important}
html.layout-phone-landscape .correction-dock button{height:34px!important;min-height:34px!important;padding:.08rem .15rem!important;font-size:.50rem!important;line-height:1!important}
html.layout-phone-landscape .statusbar{height:20px!important;min-height:20px!important;font-size:.51rem!important;padding:0 5px!important}
html.layout-phone-landscape .status-right{gap:2px!important}
html.layout-phone-landscape .statusbar .badge{font-size:.48rem!important;padding:.08rem .20rem!important}
/* WER/WAS/WIE collapse only after the workflow has advanced to location capture. */
html.layout-phone-landscape[data-scout-step="wo"] .technique-grid,html.layout-phone-landscape[data-scout-step="wohin"] .technique-grid,html.layout-phone-landscape[data-scout-step="wo"] .technique-heading,html.layout-phone-landscape[data-scout-step="wohin"] .technique-heading{display:none!important}
html.layout-phone-landscape[data-scout-step="wo"] .quality-stack,html.layout-phone-landscape[data-scout-step="wohin"] .quality-stack,html.layout-phone-landscape[data-scout-step="wo"] .quality-heading,html.layout-phone-landscape[data-scout-step="wohin"] .quality-heading{display:none!important}

/* 0.4.1 RC1 · DOC-HELP1 — Bewertungssymbole sind echte Tabellenkopfzeile.
   Die historische Hilfsklasse .compact darf diese Tabelle nicht zu flex machen. */
.help-quality-table .data-table.compact{display:table!important;width:100%!important;min-width:820px;border-collapse:collapse;table-layout:auto;color:inherit}
.help-quality-table .data-table.compact thead{display:table-header-group!important}
.help-quality-table .data-table.compact tbody{display:table-row-group!important}
.help-quality-table .data-table.compact tr{display:table-row!important}
.help-quality-table .data-table.compact th,.help-quality-table .data-table.compact td{display:table-cell!important;vertical-align:middle}
.help-quality-table .data-table.compact thead th{font-weight:900;color:#e2e8f0;background:#111c2e;white-space:nowrap}


/* ==============================================================
   0.4.1 RC2 — UI-MOBILE1..8 browser hardening
   One shared component tree; only layout/visibility changes by viewport class.
   ============================================================== */
:root{--safe-top:env(safe-area-inset-top,0px);--safe-right:env(safe-area-inset-right,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px)}
html,body{min-width:0;width:100%;max-width:100%;min-height:100%;min-height:100dvh}
.start-gate{min-width:0;width:100%;max-width:100%;min-height:100%;min-height:100dvh}
.start-card,.start-card>*{min-width:0;max-width:100%}

/* Mobile browser start gate: keep the desktop visual hierarchy instead of a
   sideways compressed card. Explicit rows prevent Firefox from creating an
   implicit grid column when browserCameraNotice becomes visible. */
html.layout-phone-landscape .start-gate{
  place-items:center!important;
  overflow:auto!important;
  padding:max(6px,var(--safe-top)) max(10px,var(--safe-right)) max(6px,var(--safe-bottom)) max(10px,var(--safe-left))!important;
}
html.layout-phone-landscape .start-card{
  width:min(690px,calc(100dvw - max(20px,var(--safe-left)) - max(20px,var(--safe-right))))!important;
  max-width:100%!important;
  max-height:calc(100dvh - max(12px,var(--safe-top)) - max(12px,var(--safe-bottom)))!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-areas:"logo" "title" "meta" "notice" "button" "note"!important;
  justify-items:center!important;
  align-content:center!important;
  gap:clamp(3px,1.2dvh,8px)!important;
  padding:clamp(10px,2.7dvh,18px) clamp(16px,3.5dvw,30px)!important;
  text-align:center!important;
  overflow:auto!important;
  border-radius:20px!important;
}
html.layout-phone-landscape .start-card>img{grid-area:logo!important;width:clamp(66px,16dvh,102px)!important;height:auto!important;justify-self:center!important}
html.layout-phone-landscape .start-card>h1{grid-area:title!important;margin:0!important;font-size:clamp(1.25rem,5dvh,1.85rem)!important;line-height:1.05!important;text-align:center!important}
html.layout-phone-landscape .start-card>p{grid-area:meta!important;margin:0!important;font-size:clamp(.66rem,2.35dvh,.86rem)!important;line-height:1.25!important;text-align:center!important;white-space:normal!important;overflow-wrap:anywhere!important}
html.layout-phone-landscape .start-card>.browser-camera-notice{grid-area:notice!important;width:min(100%,620px)!important;margin:2px 0!important;padding:clamp(6px,1.7dvh,10px) clamp(9px,1.8dvw,13px)!important;font-size:clamp(.63rem,2.05dvh,.78rem)!important;line-height:1.3!important;text-align:left!important}
html.layout-phone-landscape .start-card>.start-actions{grid-area:button!important;width:min(360px,78%)!important;margin:2px 0!important;justify-self:center!important}
html.layout-phone-landscape .start-card>.start-actions #startAppBtn{width:100%!important;min-height:40px!important;height:auto!important;margin:0!important;padding:clamp(.45rem,1.8dvh,.7rem)!important;font-size:clamp(.9rem,2.8dvh,1.08rem)!important}
html.layout-phone-landscape .start-card>small{grid-area:note!important;margin:0!important;font-size:clamp(.55rem,1.75dvh,.70rem)!important;line-height:1.25!important;text-align:center!important;white-space:normal!important;overflow-wrap:anywhere!important}

/* Extra-short browser viewport: preserve hierarchy but reduce decoration, never
   hide the feature/meta row. */
@media (orientation:landscape) and (max-height:390px){
  html.layout-phone-landscape .start-card{gap:2px!important;padding:7px 14px!important}
  html.layout-phone-landscape .start-card>img{width:58px!important}
  html.layout-phone-landscape .start-card>h1{font-size:1.16rem!important}
  html.layout-phone-landscape .start-card>.browser-camera-notice{padding:5px 8px!important;font-size:.60rem!important}
  html.layout-phone-landscape .start-card>.start-actions{width:min(330px,72%)!important}
  html.layout-phone-landscape .start-card>small{font-size:.53rem!important}
}

/* Portrait blocking overlay: brand + rotation instruction; use dvh/safe areas and
   block underlying controls. */
html.layout-phone-portrait .portrait-rotate-overlay{min-height:100dvh!important;overflow:auto!important}
.portrait-rotate-logo{display:block;width:clamp(72px,20vw,104px);height:auto;margin:0 auto 12px;filter:drop-shadow(0 8px 24px rgba(0,0,0,.28))}
.portrait-rotate-card{max-height:calc(100dvh - max(40px,var(--safe-top)) - max(40px,var(--safe-bottom)));overflow:auto}
.portrait-rotate-card .rotate-device-icon{margin-top:2px}

/* Low-height landscape always uses the same compact scouting structure. Make the
   control column internally scrollable as a last-resort fallback, while WIE is
   part of the initial visible grid at normal phone heights. */
html.layout-phone-landscape .workspace.scout-layout{
  width:100%!important;max-width:100%!important;
  grid-template-columns:minmax(300px,44%) minmax(0,56%)!important;
}
html.layout-phone-landscape .control-panel{min-width:0!important;max-width:100%!important;overflow-y:auto!important;overflow-x:hidden!important}
html.layout-phone-landscape .technique-grid,html.layout-phone-landscape .quality-stack{min-width:0!important;width:100%!important}
html.layout-phone-landscape .court-panel{min-width:0!important;max-width:100%!important}
html.layout-phone-landscape .court-title{grid-template-columns:minmax(0,1fr) auto!important}
html.layout-phone-landscape .court-title-tools{min-width:0!important;grid-template-columns:30px minmax(94px,112px) minmax(62px,78px)!important}
html.layout-phone-landscape .court-title-tools .opponent-switch{width:auto!important;min-width:0!important}
html.layout-phone-landscape .court-title-tools #rotationLabel{width:auto!important;min-width:0!important}
html.layout-phone-landscape .phone-protocol-btn{top:auto!important;left:auto!important}

/* iOS/WebKit hardening without separate Safari logic. */
@supports(height:100svh){html.layout-phone-landscape .app-shell{height:100svh!important;min-height:0!important}}
@supports(height:100dvh){html.layout-phone-landscape .app-shell{height:100dvh!important}}
@media (hover:none) and (pointer:coarse){button:hover{transform:none}}
input,select,textarea{min-width:0}
@media(max-width:640px){input,select,textarea{font-size:max(16px,1rem)}}


/* ==============================================================
   0.4.1 RC5 — scouting, sync, security and i18n hardening
   UI-MOBILE5A-C, 6, 9, 10, UI-TABLET1 and PWA1.
   ============================================================== */
/* UI-MOBILE6: in phone portrait the app is never painted behind the rotation
   gate. The synchronous head classifier sets the class before first paint. */
html.layout-phone-portrait #app,
html.layout-phone-portrait #startGate{visibility:hidden!important;filter:none!important;pointer-events:none!important}
html.layout-phone-portrait .portrait-rotate-overlay{visibility:visible!important}

/* UI-MOBILE5A-C: mobile start gate uses the available landscape canvas rather
   than looking like a scaled-down desktop card. All browsers share geometry. */
html.layout-phone-landscape .start-card{
  width:min(820px,88dvw)!important;
  min-height:clamp(250px,72dvh,330px)!important;
  max-height:calc(100dvh - max(12px,var(--safe-top)) - max(12px,var(--safe-bottom)))!important;
  gap:clamp(5px,1.55dvh,10px)!important;
  padding:clamp(12px,3.1dvh,22px) clamp(20px,4.2dvw,38px)!important;
  align-content:center!important;
}
html.layout-phone-landscape .start-card>img{width:clamp(84px,21dvh,122px)!important}
html.layout-phone-landscape .start-card>h1{font-size:clamp(1.48rem,5.8dvh,2.08rem)!important;letter-spacing:-.015em!important}
html.layout-phone-landscape .start-card>p{font-size:clamp(.72rem,2.5dvh,.92rem)!important}
html.layout-phone-landscape .start-card>.browser-camera-notice{
  width:min(100%,650px)!important;padding:clamp(5px,1.4dvh,8px) 10px!important;
  font-size:clamp(.60rem,1.85dvh,.72rem)!important;line-height:1.24!important;border-radius:10px!important
}
html.layout-phone-landscape .start-card>.start-actions{width:min(430px,74%)!important;display:grid!important;gap:5px!important}
html.layout-phone-landscape .start-card>.start-actions #startAppBtn{min-height:44px!important;font-size:clamp(.98rem,3.05dvh,1.16rem)!important}
html.layout-phone-landscape .start-card>small{font-size:clamp(.56rem,1.75dvh,.69rem)!important}

/* PWA1: deterministic in-app entry point. Direct prompt when available,
   otherwise browser-specific manual instructions. */
.pwa-install-btn{min-height:34px!important;padding:.30rem .65rem!important;font-size:.72rem!important;background:transparent!important;border-color:#475569!important;color:#cbd5e1!important}
.pwa-install-hint{width:min(100%,650px);margin:2px auto 0;padding:7px 10px;border:1px solid #475569;border-radius:9px;background:rgba(2,6,23,.58);color:#cbd5e1;font-size:.67rem;line-height:1.3;text-align:left}
html.layout-phone-landscape .start-card>.pwa-install-hint{grid-area:notice;width:min(100%,650px)!important;margin-top:2px!important}
html.layout-phone-landscape .start-card>.browser-camera-notice:not([hidden]) + .start-actions + .pwa-install-hint{margin-top:0!important}
/* If both camera notice and install help are visible they remain normal flow
   children; explicit order prevents an implicit Firefox grid column. */
html.layout-phone-landscape .start-card>.browser-camera-notice{grid-row:4}
html.layout-phone-landscape .start-card>.start-actions{grid-row:5}
html.layout-phone-landscape .start-card>.pwa-install-hint{grid-row:6}
html.layout-phone-landscape .start-card>small{grid-row:7}

/* UI-MOBILE9/10: utility controls are part of the court header, not floating over
   correction buttons. Fullscreen appears only when JS says it is useful. */
html.layout-phone-landscape .court-title-tools{
  grid-template-columns:30px minmax(64px,78px) 30px minmax(92px,108px) minmax(62px,76px)!important;
  gap:3px!important;align-items:center!important
}
html.layout-phone-landscape .court-title-tools .phone-fullscreen-btn{grid-column:1!important;position:static!important;width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important;padding:0!important;font-size:.90rem!important;border-radius:8px!important}
html.layout-phone-landscape .court-title-tools .phone-protocol-btn{grid-column:2!important;position:static!important;right:auto!important;bottom:auto!important;width:100%!important;min-width:0!important;height:30px!important;min-height:30px!important;padding:.10rem .28rem!important;font-size:.55rem!important;border-radius:8px!important;box-shadow:none!important;white-space:nowrap!important}
html.layout-phone-landscape .court-title-tools .field-orientation-btn{grid-column:3!important}
html.layout-phone-landscape .court-title-tools .opponent-switch{grid-column:4!important;width:auto!important;min-width:0!important}
html.layout-phone-landscape .court-title-tools #rotationLabel{grid-column:5!important;width:auto!important;min-width:0!important}

/* UI-TABLET1: the five-value simple profile had auto rows smaller than its
   fixed-height buttons in Chromium. Give the simple profile the same explicit
   two-row contract that already keeps detailed mode stable. */
@media (orientation:landscape) and (min-width:900px) and (min-height:600px) and (pointer:coarse){
  html:not(.layout-phone-landscape) .control-panel .quality-stack:not(.detailed){
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-rows:repeat(2,var(--vsw-quality-h))!important;
    grid-auto-rows:var(--vsw-quality-h)!important;
    column-gap:8px!important;row-gap:8px!important;
    align-content:start!important;overflow:visible!important
  }
  html:not(.layout-phone-landscape) .control-panel .quality-stack:not(.detailed) button{
    height:var(--vsw-quality-h)!important;min-height:var(--vsw-quality-h)!important;max-height:var(--vsw-quality-h)!important;margin:0!important
  }
}

@media (orientation:landscape) and (max-height:390px){
  html.layout-phone-landscape .start-card{width:min(800px,90dvw)!important;min-height:clamp(235px,76dvh,285px)!important;padding:8px 18px!important;gap:3px!important}
  html.layout-phone-landscape .start-card>img{width:70px!important}
  html.layout-phone-landscape .start-card>h1{font-size:1.34rem!important}
  html.layout-phone-landscape .start-card>.start-actions{width:min(390px,70%)!important}
  html.layout-phone-landscape .pwa-install-btn{min-height:30px!important;font-size:.64rem!important;padding:.18rem .5rem!important}
  html.layout-phone-landscape .pwa-install-hint{font-size:.57rem!important;padding:5px 8px!important}
}
/* RC3 start-grid explicit install row (prevents any implicit-column behavior). */
html.layout-phone-landscape .start-card{grid-template-areas:"logo" "title" "meta" "notice" "button" "install" "note"!important}
html.layout-phone-landscape .start-card>.pwa-install-hint{grid-area:install!important}
html.layout-phone-landscape .phone-fullscreen-btn[hidden]{display:none!important}

/* 0.4.1 RC5 — cloud/library busy state and overlay-safe mobile tools */
body.overlay-open #phoneProtocolBtn,
body.overlay-open #phoneFullscreenBtn{display:none!important}
body.global-busy{cursor:progress}
body.global-busy::before{content:"";position:fixed;inset:0;background:rgba(2,6,23,.46);z-index:5000;backdrop-filter:blur(1px)}
body.global-busy::after{content:"⌛";position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:5001;font-size:2.2rem;background:#0f172a;border:1px solid #475569;border-radius:14px;padding:.65rem .9rem;box-shadow:0 12px 34px #0009}
.library-cloud-icon,.library-device-icon{transition:color .15s,border-color .15s,background .15s}
.library-cloud-icon.sync-equal,.library-cloud-icon.sync-present{color:#22c55e}
.library-cloud-icon.sync-newer{color:#f59e0b}
.library-device-icon.sync-equal,.library-device-icon.sync-present{border-color:#22c55e!important}
.library-device-icon.sync-stale{border-color:#f59e0b!important;box-shadow:inset 0 0 0 2px rgba(245,158,11,.22)}
.library-sync{border-color:#f59e0b!important;color:#fde68a!important}

/* Analysis headers and cells must always share the same table geometry. */
.analysis-table-wrap{min-width:0;overflow:auto}
.analysis-table-wrap>.data-table.compact{display:table!important;width:100%!important;border-collapse:collapse!important;table-layout:auto!important}
.analysis-table-wrap>.data-table.compact thead{display:table-header-group!important}
.analysis-table-wrap>.data-table.compact tbody{display:table-row-group!important}
.analysis-table-wrap>.data-table.compact tr{display:table-row!important}
.analysis-table-wrap>.data-table.compact th,.analysis-table-wrap>.data-table.compact td{display:table-cell!important;vertical-align:middle!important}

/* 0.4.1 RC5 draft — analysis help + timestamp post-processing */
.analysis-help-button{min-width:36px;min-height:36px;padding:.25rem .55rem;font-weight:800;border-radius:999px}
.analysis-view-help{margin:.45rem 0 .2rem;padding:.55rem .7rem;border:1px solid #334155;border-radius:8px;background:#0b1220;color:#cbd5e1}
.analysis-help-glossary h4{margin:.9rem 0 .3rem}.analysis-help-glossary p{margin:.35rem 0;line-height:1.45}
.protocol-time-edit{border:0;background:transparent;color:inherit;padding:0;min-height:auto;font:inherit;white-space:nowrap;text-decoration:underline dotted;text-underline-offset:3px}
.protocol-time-edit:hover,.protocol-time-edit:focus{color:#7dd3fc;background:transparent}
.timestamp-help{padding:.55rem .7rem;border:1px solid #334155;border-radius:8px;background:#0b1220}
.timestamp-inline{display:grid;grid-template-columns:minmax(70px,1fr) auto;align-items:center;gap:6px;margin:0}
.timestamp-inline input,[data-timestamp-input]{font-variant-numeric:tabular-nums}
[data-timestamp-preview]{font-size:.72rem;color:#93c5fd;white-space:nowrap}
[data-timestamp-preview].error{color:#fca5a5}
.timestamp-editor-wrap{max-height:min(58dvh,520px);overflow:auto}
.timestamp-editor-wrap input{width:100%;min-width:80px}
@media(max-width:700px){.timestamp-editor-wrap{max-height:52dvh}.timestamp-inline{grid-template-columns:1fr}.analysis-view-help{font-size:.72rem}}

.timestamp-insert{margin:.7rem 0;border:1px solid #334155;border-radius:10px;background:#0b1220;padding:.55rem .7rem}
.timestamp-insert summary{cursor:pointer;font-weight:700}
.timestamp-insert-grid{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:.55rem;margin-top:.6rem}
.timestamp-insert-grid label{margin:0;min-width:0}
.timestamp-insert-grid input,.timestamp-insert-grid select{width:100%;min-width:0}
@media(max-width:900px){.timestamp-insert-grid{grid-template-columns:repeat(2,minmax(120px,1fr))}}
@media(max-width:540px){.timestamp-insert-grid{grid-template-columns:1fr}}

/* RC5 Draft VIDEO-TIMESTAMP1a: visible per-row insertion control */
.timestamp-row-actions{width:44px;text-align:center;vertical-align:middle}
.timestamp-insert-row{min-width:36px;width:36px;height:36px;padding:0;border-radius:9px;font-size:1.25rem;line-height:1;font-weight:800}
.timestamp-insert-focus{outline:2px solid var(--accent,#38bdf8);outline-offset:2px}
@media(max-width:700px){.timestamp-row-actions{width:38px}.timestamp-insert-row{min-width:32px;width:32px;height:32px;font-size:1.1rem}.timestamp-editor-wrap table{min-width:620px}}

/* 0.4.1 RC5 — VIDEO-TIMESTAMP1b-d */
.protocol-head-actions{display:flex;align-items:center;gap:.45rem}
.protocol-insert-btn{min-width:32px;width:32px;height:30px;padding:0;border-radius:8px;font-size:1.05rem;font-weight:800}
.protocol-insert-btn:disabled{opacity:.38;cursor:not-allowed}
#protocolBody tr[data-protocol-event-id]{cursor:pointer}
#protocolBody tr[data-protocol-event-id].selected{outline:2px solid var(--accent,#38bdf8);outline-offset:-2px;background:color-mix(in srgb,var(--accent,#38bdf8) 14%,transparent)}
.timestamp-sort{display:inline-flex;align-items:center;gap:.3rem;border:0;background:transparent;padding:.1rem .2rem;font:inherit;font-weight:700;color:inherit;white-space:nowrap}
.timestamp-sort:hover{background:rgba(148,163,184,.12)}
.timestamp-editor-table th{position:sticky;top:0;z-index:2;background:var(--panel,#111827)}
.protocol-insert-grid{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr));gap:.65rem}
.protocol-insert-grid label{margin:0;min-width:0}
.protocol-insert-grid select,.protocol-insert-grid input{width:100%;min-width:0}
@media(max-width:700px){.protocol-insert-grid{grid-template-columns:repeat(2,minmax(110px,1fr))}}
@media(max-width:470px){.protocol-insert-grid{grid-template-columns:1fr}}

/* 0.4.1 RC5 timestamp editor density + viewport fit */
.dialog:has(.timestamp-editor-wrap){
  width:min(900px,96vw);
  height:min(88dvh,780px);
  max-height:88dvh;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
}
.dialog:has(.timestamp-editor-wrap) #dialogBody{
  min-height:0;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto auto auto minmax(0,1fr);
  gap:.45rem;
}
.dialog:has(.timestamp-editor-wrap) .dialog-actions{margin-top:.55rem}
.timestamp-editor-wrap{
  min-height:0;
  max-height:none;
  overflow:auto;
  overscroll-behavior:contain;
}
.timestamp-editor-table{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  font-size:.78rem;
}
.timestamp-editor-table th,.timestamp-editor-table td{
  padding:.26rem .32rem;
  line-height:1.15;
  vertical-align:middle;
}
.timestamp-editor-table th:nth-child(1),.timestamp-editor-table td:nth-child(1){width:7%}
.timestamp-editor-table th:nth-child(2),.timestamp-editor-table td:nth-child(2){width:10%}
.timestamp-editor-table th:nth-child(3),.timestamp-editor-table td:nth-child(3){width:10%}
.timestamp-editor-table th:nth-child(4),.timestamp-editor-table td:nth-child(4){width:17%}
.timestamp-editor-table th:nth-child(5),.timestamp-editor-table td:nth-child(5){width:20%}
.timestamp-editor-table th:nth-child(6),.timestamp-editor-table td:nth-child(6){width:29%}
.timestamp-editor-table th:nth-child(7),.timestamp-editor-table td:nth-child(7){width:7%}
.timestamp-inline{display:grid;grid-template-columns:minmax(0,1fr);gap:1px;align-items:center}
.timestamp-inline input{min-width:0!important;width:100%;min-height:30px!important;padding:.22rem .35rem!important}
.timestamp-inline [data-timestamp-preview]{font-size:.64rem;line-height:1.05;overflow:hidden;text-overflow:ellipsis}
.timestamp-row-actions{width:auto!important}
.timestamp-insert-row{min-width:30px;width:30px;height:30px;font-size:1rem}
.timestamp-sort{max-width:100%;font-size:.74rem;gap:.15rem;padding:0;overflow:hidden;text-overflow:ellipsis}
@media(max-width:700px){
 .dialog:has(.timestamp-editor-wrap){width:98vw;height:90dvh;max-height:90dvh;padding:9px!important}
 .timestamp-editor-table{font-size:.68rem;table-layout:fixed;min-width:0!important}
 .timestamp-editor-table th,.timestamp-editor-table td{padding:.20rem .20rem}
 .timestamp-editor-table th:nth-child(1),.timestamp-editor-table td:nth-child(1){width:7%}
 .timestamp-editor-table th:nth-child(2),.timestamp-editor-table td:nth-child(2){width:10%}
 .timestamp-editor-table th:nth-child(3),.timestamp-editor-table td:nth-child(3){width:9%}
 .timestamp-editor-table th:nth-child(4),.timestamp-editor-table td:nth-child(4){width:15%}
 .timestamp-editor-table th:nth-child(5),.timestamp-editor-table td:nth-child(5){width:19%}
 .timestamp-editor-table th:nth-child(6),.timestamp-editor-table td:nth-child(6){width:33%}
 .timestamp-editor-table th:nth-child(7),.timestamp-editor-table td:nth-child(7){width:7%}
 .timestamp-inline input{min-height:28px!important;font-size:.72rem!important}
 .timestamp-inline [data-timestamp-preview]{font-size:.58rem}
 .timestamp-insert-row{min-width:28px;width:28px;height:28px}
}


/* 0.4.1 RC5-1 — VIDEO-TIMESTAMP1d/e regression fixes */
.dialog .protocol-insert-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(170px,1fr))!important;
  gap:14px 16px!important;
  align-items:start;
}
.dialog .protocol-insert-grid label{
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  gap:6px!important;
  min-width:0!important;
  width:100%!important;
}
.dialog .protocol-insert-grid select,
.dialog .protocol-insert-grid input{
  display:block!important;
  width:100%!important;
  min-width:150px!important;
  min-height:42px!important;
  height:auto!important;
  box-sizing:border-box!important;
  font-size:.92rem!important;
  padding:.52rem .62rem!important;
}
.dialog .protocol-insert-grid small{
  min-height:1em;
  line-height:1.15;
}
@media(max-width:760px){
  .dialog .protocol-insert-grid{grid-template-columns:repeat(2,minmax(150px,1fr))!important;gap:10px 12px!important}
  .dialog .protocol-insert-grid select,.dialog .protocol-insert-grid input{min-width:0!important;min-height:40px!important}
}
@media(max-width:480px){
  .dialog .protocol-insert-grid{grid-template-columns:1fr!important}
}

/* 0.4.1 RC6 — timestamp pagination + insert-dialog spacing */
.timestamp-editor-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:.35rem 0 .55rem}
.timestamp-editor-toolbar>label{display:flex!important;grid-template-columns:none!important;flex-direction:row!important;align-items:center!important;gap:7px!important;margin:0!important;width:auto!important}
.timestamp-editor-toolbar select{min-width:76px;width:auto!important;min-height:32px!important;padding:.25rem .45rem!important}
.timestamp-pager{display:flex;align-items:center;gap:8px;margin-left:auto}
.timestamp-pager button{min-width:34px!important;width:34px;height:32px;padding:0!important}
#timestampPageInfo{font-size:.74rem;color:var(--muted);white-space:nowrap}
.dialog:has(.protocol-insert-grid){width:min(720px,95vw)!important}
.dialog .protocol-insert-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;padding-inline:10px!important;box-sizing:border-box!important}
.dialog .protocol-insert-grid select,.dialog .protocol-insert-grid input{min-width:0!important}
@media(max-width:760px){.dialog .protocol-insert-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;padding-inline:8px!important}}
@media(max-width:480px){.dialog .protocol-insert-grid{grid-template-columns:1fr!important;padding-inline:4px!important}.timestamp-editor-toolbar{align-items:flex-start}.timestamp-pager{margin-left:0}}
/* 0.4.1 RC6 — VIDEO-TIMESTAMP1c/d pagination, semantic WER/WOHIN and spacing */

/* 0.4.1 RC6 — VIDEO-TIMESTAMP1f: visible page-size/pager toolbar */
.dialog:has(.timestamp-editor-wrap) #dialogBody{
  grid-template-rows:auto auto auto auto minmax(0,1fr)!important;
}
.timestamp-editor-toolbar{
  min-width:0;
  width:100%;
  box-sizing:border-box;
  overflow:visible;
  padding:2px 3px;
  position:relative;
  z-index:3;
}
.timestamp-editor-toolbar>label{
  flex:0 0 auto;
  min-width:max-content;
  color:var(--text,#e5e7eb)!important;
}
.timestamp-editor-toolbar select{
  display:inline-block!important;
  visibility:visible!important;
  opacity:1!important;
}
.timestamp-pager{
  flex:0 1 auto;
  min-width:0;
  overflow:visible;
}
.timestamp-pager button{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  visibility:visible!important;
  opacity:1!important;
}
@media(max-width:560px){
  .timestamp-editor-toolbar{align-items:flex-start;gap:6px 10px}
  .timestamp-pager{margin-left:0;flex:1 1 100%;justify-content:flex-start}
}

/* 0.4.1 RC6 — VIDEO-TIMESTAMP1d semantic insert-dialog usability */
.dialog:has(.protocol-insert-grid){width:min(900px,96vw)!important}
.dialog .protocol-insert-grid{
  grid-template-columns:repeat(3,minmax(210px,1fr))!important;
  gap:12px 18px!important;
  padding-inline:16px!important;
}
.dialog .protocol-insert-grid label{
  gap:4px!important;
}
.dialog .protocol-insert-grid label>span{
  display:block;
  margin:0 0 2px;
  line-height:1.1;
  font-weight:600;
}
.dialog .protocol-insert-grid select,
.dialog .protocol-insert-grid input{
  min-width:0!important;
  width:100%!important;
  min-height:44px!important;
  font-size:.96rem!important;
  padding:.56rem .68rem!important;
}
.timestamp-insert-grid{grid-template-columns:repeat(3,minmax(190px,1fr))!important;gap:.55rem .8rem!important}
.timestamp-insert-grid label{display:flex!important;flex-direction:column!important;gap:4px!important}
.timestamp-insert-grid select,.timestamp-insert-grid input{min-height:40px!important;width:100%!important}
@media(max-width:800px){
  .dialog .protocol-insert-grid{grid-template-columns:repeat(2,minmax(180px,1fr))!important;padding-inline:10px!important}
  .timestamp-insert-grid{grid-template-columns:repeat(2,minmax(160px,1fr))!important}
}
@media(max-width:520px){
  .dialog .protocol-insert-grid,.timestamp-insert-grid{grid-template-columns:1fr!important;padding-inline:4px!important}
}


/* === 0.4.1 RC6: side navigation + responsive analysis dashboard === */
.drawer-backdrop{align-items:stretch!important}
.drawer{
  width:min(1180px,96vw)!important;
  max-width:96vw!important;
  grid-template-columns:clamp(150px,18vw,205px) minmax(0,1fr)!important;
  grid-template-rows:58px minmax(0,1fr)!important;
}
.drawer>header{grid-column:1/-1!important;grid-row:1!important}
.drawer-nav{
  grid-column:1!important;grid-row:2!important;
  display:flex!important;flex-direction:column!important;
  align-items:stretch!important;justify-content:flex-start!important;
  gap:6px!important;padding:10px 8px!important;
  border-right:1px solid var(--line)!important;border-bottom:0!important;
  overflow-y:auto!important;overflow-x:hidden!important;
  background:#0b1220!important;
}
.drawer-nav button{width:100%!important;min-width:0!important;text-align:left!important;white-space:normal!important}
.drawer-body{grid-column:2!important;grid-row:2!important;min-width:0!important;overflow:auto!important;padding:14px!important}
.drawer-body>.card:first-child{margin-top:0!important}
.analysis-card{max-width:none!important}
.analysis-dashboard{margin-top:12px;padding:2px 0 12px}
.analysis-dashboard-head{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin:0 0 10px}
.analysis-dashboard-head h3{margin:0 0 3px;font-size:1.12rem}
.analysis-dashboard-head p{margin:0}
.analysis-dashboard-grid{
  --analysis-tile-min:270px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(var(--analysis-tile-min),100%),1fr));
  gap:10px;
  align-items:stretch;
}
.analysis-dashboard-card{display:grid;grid-template-rows:auto 1fr auto;min-width:0;min-height:185px;background:#111c2e;border:1px solid #334155;border-radius:12px;overflow:hidden;box-shadow:0 8px 22px #0002}
.analysis-dashboard-card>header{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;padding:11px 12px;border-bottom:1px solid #26364c}
.analysis-dashboard-card h4{margin:0;font-size:.95rem}
.analysis-dashboard-icon{display:grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#082f49;color:#38bdf8;font-weight:800;font-size:1rem}
.analysis-card-help{width:30px!important;min-width:30px!important;min-height:30px!important;height:30px;padding:0!important;border-radius:50%;background:#0f172a;color:#93c5fd}
.analysis-card-help.active{background:#164e63;border-color:#38bdf8}
.analysis-card-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:12px}
.analysis-card-metrics>div{min-width:0;background:#0b1424;border:1px solid #26364c;border-radius:9px;padding:9px 10px}
.analysis-card-metrics strong{display:block;font-size:1.25rem;color:#f8fafc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.analysis-card-metrics span{display:block;margin-top:2px;color:#cbd5e1;font-size:.72rem}
.analysis-card-metrics small{display:block;margin-top:4px;color:#7dd3fc;font-size:.67rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.analysis-card-detail{border:0!important;border-top:1px solid #26364c!important;border-radius:0!important;background:transparent!important;color:#7dd3fc!important;text-align:left!important;min-height:38px!important;padding:8px 12px!important}
.analysis-card-detail:hover{background:#0b2239!important;color:#e0f2fe!important}
#analysisResult{min-width:0}
@media(max-width:900px){
  .drawer{grid-template-columns:145px minmax(0,1fr)!important;width:98vw!important;max-width:98vw!important}
  .drawer-nav{padding:8px 6px!important}
  .analysis-dashboard-grid{--analysis-tile-min:245px;gap:8px}
  .analysis-dashboard-card{min-height:168px}
}
@media(max-width:620px){
  .drawer{grid-template-columns:118px minmax(0,1fr)!important}
  .drawer-nav button{font-size:.72rem!important;padding:.38rem .42rem!important}
  .drawer-body{padding:8px!important}
  .analysis-dashboard-grid{--analysis-tile-min:220px}
}
html.layout-phone-landscape .drawer{grid-template-columns:112px minmax(0,1fr)!important;width:100vw!important;max-width:100vw!important}
html.layout-phone-landscape .drawer-nav{padding:5px!important;gap:4px!important}
html.layout-phone-landscape .drawer-nav button{min-height:31px!important;font-size:.63rem!important;padding:.25rem .35rem!important}
html.layout-phone-landscape .drawer-body{padding:6px!important}
html.layout-phone-landscape .analysis-dashboard-grid{--analysis-tile-min:205px;gap:6px}
html.layout-phone-landscape .analysis-dashboard-card{min-height:150px}
html.layout-phone-landscape .analysis-dashboard-card>header{padding:7px 8px}
html.layout-phone-landscape .analysis-card-metrics{padding:7px;gap:5px}
html.layout-phone-landscape .analysis-card-metrics>div{padding:6px 7px}
html.layout-phone-landscape .analysis-card-metrics strong{font-size:1rem}
/* === 0.4.1 RC6-7: visual dashboard cards === */
.analysis-card-body{display:grid;grid-template-columns:minmax(0,.88fr) minmax(120px,1.12fr);gap:8px;align-items:stretch;min-width:0;padding:10px 11px}
.analysis-card-body .analysis-card-metrics{padding:0;grid-template-columns:1fr;align-content:start}
.analysis-card-viz{display:flex;flex-direction:column;justify-content:center;gap:8px;min-width:0;overflow:hidden}
.analysis-mini-donut{--p:0;position:relative;width:74px;height:74px;margin:auto;border-radius:50%;background:conic-gradient(#38bdf8 calc(var(--p)*1%),#243247 0);display:grid;place-items:center}
.analysis-mini-donut:after{content:"";position:absolute;inset:9px;border-radius:50%;background:#0b1424;border:1px solid #26364c}
.analysis-mini-donut>span,.analysis-mini-donut>small{position:relative;z-index:1;text-align:center}
.analysis-mini-donut>span{font-size:.93rem;font-weight:800;color:#f8fafc}
.analysis-mini-donut>small{position:absolute;top:48px;font-size:.52rem;color:#94a3b8}
.analysis-mini-bars-chart{display:grid;gap:5px;min-width:0}
.analysis-mini-bars-chart>div{display:grid;grid-template-columns:minmax(28px,.7fr) minmax(56px,2fr) auto;gap:5px;align-items:center;min-width:0}
.analysis-mini-bars-chart span{font-size:.58rem;color:#cbd5e1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.analysis-mini-bars-chart i{height:8px;border-radius:999px;background:#243247;overflow:hidden;display:block}
.analysis-mini-bars-chart b{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#0284c7,#38bdf8)}
.analysis-mini-bars-chart strong{font-size:.58rem;color:#e2e8f0;font-weight:700}
.analysis-mini-bars-chart em{font-size:.62rem;color:#64748b;font-style:normal}
.drawer-subnav{display:flex;gap:6px;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid var(--line)}
.drawer-subnav button{min-height:34px}
@media(max-width:760px){.analysis-card-body{grid-template-columns:1fr}.analysis-card-viz{min-height:70px}.analysis-mini-donut{width:64px;height:64px}.analysis-mini-donut:after{inset:8px}.analysis-mini-donut>small{top:41px}}
html.layout-phone-landscape .analysis-card-body{padding:6px 7px;gap:5px;grid-template-columns:minmax(0,.95fr) minmax(92px,1.05fr)}
html.layout-phone-landscape .analysis-mini-donut{width:54px;height:54px}.analysis-mini-donut:after{inset:7px}html.layout-phone-landscape .analysis-mini-donut>small{display:none}


/* RC6-2 · analysis dashboard/detail/help/insights */
.analysis-dashboard-card{position:relative}
.analysis-card-popover{
  position:absolute;z-index:8;top:52px;right:12px;width:min(330px,calc(100% - 24px));
  padding:11px 12px;border:1px solid #475569;border-radius:10px;background:#08111f;
  box-shadow:0 12px 28px #0009;color:#dbeafe;font-size:.78rem;line-height:1.4
}
.analysis-card-popover[hidden]{display:none!important}
.analysis-card-help.active{outline:2px solid #38bdf8;background:#0c4a6e}
.analysis-dashboard-context{display:inline-flex;margin-top:5px;padding:3px 8px;border:1px solid #334155;border-radius:999px;color:#93c5fd;font-size:.7rem}
.analysis-compare-summary{margin-top:12px;padding:12px;border:1px solid #334155;border-radius:12px;background:#0b1424}
.analysis-compare-summary h4{margin:0 0 8px}.analysis-compare-summary>div{display:grid;grid-template-columns:28px 1fr;gap:8px;padding:6px 0;border-top:1px solid #223047}
.analysis-compare-summary span{font-weight:900;color:#60a5fa}
.analysis-empty{text-align:center;padding:28px}

.analysis-modern-detail{display:grid;gap:14px}
.analysis-detail-viz,.analysis-insights,.analysis-detail-table{
  border:1px solid #334155;border-radius:13px;background:#0b1424;padding:13px
}
.analysis-detail-viz h4,.analysis-insights h4,.analysis-detail-table>h4{margin:0 0 10px}
.analysis-big-donuts{display:flex;gap:14px;flex-wrap:wrap;align-items:center;margin-bottom:12px}
.analysis-detail-bars{display:grid;gap:8px}
.analysis-detail-bars>div{display:grid;grid-template-columns:minmax(90px,170px) minmax(110px,1fr) minmax(48px,auto);gap:9px;align-items:center}
.analysis-detail-bars span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.76rem;color:#cbd5e1}
.analysis-detail-bars i,.analysis-dual-row i{height:11px;background:#111827;border:1px solid #273449;border-radius:999px;overflow:hidden}
.analysis-detail-bars b,.analysis-dual-row b{display:block;height:100%;background:linear-gradient(90deg,#0284c7,#22d3ee);border-radius:inherit}
.analysis-detail-bars strong{font-size:.72rem;text-align:right}
.analysis-dual-bars{display:grid;gap:8px}
.analysis-dual-row{display:grid;grid-template-columns:38px 24px minmax(90px,1fr) 54px 24px minmax(90px,1fr) 54px;gap:7px;align-items:center}
.analysis-dual-row>strong{color:#f8fafc}.analysis-dual-row>span{font-size:.68rem;color:#94a3b8}.analysis-dual-row>em{font-style:normal;font-size:.7rem;text-align:right;color:#e2e8f0}
.analysis-insights>header{display:flex;align-items:center;gap:8px}
.analysis-insights>header h4{margin-right:auto}
.analysis-insight-info{width:31px;height:31px;border-radius:999px;padding:0}
.analysis-insight-explain{margin:0 0 10px;padding:9px 10px;border-radius:9px;background:#111c2e;color:#cbd5e1;font-size:.75rem;line-height:1.4}
.analysis-insight{padding:11px 12px;margin-top:8px;border:1px solid #334155;border-left-width:4px;border-radius:10px;background:#101b2d}
.analysis-insight.warning{border-left-color:#f59e0b}.analysis-insight.positive{border-left-color:#22c55e}.analysis-insight.uncertain{border-left-color:#94a3b8}.analysis-insight.neutral{border-left-color:#38bdf8}
.analysis-insight strong{display:block;margin-bottom:5px}.analysis-insight p{margin:4px 0;font-size:.8rem;line-height:1.42}.analysis-insight small{display:block;margin-top:6px;color:#94a3b8}
.analysis-detail-table .analysis-table-wrap{max-height:none}
.analysis-detail-table>.analysis-cluster,.analysis-detail-table>.analysis-table-wrap{border:0;padding:0;background:transparent}
#runSync.is-busy{cursor:progress;opacity:.8}
@media(max-width:760px){
 .analysis-dual-row{grid-template-columns:34px 22px minmax(70px,1fr) 50px;row-gap:5px}
 .analysis-dual-row>span:nth-of-type(2){grid-column:2}.analysis-dual-row>i:nth-of-type(2){grid-column:3}.analysis-dual-row>em:nth-of-type(2){grid-column:4}
 .analysis-detail-bars>div{grid-template-columns:minmax(78px,120px) 1fr 48px}
}


/* RC6-4 · deep analysis and semantic serve cleanup */
.serve-semantic-table thead tr:first-child th{background:#101b2d;text-align:center}
.serve-semantic-table thead tr:nth-child(2) th{background:#16243a}
.analysis-triple-bars{display:grid;gap:8px}
.analysis-triple-row{
  display:grid;
  grid-template-columns:38px 24px minmax(80px,1fr) 54px 24px minmax(80px,1fr) 54px 24px minmax(80px,1fr) 54px;
  gap:7px;align-items:center
}
.analysis-triple-row>span{font-size:.68rem;color:#94a3b8}
.analysis-triple-row>i{height:11px;background:#111827;border:1px solid #273449;border-radius:999px;overflow:hidden}
.analysis-triple-row>i>b{display:block;height:100%;background:linear-gradient(90deg,#0284c7,#22d3ee);border-radius:inherit}
.analysis-triple-row>em{font-style:normal;font-size:.7rem;text-align:right}
.analysis-target-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px}
.analysis-compare-deltas{grid-column:1/-1!important;display:grid!important;grid-template-columns:repeat(auto-fit,minmax(130px,1fr))!important;gap:8px!important;border-top:1px solid #334155!important;padding-top:10px!important}
.analysis-compare-deltas>span{display:flex;justify-content:space-between;gap:8px;padding:8px;border:1px solid #334155;border-radius:9px;background:#101b2d}
.analysis-compare-deltas strong.up{color:#4ade80}.analysis-compare-deltas strong.down{color:#fb7185}.analysis-compare-deltas strong.same{color:#cbd5e1}.analysis-compare-deltas strong.na{color:#94a3b8}
.analysis-confidence-legend{margin-top:10px;padding:8px 10px;border:1px dashed #475569;border-radius:9px;color:#94a3b8;font-size:.72rem;line-height:1.4}
@media(max-width:900px){
  .analysis-triple-row{grid-template-columns:34px 22px minmax(60px,1fr) 48px}
  .analysis-triple-row>span:nth-of-type(2){grid-column:2}.analysis-triple-row>i:nth-of-type(2){grid-column:3}.analysis-triple-row>em:nth-of-type(2){grid-column:4}
  .analysis-triple-row>span:nth-of-type(3){grid-column:2}.analysis-triple-row>i:nth-of-type(3){grid-column:3}.analysis-triple-row>em:nth-of-type(3){grid-column:4}
}
@media print{
  .analysis-insights,.analysis-detail-viz,.analysis-detail-table{break-inside:avoid}
  .analysis-insight{background:#fff!important;color:#111!important;border-color:#bbb!important}
  .analysis-detail-bars i,.analysis-triple-row>i{border-color:#999!important;background:#eee!important}
}

/* RC6-5 · compact metadata editor in match library */
.match-library-date-wrap{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;white-space:nowrap}
.library-edit-meta{width:26px!important;height:26px!important;min-width:26px!important;min-height:26px!important;padding:0!important;border-radius:7px!important;font-size:.82rem!important;line-height:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;background:#111c2e!important;border:1px solid #41506a!important;color:#c9d5e5!important}
.library-edit-meta:hover,.library-edit-meta:focus-visible{border-color:#38bdf8!important;color:#e0f2fe!important;background:#13243a!important}
.match-library-date-wrap .match-library-date{margin:0!important}
@media(max-width:700px){.library-edit-meta{width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important}}


/* RC6-6 · ANALYSIS-REPORT2 / ANALYSIS-SHARE1 */
.analysis-dashboard-head{gap:12px}
.analysis-dashboard-actions{display:flex;align-items:flex-start;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.analysis-dashboard-actions button{white-space:nowrap}
.analysis-result-window.team-report-mode{max-width:min(1120px,96vw)}
.team-report{
  width:min(100%,980px);margin:0 auto;padding:24px;border:1px solid #334155;border-radius:18px;
  background:#0b1627;color:#eaf2fb;display:grid;gap:18px
}
.team-report-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;padding-bottom:16px;border-bottom:1px solid #2a3b52}
.team-report-head h1{margin:5px 0 4px;font-size:clamp(1.45rem,2.5vw,2rem)}
.team-report-head p{margin:0;color:#9fb3c8}
.team-report-brand{color:#38bdf8;font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.team-report-badge{padding:6px 10px;border:1px solid #2f6b8e;border-radius:999px;background:#0c2940;color:#bfe9ff;font-size:.72rem;font-weight:800;white-space:nowrap}
.team-report-intro{padding:14px 16px;border-radius:13px;background:#102237;border:1px solid #27405a}
.team-report-intro strong{font-size:1.05rem}.team-report-intro p{margin:5px 0 0;color:#b4c5d7}
.team-report-columns{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.team-report-columns>div,.team-report-training,.team-report-metrics,.team-report-rotations{padding:16px;border-radius:14px;border:1px solid #31445b;background:#101d2e}
.team-report h2{font-size:1rem;margin:0 0 11px;color:#f8fafc}
.team-report-columns article{padding:11px 12px;border-radius:11px;background:#0c1726;border:1px solid #27384c;margin-top:9px}
.team-report-columns article h4{margin:0 0 5px;font-size:.92rem}.team-report-columns article p{margin:0;color:#b9c8d8;line-height:1.45}
.team-report-good{border-color:#245b45!important}.team-report-focus{border-color:#65433c!important}
.team-report-training ol{margin:0;padding-left:1.3rem;display:grid;gap:8px}.team-report-training li{color:#d9e7f4;line-height:1.45}
.team-report-metrics>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.team-report-metrics article{min-width:0;padding:13px;border-radius:11px;background:#0b1726;border:1px solid #2d4158;display:flex;flex-direction:column;gap:4px}
.team-report-metrics article strong{font-size:1.35rem;color:#fff}.team-report-metrics article span{font-size:.78rem;font-weight:800}.team-report-metrics article small{font-size:.68rem;color:#8298ae}
.team-report-rotations>div{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
.team-report-rotations>div>span{display:grid;grid-template-columns:auto auto;align-items:center;gap:3px 8px;padding:9px;border-radius:10px;background:#0b1726;border:1px solid #293c51}
.team-report-rotations b{font-size:.9rem}.team-report-rotations em{font-style:normal;font-weight:900;text-align:right}.team-report-rotations em.good{color:#4ade80}.team-report-rotations em.bad{color:#fb7185}.team-report-rotations em.even{color:#cbd5e1}
.team-report-rotations small{grid-column:1/-1;color:#859bb1}.team-report-rotations p{font-size:.7rem;color:#879db2;margin:8px 0 0}
.team-report footer{font-size:.7rem;color:#74899e;border-top:1px solid #2b3c50;padding-top:12px;line-height:1.4}
.team-report-status{margin:12px auto 0;width:min(100%,980px);padding:8px 10px;border-radius:9px;background:#0f2438;color:#c8e9ff;border:1px solid #2f5979;font-size:.76rem}
.analysis-result-backdrop.team-report-mode #analysisResultActions{flex-wrap:wrap}

@media(max-width:760px){
 .team-report{padding:15px}.team-report-columns{grid-template-columns:1fr}
 .team-report-metrics>div{grid-template-columns:repeat(2,minmax(0,1fr))}
 .team-report-rotations>div{grid-template-columns:repeat(3,minmax(0,1fr))}
 .team-report-head{flex-direction:column}.team-report-badge{align-self:flex-start}
}
@media print{
 body *{visibility:hidden!important}
 .analysis-result-backdrop:not([hidden]),.analysis-result-backdrop:not([hidden]) *{visibility:visible!important}
 .analysis-result-backdrop{position:absolute!important;inset:0!important;background:#fff!important;padding:0!important}
 .analysis-result-window{position:static!important;max-width:none!important;width:100%!important;height:auto!important;box-shadow:none!important;border:0!important;background:#fff!important;color:#111!important}
 .analysis-result-window>header,.analysis-result-window>footer{display:none!important}
 .analysis-result-window>main{overflow:visible!important;padding:0!important}
 .team-report{width:100%!important;max-width:none!important;border:0!important;border-radius:0!important;background:#fff!important;color:#111!important;padding:10mm!important;gap:12px!important}
 .team-report *{color:#111!important;background:#fff!important;box-shadow:none!important}
 .team-report-head,.team-report footer{border-color:#999!important}
 .team-report-columns>div,.team-report-training,.team-report-metrics,.team-report-rotations,.team-report-columns article,.team-report-metrics article,.team-report-rotations>div>span,.team-report-intro{border-color:#aaa!important}
 .team-report-status{display:none!important}
}


/* RC6-6 rebuild · ANALYSIS-REPORT2A glossary */
.team-report-glossary{padding:16px;border-radius:14px;border:1px solid #31445b;background:#101d2e}
.team-report-glossary h2{margin:0 0 10px}
.team-report-glossary dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;margin:0}
.team-report-glossary dl>div{display:grid;grid-template-columns:auto 1fr;gap:8px;padding:8px 10px;border-radius:10px;background:#0b1726;border:1px solid #293c51}
.team-report-glossary dt{font-weight:900;color:#eaf2fb}
.team-report-glossary dd{margin:0;color:#aebfd0;line-height:1.35}
@media print{
 .team-report-glossary{break-inside:avoid}
 .team-report-glossary dl{grid-template-columns:repeat(2,1fr)}
}


/* RC6-6 · Team-Report visual polish */
.team-report{
  background:
    radial-gradient(circle at 88% 2%,rgba(56,189,248,.13),transparent 25%),
    radial-gradient(circle at 8% 96%,rgba(34,197,94,.08),transparent 24%),
    #091525!important;
  border-color:#35506c!important;
  box-shadow:0 18px 60px rgba(0,0,0,.28)
}
.team-report-head{
  margin:-24px -24px 0!important;
  padding:22px 24px 19px!important;
  border-radius:17px 17px 0 0;
  border-bottom:1px solid #245879!important;
  background:linear-gradient(110deg,#0b3150 0%,#0d466a 52%,#12617f 100%)
}
.team-report-brand{color:#d7f4ff!important}
.team-report-head h1{color:#fff!important}
.team-report-head p{color:#cae6f5!important}
.team-report-badge{
  background:#e0f2fe!important;
  border-color:#7dd3fc!important;
  color:#075985!important
}
.team-report-intro{
  background:linear-gradient(100deg,rgba(14,116,144,.22),rgba(30,64,175,.13))!important;
  border-color:#2b6f91!important;
  box-shadow:inset 4px 0 0 #38bdf8
}
.team-report-good{
  background:linear-gradient(160deg,#10281f 0%,#102019 100%)!important;
  border-color:#2d7555!important;
  box-shadow:inset 4px 0 0 #22c55e
}
.team-report-good h2{color:#86efac!important}
.team-report-good article{border-color:#285b45!important;background:#0d1d17!important}
.team-report-focus{
  background:linear-gradient(160deg,#302219 0%,#251b17 100%)!important;
  border-color:#8b5b35!important;
  box-shadow:inset 4px 0 0 #f59e0b
}
.team-report-focus h2{color:#fcd34d!important}
.team-report-focus article{border-color:#63452c!important;background:#211812!important}
.team-report-training{
  background:linear-gradient(120deg,#17243a,#18233a)!important;
  border-color:#465f8e!important;
  box-shadow:inset 4px 0 0 #818cf8
}
.team-report-training h2{color:#c7d2fe!important}
.team-report-metrics{
  background:linear-gradient(120deg,#102535,#122233)!important;
  border-color:#2d657d!important
}
.team-report-metrics h2{color:#bae6fd!important}
.team-report-metrics article:nth-child(1){border-top:3px solid #38bdf8!important}
.team-report-metrics article:nth-child(2){border-top:3px solid #22c55e!important}
.team-report-metrics article:nth-child(3){border-top:3px solid #f59e0b!important}
.team-report-metrics article:nth-child(4){border-top:3px solid #a78bfa!important}
.team-report-rotations{
  background:linear-gradient(120deg,#1b1e35,#161b2c)!important;
  border-color:#555a8d!important;
  box-shadow:inset 4px 0 0 #8b5cf6
}
.team-report-rotations h2{color:#ddd6fe!important}
.team-report-rotations>div>span{background:#11182a!important;border-color:#3d4268!important}
.team-report-glossary{
  background:linear-gradient(120deg,#122332,#10202d)!important;
  border-color:#355e78!important;
  box-shadow:inset 4px 0 0 #06b6d4
}
.team-report-glossary h2{color:#a5f3fc!important}
.team-report-glossary dl>div{background:#0c1925!important;border-color:#2a485b!important}
.team-report footer{color:#8ba3b9!important}

/* Color-preserving, ink-friendly PDF/print version. */
@media print{
  .team-report,.team-report *{
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important
  }
  .team-report{
    background:#fff!important;
    color:#172033!important;
    border:0!important;
    box-shadow:none!important
  }
  .team-report-head{
    margin:-10mm -10mm 0!important;
    padding:9mm 10mm 7mm!important;
    background:linear-gradient(110deg,#075985,#0e7490)!important;
    border-bottom:0!important;
    border-radius:0!important
  }
  .team-report-head h1,.team-report-head p,.team-report-brand{color:#fff!important}
  .team-report-badge{
    background:#e0f2fe!important;
    border-color:#7dd3fc!important;
    color:#075985!important
  }
  .team-report-intro{
    background:#eff9ff!important;
    border:1px solid #7dd3fc!important;
    border-left:5px solid #0284c7!important
  }
  .team-report-intro strong,.team-report-intro p{color:#164e63!important}
  .team-report-good{
    background:#f0fdf4!important;
    border:1px solid #86efac!important;
    border-left:5px solid #16a34a!important;
    box-shadow:none!important
  }
  .team-report-good h2{color:#166534!important}
  .team-report-good article{background:#fff!important;border-color:#bbf7d0!important}
  .team-report-focus{
    background:#fffbeb!important;
    border:1px solid #fcd34d!important;
    border-left:5px solid #d97706!important;
    box-shadow:none!important
  }
  .team-report-focus h2{color:#92400e!important}
  .team-report-focus article{background:#fff!important;border-color:#fde68a!important}
  .team-report-training{
    background:#eef2ff!important;
    border:1px solid #a5b4fc!important;
    border-left:5px solid #6366f1!important;
    box-shadow:none!important
  }
  .team-report-training h2{color:#3730a3!important}
  .team-report-metrics{
    background:#f0f9ff!important;
    border:1px solid #bae6fd!important
  }
  .team-report-metrics h2{color:#075985!important}
  .team-report-metrics article{
    background:#fff!important;
    border-color:#cbd5e1!important
  }
  .team-report-metrics article strong,.team-report-metrics article span{color:#172033!important}
  .team-report-metrics article small{color:#52647a!important}
  .team-report-rotations{
    background:#f5f3ff!important;
    border:1px solid #c4b5fd!important;
    border-left:5px solid #7c3aed!important;
    box-shadow:none!important
  }
  .team-report-rotations h2{color:#5b21b6!important}
  .team-report-rotations>div>span{
    background:#fff!important;
    border-color:#ddd6fe!important
  }
  .team-report-rotations em.good{color:#15803d!important}
  .team-report-rotations em.bad{color:#b91c1c!important}
  .team-report-rotations em.even{color:#475569!important}
  .team-report-glossary{
    background:#ecfeff!important;
    border:1px solid #a5f3fc!important;
    border-left:5px solid #0891b2!important;
    box-shadow:none!important
  }
  .team-report-glossary h2{color:#155e75!important}
  .team-report-glossary dl>div{
    background:#fff!important;
    border-color:#bae6fd!important
  }
  .team-report-glossary dt{color:#0f172a!important}
  .team-report-glossary dd{color:#475569!important}
  .team-report footer{color:#64748b!important}
}


/* RC6-6 report corrections: header metadata + report branching */
.team-report-head-main{min-width:0;flex:1}
.team-report-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:13px}
.team-report-meta>span{display:flex;flex-direction:column;gap:2px;min-width:112px;padding:7px 10px;border-radius:10px;background:rgba(3,20,34,.26);border:1px solid rgba(186,230,253,.28)}
.team-report-meta small{font-size:.62rem;text-transform:uppercase;letter-spacing:.05em;color:#bae6fd}
.team-report-meta strong{font-size:.78rem;color:#fff;line-height:1.25}
.analysis-report-menu{max-width:820px;margin:10px auto;padding:22px;border:1px solid #34485e;border-radius:16px;background:#0d1b2c}
.analysis-report-menu h3{margin:0 0 6px;font-size:1.35rem}
.analysis-report-menu>p{margin:0 0 18px;color:#9fb2c8;line-height:1.45}
.analysis-report-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.analysis-report-choice-grid button{min-height:150px;padding:20px;text-align:left;border-radius:15px;border:1px solid #3b5875;background:linear-gradient(145deg,#132940,#102033);display:flex;flex-direction:column;gap:9px}
.analysis-report-choice-grid button:hover{border-color:#58bce8;transform:translateY(-1px)}
.analysis-report-choice-grid button strong{font-size:1.1rem;color:#fff}
.analysis-report-choice-grid button span{font-size:.85rem;line-height:1.45;color:#a9bdd1}
.analysis-report-choice-grid button:first-child{box-shadow:inset 4px 0 0 #22c55e}
.analysis-report-choice-grid button:last-child{box-shadow:inset 4px 0 0 #38bdf8}
@media(max-width:680px){
  .analysis-report-choice-grid{grid-template-columns:1fr}
  .analysis-report-choice-grid button{min-height:120px}
  .team-report-meta>span{min-width:calc(50% - 4px)}
}

/* Fix print header: child containers must stay transparent, otherwise white text disappeared on white rectangles. */
@media print{
  .team-report *{
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important;
    background-color:transparent!important
  }
  .team-report-head,.team-report-head-main{background:linear-gradient(110deg,#075985,#0e7490)!important}
  .team-report-head-main{background-color:transparent!important}
  .team-report-meta>span{background:rgba(255,255,255,.12)!important;border-color:rgba(255,255,255,.35)!important}
  .team-report-meta small{color:#dff6ff!important}
  .team-report-meta strong{color:#fff!important}
  .team-report-good article,.team-report-focus article,.team-report-metrics article,.team-report-rotations>div>span,.team-report-glossary dl>div{background:#fff!important}
  .team-report-intro{background:#eff9ff!important}
  .team-report-good{background:#f0fdf4!important}
  .team-report-focus{background:#fffbeb!important}
  .team-report-training{background:#eef2ff!important}
  .team-report-metrics{background:#f0f9ff!important}
  .team-report-rotations{background:#f5f3ff!important}
  .team-report-glossary{background:#ecfeff!important}
}


/* RC6-8 · UI-REPORT1 compact responsive chooser */
.analysis-result-backdrop.report-menu-mode .analysis-result-window{
  width:clamp(520px,65vw,780px);
  height:auto;
  max-height:min(620px,calc(100dvh - 32px));
  grid-template-rows:auto auto auto;
}
.analysis-result-backdrop.report-menu-mode .analysis-result-window>main{overflow:visible;padding:18px}
.analysis-result-backdrop.report-menu-mode .analysis-report-menu{
  width:100%;max-width:none;margin:0;padding:18px;
}
.analysis-result-backdrop.report-menu-mode .analysis-report-choice-grid button{
  min-height:132px;padding:18px;
}
@media(max-width:620px){
  .analysis-result-backdrop.report-menu-mode{padding:10px}
  .analysis-result-backdrop.report-menu-mode .analysis-result-window{
    width:calc(100vw - 20px);height:auto;max-height:calc(100dvh - 20px);border-radius:14px;
  }
  .analysis-result-backdrop.report-menu-mode .analysis-report-choice-grid{grid-template-columns:1fr}
  .analysis-result-backdrop.report-menu-mode .analysis-report-choice-grid button{min-height:104px}
}

/* RC6-8 · ANALYSIS-REPORT3 dedicated coach report */
.analysis-result-backdrop.trainer-report-mode .analysis-result-window{max-width:min(1180px,calc(100vw - 24px))}
.trainer-report{
  width:min(100%,1040px);margin:0 auto;display:grid;gap:16px;padding:22px;
  background:#0b1627;color:#e8f1fb;border:1px solid #34506a;border-radius:17px
}
.trainer-report h2{margin:0 0 11px;font-size:1.08rem;color:#f8fafc}
.trainer-report h3{margin:0}
.trainer-report-head{
  margin:-22px -22px 0;padding:22px;border-radius:16px 16px 0 0;
  display:flex;justify-content:space-between;gap:20px;align-items:flex-start;
  background:linear-gradient(110deg,#12375a,#0d5571 62%,#0f6b78)
}
.trainer-report-brand{font-size:.7rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#d8f3ff}
.trainer-report-head h1{margin:5px 0 12px;font-size:clamp(1.5rem,2.4vw,2rem);color:#fff}
.trainer-report-badge{padding:6px 10px;border-radius:999px;background:#dbeafe;color:#1e3a8a;font-size:.72rem;font-weight:900;white-space:nowrap}
.trainer-report-meta,.trainer-report-summary>div,.trainer-phase-metrics,.trainer-opponent-metrics{
  display:flex;flex-wrap:wrap;gap:8px
}
.trainer-report-meta>span,.trainer-report-summary span,.trainer-phase-metrics span,.trainer-opponent-metrics span{
  display:flex;flex-direction:column;gap:2px;min-width:115px;padding:8px 10px;border:1px solid #37536c;border-radius:10px;background:#0c1c2d
}
.trainer-report-head .trainer-report-meta>span{background:rgba(3,20,34,.25);border-color:rgba(255,255,255,.25)}
.trainer-report-meta small,.trainer-report-summary small,.trainer-phase-metrics small,.trainer-opponent-metrics small{
  font-size:.62rem;text-transform:uppercase;letter-spacing:.04em;color:#8fb0c9
}
.trainer-report-meta strong,.trainer-report-summary strong,.trainer-phase-metrics strong,.trainer-opponent-metrics strong{font-size:.9rem;color:#fff}
.trainer-report-head .trainer-report-meta small{color:#c3e8f7}
.trainer-report-summary,.trainer-report-priorities,.trainer-report-phases,.trainer-report-rotations,
.trainer-report-techniques,.trainer-report-context-grid>div,.trainer-report-training{
  padding:16px;border:1px solid #31475e;border-radius:14px;background:#101d2e
}
.trainer-report-summary{border-left:4px solid #38bdf8}
.trainer-report-priorities{border-left:4px solid #f59e0b}
.trainer-report-priorities>article{
  display:grid;grid-template-columns:34px 1fr;gap:12px;padding:13px 0;border-bottom:1px solid #27394c
}
.trainer-report-priorities>article:last-child{border-bottom:0;padding-bottom:0}
.trainer-priority-no{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#78350f;color:#fde68a;font-weight:900}
.trainer-report-priorities article h3{font-size:1rem;color:#fcd34d;margin-bottom:4px}
.trainer-report-priorities article>div>strong{font-size:.86rem;color:#f8fafc}
.trainer-report-priorities p{margin:6px 0;color:#b7c7d8;line-height:1.43}
.trainer-report-priorities small{color:#7891aa}
.trainer-next{padding:7px 9px;border-radius:8px;background:#0b1726}
.trainer-report-phases{border-left:4px solid #22c55e}
.trainer-report-phases>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.trainer-report-phases article{padding:13px;border-radius:12px;background:#0b1726;border:1px solid #2b4558}
.trainer-report-phases article h3{font-size:.92rem;color:#bbf7d0;margin-bottom:9px}
.trainer-report-phases article p{font-size:.8rem;color:#aebfd0;line-height:1.4;margin:9px 0 0}
.trainer-report-rotations{border-left:4px solid #8b5cf6}
.trainer-report-table-wrap{overflow:auto}
.trainer-report table{width:100%;border-collapse:collapse;font-size:.76rem}
.trainer-report th,.trainer-report td{padding:7px 9px;border-bottom:1px solid #2b3c50;text-align:left;white-space:nowrap}
.trainer-report th{color:#9fb7cb;font-weight:800}
.trainer-report td.pos{color:#4ade80;font-weight:900}.trainer-report td.neg{color:#fb7185;font-weight:900}
.trainer-report-help{margin:8px 0 0;font-size:.7rem;color:#8198ad;line-height:1.4}
.trainer-report-techniques{border-left:4px solid #06b6d4}
.trainer-report-techniques>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.trainer-report-techniques article{padding:12px;border:1px solid #2d4c61;border-radius:11px;background:#0b1726}
.trainer-report-techniques article>strong{font-size:1.15rem;color:#67e8f9}
.trainer-report-techniques article h3{font-size:.9rem;margin:3px 0}.trainer-report-techniques article span{font-size:.69rem;color:#8eabc0}
.trainer-report-techniques article p{font-size:.74rem;line-height:1.4;color:#aebfd0;margin:8px 0 0}
.trainer-report-context-grid{display:grid;grid-template-columns:1.3fr .7fr;gap:12px}
.trainer-report-context-grid>div:first-child{border-left:4px solid #60a5fa}
.trainer-report-context-grid>div:last-child{border-left:4px solid #f97316}
.trainer-report-training{border-left:4px solid #ec4899}
.trainer-report-training ol,.trainer-report-training ul{margin:0;padding-left:1.3rem;display:grid;gap:6px;color:#d5e1ed}
.trainer-report-training h3{font-size:.86rem;margin:14px 0 7px;color:#fbcfe8}
.trainer-report footer{padding-top:10px;border-top:1px solid #2b3c50;font-size:.7rem;color:#7f95aa}

@media(max-width:820px){
  .trainer-report-phases>div{grid-template-columns:1fr}
  .trainer-report-techniques>div{grid-template-columns:repeat(2,minmax(0,1fr))}
  .trainer-report-context-grid{grid-template-columns:1fr}
}
@media(max-width:560px){
  .trainer-report{padding:14px}
  .trainer-report-head{margin:-14px -14px 0;padding:16px;flex-direction:column}
  .trainer-report-techniques>div{grid-template-columns:1fr}
}

/* RC6-8 print: dedicated report pages and colour accents */
@media print{
  .analysis-result-backdrop.trainer-report-mode .trainer-report{
    width:100%!important;max-width:none!important;margin:0!important;padding:8mm!important;
    background:#fff!important;color:#172033!important;border:0!important;border-radius:0!important
  }
  .trainer-report,.trainer-report *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  .trainer-report-head{margin:-8mm -8mm 0!important;padding:8mm!important;background:linear-gradient(110deg,#075985,#0e7490)!important;border-radius:0!important}
  .trainer-report-head h1,.trainer-report-brand,.trainer-report-head .trainer-report-meta strong{color:#fff!important}
  .trainer-report-head .trainer-report-meta small{color:#dff6ff!important}
  .trainer-report-summary,.trainer-report-priorities,.trainer-report-phases,.trainer-report-rotations,.trainer-report-techniques,.trainer-report-context-grid>div,.trainer-report-training{
    background:#fff!important;color:#111!important;box-shadow:none!important;break-inside:avoid
  }
  .trainer-report-priorities{background:#fffbeb!important;border-color:#f59e0b!important}
  .trainer-report-phases{background:#f0fdf4!important;border-color:#22c55e!important}
  .trainer-report-rotations{background:#f5f3ff!important;border-color:#8b5cf6!important}
  .trainer-report-techniques{background:#ecfeff!important;border-color:#06b6d4!important}
  .trainer-report-training{background:#fdf2f8!important;border-color:#ec4899!important}
  .trainer-report h2,.trainer-report h3,.trainer-report strong,.trainer-report td,.trainer-report li{color:#172033!important}
  .trainer-report p,.trainer-report small,.trainer-report span{color:#475569!important}
  .trainer-report table{font-size:8pt}
  .trainer-report th,.trainer-report td{border-color:#cbd5e1!important}
}


/* RC6-8 rebuild · trainer PDF pagination/contrast fix */
@media print{
  /* Let the long report flow naturally across pages. Keeping whole sections
     together caused large white gaps and almost-empty pages. */
  .trainer-report-summary,
  .trainer-report-priorities,
  .trainer-report-phases,
  .trainer-report-rotations,
  .trainer-report-techniques,
  .trainer-report-context-grid,
  .trainer-report-context-grid>div,
  .trainer-report-training{
    break-inside:auto!important;
    page-break-inside:auto!important;
  }

  /* Keep only small semantic units together. */
  .trainer-report-priorities>article,
  .trainer-report-phases article,
  .trainer-report-techniques article,
  .trainer-report-training li,
  .trainer-report table tr{
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }

  /* Do not carry screen dark tiles into the light print report. */
  .trainer-report-summary span,
  .trainer-phase-metrics span,
  .trainer-opponent-metrics span{
    background:#fff!important;
    border-color:#cbd5e1!important;
  }
  .trainer-report-summary span small,
  .trainer-phase-metrics span small,
  .trainer-opponent-metrics span small{
    color:#64748b!important;
  }
  .trainer-report-summary span strong,
  .trainer-phase-metrics span strong,
  .trainer-opponent-metrics span strong{
    color:#0f172a!important;
  }

  /* Header metadata remains readable on the coloured header. */
  .trainer-report-head .trainer-report-meta>span{
    background:rgba(255,255,255,.14)!important;
    border-color:rgba(255,255,255,.42)!important;
  }
  .trainer-report-head .trainer-report-meta small{color:#dff6ff!important}
  .trainer-report-head .trainer-report-meta strong{color:#fff!important}

  /* More economical paper spacing so page 1 contains actual analysis content. */
  .trainer-report{gap:4mm!important}
  .trainer-report-head{padding:6mm 7mm!important;margin:-8mm -8mm 0!important}
  .trainer-report-head h1{margin:2mm 0 3mm!important}
  .trainer-report-summary,
  .trainer-report-priorities,
  .trainer-report-phases,
  .trainer-report-rotations,
  .trainer-report-techniques,
  .trainer-report-context-grid>div,
  .trainer-report-training{
    padding:4mm!important;
    border-radius:3mm!important;
  }
  .trainer-report-priorities>article{padding:3mm 0!important}
  .trainer-report-phases>div{gap:2.5mm!important}
  .trainer-report-phases article{padding:3mm!important}
  .trainer-report-techniques>div{gap:2.5mm!important}
  .trainer-report-techniques article{padding:3mm!important}

  /* Prevent the screen two-column context grid from creating awkward print
     fragmentation; on paper, stack the two coach sections. */
  .trainer-report-context-grid{
    display:block!important;
  }
  .trainer-report-context-grid>div+div{margin-top:4mm!important}

  /* Repeat table headers on subsequent pages. */
  .trainer-report thead{display:table-header-group!important}
  .trainer-report tfoot{display:table-footer-group!important}
}


/* RC6-8 bugfix · REPORT-PRINT1 / REPORT-FORMAT1 */
@media print{
  html,body,.team-report,.trainer-report{
    font-variant-ligatures:none!important;
    font-feature-settings:"liga" 0,"clig" 0!important;
  }

  /* Long reports must be normal block flow on paper; grid was still causing
     oversized blank regions in Chromium print pagination. */
  .trainer-report,.team-report{
    display:block!important;
  }

  /* Player report: compress spacing and allow glossary to use the remaining
     space on page 2 instead of forcing a separate third page. */
  .team-report{
    padding:7mm!important;
  }
  .team-report>*+*{margin-top:3mm!important}
  .team-report-columns,.team-report-metrics>div,.team-report-rotations>div,.team-report-glossary dl{
    gap:2.2mm!important;
  }
  .team-report-columns>div,.team-report-training,.team-report-metrics,.team-report-rotations,.team-report-glossary{
    padding:3.5mm!important;
    break-inside:auto!important;
    page-break-inside:auto!important;
  }
  .team-report-columns article,.team-report-metrics article,.team-report-rotations>div>span,.team-report-glossary dl>div{
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }
  .team-report-glossary dl{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  .team-report-glossary dl>div{
    padding:2.2mm!important;
    font-size:9pt!important;
  }
  .team-report footer{margin-top:3mm!important}

  /* Trainer report print contrast: all inner cards are light on paper. */
  .trainer-next,
  .trainer-report-phases article,
  .trainer-report-techniques article{
    background:#fff!important;
    border-color:#cbd5e1!important;
    color:#172033!important;
  }
  .trainer-next,.trainer-next *,.trainer-report-phases article *,.trainer-report-techniques article *{
    color:#172033!important;
  }
  .trainer-report-priorities article>div>strong{color:#172033!important}
}


/* RC6-8 report layout redesign · REPORT-LAYOUT1 / REPORT-PLAYER1 / REPORT-TRAINER1 */
.analysis-report-choice-grid{align-items:stretch}
.analysis-report-player-card,.analysis-report-trainer-card{
  min-height:156px;padding:18px;border-radius:15px;border:1px solid #3b5875;
  background:linear-gradient(145deg,#132940,#102033);text-align:left
}
.analysis-report-player-card{
  display:flex!important;flex-direction:column;justify-content:flex-start;gap:9px;
  box-shadow:inset 4px 0 0 #22c55e
}
.analysis-report-trainer-card{
  display:flex;flex-direction:column;gap:9px;box-shadow:inset 4px 0 0 #38bdf8
}
.analysis-report-player-card strong,.analysis-report-trainer-card>strong{font-size:1.1rem;color:#fff}
.analysis-report-player-card span,.analysis-report-trainer-card>span{font-size:.85rem;line-height:1.45;color:#a9bdd1}
.analysis-report-trainer-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:auto}
.analysis-report-trainer-actions button{
  min-height:38px!important;padding:8px 10px!important;border-radius:9px!important;
  text-align:center!important;font-weight:800;background:#0a2034!important
}
.analysis-report-trainer-actions button:first-child{border-color:#38bdf8!important}
.analysis-report-trainer-actions button:last-child{border-color:#818cf8!important}
@media(max-width:620px){
  .analysis-report-player-card,.analysis-report-trainer-card{min-height:auto}
  .analysis-report-trainer-actions{grid-template-columns:1fr 1fr}
}

/* Trainer short report on screen */
.trainer-report-short{max-width:1040px}
.trainer-short-overview,.trainer-short-priorities,.trainer-short-phases,.trainer-short-rotation,.trainer-short-technique,.trainer-short-training{
  padding:14px;border:1px solid #31475e;border-radius:14px;background:#101d2e
}
.trainer-short-overview{border-left:4px solid #38bdf8}
.trainer-short-priorities{border-left:4px solid #f59e0b}
.trainer-short-phases{border-left:4px solid #22c55e}
.trainer-short-rotation{border-left:4px solid #8b5cf6}
.trainer-short-technique{border-left:4px solid #06b6d4}
.trainer-short-training{border-left:4px solid #ec4899}
.trainer-short-overview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.trainer-short-overview-grid span,.trainer-short-phases article span{
  display:flex;flex-direction:column;gap:2px;padding:8px;border:1px solid #37536c;border-radius:9px;background:#0c1c2d
}
.trainer-short-overview-grid small,.trainer-short-phases article small{font-size:.62rem;color:#8fb0c9;text-transform:uppercase}
.trainer-short-overview-grid strong,.trainer-short-phases article strong{color:#fff}
.trainer-short-priorities{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.trainer-short-priorities>h2{grid-column:1/-1}
.trainer-short-priorities>article{display:grid;grid-template-columns:26px 1fr;gap:8px;padding:10px;border:1px solid #5f4a2b;border-radius:10px;background:#17140e}
.trainer-short-priorities>article>b{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#78350f;color:#fde68a}
.trainer-short-priorities h3{font-size:.9rem;color:#fcd34d}.trainer-short-priorities p{font-size:.75rem;line-height:1.35;color:#b7c7d8;margin:5px 0}
.trainer-short-phases>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.trainer-short-phases article{padding:10px;border:1px solid #2b4558;border-radius:10px;background:#0b1726}
.trainer-short-phases article>div{display:flex;flex-wrap:wrap;gap:5px}.trainer-short-phases article p{font-size:.72rem;line-height:1.35;color:#aebfd0}
.trainer-short-technique>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.trainer-short-technique article{padding:9px;border:1px solid #2d4c61;border-radius:10px;background:#0b1726;display:flex;flex-direction:column}
.trainer-short-technique article>strong{font-size:1.1rem;color:#67e8f9}.trainer-short-technique article>small{color:#8eabc0}
.trainer-short-training ol{margin:0;padding-left:1.2rem}.trainer-short-training p{margin:6px 0 0;color:#b9c8d8}

/* Dedicated paper composition. Browser screen styles stay unchanged. */
@page{size:A4 portrait;margin:6mm}

@media print{
  /* Keep player wording unchanged, fit via composition rather than truncation. */
  .analysis-result-backdrop.team-report-mode .team-report{
    box-sizing:border-box!important;
    width:198mm!important;max-width:198mm!important;min-height:0!important;
    padding:0!important;margin:0 auto!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    grid-template-areas:
      "head head"
      "intro intro"
      "strengths strengths"
      "training metrics"
      "rotations glossary"
      "foot foot"!important;
    gap:2.2mm!important;
    font-size:8.25pt!important;
    line-height:1.22!important;
  }
  .team-report-head{grid-area:head!important;margin:0!important;padding:4.2mm 5mm!important;min-height:0!important}
  .team-report-head h1{font-size:16pt!important;margin:1mm 0!important}
  .team-report-head p{font-size:8.3pt!important}
  .team-report-brand{font-size:6.6pt!important}
  .team-report-meta{gap:1.5mm!important;margin-top:2mm!important}
  .team-report-meta>span{min-width:0!important;padding:1.5mm 2mm!important}
  .team-report-meta small{font-size:5.7pt!important}.team-report-meta strong{font-size:7.2pt!important}
  .team-report-badge{font-size:6.5pt!important;padding:1.3mm 2.4mm!important;background:#e0f2fe!important;color:#075985!important}
  .team-report-intro{grid-area:intro!important;padding:2.4mm 3mm!important;margin:0!important}
  .team-report-intro strong{font-size:9pt!important}.team-report-intro p{font-size:8pt!important;margin:1mm 0 0!important}
  .team-report-columns{grid-area:strengths!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:2.2mm!important;margin:0!important}
  .team-report-columns>div{padding:2.5mm!important;margin:0!important}
  .team-report h2{font-size:9pt!important;margin:0 0 1.5mm!important}
  .team-report-columns article{padding:1.8mm 2.2mm!important;margin-top:1.4mm!important}
  .team-report-columns article h4{font-size:7.9pt!important;margin:0 0 .7mm!important}
  .team-report-columns article p{font-size:7.7pt!important;line-height:1.24!important}
  .team-report-training{grid-area:training!important;padding:2.6mm!important;margin:0!important}
  .team-report-training ol{font-size:7.6pt!important;line-height:1.27!important;gap:1mm!important;padding-left:4mm!important}
  .team-report-metrics{grid-area:metrics!important;padding:2.6mm!important;margin:0!important}
  .team-report-metrics>div{grid-template-columns:1fr 1fr!important;gap:1.5mm!important}
  .team-report-metrics article{padding:1.8mm!important}
  .team-report-metrics article strong{font-size:12pt!important}.team-report-metrics article span{font-size:6.7pt!important;line-height:1.18!important}.team-report-metrics article small{font-size:5.8pt!important}
  .team-report-rotations{grid-area:rotations!important;padding:2.6mm!important;margin:0!important}
  .team-report-rotations>div{grid-template-columns:repeat(3,1fr)!important;gap:1.4mm!important}
  .team-report-rotations>div>span{padding:1.7mm!important}
  .team-report-rotations b,.team-report-rotations em{font-size:7.8pt!important}.team-report-rotations small,.team-report-rotations p{font-size:5.8pt!important}
  .team-report-glossary{grid-area:glossary!important;padding:2.6mm!important;margin:0!important}
  .team-report-glossary dl{grid-template-columns:1fr 1fr!important;gap:1.3mm!important}
  .team-report-glossary dl>div{grid-template-columns:auto 1fr!important;gap:1.2mm!important;padding:1.5mm!important;font-size:6.5pt!important;line-height:1.18!important}
  .team-report-glossary dt{font-size:6.7pt!important}.team-report-glossary dd{font-size:6.4pt!important}
  .team-report footer{grid-area:foot!important;margin:0!important;padding-top:1.8mm!important;font-size:5.8pt!important}
  .team-report>*{break-inside:avoid!important;page-break-inside:avoid!important}

  /* Trainer short report = one-page working sheet. */
  .analysis-result-backdrop.trainer-report-mode.trainer-short-mode .trainer-report-short{
    width:198mm!important;max-width:198mm!important;margin:0!important;padding:0!important;
    display:grid!important;
    grid-template-columns:1.08fr .92fr!important;
    grid-template-areas:
      "head head"
      "overview overview"
      "priority phase"
      "rotation rotation"
      "tech training"
      "foot foot"!important;
    gap:2.1mm!important;font-size:7.7pt!important;line-height:1.2!important
  }
  .trainer-report-short .trainer-report-head{grid-area:head!important;margin:0!important;padding:4mm 5mm!important}
  .trainer-report-short .trainer-report-head h1{font-size:15.5pt!important;margin:1mm 0 2mm!important}
  .trainer-report-short .trainer-short-overview{grid-area:overview!important}
  .trainer-report-short .trainer-short-priorities{grid-area:priority!important}
  .trainer-report-short .trainer-short-phases{grid-area:phase!important}
  .trainer-report-short .trainer-short-rotation{grid-area:rotation!important}
  .trainer-report-short .trainer-short-technique{grid-area:tech!important}
  .trainer-report-short .trainer-short-training{grid-area:training!important}
  .trainer-report-short>footer{grid-area:foot!important}
  .trainer-report-short .trainer-short-overview,.trainer-report-short .trainer-short-priorities,.trainer-report-short .trainer-short-phases,.trainer-report-short .trainer-short-rotation,.trainer-report-short .trainer-short-technique,.trainer-report-short .trainer-short-training{padding:2.5mm!important;margin:0!important;background:#fff!important;color:#172033!important}
  .trainer-report-short h2{font-size:9pt!important;margin:0 0 1.5mm!important}
  .trainer-short-overview-grid{grid-template-columns:repeat(4,1fr)!important;gap:1.5mm!important}
  .trainer-short-overview-grid span,.trainer-short-phases article span{padding:1.5mm!important;background:#fff!important;border-color:#cbd5e1!important}
  .trainer-short-overview-grid small,.trainer-short-phases article small{font-size:5.5pt!important;color:#64748b!important}
  .trainer-short-overview-grid strong,.trainer-short-phases article strong{font-size:7.6pt!important;color:#172033!important}
  .trainer-short-priorities{grid-template-columns:1fr!important;gap:1.2mm!important}
  .trainer-short-priorities>article{padding:1.6mm!important;grid-template-columns:6mm 1fr!important;background:#fff!important;border-color:#fde68a!important}
  .trainer-short-priorities>article>b{width:5mm!important;height:5mm!important;font-size:6.5pt!important}
  .trainer-short-priorities h3{font-size:7.6pt!important}.trainer-short-priorities article>div>strong{font-size:6.8pt!important;color:#172033!important}.trainer-short-priorities p{font-size:6.6pt!important;line-height:1.18!important;color:#475569!important;margin:.8mm 0!important}
  .trainer-short-phases>div{grid-template-columns:1fr!important;gap:1.2mm!important}
  .trainer-short-phases article{padding:1.5mm!important;background:#fff!important;border-color:#bbf7d0!important}
  .trainer-short-phases article h3{font-size:7.3pt!important}.trainer-short-phases article p{font-size:6.3pt!important;line-height:1.18!important;margin:1mm 0 0!important;color:#475569!important}
  .trainer-report-short table{font-size:6.7pt!important}.trainer-report-short th,.trainer-report-short td{padding:1.2mm 1.6mm!important}
  .trainer-short-technique>div{grid-template-columns:1fr 1fr!important;gap:1.2mm!important}
  .trainer-short-technique article{padding:1.7mm!important;background:#fff!important;border-color:#bae6fd!important}
  .trainer-short-technique article>strong{font-size:9pt!important;color:#075985!important}.trainer-short-technique article>span{font-size:6.8pt!important}.trainer-short-technique article>small{font-size:5.8pt!important}
  .trainer-short-training ol{font-size:6.6pt!important;line-height:1.2!important;padding-left:4mm!important}.trainer-short-training h3{font-size:7pt!important;margin:1.5mm 0 .6mm!important}.trainer-short-training p{font-size:6.3pt!important}
  .trainer-report-short>footer{font-size:5.5pt!important;padding-top:1.5mm!important}
  .trainer-report-short>*{break-inside:avoid!important;page-break-inside:avoid!important}

  /* Trainer detail report: denser two-page target while retaining all detail text. */
  .analysis-result-backdrop.trainer-report-mode:not(.trainer-short-mode) .trainer-report-detail{
    width:198mm!important;max-width:198mm!important;margin:0!important;padding:0!important;
    display:grid!important;grid-template-columns:1fr 1fr!important;gap:2.2mm!important;
    font-size:7.4pt!important;line-height:1.18!important
  }
  .trainer-report-detail .trainer-report-head,.trainer-report-detail .trainer-report-summary,.trainer-report-detail .trainer-report-rotations,.trainer-report-detail .trainer-report-training,.trainer-report-detail>footer{grid-column:1/-1!important}
  .trainer-report-detail .trainer-report-head{margin:0!important;padding:4mm 5mm!important}
  .trainer-report-detail .trainer-report-head h1{font-size:15pt!important;margin:1mm 0 2mm!important}
  .trainer-report-detail .trainer-report-summary,.trainer-report-detail .trainer-report-priorities,.trainer-report-detail .trainer-report-phases,.trainer-report-detail .trainer-report-rotations,.trainer-report-detail .trainer-report-techniques,.trainer-report-detail .trainer-report-context-grid>div,.trainer-report-detail .trainer-report-training{padding:2.7mm!important;margin:0!important}
  .trainer-report-detail h2{font-size:9pt!important;margin:0 0 1.3mm!important}
  .trainer-report-detail .trainer-report-priorities>article{padding:1.8mm 0!important;grid-template-columns:6mm 1fr!important;gap:1.5mm!important}
  .trainer-report-detail .trainer-priority-no{width:5mm!important;height:5mm!important;font-size:6pt!important}
  .trainer-report-detail .trainer-report-priorities article h3{font-size:7.6pt!important}.trainer-report-detail .trainer-report-priorities article>div>strong{font-size:6.8pt!important}.trainer-report-detail .trainer-report-priorities p{font-size:6.5pt!important;line-height:1.18!important;margin:.8mm 0!important}
  .trainer-report-detail .trainer-next{padding:1.3mm!important;font-size:6.3pt!important}
  .trainer-report-detail .trainer-report-phases>div{grid-template-columns:1fr!important;gap:1.2mm!important}
  .trainer-report-detail .trainer-report-phases article{padding:1.7mm!important}
  .trainer-report-detail .trainer-report-phases article h3{font-size:7.2pt!important}.trainer-report-detail .trainer-report-phases article p{font-size:6.3pt!important;margin:1mm 0 0!important}
  .trainer-report-detail table{font-size:6.5pt!important}.trainer-report-detail th,.trainer-report-detail td{padding:1.1mm 1.4mm!important}
  .trainer-report-detail .trainer-report-techniques>div{grid-template-columns:1fr 1fr!important;gap:1.2mm!important}
  .trainer-report-detail .trainer-report-techniques article{padding:1.6mm!important}
  .trainer-report-detail .trainer-report-context-grid{display:contents!important}
  .trainer-report-detail .trainer-report-context-grid>div{display:block!important}
  .trainer-report-detail .trainer-report-training ol,.trainer-report-detail .trainer-report-training ul{font-size:6.5pt!important;gap:.8mm!important}
  .trainer-report-detail>footer{font-size:5.5pt!important;padding-top:1.5mm!important}
}


/* RC6-8 finishing · REPORT-PRINT2 / REPORT-TYPO1 / REPORT-SHARE2A */
.analysis-result-backdrop.trainer-report-mode #analysisResultActions{
  flex-wrap:wrap;
}

/* The browser's native title/URL header is not part of VolleyTakt. REPORT-PRINT2
   reserves no top page margin and supplies its own page footer via @page margin
   boxes injected immediately before print. */
@media print{
  .analysis-result-backdrop.team-report-mode .team-report,
  .analysis-result-backdrop.trainer-report-mode .trainer-report{
    padding-top:3mm!important;
  }

  /* Trainer short report: use spare lower-page area for more readable prose. */
  .analysis-result-backdrop.trainer-report-mode.trainer-short-mode .trainer-report-short{
    font-size:8.15pt!important;
    line-height:1.24!important;
  }
  .trainer-report-short .trainer-short-priorities h3{font-size:8.1pt!important}
  .trainer-report-short .trainer-short-priorities article>div>strong{font-size:7.25pt!important}
  .trainer-report-short .trainer-short-priorities p{font-size:7.15pt!important;line-height:1.23!important}
  .trainer-report-short .trainer-short-phases article h3{font-size:7.8pt!important}
  .trainer-report-short .trainer-short-phases article p{font-size:6.95pt!important;line-height:1.23!important}
  .trainer-report-short table{font-size:7.05pt!important}
  .trainer-report-short .trainer-short-training ol{font-size:7.1pt!important;line-height:1.24!important}
  .trainer-report-short .trainer-short-training p{font-size:6.9pt!important}
  .trainer-report-short>footer{font-size:6.1pt!important}

  /* Detail report: page 2 had ample free area; increase practical reading size
     while retaining the two-page composition. */
  .analysis-result-backdrop.trainer-report-mode:not(.trainer-short-mode) .trainer-report-detail{
    font-size:7.85pt!important;
    line-height:1.22!important;
  }
  .trainer-report-detail h2{font-size:9.5pt!important}
  .trainer-report-detail .trainer-report-priorities article h3{font-size:8pt!important}
  .trainer-report-detail .trainer-report-priorities article>div>strong{font-size:7.15pt!important}
  .trainer-report-detail .trainer-report-priorities p{font-size:6.95pt!important;line-height:1.22!important}
  .trainer-report-detail .trainer-next{font-size:6.8pt!important}
  .trainer-report-detail .trainer-report-phases article h3{font-size:7.8pt!important}
  .trainer-report-detail .trainer-report-phases article p{font-size:6.85pt!important}
  .trainer-report-detail table{font-size:6.95pt!important}
  .trainer-report-detail .trainer-report-techniques article{font-size:7.15pt!important}
  .trainer-report-detail .trainer-report-training ol,
  .trainer-report-detail .trainer-report-training ul{font-size:7.05pt!important;line-height:1.24!important}
  .trainer-report-detail>footer{font-size:6pt!important}
}


/* RC6-8 final candidate · REPORT-STYLE1
   Harmonised radii for all report variants. Content, metrics and pagination stay unchanged. */
:root{
  --report-radius-outer:12px;
  --report-radius-inner:8px;
  --report-radius-pill:999px;
}

/* Screen reports */
.team-report,
.trainer-report{
  border-radius:var(--report-radius-outer)!important;
  overflow:hidden;
}
.team-report-head,
.trainer-report-head{
  border-radius:var(--report-radius-outer) var(--report-radius-outer) 0 0!important;
  overflow:hidden;
}
.team-report-intro,
.team-report-columns>div,
.team-report-training,
.team-report-metrics,
.team-report-rotations,
.team-report-glossary,
.trainer-report-summary,
.trainer-report-priorities,
.trainer-report-phases,
.trainer-report-rotations,
.trainer-report-techniques,
.trainer-report-context-grid>div,
.trainer-report-training,
.trainer-short-overview,
.trainer-short-priorities,
.trainer-short-phases,
.trainer-short-rotation,
.trainer-short-technique,
.trainer-short-training{
  border-radius:var(--report-radius-outer)!important;
}
.team-report-columns article,
.team-report-metrics article,
.team-report-rotations>div>span,
.team-report-glossary dl>div,
.trainer-report-priorities>article,
.trainer-report-phases article,
.trainer-report-techniques article,
.trainer-report-meta>span,
.trainer-report-summary span,
.trainer-phase-metrics span,
.trainer-opponent-metrics span,
.trainer-short-overview-grid span,
.trainer-short-phases article span,
.trainer-short-priorities>article,
.trainer-short-phases article,
.trainer-short-technique article,
.trainer-next{
  border-radius:var(--report-radius-inner)!important;
}
.team-report-badge,
.trainer-report-badge{
  border-radius:var(--report-radius-pill)!important;
}

/* Ensure the left accent bar follows rounded outer corners instead of looking
   like a detached square strip. */
.team-report-good,
.team-report-focus,
.team-report-training,
.team-report-rotations,
.team-report-glossary,
.trainer-report-summary,
.trainer-report-priorities,
.trainer-report-phases,
.trainer-report-rotations,
.trainer-report-techniques,
.trainer-report-context-grid>div,
.trainer-report-training,
.trainer-short-overview,
.trainer-short-priorities,
.trainer-short-phases,
.trainer-short-rotation,
.trainer-short-technique,
.trainer-short-training{
  background-clip:padding-box!important;
}

/* Paper: retain the same visual language in all three PDF outputs. */
@media print{
  .team-report,
  .trainer-report{
    border-radius:var(--report-radius-outer)!important;
    overflow:hidden!important;
  }
  .team-report-head,
  .trainer-report-head{
    border-radius:var(--report-radius-outer) var(--report-radius-outer) 0 0!important;
    overflow:hidden!important;
  }
  .team-report-intro,
  .team-report-columns>div,
  .team-report-training,
  .team-report-metrics,
  .team-report-rotations,
  .team-report-glossary,
  .trainer-report-summary,
  .trainer-report-priorities,
  .trainer-report-phases,
  .trainer-report-rotations,
  .trainer-report-techniques,
  .trainer-report-context-grid>div,
  .trainer-report-training,
  .trainer-short-overview,
  .trainer-short-priorities,
  .trainer-short-phases,
  .trainer-short-rotation,
  .trainer-short-technique,
  .trainer-short-training{
    border-radius:var(--report-radius-outer)!important;
  }
  .team-report-columns article,
  .team-report-metrics article,
  .team-report-rotations>div>span,
  .team-report-glossary dl>div,
  .trainer-report-priorities>article,
  .trainer-report-phases article,
  .trainer-report-techniques article,
  .trainer-report-meta>span,
  .trainer-report-summary span,
  .trainer-phase-metrics span,
  .trainer-opponent-metrics span,
  .trainer-short-overview-grid span,
  .trainer-short-phases article span,
  .trainer-short-priorities>article,
  .trainer-short-phases article,
  .trainer-short-technique article,
  .trainer-next{
    border-radius:var(--report-radius-inner)!important;
  }
}


/* RC6-8 pre-final fixes · UI-MATCH1 / REPORT-PRINT3 */
@media print{
  /* REPORT-STYLE1 must not turn the complete multi-page trainer report into
     one clipped/fragmented box. Section/header radii stay intact. */
  .analysis-result-backdrop.trainer-report-mode .trainer-report{
    overflow:visible!important;
  }

  /* Keep the proven two-page composition for the detail report:
     page 1 = Spielbild/Erkenntnisse/Spielphasen/Rotationen,
     page 2 = Technik/Spielerinnen/Gegner/Training. */
  .analysis-result-backdrop.trainer-report-mode:not(.trainer-short-mode) .trainer-report-detail .trainer-report-techniques{
    break-before:page!important;
    page-break-before:always!important;
  }
}

/* VolleyTakt Live 0.4.2 RC1 · action/video analysis + personal player report */
.analysis-report-personal-card{display:flex;flex-direction:column;gap:9px;padding:16px;border:1px solid #35526d;border-radius:14px;background:#102238}
.analysis-report-personal-card>strong{font-size:1rem}.analysis-report-personal-card>span{color:#a9bfd2;line-height:1.4}
.analysis-report-personal-actions{display:flex;gap:9px;flex-wrap:wrap}.analysis-report-personal-actions select{min-width:min(280px,100%);flex:1}
.analysis-actions{display:grid;gap:14px}.analysis-actions-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;flex-wrap:wrap;padding:14px 16px;border:1px solid #2d4d69;border-radius:14px;background:#0e2034}.analysis-actions-head h3{margin:0 0 4px}.analysis-actions-head p{margin:0;color:#94acc1}
.analysis-action-group{border:1px solid #2a4058;border-radius:14px;overflow:hidden;background:#0c1828}.analysis-action-group>header{display:flex;justify-content:space-between;align-items:center;padding:11px 14px;background:#102238}.analysis-action-group>header h4{margin:0}.analysis-action-group>header span{display:inline-grid;place-items:center;min-width:30px;height:26px;border-radius:999px;background:#18344f;font-weight:800}
.analysis-action-list{display:grid}.analysis-action-list article{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 14px;border-top:1px solid #22364b}.analysis-action-list article:first-child{border-top:0}.analysis-action-list article>div{display:flex;flex-direction:column;gap:3px;min-width:0}.analysis-action-list article strong{color:#edf6ff}.analysis-action-list article span{color:#b9cbdb}.analysis-action-list article small{color:#819bb1;white-space:normal}.analysis-action-list button{flex:0 0 auto}
.analysis-video-backdrop{position:fixed;inset:0;z-index:10030;background:rgba(2,6,23,.84);display:grid;place-items:center;padding:16px}.analysis-video-backdrop[hidden]{display:none}.analysis-video-window{width:min(1100px,96vw);max-height:94dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;border:1px solid #40566f;border-radius:18px;overflow:hidden;background:#081526;box-shadow:0 24px 80px rgba(0,0,0,.55)}.analysis-video-window>header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:14px 18px;border-bottom:1px solid #263a50}.analysis-video-window>header h2{margin:0 0 4px}.analysis-video-window>header p{margin:0;color:#9cb3c8}.analysis-video-window>header button{font-size:1.5rem}.analysis-video-window>main{padding:14px;overflow:auto}.analysis-video-window>footer{display:flex;justify-content:center;align-items:center;gap:12px;padding:12px;border-top:1px solid #263a50}.analysis-video-window iframe,.analysis-video-window video{display:block;width:100%;aspect-ratio:16/9;max-height:68dvh;border:0;border-radius:12px;background:#000}.analysis-video-unavailable{padding:30px;border:1px dashed #49627d;border-radius:12px;color:#b9cad9}.analysis-video-window #analysisVideoInfo{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 2px 0;color:#a9bfd2}
.player-report-table{padding:16px;border-radius:14px;border:1px solid #31445b;background:#101d2e}.player-report-table h2{margin-top:0}.player-report .team-report-intro p{max-width:90ch}
@media(max-width:720px){.analysis-action-list article{align-items:flex-start;flex-direction:column}.analysis-action-list button{width:100%}.analysis-video-backdrop{padding:6px}.analysis-video-window{width:100%;max-height:98dvh}.analysis-report-personal-actions{flex-direction:column}.analysis-report-personal-actions select{width:100%}}
@media print{.player-report-table{break-inside:avoid;border-color:#aaa!important;background:#fff!important}.player-report-table *{color:#111!important;background:#fff!important}}


/* 0.4.2 RC1 refresh · UI-REPORT2 compact chooser + internal overflow scrolling */
.analysis-result-backdrop.report-menu-mode .analysis-result-window{
  width:clamp(700px,78vw,940px);
  height:auto;
  max-height:calc(100dvh - 32px);
  grid-template-rows:auto minmax(0,1fr) auto;
}
.analysis-result-backdrop.report-menu-mode .analysis-result-window>main{
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-gutter:stable;
  scrollbar-width:thin;
  padding:16px 18px;
}
.analysis-result-backdrop.report-menu-mode .analysis-result-window>main::-webkit-scrollbar{width:10px}
.analysis-result-backdrop.report-menu-mode .analysis-result-window>main::-webkit-scrollbar-track{background:#091424;border-radius:999px}
.analysis-result-backdrop.report-menu-mode .analysis-result-window>main::-webkit-scrollbar-thumb{background:#49647f;border:2px solid #091424;border-radius:999px}
.analysis-result-backdrop.report-menu-mode .analysis-report-menu{padding:16px 18px}
.analysis-result-backdrop.report-menu-mode .analysis-report-menu>p{margin-bottom:14px}
.analysis-result-backdrop.report-menu-mode .analysis-report-choice-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  align-items:stretch;
}
.analysis-result-backdrop.report-menu-mode .analysis-report-player-card,
.analysis-result-backdrop.report-menu-mode .analysis-report-personal-card,
.analysis-result-backdrop.report-menu-mode .analysis-report-trainer-card{
  min-height:174px;
  padding:16px;
}
.analysis-result-backdrop.report-menu-mode .analysis-report-personal-card{
  justify-content:flex-start;
  box-shadow:inset 4px 0 0 #38bdf8;
}
.analysis-result-backdrop.report-menu-mode .analysis-report-personal-card>strong,
.analysis-result-backdrop.report-menu-mode .analysis-report-player-card strong,
.analysis-result-backdrop.report-menu-mode .analysis-report-trainer-card>strong{font-size:1.05rem}
.analysis-result-backdrop.report-menu-mode .analysis-report-personal-card>span,
.analysis-result-backdrop.report-menu-mode .analysis-report-player-card span,
.analysis-result-backdrop.report-menu-mode .analysis-report-trainer-card>span{font-size:.82rem;line-height:1.4}
.analysis-result-backdrop.report-menu-mode .analysis-report-personal-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin-top:auto;
}
.analysis-result-backdrop.report-menu-mode .analysis-report-personal-actions select{
  width:100%;
  min-width:0;
  min-height:38px;
}
.analysis-result-backdrop.report-menu-mode .analysis-report-personal-actions button{
  min-height:38px!important;
  padding:8px 10px!important;
  border-radius:9px!important;
  display:block!important;
  text-align:center!important;
  font-weight:800;
  background:#0a2034!important;
  box-shadow:none!important;
  transform:none;
}
.analysis-result-backdrop.report-menu-mode .analysis-report-trainer-actions{margin-top:auto}
.analysis-result-backdrop.report-menu-mode .analysis-report-trainer-actions button{
  min-height:38px!important;
  padding:8px 8px!important;
}
@media(max-width:860px){
  .analysis-result-backdrop.report-menu-mode .analysis-result-window{width:clamp(520px,88vw,760px)}
  .analysis-result-backdrop.report-menu-mode .analysis-report-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .analysis-result-backdrop.report-menu-mode .analysis-report-trainer-card{grid-column:1/-1;min-height:132px}
}
@media(max-width:620px){
  .analysis-result-backdrop.report-menu-mode .analysis-result-window{width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}
  .analysis-result-backdrop.report-menu-mode .analysis-result-window>main{padding:12px}
  .analysis-result-backdrop.report-menu-mode .analysis-report-menu{padding:14px}
  .analysis-result-backdrop.report-menu-mode .analysis-report-choice-grid{grid-template-columns:1fr}
  .analysis-result-backdrop.report-menu-mode .analysis-report-trainer-card{grid-column:auto}
  .analysis-result-backdrop.report-menu-mode .analysis-report-player-card,
  .analysis-result-backdrop.report-menu-mode .analysis-report-personal-card,
  .analysis-result-backdrop.report-menu-mode .analysis-report-trainer-card{min-height:auto}
}

/* 0.4.2 RC1 correction · ANALYSIS-PLAYER-REPORT2 */
.player-report-quality-total,.player-report-table-help{margin:9px 0 0;color:#8fa7bd;font-size:.72rem;line-height:1.4}
.player-report-table-help{margin:0 0 9px}.player-quality-distribution{min-width:190px;white-space:normal;line-height:1.35}
@media print{.player-report-quality-total,.player-report-table-help{color:#52647a!important}.player-quality-distribution{min-width:0;font-size:8pt!important}}

/* 0.4.2 RC1 correction · REPORT-PLAYER-LAYOUT1
   Dedicated A4 composition for the personal player report. The generic team-report
   print grid assumes team-only sections (training/metrics) and auto-placed the
   player-specific table outside the intended two-column paper grid. */
@media print{
  .analysis-result-backdrop.team-report-mode .team-report.player-report{
    width:198mm!important;
    max-width:198mm!important;
    min-width:0!important;
    box-sizing:border-box!important;
    margin:0 auto!important;
    padding:0!important;
    overflow:visible!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    grid-template-areas:
      "head head"
      "intro intro"
      "metrics metrics"
      "strengths strengths"
      "table table"
      "rotations glossary"
      "foot foot"!important;
    gap:2mm!important;
    font-size:7.8pt!important;
    line-height:1.2!important;
  }
  .team-report.player-report>.team-report-head{grid-area:head!important}
  .team-report.player-report>.team-report-intro{grid-area:intro!important}
  .team-report.player-report>.team-report-metrics{grid-area:metrics!important}
  .team-report.player-report>.team-report-columns{grid-area:strengths!important}
  .team-report.player-report>.player-report-table{grid-area:table!important}
  .team-report.player-report>.team-report-rotations{grid-area:rotations!important}
  .team-report.player-report>.team-report-glossary{grid-area:glossary!important}
  .team-report.player-report>footer{grid-area:foot!important}

  .team-report.player-report>*{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  .team-report.player-report .team-report-head{padding:3.6mm 4.5mm!important}
  .team-report.player-report .team-report-head h1{font-size:15pt!important}
  .team-report.player-report .team-report-meta{margin-top:1.5mm!important}
  .team-report.player-report .team-report-intro{padding:2mm 2.6mm!important}
  .team-report.player-report .team-report-intro p{font-size:7.4pt!important;line-height:1.18!important}

  .team-report.player-report .team-report-metrics{padding:2.2mm!important}
  .team-report.player-report .team-report-metrics>div{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:1.3mm!important;
  }
  .team-report.player-report .team-report-metrics article{padding:1.4mm!important}
  .team-report.player-report .team-report-metrics article strong{font-size:10.5pt!important}
  .team-report.player-report .team-report-metrics article span{font-size:6.2pt!important}
  .team-report.player-report .team-report-metrics article small{font-size:5.5pt!important}
  .team-report.player-report .player-report-quality-total{font-size:5.8pt!important;margin-top:1.2mm!important}

  .team-report.player-report .team-report-columns{grid-template-columns:1fr 1fr!important;gap:2mm!important}
  .team-report.player-report .team-report-columns>div{padding:2mm!important;min-width:0!important}
  .team-report.player-report .team-report-columns article{padding:1.5mm 1.8mm!important;margin-top:1mm!important}
  .team-report.player-report .team-report-columns article p{font-size:7pt!important;line-height:1.18!important;overflow-wrap:anywhere!important}

  .team-report.player-report .player-report-table{
    width:100%!important;
    min-width:0!important;
    padding:2.2mm!important;
    overflow:visible!important;
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }
  .team-report.player-report .player-report-table-help{font-size:5.8pt!important;margin:0 0 1.2mm!important}
  .team-report.player-report .analysis-table-wrap{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow:visible!important;
  }
  .team-report.player-report .player-report-table table{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
    border-collapse:collapse!important;
    font-size:6.3pt!important;
  }
  .team-report.player-report .player-report-table th,
  .team-report.player-report .player-report-table td{
    min-width:0!important;
    padding:1.1mm 1mm!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    line-height:1.15!important;
  }
  .team-report.player-report .player-report-table th:nth-child(1){width:13%!important}
  .team-report.player-report .player-report-table th:nth-child(2){width:9%!important}
  .team-report.player-report .player-report-table th:nth-child(3){width:26%!important}
  .team-report.player-report .player-report-table th:nth-child(4){width:11%!important}
  .team-report.player-report .player-report-table th:nth-child(5){width:15%!important}
  .team-report.player-report .player-report-table th:nth-child(6){width:16%!important}
  .team-report.player-report .player-report-table th:nth-child(7){width:10%!important}
  .team-report.player-report .player-quality-distribution{min-width:0!important;font-size:6.1pt!important}

  .team-report.player-report .team-report-rotations,
  .team-report.player-report .team-report-glossary{
    min-width:0!important;
    padding:2mm!important;
    align-self:start!important;
  }
  .team-report.player-report .team-report-rotations>div{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:1mm!important}
  .team-report.player-report .team-report-rotations>div>span{min-width:0!important;padding:1.3mm!important}
  .team-report.player-report .team-report-rotations small,
  .team-report.player-report .team-report-rotations p{font-size:5.3pt!important;line-height:1.15!important}
  .team-report.player-report .team-report-glossary dl{grid-template-columns:1fr 1fr!important;gap:1mm!important}
  .team-report.player-report .team-report-glossary dl>div{
    min-width:0!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    gap:.9mm!important;
    padding:1.1mm!important;
    line-height:1.12!important;
  }
  .team-report.player-report .team-report-glossary dt{font-size:5.8pt!important}
  .team-report.player-report .team-report-glossary dd{font-size:5.4pt!important;overflow-wrap:anywhere!important}
  .team-report.player-report footer{font-size:5.2pt!important;padding-top:1.2mm!important}

  /* Do not force a second page merely because one half-column grows slightly.
     Sections themselves remain intact; if content genuinely exceeds A4, the
     browser may create a clean vertical page break instead of clipping sideways. */
  .team-report.player-report>.team-report-rotations,
  .team-report.player-report>.team-report-glossary{break-inside:avoid!important;page-break-inside:avoid!important}
}

/* 0.4.2 RC1 · ANALYSIS-VIDEO2 */
.analysis-quality-badge{display:inline-block;margin-left:.3rem;padding:.08rem .38rem;border:1px solid currentColor;border-radius:999px;font-size:.82em;font-weight:700;white-space:nowrap}

/* 0.4.2 RC1 · UI-ONBOARD1: first-game quick start and reusable onboarding. */
.quickstart-entry{width:100%;background:transparent;border:1px solid #475569;color:#bfdbfe;font-weight:700}.match-setup-actions{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap;justify-content:center}.match-quickstart-link{font-size:.78rem;padding:.36rem .55rem;background:transparent;border-color:#475569;color:#bfdbfe}.help-start-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:.5rem 0 .7rem}.help-quickstart-button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:.55rem .8rem;border:1px solid #38bdf8;border-radius:8px;background:#0c4a6e;color:#e0f2fe;text-decoration:none;font-weight:800}.help-lead{font-size:1.02rem}.quickstart-steps{padding-left:1.4rem}.quickstart-steps li{margin:.55rem 0;line-height:1.45}.help-pitfalls{margin:1rem 0;padding:.85rem 1rem;border:1px solid #f59e0b;border-radius:10px;background:rgba(245,158,11,.08)}.help-pitfalls h4{margin:.05rem 0 .5rem;color:#fbbf24}.help-pitfalls ul{margin:.2rem 0;padding-left:1.25rem}.help-pitfalls li{margin:.38rem 0;line-height:1.4}@media(max-width:620px){.match-setup-actions{gap:.25rem}.match-quickstart-link{font-size:.72rem}.help-start-actions>*{width:100%}}

/* 0.4.2 RC1 · UI-ONBOARD1 branch-first quick start */
.quickstart-branches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;margin:.8rem 0 1rem}.quickstart-branch{display:flex;flex-direction:column;gap:.22rem;padding:.8rem .9rem;border:1px solid #475569;border-radius:10px;text-decoration:none;background:rgba(15,23,42,.45);color:inherit}.quickstart-branch.primary{border-color:#38bdf8;background:rgba(14,116,144,.2)}.quickstart-branch.warning{grid-column:1/-1;border-color:#f59e0b;background:rgba(245,158,11,.08)}.quickstart-branch span{font-size:.86rem;opacity:.9}.quickstart-path{scroll-margin-top:1rem;margin:1rem 0;padding-top:.15rem}.help-inline-jump{font-weight:700}.quickstart-branch:focus-visible,.help-inline-jump:focus-visible{outline:2px solid currentColor;outline-offset:2px}@media(max-width:620px){.quickstart-branches{grid-template-columns:1fr}.quickstart-branch.warning{grid-column:auto}}

/* 0.4.2 RC1: task-oriented main navigation */
.preparation-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.preparation-links button{width:100%;text-align:left}
@media (max-width:680px){.preparation-links{grid-template-columns:1fr}}


/* 0.4.2 RC1 correction · UI-NAV2: one-level back navigation in drawer subviews. */
.drawer-titlebar{display:flex;align-items:center;gap:8px;min-width:0}.drawer-titlebar h2{margin:0;min-width:0}.iconback{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;min-width:42px;padding:0;border-radius:10px;font-size:1.55rem;line-height:1;background:#172033;border:1px solid #475569;color:#e2e8f0}.iconback:hover{background:#1e293b}.iconback:focus-visible{outline:2px solid #38bdf8;outline-offset:2px}.iconback[hidden]{display:none!important}

/* 0.4.2 RC1 correction · UI-SCOUT-QUALITY2 rev2: restore the proven 3×2 quality geometry.
   Basic profile: +/#/0 in row 1 and -/= in columns 1/2 of row 2; column 3 stays empty.
   Explicit rows/gaps override older grid-auto-row rules so reduced desktop height cannot cause overlap. */
.control-panel .quality-stack{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,var(--vsw-quality-h))!important;
  grid-auto-rows:var(--vsw-quality-h)!important;
  column-gap:clamp(4px,calc(6px * var(--vsw-ui-scale,1)),8px)!important;
  row-gap:clamp(4px,calc(6px * var(--vsw-ui-scale,1)),8px)!important;
  width:100%!important;max-width:100%!important;min-width:0!important;
  box-sizing:border-box!important;overflow:visible!important;
}
.control-panel .quality-stack.basic>button,
.control-panel .quality-stack.detailed>button{
  grid-column:auto!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:var(--vsw-quality-h)!important;min-height:var(--vsw-quality-h)!important;max-height:var(--vsw-quality-h)!important;
  margin:0!important;transform:none!important;box-sizing:border-box!important;
}
.control-panel .quality-stack.basic>button:nth-child(n+4){grid-column:auto!important}
@container (max-width:380px){.control-panel .quality-stack{column-gap:4px!important;row-gap:4px!important}.control-panel .quality-stack button{font-size:1rem!important;padding-inline:.1rem!important}}

/* ==============================================================
   0.4.2 RC1 – UI-MOBILE-IOS1 / UI-MOBILE10 hardening
   Keep the app inside Safari's visual viewport/safe areas and keep every
   start-screen action reachable even in short landscape browser windows.
   ============================================================== */
.platform-ios body,
.platform-ios .app-shell{height:var(--vsw-vh,100dvh);max-height:var(--vsw-vh,100dvh)}
.platform-ios .topbar{padding-top:max(clamp(4px,calc(6px * var(--vsw-scale)),6px),var(--safe-top));padding-left:max(clamp(6px,calc(10px * var(--vsw-scale)),10px),var(--safe-left));padding-right:max(clamp(6px,calc(10px * var(--vsw-scale)),10px),var(--safe-right))}
.platform-ios .statusbar{padding-bottom:max(3px,var(--safe-bottom));padding-left:max(8px,var(--safe-left));padding-right:max(8px,var(--safe-right))}
.platform-ios .drawer{max-height:calc(var(--vsw-vh,100dvh) - var(--safe-top) - var(--safe-bottom));padding-bottom:max(10px,var(--safe-bottom))}
.platform-ios .dialog-window,.platform-ios .analysis-result-window{max-height:calc(var(--vsw-vh,100dvh) - max(12px,var(--safe-top)) - max(12px,var(--safe-bottom)))}
.platform-ios .start-gate{min-height:var(--vsw-vh,100dvh);height:var(--vsw-vh,100dvh)}
.platform-ios .start-card{max-height:calc(var(--vsw-vh,100dvh) - max(12px,var(--safe-top)) - max(12px,var(--safe-bottom)))}

.viewport-mobile-start .start-card>.start-actions{display:grid!important;grid-template-columns:1fr!important;align-items:stretch!important}
.viewport-mobile-start .start-card>.start-actions>button{display:block!important;visibility:visible;min-width:0!important;max-width:100%!important;width:100%!important}
.viewport-mobile-start .start-card{overflow-y:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable}
.viewport-mobile-start .start-gate{overflow-y:auto!important;overscroll-behavior:contain}
@media (orientation:landscape) and (max-height:440px){
  .viewport-mobile-start .start-card{align-content:start!important;padding-top:max(7px,var(--safe-top))!important;padding-bottom:max(7px,var(--safe-bottom))!important}
  .viewport-mobile-start .start-card>.start-actions{position:relative!important;inset:auto!important}
}


/* 0.4.2 RC3 · UI-SETTINGS2 correction: uniform 2×X settings tiles */
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch;margin:0 0 8px}
.drawer-body .settings-grid>.card,.drawer-body .settings-grid>button.card{margin:0;min-width:0;width:100%;height:100%;box-sizing:border-box}
.settings-grid-card{min-width:0;border-radius:12px!important}
.settings-form-card,.settings-action-card{padding:12px!important;display:flex;flex-direction:column;min-height:178px}
.settings-form-card>h3,.settings-action-card h3{margin:0 0 8px}
.settings-card-body{flex:1;min-width:0}
.settings-form-card p.small,.settings-action-card p.small{margin:7px 0;line-height:1.3}
.settings-card-actions{margin-top:auto!important;padding-top:8px}
.settings-nav-card,.settings-info-card{min-height:100px;padding:12px!important;display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:center;text-align:left;color:inherit;background:#111c2e!important;border:1px solid var(--line)!important;border-radius:12px!important;box-shadow:none}
.settings-nav-card{appearance:none;cursor:pointer}
.settings-nav-card:hover{border-color:#3b82f6!important;background:#101d31!important}
.settings-nav-card:focus-visible{outline:2px solid #38bdf8;outline-offset:2px}
.settings-nav-card .settings-nav-icon,.settings-info-card .settings-nav-icon{font-size:1.15rem;line-height:1}
.settings-nav-card strong,.settings-info-card strong{display:block;font-size:.92rem;margin-bottom:3px}
.settings-nav-card small,.settings-info-card small{display:block;color:var(--muted);font-size:.75rem;line-height:1.3;font-weight:400}
.settings-info-card{cursor:default}
.settings-scout-grid{min-width:0}
@media(max-width:860px){.settings-grid{grid-template-columns:1fr}.settings-form-card,.settings-action-card{min-height:0}.settings-nav-card,.settings-info-card{min-height:86px}}


/* 0.4.2 RC3 REPORT-I18N1 */
.analysis-report-language{display:grid;grid-template-columns:auto minmax(130px,190px) 1fr;align-items:center;gap:10px;margin:0 0 16px;padding:10px 12px;border:1px solid #34485e;border-radius:12px;background:#0b1726}
.analysis-report-language label{margin:0}.analysis-report-language select{min-width:0}.analysis-report-language small{color:#9fb2c8;line-height:1.35}
@media(max-width:700px){.analysis-report-language{grid-template-columns:1fr}.analysis-report-language select{width:100%}}

/* 0.4.3_1 · language selection available before app start */
.start-language-switch{position:absolute;top:14px;right:14px;display:flex;gap:4px;padding:3px;border:1px solid #334155;border-radius:999px;background:#0b1220cc;z-index:3}.start-language-switch button{width:auto!important;min-width:38px!important;min-height:32px!important;margin:0!important;padding:.25rem .5rem!important;border:0;border-radius:999px;background:transparent;color:#94a3b8;font-size:.78rem;line-height:1}.start-language-switch button.active{background:#0369a1;color:#fff;box-shadow:0 0 0 1px #38bdf8 inset}.start-language-switch button:focus-visible{outline:2px solid #38bdf8;outline-offset:2px}@media(max-width:520px){.start-language-switch{top:8px;right:8px}.start-language-switch button{min-width:34px!important;min-height:30px!important;font-size:.72rem}}
