.issue-section > div { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
.issue-indicator { min-height:72px; padding:9px 5px; display:grid; place-items:center; align-content:center; gap:3px; border:1px solid #ddd9e2; border-radius:8px; background:var(--card-muted); color:#918c98; text-align:center; transition:background .2s,border-color .2s,color .2s,box-shadow .2s; }
.issue-indicator b { font-size:1.05rem; line-height:1; }
.issue-indicator strong { font-size:.65rem; }
.issue-indicator small { font-size:.57rem; }
.issue-indicator.detected { font-weight:700; box-shadow:0 0 0 3px #00000008; }
.issue-indicator.blood.detected { border-color:#d42c3f; background:#fff0f2; color:#bc172b; }
.issue-indicator.error.detected { border-color:#d38722; background:#fff7e8; color:#9b5707; }
.issue-indicator.other.detected { border-color:#7352be; background:var(--purple-soft); color:#5530b5; }
.recording-state.finished { border-color:#b9dfd2; background:#f2fbf7; }
.recording-state.finished > span { background:var(--success); }
.collective-break { min-height:76px; padding:15px 18px; display:grid; grid-template-columns:140px 180px 1fr; align-items:center; gap:16px; border-top:8px solid var(--surface); border-bottom:1px solid #d6d0df; background:var(--purple-soft); }
.collective-break span { color:var(--purple); font-size:.65rem; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.collective-break strong { font-size:.9rem; }
.collective-break small { color:var(--muted); font-size:.7rem; }
.movement-row.collective { background:#fcfbfe; }
.review-section-break { padding:10px 12px; display:flex; align-items:center; justify-content:space-between; background:var(--purple-soft); border-bottom:1px solid var(--line); }
.review-section-break strong { color:var(--purple); font-size:.78rem; }
.review-section-break span { color:var(--muted); font-size:.65rem; }
.verification-control { margin-top:16px!important; padding:14px 16px; display:grid!important; grid-template-columns:32px 1fr; align-items:center; gap:12px; border:1px solid #d8d1e2; border-radius:8px; background:var(--purple-soft); color:var(--ink)!important; font-size:.76rem!important; font-weight:700!important; letter-spacing:0!important; text-transform:none!important; cursor:pointer; }
.verification-box { width:28px; height:28px; position:relative; display:block; }
.verification-box input { position:absolute; inset:0; width:28px; height:28px; margin:0; opacity:0; cursor:pointer; }
.verification-box i { width:28px; height:28px; display:grid; place-items:center; border:2px solid #8e8499; border-radius:5px; background:white; }
.verification-box input:checked + i { border-color:var(--purple); background:var(--purple); }
.verification-box input:checked + i::after { content:"✓"; color:white; font-size:1rem; font-style:normal; font-weight:900; }
.verification-box input:focus-visible + i { outline:3px solid #a989ea66; outline-offset:2px; }
@media (max-width:700px) { .collective-break { grid-template-columns:1fr; gap:3px; } .verification-control { grid-template-columns:32px 1fr; } }

/* The active judge test is an iPad-first, single-glance workspace. */
body.judging-test-open { overflow:hidden; background:var(--card); }
body.judging-test-open .app-header { display:none; }
body.judging-test-open .test-screen { min-height:100svh; height:100svh; overflow:hidden; }
body.judging-test-open .test-header { min-height:100px; height:100px; padding:10px 18px; grid-template-columns:68px minmax(0,1fr) auto; gap:16px; }
body.judging-test-open .back-control { width:64px; height:40px; min-height:40px; padding:0; display:grid; place-items:center; border:2px solid #d3cddd; border-radius:9px; font-size:1.2rem; line-height:1; }
body.judging-test-open .back-control span { display:none; }
body.judging-test-open .test-header h1 { font-size:1.45rem; }
body.judging-test-open .test-workspace { height:calc(100svh - 100px); grid-template-columns:minmax(0,1fr) minmax(0,1fr); overflow:hidden; }
body.judging-test-open .movement-sheet { display:grid; grid-template-rows:38px minmax(0,1fr); overflow:hidden; }
body.judging-test-open .movement-head { height:38px; padding:0 14px; background:var(--card-muted); box-shadow:0 2px 5px #241a3008; }
body.judging-test-open .movement-rows { min-height:0; display:flex; flex-direction:column; overflow:hidden; }
body.judging-test-open .movement-head,body.judging-test-open .movement-row { grid-template-columns:38px 108px minmax(220px,1fr) 70px 64px minmax(145px,.72fr); column-gap:0; }
body.judging-test-open .movement-head span { min-width:0; padding:0 8px; }
body.judging-test-open .movement-head span:first-child { padding-left:0; }
body.judging-test-open .movement-head span:nth-child(2) { text-align:left; }
body.judging-test-open .movement-head span:nth-child(4),body.judging-test-open .movement-head span:nth-child(5) { padding-left:0; padding-right:0; text-align:center; }
body.judging-test-open .movement-head span:nth-child(6) { padding-left:14px; }
body.judging-test-open .movement-row { min-height:0; flex:1 1 0; padding:2px 14px; overflow:hidden; transition:background .15s,box-shadow .15s; }
body.judging-test-open .movement-row:nth-of-type(even):not(.active) { background:var(--card-muted); }
body.judging-test-open .movement-row.active { background:var(--purple-soft); box-shadow:inset 4px 0 #5530b5,inset 0 1px #dcd2ef,inset 0 -1px #dcd2ef; }
body.judging-test-open .movement-number { min-width:0; height:100%; padding:0 8px 0 0; display:grid; place-items:center start; overflow:hidden; font-size:clamp(.66rem,.95vh,.8rem); line-height:1; font-variant-numeric:tabular-nums; }
body.judging-test-open .movement-marker { min-width:0; max-height:100%; padding:0 8px; display:flex; align-items:center; overflow:hidden; color:var(--ink); font-size:clamp(.52rem,.82vh,.66rem); font-weight:750; line-height:1; text-overflow:ellipsis; white-space:nowrap; }
body.judging-test-open .movement-copy { min-width:0; height:100%; padding:0 10px; display:flex; flex-direction:column; justify-content:center; overflow:hidden; }
body.judging-test-open .movement-copy strong { display:block; overflow:hidden; font-size:clamp(.56rem,.9vh,.7rem); line-height:1.05; text-overflow:ellipsis; white-space:nowrap; }
body.judging-test-open .movement-copy span { margin-top:2px; overflow:hidden; color:var(--muted); font-size:clamp(.5rem,.76vh,.62rem); line-height:1.05; text-overflow:ellipsis; white-space:nowrap; }
body.judging-test-open .movement-comment { min-width:0; height:100%; padding:0 8px 0 14px; display:flex; align-items:center; overflow:hidden; font-size:clamp(.5rem,.76vh,.62rem); text-overflow:ellipsis; white-space:nowrap; }
body.judging-test-open .movement-score { min-width:0; width:100%; height:100%; display:grid; place-items:center; color:#5530b5; font-size:.78rem; font-weight:850; font-variant-numeric:tabular-nums; }
body.judging-test-open .movement-coefficient { min-width:0; width:100%; height:100%; display:grid; place-items:center; color:#aaa4af; font-size:.68rem; font-weight:800; font-variant-numeric:tabular-nums; }
body.judging-test-open .movement-coefficient.weighted { color:#5530b5; }
body.judging-test-open .movement-score.empty::before { content:"–"; width:auto; border:0; color:#aaa4af; font-size:.82rem; font-weight:700; line-height:1; }
body.judging-test-open .collective-break { min-height:0; flex:0 0 48px; padding:6px 12px; grid-template-columns:110px 145px 1fr; gap:10px; border-top-width:5px; }
body.judging-test-open .collective-break span { font-size:.56rem; }
body.judging-test-open .collective-break strong { font-size:.75rem; }
body.judging-test-open .collective-break small { font-size:.58rem; }
body.judging-test-open .movement-editor { padding:20px 28px; overflow:hidden; }
body.judging-test-open .movement-editor h2 { margin:8px 0 3px; font-size:1.18rem; }
body.judging-test-open #currentMovementTitle { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; gap:8px; }
body.judging-test-open .current-movement-number { padding-top:2px; }
body.judging-test-open .current-movement-steps { min-width:0; display:grid; gap:7px; }
body.judging-test-open .current-movement-steps > span { min-width:0; display:grid; grid-template-columns:max-content minmax(0,1fr); gap:8px; align-items:first baseline; }
body.judging-test-open .current-movement-steps b { color:#5530b5; font-size:.9em; }
body.judging-test-open .current-movement-steps em { min-width:0; font-style:normal; line-height:1.2; }
body.judging-test-open .movement-editor > p { margin-bottom:16px; font-size:.74rem; }
body.judging-test-open .score-editor { padding:13px 0; }
body.judging-test-open .score-editor strong { font-size:2.5rem; }
body.judging-test-open .score-editor button { padding:0; display:grid; place-items:center; line-height:1; }
body.judging-test-open .movement-editor label { margin-top:13px; }
body.judging-test-open .movement-editor textarea { min-height:76px; max-height:92px; resize:none; }
body.judging-test-open .movement-comment { align-items:flex-start; padding-top:5px; padding-bottom:5px; line-height:1.22; text-overflow:clip; white-space:normal; overflow-wrap:anywhere; word-break:break-word; }
body.judging-test-open .recording-state { margin-top:11px; padding:10px; }
body.judging-test-open .issue-section { margin-top:13px; }
body.judging-test-open .issue-indicator { min-height:58px; padding:5px 3px; }
body.judging-test-open .issue-indicator b { font-size:.9rem; }
body.judging-test-open .issue-indicator strong { font-size:.58rem; }
body.judging-test-open .issue-indicator small { font-size:.5rem; }
.test-progress { width:132px; display:grid; gap:4px; color:#6f6977; font-size:.62rem; font-weight:700; }
.test-progress span { text-align:right; white-space:nowrap; }
.test-progress small { text-align:right; white-space:nowrap; font-size:.56rem; }
.test-progress strong { color:#302a37; font-size:.72rem; font-variant-numeric:tabular-nums; }
.test-progress>i { width:100%; height:5px; overflow:hidden; border-radius:999px; background:var(--card-muted); }
.test-progress>i>b { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#7552c7,#5530b5); transition:width .2s ease; }
body.judging-test-open .score-editor { background:var(--card-muted); }
body.judging-test-open .score-editor strong.empty::before { content:"–"; width:auto; display:inline-block; color:#aaa3b3; font-size:1.75rem; line-height:1; vertical-align:middle; }
body.judging-test-open .recording-state.finished { box-shadow:inset 3px 0 #15805f; }
.review-total { padding:11px 12px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); background:var(--purple-soft); color:#5530b5; font-size:.72rem; }
.review-errors { padding:11px 12px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); background:#fff8ec; color:#8a4c08; font-size:.72rem; font-weight:700; }
.review-errors input { width:80px; height:34px; padding:0 8px; border:1px solid #d8d4dd; border-radius:5px; font-weight:700; text-align:right; }
.review-concerns { margin:0; border:0; padding:11px 12px; border-bottom:1px solid var(--line); background:#fdeceb; display:flex; flex-wrap:wrap; gap:6px 16px; }
.review-concerns legend { width:100%; padding:0; margin-bottom:6px; color:#9d2610; font-size:.64rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.review-concerns label { display:flex; align-items:center; gap:6px; color:#7a2013; font-size:.78rem; font-weight:650; }
.review-row { grid-template-columns:38px minmax(150px,1fr) 70px 42px 62px minmax(220px,1.2fr) 90px; }
.review-row textarea { min-width:0; min-height:38px; padding:7px 8px; border:1px solid #d8d4dd; border-radius:5px; resize:vertical; overflow-wrap:anywhere; }
.review-coefficient,.review-weighted { color:#5e5768; font-size:.7rem; font-weight:800; text-align:center; }

.schedule-row [disabled] { cursor:not-allowed; border-color:#e4e1e7; background:var(--card-muted); color:#aaa5af; box-shadow:none; }
.schedule-row[data-can-open="false"] { cursor:default; }
.schedule-row[data-can-open="false"]:not(.complete) { background:var(--card); }
.schedule-group { min-height:37px; padding:0 18px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #e4e1e7; color:#625d69; background:var(--card-muted); font-size:.66rem; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }
.schedule-group.finished { min-height:37px; color:#356f60; background:#edf5f2; border-top:1px solid #dfeae6; }
.schedule-group span { min-width:25px; padding:3px 8px; border-radius:999px; background:var(--card); text-align:center; }
.schedule-controls { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.completed-jump { min-height:35px; padding:0 12px; border:1px solid #cfc6e3; border-radius:6px; background:var(--purple-soft); color:#5530b5; font-size:.68rem; font-weight:800; white-space:nowrap; }
.completed-jump:hover:not(:disabled) { border-color:#5530b5; background:var(--purple-soft); }
.completed-jump:disabled { border-color:#e2dfe6; background:var(--card-muted); color:#aaa5af; cursor:not-allowed; }
.schedule-group-empty,.more-rides { padding:14px 18px; color:#827d88; background:var(--card-muted); font-size:.7rem; }
.schedule-row.complete { opacity:1; background:var(--card-muted)!important; color:#777b7b; box-shadow:inset 4px 0 #6f9c90; }
.schedule-row.complete .rider-cell span { color:#929696; }
.ride-number { display:flex; align-items:center; gap:6px; }
.ride-number i { width:19px; height:19px; display:grid; place-items:center; border-radius:50%; background:#dcebe6; color:#27745f; font-size:.65rem; font-style:normal; font-weight:900; }
.ride-state { justify-self:start; padding:5px 9px; border-radius:999px; font-size:.62rem; font-weight:800; }
.ride-state.upcoming { background:var(--card-muted); color:#6d6873; }
.ride-state.done { background:#dcebe6; color:#27745f; }
.office-ride-status { max-height:360px; overflow:auto; }
.office-status-row { min-height:57px; padding:8px 14px; display:grid; grid-template-columns:38px 1fr auto; align-items:center; gap:9px; border-bottom:1px solid #ece9ef; }
.office-status-row>span { color:#5d5765; font-size:.72rem; font-weight:750; }
.office-status-row strong,.office-status-row small { display:block; }
.office-status-row strong { font-size:.72rem; }
.office-status-row small { margin-top:3px; color:#817b87; font-size:.63rem; }
.office-status-row b { padding:4px 7px; border-radius:999px; background:var(--card-muted); color:#77717e; font-size:.58rem; }
.office-status-row.complete { background:#f1f3f3; color:#777b7b; box-shadow:inset 3px 0 #6f9c90; }
.office-status-row.complete>span,.office-status-row.complete b { color:#27745f; }
.office-status-row.complete b { background:#dcebe6; }
.class-awards { padding:12px; }
.award-class { overflow:hidden; border:1px solid #e1dde6; border-radius:9px; background:var(--card); }
.award-class-title { padding:11px 12px; display:flex; align-items:center; justify-content:space-between; background:var(--purple-soft); }
.award-class-title strong,.award-class-title small { display:block; }
.award-class-title strong { font-size:.78rem; }
.award-class-title small { margin-top:3px; color:#25805f; font-size:.62rem; font-weight:750; }
.award-class-title>span { padding:4px 7px; border-radius:999px; background:var(--purple-soft); color:#5530b5; font-size:.58rem; font-weight:850; text-transform:uppercase; }
.award-class ol { margin:0; padding:0; list-style:none; }
.award-class li { min-height:48px; padding:7px 10px; display:grid; grid-template-columns:28px 1fr auto; gap:8px; align-items:center; border-top:1px solid #ece9ef; }
.award-class li>b { width:24px; height:24px; display:grid; place-items:center; border-radius:50%; background:var(--purple-soft); color:#5530b5; font-size:.66rem; }
.award-class li strong,.award-class li small { display:block; }
.award-class li strong { font-size:.68rem; }
.award-class li small { margin-top:2px; color:#817b87; font-size:.59rem; }
.award-class li>span { color:#4d4853; font-size:.65rem; font-weight:750; }
.tool-grid.office-tools { grid-template-columns:1fr 1fr; }
#officeHome .office-grid { align-items:start; }
#officeHome .result-list { min-height:230px; }
.office-panel-heading { align-items:flex-start; gap:16px; }
.office-panel-actions { display:grid; justify-items:end; gap:8px; }
.office-view-switch { display:flex; padding:3px; border-radius:8px; background:var(--card-muted); }
.office-view-switch button { min-height:32px; padding:0 11px; border:0; border-radius:6px; background:transparent; color:var(--muted); font-size:.67rem; font-weight:800; white-space:nowrap; }
.office-view-switch button.active { background:var(--card); color:var(--purple); box-shadow:0 1px 5px #21172d18; }
.office-schedule-view .schedule-head,.office-schedule-view .schedule-row { grid-template-columns:48px minmax(200px,1.5fr) minmax(110px,.8fr) 86px 76px; }
.office-schedule-view .schedule-list { max-height:490px; }

@media(max-width:700px){
  .office-panel-heading { align-items:stretch; flex-direction:column; }
  .office-panel-actions { justify-items:stretch; }
  .office-view-switch,.office-panel-actions .schedule-controls { width:100%; }
  .office-view-switch button,.office-panel-actions .schedule-controls button { flex:1; }
  .office-schedule-view .schedule-head,.office-schedule-view .schedule-row { grid-template-columns:42px minmax(150px,1fr) 92px; }
  .office-schedule-view .schedule-head span:nth-child(3),.office-schedule-view .schedule-row .test-cell,.office-schedule-view .schedule-head span:nth-child(5),.office-schedule-view .schedule-row .ride-state { display:none; }
}

.unified-role-home { width:calc(100% - 24px); max-width:none; padding:12px 0 16px; }
#judgeHome { width:calc(100% - 24px); max-width:none; }
.judge-home-open { height:100svh; overflow:hidden; }
.judge-home-open .app-frame { height:100svh; display:flex; flex-direction:column; overflow:hidden; }
.judge-home-open .app-header { flex:0 0 auto; }
.judge-home-open #judgeHome { min-height:0; height:auto; flex:1 1 auto; padding-bottom:12px; display:flex; flex-direction:column; overflow:hidden; }
.judge-home-open #judgeHome .next-ride { flex:0 0 auto; }
.judge-home-open #judgeHome .schedule-panel { min-height:0; flex:1 1 auto; display:flex; flex-direction:column; overflow:hidden; }
.judge-home-open #judgeHome .schedule-list { min-height:0; max-height:none; flex:1 1 auto; overflow-y:auto; overscroll-behavior:contain; }
.operations-screen { width:100%; max-width:none; }
.dashboard-context { min-height:38px; display:flex; align-items:center; gap:9px; color:var(--muted); font-size:.72rem; }
.dashboard-context strong { color:var(--ink); font-size:.84rem; }
.dashboard-context .kicker { padding-right:9px; border-right:1px solid var(--line); }
.role-dashboard-grid { height:calc(100vh - 148px); min-height:520px; display:grid; grid-template-columns:minmax(0,1fr) minmax(330px,390px); gap:14px; }
.role-dashboard-shell { height:calc(100vh - 148px); min-height:520px; display:grid; grid-template-columns:210px minmax(0,1fr); gap:14px; }
.role-tool-rail { min-height:0; padding:10px; display:flex; flex-direction:column; gap:8px; border:1px solid var(--line); border-radius:12px; background:var(--card); box-shadow:0 5px 18px #241a3010; }
.tool-rail-heading { min-height:58px; padding:7px 8px 10px; display:grid; align-content:center; border-bottom:1px solid var(--line); }
.tool-rail-heading span { color:var(--purple); font-size:.6rem; font-weight:850; letter-spacing:.11em; text-transform:uppercase; }
.tool-rail-heading strong { margin-top:3px; color:var(--ink); font-size:.92rem; }
.role-tool-rail button { width:100%; min-height:70px; padding:9px; display:grid; grid-template-columns:38px minmax(0,1fr); align-items:center; gap:10px; border:1px solid transparent; border-radius:9px; background:transparent; color:var(--ink); text-align:left; }
.role-tool-rail button:hover,.role-tool-rail button:focus-visible { border-color:#cfc2e5; background:var(--purple-soft); outline:none; }
.role-tool-rail button i { width:36px; height:36px; display:grid; place-items:center; border-radius:9px; background:var(--purple-soft); color:var(--purple); font-style:normal; }
.role-tool-rail button i svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.role-tool-rail button span,.role-tool-rail button strong,.role-tool-rail button small { min-width:0; display:block; }
.role-tool-rail button strong { font-size:.74rem; }
.role-tool-rail button small { margin-top:4px; color:var(--muted); font-size:.58rem; line-height:1.25; }
.role-dashboard-shell .role-primary-panel { width:100%; height:100%; }
.role-primary-panel { min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.role-panel-heading { min-height:76px; flex:0 0 auto; gap:16px; }
.role-panel-actions { display:flex; align-items:center; gap:8px; }
.dashboard-view-switch { display:flex; padding:3px; border-radius:8px; background:var(--card-muted); }
.dashboard-view-switch button { min-height:34px; padding:0 12px; border:0; border-radius:6px; background:transparent; color:var(--muted); font-size:.67rem; font-weight:800; white-space:nowrap; }
.dashboard-view-switch button.active { background:var(--card); color:var(--purple); box-shadow:0 1px 5px #21172d18; }
.role-primary-panel > [id$="View"] { min-height:0; flex:1; display:flex; flex-direction:column; }
.role-primary-panel .schedule-list,.role-primary-panel .result-list { min-height:0; max-height:none; flex:1; overflow:auto; }
.role-primary-panel .schedule-head,.role-primary-panel .schedule-row { grid-template-columns:48px minmax(200px,1.5fr) minmax(120px,.8fr) 90px 80px; }
.role-primary-panel .result-head,.role-primary-panel .result-row { grid-template-columns:minmax(210px,1.35fr) minmax(110px,.75fr) 125px minmax(190px,auto); }
.result-actions { display:flex; justify-content:flex-end; gap:7px; }
.result-remove,.result-request { min-height:34px; padding:0 10px; border:1px solid #d3cadd; border-radius:6px; background:var(--card); color:#5530b5; font-size:.66rem; font-weight:800; white-space:nowrap; }
.result-remove { border-color:#d9b6b6; color:#8b2f35; }
.result-remove.confirming { border-color:#8b2f35; background:#8b2f35; color:#fff; }
.result-request:disabled { border-color:#ddd9e2; background:var(--card-muted); color:#8a858e; cursor:not-allowed; }
.role-sidebar { min-height:0; display:flex; flex-direction:column; align-content:stretch; gap:12px; }
.sidebar-customize { min-height:34px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.sidebar-customize strong,.sidebar-customize span { display:block; }
.sidebar-customize strong { color:var(--ink); font-size:.73rem; }
.sidebar-customize span { margin-top:2px; color:var(--muted); font-size:.6rem; }
.sidebar-customize button { min-height:32px; padding:0 12px; border:1px solid #d4cfda; border-radius:7px; background:var(--card); color:var(--purple); font-size:.67rem; font-weight:800; }
.widget-palette { flex:0 0 auto; padding:10px; border:1px dashed #bfb4d3; border-radius:10px; background:var(--purple-soft); }
.widget-palette p { margin:0 0 8px; color:var(--muted); font-size:.62rem; }
.widget-palette>div { display:flex; flex-wrap:wrap; gap:7px; }
.widget-palette button { min-height:32px; padding:0 10px; display:flex; align-items:center; gap:6px; border:1px solid #d7d0e0; border-radius:7px; background:var(--card); color:var(--ink); font-size:.64rem; font-weight:750; cursor:grab; }
.widget-palette button.active { border-color:#ad9bcf; background:var(--purple-soft); color:var(--purple); }
.widget-palette button:active,.dashboard-widget:active { cursor:grabbing; }
.dashboard-widget { min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.role-sidebar>.dashboard-widget { flex:1 1 0; min-height:160px; cursor:grab; transition:border-color .15s,box-shadow .15s,transform .15s,opacity .15s; }
.dashboard-widget.dragging,.widget-palette .dragging { opacity:.45; }
.dashboard-widget.drag-over { border-color:var(--purple); box-shadow:0 0 0 4px #5530b51f,0 8px 24px #5530b51a; transform:translateY(-2px); }
.widget-heading { flex:0 0 auto; justify-content:flex-start; gap:10px; }
.widget-heading>div { min-width:0; flex:1; }
.widget-drag-handle { color:#91879d; font-size:1rem; line-height:1; }
.widget-position { width:24px; height:24px; display:grid; place-items:center; border-radius:50%; background:var(--purple-soft); color:var(--purple); font-size:.62rem; font-weight:850; }
.widget-body { min-height:0; flex:1; display:flex; flex-direction:column; overflow:auto; }
.widget-footer { padding:9px 12px; border-top:1px solid var(--line); text-align:right; }
.widget-invite-form { grid-template-columns:minmax(0,1fr) minmax(0,1fr); padding:12px; }
.widget-invite-form input,.widget-invite-form select,.widget-invite-form button { height:36px; }
.dashboard-widget .invite-list { padding:0 12px 8px; }
.dashboard-widget .class-awards { padding:8px; }
.widget-stats { min-height:0; flex:1; display:grid; grid-template-columns:repeat(2,1fr); align-items:stretch; }
.widget-stats article { display:grid; place-content:center; gap:4px; padding:12px; text-align:center; border-right:1px solid var(--line); }
.widget-stats article:last-child { border-right:0; }
.widget-stats strong { color:var(--purple); font-size:1.55rem; }
.widget-stats span { color:var(--muted); font-size:.68rem; font-weight:700; }
.widget-ride-list article { min-height:50px; padding:8px 12px; display:grid; grid-template-columns:66px 1fr; align-items:center; gap:9px; border-bottom:1px solid var(--line); }
.widget-ride-list time { color:var(--purple); font-size:.72rem; font-weight:800; }
.widget-ride-list strong,.widget-ride-list span { display:block; }
.widget-ride-list strong { font-size:.73rem; }
.widget-ride-list span { margin-top:2px; color:var(--muted); font-size:.63rem; }
.empty-state.compact { padding:24px 12px; }
.dashboard-settings .tool-grid { grid-template-columns:1fr 1fr; padding:10px; }
.dashboard-settings .tool-grid button { min-height:38px; }
.dashboard-settings .tool-grid button:last-child { grid-column:1/-1; }

@media(max-width:1100px){
  .role-panel-heading { align-items:flex-start; flex-direction:column; }
  .role-panel-actions { width:100%; justify-content:space-between; }
  .role-dashboard-shell { grid-template-columns:82px minmax(0,1fr); }
  .tool-rail-heading { justify-items:center; }
  .tool-rail-heading strong { display:none; }
  .role-tool-rail button { min-height:64px; padding:7px 4px; grid-template-columns:1fr; justify-items:center; text-align:center; }
  .role-tool-rail button small { display:none; }
  .role-tool-rail button strong { margin-top:4px; font-size:.61rem; }
}

@media(max-width:980px){
  .role-dashboard-grid { height:auto; min-height:0; grid-template-columns:1fr; }
  .role-primary-panel { min-height:620px; }
  .role-sidebar { display:flex; }
  .dashboard-widget { min-height:210px; }
}

@media(max-width:700px){
  .dashboard-context { flex-wrap:wrap; }
  .unified-role-home,#judgeHome { width:calc(100% - 16px); }
  .role-dashboard-shell { height:auto; min-height:0; grid-template-columns:1fr; }
  .role-tool-rail { padding:7px; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); position:sticky; top:0; z-index:8; }
  .tool-rail-heading { display:none; }
  .role-tool-rail button { min-height:58px; }
  .role-panel-actions { align-items:stretch; flex-direction:column; }
  .dashboard-view-switch { width:100%; }
  .dashboard-view-switch button { flex:1; }
  .role-panel-actions > .quiet-action { width:100%; }
  .role-primary-panel .schedule-head,.role-primary-panel .schedule-row { grid-template-columns:42px minmax(150px,1fr) 92px; }
  .role-primary-panel .schedule-head span:nth-child(3),.role-primary-panel .schedule-row .test-cell,.role-primary-panel .schedule-head span:nth-child(5),.role-primary-panel .schedule-row .ride-state { display:none; }
}
.app-header { padding-left:20px; padding-right:20px; }
.brand { gap:14px; padding-left:0; padding-right:0; }
.brand-logo-frame { width:62px; height:62px; display:block; overflow:hidden; flex:0 0 62px; }
.brand-logo { width:100%; height:100%; display:block; object-fit:cover; transform:scale(1.48); }
.brand-copy { display:grid; justify-items:start; gap:4px; line-height:1; }
.brand-copy strong { font-size:1.38rem; letter-spacing:-.025em; }
.brand-copy small { color:var(--muted); font-size:.66rem; font-weight:700; letter-spacing:.025em; }
#judgeHome { padding-top:20px; }
#judgeHome .page-heading,#judgeHome .panel-heading { display:none; }
#judgeHome .next-ride { margin-bottom:18px; }
#judgeHome .schedule-head,#judgeHome .schedule-row { grid-template-columns:70px minmax(260px,1.5fr) minmax(180px,1fr) 120px 128px; }
#managerHome .schedule-head,#managerHome .schedule-row,#officeHome .schedule-head,#officeHome .schedule-row { grid-template-columns:70px minmax(220px,1.5fr) minmax(150px,1fr) 95px 80px; }
#judgeHome .schedule-list { max-height:calc(100svh - 280px); }
#judgeHome .schedule-panel { overflow:hidden; }
#judgeHome .schedule-list { overflow-y:auto; overflow-x:hidden; }
#judgeHome .schedule-row:last-child { border-bottom:0; }

@media (orientation:portrait) and (max-width:1100px) {
  body.judging-test-open .test-workspace { grid-template-columns:minmax(0,1.55fr) minmax(310px,.9fr); }
  body.judging-test-open .movement-head,body.judging-test-open .movement-row { grid-template-columns:32px 82px minmax(155px,1fr) 54px 54px; }
  body.judging-test-open .movement-comment,body.judging-test-open .movement-head span:last-child { display:none; }
}
@media (max-width:700px) {
  .app-header { padding-left:10px; padding-right:10px; }
  .brand { gap:9px; }
  .brand-logo-frame { width:46px; height:46px; flex-basis:46px; }
  .brand-copy strong { font-size:1.05rem; }
  .brand-copy small { font-size:.54rem; }
}
