[hidden] { display: none !important; }

.planner-shell {
  min-width: 320px;
  min-height: 100dvh;
  overflow: hidden;
}

.planner-topbar nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.planner-message {
  min-height: calc(100dvh - 80px);
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 40px 20px;
  text-align: center;
}

.planner-message h1 {
  margin: 0 0 18px;
  font: 400 clamp(44px, 8vw, 86px)/.9 var(--serif);
  letter-spacing: -.045em;
}

.planner-workspace {
  height: calc(100dvh - 80px);
  min-height: 640px;
  display: grid;
  grid-template-columns: 188px minmax(520px, 1fr) 350px;
  border-top: 1px solid var(--rule);
  overflow: hidden;
}

.hole-loading {
  position: absolute;
  inset: 0;
  z-index: 650;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  font: 11px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--moss);
}

.hole-loading[hidden] { display: none; }

.hole-rail,
.strategy-panel {
  min-width: 0;
  overflow-y: auto;
  background: var(--surface);
}

.hole-rail {
  display: flex;
  flex-direction: column;
  padding: 24px 16px 30px;
  border-right: 1px solid var(--rule);
}

.strategy-panel {
  padding: 27px 22px 42px;
  border-left: 1px solid var(--rule);
}

.rail-heading {
  flex: none;
  display: grid;
  gap: 7px;
  padding: 0 5px 18px;
  border-bottom: 1px solid var(--rule);
}

.rail-heading .kicker { margin-bottom: 6px; }

.rail-heading label {
  font: 9px var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.rail-heading select,
.shot-club-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  width: 100%;
  height: 40px;
  padding: 8px 36px 8px 10px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2317251B' stroke-width='1.5'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-repeat: no-repeat;
  background-size: 12px 8px;
  color: var(--ink);
  font-weight: 700;
}

.rail-heading select:hover,
.shot-club-select:hover { border-color: var(--moss); }

.rail-heading select option,
.shot-club-select option { background: var(--surface); color: var(--ink); }

.course-select-label { display: none; }

.hole-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 14px 0;
}

.hole-button {
  position: relative;
  min-height: 48px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

.hole-button:hover { border-color: var(--rule); }
.hole-button.is-active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.hole-button strong { font: 400 18px/1 var(--serif); }
.hole-button small { font: 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }

.hole-plan-status {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--surface);
  border-radius: 50%;
  background: var(--danger);
}

.hole-button.is-saved .hole-plan-status { background: var(--moss); }
.hole-button.is-active.is-saved .hole-plan-status { background: var(--lime); }

.panel-intro,
.panel-note,
.method-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.plan-actions { flex: none; display: grid; gap: 9px; margin-top: 11px; }
.plan-actions .button { width: 100%; gap: 8px; padding-inline: 6px; font-size: 13px; white-space: nowrap; }
.plan-actions svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; }
.plan-actions .button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.plan-print-action { position: relative; }
.plan-print-tooltip { position: absolute; z-index: 900; bottom: calc(100% + 8px); left: 0; width: 100%; margin: 0; padding: 10px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font-size: 12px; }
.plan-print-summary { margin: 0; color: var(--muted); font-size: 11px; text-align: center; }

.panel-note:empty { display: none; }

.map-column {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: var(--ink);
}

.map-stage,
.course-map {
  position: absolute;
  inset: 0;
}

