/* Flow Discover — light food-delivery UI */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --surface: #ffffff;
  --ink: #181c2e;
  --ink-2: #646982;
  --ink-3: #a0a5ba;
  --line: #ededed;
  --field: #f6f7f9;
  --field-focus: #ffffff;
  --field-hover: #eef0f4;
  --warn: #e8a020;
  --warn-soft: rgba(255, 176, 32, 0.14);
  --warn-line: rgba(255, 176, 32, 0.32);
  --accent: #fc6e2a;
  --accent-soft: #ffeade;
  --star: #ff9c00;
  --cta-bg: #181c2e;
  --cta-ink: #ffffff;
  --scrim: rgba(24, 28, 46, 0.45);
  --skel-1: #f0f1f4;
  --skel-2: #f8f9fb;
  --art-bldg: #2f3550;
  --art-trim: #3c4363;
  --art-door: #434a6d;
  --shadow-sm: 0 4px 16px rgba(24, 28, 46, 0.05);
  --shadow-md: 0 12px 30px rgba(24, 28, 46, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.3, 0.5, 1);
  --sans: "Sen", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --pad: 20px;
}
@media (min-width: 600px) { :root { --pad: 24px; } }

:root[data-theme="dark"] {
  --bg: #101116;
  --bg-soft: #191b23;
  --surface: #191b23;
  --ink: #f1f2f6;
  --ink-2: #a2a8bb;
  --ink-3: #6d7386;
  --line: #262932;
  --field: #1b1e27;
  --field-focus: #232733;
  --field-hover: #2a2f3c;
  --warn: #ffb020;
  --warn-soft: rgba(255, 176, 32, 0.12);
  --warn-line: rgba(255, 176, 32, 0.24);
  --accent: #ff7f3d;
  --accent-soft: rgba(255, 127, 61, 0.16);
  --star: #ffb020;
  --cta-bg: #f1f2f6;
  --cta-ink: #101116;
  --scrim: rgba(0, 0, 0, 0.66);
  --skel-1: #1b1e27;
  --skel-2: #232733;
  --art-bldg: #464e73;
  --art-trim: #58608a;
  --art-door: #5d6595;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.5);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.dir-body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
body.dir-ref-on { overflow: hidden; }
img { display: block; max-width: 100%; }
::selection { background: var(--accent-soft); }

.dir-wrap { width: 100%; max-width: 560px; margin: 0 auto; padding-inline: var(--pad); }

/* ── Header ── */
.dir-top {
  padding-top: calc(18px + env(safe-area-inset-top));
  padding-bottom: 4px;
}
.dir-top-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.dir-loc { text-align: left; min-width: 0; }
.dir-loc-kicker {
  display: block;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 2px;
}
.dir-loc-btn {
  appearance: none; border: 0; background: none; padding: 0;
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%;
  font: inherit; font-size: 0.95rem; font-weight: 700; color: var(--ink-2);
  cursor: pointer;
  transition: color 0.2s ease;
}
.dir-loc-btn.is-set span {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.dir-loc-btn.is-manual span { color: var(--ink); }
.dir-loc-btn.is-gps span { color: var(--accent); }
.dir-loc-btn span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dir-loc-btn.is-locating span {
  animation: dir-loc-text 1.4s ease-in-out infinite;
}
@keyframes dir-loc-text {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.dir-loc-btn svg { width: 14px; height: 14px; color: var(--ink); }
.dir-loc-btn:hover { color: var(--ink); }

.dir-top-actions { display: flex; align-items: center; gap: 8px; }

/* Team-only realtime hint — no label; green = push live, amber pulse = reconnect, dim = fallback */
.dir-rt {
  width: 4px; height: 4px; border-radius: 50%; flex-shrink: 0;
  opacity: 0.22; background: var(--ink-3);
  transition: opacity 0.35s ease, background 0.35s ease, transform 0.35s ease;
}
.dir-rt.is-live {
  opacity: 0.62;
  background: #34d399;
  box-shadow: 0 0 5px rgba(52, 211, 153, 0.45);
}
.dir-rt.is-wait {
  opacity: 0.55;
  background: #fbbf24;
  animation: dir-rt-pulse 1.6s ease-in-out infinite;
}
.dir-rt.is-off {
  opacity: 0.18;
  background: var(--ink-3);
  box-shadow: none;
}
@keyframes dir-rt-pulse {
  0%, 100% { opacity: 0.28; transform: scale(0.85); }
  50% { opacity: 0.62; transform: scale(1); }
}

.dir-theme {
  appearance: none; cursor: pointer;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); padding: 0;
  transition: color 0.2s, border-color 0.2s, transform 0.25s var(--spring);
}
.dir-theme:hover { color: var(--accent); border-color: var(--accent); }
.dir-theme:active { transform: scale(0.92); }
.dir-theme svg { width: 18px; height: 18px; }
.dir-theme .icon-sun { display: none; }
:root[data-theme="dark"] .dir-theme .icon-sun { display: block; }
:root[data-theme="dark"] .dir-theme .icon-moon { display: none; }

.dir-top-cta {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 20px;
  background: var(--cta-bg); color: var(--cta-ink);
  text-decoration: none; font-size: 0.78rem; font-weight: 700;
  white-space: nowrap;
  transition: transform 0.25s var(--spring), filter 0.2s;
}
.dir-top-cta:hover { filter: brightness(1.15); transform: translateY(-1px); }
.dir-top-cta:active { transform: scale(0.96); }

.dir-greet {
  margin: 16px 0 10px;
  max-width: 20em;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.dir-greet b {
  font-weight: 600;
  color: var(--ink-2);
}
@media (min-width: 600px) {
  .dir-greet {
    margin: 20px 0 12px;
    font-size: 1.05rem;
    max-width: 24em;
  }
}

/* Location mismatch — browsing another city than GPS */
.dir-loc-diff-wrap {
  padding-bottom: 12px;
  animation: dir-loc-diff-in 0.45s var(--ease);
}
@keyframes dir-loc-diff-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.dir-loc-diff {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  padding: 13px 14px 13px 13px;
  border-radius: 16px;
  border: 1px solid var(--warn-line);
  background: linear-gradient(135deg, var(--warn-soft), color-mix(in srgb, var(--warn-soft) 55%, var(--surface)));
  box-shadow: var(--shadow-sm);
}
.dir-loc-diff-dismiss {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  width: 28px;
  height: 28px;
  margin: -2px -2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.2s, background 0.2s;
}
.dir-loc-diff-dismiss:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.dir-loc-diff-dismiss svg { width: 14px; height: 14px; }
.dir-loc-diff-icon {
  grid-row: 1 / span 2;
  align-self: center;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--warn-soft);
  color: var(--warn);
}
.dir-loc-diff-icon svg { width: 18px; height: 18px; }
.dir-loc-diff-copy {
  grid-column: 2;
  min-width: 0;
  padding-right: 4px;
}
.dir-loc-diff-copy strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.dir-loc-diff-copy span {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink-2);
}
.dir-loc-diff-copy em {
  font-style: normal;
  font-weight: 800;
  color: var(--ink);
}
.dir-loc-diff-actions {
  grid-column: 2 / span 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.dir-loc-diff-switch,
.dir-loc-diff-keep {
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s var(--spring), filter 0.2s, background 0.2s;
}
.dir-loc-diff-switch:active,
.dir-loc-diff-keep:active { transform: scale(0.97); }
.dir-loc-diff-switch {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(252, 110, 42, 0.22);
}
.dir-loc-diff-keep {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line);
}
.dir-loc-diff-keep:hover { color: var(--ink); border-color: var(--ink-3); }

/* ── Sticky tabs + search ── */
.dir-stick {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  padding-top: 10px;
  padding-bottom: 8px;
}
.dir-stick.is-stuck { box-shadow: 0 1px 0 var(--line); }

.dir-stick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dir-switch {
  display: flex;
  align-items: baseline;
  gap: 20px;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: none;
}
.dir-switch a {
  flex: none;
  text-align: left;
  padding: 8px 0 10px;
  border-radius: 0;
  text-decoration: none;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-3);
  position: relative;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.dir-switch a:hover { color: var(--ink-2); }
.dir-switch a.is-on {
  background: none;
  color: var(--ink);
  box-shadow: none;
}
.dir-switch a.is-on::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 5px;
  background: var(--accent);
  transform-origin: left center;
  animation: dir-tab-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes dir-tab-in {
  from { transform: scaleX(0); opacity: 0.4; }
  to { transform: scaleX(1); opacity: 1; }
}
:root[data-theme="dark"] .dir-switch a.is-on { background: none; }

.dir-search-btn {
  appearance: none;
  width: 40px; height: 40px;
  border: 0; background: none; padding: 0;
  color: var(--ink);
  display: grid; place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}
.dir-search-btn svg { width: 20px; height: 20px; }
.dir-search-btn .dir-search-close { display: none; }
.dir-search-btn:active { transform: scale(0.9); }
.dir-search-btn:hover { background: var(--field); }
body.dir-search-on .dir-search-btn { color: var(--accent); }
body.dir-search-on .dir-search-btn .dir-search-ico { display: none; }
body.dir-search-on .dir-search-btn .dir-search-close { display: block; }

.dir-search-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
.dir-search-panel.is-open { grid-template-rows: 1fr; }
.dir-search-panel-inner { overflow: hidden; }
.dir-search-bar {
  display: flex; align-items: center; gap: 10px;
  height: 46px; margin-top: 8px; padding: 0 14px;
  background: var(--field);
  border: 0;
  border-radius: 10px;
}
.dir-search-bar svg { width: 16px; height: 16px; color: var(--ink-3); flex-shrink: 0; }
.dir-search {
  flex: 1; min-width: 0;
  border: 0; background: transparent; outline: none;
  font: inherit; font-size: 0.94rem; font-weight: 500; color: var(--ink);
}
.dir-search::placeholder { color: var(--ink-3); font-weight: 400; }
.dir-search::-webkit-search-cancel-button { -webkit-appearance: none; }

@media (max-width: 400px) {
  .dir-switch { gap: 14px; }
  .dir-switch a { font-size: 1.12rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dir-search-panel, .dir-switch a, .dir-switch a.is-on::after {
    transition: none !important; animation: none !important;
  }
}

/* ── Section head ── */
.dir-sec { margin-top: 26px; }
.dir-sec-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.dir-sec-head h2 {
  margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em;
}
.dir-sec-head span { font-size: 0.76rem; font-weight: 700; color: var(--ink-3); }

/* ── Category chips ── */
.dir-chips {
  display: flex; gap: 8px;
  /* overflow-x:auto also clips vertically, so the row needs enough padding to
     hold the active chip's glow — negative margins keep the spacing unchanged */
  overflow-x: auto;
  padding: 12px var(--pad) 24px;
  margin-inline: calc(-1 * var(--pad));
  margin-block: -10px -16px;
  scrollbar-width: none; -ms-overflow-style: none;
  scroll-padding-inline: var(--pad);
  -webkit-overflow-scrolling: touch;
}
.dir-chips::-webkit-scrollbar { display: none; }
.dir-chip {
  flex-shrink: 0;
  appearance: none; cursor: pointer;
  padding: 9px 16px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--surface);
  font: inherit; font-size: 0.8rem; font-weight: 700; color: var(--ink-2);
  transition: all 0.25s var(--ease);
}
.dir-chip:active { transform: scale(0.95); }
.dir-chip:hover { border-color: var(--accent); color: var(--accent); }
.dir-chip.is-on {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 6px 16px rgba(252, 110, 42, 0.3);
}

/* ── Restaurant card ── */
.dir-list { display: grid; gap: 42px; }

.dir-card-shell {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  transition: transform 0.25s var(--spring);
}
.dir-card-shell.is-in {
  animation: dir-rise 0.68s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 52ms);
}
.dir-card-shell:active .dir-cover { transform: scale(0.985); }

