:root {
  color-scheme: light;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --ink: #22241f;
  --muted: #5c6056;
  --dim: #6b6e63;
  --paper: #f4f2ec;
  --surface: #fcfbf7;
  --surface-raised: #ebe9e1;
  --line: #dedbd2;
  --accent: #40503e;
  --accent-dark: #2c3a2d;
  --accent-ink: #fcfbf4;
  --accent-soft: #e6e9df;
  --photo-backdrop: #252522;
  --motion-out: cubic-bezier(.22, .8, .28, 1);
  --gutter: clamp(1.125rem, 4vw, 2.5rem);
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--paper);
  word-break: keep-all;
  overflow-wrap: break-word;
}

button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
button, figure, h1, h2, p, dl, dd, ul { margin: 0; }
h1, h2 { line-height: 1.15; letter-spacing: -.055em; overflow-wrap: anywhere; }
p { line-height: 1.55; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

h1[tabindex]:focus, main[tabindex]:focus { outline: none; }
noscript { text-align: center; padding: 1.25rem; }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  z-index: 5;
  inset: .75rem auto auto .75rem;
  padding: .75rem 1rem;
  border-radius: .5rem;
  background: var(--accent);
  color: var(--accent-ink);
}

.icon {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  vertical-align: middle;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  padding: .62rem .95rem;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}

.button:disabled { color: #797c72; background: var(--surface-raised); border-color: var(--line); }
.button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.button.primary:disabled { opacity: .68; }
.button.secondary { background: var(--surface-raised); }
.saved-shortcut {
  flex: none;
  padding: .48rem .7rem;
  border-radius: 2rem;
  color: var(--accent);
  font-size: .85rem;
  white-space: nowrap;
}

main { flex: 1; min-width: 0; padding: env(safe-area-inset-top) var(--gutter) 0; }

.loading { margin: 4rem auto; text-align: center; color: var(--muted); }

.home-main { display: grid; justify-items: center; padding: 0; }
.explore-main { padding: 0; }

.home {
  --home-gutter: clamp(1rem, 5vw, 1.5rem);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(min-content, 1fr) auto;
  gap: clamp(.75rem, 2svh, 1.15rem);
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding-block: max(1rem, calc(env(safe-area-inset-top) + .5rem))
    max(clamp(1.55rem, 5svh, 3.2rem), calc(env(safe-area-inset-bottom) + 1rem));
  padding-inline: max(var(--home-gutter), env(safe-area-inset-left))
    max(var(--home-gutter), env(safe-area-inset-right));
  background: #241a15;
}

.home-sketch {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  pointer-events: none;
}

.home-tools { display: flex; justify-content: flex-end; }
.home .saved-shortcut, .home .station-button {
  border-color: #fffaf35c;
  background: #221a15cf;
  color: #fffaf3;
}
.home .station-button { font-size: clamp(.78rem, 3.7vw, .88rem); }
.home .station-button .icon { color: #ffd5ad; }
.home button:focus-visible { outline-color: #fffaf3; }
.eyebrow { color: var(--accent); font-size: .875rem; font-weight: 700; letter-spacing: -.015em; }

.home-wordmark {
  align-self: center;
  justify-self: center;
  width: min(100%, 25rem);
  margin-block-end: clamp(1rem, 12svh, 6.5rem);
}
.home-wordmark canvas {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 .15rem .35rem #1a100bde);
}
.home-wordmark-text:not(.sr-only) {
  display: block;
  color: #fffaf3;
  font-size: clamp(2.06rem, 8.25vw, 3.35rem);
  text-align: center;
  text-shadow: 0 .15rem .35rem #1a100bde;
}
.home-controls {
  display: grid;
  justify-self: center;
  gap: .65rem;
  width: min(100%, 25rem);
  container-type: inline-size;
}
.home-controls .stations { margin-block-start: .3rem; }
.home .locate-button {
  border-color: #fff1de;
  background: #fff1de;
  color: #2a211a;
}
.home .location-message {
  margin: 0;
  padding: .55rem .7rem;
  border-radius: .65rem;
  background: #221a15eb;
  color: #fffaf3;
}
.locate-button { width: 100%; min-height: 3.25rem; }

.station-label { margin: 1.2rem 0 .55rem; font-size: .9rem; font-weight: 700; color: var(--muted); letter-spacing: -.025em; }
.stations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }

.station-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .37rem;
  min-width: 0;
  min-height: 3rem;
  padding: .45rem .28rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--surface);
  font-size: .88rem;
  font-weight: 700;
  white-space: nowrap;
}

