:root {
  color-scheme: light;
  --ink: #12292f;
  --muted: #5d7076;
  --line: #d7e2e4;
  --surface: #ffffff;
  --surface-2: #f4f7f7;
  --nav: #12343b;
  --water: #cfeaec;
  --water-deep: #5fabb6;
  --accent: #0b6b78;
  --accent-2: #e15b35;
  --good: #167a50;
  --good-bg: #e3f5ec;
  --caution: #a56606;
  --caution-bg: #fff0cf;
  --bad: #a93636;
  --bad-bg: #fde1df;
  --shadow: 0 18px 48px rgba(18, 41, 47, .12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--surface-2);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.demo-cover {
  position: fixed;
  inset: 0;
  z-index: 1000;
  min-height: 100vh;
  padding: 28px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(18, 52, 59, .9), rgba(18, 52, 59, .82)),
    url("assets/species/yellowfin-tuna.jpg") center / cover;
}

.demo-cover[hidden] {
  display: none;
}

.demo-cover-panel {
  width: min(100%, 520px);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  padding: 28px;
  color: #ecf7f8;
  background: rgba(18, 52, 59, .88);
  box-shadow: 0 28px 72px rgba(0, 0, 0, .28);
}

.demo-cover-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark.large {
  width: 58px;
  height: 58px;
}

.brand-mark.large img {
  width: 48px;
  height: 50px;
}

.demo-cover h1 {
  margin: 0;
  color: #fff;
  font-size: 42px;
  line-height: 1;
}

.demo-cover p {
  color: #c9dfe3;
}

.demo-cover-copy {
  margin: 20px 0;
  line-height: 1.5;
}

.demo-login-form {
  display: grid;
  gap: 12px;
}

.demo-login-form .field span {
  color: #d7e8eb;
}

.demo-login-form .field input {
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.demo-login-form .field input::placeholder {
  color: #9fbcc1;
}

.demo-login-form .import-status {
  margin: 0;
  color: #c9dfe3;
}

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

.account-oauth-actions {
  margin: 12px 0 14px;
}

.oauth-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.oauth-button.apple {
  color: #fff;
  border-color: #111;
  background: #111;
}

.demo-cover .oauth-button {
  border-color: rgba(255, 255, 255, .24);
}

.demo-cover .oauth-button.google {
  color: var(--ink);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  transition: grid-template-columns .22s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 80px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 100vh;
  padding: 24px 18px;
  color: #ecf7f8;
  background: var(--nav);
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow: visible;
}

.sidebar-header {
  position: relative;
  min-height: 44px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f1fbfd;
  overflow: hidden;
}

.brand-mark img {
  width: 36px;
  height: 38px;
  display: block;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
  white-space: nowrap;
}

.brand span {
  color: #a9c4c9;
  font-size: 10px;
  line-height: 1.1;
  margin-top: 2px;
}

.brand-copy {
  min-width: 0;
}

.brand strong {
  font-size: 15px;
}

.sidebar-toggle {
  position: absolute;
  top: 25px;
  right: -14px;
  width: 28px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-left-color: var(--nav);
  border-radius: 0 8px 8px 0;
  color: #d7e8eb;
  background: var(--nav);
  box-shadow: 8px 10px 22px rgba(0, 0, 0, .1);
  display: inline-grid;
  place-items: center;
  z-index: 3;
}

.sidebar-toggle:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .24);
  border-left-color: var(--nav);
  background: #17434c;
}

.sidebar-toggle .icon {
  transition: transform .22s ease;
}

.app-shell.sidebar-collapsed .sidebar {
  padding-inline: 14px;
  align-items: center;
}

.app-shell.sidebar-collapsed .sidebar-header {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  top: 25px;
  right: -14px;
  margin-top: 0;
}

