:root {
  --ink: #10131a;
  --muted: #657084;
  --line: rgba(18, 31, 52, .09);
  --line-strong: rgba(18, 31, 52, .15);
  --soft-shadow: none;
  --paper: rgba(255, 255, 255, .96);
  --wash: #f7f8fb;
  --blue: #2f63d9;
  --blue-dark: #1747a6;
  --orange: #ff6a2a;
  --green: #16a37b;
  --shadow: 0 12px 34px rgba(15, 23, 42, .12);
  --sidebar-width: 430px;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  overflow: hidden;
  background: #dce7f3;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

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

.app-shell {
  position: relative;
  isolation: isolate;
}

.app-shell.user-workspace {
  --sidebar-width: 620px;
}

.app-shell.admin-workspace {
  --sidebar-width: 740px;
}

.app-shell.panel-compact {
  --sidebar-width: 430px;
}

.app-shell.user-workspace .auth-form,
.app-shell.admin-workspace .auth-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-shell.user-workspace .auth-form h3,
.app-shell.user-workspace .auth-form > div,
.app-shell.user-workspace .auth-form > p,
.app-shell.user-workspace .auth-form .route-stop-picker,
.app-shell.user-workspace .auth-form .main-btn,
.app-shell.user-workspace .auth-form .ghost-btn,
.app-shell.user-workspace .visit-route-result,
.app-shell.admin-workspace .auth-form h3,
.app-shell.admin-workspace .auth-form > div,
.app-shell.admin-workspace .auth-form > p,
.app-shell.admin-workspace .auth-form .route-stop-picker,
.app-shell.admin-workspace .auth-form .main-btn,
.app-shell.admin-workspace .auth-form .ghost-btn,
.app-shell.admin-workspace .visit-route-result {
  grid-column: 1 / -1;
}

.app-shell.admin-workspace .admin-moderation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.app-shell.panel-compact .auth-form,
.app-shell.panel-compact .admin-moderation-grid {
  grid-template-columns: 1fr;
}

.map-canvas {
  position: absolute;
  inset: 0;
  background: #dce7f3;
}

.sidebar {
  position: absolute;
  inset: 118px 16px 16px auto;
  z-index: 10;
  width: min(var(--sidebar-width), calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(18, 31, 52, .1);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(130%);
  transform: translateX(calc(100% + 30px));
  transition: transform .34s cubic-bezier(.2, .9, .2, 1);
}

.sidebar.is-open {
  transform: translateX(0);
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: white;
  background: #1b3158;
  font-size: 18px;
  font-weight: 700;
  box-shadow: none;
}

.brand strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.select-row {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
}

.panel-size-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
}

.panel-size-btn:hover,
.panel-size-btn.is-compact {
  border-color: rgba(47, 99, 217, .28);
  background: #eef3ff;
  color: var(--blue-dark);
}

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

select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 0 9px;
  outline: none;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.tab-btn {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  text-transform: none;
  transition: .18s ease;
}

.tab-btn.is-active {
  background: #eef3ff;
  color: var(--blue-dark);
  box-shadow: none;
}

.panel {
  flex: 1;
  overflow: auto;
  padding: 14px;
  scrollbar-width: thin;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-box,
.route-box,
.card,
.route-card,
.settings-block,
.login-block,
.alert {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 12px;
}

.search-glyph,
.pin-dot,
.step-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.search-glyph {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: white;
  background: #10131a;
}

input[type="search"],
input[type="text"],
input[type="time"],
input[type="date"],
input[type="email"],
input[type="password"],
input[type="url"] {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}

input::placeholder {
  color: #9aa5b7;
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 50;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

.dropdown button {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
  background: white;
  color: var(--ink);
  cursor: pointer;
  padding: 12px 14px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.dropdown button:hover {
  background: #f4f7ff;
}

.result-icon {
  width: 18px;
  flex: 0 0 18px;
  color: var(--accent);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.result-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.result-title {
  color: var(--ink);
  font-weight: 650;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  color: #697386;
  font-size: 12px;
  font-weight: 500;
}

.result-badge {
  color: var(--accent);
  font-weight: 700;
}

.card {
  padding: 16px;
}

.promoted-ad {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(47, 99, 217, .16);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f5f8ff);
  padding: 10px;
}

.promoted-ad img,
.promoted-ad-placeholder {
  width: 74px;
  height: 56px;
  border-radius: 8px;
}

.promoted-ad img {
  object-fit: cover;
}

.promoted-ad-placeholder {
  display: grid;
  place-items: center;
  background: #e8eefc;
  color: var(--blue-dark);
  font-weight: 850;
}

.promoted-ad div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.promoted-ad span {
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
}

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

.promoted-ad strong {
  font-size: 14px;
  font-weight: 800;
}

.promoted-ad small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.promoted-ad button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 800;
}

.place-title {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.08;
}

.place-subtitle,
.muted {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.main-btn,
.ghost-btn,
.pill-btn,
.read-btn,
.back-btn,
.location-btn {
  border: 0;
  cursor: pointer;
  font-weight: 650;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.main-btn {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border-radius: 8px;
  color: white;
  background: var(--blue);
  box-shadow: none;
  font-size: 15px;
}

.main-btn:hover,
.read-btn:hover,
.pill-btn:hover,
.location-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.place-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.place-actions .main-btn {
  margin-top: 0;
}

.place-save-btn {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  box-shadow: none;
}

.section-label {
  margin: 8px 0 12px;
  color: #7b8798;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.quick-layers {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.route-layers {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.route-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #7b8798;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.route-panel-head strong {
  color: var(--ink);
  font-size: 13px;
}

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

.poi-btn {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f9fd;
  color: var(--ink);
  cursor: pointer;
  padding: 13px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.route-box {
  position: relative;
  padding: 10px 12px 12px;
  border-color: var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.route-line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 54px;
}

.route-line label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.route-line small {
  color: #8a94a6;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.route-rail {
  position: absolute;
  left: 27px;
  top: 47px;
  width: 1px;
  height: 42px;
  background: #d8deea;
}

.route-badge {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: white;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .12);
}

.route-badge.start {
  background: var(--blue);
}

.route-badge.end {
  border-radius: 8px;
  background: var(--orange);
}

.pin-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue);
}

.pin-dot.end {
  border-radius: 4px;
  background: var(--orange);
}

.back-btn {
  align-self: flex-start;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(61, 99, 255, .09);
  color: var(--blue-dark);
  font-size: 14px;
}

.route-swap-btn {
  position: absolute;
  right: 18px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(61, 99, 255, .18);
  border-radius: 50%;
  background: white;
  color: #10131a;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
  transform: translateY(-50%);
  transition: transform .16s ease, box-shadow .16s ease;
}

.route-swap-btn:hover {
  transform: translateY(-50%) rotate(180deg);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .18);
}

.location-btn,
.location-inline-btn {
  min-height: 46px;
  border-radius: 15px;
  color: var(--blue-dark);
  background: #e9eeff;
}

.location-inline-btn {
  width: 100%;
  min-height: 38px;
  margin-top: 8px;
  border: 0;
  cursor: pointer;
  color: #243a92;
  background: #edf2ff;
  font-size: 12px;
  font-weight: 700;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(237, 241, 247, .78);
}

.mode-btn {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #667085;
  cursor: pointer;
}

.mode-btn span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mode-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mode-btn.is-active {
  color: white;
  background: #10131a;
  box-shadow: 0 8px 18px rgba(16, 19, 26, .14);
}

.route-options-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
}

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

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

.pill-btn {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  color: #425066;
  font-size: 13px;
}

.pill-btn.is-active {
  background: var(--blue);
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(61, 99, 255, .16);
}

.time-field {
  display: grid;
  gap: 7px;
}

.time-field label {
  color: #425066;
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
}

.time-field input {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  padding: 0 14px;
}

.alert {
  padding: 15px;
  color: #bd2a2a;
  background: #fff0f0;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.map-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  display: grid;
  gap: 3px;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 10px;
  background: #10131a;
  color: white;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .25);
  padding: 12px 14px;
}