.station-button .icon { color: var(--accent); }
.location-message { margin: .65rem 0 0; color: var(--accent); font-size: .89rem; }

@container (max-width: 21rem) {
  .home-controls .station-button .icon { display: none; }
}

.place-photo { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.place-photo.uncropped { object-fit: contain; }
.photo-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  color: var(--accent-ink);
}
.photo-placeholder .icon { width: 2.45rem; height: 2.45rem; }
.place-photo:not([hidden]) + .photo-placeholder,
.place-photo[aria-hidden="true"] + .photo-placeholder { display: none; }

.explore { max-width: 29rem; margin-inline: auto; padding-top: .78rem; }
.explore.has-card {
  --photo-top-inset: max(.75rem, calc(env(safe-area-inset-top) + .4rem));
  --photo-bottom-inset: max(.75rem, calc(env(safe-area-inset-bottom) + .4rem));
  --photo-left-inset: max(min(var(--gutter), 1.35rem), calc(env(safe-area-inset-left) + .45rem));
  --photo-right-inset: max(min(var(--gutter), 1.35rem), calc(env(safe-area-inset-right) + .45rem));
  --photo-toolbar-height: 3.25rem;
  --photo-status-row-height: 3.25rem;
  --photo-status-center: calc(var(--photo-top-inset) + var(--photo-toolbar-height) + var(--photo-status-row-height) / 2);
  --photo-nav-height: 3rem;
  --photo-ink: #f7e8d0;
  --photo-muted-ink: #e8d2af;
  --photo-button-bg: #543b2c82;
  --photo-pill-bg: #4b332194;
  --photo-button-border: #f1d2a05c;
  position: relative;
  isolation: isolate;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  min-height: 18rem;
  overflow: hidden;
  padding-top: 0;
  background: var(--photo-backdrop);
}

.explore-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: .45rem;
  min-height: 3rem;
  margin-bottom: .65rem;
  container: explore-toolbar / inline-size;
}

.explore.has-card :is(.explore-toolbar, .card-controls) {
  position: absolute;
  z-index: 2;
  inset-inline: 0;
  padding-inline: var(--photo-left-inset) var(--photo-right-inset);
  pointer-events: none;
}

.explore.has-card .explore-toolbar {
  top: 0;
  grid-template-rows: var(--photo-toolbar-height) var(--photo-status-row-height);
  margin: 0;
  padding-top: var(--photo-top-inset);
}

.explore.has-card .explore-toolbar::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 -1.15rem;
  background: linear-gradient(to bottom, #271c15ae, #271c157d var(--photo-status-center), transparent);
}

.explore.has-card :is(.explore-toolbar, .card-controls) :is(button, .browse-tabs) { pointer-events: auto; }
.explore-toolbar .saved-shortcut, .detail-toolbar .saved-shortcut { padding-inline: .57rem; }
.explore.has-card .saved-shortcut { min-width: 4.75rem; }
.explore-shortcuts {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: start;
}

.explore.has-card .explore-shortcuts {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: stretch;
  display: grid;
  grid-template-rows: var(--photo-toolbar-height) var(--photo-status-row-height);
}

.explore.has-card :is(.browse-tabs, .location-trigger) { grid-row: 1; }

