.map-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.map-page .site-header { flex: none; }
.map-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.map-viewport {
  flex: 1;
  min-height: 280px;
  position: relative;
  overflow: hidden;
  touch-action: none;
  background:
    radial-gradient(circle at 1px 1px, rgba(30, 42, 68, 0.06) 1px, transparent 0) 0 0 / 24px 24px,
    var(--off-white);
}
.map-world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.map-edges {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: visible;
  pointer-events: none;
}
.edge-support { stroke: var(--teal); fill: none; stroke-width: 2.5; stroke-linecap: round; }
.edge-objection { stroke: var(--coral); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 7 6; }
.map-card {
  position: absolute;
  left: 0;
  top: 0;
  width: 240px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: grab;
  touch-action: none;
}
.map-card[data-kind="claim"] { width: 300px; }
.map-card.is-dragging { cursor: grabbing; z-index: 3; }
.map-card-pop {
  background: var(--card);
  color: var(--navy);
  border-radius: 16px;
  box-shadow: var(--shadow-1);
  padding: 12px 14px 12px 16px;
  font-size: 15px;
  line-height: 1.35;
}
.map-card[data-kind="claim"] .map-card-pop {
  background: var(--navy);
  color: var(--off-white);
  padding: 16px 18px;
  font-size: 17px;
}
.map-card[data-kind="support"] .map-card-pop { border-left: 4px solid var(--teal); }
.map-card[data-kind="objection"] .map-card-pop { border-left: 4px solid var(--coral); }
.map-card.is-selected .map-card-pop { box-shadow: var(--shadow-2); }
.map-card:focus-visible .map-card-pop { outline: 3px solid var(--amber); outline-offset: 3px; }
.map-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.map-card-pop { position: relative; }
.map-attack {
  position: static;
  flex: none;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.map-attack svg { display: block; }
.map-attack:disabled { opacity: 0.45; }
.map-card[data-kind="claim"] .map-attack {
  background: rgba(250, 247, 242, 0.12);
  border-color: rgba(250, 247, 242, 0.4);
}
.map-card.is-weakest .map-card-pop {
  box-shadow: 0 0 0 3px var(--amber), var(--shadow-1);
}
.map-card.is-pulsing .map-card-pop::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 20px;
  border: 3px solid var(--amber);
  pointer-events: none;
  animation: amber-pulse 640ms ease-in-out 2;
}
@keyframes amber-pulse {
  0%, 100% { opacity: 0.95; transform: scale(1); }
  50% { opacity: 0.25; transform: scale(1.045); }
}
.map-bolt {
  position: absolute;
  right: 14px;
  top: 16px;
  width: 22px;
  height: 22px;
  color: var(--amber);
  pointer-events: none;
  z-index: 3;
}
.map-card.is-attack-shake .map-card-pop { animation: map-shake 280ms ease-in-out; }
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-1);
}
.map-toast .chip { background: var(--amber); color: var(--navy); }
.chip:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.map-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
}
.map-chip-support { background: var(--teal); color: white; }
.map-chip-objection { background: var(--coral); color: white; }
.map-kind {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.map-card[data-kind="claim"] .map-kind { color: var(--off-white); }
.map-card-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.map-strength { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; font-size: 13px; }
.map-strength-bar { width: 36px; height: 6px; border-radius: 999px; background: rgba(30, 42, 68, 0.12); overflow: hidden; }
.map-card[data-kind="claim"] .map-strength-bar { background: rgba(250, 247, 242, 0.25); }
.map-strength-bar span { display: block; height: 100%; width: 100%; background: var(--teal); transform-origin: left center; transform: scaleX(0); }
.map-strength.band-shaky { color: var(--coral); }
.map-strength.band-holding { color: var(--amber); }
.map-strength.band-solid { color: var(--teal); }
.map-strength-slider { width: 96px; accent-color: var(--teal); }
.map-card[data-kind="objection"] .map-strength-bar span { background: var(--coral); }
.map-card[data-kind="claim"] .map-strength-bar span { background: var(--amber); }
.map-edit { width: 100%; min-height: 72px; font: inherit; color: inherit; background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 8px; resize: vertical; }
.map-card[data-kind="claim"] .map-edit { border-color: rgba(250, 247, 242, 0.4); }
.map-edit-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; }
.map-title {
  margin: 0;
  padding: 8px 16px 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.map-banner {
  margin: 4px 16px 0;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.3;
}
.holds-actions .linkish {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--teal-dark);
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.holds-actions .linkish:hover { color: var(--navy); }
#map-ai-turnstile.turnstile-slot {
  min-height: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
}
#map-ai-turnstile.turnstile-slot.is-active {
  position: fixed;
  z-index: 12;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(320px, calc(100vw - 32px));
  height: auto;
  min-height: 66px;
  margin: 0;
  padding: 8px;
  overflow: visible;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
}
@media (max-width: 640px) {
  #map-ai-turnstile.turnstile-slot.is-active {
    bottom: calc(88px + env(safe-area-inset-bottom));
  }
}
.map-toolbar {
  position: fixed;
  z-index: 6;
  top: 148px;
  right: 16px;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  width: max-content;
  max-width: calc(100% - 24px);
}
.map-toolbar-tools {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
}
.map-tool, .map-action {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--navy);
  box-shadow: var(--shadow-1);
  font: inherit;
}
.map-tool[disabled] { opacity: 0.45; }
.map-icon {
  width: 20px;
  height: 20px;
  background: currentColor;
  display: inline-block;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon-fit { --icon: url("/icons/arrows-out-bold.svg"); }
.icon-plus { --icon: url("/icons/plus-bold.svg"); }
.icon-minus { --icon: url("/icons/magnifying-glass-minus-bold.svg"); }
.icon-zoom-in { --icon: url("/icons/magnifying-glass-plus-bold.svg"); }
.icon-undo { --icon: url("/icons/arrow-counter-clockwise-bold.svg"); }
.icon-redo { --icon: url("/icons/arrow-clockwise-bold.svg"); }
.icon-tidy { --icon: url("/icons/squares-four-bold.svg"); }
.icon-edit { --icon: url("/icons/pencil-simple-bold.svg"); }
.icon-trash { --icon: url("/icons/trash-bold.svg"); }
.icon-close { --icon: url("/icons/x-bold.svg"); }
.icon-menu { --icon: url("/icons/list-bold.svg"); }
.map-export { position: relative; flex: 0 0 auto; }
.map-toolbar:has(.export-menu:not([hidden])) { z-index: 7; }
.export-menu {
  position: absolute;
  z-index: 8;
  right: 0;
  bottom: calc(100% + 8px);
  display: grid;
  gap: 6px;
  min-width: 140px;
  padding: 8px;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow-2);
}
.export-menu[hidden] { display: none; }
.export-menu .map-tool { width: 100%; justify-content: flex-start; }
.map-shell > .kicker { margin: 0; padding: 12px 16px 0; }
.map-outline { padding: 8px 16px 32px; }
.map-outline h2 { margin: 0 0 8px; font-size: 1.1rem; }
.map-outline ul { list-style: none; margin: 0; padding: 0; }
.map-outline li { margin: 0 0 6px; }
body[data-readonly="1"] .map-shell { display: block; padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
body[data-readonly="1"] .map-viewport { flex: none; min-height: 240px; }
body[data-readonly="1"] .map-attack { display: none; }
.map-save-state { margin: 0; font-size: 13px; color: var(--navy-soft); padding: 0 6px; white-space: nowrap; }
.map-save-dot { display: none; }
#map-tidy-menu { display: none; }
.map-read { display: block; flex: 1 0 100%; min-width: 0; max-width: 420px; }
.map-read[hidden] { display: none !important; }
.map-read-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.map-read-meta, .map-read-text, .map-read-reason { margin: 0 0 8px; font-size: 16px; line-height: 1.45; }
.map-read-meta { font-weight: 700; }
.map-read-reason { color: var(--navy-soft); }
.map-read-reason[hidden] { display: none !important; }
.map-sheet-close {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--navy);
  font: inherit;
}
.map-sheet-signin { display: none; }
.map-actions {
  position: fixed;
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-2);
}
.map-actions[hidden] { display: none; }
.map-sheet-handle { display: none; }
.map-confirm, .map-intro {
  position: fixed;
  z-index: 9;
  inset: 0;
  background: rgba(30, 42, 68, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
.map-confirm[hidden], .map-intro[hidden], .map-toast[hidden] { display: none; }
.map-confirm-card, .map-intro-card {
  width: min(440px, 100%);
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-2);
  padding: 20px 18px;
}
.map-intro-card img { margin: 0 auto 12px; }
.map-intro-card h2 { font-family: var(--font-display); margin: 0 0 8px; }
.map-toast {
  position: fixed;
  z-index: 8;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--navy);
  color: var(--off-white);
  border-radius: 999px;
  padding: 8px 8px 8px 16px;
  box-shadow: var(--shadow-2);
}
.map-toast button { color: var(--off-white); }
.map-toast.is-notice { pointer-events: none; }
.map-empty, .maps-empty {
  padding: 32px 16px 48px;
  text-align: center;
}
.maps-empty img, .map-intro-card img { margin-left: auto; margin-right: auto; }
.maps-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
.maps-card {
  display: block;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-1);
  padding: 16px;
  color: inherit;
  text-decoration: none;
}
.maps-card h2 { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 6px; }
.maps-card p { margin: 0; color: var(--navy-soft); }
@media (min-width: 720px) {
  .maps-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .map-page .site-header { padding-bottom: 0; }
  .map-viewport { min-height: 0; }
  .map-shell { min-height: calc(100dvh - 64px); }
  .map-toolbar {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    border-radius: 16px 16px 0 0;
    background: white;
    border-top: 1px solid var(--line);
    gap: 4px;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow: visible;
  }
  .map-toolbar-tools { overflow: visible; flex: 1 1 auto; gap: 4px; }
  .map-toolbar .map-tool { flex: 0 0 auto; }
  #map-tidy { display: none; }
  #map-tidy-menu { display: inline-flex; }
  .map-read { max-width: none; }
  .map-save-state {
    position: relative;
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    padding: 0;
    flex: 0 0 auto;
  }
  .map-save-dot {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--teal);
  }
  .map-save-state[data-state="pending"] .map-save-dot { background: var(--amber); }
  .map-save-state[data-state="error"] .map-save-dot { background: var(--coral); }
  .map-save-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  #map-save-signin {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .map-sheet-signin { display: inline-flex; flex: 1 0 100%; }
  body.map-sheet-open .map-toolbar { visibility: hidden; }
  .map-tool-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .map-actions {
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 8;
  }
  .map-sheet-handle {
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--line);
    margin: 0 auto 8px;
    flex: 1 0 100%;
  }
  .map-toast { bottom: calc(132px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .map-actions, .map-read { transition: none; animation: none; }
  .map-card-pop { transition: none; }
  .holds-sparkle, .survive-flash, .is-shaking { animation: none; display: none; }
  .survive-sheet, .map-dialog { animation: none; }
  .map-card.is-pulsing .map-card-pop::after,
  .map-card.is-attack-shake .map-card-pop,
  .map-bolt { animation: none; display: none; }
}

.holds-wrap { padding: 4px 16px 8px; }
.holds-meter { display: flex; align-items: center; gap: 12px; position: relative; }
.holds-ring {
  width: 72px; height: 72px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--paper); color: var(--navy);
  border: 8px solid var(--amber);
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
}
.holds-meter[data-band="shaky"] .holds-ring { border-color: var(--coral); }
.holds-meter[data-band="holding"] .holds-ring { border-color: var(--amber); }
.holds-meter[data-band="solid"] .holds-ring { border-color: var(--teal); }
.holds-label { margin: 0 0 6px; font-family: var(--font-display); font-weight: 800; }
.holds-meter[data-band="shaky"] .holds-label { color: var(--coral); }
.holds-meter[data-band="holding"] .holds-label { color: var(--amber); }
.holds-meter[data-band="solid"] .holds-label { color: var(--teal); }
.holds-bar { height: 14px; border-radius: 999px; background: rgba(30, 42, 68, 0.12); overflow: hidden; }
.holds-bar span { display: block; height: 100%; width: 100%; background: var(--amber); transform-origin: left center; transform: scaleX(0.5); }
.holds-meter[data-band="shaky"] .holds-bar span { background: var(--coral); }
.holds-meter[data-band="solid"] .holds-bar span { background: var(--teal); }
.holds-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.holds-sparkle {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(242, 165, 65, 0.7), transparent 60%);
  animation: sparkle-pop 700ms ease-out forwards;
}
@keyframes sparkle-pop { from { opacity: 0.9; transform: scale(0.6); } to { opacity: 0; transform: scale(1.2); } }
.holds-inline-number { display: none; }
@media (max-width: 379px) {
  .holds-ring { display: none; }
  .holds-inline-number { display: inline; margin-left: 6px; }
}
@media (min-width: 380px) { .holds-bar { display: none; } }