.map-toast strong {
  font-size: 14px;
  font-weight: 750;
}

.map-toast span {
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}

.loading {
  padding: 22px 10px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.route-results {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(61, 99, 255, .13);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(244,247,255,.96), rgba(247,250,252,.98));
  box-shadow: none;
}

.route-card {
  padding: 18px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.route-card.is-active {
  border-color: rgba(61, 99, 255, .64);
  box-shadow: 0 10px 24px rgba(61, 99, 255, .12);
  transform: translateY(-1px);
}

.route-metrics {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-size: 21px;
  font-weight: 750;
}

.route-metrics span:last-child {
  color: #7a8596;
}

.route-summary {
  margin-top: 7px;
  color: #263143;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.route-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.route-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  background: #eef3ff;
  color: #2f63d9;
  font-size: 12px;
  font-weight: 650;
}

.route-details {
  display: grid;
  gap: 11px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, .08);
}

.read-btn {
  min-height: 48px;
  border-radius: 14px;
  color: white;
  background: #10131a;
}

.step-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  border: 0;
  border-radius: 15px;
  background: #f7f9fd;
  color: var(--ink);
  cursor: pointer;
  padding: 13px;
  text-align: left;
}

.step-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: white;
  background: #10131a;
  font-size: 16px;
  font-weight: 700;
}