.app-shell.sidebar-collapsed .brand {
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand-copy,
.app-shell.sidebar-collapsed .sidebar-note {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar-toggle .icon {
  transform: rotate(180deg);
}

.nav-list {
  display: grid;
  gap: 8px;
  width: 100%;
}

.nav-item,
.mobile-item {
  border: 0;
  color: inherit;
  background: transparent;
}

.nav-item {
  min-height: 44px;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cfe2e5;
  text-align: left;
}

.app-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  padding-inline: 0;
  font-size: 0;
}

.app-shell.sidebar-collapsed .nav-item .icon {
  width: 22px;
  height: 22px;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, .12);
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.icon svg,
.icon-button svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.sidebar-note {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  padding: 14px;
  color: #d7e8eb;
  font-size: 13px;
  line-height: 1.4;
}

.main-content {
  min-width: 0;
  padding: 16px 18px;
}

.main-content.map-compact {
  padding: 16px 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.main-content.map-compact .topbar {
  margin-bottom: 10px;
}

.topbar h1,
.panel h2,
.weather-hero h2,
.panel h3,
.species-card h3 {
  margin: 0;
  line-height: 1.05;
}

.topbar h1 {
  font-size: 24px;
}

.main-content.map-compact .topbar h1 {
  font-size: 24px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.main-content.map-compact .eyebrow {
  margin-bottom: 3px;
  font-size: 10px;
}

.topbar-actions {
  display: flex;
  align-items: end;
  gap: 12px;
}

.primary-action,
.ghost-action,
.icon-button,
.segment,
.window-card {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
}

.primary-action.full {
  width: 100%;
}

.ghost-action {
  padding: 0 14px;
  color: var(--accent);
  background: #f7fbfb;
  font-weight: 800;
}

.icon-button {
  width: 42px;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  background: #fff;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.search-field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.field.compact input {
  width: 220px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.weather-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 20px;
  align-items: stretch;
  padding: 24px;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(255,255,255,.92), rgba(255,255,255,.72)),
    radial-gradient(circle at 80% 20%, #7dbdc5 0 22%, transparent 23%),
    linear-gradient(140deg, #bedfe3, #f8f6ed);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.weather-hero h2 {
  max-width: 720px;
  font-size: 38px;
}

.weather-hero p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-decision {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
}

.dashboard-decision .dashboard-window-strip {
  grid-column: 1 / -1;
  grid-template-columns: repeat(7, minmax(116px, 1fr));
  overflow-x: auto;
}

.dashboard-status-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, .74);
}

.dashboard-status-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-status-card strong {
  display: block;
  margin: 10px 0;
  font-size: 30px;
  line-height: 1;
}

.dashboard-status-card p {
  margin: 0;
}

.dashboard-status-card.favorable,
.dashboard-status-card.caution,
.dashboard-status-card.unsafe {
  border-color: color-mix(in srgb, var(--state) 28%, var(--line));
  background: var(--state-bg);
}

.dashboard-actions {
  margin-top: 20px;
}

.port-picker {
  display: grid;
  grid-template-columns: minmax(190px, .9fr) minmax(240px, 1.1fr);
  gap: 10px;
  align-items: end;
}

.dashboard-port-picker {
  max-width: 640px;
  margin-top: 14px;
}

.dashboard-port-picker .field {
  gap: 5px;
}

.dashboard-port-picker .field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-port-picker .field select {
  min-height: 38px;
  background: rgba(255, 255, 255, .92);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-meta span,
.tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, .7);
  color: var(--muted);
  font-size: 12px;
}

.hero-meta strong {
  color: var(--ink);
}

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

.window-card {
  padding: 14px;
  text-align: left;
  background: #fff;
}

.window-card span,
.window-card small,
.metric-label,
.trip-summary span,
.stat-list span,
.condition-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.window-card strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 18px;
}

.window-card.selected {
  outline: 3px solid rgba(22, 122, 80, .2);
}

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

.metric-card,
.panel,
.tool-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-card {
  padding: 18px;
}

