.wt-pilot-dialog {
  width: min(52rem, calc(100vw - 1rem));
  max-width: 100%;
  max-height: calc(100dvh - 1rem);
  padding: clamp(.7rem, 3vw, 1.4rem);
  overflow: auto;
}
.wt-pilot-dialog > header,
.wt-pilot-dialog .wt-pilot-form,
.wt-pilot-dialog li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
}
.wt-pilot-dialog > header { justify-content: space-between; }
.wt-pilot-dialog .wt-pilot-form label {
  flex: 1 1 11rem;
  min-width: 0;
}
.wt-pilot-dialog .wt-pilot-form label > :is(input, select) { width: 100%; }
.wt-pilot-dialog .wt-pilot-form > .match-library-actions { flex: 1 0 100%; }
.wt-pilot-dialog :is(button, input, select),
.wt-pilot-actions button { min-height: 44px; }
.wt-pilot-dialog [hidden], .wt-pilot-actions[hidden] { display: none !important; }
.wt-pilot-dialog ul { padding-inline-start: 1rem; }
.wt-pilot-dialog li { margin-block: .4rem; }
.wt-pilot-dialog .inline-video-media { max-height: 52dvh; }
.wt-pilot-dialog .inline-video-media video { max-height: 52dvh; }

/* Full-size quick workspace: same action choices as the complete editor. */
dialog.wt-quick-workspace {
  position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: 100%;
  max-height: 100dvh; margin: 0; border: 0; border-radius: 0;
  padding: clamp(.75rem, 2vw, 1.5rem); box-sizing: border-box;
}
.wt-quick-workspace > header { position: sticky; top: -.75rem; z-index: 3; background: var(--surface, #fff); padding-block: .6rem; }
.wt-quick-workspace .wt-quick-columns { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; margin-top: 1rem; }
.wt-quick-workspace .wt-quick-columns > * { min-width: 0; }
.wt-quick-workspace .wt-quick-video { position: static; }
.wt-quick-workspace .inline-video-media { width: 100%; aspect-ratio: 16 / 9; max-height: none; }
.wt-quick-workspace .inline-video-media :is(iframe, video) { width: 100%; height: 100%; max-height: none; }
.wt-quick-workspace .wt-pilot-form { display: grid; gap: .85rem; }
.wt-quick-workspace .wt-pilot-form > label { display: block; width: 100%; }
.wt-quick-workspace .flow-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr)); gap: .45rem; margin-top: .4rem; }
.wt-quick-workspace .flow-choice-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wt-quick-workspace .flow-choice { min-height: 48px; font-size: .95rem; overflow-wrap: anywhere; }
.wt-quick-transport { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.wt-quick-workspace details { margin-top: 1rem; }
.wt-quick-workspace .match-media-controls { display: none; }
@media (max-width: 740px) {
 .wt-quick-workspace .wt-quick-columns { grid-template-columns: minmax(0, 1fr); }
 .wt-quick-workspace .wt-quick-video { position: static; }
}

.wt-quick-scoreboard { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.5rem; margin-bottom:.7rem; }
.wt-quick-scoreboard > :is(strong,small) { grid-column:1/-1; }
.wt-quick-scoreboard > div { padding:.7rem; border-radius:.6rem; color:white; font-size:1.2rem; font-weight:700; overflow-wrap:anywhere; }
.wt-quick-score-red { background:#a82032; } .wt-quick-score-blue { background:#1655a6; }
.wt-quick-timeline { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; padding-block:.5rem; }
.wt-quick-timeline > p, .wt-quick-timeline input[type=range] { width:100%; margin:0; }
.wt-quick-timeline input[type=range] { min-height:48px; accent-color:#087c69; touch-action:pan-y; }
.wt-quick-timeline input[type=text] { width:8rem; max-width:100%; }
.wt-quick-timeline output { font-variant-numeric:tabular-nums; font-weight:700; }
.wt-quick-round-row { display:flex; flex-wrap:wrap; gap:.4rem; margin-block:.5rem; align-items:center; }
.wt-quick-round-row > strong { flex-basis:100%; }
.wt-quick-workspace > header h2 { margin:0; }

.wt-quick-save-status { flex-basis:100%; margin:.25rem 0; font-size:.95rem; overflow-wrap:anywhere; }
.wt-quick-save-status:empty { display:none; }

/* Only enabled by the optional professional panel. */
#analysis-workbench .action-flow.wt-custom-layout { display:flex; flex-direction:column; }
.wt-custom-layout .flow-step[data-wt-visible="true"] { display:grid; gap:10px; border-top:1px solid var(--line,#ddd); padding-top:.75rem; }
.wt-custom-layout .flow-step[data-wt-visible="false"], .wt-custom-layout .wt-custom-hidden { display:none !important; }
.wt-custom-field-title { margin:0; font-size:1rem; }
.wt-custom-panel, .wt-panel-settings { overflow-wrap:anywhere; }
.wt-custom-panel .match-library-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.wt-custom-panel button, .wt-panel-settings :is(button,select,input:not([type=checkbox])) { min-height:44px; max-width:100%; }
.wt-panel-settings { box-sizing:border-box; }
.wt-panel-settings > :is(input,select) { display:block; width:100%; margin-block:.6rem; box-sizing:border-box; }
.wt-panel-settings details { margin-block:.75rem; }
.wt-panel-settings summary { cursor:pointer; padding:.6rem 0; font-weight:700; }
.wt-panel-setting-row { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; padding:.5rem 0; border-bottom:1px solid var(--line,#ddd); }
.wt-panel-setting-row > :is(label,span) { flex:1 1 12rem; min-width:0; }
.wt-panel-settings label { display:flex; align-items:center; gap:.5rem; min-height:44px; }
.wt-panel-settings input[type=checkbox] { width:22px; height:22px; min-height:22px; flex:0 0 22px; }
.wt-panel-settings [role=status] { position:sticky; bottom:0; background:var(--surface,#fff); padding:.5rem; }
@media(max-width:600px) {
 .wt-panel-setting-row > :is(label,span) { flex-basis:100%; }
 .wt-panel-setting-row button { flex:1 1 7rem; }
 .wt-custom-panel .match-library-actions button { flex:1 1 9rem; }
}

/* Scoring and tactical coverage stay visibly separate on every profile. */
.wt-scoring-profile { margin:1rem 0; padding:1rem; border:1px solid #cddbd7; border-radius:12px; background:#f6faf8; color:#172824; }
.wt-scoring-profile h4 {font-size:1.15rem; margin:0 0 .75rem;}
.wt-scoring-profile :is(button,select) {min-height:44px; max-width:100%; margin:.25rem; white-space:normal;}
.wt-scoring-profile p {overflow-wrap:anywhere;}
.wt-scoring-metrics {display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:.65rem;}
.wt-scoring-metrics>div {padding:.7rem;background:white;border:1px solid #dbe5e1;border-radius:8px;}
.wt-scoring-metrics :is(span,strong) {display:block;}
.wt-scoring-metrics strong {font-size:1.4rem;}
.wt-scoring-techniques {list-style:none;padding:0;}
.wt-scoring-techniques li {margin:.7rem 0;}
.wt-scoring-techniques meter {display:block;width:100%;height:1rem;}
@media(max-width:480px){.wt-scoring-profile{padding:.7rem}.wt-scoring-profile label{display:block}.wt-scoring-profile select{width:100%;margin:.25rem 0}.wt-scoring-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

.wt-author-dialog select{width:100%;min-height:44px;margin:.65rem 0;white-space:normal;max-width:100%}
.wt-author-dialog nav{display:flex;gap:.7rem;align-items:center;flex-wrap:wrap;margin-top:1rem}
.wt-author-text p{white-space:pre-wrap;overflow-wrap:anywhere}
.wt-author-frame{width:100%;height:75dvh;border:1px solid #dbe5e1;margin-top:1rem;border-radius:8px}

/* Main profile entry is an easy touch target on tablet and phone. */
#profiles-list .sports-profile-primary {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 16px 20px;
  margin: 12px 0 20px;
  border: 2px solid #087c69;
  border-radius: 12px;
  background: #087c69;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 750;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
  cursor: pointer;
}
#profiles-list .sports-profile-primary:hover { background: #065e50; }
#profiles-list .sports-profile-primary:focus-visible { outline: 3px solid #20252b; outline-offset: 3px; }
[data-profile-extras] { margin-top: 24px; }

.wt-profile-scoring-disclosure > summary {
  display:list-item; list-style-position:inside; cursor:pointer; padding:18px 20px;
  min-height:56px; box-sizing:border-box; border-radius:12px; background:#087c69;
  color:white; font-size:1.1rem; font-weight:750; line-height:1.35;
}
.wt-profile-scoring-disclosure > summary:focus-visible { outline:3px solid #20252b; outline-offset:3px; }
.wt-profile-scoring-disclosure[open] > div { padding-top:18px; }
.sports-profile-overview { padding:24px; margin:16px 0; border:1px solid #dce9e4; border-radius:18px; background:linear-gradient(130deg,#f1faf6,#fff); }
.sports-profile-overview h3 { margin:0 0 8px; font-size:clamp(1.4rem,3vw,2rem); color:#153b33; }
.sports-profile-subtitle { color:#4e625d; line-height:1.5; }
.sports-profile-overview-metrics,.wt-profile-locked-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(135px,1fr)); gap:12px; margin:18px 0; }
.sports-profile-overview-metrics > div { padding:16px; border-radius:12px; background:#fff; border:1px solid #dce9e4; display:flex; flex-direction:column; gap:8px; }
.sports-profile-overview-metrics span { font-size:.9rem; color:#4e625d; }
.sports-profile-overview-metrics strong { font-size:1.7rem; color:#087c69; }
.wt-profile-locked-card { min-height:76px; padding:16px; border:1px dashed #a8beb6; border-radius:12px; color:#204a3e; background:#f4f8f6; font-weight:700; text-align:left; cursor:pointer; }
.wt-profile-locked-card:focus-visible { outline:3px solid #087c69; outline-offset:3px; }
@media(max-width:480px) { .sports-profile-overview { padding:16px; } }