.step-time {
  margin-bottom: 3px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.step-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.next-deps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.next-deps small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.next-deps span {
  border-radius: 8px;
  background: #e9eeff;
  color: var(--blue-dark);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.settings-block,
.login-block {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-weight: 650;
}

.switch {
  position: relative;
  width: 54px;
  height: 30px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cfd7e6;
  cursor: pointer;
  transition: .2s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 3px 8px rgba(15, 23, 42, .22);
  transition: .2s ease;
}

.switch input:checked + span {
  background: var(--blue);
}

.switch input:checked + span::after {
  transform: translateX(24px);
}

.login-block h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
}

.auth-panel {
  gap: 18px;
}

.auth-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #edf2ff;
  color: var(--blue-dark);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border-radius: 12px;
  background: #edf1f7;
  padding: 5px;
}

.auth-tabs button {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5f6c7c;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.auth-tabs button.is-active {
  background: white;
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
}

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

.auth-form label,
.auth-form .form-field {
  display: grid;
  gap: 7px;
}

.auth-form label > span,
.auth-form .form-field > span {
  color: #4d5b6c;
  font-size: 12px;
  font-weight: 750;
}

.auth-form input,
.auth-form select {
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #f8fafc;
  padding: 0 13px;
  color: var(--ink);
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: rgba(61, 99, 255, .55);
  background: white;
  box-shadow: 0 0 0 4px rgba(61, 99, 255, .1);
}

.system-layer-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 7px;
  max-height: 176px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #f8fafc;
  padding: 8px;
  overscroll-behavior: contain;
}

.system-layer-checklist label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid rgba(18, 31, 52, .07);
  border-radius: 8px;
  background: white;
  padding: 6px 8px;
  cursor: pointer;
}

.system-layer-checklist input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--blue);
}

.system-layer-checklist span {
  min-width: 0;
  overflow: hidden;
  color: #273449;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.auth-submit {
  margin-top: 2px;
}

.auth-alert {
  border-radius: 12px;
  padding: 12px 13px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.auth-alert.success {
  background: #ecfdf5;
  color: #047857;
}

.auth-alert.error {
  background: #fef2f2;
  color: #b91c1c;
}

.auth-summary {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.auth-summary strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 800;
}

.auth-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.object-save-form {
  border: 1px solid rgba(49, 87, 255, .22);
  border-radius: 14px;
  background: #f7f9ff;
  padding: 16px;
}

.object-save-form h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
}

.object-save-empty {
  border: 1px dashed rgba(49, 87, 255, .34);
  border-radius: 14px;
  background: #f7f9ff;
  padding: 16px;
}

.object-save-empty strong {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: 800;
}

.object-save-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.compact-form {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.compact-form h3,
.saved-layers h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.saved-layers {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.saved-layer {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--ink);
  cursor: pointer;
  padding: 9px 11px;
  text-align: left;
}

.saved-layer span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--layer-color);
}

.saved-layer strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 750;
}

.saved-layer small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.object-layer-browser {
  max-height: 48vh;
  overflow: auto;
}

.object-layer-group {
  display: grid;
  gap: 7px;
}

.object-layer-group strong {
  font-size: 13px;
  font-weight: 800;
}

.object-layer-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8fafc;
  color: var(--ink);
  cursor: pointer;
  padding: 8px 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 720;
}

.object-layer-btn:hover,
.saved-layer:hover {
  border-color: rgba(61, 99, 255, .38);
  background: #f3f6ff;
}

.object-layer-btn small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.object-filter-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.object-filter-bar select,
.object-filter-bar input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.active-object-list {
  display: grid;
  gap: 7px;
}

