:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --panel: #ffffff;
  --panel-soft: #f3f5f1;
  --text: #1d2420;
  --muted: #69766f;
  --border: #d9ded6;
  --accent: #f05d23;
  --accent-strong: #c9491a;
  --water: #1c8aa1;
  --shadow: 0 12px 36px rgba(29, 36, 32, 0.18);
  --sheet-height: 44vh;
  --map-share: 36%;
}

* {
  box-sizing: border-box;
}

html,
body,
.app-shell {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  background: var(--bg);
  overflow: hidden;
  position: relative;
}

.map-stage {
  inset: 0;
  min-height: 0;
  position: absolute;
}

#map {
  height: 100%;
  min-height: 0;
  width: 100%;
}

.nav-menu {
  left: max(18px, env(safe-area-inset-left));
  position: absolute;
  top: calc(18px + env(safe-area-inset-top));
  z-index: 1200;
}

.round-button,
.search-pill,
.sheet-toggle,
.back-button {
  align-items: center;
  background: var(--panel);
  border: 0;
  box-shadow: 0 4px 14px rgba(29, 36, 32, 0.18);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
}

.round-button {
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  height: 46px;
  line-height: 1;
  min-width: 46px;
  padding: 0 8px;
}

.menu-button {
  display: inline-grid;
  gap: 4px;
  padding: 0;
  width: 46px;
}

.menu-button span {
  background: var(--text);
  border-radius: 999px;
  display: block;
  height: 2px;
  width: 18px;
}

.view-menu {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 7px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 3px;
  left: 0;
  min-width: 168px;
  padding: 5px;
  position: absolute;
  top: calc(100% + 8px);
  z-index: 1300;
}

.view-menu[hidden] {
  display: none;
}

.menu-item {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 850;
  min-height: 40px;
  padding: 0 12px;
  text-align: left;
}

.menu-link {
  align-items: center;
  display: flex;
  text-decoration: none;
}

.menu-item.active {
  background: #fff1eb;
  color: var(--accent-strong);
}

.menu-item.disabled {
  color: #9ba49f;
  cursor: default;
}

.menu-scan-picker {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  display: grid;
  gap: 5px;
  margin-top: 3px;
  padding: 8px;
}

.menu-scan-picker span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.menu-scan-picker select {
  appearance: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  min-height: 36px;
  padding: 0 9px;
  width: 100%;
}

