@font-face {
  font-family: "Plex Arabic";
  src: url("fonts/plex-arabic-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Plex Arabic";
  src: url("fonts/plex-arabic-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Ruqaa Ink";
  src: url("fonts/ruqaa-ink-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #203b39;
  --ink-soft: #526663;
  --paper: #fdfcf8;
  --paper-deep: #f5f1e7;
  --canvas: #e9e5db;
  --sea: #e9f2ee;
  --sea-deep: #176762;
  --sea-mid: #5e9890;
  --sand: #f1dfb3;
  --red: #bd513e;
  --amber: #a97025;
  --green: #347356;
  --line: rgba(32, 59, 57, 0.17);
  --line-strong: rgba(32, 59, 57, 0.3);
  --shadow: 0 18px 55px rgba(45, 55, 49, 0.09), 0 2px 5px rgba(45, 55, 49, 0.05);
  --radius: 8px;
  font-family: "Plex Arabic", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--canvas);
  background-image:
    radial-gradient(circle at 10% 5%, rgba(255, 255, 255, 0.75), transparent 27%),
    radial-gradient(circle at 92% 30%, rgba(192, 168, 112, 0.12), transparent 28%),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(43, 56, 48, 0.012) 6px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(rgba(33, 48, 41, 0.15) 0.45px, transparent 0.6px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
}

button,
input,
select,
textarea { font: inherit; }

button { cursor: pointer; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(23, 103, 98, 0.2);
  outline-offset: 3px;
}

h1,
h2,
p { text-wrap: pretty; }

.app-header {
  width: min(1180px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(253, 252, 248, 0.93);
  border: 1px solid rgba(32, 59, 57, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(45, 55, 49, 0.07);
  position: sticky;
  top: 8px;
  z-index: 20;
}

.app-header::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(32, 59, 57, 0.035);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  font-family: "Ruqaa Ink", serif;
  font-size: 27px;
  line-height: 1;
  transform: rotate(-5deg);
}

.brand strong {
  display: block;
  font-family: "Ruqaa Ink", "Plex Arabic", serif;
  font-size: 23px;
  line-height: 1;
}

.brand small { color: var(--ink-soft); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.privacy-pill,
.install-button {
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
}

.privacy-pill {
  border: 1px dashed rgba(52, 115, 86, 0.35);
  background: transparent;
  color: var(--green);
}

.install-button {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 20px auto 64px;
}

.panel {
  position: relative;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(43, 99, 91, 0.023) 1px, transparent 1px),
    radial-gradient(rgba(32, 59, 57, 0.08) 0.35px, transparent 0.5px);
  background-size: 100% 32px, 5px 5px;
  border: 1px solid rgba(32, 59, 57, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(32, 59, 57, 0.035);
  pointer-events: none;
}

.setup-panel {
  display: grid;
  grid-template-columns: 0.82fr 1.4fr;
  gap: 52px;
  padding: 48px;
  min-height: 650px;
  align-items: center;
  overflow: hidden;
}

.setup-intro { align-self: stretch; padding-top: 76px; }

.setup-intro h1,
.goal-heading h1,
.no-active h1 {
  margin: 7px 0 10px;
  font-family: "Ruqaa Ink", "Plex Arabic", serif;
  font-weight: 700;
  line-height: 1.35;
}

.setup-intro h1 {
  max-width: 8ch;
  font-size: clamp(48px, 7vw, 76px);
}

.setup-intro p {
  max-width: 36ch;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.9;
}

.eyebrow {
  display: inline-block;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.setup-route {
  width: min(260px, 100%);
  height: 82px;
  margin-top: 48px;
  display: flex;
  align-items: center;
  direction: ltr;
}

.setup-dot {
  width: 13px;
  height: 13px;
  border: 3px solid var(--red);
  border-radius: 50%;
}

.setup-line {
  height: 30px;
  flex: 1;
  border-top: 2px dashed rgba(32, 59, 57, 0.45);
  border-radius: 50%;
  transform: translateY(14px) rotate(-4deg);
}

.setup-flag {
  color: var(--red);
  font-size: 32px;
  transform: translateY(-18px) rotate(7deg);
}

.goal-form,
.dialog-form { display: grid; gap: 18px; }

label { display: grid; gap: 7px; font-weight: 700; }
label > span { font-size: 13px; }

input,
select,
textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 11px 4px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.3);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sea-deep);
  box-shadow: inset 0 -2px var(--sea-deep);
}

textarea { resize: vertical; line-height: 1.7; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.field-grid.two { grid-template-columns: 1fr 1.4fr; }

.next-action-fields {
  display: grid;
  grid-template-columns: 1.5fr 0.75fr;
  gap: 16px;
  padding: 16px;
  border: 1px dashed rgba(189, 81, 62, 0.42);
  background: rgba(189, 81, 62, 0.035);
  transform: rotate(-0.2deg);
}

.primary-button,
.secondary-button,
.ghost-button,
.text-button,
.icon-button,
.ink-button {
  border-radius: 4px;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.primary-button {
  min-height: 48px;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  box-shadow: 3px 3px 0 rgba(32, 59, 57, 0.13);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.ink-button:hover { transform: translateY(-1px) rotate(-0.2deg); }

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.ink-button:active { transform: translateY(1px); }

.secondary-button {
  min-height: 43px;
  padding: 9px 14px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.ghost-button {
  min-height: 40px;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  font-weight: 800;
}

.ghost-button small { margin-right: 5px; color: var(--ink-soft); font-weight: 400; }
.ghost-button.has-compass { border-style: solid; border-color: rgba(52, 115, 86, 0.45); }
.ghost-button.has-compass small { color: var(--green); }

.text-button {
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
}

.text-button:hover { color: var(--ink); background: rgba(32, 59, 57, 0.04); }
.danger-text { color: #9d4036; }

.ink-button {
  padding: 7px 12px;
  border: 1px solid var(--red);
  background: transparent;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.file-button { position: relative; cursor: pointer; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

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

.top-actions-group { display: flex; align-items: center; gap: 6px; }

.tools-menu { position: relative; z-index: 12; }

.tools-menu summary {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  list-style: none;
  letter-spacing: 2px;
}

.tools-menu summary::-webkit-details-marker { display: none; }

.tools-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 170px;
  display: grid;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.tools-popover .text-button { text-align: right; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.75fr);
  align-items: start;
  gap: 14px;
}

.map-panel { padding: 24px; overflow: hidden; }

.goal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.goal-heading h1 { font-size: clamp(32px, 4vw, 48px); }
.muted { color: var(--ink-soft); margin: 5px 0; line-height: 1.65; }

.progress-number { min-width: 116px; text-align: left; }

.progress-number strong {
  display: block;
  color: var(--sea-deep);
  font-family: "Ruqaa Ink", "Plex Arabic", serif;
  font-size: 43px;
  line-height: 1;
}

.progress-number span { color: var(--ink-soft); font-size: 12px; }

.voyage-map {
  overflow: hidden;
  border: 1px solid rgba(32, 59, 57, 0.18);
  border-radius: 5px;
  box-shadow: inset 0 0 40px rgba(32, 59, 57, 0.04);
}

.voyage-map svg { display: block; width: 100%; height: auto; }
.sea-bg { fill: url(#mapWash); }
.grid-line { stroke: rgba(32, 59, 57, 0.055); stroke-width: 1; fill: none; }

.land {
  fill: var(--sand);
  stroke: rgba(87, 67, 29, 0.45);
  stroke-width: 2;
  stroke-dasharray: 2 4;
}

.land-destination { opacity: 0.48; }

#guidePath {
  fill: none;
  stroke: rgba(32, 59, 57, 0.24);
  stroke-width: 3;
  stroke-dasharray: 2 10;
  stroke-linecap: round;
}

#traveledPath {
  fill: none;
  stroke: var(--sea-deep);
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.map-doodles {
  fill: none;
  stroke: rgba(23, 103, 98, 0.22);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.map-doodles .wave-doodle { stroke: rgba(23, 103, 98, 0.34); }
.map-ring { stroke-dasharray: 2 6; }

.start-marker circle:first-child,
.destination-marker circle {
  fill: var(--paper);
  stroke: var(--red);
  stroke-width: 3;
}

.start-marker circle:nth-child(2) { fill: var(--red); }

.start-marker text,
.destination-marker text {
  fill: var(--ink);
  font-family: "Plex Arabic", sans-serif;
  font-size: 15px;
  font-weight: 800;
}

.destination-marker { opacity: 0.64; }
.destination-marker path { fill: var(--red); stroke: var(--red); stroke-width: 4; }

#boat {
  transform-box: view-box;
  transform-origin: 0 0;
}

.map-ready #boat { transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }

.boat-body {
  transform-box: fill-box;
  transform-origin: center;
  animation: boat-float 3.2s ease-in-out infinite;
}

.boat-halo { fill: rgba(253, 252, 248, 0.78); stroke: rgba(32, 59, 57, 0.1); }
.boat-hull { fill: #6f4536; stroke: #3f302b; stroke-width: 2; }
.mast { stroke: #40362f; stroke-width: 3; }
.sail { stroke: #40362f; stroke-width: 2; }
.sail.one { fill: #fffdf6; }
.sail.two { fill: #e8d8aa; }
.boat-flag { fill: var(--red); }

.map-caption {
  fill: rgba(32, 59, 57, 0.62);
  font-family: "Ruqaa Ink", "Plex Arabic", serif;
  font-size: 19px;
}

.checkin-dot { fill: var(--red); stroke: var(--paper); stroke-width: 3; }

.compass-rose circle { fill: rgba(253, 252, 248, 0.45); stroke: rgba(32, 59, 57, 0.24); stroke-dasharray: 2 4; }
.compass-rose path { fill: rgba(32, 59, 57, 0.34); }
.compass-rose text { fill: var(--ink-soft); font-family: "Plex Arabic", sans-serif; font-size: 12px; }

.progress-track {
  height: 5px;
  margin-top: 16px;
  overflow: visible;
  border-bottom: 1px dashed rgba(32, 59, 57, 0.25);
}

.progress-track span {
  display: block;
  height: 5px;
  width: 0;
  background: var(--sea-deep);
  transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.route-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 11px;
}

.control-panel {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.next-action-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 15px 14px;
  border: 1px solid rgba(189, 81, 62, 0.38);
  background: rgba(255, 253, 247, 0.72);
  transform: rotate(0.25deg);
}

.next-action-card::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 42%;
  width: 64px;
  height: 15px;
  background: rgba(231, 213, 166, 0.55);
  transform: rotate(-2deg);
}

.next-action-card h2 {
  margin: 5px 0 4px;
  font-family: "Ruqaa Ink", "Plex Arabic", serif;
  font-size: 24px;
  line-height: 1.45;
}

.next-action-card p { margin: 0; color: var(--ink-soft); font-size: 12px; }

.status-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.status-card strong { display: block; margin: 1px 0 4px; }
.status-card p { margin: 0; color: var(--ink-soft); line-height: 1.55; font-size: 13px; }

.status-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--sea-deep);
  flex: 0 0 auto;
}

.status-drift .status-icon { color: var(--amber); }
.status-offtrack .status-icon { color: var(--red); }
.status-arrived .status-icon,
.status-ontrack .status-icon { color: var(--green); }

.guidance-card {
  padding: 12px 13px;
  border-right: 3px solid var(--sand);
  background: rgba(241, 223, 179, 0.13);
}

.guidance-card strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.guidance-card p {
  margin: 3px 0 2px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.guidance-card .text-button {
  padding: 5px 0 0;
  color: var(--sea-deep);
  font-size: 11px;
}

.checkin-section h2,
.section-heading h2 {
  margin: 3px 0;
  font-family: "Ruqaa Ink", "Plex Arabic", serif;
  font-size: 26px;
}

.checkin-section form { display: grid; gap: 12px; margin-top: 12px; }

.secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: auto;
}

.secondary-actions .success-button { grid-column: 1 / -1; background: var(--green); border-color: var(--green); }

.milestone-list { display: grid; gap: 7px; margin-top: 12px; }

.milestone-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px dashed var(--line);
}

.milestone-item input { width: 18px; height: 18px; accent-color: var(--sea-deep); }
.milestone-item.done span { text-decoration: line-through; color: var(--ink-soft); }
.milestone-item small { margin-right: auto; color: var(--ink-soft); }
.milestone-item:not(.done):first-child { color: var(--sea-deep); font-weight: 800; }

.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.history-panel,
.harbor-panel { padding: 20px; min-height: 220px; }

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.history-list,
.harbor-list { display: grid; gap: 0; }

.history-item,
.harbor-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 3px;
  border-bottom: 1px dashed var(--line);
}

.history-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--sea-deep);
  font-weight: 900;
}

.history-copy,
.harbor-copy { min-width: 0; }

.history-copy strong,
.harbor-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-copy small,
.harbor-copy small { color: var(--ink-soft); }
.harbor-item button { margin-right: auto; white-space: nowrap; }
.empty-list { color: var(--ink-soft); padding: 18px 0; text-align: center; }

.no-active { padding: 48px 24px; text-align: center; }
.no-active p { color: var(--ink-soft); }

[hidden] { display: none !important; }

dialog {
  color: var(--ink);
  background: var(--paper);
}

#reviewDialog,
.sheet-dialog {
  width: min(560px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  border: 1px solid rgba(32, 59, 57, 0.2);
  border-radius: 7px;
  padding: 0;
  overflow: auto;
  box-shadow: 0 30px 100px rgba(24, 39, 35, 0.3);
}

#reviewDialog::backdrop,
.sheet-dialog::backdrop {
  background: rgba(26, 39, 36, 0.42);
  backdrop-filter: blur(2px);
}

.dialog-form {
  padding: 26px;
  background-image:
    linear-gradient(rgba(43, 99, 91, 0.025) 1px, transparent 1px),
    radial-gradient(rgba(32, 59, 57, 0.08) 0.35px, transparent 0.5px);
  background-size: 100% 32px, 5px 5px;
}

.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }

.dialog-heading h2 {
  margin: 4px 0 0;
  font-family: "Ruqaa Ink", "Plex Arabic", serif;
  font-size: 30px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 22px;
}

.dialog-lead,
.install-instructions { margin: -4px 0 4px; color: var(--ink-soft); line-height: 1.8; }

.after-progress .dialog-heading::after {
  content: "المركب اتحرك";
  position: absolute;
  top: 12px;
  left: 64px;
  color: var(--green);
  font-size: 11px;
  transform: rotate(-5deg);
}

.compass-dialog { width: min(620px, calc(100% - 24px)); }

.compass-progress {
  height: 3px;
  overflow: hidden;
  background: rgba(32, 59, 57, 0.1);
}

.compass-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
  transition: width 0.25s ease;
}

.step-label { margin: -8px 0 -4px; color: var(--ink-soft); font-size: 11px; }

.compass-step {
  min-width: 0;
  margin: 0;
  padding: 20px 0 6px;
  border: 0;
}

.compass-step legend {
  padding: 0;
  font-family: "Ruqaa Ink", "Plex Arabic", serif;
  font-size: clamp(27px, 5vw, 36px);
  line-height: 1.45;
}

.compass-step p { margin: 7px 0 18px; color: var(--ink-soft); }
.compass-step textarea { min-height: 130px; font-size: 17px; }

.compass-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.compass-nav .primary-button { min-width: 120px; }
.install-dialog { width: min(440px, calc(100% - 24px)); }

.guide-dialog { width: min(720px, calc(100% - 24px)); }

.guide-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.guide-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
}

.guide-item > span {
  color: var(--red);
  font-family: "Ruqaa Ink", "Plex Arabic", serif;
  font-size: 22px;
  line-height: 1;
}

.guide-item strong { display: block; margin-bottom: 4px; }

.guide-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.source-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 2px 0 0;
}

.source-links a { color: var(--sea-deep); font-size: 12px; }

.data-dialog { width: min(520px, calc(100% - 24px)); }

.data-facts { display: grid; gap: 0; }

.data-facts p {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-soft);
  line-height: 1.7;
}

.data-facts strong { color: var(--ink); }

.storage-state {
  margin: 0;
  padding: 11px;
  border: 1px dashed rgba(52, 115, 86, 0.35);
  color: var(--green);
  font-size: 12px;
  line-height: 1.6;
}

.data-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.backup-file-button {
  display: grid;
  place-items: center;
}

.request-storage-button { grid-column: 1 / -1; }

@keyframes boat-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-3px) rotate(1.2deg); }
}

@media (max-width: 900px) {
  .setup-panel,
  .dashboard-grid,
  .content-grid { grid-template-columns: 1fr; }

  .setup-panel { padding: 34px; gap: 15px; }
  .setup-intro { padding-top: 10px; }
  .setup-intro h1 { max-width: none; }
  .setup-route { margin-top: 18px; }
  .control-panel { min-height: auto; }
}

@media (max-width: 620px) {
  .app-header,
  .app-shell { width: min(100% - 16px, 1180px); }

  .app-header { top: 5px; margin-top: 8px; }
  .app-shell { margin-top: 12px; }
  .privacy-pill,
  .brand small { display: none; }
  .install-button { font-size: 11px; }

  .setup-panel,
  .map-panel,
  .control-panel,
  .history-panel,
  .harbor-panel { padding: 17px; }

  .setup-panel { min-height: auto; }
  .setup-intro h1 { font-size: 48px; }
  .setup-intro p { font-size: 16px; }
  .setup-route { display: none; }

  .field-grid,
  .field-grid.two,
  .next-action-fields { grid-template-columns: 1fr; }

  .goal-heading { display: grid; margin-bottom: 12px; }
  .goal-heading h1 { font-size: 36px; }
  .progress-number { text-align: right; }

  .top-actions { align-items: center; }
  .top-actions-group { min-width: 0; }
  .compass-button small,
  #addGoalButton { font-size: 11px; }

  .voyage-map svg {
    width: 118%;
    max-width: none;
    margin-right: -9%;
  }

  .map-caption { font-size: 17px; }
  .route-meta { align-items: flex-start; flex-direction: column; gap: 2px; }
  .next-action-card h2 { font-size: 23px; }

  .secondary-actions { grid-template-columns: 1fr; }
  .secondary-actions .success-button { grid-column: auto; }
  .harbor-item { align-items: flex-start; flex-wrap: wrap; }
  .harbor-item button { margin-right: 41px; }

  .dialog-form { padding: 21px; }
  .compass-step legend { font-size: 29px; }
  .guide-list,
  .data-actions { grid-template-columns: 1fr; }

  .request-storage-button { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