.active-object-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.active-object-item:hover {
  border-color: rgba(61, 99, 255, .38);
  background: #f8fbff;
}

.active-object-item strong {
  font-size: 13px;
  font-weight: 750;
}

.active-object-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}

.layer-object-marker {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, .22));
  overflow: visible;
}

.layer-object-marker-pin {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid white;
  border-radius: 50% 50% 50% 8px;
  background: var(--marker-color);
  color: white;
  font-size: 11px;
  font-weight: 900;
  transform: rotate(-45deg);
}

.layer-object-marker-pin {
  line-height: 1;
}

.layer-object-marker-pin span {
  transform: rotate(45deg);
}

.layer-object-marker-label {
  position: absolute;
  left: 40px;
  top: 50%;
  overflow: hidden;
  min-width: 0;
  max-width: 145px;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  padding: 6px 9px;
  transform: translateY(-50%);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  pointer-events: auto;
}

.layer-object-marker:hover .layer-object-marker-label {
  border-color: var(--marker-color);
}

.object-popup {
  display: grid;
  grid-template-columns: 160px minmax(220px, 1fr);
  gap: 10px;
  width: 100%;
  max-height: none;
  overflow: hidden;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.object-detail-dock {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 35;
  width: min(560px, calc(100vw - 500px));
  min-width: 460px;
  max-height: calc(100vh - 126px);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(18, 31, 52, .12);
  border-radius: 10px;
  background: white;
  box-shadow: 0 16px 48px rgba(15, 23, 42, .2);
  padding: 12px;
}

.object-detail-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.object-detail-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: #111;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.object-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  background: white;
}

.object-quick-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #243149;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.object-quick-actions button:first-child {
  border-color: transparent;
  background: var(--blue);
  color: white;
}

.object-popup-body {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.object-popup-media {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}

.object-popup-image-btn,
.object-popup-gallery button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.object-popup-layer {
  width: fit-content;
  border-radius: 999px;
  background: #edf2ff;
  color: var(--blue-dark);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 850;
}

.object-popup strong {
  font-size: 15px;
  line-height: 1.2;
}

.object-popup p {
  margin: 0;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.4;
}

.object-popup a {
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 700;
}

.object-popup-img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-radius: 8px;
}

.object-popup-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.object-popup-gallery img {
  width: 100%;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
}

.object-rating {
  color: #8a5b00;
  font-size: 12px;
  font-weight: 800;
}

.review-rotator {
  border: 1px solid rgba(138, 91, 0, .18);
  border-radius: 8px;
  background: #fff9eb;
  min-height: 74px;
  padding: 9px;
}

.review-rotator > span {
  color: #8a5b00;
  font-size: 12px;
  font-weight: 700;
}

.review-slide {
  display: grid;
  gap: 5px;
}

.review-slide div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.review-slide strong {
  color: #8a5b00;
  font-size: 13px;
}

.review-slide span,
.review-slide small {
  color: #7a5d21;
  font-size: 11px;
  font-weight: 700;
}

.review-slide p {
  margin: 0;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.4;
  max-height: 84px;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.review-form {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 9px;
}

.review-form label {
  display: grid;
  gap: 4px;
  color: #4d5b6c;
  font-size: 11px;
  font-weight: 700;
}

.review-form input,
.review-form select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 8px;
  font-size: 12px;
}

.review-form button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: rgba(6, 12, 24, .86);
  padding: 22px;
}

.lightbox img {
  max-width: min(960px, 100%);
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: white;
  color: #111;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.admin-layer-panel {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.admin-layer-panel h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.danger-btn {
  min-height: 48px;
  border: 1px solid rgba(220, 38, 38, .28);
  border-radius: 12px;
  background: #fff5f5;
  color: #b91c1c;
  font-weight: 800;
}

.admin-queue-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-queue-summary span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.admin-queue-summary strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.admin-moderation-grid,
.admin-queue {
  display: grid;
  gap: 10px;
}

.admin-queue {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

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

.admin-tabs button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #425066;
  cursor: pointer;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 750;
}

.admin-tabs button.is-active {
  border-color: rgba(47, 99, 217, .28);
  background: #eef3ff;
  color: var(--blue-dark);
}

.admin-tabs span {
  color: var(--muted);
  font-weight: 800;
}

.admin-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.admin-row strong {
  display: block;
  font-size: 13px;
  font-weight: 750;
}

