:root{
  --projection-cream:#f8e8bc;
  --projection-paper:#efe0b6;
  --projection-forest:#173d34;
  --projection-walnut:#4d2d1c;
  --projection-brass:#d1a943;
  --projection-coral:#c85e3d;
  --projection-muted:#6d5a43;
}

.branch-projection{
  position:absolute;
  z-index:19;
  left:50%;
  bottom:16px;
  width:min(980px,calc(100vw - 330px));
  max-height:min(330px,44vh);
  color:#2c281f;
  pointer-events:none;
  transform:translateX(-50%);
}
.branch-projection[hidden]{display:none}
.has-branch-projection .coach-explorer,.has-branch-projection .results-explorer{visibility:hidden;pointer-events:none}
.branch-projection-card{
  pointer-events:auto;
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr) auto;
  max-height:inherit;
  overflow:hidden;
  border:3px solid var(--projection-walnut);
  border-radius:9px;
  background:linear-gradient(180deg,#f6e8c2f7,#e5cf99f7);
  box-shadow:inset 0 0 0 2px var(--projection-brass),0 18px 48px #28170d88;
  backdrop-filter:blur(12px);
}
.branch-projection-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:11px 13px 9px;
  border-bottom:1px solid #947248;
  background:linear-gradient(180deg,#214f42,#12382f);
}
.branch-projection-header span{
  color:#efc765;
  font-size:8px;
  font-weight:950;
  letter-spacing:.15em;
  text-transform:uppercase;
}
.branch-projection-header h2{
  margin:2px 0 1px;
  color:#fff1c8;
  font-family:Georgia,"Times New Roman",serif;
  font-size:20px;
  line-height:1.05;
}
.branch-projection-header p{
  margin:0;
  color:#dfd3b5;
  font-size:9px;
  line-height:1.35;
}
.branch-projection-header>button{
  width:34px;
  height:34px;
  flex:0 0 auto;
  border:1px solid #d2ae56;
  border-radius:5px;
  background:#4f301f;
  color:#fff0c4;
  cursor:pointer;
  font-size:22px;
}
.branch-projection-header>button:hover,.branch-projection-header>button:focus-visible{background:#8b422d;outline:2px solid #f2d27c;outline-offset:2px}
.branch-projection-notice{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 12px;
  border-bottom:1px solid #b18e56;
  background:#f4e4bb;
}
.branch-projection-notice p{margin:0;color:#3c3327;font-size:9px;font-weight:750;line-height:1.35}
.branch-projection-notice>div{display:flex;flex:0 0 auto;gap:6px}
.branch-projection-notice button{
  min-height:30px;
  padding:0 9px;
  border:1px solid #805334;
  border-radius:5px;
  background:#603a24;
  color:#ffecc1;
  cursor:pointer;
  font-size:8px;
  font-weight:900;
}
.branch-projection-notice button:hover,.branch-projection-notice button:focus-visible{background:#17473c;outline:2px solid #d5ae4d;outline-offset:1px}
.branch-projection-notice button:disabled{opacity:.42;cursor:default}
.branch-projection-layout{min-height:0;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(260px,.75fr)}
.branch-projection-candidates,.branch-projection-evidence{min-height:0;overflow:auto;padding:10px 12px}
.branch-projection-candidates{border-right:1px solid #a6824f}
.branch-projection-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.branch-projection-section-heading h3{margin:0;color:#263d31;font-family:Georgia,"Times New Roman",serif;font-size:12px}
.branch-projection-section-heading>span{color:#a04730;font-size:8px;font-weight:900;text-transform:uppercase}
.branch-projection-candidates>p,.branch-projection-evidence>p{margin:4px 0 8px;color:#5d4f3d;font-size:8px;line-height:1.4}
#branchProjectionCandidates{display:flex;gap:7px;overflow-x:auto;padding:1px 1px 5px;scroll-snap-type:x proximity}
.branch-candidate{
  flex:0 0 190px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:7px;
  padding:8px;
  border:1px solid #98764b;
  border-radius:6px;
  background:#f9edcef5;
  color:#302820;
  text-align:left;
  cursor:pointer;
  scroll-snap-align:start;
}
.branch-candidate strong,.branch-candidate small,.branch-candidate em{display:block}
.branch-candidate strong{font-family:Georgia,"Times New Roman",serif;font-size:10px}
.branch-candidate small{margin-top:2px;color:#71604c;font-size:7px;line-height:1.3}
.branch-candidate em{color:#9d4a32;font-size:7px;font-style:normal;font-weight:900}
.branch-candidate:hover,.branch-candidate:focus-visible{border-color:#b4472d;background:#fff6df;outline:2px solid #d5ae4d;outline-offset:1px}
.branch-candidate.is-selected{border-color:#214f42;background:#dce8ce;box-shadow:inset 0 0 0 2px #6c9667}
.branch-candidate:disabled{border-style:dashed;cursor:not-allowed;opacity:.58}
.branch-candidate-empty{margin:0!important;padding:9px;border:1px dashed #9d7b50;border-radius:6px}
#branchProjectionEvidenceRows{display:flex;gap:5px;overflow-x:auto;margin:0;padding:0 0 4px;list-style:none}
#branchProjectionEvidenceRows li{flex:0 0 auto;padding:6px 8px;border:1px solid #a38151;border-radius:5px;background:#f8e9c5}
#branchProjectionEvidenceRows strong,#branchProjectionEvidenceRows span{display:block}
#branchProjectionEvidenceRows strong{color:#32483a;font-size:8px}
#branchProjectionEvidenceRows span{margin-top:2px;color:#6d5b46;font-size:7px}
#branchProjectionSources{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}
#branchProjectionSources a{color:#8f402c;font-size:8px;font-weight:850;text-decoration:none}
#branchProjectionSources a:hover,#branchProjectionSources a:focus-visible{color:#17473c;text-decoration:underline;outline:none}
.branch-projection-order-note{padding:6px;border:1px solid #aa744c;border-radius:5px;background:#f2d7b0;color:#633c2d!important}
.branch-projection-status{margin:0;padding:7px 12px;border-top:1px solid #9d7948;background:#e2ca94;color:#4e402f;font-size:8px;line-height:1.35}
.worked-under-reframe{flex:0 0 auto;min-width:27px;min-height:25px;padding:0 6px;border:0;border-left:1px solid #76522e;background:#684027;color:#ffe4a6;cursor:pointer;font:inherit;font-weight:900}
.worked-under-reframe:hover,.worked-under-reframe:focus-visible{background:#1d5648;color:#fff;outline:none}
.coach-season-key{margin:0;padding:7px 10px;border-top:1px solid #8b704a;background:#e7d5ab;color:#584a39;font-size:8px;line-height:1.4}
.coach-season-key strong{color:#8f3d28}

@media(max-width:900px){
  .branch-projection{left:8px;right:8px;bottom:8px;width:auto;max-height:42vh;transform:none}
  .branch-projection-layout{display:block;overflow:auto}
  .branch-projection-candidates{border-right:0;border-bottom:1px solid #a6824f}
  .branch-projection-evidence{overflow:visible}
}
@media(max-width:720px){
  .branch-projection{bottom:calc(8px + env(safe-area-inset-bottom));max-height:46vh}
  .branch-projection-header{padding:9px 10px 7px}
  .branch-projection-header h2{font-size:17px}
  .branch-projection-header p{max-width:72vw}
  .branch-projection-notice{align-items:flex-start;padding:7px 9px}
  .branch-projection-notice>div{display:grid;grid-template-columns:1fr}
  .branch-projection-candidates,.branch-projection-evidence{padding:8px 9px}
  .branch-candidate{flex-basis:170px}
}
@media(prefers-reduced-motion:reduce){.branch-projection-card{backdrop-filter:none}}