.search-pill {
  border-radius: 999px;
  gap: 10px;
  left: 50%;
  min-height: 46px;
  min-width: min(420px, calc(100vw - 150px));
  padding: 0 18px;
  position: absolute;
  top: calc(18px + env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 1000;
}

.search-pill span:first-child {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.search-pill span:last-child {
  color: #7a837e;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-actions {
  display: grid;
  gap: 12px;
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  top: calc(18px + env(safe-area-inset-top));
  z-index: 1000;
}

.basemap-picker {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 222, 214, 0.8);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(29, 36, 32, 0.14);
  color: var(--muted);
  display: grid;
  font-size: 10px;
  font-weight: 850;
  gap: 3px;
  min-width: 74px;
  padding: 6px;
}

.basemap-picker select {
  appearance: none;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  max-width: 100%;
  min-height: 26px;
  padding: 3px 18px 3px 6px;
}

.version-tag {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(217, 222, 214, 0.72);
  border-radius: 999px;
  color: #69766f;
  font-size: 10px;
  font-weight: 850;
  left: max(18px, env(safe-area-inset-left));
  line-height: 1;
  padding: 5px 7px;
  pointer-events: none;
  position: absolute;
  top: calc(74px + env(safe-area-inset-top));
  z-index: 1500;
}

.depth-key {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: 7px;
  bottom: 18px;
  box-shadow: 0 4px 14px rgba(29, 36, 32, 0.12);
  color: var(--text);
  display: grid;
  font-size: 12px;
  gap: 7px;
  padding: 9px 10px;
  position: absolute;
  right: 18px;
  z-index: 700;
}

.depth-key span {
  align-items: center;
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.depth-key i {
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.depth-0 {
  background: #efc84a;
}

.depth-4 {
  background: #45a775;
}

.depth-8 {
  background: #178da8;
}

.depth-12 {
  background: #0a5d9f;
}

.signal-key {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border);
  border-radius: 7px;
  bottom: 118px;
  box-shadow: 0 4px 14px rgba(29, 36, 32, 0.12);
  color: var(--text);
  display: grid;
  font-size: 12px;
  gap: 7px;
  padding: 9px 10px;
  position: absolute;
  right: 18px;
  z-index: 710;
}

.signal-key strong {
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
}

.signal-key span {
  align-items: center;
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.signal-key i {
  border: 2px solid #17201b;
  border-radius: 50%;
  display: inline-block;
  height: 11px;
  width: 11px;
}

.signal-deep {
  background: #1f6feb;
}

.signal-ledge {
  background: #f3b23f;
}

.signal-hole {
  background: #f05d23;
}

.signal-hump {
  background: #8ab64f;
}

.signal-cool {
  background: #56c2d6;
}

.selected-profile-marker {
  filter: drop-shadow(0 0 5px rgba(246, 197, 79, 0.85));
}

.candidate-number-label {
  background: transparent;
  border: 0;
  pointer-events: auto;
}

.candidate-number-label span {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border: 2px solid #17201b;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(29, 36, 32, 0.18);
  color: #17201b;
  display: flex;
  font-size: 10px;
  font-weight: 900;
  height: 22px;
  justify-content: center;
  line-height: 1;
  min-width: 22px;
  padding: 0 3px;
}

.assistant-recommendation-area {
  filter: drop-shadow(0 3px 10px rgba(240, 93, 35, 0.35));
}

.assistant-recommendation-label {
  background: transparent;
  border: 0;
  pointer-events: auto;
}

.assistant-recommendation-label span {
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid var(--accent);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(29, 36, 32, 0.22);
  color: var(--text);
  display: block;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  max-width: 132px;
  overflow: hidden;
  padding: 7px 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-route-highlight {
  filter: drop-shadow(0 4px 10px rgba(240, 93, 35, 0.35));
}

.assistant-route-highlight-underlay {
  filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.18));
}

.assistant-route-highlight-label {
  background: transparent;
  border: 0;
  pointer-events: auto;
}

.assistant-route-highlight-label span {
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid #f05d23;
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.22);
  color: #17201b;
  display: inline-flex;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  max-width: 176px;
  overflow: hidden;
  padding: 7px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-plan-route-label {
  background: transparent;
  border: 0;
  pointer-events: none;
}

.scan-plan-route-label span {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(76, 29, 149, 0.35);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
  color: #4c1d95;
  display: inline-flex;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  padding: 5px 7px;
  text-transform: uppercase;
  white-space: nowrap;
}

.scan-plan-map-label {
  background: transparent;
  border: 0;
  pointer-events: none;
}

.scan-plan-map-label span {
  border: 2px solid #7c3aed;
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(17, 24, 39, 0.2);
  display: inline-block;
  font-size: 11px;
  font-weight: 950;
  line-height: 18px;
  min-width: 50px;
  padding: 1px 5px;
  text-align: center;
}

.position-chip {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 7px;
  bottom: 18px;
  box-shadow: 0 4px 14px rgba(29, 36, 32, 0.14);
  color: var(--text);
  display: none;
  gap: 3px;
  left: 18px;
  max-width: min(310px, calc(100vw - 36px));
  padding: 9px 10px;
  position: absolute;
  z-index: 760;
}

.position-chip strong,
.position-chip span {
  display: block;
  line-height: 1.15;
}

.position-chip strong {
  font-size: 13px;
  font-weight: 900;
}

.position-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-strip {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(29, 36, 32, 0.14);
  color: var(--text);
  display: grid;
  gap: 8px;
  grid-template-columns: auto auto minmax(0, 1fr);
  left: max(18px, env(safe-area-inset-left));
  max-width: min(520px, calc(100vw - 36px));
  min-height: 38px;
  padding: 0 12px;
  position: absolute;
  top: calc(74px + env(safe-area-inset-top));
  z-index: 780;
}

.selected-strip i {
  border: 2px solid #17201b;
  border-radius: 50%;
  height: 12px;
  width: 12px;
}

.signal-track {
  background: #f6c54f;
}

.selected-strip strong {
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.selected-strip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-toggle {
  position: static;
}

.assistant-panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: 7px;
  bottom: calc(78px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow);
  display: grid;
  gap: 9px;
  left: max(18px, env(safe-area-inset-left));
  max-height: min(52vh, 430px);
  max-width: min(440px, calc(100vw - 36px));
  min-width: min(360px, calc(100vw - 36px));
  overflow: hidden;
  padding: 10px;
  position: absolute;
  z-index: 1450;
}

.assistant-panel[hidden] {
  display: none;
}

.assistant-panel.is-collapsed {
  bottom: calc(92px + env(safe-area-inset-bottom));
  max-width: min(260px, calc(100vw - 36px));
  min-width: 0;
  width: min(260px, calc(100vw - 36px));
}

.assistant-panel.is-collapsed .assistant-field-panel,
.assistant-panel.is-collapsed .assistant-transcript,
.assistant-panel.is-collapsed .assistant-form,
.assistant-panel.is-collapsed #assistant-talk,
.assistant-panel.is-collapsed #assistant-realtime,
.assistant-panel.is-collapsed #assistant-mute,
.assistant-panel.is-collapsed #assistant-cancel {
  display: none;
}

.assistant-panel.is-collapsed .assistant-head {
  align-items: center;
}

.assistant-head {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.assistant-head strong,
.assistant-head span {
  display: block;
  min-width: 0;
}

.assistant-head strong {
  font-size: 13px;
  font-weight: 950;
  line-height: 1.1;
}

.assistant-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-top: 3px;
}

.assistant-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: end;
}