.admin-row small,
.admin-row p {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.admin-row select,
.admin-row .system-layer-checklist {
  width: 100%;
  max-width: none;
}

.admin-row .system-layer-checklist {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  max-height: 118px;
  border-radius: 8px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-actions button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--ink);
  cursor: pointer;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 750;
}

.admin-actions button:hover {
  border-color: rgba(47, 99, 217, .28);
  background: #eef3ff;
}

.object-manager,
.route-planner-panel {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.object-manage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 9px;
}

.object-manage-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.object-manage-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.object-manage-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.route-planner-panel {
  border: 1px solid rgba(22, 163, 123, .22);
  border-radius: 14px;
  background: #f3fbf8;
  padding: 16px;
}

.route-planner-panel h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 850;
}

.route-stop-picker {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 10px;
}

.route-stop-picker > span {
  color: #425066;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.route-stop-picker label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  align-items: start;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 9px;
  background: #f8fafc;
  padding: 8px;
}

.route-stop-picker input {
  grid-row: span 2;
  margin-top: 2px;
}

.route-stop-picker strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-stop-picker small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}

.visit-route-result {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(22, 163, 123, .22);
  border-radius: 10px;
  background: white;
  padding: 11px;
}

.visit-route-result strong {
  color: #064e3b;
  font-size: 14px;
}

.visit-route-result span,
.visit-route-result small {
  color: #476156;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.visit-route-result a {
  color: var(--blue-dark);
  word-break: break-all;
}

.footer {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--line);
  background: rgba(248, 250, 252, .9);
  text-align: center;
}

.woh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.woh-logo {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  height: 28px;
  border-radius: 9px;
  color: white;
  background: #10131a;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 700;
}

.footer-links a {
  color: var(--blue);
  text-decoration: none;
}

.copyright {
  margin-top: 10px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 650;
}

.sidebar-toggle {
  position: absolute;
  top: 30px;
  right: calc(min(var(--sidebar-width), calc(100vw - 32px)) + 80px);
  z-index: 20;
  display: grid;
  place-items: center;
  gap: 4px;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 14px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
  cursor: pointer;
  transition: right .34s cubic-bezier(.2, .9, .2, 1), transform .18s ease;
}

.sidebar-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.sidebar:not(.is-open) + .sidebar-toggle,
.sidebar-toggle.is-closed {
  right: 24px;
}

.map-toolbar {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(475px, calc(100vw - 36px));
  padding: 8px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
  backdrop-filter: blur(18px) saturate(145%);
  transition: transform .34s cubic-bezier(.2, .9, .2, 1), opacity .18s ease;
}

.map-toolbar.sidebar-open {
  transform: translateX(0);
}

.map-toolbar-group {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 15px;
  background: #edf1f7;
}