.metric-card strong {
  display: block;
  margin: 7px 0;
  font-size: 24px;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.favorable {
  --state: var(--good);
  --state-bg: var(--good-bg);
}

.caution {
  --state: var(--caution);
  --state-bg: var(--caution-bg);
}

.unsafe {
  --state: var(--bad);
  --state-bg: var(--bad-bg);
}

.metric-card.favorable,
.metric-card.caution,
.metric-card.unsafe,
.window-card.favorable,
.window-card.caution,
.window-card.unsafe,
.condition-tile.favorable,
.condition-tile.caution,
.condition-row.favorable,
.condition-row.caution {
  border-color: color-mix(in srgb, var(--state) 28%, var(--line));
  background: var(--state-bg);
}

.content-grid {
  display: grid;
  gap: 18px;
}

.two-col {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
}

.route-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .6fr);
}

.panel {
  padding: 18px;
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--state, var(--accent));
  background: var(--state-bg, #e4f1f3);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.trip-summary,
.stat-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.trip-summary div,
.stat-list div {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-2);
}

.trip-summary strong,
.stat-list strong {
  display: block;
  margin-top: 6px;
}

.waypoint-list {
  display: grid;
  gap: 10px;
  max-height: 390px;
  overflow: auto;
}

.waypoint-list.compact-list {
  max-height: none;
}

.waypoint-row {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.waypoint-select {
  min-width: 0;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.waypoint-row:hover,
.waypoint-row.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 107, 120, .12);
}

.waypoint-row strong,
.waypoint-row span {
  display: block;
}

.waypoint-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.star-button {
  width: 26px;
  min-height: 26px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  color: #9aa9ad;
  background: transparent;
  display: inline-grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
}

.star-button:hover,
.star-button:focus {
  color: var(--caution);
  background: var(--caution-bg);
  outline: none;
}

.star-button.active {
  color: #d99510;
}

.workspace-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 114px);
}

#map.view.active .workspace-layout {
  height: calc(100vh - 96px);
  min-height: 560px;
}

#map.view.active .workspace-layout > * {
  min-height: 0;
}

.tool-panel {
  padding: 16px;
  min-width: 0;
}

.main-content.map-compact .tool-panel {
  padding: 10px;
}

#map.view.active .tool-panel {
  display: flex;
  flex-direction: column;
  max-height: 100%;
  overflow: hidden;
}

.waypoint-panel-header {
  margin-bottom: 6px;
}