.dir-cover-wrap {
  position: relative;
}

.dir-card-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 0;
  text-decoration: none;
  color: inherit;
}

.dir-card-share {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 11px 0 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(24, 28, 46, 0.14);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #181c2e;
  cursor: pointer;
  transition: transform 0.2s var(--spring), box-shadow 0.2s var(--ease);
}
.dir-card-share svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--accent); }
.dir-card-share:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.dir-card-share:active { transform: scale(0.96); }

#dir-results.is-revealing .dir-sec-head {
  opacity: 0;
  transform: translateY(8px);
}
#dir-results.is-revealing-go .dir-sec-head {
  animation: dir-sec-rise 0.55s var(--ease) forwards;
}
#dir-results.is-revealing-go .dir-sec:nth-child(1) .dir-sec-head { animation-delay: 0.04s; }
#dir-results.is-revealing-go .dir-sec:nth-child(2) .dir-sec-head { animation-delay: 0.1s; }

/* Locating — wait for GPS before showing the list */
.dir-locating {
  padding: 56px 20px 72px;
  text-align: center;
  animation: dir-loc-in 0.55s var(--ease);
}
.dir-locating-visual {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 22px;
}
.dir-loc-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(252, 110, 42, 0.28);
  animation: dir-loc-ring 2.2s var(--ease) infinite;
}
.dir-loc-ring-2 { animation-delay: 0.55s; opacity: 0.7; }
.dir-loc-pin {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--accent);
  filter: drop-shadow(0 6px 16px rgba(252, 110, 42, 0.28));
  animation: dir-loc-pin 2.2s ease-in-out infinite;
}
.dir-loc-pin svg { width: 30px; height: 30px; }
.dir-loc-title {
  display: block;
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  animation: dir-loc-line 0.55s var(--ease) 0.08s backwards;
}
.dir-loc-sub {
  display: block;
  margin-top: 7px;
  font-size: 0.86rem;
  color: var(--ink-2);
  animation: dir-loc-line 0.55s var(--ease) 0.16s backwards;
}
.dir-locating.is-fail .dir-loc-ring { animation: none; opacity: 0.35; }
.dir-locating.is-fail .dir-loc-pin { animation: none; color: var(--ink-3); filter: none; }