.map-tool,
.map-icon-tool {
  border: 0;
  cursor: pointer;
  font-weight: 650;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.map-tool {
  min-width: 72px;
  height: 38px;
  border-radius: 12px;
  background: transparent;
  color: #536176;
  font-size: 12px;
}

.map-tool.is-active {
  background: #10131a;
  color: white;
  box-shadow: 0 8px 16px rgba(16, 19, 26, .12);
}

.map-icon-tool {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: white;
  color: #10131a;
  border: 1px solid var(--line);
  font-size: 14px;
}

.map-icon-tool.is-active,
.map-icon-tool.locate {
  background: var(--blue);
  color: white;
  border-color: transparent;
}

.map-icon-tool:hover,
.map-tool:hover {
  transform: translateY(-1px);
}

.maplibregl-ctrl-top-left,
.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right {
  display: none;
}

.maplibregl-ctrl-top-right {
  top: 82px;
  right: 18px;
  z-index: 18;
}

.maplibregl-ctrl-top-right .maplibregl-ctrl {
  display: flex;
  margin: 0;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
  overflow: hidden;
  backdrop-filter: blur(18px) saturate(145%);
}

.maplibregl-ctrl-top-right .maplibregl-ctrl button {
  width: 42px;
  height: 42px;
}

.app-shell.sidebar-collapsed .map-toolbar {
  width: min(475px, calc(100vw - 36px));
}

.app-shell.sidebar-collapsed .maplibregl-ctrl-top-right {
  top: 82px;
  right: 18px;
}

.marker-transfer {
  width: 18px;
  height: 18px;
  border: 4px solid #10131a;
  border-radius: 50%;
  background: white;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
}

/* mapy.com-inspired panel refinement */
.back-btn,
.location-btn,
.location-inline-btn,
.route-swap-btn,
.pill-btn,
.read-btn,
.step-btn,
.auth-tabs,
.auth-tabs button,
.auth-form input,
.auth-form select,
.auth-alert,
.object-save-form,
.object-save-empty,
.saved-layer,
.object-layer-btn,
.object-manage-row,
.route-planner-panel,
.danger-btn {
  border-radius: 8px;
}

.mode-grid,
.route-options-grid {
  border-radius: 8px;
  background: #f4f6f9;
}

.mode-grid {
  gap: 5px;
  padding: 5px;
}

.mode-btn {
  border-radius: 7px;
}

.mode-btn.is-active {
  color: var(--blue-dark);
  background: #fff;
  box-shadow: none;
  outline: 1px solid rgba(47, 99, 217, .24);
}

.pill-btn.is-active,
.tab-btn.is-active {
  border-color: rgba(47, 99, 217, .24);
  background: #eef3ff;
  color: var(--blue-dark);
  box-shadow: none;
}

.route-results {
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.route-card,
.object-save-form,
.object-save-empty,
.route-planner-panel {
  box-shadow: none;
}

.route-card {
  padding: 14px;
}

.route-card.is-active {
  border-color: rgba(47, 99, 217, .34);
  background: #f9fbff;
  box-shadow: none;
}

.route-metrics {
  font-size: 20px;
  font-weight: 700;
}

.route-summary,
.step-text,
.auth-summary p,
.object-save-empty p,
.muted {
  font-weight: 500;
}

.settings-block,
.login-block {
  gap: 12px;
  padding: 14px;
}

.auth-panel {
  gap: 14px;
}

.auth-kicker {
  background: #f0f4fb;
  font-weight: 700;
}

.auth-tabs {
  background: #f3f5f8;
}

.auth-tabs button,
.auth-form label > span,
.auth-form .form-field > span,
.saved-layer small,
.object-layer-btn small {
  font-weight: 650;
}

.auth-tabs button.is-active {
  box-shadow: none;
}

.auth-form {
  gap: 10px;
}

.auth-form input,
.auth-form select {
  min-height: 44px;
  background: #fff;
}

.auth-form input:focus,
.auth-form select:focus {
  box-shadow: 0 0 0 3px rgba(47, 99, 217, .09);
}

.auth-alert {
  font-weight: 600;
}

.object-save-form,
.object-save-empty {
  background: #fbfcff;
  padding: 14px;
}

.object-layer-browser {
  border: 0;
  background: transparent;
  padding: 0;
}

.object-layer-group,
.saved-layers {
  gap: 6px;
}

.saved-layer,
.object-layer-btn,
.object-manage-row {
  border-color: rgba(18, 31, 52, .09);
  background: #fff;
}

.map-toolbar {
  width: min(430px, calc(100vw - 32px));
  border: 1px solid rgba(18, 31, 52, .1);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .1);
}

.map-toolbar-group {
  border-radius: 8px;
}

.map-tool,
.map-icon-tool {
  border-radius: 7px;
}

.map-tool.is-active {
  background: #1b3158;
  box-shadow: none;
}

.maplibregl-ctrl-top-right .maplibregl-ctrl {
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .1);
}

