@font-face {
  font-family: "OTW Sans Arabic";
  src: url("/assets/fonts/noto-sans-arabic-arabic-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "OTW Sans";
  src: url("/assets/fonts/noto-sans-latin-wght-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --otw-ink: #06131c;
  --otw-ink-2: #0b1e2a;
  --otw-text: #102a32;
  --otw-muted: #58716f;
  --otw-paper: #ffffff;
  --otw-canvas: #f3f8f6;
  --otw-mint: #20e0b2;
  --otw-mint-deep: #007a67;
  --otw-mint-soft: #ddf8f0;
  --otw-blue: #176fc1;
  --otw-critical: #b4233a;
  --otw-border: #d6e3df;
  --otw-border-soft: #e6efec;
  --otw-shadow-sm: 0 2px 8px rgba(6, 19, 28, 0.12);
  --otw-shadow-md: 0 12px 36px rgba(6, 19, 28, 0.16);
  --otw-shadow-lg: 0 24px 70px rgba(6, 19, 28, 0.22);
  --otw-radius-sm: 12px;
  --otw-radius-md: 18px;
  --otw-radius-lg: 26px;
  --otw-panel-width: clamp(390px, 29vw, 420px);
  --otw-rail-width: 72px;
  --otw-safe-top: env(safe-area-inset-top, 0px);
  --otw-safe-bottom: env(safe-area-inset-bottom, 0px);
  --otw-ease: cubic-bezier(0.2, 0.75, 0.25, 1);
  --otw-font-arabic: "OTW Sans Arabic", "OTW Sans", Tahoma, Arial, sans-serif;
  --otw-font-latin: "OTW Sans", "Segoe UI", Arial, sans-serif;
  --otw-font-ui: var(--otw-font-arabic);
  font-family: var(--otw-font-ui);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

html[lang="en"] {
  --otw-font-ui: var(--otw-font-latin);
}

:lang(en) {
  font-family: var(--otw-font-latin);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--otw-ink);
}

body,
button,
input {
  font: inherit;
}

body {
  font-size: 16px;
  line-height: 1.5;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

button {
  border: 0;
}

button:not(:disabled),
a {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

img {
  display: block;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  inset: 10px auto auto 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--otw-ink);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 180ms var(--otw-ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  width: 100%;
  height: 100dvh;
  min-height: 320px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--otw-panel-width) var(--otw-rail-width);
  grid-template-areas: "map panel rail";
  overflow: hidden;
  direction: ltr;
  background: var(--otw-canvas);
}

html[dir="ltr"] .app-shell {
  grid-template-columns: var(--otw-rail-width) var(--otw-panel-width) minmax(0, 1fr);
  grid-template-areas: "rail panel map";
}

html[dir="ltr"] .workspace-panel,
html[dir="ltr"] .app-rail,
html[dir="ltr"] .map-stage {
  direction: ltr;
}

html[dir="ltr"] .quick-card,
html[dir="ltr"] .style-card,
html[dir="ltr"] .toggle-row,
html[dir="ltr"] .menu-row {
  text-align: left;
}

html[dir="ltr"] .route-fields {
  padding-right: 0;
  padding-left: 29px;
}

html[dir="ltr"] .route-line {
  right: auto;
  left: 8px;
}

.map-stage {
  position: relative;
  z-index: 0;
  grid-area: map;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  direction: rtl;
  background:
    radial-gradient(circle at 72% 28%, rgba(32, 224, 178, 0.18), transparent 24%),
    linear-gradient(145deg, #dfece7, #edf4f1);
}

.map-canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-loading {
  position: absolute;
  z-index: 8;
  inset: 50% auto auto 50%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--otw-text);
  box-shadow: var(--otw-shadow-md);
  font-size: 0.875rem;
  font-weight: 600;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(14px);
}

.loading-mark {
  width: 16px;
  height: 16px;
  border: 2px solid #b9d7ce;
  border-top-color: var(--otw-mint-deep);
  border-radius: 50%;
  animation: otw-spin 800ms linear infinite;
}

@keyframes otw-spin {
  to { transform: rotate(1turn); }
}

.map-fallback {
  position: absolute;
  z-index: 9;
  inset: 50% auto auto 50%;
  width: min(88%, 390px);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--otw-radius-lg);
  background: rgba(255, 255, 255, 0.94);
  color: var(--otw-text);
  text-align: center;
  box-shadow: var(--otw-shadow-lg);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(20px);
}

.map-fallback img {
  margin: 0 auto 16px;
  border-radius: 15px;
}

.map-fallback h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.map-fallback p {
  margin: 0 0 20px;
  color: var(--otw-muted);
  line-height: 1.7;
}

.workspace-panel {
  position: relative;
  z-index: 20;
  grid-area: panel;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  direction: rtl;
  border-inline-start: 1px solid var(--otw-border);
  background: var(--otw-paper);
  box-shadow: -12px 0 36px rgba(6, 19, 28, 0.09);
}

.search-chrome {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  padding: 16px 16px 13px;
  border-bottom: 1px solid var(--otw-border-soft);
  background: rgba(255, 255, 255, 0.97);
}

.search-form {
  position: relative;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 6px;
  border: 1px solid #cbdcd7;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--otw-shadow-sm);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-form:focus-within {
  border-color: var(--otw-mint-deep);
  box-shadow: 0 0 0 3px rgba(0, 122, 103, 0.15), var(--otw-shadow-sm);
}

.search-leading-icon {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  color: var(--otw-mint-deep);
}

.search-form input {
  min-width: 0;
  height: 52px;
  flex: 1;
  padding: 0 4px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--otw-text);
  font-size: 1rem;
  font-weight: 500;
}

.search-form input::placeholder {
  color: #708682;
  opacity: 1;
}

.field-button,
.icon-button {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef5f3;
  color: var(--otw-text);
  transition: background 180ms ease, color 180ms ease;
}

.field-button:hover,
.icon-button:hover {
  background: var(--otw-mint-soft);
  color: var(--otw-mint-deep);
}

.search-submit {
  min-width: 58px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 13px;
  background: var(--otw-ink);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  transition: background 180ms ease;
}

.search-submit:hover {
  background: #133444;
}

.connection-status {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 7px 2px 1px;
  color: var(--otw-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.connection-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--otw-mint-deep);
  box-shadow: 0 0 0 4px rgba(0, 122, 103, 0.1);
}

.category-strip {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  padding-bottom: 2px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.category-chip {
  min-width: max-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid var(--otw-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--otw-text);
  font-size: 0.875rem;
  font-weight: 600;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.category-chip:hover,
.category-chip[aria-pressed="true"] {
  border-color: rgba(0, 122, 103, 0.42);
  background: var(--otw-mint-soft);
  color: #005f51;
}

.chip-icon {
  width: 19px;
  height: 19px;
}

.panel-stack {
  min-height: 0;
  flex: 1;
  position: relative;
  display: flex;
  overflow: hidden;
}

.context-panel {
  width: 100%;
  min-height: 0;
  flex: 1;
  padding: 20px 18px 28px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--otw-paper);
  scrollbar-color: #bfd3cd transparent;
  scrollbar-width: thin;
}

.layers-panel,
.menu-panel {
  position: absolute;
  z-index: 4;
  inset: 0;
}

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

.panel-header > div {
  min-width: 0;
}

.panel-header h1 {
  margin: 0;
  color: var(--otw-text);
  font-size: clamp(1.5rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.35;
}

.panel-header p:not(.eyebrow) {
  margin: 7px 0 0;
  color: var(--otw-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.panel-header--compact h1 {
  font-size: 1.5rem;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--otw-mint-deep);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-family: var(--otw-font-latin);
  direction: ltr;
}

.panel-close {
  margin-top: 2px;
}

.quick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 24px;
}

.quick-card {
  min-width: 0;
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--otw-border-soft);
  border-radius: var(--otw-radius-md);
  background: var(--otw-canvas);
  color: var(--otw-text);
  text-align: right;
  transition: border-color 180ms ease, background 180ms ease;
}

.quick-card:hover {
  border-color: #a7c9bf;
  background: #eaf5f1;
}

.quick-icon {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
}

.quick-card span,
.action-button span,
.wide-app-button span,
.style-card > span:last-child,
.toggle-row > span:nth-child(2),
.menu-row > span:last-child {
  min-width: 0;
  display: grid;
}

.quick-card strong,
.quick-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-card strong {
  font-size: 0.875rem;
  font-weight: 600;
}

.quick-card small {
  margin-top: 3px;
  color: var(--otw-muted);
  font-size: 0.8125rem;
}

.section-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-label-row h2 {
  margin: 0;
  color: var(--otw-text);
  font-size: 1rem;
}

.section-label-row span {
  color: var(--otw-muted);
  font-size: 0.8125rem;
}

.search-results {
  display: grid;
  gap: 8px;
}

.otw-result-row {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: #ffffff;
  color: var(--otw-text);
  text-align: right;
  transition: border-color 180ms ease, background 180ms ease;
}

.otw-result-row:hover,
.otw-result-row:focus-visible,
.otw-result-row[aria-selected="true"] {
  border-color: #aed0c7;
  background: var(--otw-mint-soft);
}

.otw-result-row__pin {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50% 50% 50% 8px;
  background: var(--otw-mint-deep);
  transform: rotate(-45deg) scale(0.64);
  box-shadow: 0 4px 12px rgba(0, 122, 103, 0.24);
}

.otw-result-row__pin::after {
  position: absolute;
  inset: 9px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  content: "";
}

.otw-result-row__body {
  min-width: 0;
  display: grid;
  flex: 1;
  gap: 3px;
}

.otw-result-row__body strong,
.otw-result-row__body span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otw-result-row__body strong {
  font-size: 0.9375rem;
  font-weight: 600;
}

.otw-result-row__body span {
  color: var(--otw-muted);
  font-size: 0.8125rem;
}

html[dir="ltr"] .otw-result-row {
  text-align: left;
}

.otw-panel-message {
  margin: 0;
  padding: 24px 18px;
  border: 1px dashed #b9cdc7;
  border-radius: var(--otw-radius-md);
  background: var(--otw-canvas);
  color: var(--otw-muted);
  font-size: 0.875rem;
  line-height: 1.65;
  text-align: center;
}

.empty-state,
.route-placeholder {
  padding: 34px 22px;
  border: 1px dashed #b9cdc7;
  border-radius: var(--otw-radius-md);
  background: linear-gradient(145deg, #f7fbfa, #edf5f2);
  text-align: center;
}

.empty-route {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--otw-ink);
  color: var(--otw-mint);
  font-size: 1.15rem;
  font-weight: 700;
}

.empty-state h3,
.route-placeholder h2 {
  margin: 0;
  color: var(--otw-text);
  font-size: 1rem;
}

.empty-state p,
.route-placeholder p {
  margin: 7px 0 0;
  color: var(--otw-muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.place-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.action-button {
  min-width: 0;
  min-height: 72px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--otw-border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--otw-mint-deep);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background 180ms ease, border-color 180ms ease;
}

.action-button:hover,
.action-button[aria-pressed="true"] {
  border-color: #99c6ba;
  background: var(--otw-mint-soft);
}

.action-button--primary {
  border-color: var(--otw-mint-deep);
  background: var(--otw-mint-deep);
  color: #ffffff;
}

.action-button--primary:hover {
  border-color: #006252;
  background: #006c5b;
}

.action-icon {
  width: 24px;
  height: 24px;
}

.action-button--primary .action-icon,
.primary-button .button-icon {
  filter: brightness(0) invert(1);
}

.place-facts {
  margin: 0 0 18px;
  border-top: 1px solid var(--otw-border-soft);
  border-bottom: 1px solid var(--otw-border-soft);
}

.place-facts > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.place-facts dt {
  color: var(--otw-muted);
  font-size: 0.8125rem;
}

.place-facts dd {
  margin: 0;
  color: var(--otw-text);
  font: 700 0.8rem ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.wide-app-button {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 13px;
  border-radius: 17px;
  background: var(--otw-ink);
  color: #ffffff;
  text-decoration: none;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.wide-app-button:hover {
  background: #0d2a37;
  box-shadow: var(--otw-shadow-sm);
}

.wide-app-button img {
  border-radius: 10px;
}

.wide-app-button small {
  color: #b6cac5;
  font-size: 0.75rem;
}

.wide-app-button strong {
  margin-top: 2px;
  font-size: 0.9375rem;
}

.direction-form {
  display: grid;
  gap: 18px;
}

.route-fields {
  position: relative;
  display: grid;
  gap: 10px;
  padding-inline-start: 29px;
}

.route-line {
  position: absolute;
  inset: 25px 8px 25px auto;
  width: 2px;
  border-radius: 99px;
  background: #b6cbc5;
}

.route-line::before,
.route-line::after {
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--otw-mint-deep);
  content: "";
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px var(--otw-mint-deep);
}

.route-line::before { top: -1px; }
.route-line::after { bottom: -1px; background: var(--otw-critical); box-shadow: 0 0 0 1px var(--otw-critical); }

.route-field label {
  display: block;
  margin: 0 0 5px;
  color: var(--otw-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.route-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--otw-border);
  border-radius: 13px;
  outline: 0;
  background: var(--otw-canvas);
  color: var(--otw-text);
  font-size: 1rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.route-field input:focus {
  border-color: var(--otw-mint-deep);
  box-shadow: 0 0 0 3px rgba(0, 122, 103, 0.14);
}

.travel-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.travel-fieldset legend {
  margin-bottom: 8px;
  color: var(--otw-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.travel-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.travel-mode {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--otw-border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--otw-text);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.travel-mode:hover,
.travel-mode.is-active,
.travel-mode[aria-pressed="true"] {
  border-color: rgba(0, 122, 103, 0.45);
  background: var(--otw-mint-soft);
  color: #005f51;
}

.mode-icon {
  width: 20px;
  height: 20px;
}

.check-control {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--otw-border-soft);
  border-radius: 14px;
  background: var(--otw-canvas);
  cursor: pointer;
}

.check-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.check-visual {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 2px solid #869c97;
  border-radius: 7px;
  background: #ffffff;
  transition: border-color 180ms ease, background 180ms ease;
}

.check-control input:checked + .check-visual {
  border-color: var(--otw-mint-deep);
  background: var(--otw-mint-deep);
  box-shadow: inset 0 0 0 4px #ffffff;
}

.check-control input:focus-visible + .check-visual {
  outline: 3px solid var(--otw-blue);
  outline-offset: 3px;
}

.check-control strong,
.check-control small {
  display: block;
}

.check-control strong {
  color: var(--otw-text);
  font-size: 0.875rem;
  font-weight: 600;
}

.check-control small {
  margin-top: 3px;
  color: var(--otw-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.primary-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--otw-mint-deep);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover {
  background: #006454;
  box-shadow: var(--otw-shadow-sm);
}

.primary-button--wide {
  width: 100%;
}

.button-icon {
  width: 21px;
  height: 21px;
}

.route-results {
  margin-top: 20px;
}

.otw-route-card {
  overflow: hidden;
  margin-bottom: 9px;
  border: 1px solid var(--otw-border);
  border-radius: 16px;
  background: #ffffff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.otw-route-card.is-active {
  border-color: var(--otw-mint-deep);
  box-shadow: 0 0 0 2px rgba(0, 122, 103, 0.1);
}

.otw-route-card__summary {
  width: 100%;
  min-height: 66px;
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  background: #ffffff;
  color: var(--otw-text);
  text-align: right;
  transition: background 180ms ease;
}

.otw-route-card__summary:hover,
.otw-route-card__summary[aria-pressed="true"] {
  background: var(--otw-mint-soft);
}

.otw-route-card__summary strong {
  font-size: 0.9375rem;
  font-weight: 600;
}

.otw-route-card__summary span {
  color: var(--otw-muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

html[dir="ltr"] .otw-route-card__summary {
  text-align: left;
}

.otw-route-steps {
  border-top: 1px solid var(--otw-border-soft);
  background: #f8fbfa;
}

.otw-route-steps summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 13px;
  color: var(--otw-mint-deep);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.otw-route-steps ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0 32px 10px 12px;
}

.otw-route-steps li {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--otw-border-soft);
  color: var(--otw-text);
  font-size: 0.8125rem;
}

.otw-route-steps li small {
  flex: 0 0 auto;
  color: var(--otw-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.route-placeholder {
  padding: 24px 18px;
}

.style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.style-card {
  min-width: 0;
  min-height: 174px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 9px;
  border: 2px solid transparent;
  border-radius: 17px;
  background: var(--otw-canvas);
  color: var(--otw-text);
  text-align: right;
  transition: border-color 180ms ease, background 180ms ease;
}

.style-card:hover,
.style-card.is-active,
.style-card[aria-pressed="true"] {
  border-color: var(--otw-mint-deep);
  background: var(--otw-mint-soft);
}

.style-preview {
  width: 100%;
  height: 94px;
  display: block;
  overflow: hidden;
  border-radius: 11px;
  background-color: #dfeae6;
}

.style-preview--street {
  background:
    linear-gradient(36deg, transparent 42%, #91aaa3 43%, #91aaa3 46%, #ffffff 47%, #ffffff 53%, #91aaa3 54%, #91aaa3 57%, transparent 58%),
    linear-gradient(106deg, transparent 33%, #b7cac4 34%, #b7cac4 39%, transparent 40%),
    #dcebe6;
}

.style-preview--satellite {
  background:
    linear-gradient(112deg, transparent 38%, rgba(230, 211, 155, 0.78) 39%, rgba(230, 211, 155, 0.78) 45%, transparent 46%),
    radial-gradient(circle at 22% 76%, #456d59 0 13%, transparent 14%),
    linear-gradient(145deg, #7f7655, #4c694f 48%, #a79669);
}

.style-card strong {
  font-size: 0.875rem;
  font-weight: 600;
}

.style-card small {
  margin-top: 3px;
  color: var(--otw-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.toggle-list,
.menu-list {
  display: grid;
  gap: 8px;
}

.toggle-row,
.menu-row {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--otw-border-soft);
  border-radius: 15px;
  background: #ffffff;
  color: var(--otw-text);
  text-align: right;
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease;
}

.toggle-row:hover,
.menu-row:hover {
  border-color: #abc9c1;
  background: var(--otw-canvas);
}

.toggle-icon,
.menu-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.toggle-row strong,
.toggle-row small,
.menu-row strong,
.menu-row small {
  display: block;
}

.toggle-row strong,
.menu-row strong {
  font-size: 0.875rem;
  font-weight: 600;
}

.toggle-row small,
.menu-row small {
  margin-top: 3px;
  color: var(--otw-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  margin-inline-start: auto;
  border-radius: 999px;
  background: #bdcbc7;
  transition: background 180ms ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  content: "";
  box-shadow: 0 1px 4px rgba(6, 19, 28, 0.25);
  transition: transform 180ms var(--otw-ease);
}

.toggle-row[aria-pressed="true"] .switch {
  background: var(--otw-mint-deep);
}

.toggle-row[aria-pressed="true"] .switch::after {
  transform: translateX(-18px);
}

.menu-glyph {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--otw-ink);
  color: var(--otw-mint);
  font: 800 0.7rem ui-monospace, SFMono-Regular, Menlo, monospace;
  direction: ltr;
}

.app-rail {
  position: relative;
  z-index: 30;
  grid-area: rail;
  width: var(--otw-rail-width);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px max(12px, var(--otw-safe-bottom));
  direction: rtl;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--otw-ink);
  color: #ffffff;
}

.rail-brand {
  width: 56px;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 15px;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: var(--otw-font-latin);
  text-decoration: none;
}

.rail-brand img {
  border-radius: 12px;
}

.rail-spacer {
  flex: 1;
}

.rail-action {
  width: 56px;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 3px;
  border-radius: 15px;
  background: transparent;
  color: #d9e8e4;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.rail-action:hover,
.rail-action[aria-expanded="true"] {
  background: rgba(32, 224, 178, 0.14);
  color: var(--otw-mint);
}

.rail-action--download {
  background: rgba(255, 255, 255, 0.07);
}

.rail-action--download img {
  border-radius: 7px;
}

.menu-lines {
  width: 24px;
  height: 24px;
  display: grid;
  align-content: center;
  gap: 4px;
}

.menu-lines i {
  width: 20px;
  height: 2px;
  display: block;
  margin-inline: auto;
  border-radius: 99px;
  background: currentColor;
}

.map-control-cluster {
  position: absolute;
  z-index: 12;
  left: 16px;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--otw-shadow-md);
  backdrop-filter: blur(15px);
}

.map-control-cluster--upper {
  top: 16px;
}

.map-control-cluster--zoom {
  bottom: 48px;
}

.map-control {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--otw-border-soft);
  background: transparent;
  color: var(--otw-text);
  transition: background 180ms ease, color 180ms ease;
}

.map-control:last-child {
  border-bottom: 0;
}

.map-control:hover,
.map-control[aria-pressed="true"],
.map-control[aria-expanded="true"] {
  background: var(--otw-mint-soft);
  color: var(--otw-mint-deep);
}

.map-control.is-locating {
  background: var(--otw-mint-soft);
  color: var(--otw-mint-deep);
}

.map-control.is-locating .ui-icon {
  animation: otw-locate 900ms var(--otw-ease) infinite alternate;
}

@keyframes otw-locate {
  from { opacity: 0.42; }
  to { opacity: 1; }
}

.ui-icon {
  width: 24px;
  height: 24px;
}

.search-area-button {
  position: absolute;
  z-index: 14;
  top: 18px;
  left: 50%;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--otw-text);
  box-shadow: var(--otw-shadow-md);
  font-size: 0.875rem;
  font-weight: 600;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
  transition: background 180ms ease, color 180ms ease;
}

.search-area-button:hover {
  background: var(--otw-ink);
  color: #ffffff;
}

.otw-user-marker {
  position: relative;
  width: 25px;
  height: 25px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: var(--otw-blue);
  box-shadow: 0 3px 12px rgba(6, 19, 28, 0.35);
  pointer-events: none;
}

.otw-user-marker__pulse {
  position: absolute;
  z-index: -1;
  inset: -13px;
  border: 2px solid rgba(23, 111, 193, 0.48);
  border-radius: 50%;
  background: rgba(23, 111, 193, 0.16);
  animation: otw-user-pulse 1.8s ease-out infinite;
}

@keyframes otw-user-pulse {
  0% { opacity: 0.8; transform: scale(0.55); }
  75%, 100% { opacity: 0; transform: scale(1.25); }
}

.otw-search-marker {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--otw-ink);
  color: var(--otw-mint);
  box-shadow: 0 5px 16px rgba(6, 19, 28, 0.35);
  font: 800 0.78rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

.otw-search-marker:hover,
.otw-search-marker:focus-visible {
  background: var(--otw-mint-deep);
  color: #ffffff;
}

.otw-search-marker:hover::before,
.otw-search-marker:focus-visible::before {
  background: var(--otw-mint-deep);
}

.otw-search-marker::before {
  position: absolute;
  z-index: -1;
  bottom: -5px;
  left: 50%;
  width: 11px;
  height: 11px;
  border-right: 3px solid #ffffff;
  border-bottom: 3px solid #ffffff;
  background: var(--otw-ink);
  content: "";
  pointer-events: none;
  transform: translateX(-50%) rotate(45deg);
}

.otw-place-marker {
  position: relative;
  width: 48px;
  height: 58px;
  display: grid;
  place-items: start center;
  padding: 0;
  background: transparent;
}

.otw-place-marker span {
  position: relative;
  width: 42px;
  height: 42px;
  display: block;
  border: 4px solid #ffffff;
  border-radius: 50% 50% 50% 10px;
  background: var(--otw-mint-deep);
  box-shadow: 0 6px 18px rgba(6, 19, 28, 0.38);
  transform: rotate(-45deg);
}

.otw-place-marker span::after {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #ffffff;
  content: "";
}

.toast {
  position: fixed;
  z-index: 1000;
  inset: auto auto calc(24px + var(--otw-safe-bottom)) 50%;
  max-width: min(90vw, 440px);
  min-height: 48px;
  align-items: center;
  padding: 11px 17px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: var(--otw-ink);
  color: #ffffff;
  box-shadow: var(--otw-shadow-lg);
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: center;
  transform: translateX(-50%);
}

.toast:not([hidden]) {
  display: flex;
}

.toast.is-visible {
  animation: otw-toast-in 200ms var(--otw-ease) both;
}

@keyframes otw-toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right {
  z-index: 10;
}

.mapboxgl-ctrl-attrib {
  color: #243d43;
  font-size: 10px;
}

.mapboxgl-ctrl-attrib a {
  color: #173c55;
}

.mapboxgl-canvas:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--otw-blue);
  outline-offset: 3px;
}

@media (max-width: 1100px) and (min-width: 901px) {
  :root {
    --otw-panel-width: 390px;
  }

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

  .quick-card {
    min-height: 72px;
  }
}

@media (max-width: 900px) {
  :root {
    --otw-mobile-gutter: 12px;
    --otw-search-top: calc(var(--otw-safe-top) + 10px);
    --otw-sheet-peek: 220px;
    --otw-results-sheet-height: max(var(--otw-sheet-peek), min(36dvh, 330px));
    --otw-detail-sheet-height: max(var(--otw-sheet-peek), min(58dvh, 560px));
  }

  .app-shell {
    position: relative;
    display: block;
    min-height: 0;
  }

  .map-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .workspace-panel {
    position: fixed;
    z-index: 40;
    inset: 0;
    width: 100%;
    height: 100dvh;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
  }

  .search-chrome {
    position: absolute;
    top: var(--otw-search-top);
    right: calc(var(--otw-mobile-gutter) + 56px);
    left: var(--otw-mobile-gutter);
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: auto;
  }

  .search-form {
    height: 54px;
    padding-inline-end: 6px;
    border-color: rgba(255, 255, 255, 0.85);
    border-radius: 18px;
    box-shadow: var(--otw-shadow-md);
  }

  .search-form input {
    height: 50px;
  }

  .search-submit {
    display: none;
  }

  .connection-status {
    position: absolute;
    top: 59px;
    right: 4px;
    width: max-content;
    min-height: 22px;
    margin: 0;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--otw-shadow-sm);
    backdrop-filter: blur(12px);
  }

  .category-strip {
    position: absolute;
    top: 87px;
    right: -56px;
    width: calc(100vw - (2 * var(--otw-mobile-gutter)));
    margin: 0;
    padding: 0 0 3px;
  }

  .category-chip {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--otw-shadow-sm);
    backdrop-filter: blur(12px);
  }

  .panel-stack {
    position: absolute;
    inset: auto 0 0;
    height: auto;
    display: block;
    overflow: visible;
    pointer-events: none;
  }

  .context-panel {
    position: relative;
    width: 100%;
    min-height: calc(var(--otw-sheet-peek) + var(--otw-safe-bottom));
    max-height: min(58dvh, 560px);
    padding: 27px 18px calc(20px + var(--otw-safe-bottom));
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-bottom: 0;
    border-radius: 26px 26px 0 0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -14px 42px rgba(6, 19, 28, 0.18);
    pointer-events: auto;
    backdrop-filter: blur(20px);
    animation: otw-sheet-in 220ms var(--otw-ease) both;
  }

  .layers-panel,
  .menu-panel {
    position: fixed;
    z-index: 45;
    inset: auto 0 0;
    width: 100%;
    min-height: var(--otw-detail-sheet-height);
    max-height: var(--otw-detail-sheet-height);
  }

  .context-panel::before {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 42px;
    height: 5px;
    border-radius: 99px;
    background: #b8c5c1;
    content: "";
    transform: translateX(-50%);
  }

  @keyframes otw-sheet-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .results-panel {
    max-height: var(--otw-results-sheet-height);
  }

  .workspace-panel:focus-within .results-panel {
    max-height: min(58dvh, 560px);
  }

  .panel-header {
    margin-bottom: 14px;
  }

  .panel-header h1 {
    font-size: 1.5rem;
  }

  .panel-header p:not(.eyebrow) {
    margin-top: 4px;
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .quick-row {
    margin-bottom: 16px;
  }

  .quick-card {
    min-height: 72px;
  }

  .empty-state {
    padding: 22px 18px;
  }

  .empty-route {
    display: none;
  }

  .app-rail {
    position: fixed;
    z-index: 80;
    top: var(--otw-search-top);
    right: var(--otw-mobile-gutter);
    width: 48px;
    height: 54px;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    pointer-events: none;
  }

  .rail-brand,
  .rail-spacer,
  .rail-action--download {
    display: none;
  }

  #menuButton {
    width: 48px;
    height: 54px;
    min-height: 54px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    background: var(--otw-ink);
    box-shadow: var(--otw-shadow-md);
    color: #ffffff;
    pointer-events: auto;
  }

  #menuButton > span:last-child {
    display: none;
  }

  .map-control-cluster {
    left: var(--otw-mobile-gutter);
  }

  .map-control-cluster--upper {
    top: calc(var(--otw-search-top) + 150px);
  }

  .map-control-cluster--upper #compassButton {
    display: none;
  }

  .map-control-cluster--zoom {
    display: none;
  }

  .search-area-button {
    top: calc(var(--otw-search-top) + 152px);
  }

  .mapboxgl-ctrl-bottom-left,
  .mapboxgl-ctrl-bottom-right {
    bottom: calc(var(--otw-results-sheet-height) + var(--otw-safe-bottom) + 6px);
  }

  body:has(.context-panel:not(#resultsPanel):not([hidden])) .mapboxgl-ctrl-bottom-left,
  body:has(.context-panel:not(#resultsPanel):not([hidden])) .mapboxgl-ctrl-bottom-right {
    bottom: calc(var(--otw-detail-sheet-height) + var(--otw-safe-bottom) + 6px);
  }

  .mapboxgl-ctrl-attrib {
    max-width: calc(100vw - 20px);
  }

  .toast {
    bottom: calc(var(--otw-results-sheet-height) + var(--otw-safe-bottom) + 14px);
  }

  body:has(.context-panel:not(#resultsPanel):not([hidden])) .toast {
    bottom: calc(var(--otw-detail-sheet-height) + var(--otw-safe-bottom) + 14px);
  }

  html[dir="ltr"] .search-chrome {
    right: var(--otw-mobile-gutter);
    left: calc(var(--otw-mobile-gutter) + 56px);
  }

  html[dir="ltr"] .category-strip {
    right: auto;
    left: -56px;
  }

  html[dir="ltr"] .app-rail {
    right: auto;
    left: var(--otw-mobile-gutter);
  }

  html[dir="ltr"] .map-control-cluster {
    right: var(--otw-mobile-gutter);
    left: auto;
  }
}

@media (max-width: 560px) {
  .quick-row {
    grid-template-columns: 1fr 1fr;
  }

  .quick-card {
    display: grid;
    justify-items: start;
    align-content: center;
    gap: 6px;
  }

  .quick-card small {
    display: none;
  }

  .panel-header h1 {
    font-size: 1.375rem;
  }

  .section-label-row span {
    display: none;
  }

  .style-grid {
    gap: 8px;
  }

  .style-card {
    min-height: 156px;
  }

  .style-preview {
    height: 80px;
  }
}

@media (max-width: 380px) {
  :root {
    --otw-mobile-gutter: 8px;
    --otw-sheet-peek: 208px;
  }

  .search-chrome {
    right: calc(var(--otw-mobile-gutter) + 52px);
  }

  .app-rail {
    width: 44px;
  }

  #menuButton {
    width: 44px;
  }

  .context-panel {
    padding-inline: 14px;
  }

  .category-chip {
    padding-inline: 11px;
  }

  .place-actions {
    gap: 6px;
  }

  html[dir="ltr"] .search-chrome {
    left: calc(var(--otw-mobile-gutter) + 52px);
  }

  html[dir="ltr"] .category-strip {
    left: -52px;
  }
}

@media (max-height: 620px) and (max-width: 900px) {
  :root {
    --otw-sheet-peek: 176px;
    --otw-results-sheet-height: max(var(--otw-sheet-peek), min(34dvh, 240px));
  }

  .connection-status {
    display: none;
  }

  .category-strip {
    top: 62px;
  }

  .map-control-cluster--upper,
  .search-area-button {
    top: calc(var(--otw-search-top) + 121px);
  }

  .results-panel {
    max-height: min(34dvh, 240px);
  }

  .panel-header p:not(.eyebrow),
  .section-label-row,
  .empty-state {
    display: none;
  }
}

@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;
  }
}

@media (prefers-contrast: more) {
  :root {
    --otw-muted: #354d4b;
    --otw-border: #8fa8a2;
    --otw-border-soft: #a6bbb6;
  }

  .search-form,
  .category-chip,
  .quick-card,
  .action-button,
  .toggle-row,
  .menu-row {
    border-width: 2px;
  }
}

@media (forced-colors: active) {
  .connection-dot,
  .loading-mark,
  .switch,
  .check-visual {
    forced-color-adjust: none;
  }
}