.card-hours {
  position: absolute;
  inset-block-start: calc(var(--photo-toolbar-height) + var(--photo-status-row-height) / 2);
  inset-inline-start: 50%;
  display: inline-flex;
  align-items: center;
  gap: .24rem;
  padding: .18rem .28rem;
  border: 1px solid var(--photo-button-border);
  border-radius: 999px;
  background: var(--photo-pill-bg);
  color: var(--photo-ink);
  font-size: .66rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.card-hours-dot { flex: none; width: .4rem; height: .4rem; border-radius: 50%; background: #aeb5ae; }
.card-hours[data-status="open"] .card-hours-dot { background: #76df93; }
.card-hours[data-status="closing-soon"] .card-hours-dot { background: #f9d367; }
.card-hours[data-status="closing"] .card-hours-dot { background: #ff757a; }

.browse-tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .12rem;
  background: var(--surface-raised);
}
.browse-tab {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .3rem .5rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 700;
}
.browse-tab[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.browse-tab:focus-visible { outline-offset: 1px; }

.location-trigger {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: .33rem;
  max-width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: .25rem .57rem .25rem .35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-align: left;
}

.location-pin {
  width: 1.9rem;
  height: 1.9rem;
  padding: .41rem;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
}

.location-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.location-label strong { letter-spacing: -.045em; font-size: .97rem; line-height: 1.15; }
.location-trigger .icon:last-child { color: var(--muted); font-size: .85rem; }

@container explore-toolbar (max-width: 25.5rem) {
  .location-pin { display: none; }
}

@container explore-toolbar (max-width: 20.5rem) {
  .location-trigger { padding-inline: .4rem; }
  .location-trigger .icon:last-child { display: none; }
}

.explore.has-card :is(.saved-shortcut, .browse-tabs, .location-trigger, .card-button) {
  border-color: var(--photo-button-border);
  background: var(--photo-button-bg);
  color: var(--photo-ink);
}

.explore.has-card .browse-tab, .explore.has-card .location-trigger .icon:last-child { color: var(--photo-ink); }
.explore.has-card .browse-tab[aria-pressed="true"] {
  background: #7b5339;
  box-shadow: inset 0 0 0 1px #e9c58f80;
}
.explore.has-card .location-pin { background: #e9c59428; color: var(--photo-ink); }
.explore.has-card button:focus-visible { outline-color: var(--photo-ink); }
.deck { position: absolute; inset: 0; isolation: isolate; touch-action: pinch-zoom; }

.restaurant-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  text-align: left;
  background: var(--photo-backdrop);
  cursor: grab;
  user-select: none;
  touch-action: pinch-zoom;
  transform-origin: 50% 85%;
}

.restaurant-card[data-preview] {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: auto;
  height: auto;
  visibility: hidden;
  pointer-events: none;
}

.restaurant-card[data-preview].is-revealed { visibility: visible; will-change: transform; }
.restaurant-card.is-dragging, .deck.is-moving > .restaurant-card:not([data-preview]) { will-change: transform; }
.restaurant-card.is-dragging { cursor: grabbing; }

.restaurant-card.card-text-only {
  background: linear-gradient(145deg, var(--accent-soft), var(--surface) 80%);
}

.card-preview {
  display: grid;
  place-items: center;
  min-height: 0;
  color: var(--accent);
}

.card-preview .icon { width: 2.45rem; height: 2.45rem; }
.card-media { min-height: 0; background: var(--photo-backdrop); }
.photo-gallery { position: relative; isolation: isolate; }
.photo-gallery > .place-photo { position: absolute; inset: 0; pointer-events: none; object-position: 50% 43%; }
.photo-gallery > .place-photo[aria-hidden="true"] { opacity: 0; }
.photo-gallery > .photo-placeholder { position: absolute; inset: 0; pointer-events: none; }
.photo-position {
  position: absolute;
  z-index: 2;
  inset: .82rem auto auto 50%;
  display: flex;
  align-items: center;
  gap: .28rem;
  padding: .34rem .52rem;
  border: 1px solid #ffffff30;
  border-radius: 1rem;
  background: #181b16b5;
  pointer-events: none;
  transform: translateX(-50%);
}

.restaurant-card .photo-position {
  top: var(--photo-status-center);
  border-color: var(--photo-button-border);
  background: var(--photo-pill-bg);
  transform: translate(-50%, -50%);
}

.photo-dot { width: .31rem; height: .25rem; border-radius: 1rem; background: #fcfbf382; }
.photo-dot.is-current { width: .93rem; background: #fcfbf3; }
.photo-kind { padding-inline: .12rem; color: #fcfbf3; font-size: .73rem; line-height: 1.15; white-space: nowrap; }
.restaurant-card .photo-dot { background: #f7e8d075; }
.restaurant-card .photo-dot.is-current { background: var(--photo-ink); }
.restaurant-card .photo-kind {
  position: absolute;
  top: calc(100% + .25rem);
  left: 50%;
  padding: .16rem .38rem;
  border: 1px solid var(--photo-button-border);
  border-radius: 999px;
  background: var(--photo-pill-bg);
  color: var(--photo-ink);
  transform: translateX(-50%);
}
.photo-edge {
  position: absolute;
  z-index: 2;
  inset-block: 0;
  width: 34%;
  border: 0;
  padding: 0;
  background: transparent;
}

.photo-left { left: 0; }
.photo-right { right: 0; }
.photo-edge:focus-visible { outline-color: #fcfbf3; outline-offset: -4px; }
.photo-credit { color: var(--muted); font-size: .78rem; line-height: 1.45; }

.card-caption {
  --caption-fade: 2.4rem;
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  padding-block: var(--caption-fade) calc(var(--photo-nav-height) + var(--photo-bottom-inset) + .72rem);
  padding-inline: max(1.15rem, var(--photo-left-inset)) max(1.15rem, var(--photo-right-inset));
  background: linear-gradient(to bottom, transparent, #2c1e15ad var(--caption-fade), #281b13e0);
  color: var(--photo-ink);
  pointer-events: none;
}

.card-caption h1 { font-size: clamp(1.55rem, 6.9vw, 2.18rem); line-height: 1.12; text-wrap: balance; }
.card-distance { display: flex; align-items: center; gap: .26rem; margin-top: .45rem; color: var(--photo-muted-ink); font-size: .86rem; font-variant-numeric: tabular-nums; }
.card-distance .icon { width: .95rem; height: .95rem; }
.card-menu { display: flex; flex-wrap: wrap; align-items: baseline; gap: .14rem .48rem; margin-top: .55rem; line-height: 1.32; }
.card-menu-label { color: var(--photo-muted-ink); font-size: .73rem; white-space: nowrap; }
.card-menu-name { min-width: 0; font-size: .98rem; font-weight: 700; }
.card-text-only .card-caption {
  background: linear-gradient(to top, #2a1e139e, transparent calc(var(--photo-nav-height) + var(--photo-bottom-inset) + .4rem));
  color: var(--ink);
}
.card-text-only :is(.card-distance, .card-menu-label) { color: var(--muted); }

.card-controls {
  bottom: 0;
  display: grid;
  grid-template-columns: 2.85rem minmax(0, 10.65rem) 2.85rem;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: calc(var(--photo-nav-height) + var(--photo-bottom-inset));
  padding-bottom: var(--photo-bottom-inset);
}

.card-button {
  width: 2.85rem;
  min-height: 2.85rem;
  padding: 0;
  border-radius: 50%;
  font-size: 1.07rem;
}

.explore.has-card .card-button:disabled { color: #f7e8d076; }
.gesture-hint { color: var(--photo-ink); text-align: center; font-size: .8rem; text-shadow: 0 1px .35rem #281b13; }

.result-panel {
  display: grid;
  justify-items: center;
  gap: .8rem;
  padding: clamp(2rem, 7vw, 3.4rem) 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.45rem;
  text-align: center;
}

.result-panel h1, .result-panel h2 { font-size: clamp(1.65rem, 5vw, 2.3rem); }
.result-panel p { max-width: 23rem; color: var(--muted); font-size: .94rem; }

.result-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.57rem;
  margin-bottom: .3rem;
}

.result-actions { display: grid; width: min(100%, 17.5rem); gap: .55rem; margin-top: .55rem; }

.detail { max-width: 58rem; margin-inline: auto; padding-block: 1.45rem 0; }
.detail.detail-text-only { max-width: 35rem; }
.detail-text-only .detail-grid { grid-template: "content" auto / minmax(0, 1fr); }
.back-button { border-radius: 2rem; background: transparent; font-size: .91rem; }
.detail-toolbar {
  position: sticky;
  z-index: 5;
  top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  padding-block: .22rem;
  background: var(--paper);
}
.detail-toolbar .back-button { flex: none; min-width: 3.75rem; }
.detail-grid { display: grid; grid-template: "content photo" auto / 1fr 1fr; align-items: start; gap: clamp(1.65rem, 5vw, 4.1rem); margin-top: 1rem; }
.detail-figure { grid-area: photo; min-width: 0; }
.detail-photo { height: clamp(23rem, 56svh, 33rem); overflow: hidden; background: var(--photo-backdrop); border: 1px solid var(--line); border-radius: 1.35rem; }
.detail-figure figcaption { display: grid; gap: .15rem; margin-top: .43rem; color: var(--dim); }
.detail-photo-source { margin-top: .55rem; color: var(--muted); font-size: .86rem; }
.detail-content { grid-area: content; min-width: 0; padding-block: .35rem 0; }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-block-start: .9rem; }
.detail-heading h1, .saved-heading h1 { margin-block: .32rem 0; font-size: clamp(2rem, 4.25vw, 3.2rem); }
.source-link { text-decoration: underline; text-decoration-color: #899281; text-underline-offset: .2em; }
.naver-review { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .25rem .65rem; margin-top: .75rem; color: var(--muted); font-size: .88rem; }
.naver-review strong { color: var(--accent); font-variant-numeric: tabular-nums; }
.detail-description { margin-top: .85rem; color: var(--muted); }
.icon-button { flex: none; width: 2.85rem; min-height: 2.85rem; padding: 0; }
.save-toggle {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid #ffffff70;
  border-radius: 50%;
  padding: 0;
  color: var(--accent-ink);
  background: #1e211bd4;
}
.save-toggle .icon { width: 1.36rem; height: 1.36rem; }
.save-toggle[aria-pressed="true"] { color: #ff788a; border-color: #ff96a496; }
.save-toggle[aria-pressed="true"] .icon { fill: currentColor; }
.photo-save { position: absolute; z-index: 3; top: .75rem; right: .75rem; }
.restaurant-card .photo-save {
  top: var(--photo-status-center);
  right: var(--photo-right-inset);
  background: var(--photo-pill-bg);
  transform: translateY(-50%);
}
.restaurant-card .photo-save[aria-pressed="false"] { color: var(--photo-ink); border-color: var(--photo-button-border); }
.photo-save:focus-visible { outline-color: #fffaf1; }

.menu-box {
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 1.08rem;
  background: var(--surface);
  padding: .85rem .95rem .82rem;
  margin-top: 1.15rem;
  box-shadow: 0 .45rem 1.45rem #23281d10;
}

.menu-box h2 { margin: .15rem .24rem .66rem; font-size: 1.23rem; }
.menu-list { list-style: none; padding: 0; }
.menu-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: .75rem;
  padding: .68rem .5rem;
  font-size: .92rem;
}

.menu-row + .menu-row { border-top: 1px solid var(--line); }
.menu-row.featured { border-radius: .65rem; background: var(--accent-soft); }
.menu-row.featured + .menu-row { border-top-color: transparent; }
.menu-item-name { min-width: 0; font-weight: 650; }
.menu-badge {
  display: inline-block;
  margin-inline-end: .4rem;
  padding: .15rem .33rem;
  border-radius: .32rem;
  color: var(--accent-dark);
  background: var(--surface);
  font-size: .69rem;
  font-weight: 800;
  vertical-align: .08em;
  white-space: nowrap;
}

.menu-item-price {
  max-inline-size: 9rem;
  color: var(--ink);
  text-align: end;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.featured .menu-item-price { color: var(--accent); font-size: 1.03rem; }
.menu-more { border-top: 1px solid var(--line); }
.menu-more summary {
  min-height: 2.75rem;
  padding: .66rem .5rem;
  color: var(--accent);
  cursor: pointer;
  font-size: .89rem;
  font-weight: 750;
}

.menu-more summary span { margin-inline-start: .16rem; font-size: .8rem; }
.menu-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; padding: .62rem .5rem 0; border-top: 1px dashed var(--line); color: var(--muted); font-size: .83rem; }
.menu-links a { display: inline-flex; align-items: center; min-height: 2rem; }
.pairing { margin: .4rem .5rem .7rem; color: var(--muted); font-size: .875rem; }
.detail-facts { margin-block: .9rem 1rem; }
.detail-facts > div { display: grid; grid-template-columns: 5.1rem 1fr; gap: .4rem; padding: .73rem 0; border-bottom: 1px solid var(--line); }
.detail-facts dt { color: var(--muted); font-size: .89rem; line-height: 1.5; }
.detail-facts dd { font-size: .94rem; line-height: 1.5; overflow-wrap: anywhere; }
.hours-line { display: block; color: var(--muted); font-size: .87rem; }
.hours-status.open { color: #32613e; }
.hours-status.closed { color: var(--accent-dark); }
.map-links { display: flex; flex-wrap: wrap; gap: .55rem; }
.map-button { flex: 1 1 8rem; min-height: 3rem; white-space: nowrap; }
.map-button.naver { color: #315a3e; }
.map-button .icon { width: 1rem; height: 1rem; }

.saved { max-width: 43rem; margin-inline: auto; padding-top: 1.45rem; }
.saved-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-block: 1rem 1.25rem; }
.saved-heading h1 { margin-right: auto; }
.saved-heading p { color: var(--accent); white-space: nowrap; }
.share-list-button { gap: .4rem; padding-inline: .75rem; border-radius: 2rem; font-size: .88rem; white-space: nowrap; }
.saved-list {
  position: relative;
  display: flex;
  gap: .8rem;
  padding: .25rem .25rem .75rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: .25rem;
  scrollbar-width: none;
  list-style: none;
}
.saved-list::-webkit-scrollbar { display: none; }
.saved-item { position: relative; flex: 0 0 min(70%, 13.5rem); min-width: 0; scroll-snap-align: start; }

.saved-open {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  padding: .88rem;
  border: 1px solid #22241f30;
  border-radius: 1.15rem;
  background: var(--photo-backdrop);
  color: var(--accent-ink);
  box-shadow: 0 .62rem 1.2rem -.72rem #23251b80;
  text-align: left;
}
.saved-open::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 36% 0 0;
  background: linear-gradient(to top, #171914f2, #17191491 48%, transparent);
  pointer-events: none;
}
.saved-open:focus-visible { outline-color: var(--accent-ink); outline-offset: -4px; }

.saved-thumb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  pointer-events: none;
}
.saved-name { position: relative; z-index: 2; font-size: 1.1rem; line-height: 1.22; letter-spacing: -.04em; overflow-wrap: anywhere; }
.remove-button {
  position: absolute;
  z-index: 3;
  top: .45rem;
  right: .45rem;
  width: 2.75rem;
  padding: 0;
  border-color: #ffffff55;
  border-radius: 50%;
  background: #1b1e18ad;
  color: var(--accent-ink);
}
.remove-button:focus-visible { outline-color: var(--accent-ink); outline-offset: 2px; }
.saved-controls { display: flex; justify-content: flex-end; gap: .45rem; margin-top: .55rem; }
.saved-arrow { width: 2.75rem; padding: 0; border-radius: 50%; }
.saved-empty .button { margin-top: .55rem; }

.location-dialog, .share-dialog {
  position: fixed;
  inset: 0;
  width: min(27rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: var(--surface);
  color: var(--ink);
}

.location-dialog::backdrop, .share-dialog::backdrop { background: #20231da0; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.dialog-heading h2 { font-size: 1.4rem; }
.location-dialog .locate-button { margin-top: .95rem; }
.share-dialog .close-share { font-size: 1.35rem; }
.share-dialog p { margin-top: .58rem; color: var(--muted); font-size: .9rem; }
.share-content {
  display: block;
  width: 100%;
  margin-top: .65rem;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: .9rem;
  line-height: 1.5;
  resize: vertical;
  overflow-wrap: anywhere;
}
.share-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .72rem; }
.share-actions .button { flex: 1 1 8rem; }
.share-dialog #share-status { min-height: 1.4em; }

@media (hover: hover) {
  .button:not(:disabled):hover, .station-button:hover { background: var(--surface-raised); border-color: #c7ccbf; }
  .button.primary:not(:disabled):hover { background: var(--accent-dark); border-color: var(--accent-dark); }
  .home .saved-shortcut:not(:disabled):hover, .home .station-button:hover { background: #3b2b21; border-color: #fffaf380; }
  .home .locate-button:not(:disabled):hover { background: #ffdfb7; border-color: #ffdfb7; }
  .save-toggle:hover { background: #1e211bf5; }
  .location-trigger:hover strong { color: var(--accent); }
  .explore.has-card :is(.saved-shortcut, .location-trigger, .card-button):not(:disabled):hover {
    background: #66472fbf;
    border-color: #f1d2a099;
  }
  .explore.has-card .location-trigger:hover strong { color: var(--photo-ink); }
  .restaurant-card .photo-save:hover { background: #66472fbf; }
  .saved-open:hover .saved-name { text-decoration: underline; text-underline-offset: .18em; }
  .remove-button:not(:disabled):hover { background: #1b1e18; border-color: #ffffff70; }
}

@media (max-width: 48rem), (orientation: portrait) and (max-width: 64rem) {
  :root { --gutter: clamp(.85rem, 3.8vw, 1.35rem); }
  .station-label { margin-top: .8rem; }
  .detail { max-width: 31rem; padding-top: 1rem; }
  .detail-grid { grid-template: "photo" auto "content" auto / minmax(0, 1fr); gap: 1rem; }
  .detail-photo { height: clamp(12rem, 30svh, 18rem); }
  .detail-photo img { object-position: 50% 46%; }
  .saved { padding-top: 1rem; }
}

@media (min-width: 36rem) and (min-height: 44rem) {
  .home-main { align-items: center; padding: 1rem var(--gutter); }
  .home, .explore.has-card {
    width: min(100%, 26rem, calc((100vh - 2rem) * 9 / 19.5));
    width: min(100%, 26rem, calc((100dvh - 2rem) * 9 / 19.5));
  }
  .home {
    min-height: 0;
    aspect-ratio: 9 / 19.5;
    border-radius: 1.6rem;
    box-shadow: 0 .9rem 2.35rem #23281d18;
  }
  .explore.has-card {
    --portrait-max-height: calc(26rem * 19.5 / 9);
    height: min(calc(100vh - 2rem), var(--portrait-max-height));
    height: min(calc(100dvh - 2rem), var(--portrait-max-height));
    margin-block: max(1rem, calc((100vh - var(--portrait-max-height)) / 2));
    margin-block: max(1rem, calc((100dvh - var(--portrait-max-height)) / 2));
    border-radius: 1.6rem;
  }
}

@media (max-width: 23rem) {
  .station-button .icon { display: none; }
}

::view-transition { pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  :is(.button, .station-button, .browse-tab, .location-trigger, .save-toggle, .saved-open) {
    transition: background-color 145ms var(--motion-out), border-color 145ms var(--motion-out),
      color 145ms var(--motion-out), scale 160ms var(--motion-out);
  }

  :is(.button, .station-button, .browse-tab, .location-trigger, .save-toggle, .saved-open):active:not(:disabled) {
    scale: .97;
    transition-duration: 70ms;
  }

  .photo-dot { transition: width 150ms var(--motion-out), background-color 150ms var(--motion-out); }

  :root[data-screen-motion="detail-in"], .screen-detail-in { --panel-enter: .95rem; --panel-exit: -.7rem; }
  :root[data-screen-motion="detail-out"], .screen-detail-out { --panel-enter: -.55rem; --panel-exit: .8rem; }
  :is(.screen-detail-in, .screen-detail-out) {
    --panel-opacity: .78;
    animation: panel-enter 200ms var(--motion-out);
  }

  :root[data-screen-motion]::view-transition-group(root) { animation-duration: 220ms; }
  :root[data-screen-motion]::view-transition-new(root) {
    animation: panel-enter 220ms var(--motion-out) both;
    mix-blend-mode: plus-lighter;
  }
  :root[data-screen-motion]::view-transition-old(root) {
    animation: panel-exit 220ms var(--motion-out) both;
    mix-blend-mode: plus-lighter;
  }

  :is(.location-dialog, .share-dialog)[open] {
    --panel-enter: .55rem;
    animation: panel-enter 180ms var(--motion-out);
  }
  .menu-more[open] > .menu-list {
    --panel-enter: .28rem;
    --panel-opacity: .5;
    animation: panel-enter 170ms var(--motion-out);
  }
}

@keyframes panel-enter {
  from { transform: translate3d(0, var(--panel-enter), 0); opacity: var(--panel-opacity, 0); }
  to { transform: translate3d(0, 0, 0); opacity: 1; }
}

@keyframes panel-exit {
  from { transform: translate3d(0, 0, 0); opacity: 1; }
  to { transform: translate3d(0, var(--panel-exit), 0); opacity: 0; }
}