@media (max-width: 760px) {
  body {
    overscroll-behavior: none;
  }

  .sidebar {
    inset: auto 0 0 0;
    --sidebar-width: auto;
    width: auto;
    height: min(60vh, 560px);
    max-height: calc(100dvh - 112px);
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -18px 44px rgba(15, 23, 42, .18);
    transform: translateY(calc(100% - 74px));
    transition: transform .32s cubic-bezier(.2, .9, .2, 1), height .22s ease;
  }

  .app-shell.user-workspace .auth-form,
  .app-shell.admin-workspace .auth-form,
  .app-shell.admin-workspace .admin-moderation-grid {
    grid-template-columns: 1fr;
  }

  .sidebar::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 42px;
    height: 5px;
    border-radius: 999px;
    background: #c9d2df;
    transform: translateX(-50%);
    z-index: 2;
  }

  .sidebar.is-open {
    transform: translateY(0);
  }

  .brand-bar {
    min-height: 74px;
    padding: 20px 14px 10px;
    border-bottom: 0;
    background: transparent;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 18px;
    box-shadow: none;
  }

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

  .brand small {
    display: none;
  }

  .select-row {
    gap: 6px;
  }

  select {
    max-width: 70px;
    min-height: 34px;
    padding: 0 6px;
  }

  .tabs {
    gap: 6px;
    padding: 8px 12px 10px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    background: transparent;
    overflow-x: auto;
  }

  .tab-btn {
    flex: 1 0 auto;
    min-width: 96px;
    min-height: 38px;
    border-radius: 8px;
    background: #eef2f7;
    font-size: 11px;
    text-transform: none;
  }

  .tab-btn.is-active {
    background: #10131a;
  }

  .panel {
    padding: 12px 12px 24px;
  }

  .sidebar-toggle {
    position: fixed;
    top: auto;
    right: 16px;
    bottom: calc(min(60vh, 560px) + 12px);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .18);
  }

  .sidebar-toggle.is-closed {
    right: 16px;
    bottom: 22px;
  }

  .map-toolbar {
    top: calc(env(safe-area-inset-top) + 12px);
    left: 12px;
    right: 12px;
    bottom: auto;
    width: auto;
    justify-content: stretch;
    gap: 7px;
    padding: 7px;
    border-radius: 14px;
    overflow-x: auto;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .18);
  }

  .map-toolbar-group {
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 10px;
    background: #f1f4f8;
  }

  .map-tool {
    flex: 1;
    min-width: 66px;
    height: 36px;
    border-radius: 8px;
    padding: 0 8px;
    font-size: 11px;
  }

  .map-icon-tool {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .maplibregl-ctrl-top-right {
    top: auto;
    left: auto;
    right: 12px;
    bottom: calc(min(60vh, 560px) + 72px);
  }

  .maplibregl-ctrl-top-right .maplibregl-ctrl button {
    width: 38px;
    height: 38px;
  }

  .footer {
    display: none;
  }

  .stack {
    gap: 12px;
  }

  .search-box,
  .route-box,
  .card,
  .route-card,
  .settings-block,
  .login-block,
  .alert {
    border-radius: 10px;
    box-shadow: none;
  }

  .search-box {
    min-height: 54px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  }

  .search-glyph {
    width: 30px;
    height: 30px;
    border-radius: 50%;
  }

  .card,
  .settings-block,
  .login-block {
    padding: 16px;
  }

  .promoted-ad {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 9px;
    padding: 9px;
  }

  .promoted-ad img,
  .promoted-ad-placeholder {
    width: 64px;
    height: 52px;
  }

  .promoted-ad button {
    grid-column: 1 / -1;
    min-height: 38px;
  }

  .place-title {
    font-size: 20px;
  }

  .main-btn {
    min-height: 50px;
    border-radius: 8px;
  }

  .place-save-btn,
  .ghost-btn {
    border-radius: 8px;
  }

  .mode-grid {
    position: sticky;
    top: 0;
    z-index: 3;
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(72px, 1fr));
    padding-bottom: 2px;
  }

  .mode-btn {
    min-height: 58px;
    border-radius: 8px;
  }

  .route-results {
    display: grid;
    gap: 10px;
  }

  .route-card {
    border-radius: 10px;
    padding: 15px;
  }

  .object-layer-browser {
    max-height: none;
  }

  .object-layer-btn,
  .saved-layer {
    min-height: 46px;
    border-radius: 8px;
  }

  .layer-object-marker-label {
    max-width: 112px;
  }

  .maplibregl-popup {
    max-width: calc(100vw - 24px) !important;
  }

  .object-detail-dock {
    position: fixed;
    inset: auto 10px 82px 10px;
    width: auto;
    min-width: 0;
    max-height: min(62vh, 560px);
    border-radius: 14px;
    padding: 10px;
  }

  .object-popup {
    grid-template-columns: 1fr;
    width: 100%;
    max-height: none;
    overflow: auto;
  }

  .object-popup-body {
    max-height: none;
    padding-right: 0;
  }

  .object-popup-img {
    height: 150px;
  }

  .object-popup-gallery {
    grid-template-columns: repeat(4, 1fr);
  }

  .object-popup-gallery img {
    height: 48px;
  }

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

  .map-toast {
    right: 12px;
    bottom: 92px;
    left: 12px;
    max-width: none;
  }

  .poi-grid,
  .pref-row {
    grid-template-columns: 1fr;
  }

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