.map-view-controls button {
  padding: 9px 14px;
  border: 0;
  border-right: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  font: 10px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.map-view-controls button:last-child { border-right: 0; }

.map-view-controls button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.hole-map-card,
.map-corner,
.hole-navigation,
.map-instruction,
.plan-save-status {
  position: absolute;
  z-index: 700;
}

.hole-map-card,
.map-view-controls,
.hole-navigation,
.map-instruction,
.plan-save-status {
  border: 1px solid var(--ink);
  background: var(--paper);
}

.hole-map-card {
  top: 18px;
  left: 18px;
  min-width: 245px;
  padding: 13px 15px;
}

.hole-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hole-heading .kicker { margin-bottom: 2px; }
.hole-heading h1 { margin: 0; font: 400 38px/1 var(--serif); letter-spacing: -.035em; }
.mapping-warning { max-width: 120px; color: var(--danger); font: 9px var(--mono); text-transform: uppercase; }

.map-corner {
  top: 18px;
  right: 18px;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.map-compass {
  width: 64px;
  height: 64px;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.map-compass svg { display: block; width: 100%; height: 100%; }

.map-compass-ring,
.map-compass-ticks {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linecap: square;
}

.map-compass-south { fill: var(--ink); opacity: .28; }
.map-compass-north { fill: var(--danger); }
.map-compass-center { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }

#map-compass-north-label {
  fill: var(--danger);
  font: 700 9px var(--mono);
  text-anchor: middle;
}

.map-view-controls {
  display: flex;
}

.tee-readout {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0;
  padding: 0;
}

.tee-readout span {
  color: var(--muted);
  font: 9px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tee-readout strong { font-size: 12px; }

.map-instruction {
  left: 50%;
  bottom: 12px;
  max-width: 220px;
  margin: 0;
  padding: 8px 10px;
  font-size: 10px;
  text-align: center;
  transform: translateX(-50%);
}

.hole-navigation {
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
}

.hole-navigation .button { min-height: 38px; padding: 8px 12px; font-size: 11px; }
.hole-navigation span { min-width: 48px; text-align: center; font: 10px var(--mono); color: var(--muted); }

.plan-save-status {
  right: 12px;
  bottom: 64px;
  max-width: 360px;
  margin: 0;
  padding: 8px 10px;
  color: var(--moss);
  font-size: 11px;
}

.plan-save-status:empty { display: none; }

.coverage-state {
  position: absolute;
  z-index: 650;
  top: 105px;
  left: 18px;
  width: min(245px, calc(100% - 36px));
  padding: 14px;
  border: 1px solid var(--ink);
  background: var(--paper);
  pointer-events: none;
  text-align: left;
}

.coverage-state p:not(.kicker) { max-width: 30ch; margin-bottom: 0; }

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--ink);
}

.panel-heading .kicker { margin-bottom: 3px; }
.panel-heading h2 { margin: 0; font: 400 35px/1 var(--serif); letter-spacing: -.035em; }
.panel-heading .button { min-height: 38px; padding: 8px 10px; font-size: 11px; }
.panel-intro { margin: 15px 0; }

.strategy-layers {
  display: grid;
  gap: 8px;
  padding: 11px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.strategy-layers label,
.shot-settings label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
}

.strategy-layers input,
.shot-settings input { accent-color: var(--moss); }

.par3-target-editor { display: grid; gap: 14px; margin-top: 15px; }
.green-slope-details {
  display: grid;
  gap: 7px;
}
.green-slope-legend {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 8px;
  align-items: center;
}
.green-slope-legend > span {
  grid-row: 1 / 3;
  color: var(--muted);
  font: 700 9px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.green-slope-legend img {
  display: block;
  width: 100%;
  height: 8px;
  border: 1px solid var(--rule);
}
.green-slope-legend div {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  color: var(--muted);
  font: 8px var(--mono);
  text-align: center;
}
.green-slope-summary {
  min-height: 17px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}
.target-green-preview { border: 1px solid var(--rule); background: var(--paper); }
.target-green-preview svg { display: block; width: 100%; aspect-ratio: 1 / 1; }
.target-green-shape { fill: var(--paper); }
.target-available-shape { fill: var(--lime); fill-opacity: .42; }
.target-green-slope-heatmap { opacity: .94; }
.target-green-slope-arrow-halo {
  fill: var(--paper);
  stroke: var(--paper);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.target-green-slope-arrow {
  fill: var(--ink);
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: .8;
  vector-effect: non-scaling-stroke;
}
.target-green-slope-exclusion-veil { fill: var(--paper); fill-opacity: .58; }
.target-green-slope-boundary { pointer-events: none; }
.target-green-outline { stroke: var(--moss); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.target-active-edge { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; pointer-events: none; vector-effect: non-scaling-stroke; }
.target-active-edge[hidden] { display: none; }
.target-context-bunker { fill: var(--sand); stroke: var(--moss); stroke-opacity: .55; stroke-width: 1; vector-effect: non-scaling-stroke; }
.target-grid-line { fill: none; stroke: var(--moss); stroke-opacity: .28; stroke-width: .7; vector-effect: non-scaling-stroke; }
.target-grid-line.is-ten { stroke-opacity: .5; stroke-width: 1; }
.target-edge-hit-area { stroke: transparent; stroke-width: 34; pointer-events: stroke; cursor: pointer; vector-effect: non-scaling-stroke; }
.target-edge-actions[hidden] { display: none; }
.target-edge-action { cursor: pointer; outline: none; }
.target-edge-action-box { fill: var(--paper); stroke: var(--ink); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.target-edge-action:hover .target-edge-action-box,
.target-edge-action:focus .target-edge-action-box { fill: var(--surface); stroke: var(--moss); stroke-width: 2.5; }
.target-edge-action-symbol { fill: var(--ink); font: 700 13px/1 var(--sans); pointer-events: none; }
.target-edge-action.is-disabled { cursor: default; }
.target-edge-action.is-disabled .target-edge-action-box,
.target-edge-action.is-disabled:hover .target-edge-action-box,
.target-edge-action.is-disabled:focus .target-edge-action-box { fill: var(--surface); stroke: var(--rule); stroke-width: 1.25; }
.target-edge-action.is-disabled .target-edge-action-symbol { fill: var(--muted); }

.target-controls { display: grid; gap: 8px; }
.target-controls-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.target-reset-button {
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  font: 700 9px var(--mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.target-reset-button:hover { border-color: var(--moss); background: var(--surface); }
.target-control {
  display: grid;
  grid-template-columns: 52px 32px 50px 20px 32px;
  gap: 6px;
  align-items: center;
}
.target-control label { color: var(--muted); font: 700 9px var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.target-control button,
.target-control input {
  height: 34px;
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--ink);
  background: var(--paper);
}
.target-control button { cursor: pointer; font-size: 17px; }
.target-control button:hover { border-color: var(--moss); background: var(--surface); }
.target-control input { width: 100%; padding: 5px; font: 700 15px var(--serif); text-align: center; }
.target-control .target-unit { color: var(--muted); font: 9px var(--mono); }
.target-summary { display: grid; grid-template-columns: 1fr; border: 1px solid var(--rule); }
.target-summary span { display: grid; gap: 4px; padding: 10px; color: var(--muted); font: 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.target-summary span + span { border-left: 1px solid var(--rule); }
.target-summary strong { color: var(--ink); font: 400 23px/1 var(--serif); letter-spacing: 0; text-transform: none; }
.target-validation { min-height: 18px; margin: 0; color: var(--danger); font-size: 11px; }
.target-validation:empty { display: none; }
.remove-par3-target { justify-self: start; }
.strategy-layers label.is-disabled { color: var(--muted); }

.shot-options { display: grid; gap: 9px; margin-top: 15px; }

.shot-option {
  padding: 12px;
  border: 1px solid var(--rule);
  background: var(--paper);
  cursor: pointer;
}

.shot-option.is-selected { border: 2px solid var(--ink); padding: 11px; background: var(--surface); }
.shot-option-top { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; }
.shot-select {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}
.shot-select[aria-pressed="true"] { border-color: var(--ink); background: var(--surface); }
.shot-color { width: 9px; height: 9px; border-radius: 50%; }
.remove-shot { width: 28px; height: 28px; border: 0; background: transparent; cursor: pointer; font-size: 18px; }
.remove-shot:hover { color: var(--danger); }

.shot-distance-readouts {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.shot-distance-row {
  display: grid;
  grid-template-columns: 40px 54px 62px minmax(74px, 1fr);
  gap: 4px;
  align-items: baseline;
  font: 9px var(--mono);
  font-variant-numeric: tabular-nums;
}

.shot-distance-row.is-elevation-unavailable {
  grid-template-columns: 40px 54px minmax(74px, 1fr);
}

.shot-distance-label {
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.shot-distance-row strong {
  font: 700 14px var(--mono);
  color: var(--ink);
  white-space: nowrap;
}

.shot-distance-actual { color: var(--muted); white-space: nowrap; }
.shot-distance-elevation { color: var(--moss); }
.shot-distance-status { margin: 0; color: var(--muted); font-size: 10px; }

.shot-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 10px;
}

.shot-summary span { display: grid; gap: 2px; font: 8px var(--mono); text-transform: uppercase; color: var(--muted); }
.shot-summary strong { font: 700 13px var(--sans); color: var(--ink); text-transform: none; }

.shot-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--rule);
}

.empty-plan { padding: 18px; border: 1px dashed var(--rule); color: var(--muted); font-size: 12px; }
.selected-result { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--ink); }
.sg-result { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.sg-result span { color: var(--muted); font-size: 11px; }
.sg-result strong { font: 400 29px/1 var(--serif); }
.sg-result strong.is-positive { color: var(--moss); }
.sg-result strong.is-negative { color: var(--danger); }
.surface-results { display: grid; gap: 8px; padding: 14px 0 12px; border-bottom: 1px solid var(--rule); }
.modeled-outcomes-status { margin: 0; color: var(--muted); font-size: 10px; }
.surface-bar { display: grid; grid-template-columns: 64px minmax(40px, 1fr) 34px; gap: 8px; align-items: center; }
.surface-bar-label,
.surface-bar-value { font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.surface-bar-label { color: var(--muted); }
.surface-bar-value { color: var(--ink); text-align: right; }
.surface-bar-track { display: block; height: 8px; background: var(--sand); }
.surface-bar-fill { display: block; height: 100%; background: var(--muted); }
.surface-bar[data-surface="fairway"] .surface-bar-fill,
.surface-bar[data-surface="recovery"] .surface-bar-fill { background: var(--moss); }
.print-payload-export { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
.print-payload-export .button { min-height: 38px; padding: 8px 12px; font-size: 11px; }

.strategy-target-hit-area { border: 0; background: transparent; cursor: grab; }
.strategy-target-hit-area:active { cursor: grabbing; }

.strategy-target-label {
  border: 0;
  background: transparent;
  pointer-events: none;
}

.strategy-target-label strong {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  min-width: 24px;
  padding: 3px 5px;
  border: 1px solid var(--ink);
  border-top: 3px solid var(--target-color);
  background: var(--paper);
  font: 700 9px var(--mono);
  text-align: center;
  white-space: nowrap;
}

.strategy-target-label.is-active strong {
  padding: 2px 4px;
  border-width: 2px;
  background: var(--surface);
}

.leaflet-control-zoom a { border-radius: 0 !important; color: var(--ink); }

button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible,
.hole-button:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  .planner-workspace { grid-template-columns: 150px minmax(430px, 1fr) 310px; }
  .strategy-panel { padding-inline: 16px; }
}

@media (max-width: 880px) {
  .planner-shell { overflow: auto; }
  .planner-workspace { height: auto; min-height: 0; grid-template-columns: 1fr; overflow: visible; }
  .hole-rail { border-right: 0; border-bottom: 1px solid var(--rule); padding: 14px; }
  .rail-heading { grid-template-columns: 1fr; align-items: end; }
  .rail-heading .kicker { grid-column: 1 / -1; margin: 0; }
  .hole-list { grid-template-columns: repeat(7, minmax(46px, 1fr)); overflow-x: auto; }
  .map-column { height: 70dvh; min-height: 540px; }
  .strategy-panel { border-left: 0; border-top: 1px solid var(--rule); }
  .shot-options { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

@media (max-width: 620px) {
  .map-column { min-height: 590px; }
  .hole-map-card { top: 58px; left: 10px; min-width: 200px; padding: 10px 12px; }
  .hole-heading h1 { font-size: 30px; }
  .map-corner { top: 58px; right: 10px; }
  .coverage-state { top: 225px; left: 10px; width: min(240px, calc(100% - 20px)); }
  .map-instruction { display: none; }
  .hole-navigation span { display: none; }
  .strategy-panel { padding: 22px 14px 34px; }
  .target-green-preview svg { max-height: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