.survive-sheet, .map-dialog {
  position: fixed; inset: 0; z-index: 30;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(30, 42, 68, 0.35);
}
.map-dialog[hidden] { display: none; }
.survive-card {
  width: min(560px, 100%);
  background: var(--paper); color: var(--ink);
  border-radius: 24px 24px 0 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-1);
  max-height: 88vh; overflow: auto;
}
@media (min-width: 800px) {
  .survive-sheet, .map-dialog { align-items: center; }
  .survive-card { border-radius: 24px; margin: 24px; }
}
.weak-link {
  position: fixed;
  z-index: 6;
  left: 12px;
  right: 12px;
  bottom: calc(72px + env(safe-area-inset-bottom));
}
.weak-link[hidden] { display: none; }
.weak-link-toggle {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  color: var(--off-white);
  font: inherit;
  font-weight: 700;
  box-shadow: var(--shadow-2);
}
.weak-link-card {
  display: none;
  margin-top: 8px;
  background: white;
  color: var(--navy);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-2);
}
.weak-link.is-open .weak-link-card { display: block; }
.weak-link-kicker {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber);
}
.weak-link-name, .weak-link-reason { margin: 0 0 8px; }
.weak-link-score { margin: 0 0 8px; font-variant-numeric: tabular-nums; font-weight: 700; }
.weak-link-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.weak-link-actions .btn { min-height: 44px; }
body.map-sheet-open .weak-link { visibility: hidden; }
@media (min-width: 900px) {
  .export-menu { top: calc(100% + 8px); bottom: auto; }
  .weak-link {
    left: auto;
    right: 16px;
    top: 212px;
    bottom: auto;
    width: 280px;
  }
  .weak-link-toggle { display: none; }
  .weak-link-card { display: block; margin-top: 0; }
  body.map-sheet-open .weak-link { visibility: visible; }
}
.survive-objection, .survive-steelman { display: grid; gap: 6px; margin: 12px 0; }
.survive-defense, #survive-steelman {
  width: 100%; min-height: 88px; font: inherit; border-radius: 12px;
  border: 1px solid var(--line); padding: 8px; background: white;
}
.survive-defend { min-height: 52px; font-size: 1.1rem; }
.survive-stamp { font-family: var(--font-display); font-weight: 800; }
.stamp-holds { color: var(--teal); }
.stamp-partly { color: var(--amber); }
.stamp-falls { color: var(--coral); }
.survive-flash {
  position: fixed; inset: 0; z-index: 28; pointer-events: none;
  background: rgba(242, 165, 65, 0.35);
  animation: sparkle-pop 280ms ease-out forwards;
}
.map-card.is-shaking { animation: map-shake 420ms ease-in-out; }
@keyframes map-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.survive-score {
  width: 96px; height: 96px; border-radius: 999px; border: 10px solid var(--teal);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 32px;
}
.round-chip { display: inline-flex; align-items: center; justify-content: center; margin-right: 8px; padding: 6px 10px; border-radius: 999px; background: var(--navy); color: white; }
@media print {
  html:has(body.map-page .map-tabbar),
  body.map-page:has(.map-tabbar) {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .site-header, .map-toolbar, .share-panel, .map-actions, .weak-link, #map-intro, .map-tabbar { display: none !important; }
  .map-panel[hidden] { display: flex !important; }
  #map-outline { display: block !important; }
  #map-canvas { height: 170mm; overflow: hidden; break-inside: avoid; }
  .map-outline { break-before: page; }
}

html:has(body.map-page .map-tabbar) {
  height: 100%;
  overflow: hidden;
}
body.map-page:has(.map-tabbar) {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
body.map-page:has(.map-tabbar) .map-shell {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}
body[data-readonly="1"]:has(.map-tabbar) .map-viewport {
  flex: 1 1 auto;
  min-height: 0;
}
.map-tabbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 4px;
  flex: none;
}
.map-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}
.map-tab {
  appearance: none;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 44px;
  padding: 0 14px;
  cursor: pointer;
}
.map-tab[aria-selected="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--off-white);
}
.map-tab:focus-visible,
.map-score-chip:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}
.map-score-chip {
  appearance: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  flex: none;
}
.map-score-chip-number,
#map-score-chip-number { font-variant-numeric: tabular-nums; }
.map-score-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--amber);
}
.map-score-chip[data-band="shaky"] .map-score-swatch { background: var(--coral); }
.map-score-chip[data-band="holding"] .map-score-swatch { background: var(--amber); }
.map-score-chip[data-band="solid"] .map-score-swatch { background: var(--teal); }
.map-tab-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.map-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
#map-outline.map-panel,
#panel-score {
  overflow: auto;
}
.map-page:has(.map-tabbar) .map-viewport {
  flex: 1 1 auto;
  min-height: 0;
}
.map-page:has(.map-tabbar) .map-toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
}
.map-page:has(.map-tabbar) .share-panel {
  flex: none;
  margin: 0 16px 8px;
  max-height: 38%;
  overflow: auto;
}
@media (max-width: 640px) {
  body.map-page:has(.map-tabbar) .map-shell { min-height: 0; }
  .map-page:has(.map-tabbar) .map-toolbar {
    position: absolute;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
  }
}
@media (min-width: 900px) {
  .map-page:has(.map-tabbar) .weak-link {
    position: absolute;
    top: 72px;
    right: 16px;
    bottom: auto;
    left: auto;
    width: min(280px, calc(100% - 32px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .map-card.is-shaking, .survive-flash { animation: none; }
}
.verdict-icon { display: block; width: 20px; height: 20px; }
.round-holds { background: var(--teal); }
.round-partly { background: var(--amber); color: var(--navy); }
.round-falls { background: var(--coral); }
