:root {
  color-scheme: light;
  --bg: #ffffff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-border: rgba(11, 19, 32, 0.12);
  --text: #0b1320;
  --muted: rgba(11, 19, 32, 0.72);
  --muted-2: rgba(11, 19, 32, 0.56);
  --primary: #2f7cff;
  --primary-2: #1d5fe6;
  --danger: #d61f3c;
  --success: #0f9f63;
  --shadow: rgba(11, 19, 32, 0.12);
  --radius: 16px;
  --radius-sm: 12px;
  --max: 980px;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body.is-overlay-open {
  overflow: hidden;
}

.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 18px 60px;
}

.hero {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.overlay-page {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  overflow-y: auto;
}

.overlay-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.overlay-title {
  font-weight: 750;
  letter-spacing: 0.2px;
  font-size: 14px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.brand-header {
  width: 100%;
}

.brand-logo {
  width: clamp(58px, 12vw, 80px);
  height: auto;
  border-radius: 18px;
  box-shadow: 0 14px 26px rgba(11, 19, 32, 0.18);
  flex: none;
}

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

.brand-title {
  margin: 0;
  font-size: clamp(30px, 6.6vw, 44px);
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.brand-wordmark {
  height: clamp(30px, 6.2vw, 46px);
  width: auto;
  max-width: min(560px, 100%);
  display: block;
}

.brand-tagline {
  margin: 6px 0 0;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.25;
}

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

@media (max-width: 420px) {
  .brand-tagline {
    letter-spacing: 0.04em;
  }
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 14px;
  box-shadow: 0 10px 30px var(--shadow);
}

.panel-head h2 {
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: 0.25px;
}

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

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.row.wrap {
  flex-wrap: wrap;
}

.row.pills {
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

.row.pills button {
  padding: 8px 10px;
  font-size: 12px;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.panel .row + .row {
  margin-top: 12px;
}

.toggle {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(11, 19, 32, 0.12);
  background: rgba(11, 19, 32, 0.04);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.15px;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.15px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  color: #fff;
  border-color: rgba(11, 19, 32, 0.08);
}

.secondary {
  background: rgba(11, 19, 32, 0.04);
  color: var(--text);
  border-color: rgba(11, 19, 32, 0.12);
}

.yellow {
  background: linear-gradient(180deg, #fff7a6, #ffe100);
  color: #1a1400;
  border-color: rgba(255, 225, 0, 0.55);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.field + .row {
  margin-top: 14px;
}

.field > span {
  font-size: 12px;
  color: var(--muted);
}

.input {
  width: 100%;
  border-radius: var(--radius-sm);
  padding: 12px 12px;
  border: 1px solid rgba(11, 19, 32, 0.14);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 16px;
  outline: none;
}

.input::placeholder {
  color: var(--muted-2);
}

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

@media (max-width: 640px) {
  .kv {
    grid-template-columns: 1fr;
  }
}

.k {
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.2px;
  margin-bottom: 4px;
}

.v {
  font-size: 13px;
}

.muted {
  color: var(--muted);
}

.status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(11, 19, 32, 0.12);
  background: rgba(255, 255, 255, 0.96);
  font-size: 13px;
  line-height: 1.35;
}

.status[data-tone="error"] {
  border-color: rgba(214, 31, 60, 0.26);
  background: rgba(214, 31, 60, 0.06);
}

.status[data-tone="success"] {
  border-color: rgba(15, 159, 99, 0.22);
  background: rgba(15, 159, 99, 0.06);
}

.address-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.address-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(11, 19, 32, 0.12);
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius-sm);
  padding: 12px 12px;
  font-size: 13px;
  cursor: pointer;
}

.address-item:active {
  transform: translateY(1px);
}

.address-item.is-selected {
  border-color: rgba(47, 124, 255, 0.55);
  background: rgba(47, 124, 255, 0.08);
}

.address-item-title {
  font-weight: 650;
  line-height: 1.25;
}

.address-item-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
}

.address-item-distance {
  flex: none;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  margin-top: 1px;
}

.store-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex: none;
}

.store-actions button {
  padding: 8px 10px;
  font-size: 12px;
  letter-spacing: 0.1px;
}

.address {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.35;
}

.map-preview {
  position: relative;
  margin-top: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(11, 19, 32, 0.12);
  background: rgba(255, 255, 255, 0.96);
}

.map-frame {
  width: 100%;
  height: 200px;
  border: 0;
  display: block;
  pointer-events: none;
}

.map-preview.is-interactive .map-frame {
  pointer-events: auto;
}

.map-canvas {
  width: 100%;
  height: 240px;
  display: block;
  pointer-events: none;
}

.map-preview.is-interactive .map-canvas {
  pointer-events: auto;
}

.map-preview .leaflet-container {
  font-family: inherit;
}

.map-shield {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  transition: opacity 120ms ease;
  transform: none;
}

.map-shield:active {
  transform: none;
}

.map-shield-pill {
  margin: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(11, 19, 32, 0.12);
  background: rgba(255, 255, 255, 0.94);
  color: rgba(11, 19, 32, 0.7);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.map-preview.is-interactive .map-shield {
  opacity: 0;
  pointer-events: none;
}

.footer {
  margin-top: 22px;
  text-align: center;
  font-size: 12px;
}