@keyframes dir-loc-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes dir-loc-line {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes dir-loc-ring {
  0% { transform: scale(0.55); opacity: 0.75; }
  70% { transform: scale(1); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}
@keyframes dir-loc-pin {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes dir-sec-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Faint centred hairline — no full-width block */
.dir-card-shell:not(:last-child)::after {
  content: "";
  display: block;
  width: 56%;
  max-width: 220px;
  height: 1px;
  margin: 22px auto 0;
  background: linear-gradient(90deg, transparent, rgba(100, 105, 130, 0.16) 50%, transparent);
  pointer-events: none;
}
:root[data-theme="dark"] .dir-card-shell:not(:last-child)::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06) 50%, transparent);
}

.dir-cover {
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-soft);
  transition: transform 0.4s var(--spring), box-shadow 0.4s var(--ease);
}
.dir-card-shell:hover .dir-cover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.dir-card-shell:hover .dir-cover:not(.is-typo) img { transform: scale(1.05); }

.dir-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease);
}
/* keeps the white badges readable on bright photo covers */
.dir-cover:not(.is-art):not(.is-typo)::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(180deg, rgba(24, 28, 46, 0.22), transparent 34%);
}

/* No-photo — blurred category photo + polished typography */
.dir-cover.is-typo { background: #12141c; }
.dir-typo-bg {
  position: absolute; inset: -24px; z-index: 0; overflow: hidden;
}
.dir-typo-bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(22px) saturate(1.15) brightness(0.72);
  transform: scale(1.12);
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease);
}
.dir-card-shell:hover .dir-cover.is-typo .dir-typo-bg img {
  transform: scale(1.16);
  filter: blur(20px) saturate(1.2) brightness(0.76);
}
.dir-typo-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 10, 18, 0.35) 0%, rgba(8, 10, 18, 0.78) 100%),
    radial-gradient(ellipse 90% 70% at 50% 42%, rgba(8, 10, 18, 0.15), rgba(8, 10, 18, 0.55) 72%);
}
:root[data-theme="dark"] .dir-typo-shade {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.84) 100%),
    radial-gradient(ellipse 90% 70% at 50% 42%, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.62) 72%);
}
.dir-typo-copy {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 46px 22px 38px;
  pointer-events: none;
}
.dir-typo-kind {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}
.dir-typo-name {
  margin-top: 8px;
  max-width: 92%;
  font-size: clamp(1.08rem, 4.8vw, 1.38rem);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.12;
  color: #fff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-wrap: balance;
}
.dir-typo-rule {
  display: block; width: 32px; height: 2px; margin: 11px auto 0; border-radius: 1px;
  background: hsl(var(--typo-accent, 24) 68% 58%);
  box-shadow: 0 0 12px hsl(var(--typo-accent, 24) 70% 50% / 0.45);
}
.dir-typo-sub {
  margin-top: 10px; max-width: 90%;
  font-size: 0.74rem; font-weight: 650; letter-spacing: 0.02em; line-height: 1.35;
  color: rgba(255, 255, 255, 0.74);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dir-cover.is-typo .dir-badge { z-index: 4; }

/* Last-resort flat panel if JS fails to paint */
.dir-cover.is-art {
  background:
    linear-gradient(145deg, hsl(var(--art-h, 24) 16% 94%), hsl(var(--art-h, 24) 12% 90%));
}
:root[data-theme="dark"] .dir-cover.is-art {
  background:
    linear-gradient(145deg, hsl(var(--art-h, 24) 14% 16%), hsl(var(--art-h, 24) 10% 13%));
}

.dir-badge {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  height: 27px; padding: 0 11px; border-radius: 14px;
  /* sits on photos, so it stays light in both themes */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  font-size: 0.7rem; font-weight: 800; color: #181c2e;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.dir-badge svg { width: 12px; height: 12px; color: #fc6e2a; }
.dir-rating-of { font-size: 0.88em; font-weight: 700; opacity: 0.68; letter-spacing: -0.03em; }
.dir-meta-item .dir-rating-of { font-size: 0.92em; opacity: 0.75; }
.dir-badge.is-price { left: auto; right: 10px; color: #fc6e2a; }
.dir-badge.is-hours { top: auto; bottom: 10px; left: 10px; }
.dir-badge.is-hours.is-closed { background: rgba(32, 32, 38, 0.92); color: #fff; }
.dir-badge.is-hours.is-closed svg { color: #ffb4a8; }
.dir-badge.is-hours.is-open { background: rgba(22, 90, 58, 0.94); color: #fff; }
.dir-badge.is-hours.is-open svg { color: #b8f0cf; }
.dir-badge.is-hours.is-closing { background: rgba(180, 83, 9, 0.96); color: #fff; }
.dir-badge.is-hours.is-closing svg { color: #ffedd5; }

.dir-offline {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 16px 14px; text-align: center;
  background: rgba(18, 18, 22, 0.62);
  color: #fff; pointer-events: none;
}
.dir-offline strong {
  display: block; font-size: 0.98rem; font-weight: 800; letter-spacing: -0.02em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.dir-offline span {
  display: block; font-size: 0.76rem; font-weight: 650; opacity: 0.92;
  line-height: 1.35;
}

.dir-book-soon {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, transparent, rgba(22, 90, 58, 0.92) 38%);
  color: #fff; pointer-events: none;
}
.dir-book-soon strong {
  font-size: 0.92rem; font-weight: 800; letter-spacing: -0.02em;
}
.dir-book-soon span {
  font-size: 0.74rem; font-weight: 650; opacity: 0.92;
}

.dir-card-shell.is-closed,
.dir-card.is-closed {
  filter: grayscale(1);
  opacity: 0.82;
}
.dir-card-shell.is-closed .dir-cover,
.dir-card.is-closed .dir-cover { filter: brightness(0.72); }
.dir-card-shell.is-closed:hover .dir-cover,
.dir-card.is-closed:hover .dir-cover { transform: none; box-shadow: none; }
.dir-card-shell.is-closed:hover .dir-cover img,
.dir-card.is-closed:hover .dir-cover img { transform: none; }
.dir-card-shell.is-closed .dir-card-body h3,
.dir-card.is-closed .dir-card-body h3 { opacity: 0.72; }

.dir-card-shell.is-opening .dir-cover,
.dir-card.is-opening .dir-cover {
  filter: brightness(1.03);
}

.dir-card-offline {
  margin: 5px 0 0;
  font-size: 0.8rem; font-weight: 800; color: #6b7280;
  line-height: 1.35;
}
.dir-card-closing {
  margin: 5px 0 0;
  font-size: 0.8rem; font-weight: 800; color: #c2410c;
  line-height: 1.35;
}
.dir-closing {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  gap: 2px; padding: 28px 12px 12px;
  background: linear-gradient(180deg, transparent, rgba(124, 45, 18, 0.88));
  color: #fff; pointer-events: none;
}
.dir-closing[hidden] { display: none; }
.dir-closing strong {
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.dir-closing span { font-size: 0.92rem; font-weight: 800; }
.dir-opening-photo {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  gap: 2px; padding: 28px 12px 12px;
  background: linear-gradient(180deg, transparent, rgba(3, 90, 145, 0.92));
  color: #fff; pointer-events: none;
}
.dir-opening-photo strong {
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
}
.dir-opening-photo span { font-size: 0.92rem; font-weight: 800; }

.dir-card-body { padding: 8px 2px 0; position: relative; z-index: 2; }
/* Typo cover carries name + tags — body keeps distance/rating only */
.dir-card-shell:has(.dir-cover.is-typo) .dir-card-body h3,
.dir-card-shell:has(.dir-cover.is-typo) .dir-card-body .dir-card-sub { display: none; }
.dir-card-shell:has(.dir-cover.is-typo) .dir-card-body { padding-top: 6px; }
.dir-card-body h3 {
  margin: 0; font-size: 1.08rem; font-weight: 800; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dir-card-sub {
  margin: 3px 0 0; font-size: 0.82rem; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.dir-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 7px 14px;
  margin-top: 8px;
}
.dir-meta-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.8rem; font-weight: 700; color: var(--ink);
}
.dir-meta-item svg { width: 15px; height: 15px; }
.dir-meta-item.is-star svg { color: var(--star); }
.dir-meta-item.is-soft { color: var(--ink-2); font-weight: 400; }
.dir-meta-item.is-soft svg { color: var(--accent); }
.dir-meta-item.is-closed { color: #c2410c; font-weight: 700; }
.dir-meta-item.is-closed svg { color: #c2410c; }
.dir-meta-item.is-closing { color: #c2410c; font-weight: 800; }
.dir-meta-item.is-closing svg { color: #c2410c; }
.dir-meta-item.is-open { color: #15803d; }
.dir-meta-item.is-open svg { color: #15803d; }
.dir-meta-item em { font-style: normal; color: var(--ink-2); font-weight: 400; }

/* ── Skeleton ── */
.dir-skel .dir-card-shell,
.dir-skel .dir-card { opacity: 1; transform: none; animation: none; }
.dir-skel .dir-cover { background: var(--bg-soft); }
.dir-sk {
  height: 13px; border-radius: 7px; margin-top: 12px;
  background: linear-gradient(100deg, var(--skel-1) 30%, var(--skel-2) 50%, var(--skel-1) 70%);
  background-size: 220% 100%;
  animation: dir-shimmer 1.4s linear infinite;
}
.dir-sk.w55 { width: 55%; }
.dir-sk.w35 { width: 35%; height: 11px; }

/* ── Empty ── */
.dir-state {
  text-align: center; padding: 56px 24px;
  background: var(--bg-soft); border-radius: 18px;
}
.dir-state strong { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.dir-state span { font-size: 0.88rem; color: var(--ink-2); }

/* ── Footer ── */
.dir-foot {
  margin-top: 40px;
  padding-top: 20px;
  padding-bottom: calc(36px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--ink-3);
}
.dir-foot:has(.dir-foot-brand) {
  margin-top: 48px;
  padding-top: 28px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
  gap: 12px;
}
.dir-foot-brand {
  display: block;
  line-height: 0;
  text-decoration: none;
}
.dir-foot-mark {
  display: block;
  height: 20px;
  width: auto;
}
.dir-brand-light { display: none; }
html[data-theme="light"] .dir-brand-dark { display: none; }
html[data-theme="light"] .dir-brand-light { display: block; }
.dir-foot-tag {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.dir-foot-meta {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.dir-foot a { color: var(--accent); text-decoration: none; font-weight: 700; }
.dir-foot-share-box { width: 100%; }
.dir-foot-share-kicker {
  margin: 0 0 8px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.dir-foot-share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dir-foot-share-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-height: 100%;
  padding: 11px 11px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.dir-foot-share-opt svg {
  width: 15px; height: 15px;
  margin-bottom: 2px;
  color: var(--accent);
}
.dir-foot-share-opt-label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}
.dir-foot-share-opt-hint {
  font-size: 0.64rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-2);
}
.dir-foot-share-opt:hover {
  background: var(--bg-soft);
  border-color: color-mix(in srgb, var(--line) 50%, var(--accent) 50%);
}
.dir-foot-share-opt:active { opacity: 0.9; }
.dir-foot-brand:hover { opacity: 0.8; }

.dir-gps-gate {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: var(--scrim);
}
.dir-gps-gate[hidden] { display: none; }
.dir-gps-card {
  width: min(400px, 100%);
  padding: 28px 24px 24px;
  background: var(--surface);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  text-align: center;
  animation: dir-sheet-up 0.35s var(--spring);
}
.dir-gps-card h3 { margin: 0 0 8px; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.03em; }
.dir-gps-card p { margin: 0 0 22px; font-size: 0.92rem; color: var(--ink-2); line-height: 1.45; }
.dir-gps-card .dir-btn { width: 100%; }

.dir-gps-card { position: relative; }
.dir-gps-dismiss {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}
.dir-gps-dismiss:hover { color: var(--ink); }
.dir-gps-card .dir-btn + .dir-btn { margin-top: 10px; }


/* ── Referral splash (marketing modal) ── */
.dir-ref-splash {
  position: fixed; inset: 0; z-index: 110;
  display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(12, 14, 20, 0.62);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}
.dir-ref-splash[hidden] { display: none; }

.dir-ref-card {
  width: min(400px, 100%);
  overflow: hidden;
  border-radius: 28px;
  background: var(--surface);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.07);
  animation: dir-ref-enter 0.55s var(--spring);
}

.dir-ref-visual {
  position: relative;
  height: 228px;
  overflow: hidden;
  background: #1a1410;
}
.dir-ref-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.02) 42%, rgba(10, 8, 6, 0.78) 100%);
  pointer-events: none;
}
.dir-ref-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  animation: dir-ref-ken 28s ease-in-out infinite alternate;
}
.dir-ref-close {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  color: #fff; cursor: pointer;
  transition: background 0.2s var(--ease);
}
.dir-ref-close svg { width: 16px; height: 16px; }
.dir-ref-close:hover { background: rgba(255, 255, 255, 0.24); }

.dir-ref-visual-inner {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 0 24px 24px;
}
.dir-ref-social {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
  animation: dir-ref-up 0.65s var(--ease) 0.12s backwards;
}
.dir-ref-avatars {
  display: flex; align-items: center;
  margin: 0; padding: 0; list-style: none;
}
.dir-ref-avatars li {
  width: 34px; height: 34px;
  margin-left: -9px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.dir-ref-avatars li:first-child { margin-left: 0; }
.dir-ref-avatars img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
}
.dir-ref-social-label {
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.01em;
}
.dir-ref-visual-title {
  margin: 0;
  font-size: clamp(1.38rem, 4.8vw, 1.58rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.14;
  color: #fff;
  text-wrap: balance;
  animation: dir-ref-up 0.65s var(--ease) 0.22s backwards;
}

.dir-ref-panel {
  padding: 26px 24px 22px;
}
.dir-ref-lead {
  margin: 0 0 8px;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--ink);
  animation: dir-ref-up 0.65s var(--ease) 0.32s backwards;
}
.dir-ref-desc {
  margin: 0 0 22px;
  font-size: 0.875rem;
  line-height: 1.62;
  color: var(--ink-2);
  animation: dir-ref-up 0.65s var(--ease) 0.4s backwards;
}
.dir-ref-perk {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(252, 110, 42, 0.18);
  animation: dir-ref-up 0.65s var(--ease) 0.36s backwards;
}
.dir-ref-perk svg {
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: 1px;
  color: var(--accent);
}
.dir-ref-perk span {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}
.dir-ref-cta {
  width: 100%;
  flex: none;
  min-height: 54px;
  margin-bottom: 4px;
  border: 0;
  border-radius: 14px;
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 28px rgba(252, 110, 42, 0.28);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
  animation: dir-ref-up 0.65s var(--ease) 0.48s backwards;
}
.dir-ref-cta svg { width: 16px; height: 16px; opacity: 0.9; }
.dir-ref-cta:hover {
  filter: brightness(1.04);
  box-shadow: 0 14px 32px rgba(252, 110, 42, 0.34);
  transform: translateY(-1px);
}
.dir-ref-cta:active { transform: translateY(0); }
.dir-ref-dismiss {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink-3);
  cursor: pointer;
  animation: dir-ref-up 0.65s var(--ease) 0.54s backwards;
}
.dir-ref-dismiss:hover { color: var(--ink-2); }

:root[data-theme="dark"] .dir-ref-splash { background: rgba(0, 0, 0, 0.78); }
:root[data-theme="dark"] .dir-ref-card {
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

@media (max-width: 480px) {
  .dir-ref-splash {
    padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom));
    align-items: center;
  }
  .dir-ref-card {
    width: min(320px, 100%);
    max-height: min(520px, 86dvh);
    border-radius: 20px;
  }
  .dir-ref-visual { height: 150px; }
  .dir-ref-close {
    top: 10px; right: 10px;
    width: 30px; height: 30px;
  }
  .dir-ref-close svg { width: 14px; height: 14px; }
  .dir-ref-visual-inner { padding: 0 16px 14px; }
  .dir-ref-social { gap: 8px; margin-bottom: 8px; }
  .dir-ref-avatars li {
    width: 26px; height: 26px;
    margin-left: -7px;
    border-width: 1.5px;
  }
  .dir-ref-social-label { font-size: 0.64rem; line-height: 1.25; }
  .dir-ref-visual-title {
    font-size: 1.12rem;
    line-height: 1.12;
    letter-spacing: -0.03em;
  }
  .dir-ref-panel { padding: 16px 16px 14px; }
  .dir-ref-lead {
    margin-bottom: 6px;
    font-size: 0.9rem;
    line-height: 1.25;
  }
  .dir-ref-perk {
    gap: 8px;
    margin-bottom: 12px;
    padding: 9px 11px;
    border-radius: 10px;
  }
  .dir-ref-perk svg { width: 15px; height: 15px; }
  .dir-ref-perk span { font-size: 0.74rem; line-height: 1.35; }
  .dir-ref-desc {
    margin-bottom: 14px;
    font-size: 0.78rem;
    line-height: 1.5;
  }
  .dir-ref-cta {
    min-height: 44px;
    border-radius: 11px;
    font-size: 0.86rem;
    box-shadow: 0 8px 20px rgba(252, 110, 42, 0.24);
  }
  .dir-ref-cta svg { width: 14px; height: 14px; }
  .dir-ref-dismiss {
    margin-top: 2px;
    padding: 7px;
    font-size: 0.76rem;
  }
}

@keyframes dir-ref-enter {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dir-ref-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes dir-ref-ken {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}
@media (prefers-reduced-motion: reduce) {
  .dir-ref-card, .dir-ref-photo, .dir-ref-social, .dir-ref-visual-title,
  .dir-ref-lead, .dir-ref-desc, .dir-ref-cta, .dir-ref-dismiss {
    animation: none !important;
  }
}

.dir-sheet {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
}
.dir-sheet[hidden] { display: none; }
.dir-sheet-scrim {
  position: absolute; inset: 0;
  background: var(--scrim);
  animation: dir-fade 0.25s var(--ease);
}
.dir-sheet-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(88dvh, 640px);
  display: flex;
  flex-direction: column;
  padding: 8px var(--pad) calc(18px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.32);
  animation: dir-sheet-up 0.42s var(--spring);
  overflow: hidden;
}
.dir-sheet-grab {
  width: 36px;
  height: 4px;
  margin: 2px auto 12px;
  border-radius: 999px;
  background: var(--line);
  flex-shrink: 0;
}
.dir-sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.dir-sheet-bar h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.dir-sheet-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--field);
  color: var(--ink-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: color 0.2s, background 0.2s, transform 0.2s var(--spring);
}
.dir-sheet-close:hover { color: var(--ink); background: var(--field-hover); }
.dir-sheet-close:active { transform: scale(0.94); }
.dir-sheet-close svg { width: 15px; height: 15px; }

.dir-city-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: var(--field);
  border: 1.5px solid transparent;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}
.dir-city-search:focus-within {
  border-color: var(--accent);
  background: var(--field-focus);
}
.dir-city-search svg {
  width: 18px;
  height: 18px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.dir-city-search:focus-within svg { color: var(--accent); }
.dir-city-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.dir-city-search input::placeholder {
  color: var(--ink-3);
  font-weight: 500;
}
.dir-city-search input::-webkit-search-decoration,
.dir-city-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.dir-city-list {
  flex-shrink: 0;
  margin: 0 -2px;
  padding: 0 2px 4px;
}
.dir-city-list-label {
  margin: 2px 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.dir-city-track {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 12px;
  margin: 0 -2px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.dir-city-track::-webkit-scrollbar { display: none; }
.dir-city-track::after {
  content: "";
  flex: 0 0 2px;
}
.dir-city-pill {
  flex: 0 0 auto;
  appearance: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
  scroll-snap-align: start;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s var(--spring), box-shadow 0.2s;
}
.dir-city-pill:active { transform: scale(0.96); }
.dir-city-pill:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  color: var(--accent);
}
.dir-city-pill.is-active:not(.is-on) {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background: var(--accent-soft);
  color: var(--accent);
}
.dir-city-pill.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(252, 110, 42, 0.28);
}
.dir-city-pill.is-gps {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
  color: var(--accent);
}
.dir-city-pill.is-gps:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dir-city-pill-ico {
  display: inline-flex;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}
.dir-city-pill-ico svg { width: 14px; height: 14px; }
.dir-city-scroll-hint {
  margin: -4px 4px 0;
  font-size: 0.72rem;
  color: var(--ink-3);
  text-align: center;
}
.dir-city-list-empty,
.dir-city-list-loading {
  padding: 20px 16px 12px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink-3);
  line-height: 1.45;
}
.dir-city-list-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.dir-city-list-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: dir-city-spin 0.7s linear infinite;
}
@keyframes dir-city-spin { to { transform: rotate(360deg); } }

.dir-city-apply {
  flex: none;
  width: 100%;
  margin-top: 8px;
  flex-shrink: 0;
}
.dir-city-apply[hidden] { display: none; }

/* Keep field helpers used elsewhere */
.dir-field {
  width: 100%; height: 54px; margin-bottom: 12px;
  padding: 0 18px;
  background: var(--field); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 0.92rem; outline: none;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.dir-field::placeholder { color: var(--ink-3); font-weight: 500; }
.dir-field:focus {
  background: var(--field-focus);
  border-color: var(--accent);
  color: var(--ink);
}
.dir-city-picks {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 16px;
}
.dir-city-pick {
  height: 38px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--field); color: var(--ink);
  font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s var(--spring);
}
.dir-city-pick:active { transform: scale(0.97); }
.dir-city-pick.is-on {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.dir-city-pick:hover { border-color: var(--accent); color: var(--accent); }
.dir-away {
  padding: 40px 12px 24px; text-align: center; animation: dir-fade 0.4s var(--ease);
}
.dir-away-icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--field);
  color: var(--ink-3);
}
.dir-away-icon svg { width: 24px; height: 24px; }
.dir-away strong { display: block; font-size: 1.25rem; letter-spacing: -0.03em; }
.dir-away span { display: block; margin: 8px 0 18px; color: var(--ink-2); font-size: 0.92rem; line-height: 1.45; }
.dir-away-cities { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dir-btn {
  flex: 1; height: 52px;
  border: 1px solid transparent; border-radius: 12px;
  font: inherit; font-size: 0.88rem; font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.2s var(--spring), filter 0.2s, background 0.2s;
}
.dir-btn:active { transform: scale(0.97); }
.dir-btn svg { width: 16px; height: 16px; }
.dir-btn-ghost { background: var(--field); color: var(--ink); border-color: var(--line); }
.dir-btn-ghost:hover { filter: brightness(1.08); }
.dir-btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 10px 24px rgba(252, 110, 42, 0.3);
}
.dir-btn-primary:hover { filter: brightness(1.05); }

/* ── Animations ── */
@keyframes dir-rise {
  from { opacity: 0; transform: translateY(20px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dir-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -60% 0; }
}
@keyframes dir-glow { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
@keyframes dir-pole { to { transform: translateY(7px); } }
@keyframes dir-shop-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.1px); }
}
@keyframes dir-shop-shadow {
  0%, 100% { transform: scaleX(1); opacity: 0.14; }
  50% { transform: scaleX(0.93); opacity: 0.1; }
}
@keyframes dir-awn-sway {
  0%, 100% { transform: rotate(-0.75deg); }
  50% { transform: rotate(0.75deg); }
}
@keyframes dir-plant-sway {
  0%, 100% { transform: rotate(-1.6deg); }
  50% { transform: rotate(1.6deg); }
}
@keyframes dir-sign-pulse {
  0%, 100% { opacity: 0.26; transform: scale(0.97); }
  50% { opacity: 0.6; transform: scale(1.035); }
}
@keyframes dir-amb-drift {
  0%, 100% { transform: translate(0, 0); opacity: 0.45; }
  50% { transform: translate(2.5px, -3.5px); opacity: 1; }
}
@keyframes dir-steam {
  0% { opacity: 0; transform: translateY(0) scale(0.45); }
  22% { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(-7px) scale(1.5); }
}
@keyframes dir-twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.55) rotate(0deg); }
  50% { opacity: 0.95; transform: scale(1) rotate(50deg); }
}
@keyframes dir-dawn-glow {
  0%, 100% { opacity: 0.5; filter: brightness(0.72); }
  50% { opacity: 1; filter: brightness(1.18); }
}
@keyframes dir-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dir-sheet-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 900px) {
  .dir-wrap { max-width: 1000px; }
  .dir-list { grid-template-columns: 1fr 1fr; gap: 44px 28px; }
  .dir-cover { aspect-ratio: 16 / 9; }
  .dir-greet { font-size: 1.1rem; }
  .dir-sec { margin-top: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .dir-card-shell, .dir-card { opacity: 1; transform: none; animation: none !important; }
  .dir-card-shell *, .dir-card *, .dir-sk { animation: none !important; }
  .dir-locating, .dir-locating *, .dir-loc-btn.is-locating span { animation: none !important; }
  .dir-loc-diff-wrap { animation: none !important; }
  .dir-city-drop-hint.is-loading::after { animation: none !important; }
  #dir-results.is-revealing .dir-sec-head { opacity: 1; transform: none; }
  .dir-steam circle { opacity: 0.35; }
  .dir-spark { opacity: 0.7; }
}
