.pitch-map {
  --ink:#18271d;
  --quiet:#4d6251;
  --dark:#22392a;
  --dark-green:#294932;
  --lime:#f7c18a;
  --paper:#e4ebd9;
  --white:#fbfcf6;
  --line:#d5dfcf;
  --warn:#9d3525;
}
.pitch-map[data-page=plan],.pitch-map[data-page=run],.pitch-map[data-page=library] { overflow:hidden; }
.pitch-map:not([data-page=saved]) > header { display:none; }
.pitch-map:not([data-page=saved]) #app { padding:0; margin:0; max-width:none; }
.pm-screen { width:100%; height:100dvh; position:relative; isolation:isolate; background:#dfe8d3; }
.pm-screen #pm-pitch { display:block; width:100%; height:100%; position:absolute; inset:0; touch-action:manipulation; }
.pitch-map[data-page=plan] #pm-pitch { cursor:crosshair; }
.pm-top {
  position:absolute; inset:max(10px,env(safe-area-inset-top)) 14px auto;
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:7px;
  pointer-events:none;
}
.pm-top>* { pointer-events:auto; }
.pitch-map .pm-float {
  background:#fbfcf5f5; color:#243329; border-color:#f8faf4;
  border-radius:999px; padding-inline:15px; min-height:46px; justify-self:start;
  box-shadow:0 2px 6px #394a391e;
}
.pitch-map .pm-float:last-child { justify-self:end; }
.pm-brand {
  color:#294533; font-weight:830; font-size:.81rem; letter-spacing:.015em;
  padding:8px 10px; background:#eff4e6db; border-radius:99px; text-align:center;
}
.pm-rail {
  position:absolute; top:79px; right:14px;
  display:grid; background:#f8faf1f7; border:1px solid #f4f6ea;
  border-radius:16px; overflow:hidden; box-shadow:0 2px 7px #35443225;
}
.pitch-map .pm-rail .btn {
  width:52px; min-height:50px; display:grid; align-content:center; justify-items:center; gap:2px;
  border:0; border-radius:0; padding:4px; color:#24392b; background:transparent;
}
.pitch-map .pm-rail .btn + .btn { border-top:1px solid #dbe2d5; }
.pitch-map .pm-rail .btn[aria-pressed=true] { background:#f5dfca; color:#71351e; }
.pm-rail .btn span { font-size:1.35rem; line-height:.9; }
.pm-rail .btn small { font-size:.68rem; font-weight:780; }
.pm-eraser { display:block; width:15px; height:11px; border:1.5px solid currentColor; transform:rotate(-28deg); border-radius:2px; margin-block:2px; }
.pm-dock {
  position:absolute; inset:auto 0 max(0px,env(safe-area-inset-bottom));
  display:grid; gap:7px; width:min(100%,620px); margin-inline:auto; padding:0 12px 11px;
  pointer-events:none;
}
.pm-dock>* { pointer-events:auto; min-width:0; }
.pm-map-tools { display:grid; gap:7px; justify-items:center; }
.pm-palette {
  max-width:100%; display:flex; gap:4px; overflow:auto;
  padding:4px 5px 4px; background:#fbfcf5f5; border:1px solid #e1e9d9;
  border-radius:16px; box-shadow:0 2px 8px #3f4e3825; scrollbar-width:none;
}
.pitch-map .pm-palette .btn { flex:none; min-height:42px; padding:5px 11px; border-radius:12px; border:0; background:transparent; }
.pitch-map .pm-palette .btn[aria-pressed=true] { background:#294932; color:#fff; }
.pm-mode {
  display:flex; padding:4px; background:#ebf0e3; border:1px solid #f8faf2;
  border-radius:999px; box-shadow:0 2px 7px #38443727;
}
.pitch-map .pm-mode .btn { min-width:64px; min-height:44px; padding:6px 12px; border:0; border-radius:999px; color:#324638; background:transparent; }
.pitch-map .pm-mode .btn[aria-pressed=true] { background:#fff; box-shadow:0 1px 3px #28342723; color:#203727; }
.pm-hint {
  width:min(100%,436px);
  margin:0; padding:9px 12px; min-height:40px;
  background:#253a2cea; color:#fcfff7; border-radius:12px; font-size:.88rem; line-height:1.35; text-align:center;
}
.pm-label {
  display:flex; gap:8px; align-items:center; padding:5px 10px;
  background:#fff; border-radius:10px; font-size:.85rem; font-weight:730;
}
.pm-label input { width:130px; min-height:39px; padding:4px 6px; border:1px solid #a8baa8; border-radius:6px; }
.pm-sheet {
  padding:0 14px 13px;
  background:#fbfcf6;
  border:1px solid #fbfcf5;
  border-radius:21px;
  box-shadow:0 8px 22px #293c2b30;
}
.pm-sheet.pm-expanded { padding-top:12px; max-height:min(66dvh,630px); overflow:auto; overscroll-behavior:contain; }
.pm-sheet .btn { min-height:44px; padding:7px 11px; border-radius:11px; border-color:#d3dfcf; background:#f1f5ed; color:#243c2c; }
.pm-sheet .btn.primary { background:#294932; border-color:#294932; color:#fff; }
.pm-handle {
  position:relative; min-height:34px; width:100%; display:grid; place-items:center;
  border:0; background:transparent; color:#273a2e;
}
.pm-handle span { width:35px; height:4px; background:#b2bfad; border-radius:9px; }
.pm-handle small { position:absolute; right:0; color:#415c49; font-size:.76rem; font-weight:740; }
.pm-sheet-title { display:flex; align-items:center; justify-content:space-between; gap:9px; }
.pm-sheet-title p,.pm-panel-heading p { color:#4d6452; font-size:.78rem; margin-bottom:3px; font-weight:720; }
.pm-sheet h1 {
  font-size:clamp(1.18rem,3vw,1.75rem); letter-spacing:-.037em; line-height:1.06; font-weight:850; overflow-wrap:anywhere;
}
.pm-duration {
  flex:none; color:#5e3b26; background:#f3e2ce; padding:8px 9px;
  border-radius:999px; font-weight:820; font-size:.85rem; white-space:nowrap;
}
.pm-summary-actions {
  display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:7px;
  border-top:1px solid #dbe4d6; padding-top:10px; margin-top:10px;
}
.pm-minutes { display:grid; gap:2px; min-width:0; }
.pm-minutes strong { display:flex; align-items:baseline; flex-wrap:wrap; gap:3px; }
.pm-minutes strong span { font-size:1.65rem; line-height:1; letter-spacing:-.06em; }
.pm-minutes small,.pm-run-actions small { color:#4a6552; font-size:.76rem; }
.pm-minutes [data-out-of] { white-space:nowrap; }
.pm-minutes [data-budget-status] { font-weight:730; color:#355844; }
.pm-minutes.over [data-budget-status] { color:#a23b29; }
.pm-run-actions { grid-template-columns:auto minmax(0,1fr) auto; }
.pm-run-actions strong,.pm-run-actions small { display:block; }
.pm-run-actions strong { font-size:.89rem; line-height:1.2; overflow-wrap:anywhere; }
.pm-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; padding-bottom:10px; }
.pm-panel-heading p { margin:4px 0 0; }
.pm-cue { font-size:1rem; line-height:1.44; margin-bottom:11px; overflow-wrap:anywhere; }
.pitch-map .pm-expanded .drill-instructions { border-radius:9px; margin-block:6px; background:#edf4e8; }
.pitch-map .pm-expanded .drill-instructions summary { min-height:43px; }
.pitch-map .pm-expanded .legend { border-radius:8px; margin-top:8px; }
.pitch-map .pm-expanded .budget { margin-bottom:10px; }
.pm-order { border:1px solid #dbe3d6; border-radius:8px; overflow:hidden; }
.pm-order .pm-order-time { font-size:.85rem; font-weight:740; white-space:nowrap; }
.pm-tools { display:flex; flex-wrap:wrap; gap:7px; margin-top:11px; }
.pitch-map .pm-expanded .chips { flex-wrap:nowrap; overflow:auto; padding-bottom:5px; }
.pitch-map .pm-expanded .chips button { flex:none; min-height:44px; }
.pm-library-item {
  display:grid; grid-template-columns:minmax(80px,24%) minmax(0,1fr) auto; gap:7px; align-items:center;
  padding:9px 0; border-top:1px solid #dbe3d6;
}
.pm-library-item h2 { font-size:1rem; overflow-wrap:anywhere; }
.pm-library-item small { color:var(--quiet); font-size:.8rem; }
.pm-library-item .pitch-frame { border-radius:5px; overflow:hidden; }
.pm-library-item .drill-instructions { grid-column:1/-1; }
.pitch-map:not([data-page=saved]) .toast { bottom:auto; top:63px; }
@media (max-width:375px) {
  .pm-top { inset-inline:8px; gap:4px; }
  .pitch-map .pm-float { padding-inline:11px; font-size:.81rem; }
  .pm-brand { font-size:.74rem; padding-inline:6px; }
  .pm-rail { right:9px; }
  .pitch-map .pm-rail .btn { width:46px; }
  .pm-dock { padding-inline:7px; padding-bottom:7px; }
  .pm-sheet { padding-inline:10px; }
  .pm-summary-actions { gap:5px; }
  .pm-sheet .btn { font-size:.8rem; padding-inline:8px; }
}