.assistant-buttons button,
.assistant-form button {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  min-height: 30px;
  padding: 0 9px;
}

.assistant-buttons button[aria-pressed="true"],
.assistant-buttons button.is-active,
.assistant-form button {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.assistant-buttons button.is-connected {
  background: var(--water);
  border-color: var(--water);
  color: #ffffff;
}

.assistant-sharing-panel {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 9px 10px;
}

.assistant-sharing-panel div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.assistant-sharing-panel strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.assistant-sharing-panel span {
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.assistant-sharing-panel button {
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 950;
  min-height: 30px;
  padding: 0 10px;
}

.assistant-sharing-panel button[aria-pressed="false"] {
  background: var(--panel-soft);
  color: var(--text);
}

.product-focus-panel {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 10px;
}

.focus-status-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.focus-status-grid span,
.workbench-package-panel > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.focus-status-grid b,
.workbench-package-panel strong {
  font-size: 10px;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
}

.focus-status-grid em,
.workbench-package-panel span {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workbench-package-panel > .focus-actions {
  align-items: center;
  display: flex;
  gap: 6px;
}

.focus-actions button {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  min-height: 30px;
  padding: 0 9px;
}

.focus-actions button[aria-pressed="true"] {
  background: var(--water);
  border-color: var(--water);
  color: #ffffff;
}

.focus-actions span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  margin-left: auto;
}

.package-meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.package-warning {
  background: rgba(243, 178, 63, 0.16);
  border: 1px solid rgba(181, 112, 18, 0.32);
  border-radius: 6px;
  color: #5d3c0c;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  margin: 0;
  padding: 7px 8px;
}

.package-warning[data-severity="info"] {
  background: rgba(38, 121, 142, 0.12);
  border-color: rgba(38, 121, 142, 0.28);
  color: #124756;
}

.workbench-package-panel {
  margin: 0 24px 12px;
}

body[data-product-mode="fishing-assistant"] .workbench-package-panel,
body[data-product-mode="sonar-workbench"] .assistant-field-panel {
  display: none;
}

body[data-product-mode="fishing-assistant"] .depth-key,
body[data-product-mode="fishing-assistant"] .signal-key {
  display: none;
}

body[data-product-mode="fishing-assistant"] .app-shell.legends-open.view-map .depth-key,
body[data-product-mode="fishing-assistant"] .app-shell.legends-open.view-map .signal-key {
  display: grid;
}

body[data-product-mode="fishing-assistant"] .selected-strip {
  display: none;
}

body[data-product-mode="fishing-assistant"] .search-pill,
body[data-product-mode="fishing-assistant"] .mode-dock {
  display: none;
}

.assistant-map-button {
  display: none;
}

body[data-product-mode="fishing-assistant"] .assistant-map-button {
  display: inline-flex;
}

.assistant-transcript {
  display: grid;
  gap: 7px;
  max-height: 210px;
  overflow: auto;
  padding-right: 2px;
}

.assistant-turn {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: grid;
  gap: 4px;
  padding: 8px 9px;
}

.assistant-turn.user {
  background: #fff8ed;
}

.assistant-turn b {
  color: var(--text);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.assistant-turn span {
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
}

.assistant-turn em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

.assistant-form {
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.assistant-form input {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  min-height: 36px;
  min-width: 0;
  padding: 0 12px;
}

.split-control {
  align-items: center;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(29, 36, 32, 0.16);
  color: var(--text);
  display: none;
  gap: 8px;
  left: 50%;
  min-height: 38px;
  padding: 0 10px;
  position: absolute;
  top: var(--map-share);
  transform: translate(-50%, -50%);
  width: min(330px, calc(100vw - 24px));
  z-index: 1450;
}

.split-control span,
.split-control strong {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 900;
}

.split-control input {
  accent-color: var(--accent);
  min-width: 0;
  width: 100%;
}

.inspector {
  background: var(--panel);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100%;
  left: 0;
  overflow: auto;
  position: absolute;
  top: 0;
  width: 364px;
  z-index: 900;
}

.app-shell.view-map:not(.sheet-open) .inspector {
  transform: translateX(-100%);
}

.sheet-grip {
  display: none;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
  gap: 18px;
  min-height: 0;
}

#tab-map.active {
  align-content: start;
  padding-bottom: 22px;
}

.water-hero {
  align-items: center;
  background: #f1f3f0;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 12px;
  grid-template-columns: 46px minmax(0, 1fr);
  min-height: 168px;
  padding: 64px 24px 22px;
  position: relative;
}

.sheet-toggle,
.back-button {
  border-radius: 999px;
  font-size: 22px;
  font-weight: 700;
  height: 42px;
  left: 10px;
  position: absolute;
  top: 12px;
  width: 42px;
}

.water-thumb {
  background:
    linear-gradient(135deg, rgba(28, 138, 161, 0.2), rgba(240, 93, 35, 0.16)),
    radial-gradient(circle at 28% 72%, #1c8aa1 0 10%, transparent 11%),
    radial-gradient(circle at 72% 32%, #45a775 0 16%, transparent 17%),
    #ffffff;
  border-radius: 7px;
  height: 46px;
  width: 46px;
}

.water-title {
  min-width: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 5px;
  text-transform: uppercase;
}

h1,
h2 {
  letter-spacing: 0;
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.1;
}

h2 {
  font-size: 15px;
  line-height: 1.2;
}

.water-title p:last-child {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  margin: 7px 0 0;
}

.status-panel,
.info-section {
  padding: 0 24px;
}

.status-panel {
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 12px;
  padding-bottom: 18px;
}

.summary {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
}

.depth-range {
  background: #fff1eb;
  border-radius: 7px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 850;
  justify-self: start;
  padding: 8px 10px;
}

.scan-picker {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: grid;
  gap: 7px;
  padding: 10px;
}

.scan-picker span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.scan-picker select {
  appearance: none;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  min-height: 40px;
  padding: 0 10px;
  width: 100%;
}

.quick-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 24px;
}

.quick-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 5px;
  min-height: 82px;
  padding: 12px;
  text-align: left;
}

.quick-card strong {
  font-size: 15px;
}

.quick-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.section-heading {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.section-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.layer-panel {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.layer-panel label {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 750;
  gap: 8px;
  min-height: 40px;
  min-width: 0;
  padding: 0 9px;
}

.layer-panel input {
  accent-color: var(--accent);
  height: 16px;
  width: 16px;
}

.feature-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: grid;
  gap: 5px;
  padding: 10px;
}

.feature-card strong {
  font-size: 14px;
  line-height: 1.2;
}

.feature-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.signal-action-card {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding-top: 8px;
}

.signal-action-card[hidden] {
  display: none;
}

.signal-card-row {
  display: grid;
  gap: 4px;
}

.signal-card-row b,
.today-context b {
  color: var(--text);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.signal-card-row span,
.today-context span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.provider-links {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr;
}

.provider-links a {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 850;
  min-width: 0;
  overflow: hidden;
  padding: 8px 9px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-links small {
  color: #526058;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.provider-status a {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
}

.signal-card-pills,
.target-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.signal-card-pills span,
.target-pills span,
.plan-meta span {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  padding: 6px 8px;
}

.field-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 9px;
}

.field-actions button,
.spot-form button,
.data-actions button {
  background: var(--accent);
  border: 0;
  border-radius: 7px;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  min-height: 38px;
}

.field-actions button:nth-child(4),
.field-actions button:nth-child(5),
.field-actions button:nth-child(6) {
  background: #51605a;
}

.spot-form {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spot-form input,
.spot-form textarea {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-size: 13px;
  min-width: 0;
  padding: 9px 10px;
}

.spot-form textarea,
.spot-form button {
  grid-column: 1 / -1;
}

.spot-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.spot-item {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
}

.spot-item strong {
  font-size: 13px;
  line-height: 1.15;
  text-transform: capitalize;
}

.spot-item span,
.spot-item em,
.empty-note {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}

.spot-item span,
.spot-item em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranked-spot-list,
.return-plan-list,
.comparison-list,
.survey-list {
  display: grid;
  gap: 9px;
}

.ranked-spot-card,
.plan-card,
.comparison-card,
.today-context,
.survey-summary,
.survey-card {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
}

.survey-summary {
  gap: 9px;
}

.coverage-bars {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  height: 12px;
  overflow: hidden;
  width: 100%;
}

.coverage-bars i {
  display: block;
  min-width: 0;
}

.survey-card {
  padding: 0;
}

.survey-card button {
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 9px 10px;
  text-align: left;
  width: 100%;
}

.survey-card strong {
  font-size: 13px;
  line-height: 1.15;
}

.survey-card span,
.survey-card em,
.survey-summary span {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.28;
}

.survey-card em {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  justify-self: start;
  padding: 5px 8px;
}

.survey-card em.scan-feedback-addressed {
  border-color: rgba(31, 157, 85, 0.35);
  color: #1f7f49;
}

.survey-card em.scan-feedback-partial {
  border-color: rgba(243, 178, 63, 0.5);
  color: #946314;
}

.survey-card em.scan-feedback-open {
  border-color: rgba(214, 69, 69, 0.35);
  color: #9d3535;
}

.topology-breakline {
  border-left: 4px solid #f3b23f;
}

.topology-scour-hole {
  border-left: 4px solid #f05d23;
}

.topology-channel-run {
  border-left: 4px solid #1f6feb;
}

.topology-hump {
  border-left: 4px solid #8ab64f;
}

.topology-cool-edge {
  border-left: 4px solid #56c2d6;
}

.topology-uncertainty {
  border-left: 4px solid #d64545;
}

.terrain-panel {
  display: grid;
  gap: 8px;
}

#terrain-canvas {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: block;
  height: min(44vh, 430px);
  min-height: 280px;
  width: 100%;
}

.ranked-spot-main,
.plan-main {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 8px;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.ranked-spot-main i,
.plan-main i {
  border: 2px solid #17201b;
  border-radius: 50%;
  height: 13px;
  width: 13px;
}

.ranked-number {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  min-width: 18px;
}

.ranked-spot-main strong,
.ranked-spot-main em,
.plan-main strong,
.plan-main em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranked-spot-main strong,
.plan-main strong,
.comparison-card strong {
  font-size: 13px;
  line-height: 1.1;
}

.ranked-spot-main em,
.plan-main em,
.comparison-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}

.ranked-spot-main b {
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.ranked-spot-meta,
.ranked-spot-actions,
.plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ranked-spot-meta span {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  padding: 6px 8px;
}

.ranked-spot-actions button {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  min-height: 28px;
  padding: 0 10px;
}

.metric-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.metric-grid div {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  min-width: 0;
  padding: 12px;
}

.metric-grid dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.metric-grid dd {
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
  margin: 0;
}

.compact-metrics dd {
  font-size: 18px;
}

.profile-panel,
.data-panel {
  display: grid;
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(72px + env(safe-area-inset-bottom));
}

.profile-panel {
  grid-template-rows: auto auto minmax(340px, 1fr);
}

.data-panel {
  align-content: start;
  grid-template-rows: auto auto;
  overflow: auto;
}

.survey-panel {
  gap: 12px;
}

.data-section {
  padding: 0;
}

.data-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 10px;
}

.scan-plan-actions {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(94px, 0.8fr) minmax(118px, 1fr);
}

.scan-plan-actions > span {
  grid-column: 1 / -1;
}

.scan-plan-limit {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 9px;
}

.scan-plan-limit span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.scan-plan-limit input {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  height: 28px;
  padding: 0 4px;
  text-align: center;
  width: 42px;
}

.scan-plan-toggle input {
  accent-color: var(--accent);
  height: 18px;
  width: 18px;
}

.data-actions button {
  min-height: 38px;
  padding: 0 12px;
}

.data-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.popup-action {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  margin-top: 7px;
  min-height: 32px;
  padding: 0 10px;
}

.profile-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
  position: relative;
}

.profile-toolbar .back-button {
  flex: 0 0 auto;
  left: auto;
  position: static;
  top: auto;
}

.profile-toolbar h1 {
  font-size: 22px;
}

#profile-canvas,
#sonar-canvas {
  background: linear-gradient(#eaf7fb 0%, #d6edf4 52%, #b79a74 53%, #806648 100%);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: block;
  height: 190px;
  min-height: 0;
  touch-action: none;
  width: 100%;
}

#sonar-canvas {
  background: linear-gradient(#071a22 0%, #103442 100%);
  height: 280px;
}

.app-shell.view-profile #profile-canvas,
.app-shell.view-sonar #sonar-canvas {
  height: 100%;
}

.profile-slider {
  accent-color: var(--accent);
  margin: 0;
  width: 100%;
}

.playback-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto auto minmax(0, 1fr);
  min-width: 0;
}

.playback-row .back-button {
  font-size: 18px;
  height: 34px;
  left: auto;
  position: static;
  top: auto;
  width: 34px;
}

.profile-controls {
  display: flex;
  gap: 6px;
  min-width: 0;
}

.profile-button {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  min-width: 34px;
  padding: 0;
  width: 34px;
}

.profile-button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.control-icon {
  display: block;
  height: 16px;
  position: relative;
  width: 16px;
}

.icon-step-back::before,
.icon-step-forward::before {
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 12px;
  position: absolute;
  top: 2px;
  width: 2px;
}

.icon-step-back::before {
  left: 2px;
}

.icon-step-forward::before {
  right: 2px;
}

.icon-step-back::after,
.icon-step-forward::after,
.icon-play::before {
  content: "";
  height: 0;
  position: absolute;
  top: 2px;
  width: 0;
}

.icon-step-back::after {
  border-bottom: 6px solid transparent;
  border-right: 9px solid currentColor;
  border-top: 6px solid transparent;
  left: 5px;
}

.icon-step-forward::after,
.icon-play::before {
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
  border-top: 6px solid transparent;
}

.icon-step-forward::after {
  left: 2px;
}

.icon-play::before {
  left: 4px;
}

.profile-button.is-playing .icon-play::before {
  background: currentColor;
  border: 0;
  border-radius: 1px;
  box-shadow: 6px 0 0 currentColor;
  height: 12px;
  left: 3px;
  top: 2px;
  width: 3px;
}

.profile-stats {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  gap: 0;
  min-height: 34px;
  min-width: 0;
  overflow: hidden;
}

.profile-stats span {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  justify-content: center;
  min-height: 32px;
  min-width: 0;
  padding: 0 9px;
}

.sonar-stats span {
  padding: 0 7px;
}

.profile-stats span + span {
  border-left: 1px solid var(--border);
}

.profile-stats b {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-stats strong {
  color: var(--text);
  flex: 0 1 auto;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-dock {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: 999px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 6px 20px rgba(29, 36, 32, 0.18);
  display: flex;
  gap: 4px;
  left: 50%;
  padding: 4px;
  position: absolute;
  transform: translateX(-50%);
  z-index: 1400;
}

.dock-button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  min-height: 34px;
  min-width: 72px;
  padding: 0 12px;
}

.dock-button.active {
  background: var(--accent);
  color: #ffffff;
}

.leaflet-control-attribution {
  font-size: 10px;
}

.app-shell.view-profile .search-pill,
.app-shell.view-sonar .search-pill,
.app-shell.view-profile .map-actions,
.app-shell.view-sonar .map-actions,
.app-shell.view-profile .depth-key,
.app-shell.view-sonar .depth-key,
.app-shell.view-profile .signal-key,
.app-shell.view-sonar .signal-key {
  display: none;
}

.app-shell.view-profile .position-chip,
.app-shell.view-sonar .position-chip {
  bottom: 46px;
  display: grid;
}

.app-shell.view-profile .split-control,
.app-shell.view-sonar .split-control {
  display: flex;
}

.app-shell.view-profile .mode-dock,
.app-shell.view-sonar .mode-dock {
  display: none;
}

.app-shell.view-profile .map-stage,
.app-shell.view-sonar .map-stage {
  bottom: auto;
  height: var(--map-share);
  inset: 0 0 auto;
  min-height: 118px;
}

.app-shell.view-profile .inspector,
.app-shell.view-sonar .inspector {
  height: calc(100% - var(--map-share));
  inset: var(--map-share) 0 0;
  overflow: hidden;
  transform: none;
  width: auto;
}

.app-shell.view-profile .profile-panel,
.app-shell.view-sonar .profile-panel {
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
}

@media (min-width: 860px) {
  .app-shell.view-profile .mode-dock,
  .app-shell.view-sonar .mode-dock {
    bottom: 18px;
  }
}

@media (max-width: 859px) {
  .search-pill {
    display: none;
  }

  .map-actions {
    gap: 10px;
    right: calc(18px + env(safe-area-inset-right));
    top: calc(18px + env(safe-area-inset-top));
  }

  .map-actions .round-button {
    font-size: 9px;
    height: 44px;
    min-width: 44px;
    max-width: 58px;
    padding: 0 6px;
  }

  .basemap-picker {
    min-width: 58px;
    padding: 5px;
  }

  .basemap-picker select {
    font-size: 9px;
    min-height: 24px;
    padding-right: 12px;
  }

  .inspector {
    border-radius: 18px 18px 0 0;
    bottom: 0;
    height: var(--sheet-height);
    left: 0;
    overflow: auto;
    top: auto;
    transform: translateY(calc(100% - 24px));
    transition: transform 180ms ease, height 180ms ease;
    width: 100%;
  }

  .app-shell.view-map:not(.sheet-open) .inspector,
  .app-shell.view-data:not(.sheet-open) .inspector,
  .app-shell.view-spots:not(.sheet-open) .inspector,
  .app-shell.view-survey:not(.sheet-open) .inspector {
    transform: translateY(calc(100% - 24px));
  }

  .app-shell.sheet-open.view-map .inspector,
  .app-shell.sheet-open.view-data .inspector,
  .app-shell.sheet-open.view-spots .inspector,
  .app-shell.sheet-open.view-survey .inspector {
    transform: translateY(0);
  }

  .sheet-grip {
    background: #c7cec8;
    border-radius: 999px;
    display: block;
    height: 4px;
    left: 50%;
    position: sticky;
    top: 8px;
    transform: translateX(-50%);
    width: 42px;
    z-index: 2;
  }

  #tab-map.active {
    padding-top: 8px;
  }

  .water-hero {
    min-height: 146px;
    padding: 42px 24px 18px;
  }

  .sheet-toggle {
    left: 13px;
    top: 18px;
  }

  .app-shell.sheet-open.view-map .mode-dock,
  .app-shell.sheet-open.view-data .mode-dock,
  .app-shell.sheet-open.view-spots .mode-dock,
  .app-shell.sheet-open.view-survey .mode-dock {
    bottom: calc(var(--sheet-height) + 10px);
  }

  .depth-key {
    bottom: calc(var(--sheet-height) + 12px);
    display: none;
    font-size: 11px;
    left: 12px;
    right: auto;
  }

  .signal-key {
    bottom: calc(var(--sheet-height) + 12px);
    display: none;
    font-size: 11px;
    max-width: calc(100vw - 150px);
    right: 12px;
  }

  .app-shell.legends-open.view-map .depth-key,
  .app-shell.legends-open.view-map .signal-key {
    display: grid;
  }

  .app-shell.legends-open:not(.sheet-open).view-map .depth-key,
  .app-shell.legends-open:not(.sheet-open).view-map .signal-key {
    bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .selected-strip {
    bottom: calc(74px + env(safe-area-inset-bottom));
    left: 12px;
    max-width: calc(100vw - 24px);
    right: 12px;
    top: auto;
  }

  .app-shell.legends-open.view-map .selected-strip {
    display: none;
  }

  .app-shell.view-profile .profile-panel,
  .app-shell.view-sonar .profile-panel {
    grid-template-rows: auto auto minmax(250px, 1fr);
    overflow: auto;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  :root {
    --sheet-height: 38vh;
  }

  .search-pill {
    width: min(360px, calc(100vw - 180px));
  }

  .app-shell.view-map .inspector {
    height: min(300px, 78vh);
  }

  .app-shell.view-profile .profile-panel,
  .app-shell.view-sonar .profile-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    padding: calc(8px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right))
      calc(8px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left));
  }

  .app-shell.view-profile .playback-row,
  .app-shell.view-sonar .playback-row {
    grid-column: 1;
    grid-row: 1;
  }

  .app-shell.view-profile .profile-stats,
  .app-shell.view-sonar .profile-stats {
    grid-column: auto;
    grid-row: auto;
  }

  .app-shell.view-profile #profile-position,
  .app-shell.view-sonar #sonar-position {
    grid-column: 1;
    grid-row: 2;
  }

  .app-shell.view-profile #profile-canvas,
  .app-shell.view-sonar #sonar-canvas {
    grid-column: 1;
    grid-row: 3;
  }

  .app-shell.view-profile .map-stage,
  .app-shell.view-sonar .map-stage {
    height: 100%;
    inset: 0 auto 0 0;
    min-width: 180px;
    width: var(--map-share);
  }

  .app-shell.view-profile .inspector,
  .app-shell.view-sonar .inspector {
    height: 100%;
    inset: 0 0 0 var(--map-share);
    width: calc(100% - var(--map-share));
  }

  .app-shell.view-profile .split-control,
  .app-shell.view-sonar .split-control {
    left: var(--map-share);
    top: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    width: min(300px, calc(100vh - 24px));
  }

  .app-shell.view-profile .position-chip,
  .app-shell.view-sonar .position-chip {
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: calc(12px + env(safe-area-inset-left));
    max-width: none;
    right: 12px;
  }
}

.app-shell.view-profile .inspector,
.app-shell.view-sonar .inspector {
  border-radius: 0;
  display: block;
  transform: none;
}

.app-shell.view-profile .sheet-grip,
.app-shell.view-sonar .sheet-grip {
  display: none;
}

.app-shell.view-profile #tab-profile.active,
.app-shell.view-sonar #tab-sonar.active,
.app-shell.view-spots #tab-spots.active,
.app-shell.view-survey #tab-survey.active,
.app-shell.view-data #tab-data.active {
  height: 100%;
}

.app-shell.view-spots .inspector,
.app-shell.view-survey .inspector,
.app-shell.view-data .inspector {
  transform: none;
}