.waypoint-panel-header h2 {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.search-field {
  position: relative;
  display: block;
  margin-bottom: 6px;
}

.search-field .icon {
  position: absolute;
  left: 12px;
  top: 8px;
  color: var(--muted);
}

.search-field input {
  min-height: 36px;
  padding-left: 40px;
}

.segmented {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.segment {
  min-width: 0;
  min-height: 40px;
  border: 0;
  padding: 4px;
  color: var(--muted);
  background: transparent;
  display: grid;
  place-items: center;
  gap: 2px;
  font-weight: 800;
  text-align: center;
}

.segment span {
  overflow: hidden;
  max-width: 100%;
  font-size: 11px;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.segment.active {
  color: #fff;
  background: var(--accent);
}

.segment strong {
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  padding: 0;
  display: block;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  line-height: 1;
}

.segment.active strong {
  color: rgba(255, 255, 255, .82);
}

.file-stack {
  margin: 8px 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

#map.view.active .file-stack {
  min-height: 0;
  margin-bottom: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

#source-list {
  min-height: 0;
  min-width: 0;
}

#map.view.active #source-list {
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.mini-form {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.panel-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 900;
}

.inline-actions,
.file-actions {
  display: inline-flex;
  gap: 6px;
}

.account-actions {
  flex-wrap: wrap;
  margin-top: 14px;
}

.file-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inline-actions .icon-button {
  width: 34px;
  min-height: 34px;
}

.compact-action {
  min-height: 30px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.file-actions select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.collection-card {
  border-top: 1px solid rgba(215, 226, 228, .8);
  padding: 6px 0;
  min-width: 0;
}

.collection-card:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.collection-card.is-off {
  opacity: .7;
}

.source-toggle {
  min-height: 36px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  min-width: 0;
}

.collection-expander {
  width: 28px;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  display: inline-grid;
  place-items: center;
}

.collection-expander .chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .16s ease;
}

.collection-expander[aria-expanded="true"] .chevron {
  transform: rotate(45deg);
}

.collection-expander:hover,
.collection-expander:focus {
  border-color: var(--line);
  color: var(--accent);
  background: #fff;
  outline: none;
}

.collection-waypoints {
  position: relative;
  display: grid;
  gap: 1px;
  margin: 2px 0 0 34px;
  min-width: 0;
  padding-left: 10px;
  border-left: 1px solid rgba(11, 107, 120, .18);
}

.collection-waypoints .waypoint-row {
  position: relative;
  min-height: 24px;
  border: 0;
  border-radius: 5px;
  padding: 4px 6px 4px 14px;
  background: transparent;
  box-shadow: none;
}

.collection-waypoints .waypoint-row::before {
  position: absolute;
  top: 50%;
  left: 5px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--muted);
  content: "";
  transform: translateY(-50%);
}

.collection-waypoints .waypoint-row:hover {
  background: rgba(11, 107, 120, .08);
  box-shadow: none;
}

.collection-waypoints .waypoint-row.active {
  background: rgba(11, 107, 120, .14);
  box-shadow: inset 3px 0 0 var(--accent);
}

.collection-waypoints .waypoint-row.active::before {
  background: var(--accent);
}

.collection-waypoints .waypoint-row strong {
  font-size: 12px;
}

.detail-star {
  width: 30px;
  min-height: 30px;
  margin-left: auto;
}

.waypoint-detail-panel {
  height: 220px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -10px 28px rgba(18, 41, 47, .08);
  display: flex;
  flex: 0 0 220px;
  flex-direction: column;
  overflow: hidden;
}

.waypoint-detail-panel h3 {
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.2;
}

.waypoint-detail-panel p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.waypoint-detail-notes {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.waypoint-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.waypoint-detail-grid div {
  min-width: 0;
  padding: 6px;
  border-radius: 6px;
  background: var(--surface-2);
}

.waypoint-detail-grid span,
.waypoint-detail-grid strong {
  display: block;
}

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

.waypoint-detail-grid strong {
  overflow: hidden;
  margin-top: 3px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-list label {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 41, 47, .42);
}

.modal-backdrop[hidden] {
  display: none;
}

.export-modal {
  width: min(900px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(215, 226, 228, .95);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(18, 41, 47, .24);
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.modal-header h2 {
  margin: 0;
  font-size: 24px;
}

.modal-actions {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.export-modal-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
  gap: 16px;
}

.export-option-group {
  display: grid;
  gap: 10px;
}

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

.export-profile-card,
.export-scope-grid label {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbfb;
}

.export-profile-card {
  display: grid;
  gap: 3px;
  text-align: left;
  color: var(--ink);
}

.export-profile-card.active {
  border-color: var(--accent);
  background: #e8f3f4;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.export-profile-card strong {
  font-size: 13px;
}

.export-profile-card span,
.export-guidance li,
.export-summary {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

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

.export-scope-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.export-collection-field.is-hidden {
  display: none;
}

.export-guidance {
  grid-row: span 2;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
}

.export-guidance h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.export-guidance ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.source-toggle > div,
.collection-name-stack {
  min-width: 0;
}

.collection-name-stack {
  display: grid;
  align-content: center;
  gap: 1px;
}

.source-name-input,
.collection-file-name {
  display: block;
}

.source-name-input {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  margin: 0;
  padding: 1px 3px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
}

.source-name-input:not([readonly]):hover,
.source-name-input:not([readonly]):focus {
  border-color: var(--line);
  background: #fff;
  outline: none;
}

.source-name-input[readonly] {
  cursor: default;
}

.collection-file-name {
  overflow: hidden;
  margin: 0;
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-toggle span {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.import-status,
.empty-state {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.import-status:empty {
  display: none;
}

.map-stage {
  position: relative;
  min-height: 620px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--water);
  box-shadow: var(--shadow);
}

.live-map {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 620px;
}

#map.view.active .map-stage,
#map.view.active .live-map,
#map.view.active .chart-map {
  min-height: 0;
}

.map-stage.has-live-map .live-map {
  display: block;
}

.map-stage.has-live-map .chart-map {
  display: none;
}

.map-stage.map-fallback .live-map {
  display: none;
}

.map-toolbar {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.map-toolbar .icon-button {
  width: 36px;
  min-height: 36px;
}

.map-toolbar .weather-play {
  font-size: 12px;
  font-weight: 900;
}

.map-toolbar .weather-play.active {
  color: #fff;
  background: var(--accent);
}

.map-toolbar .weather-play:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.weather-time {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(215, 226, 228, .86);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, .86);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.weather-time[hidden] {
  display: none;
}

.map-toolbar .ghost-action {
  min-height: 36px;
  padding: 0 10px;
}

.map-toolbar .route-action {
  margin-left: auto;
}

.map-legend {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 54px;
  display: grid;
  width: min(260px, calc(100% - 20px));
  max-height: min(46vh, 340px);
  gap: 6px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(215, 226, 228, .9);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 14px 38px rgba(18, 41, 47, .16);
  backdrop-filter: blur(8px);
}

.map-legend[hidden] {
  display: none;
}

.map-legend.is-collapsed {
  width: auto;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.legend-toggle {
  min-height: 30px;
  border: 1px solid rgba(215, 226, 228, .9);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 10px 26px rgba(18, 41, 47, .12);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.legend-toggle:hover {
  color: #fff;
  background: var(--accent);
}

.legend-content {
  display: grid;
  gap: 6px;
}

.map-legend.is-collapsed .legend-content {
  display: none;
}

.map-legend:not(.is-collapsed) .legend-toggle {
  justify-self: end;
  min-height: 24px;
  padding: 0 8px;
  border-color: rgba(18, 41, 47, .12);
  box-shadow: none;
}

.legend-card {
  display: grid;
  gap: 5px;
}

.legend-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.legend-card-image img {
  display: block;
  width: 100%;
  max-width: 275px;
  height: auto;
}

.legend-ramp {
  height: 9px;
  border: 1px solid rgba(18, 41, 47, .18);
  border-radius: 999px;
  background: var(--legend-ramp);
}

.legend-scale,
.legend-items {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.legend-items {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.legend-items span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.legend-items i {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(18, 41, 47, .18);
  border-radius: 3px;
  background: var(--legend-color);
}

.legend-opacity {
  display: grid;
  gap: 3px;
}

.legend-opacity span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.legend-opacity input {
  width: 100%;
  accent-color: var(--accent);
}

.map-layer-menu {
  position: relative;
}

.basemap-popover {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 0;
  width: min(330px, calc(100vw - 32px));
  max-height: min(72vh, 560px);
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 34px rgba(18, 41, 47, .16);
  backdrop-filter: blur(8px);
}

.layer-control-group {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 0 10px;
  border: 0;
}

.layer-control-group + .layer-control-group {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.basemap-popover span,
.layer-control-group legend {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.basemap-option {
  width: 100%;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.basemap-option:hover,
.basemap-option.active {
  color: #fff;
  background: var(--accent);
}

.layer-control-group label {
  min-height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.layer-control-group input {
  accent-color: var(--accent);
}

.weather-inline-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.maplibregl-popup-content {
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.maplibregl-popup-content strong,
.maplibregl-popup-content span {
  display: block;
}

.maplibregl-popup-content span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.chart-map {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 620px;
}

.land {
  fill: #d5e5d2;
  stroke: #9cbe9c;
  stroke-width: 2;
}

.shoal {
  fill: none;
  stroke: rgba(225, 91, 53, .45);
  stroke-width: 3;
}

.depth-line {
  fill: none;
  stroke: rgba(18, 41, 47, .26);
  stroke-width: 2;
  stroke-dasharray: 8 10;
}

.route-line {
  fill: none;
  stroke: #0b5f78;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 12 12;
}

.port-dot {
  fill: var(--nav);
}

.map-label,
.depth-label {
  fill: var(--ink);
  font-weight: 800;
  font-size: 16px;
}

.depth-label {
  opacity: .55;
  font-size: 13px;
}

.map-point {
  stroke: #fff;
  stroke-width: 4;
  cursor: pointer;
}

.map-point.private {
  fill: var(--accent-2);
}

.map-point.public {
  fill: var(--accent);
}

.map-point.favorite {
  stroke: #ffc640;
  stroke-width: 6;
}

.map-point.selected {
  fill: var(--ink);
  stroke: #ffc640;
  stroke-width: 7;
}

.route-mini-map {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.route-mini-map svg {
  display: block;
  width: 100%;
}

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

.form-grid.tight {
  gap: 10px;
}

.float-plan-workspace {
  display: grid;
  gap: 14px;
}

.float-plan-hero {
  display: grid;
  gap: 14px;
}

.float-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-action {
  text-decoration: none;
}

.float-plan-readiness {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.float-plan-readiness span {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 800;
}

.float-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.float-plan-wide {
  grid-column: 1 / -1;
}

.float-plan-fields,
.float-plan-checks {
  display: grid;
  gap: 8px;
}

.float-plan-fields div,
.float-plan-checks div {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  display: grid;
  gap: 3px;
  background: var(--surface-2);
}

.float-plan-fields span,
.float-plan-checks span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.float-plan-fields strong,
.float-plan-checks strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.float-plan-checks .ready {
  border-color: color-mix(in srgb, var(--good) 28%, var(--line));
  background: var(--good-bg);
}

.float-plan-checks .pending {
  border-color: color-mix(in srgb, var(--caution) 28%, var(--line));
  background: var(--caution-bg);
}

.float-plan-table-wrap {
  overflow-x: auto;
}

.float-plan-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.float-plan-table th,
.float-plan-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.float-plan-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.settings-wide {
  grid-column: 1 / -1;
}

.threshold-grid,
.settings-subgrid {
  display: grid;
  gap: 12px;
}

.threshold-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.threshold-card {
  border: 1px solid color-mix(in srgb, var(--state) 28%, var(--line));
  border-radius: 8px;
  padding: 12px;
  background: var(--state-bg);
  display: grid;
  gap: 10px;
}

.threshold-card > strong {
  color: var(--ink);
  font-size: 15px;
}

.settings-subgrid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.emergency-contact-grid .field + .field {
  margin-top: 8px;
}

.settings-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checkbox-grid,
.species-interest-list {
  display: grid;
  gap: 8px;
}

.checkbox-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.species-interest-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.checkbox-grid label,
.species-interest-list label {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.checkbox-grid label.is-off,
.species-interest-list label.is-off {
  color: var(--muted);
  background: var(--surface-2);
}

.field textarea {
  width: 100%;
  min-height: 98px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.safety-copy {
  margin: 16px 0 0;
  padding: 12px;
  border-radius: 8px;
  color: #674100;
  background: var(--caution-bg);
  line-height: 1.45;
}

.condition-stack,
.change-list,
.setting-list {
  display: grid;
  gap: 10px;
}

.trip-review {
  margin-top: 18px;
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.review-status {
  border: 1px solid color-mix(in srgb, var(--state) 28%, var(--line));
  border-radius: 8px;
  padding: 16px;
  background: var(--state-bg);
}

.review-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.review-status strong {
  display: block;
  margin: 8px 0;
  color: var(--state);
  font-size: 28px;
}

.review-status p {
  margin: 0;
  line-height: 1.45;
}

.checklist {
  display: grid;
  gap: 8px;
}

.checklist label {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.notes-field {
  align-content: start;
}

.condition-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.condition-matrix {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.condition-tile {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.condition-tile span,
.condition-tile small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.condition-tile strong {
  display: block;
  margin: 10px 0;
  font-size: 20px;
}

.forecast-explorer-panel {
  margin-top: 18px;
}

.forecast-window-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.forecast-window,
.direction-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-2);
  text-align: left;
}

.forecast-window {
  min-height: 72px;
  padding: 10px;
}

.forecast-window span,
.direction-cell span,
.explorer-label,
.explorer-selection-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.forecast-window strong,
.direction-cell strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.forecast-window.active,
.direction-cell.active {
  border-color: rgba(11, 107, 120, .55);
  box-shadow: 0 0 0 3px rgba(11, 107, 120, .14);
}

.forecast-window.favorable,
.direction-cell.favorable {
  background: var(--good-bg);
}

.forecast-window.caution,
.direction-cell.caution {
  background: var(--caution-bg);
}

.forecast-window.unsafe,
.direction-cell.unsafe {
  background: var(--bad-bg);
}

.forecast-window.pending,
.direction-cell.pending {
  color: var(--muted);
}

.forecast-explorer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 14px;
  align-items: stretch;
  margin-top: 14px;
}

.explorer-label {
  margin: 0 0 8px;
}

.direction-distance-grid {
  display: grid;
  gap: 8px;
}

.direction-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.direction-cell {
  min-height: 74px;
  padding: 10px;
}

.direction-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}

.explorer-selection-card {
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-2);
}

.explorer-selection-card strong {
  display: block;
  margin: 8px 0;
  font-size: 22px;
}

.explorer-selection-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.marine-forecast-panel {
  margin: 18px 0;
}

.forecast-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.forecast-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 18px;
  height: 4px;
  border-radius: 999px;
  display: inline-block;
  background: var(--accent);
}

.legend-swatch.wave-height {
  background: var(--accent);
}

.legend-swatch.wave-period {
  background: var(--accent-2);
}

.legend-swatch.caution-band {
  height: 10px;
  border: 1px solid rgba(165, 102, 6, .2);
  background: var(--caution-bg);
}

.marine-forecast-chart {
  min-height: 320px;
  overflow-x: auto;
}

.marine-forecast-chart p {
  min-height: 260px;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 8px;
}

.marine-forecast-chart svg {
  width: 100%;
  min-width: 780px;
  height: auto;
  display: block;
}

.forecast-band {
  opacity: .42;
}

.forecast-band.favorable {
  fill: var(--good-bg);
}

.forecast-band.caution {
  fill: var(--caution-bg);
}

.forecast-axis,
.forecast-grid line {
  stroke: var(--line);
  stroke-width: 1;
}

.forecast-grid line {
  stroke-dasharray: 6 6;
}

.forecast-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.forecast-line.wave-height {
  stroke: var(--accent);
}

.forecast-line.wave-period {
  stroke: var(--accent-2);
}

.forecast-dot {
  stroke: #fff;
  stroke-width: 2;
}

.forecast-dot.favorable {
  fill: var(--good);
}

.forecast-dot.caution {
  fill: var(--caution);
}

.forecast-dot.unsafe {
  fill: var(--bad);
}

.forecast-labels text,
.forecast-axis-title {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.forecast-axis-title {
  fill: var(--ink);
}

.forecast-axis-title.period {
  fill: var(--accent-2);
}

.forecast-readout {
  display: grid;
  gap: 10px;
}

.forecast-readout div {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-2);
}

.hourly-chart {
  height: 240px;
  display: flex;
  align-items: end;
  gap: 10px;
  padding-top: 22px;
}

.hourly-chart div {
  flex: 1;
  min-width: 36px;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: end;
  justify-content: center;
  color: #fff;
  background: var(--good);
}

.hourly-chart div.caution {
  background: var(--caution);
}

.hourly-chart div.unsafe {
  background: var(--bad);
}

.hourly-chart span {
  margin-bottom: 8px;
  font-weight: 900;
}

.change-list div {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-2);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 8px;
  background: var(--accent);
}

.status-dot.favorable {
  background: var(--good);
}

.status-dot.caution {
  background: var(--caution);
}

.species-workspace {
  display: grid;
  gap: 14px;
}

.species-filter-tabs {
  max-width: 430px;
}

.species-planner {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
}

.planner-grid {
  display: grid;
  grid-template-columns: minmax(190px, .9fr) minmax(220px, 1.1fr) minmax(150px, .7fr) minmax(260px, 1fr);
  gap: 12px;
  align-items: end;
}

.distance-range {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.distance-range > span {
  display: block;
}

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

.range-inputs label {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.range-inputs input {
  width: 58px;
  min-height: 32px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 900;
}

.planner-context {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 10px;
}

.planner-context div,
.species-planning-notes {
  border-radius: 8px;
  background: var(--surface-2);
}

.planner-context div {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px;
}

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

.planner-context strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.species-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.species-summary div {
  display: grid;
  gap: 4px;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
}

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

.species-summary strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

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

.species-card {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
}

.species-card-body {
  padding: 16px;
}

.species-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.species-confidence {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.species-card h3 {
  margin-top: 12px;
  font-size: 22px;
}

.species-card p {
  color: var(--muted);
  line-height: 1.48;
}

.species-art {
  aspect-ratio: 16 / 7;
  position: relative;
  overflow: hidden;
  background: #d7eef0;
}

.species-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.species-reasoning {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.species-reasoning h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.species-reasoning ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.species-tactics {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.species-tactics span {
  border-left: 3px solid var(--accent);
  padding-left: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.species-planning-notes {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 10px;
}

.species-planning-notes span:not(.pill) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1120px) {
  .export-modal-grid {
    grid-template-columns: 1fr;
  }

  .export-guidance {
    grid-row: auto;
  }

  .metric-grid,
  .condition-matrix,
  .species-grid,
  .species-summary,
  .planner-grid,
  .planner-context,
  .float-plan-grid,
  .settings-workspace,
  .threshold-grid,
  .settings-subgrid,
  .forecast-explorer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weather-hero,
  .two-col,
  .route-grid,
  .workspace-layout,
  .review-layout,
  .forecast-explorer-grid {
    grid-template-columns: 1fr;
  }

  .tool-panel {
    order: 2;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
    padding-bottom: 72px;
  }

  .sidebar {
    display: none;
  }

  .main-content {
    padding: 18px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions,
  .oauth-actions,
  .export-profile-list,
  .export-scope-grid,
  .form-grid,
  .port-picker,
  .trip-summary,
  .stat-list,
  .metric-grid,
  .condition-matrix,
  .species-grid,
  .species-summary,
  .planner-grid,
  .planner-context,
  .float-plan-grid,
  .settings-workspace,
  .threshold-grid,
  .settings-subgrid,
  .species-interest-list,
  .forecast-explorer-grid,
  .range-inputs {
    grid-template-columns: 1fr;
    display: grid;
  }

  .modal-header,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-actions .ghost-action,
  .modal-actions .primary-action {
    width: 100%;
  }

  .forecast-window-strip {
    grid-template-columns: repeat(7, minmax(120px, 1fr));
  }

  .direction-row {
    grid-template-columns: 1fr;
  }

  .species-art {
    aspect-ratio: 16 / 8;
  }

  .field.compact input {
    width: 100%;
  }

  .weather-hero {
    padding: 18px;
  }

  .weather-hero h2 {
    font-size: 28px;
  }

  .window-strip {
    grid-template-columns: 1fr;
  }

  .map-stage,
  .chart-map,
  .live-map {
    min-height: 520px;
  }

  #map.view.active .workspace-layout {
    height: auto;
    min-height: 0;
  }

  #map.view.active .map-stage,
  #map.view.active .chart-map,
  #map.view.active .live-map {
    min-height: 520px;
  }

  #map.view.active .tool-panel {
    max-height: none;
    overflow: visible;
  }

  #map.view.active .file-stack {
    display: block;
  }

  #map.view.active #source-list {
    overflow: visible;
    padding-right: 0;
  }

  .mobile-nav {
    position: fixed;
    z-index: 20;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px;
    border-top: 1px solid var(--line);
    background: #fff;
  }

  .mobile-item {
    min-height: 46px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 900;
  }

  .mobile-item.active {
    color: #fff;
    background: var(--accent);
  }
}
