:root {
  --ink: #171512;
  --muted: #6f675c;
  --paper: #f8f7f1;
  --wash: #eaf0e8;
  --line: #d3d8ca;
  --dark: #241e18;
  --green: #1f6f52;
  --green-dark: #164c39;
  --blue: #24556f;
  --clay: #a44934;
  --amber: #c77818;
  --red: #9f3b2d;
  --white: #fffef9;
  --shadow: 0 24px 60px rgba(42, 31, 18, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(31, 111, 82, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(31, 111, 82, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 44px 44px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 3vw, 34px);
  border-bottom: 1px solid rgba(36, 30, 24, 0.12);
  background: rgba(251, 248, 241, 0.9);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--dark);
  border-radius: 50%;
  background: var(--dark);
  color: var(--paper);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

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

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-actions a {
  min-width: 74px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.nav-actions a:hover {
  border-color: var(--line);
  color: var(--ink);
  background: var(--white);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
  gap: clamp(18px, 2.6vw, 34px);
  align-items: start;
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px);
}

.planner {
  min-width: 0;
}

.map-landing {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(300px, 0.66fr);
  gap: 16px;
  min-height: 540px;
  margin-bottom: 20px;
}

.map-stack {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.map-filter-row {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.map-filter {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(36, 30, 24, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.92);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.map-filter strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #edf3ec;
  color: var(--green-dark);
  font-size: 12px;
}

.map-filter:hover,
.map-filter.active {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

.map-filter:hover strong,
.map-filter.active strong {
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
}

.map-shell {
  position: relative;
  min-width: 0;
  height: clamp(540px, 64vh, 640px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(36, 30, 24, 0.18);
  border-radius: var(--radius);
  background: #dce5d8;
  box-shadow: var(--shadow);
}

.map-canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  isolation: isolate;
}

.map-overlay {
  position: absolute;
  top: 16px;
  right: auto;
  bottom: auto;
  left: 16px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(460px, calc(100% - 32px));
  padding: 10px;
  border: 1px solid rgba(36, 30, 24, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.92);
  box-shadow: 0 14px 36px rgba(36, 30, 24, 0.14);
  backdrop-filter: blur(16px);
}

.map-control {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  background: var(--green);
  color: var(--white);
  font-size: 14px;
  font-weight: 850;
}

.map-control:hover {
  background: var(--green-dark);
}

.map-control:disabled {
  cursor: progress;
  opacity: 0.66;
}

#mapStatus {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.map-side {
  display: grid;
  align-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid rgba(36, 30, 24, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.94);
  box-shadow: 0 16px 38px rgba(42, 31, 18, 0.09);
}

.map-side h1 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(32px, 3.4vw, 52px);
  line-height: 0.96;
}

.map-side p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.map-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.map-stats span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(36, 30, 24, 0.1);
  border-radius: 6px;
  background: #f4f5ec;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.map-stats strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.map-selected {
  min-width: 0;
}

.map-selected-card {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(31, 111, 82, 0.3);
  border-radius: var(--radius);
  background: rgba(31, 111, 82, 0.08);
  color: var(--ink);
  text-align: left;
}

.map-selected-card:hover {
  border-color: var(--green);
  background: rgba(31, 111, 82, 0.12);
}

.map-selected-kicker {
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-selected-title strong,
.map-selected-title small {
  display: block;
}

.map-selected-title strong {
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.1;
}

.map-selected-title small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.map-selected-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.map-selected-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--white);
  color: var(--blue);
  font-size: 12px;
  font-weight: 850;
}

.map-selected-note {
  color: var(--green-dark);
  font-size: 13px;
  line-height: 1.45;
}

.map-pin-icon,
.user-pin-icon {
  background: transparent;
  border: 0;
}

.map-pin {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--dark);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(36, 30, 24, 0.24);
  font-size: 13px;
  font-weight: 950;
  transition:
    background 160ms ease,
    transform 160ms ease,
    width 160ms ease,
    height 160ms ease;
}

.map-pin.active {
  width: 46px;
  height: 46px;
  background: var(--green);
  transform: translate(-4px, -4px);
}

.user-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 32px;
  padding: 0 10px;
  border: 2px solid var(--white);
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(36, 30, 24, 0.24);
  font-size: 12px;
  font-weight: 950;
}

.map-tooltip {
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  box-shadow: none;
}

.map-tooltip::before {
  display: none;
}

.map-tooltip-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  width: 210px;
  padding: 8px;
  border: 1px solid rgba(36, 30, 24, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.96);
  box-shadow: 0 16px 34px rgba(36, 30, 24, 0.2);
}

.map-tooltip-card img {
  width: 54px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
}

.map-tooltip-card span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.map-tooltip-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-tooltip-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.map-fallback {
  display: grid;
  height: 100%;
  min-height: 0;
  place-content: center;
  gap: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.map-fallback strong {
  color: var(--ink);
  font-size: 22px;
}

.leaflet-container {
  position: relative;
  overflow: hidden;
  background: #dce5d8;
  font: inherit;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  top: 0;
  left: 0;
}

.leaflet-tile-pane {
  z-index: 200;
}

.leaflet-overlay-pane {
  z-index: 400;
}

.leaflet-shadow-pane {
  z-index: 500;
}

.leaflet-marker-pane {
  z-index: 600;
}

.leaflet-tooltip-pane {
  z-index: 650;
}

.leaflet-popup-pane {
  z-index: 700;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  user-select: none;
  -webkit-user-drag: none;
}

.leaflet-tile {
  visibility: hidden;
}

.leaflet-tile-loaded {
  visibility: inherit;
}

.leaflet-zoom-animated {
  transform-origin: 0 0;
}

.leaflet-interactive {
  cursor: pointer;
}

.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.leaflet-top {
  top: 0;
}

.leaflet-right {
  right: 0;
}

.leaflet-bottom {
  bottom: 0;
}

.leaflet-left {
  left: 0;
}

.leaflet-control {
  position: relative;
  z-index: 1000;
  pointer-events: auto;
}

.leaflet-right .leaflet-control {
  margin-right: 12px;
}

.leaflet-top .leaflet-control {
  margin-top: 12px;
}

.leaflet-bottom .leaflet-control {
  margin-bottom: 12px;
}

.leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(36, 30, 24, 0.16);
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 10px 22px rgba(36, 30, 24, 0.16);
}

.leaflet-control-zoom a {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.leaflet-control-zoom a:last-child {
  border-bottom: 0;
}

.leaflet-control-attribution {
  max-width: min(420px, calc(100vw - 40px));
  padding: 3px 6px;
  background: rgba(255, 254, 249, 0.86);
  color: var(--muted);
  font-size: 10px;
}

.leaflet-control-attribution a {
  color: var(--blue);
}

.intro-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 22px;
  align-items: stretch;
  min-height: 310px;
  border: 1px solid rgba(36, 30, 24, 0.14);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark);
  box-shadow: var(--shadow);
}

.intro-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 4vw, 54px);
  color: var(--paper);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-copy h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 4vw, 60px);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(251, 248, 241, 0.78);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.55;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.trust-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(251, 248, 241, 0.9);
  font-size: 13px;
  font-weight: 850;
}

.photo-mosaic {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  min-height: 310px;
  padding: 8px;
}

.photo-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  filter: saturate(0.9) contrast(1.08);
}

.photo-mosaic img:first-child {
  grid-row: 1 / 3;
}

.meal-flow {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(36, 30, 24, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.88);
}

.meal-flow h2 {
  max-width: 360px;
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}

.meal-flow ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.meal-flow li {
  min-width: 0;
  padding: 14px;
  border-left: 3px solid var(--green);
  background: #f8fbf4;
}

.meal-flow li:nth-child(2) {
  border-color: var(--blue);
}

.meal-flow li:nth-child(3) {
  border-color: var(--amber);
}

.meal-flow li:nth-child(4) {
  border-color: var(--clay);
}

.meal-flow span,
.proof-label {
  display: block;
  color: var(--amber);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meal-flow strong {
  display: block;
  margin-top: 12px;
  font-size: 18px;
}

.meal-flow p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.controls {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.84);
}

.segmented,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segment,
.chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.segment {
  min-width: 112px;
  padding: 0 18px;
}

.chip {
  padding: 0 14px;
}

.segment:hover,
.chip:hover,
.segment.active,
.chip.active {
  border-color: var(--green);
  background: var(--green);
  color: var(--white);
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.route-card {
  min-height: 176px;
  padding: 22px;
  border-radius: var(--radius);
  color: var(--white);
  background: var(--dark);
  overflow: hidden;
  position: relative;
}

.route-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(120deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18)),
    var(--route-image);
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.route-card > * {
  position: relative;
  z-index: 1;
}

.gangnam-route {
  --route-image: url("assets/garosugil.jpg");
}

.myeongdong-route {
  --route-image: url("assets/myeongdong.jpg");
}

.jongno-route {
  --route-image: url("assets/ikseon-dong.jpg");
}

.market-route {
  --route-image: url("assets/noryangjin-market.jpg");
}

.route-card span {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
  font-weight: 800;
}

.route-card h2 {
  max-width: 520px;
  margin: 38px 0 8px;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.08;
}

.route-card p {
  max-width: 480px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.45;
}

.restaurant-section,
.phrase-section,
.etiquette-section,
.sources-section {
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 34px);
}

.restaurant-section {
  padding-inline: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin: 28px 0 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.02;
}

.muted {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

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

.restaurant-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  min-height: 190px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.92);
  color: var(--ink);
  text-align: left;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.restaurant-card:hover,
.restaurant-card.active {
  border-color: rgba(31, 111, 82, 0.56);
  box-shadow: 0 18px 36px rgba(36, 30, 24, 0.11);
  transform: translateY(-2px);
}

.restaurant-thumb {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--wash);
}

.restaurant-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.year-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 254, 249, 0.92);
  color: var(--dark);
  font-size: 12px;
  font-weight: 900;
}

.restaurant-body {
  display: grid;
  gap: 9px;
  align-content: start;
  min-width: 0;
  padding: 2px 2px 4px 0;
}

.restaurant-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.restaurant-title h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.restaurant-title small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.score {
  min-width: 60px;
  align-self: start;
  padding: 6px 8px;
  border: 1px solid rgba(199, 120, 24, 0.42);
  border-radius: 999px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf3ec;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.restaurant-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.photo-credit {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.local-tip {
  padding: 9px 10px;
  border-left: 3px solid var(--green);
  background: rgba(31, 111, 82, 0.08);
  color: var(--green-dark);
  font-size: 13px;
  line-height: 1.4;
}

.restaurant-proof {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid rgba(36, 30, 24, 0.1);
  border-radius: 6px;
  background: #fffdf5;
}

.proof-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.proof-list span {
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(36, 85, 111, 0.09);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.deep-dive {
  margin-top: 20px;
  border: 1px solid rgba(36, 30, 24, 0.16);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 254, 249, 0.92);
  box-shadow: 0 16px 42px rgba(42, 31, 18, 0.1);
  scroll-margin-top: 92px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(0, 1.14fr);
  min-height: 360px;
  background: var(--dark);
  color: var(--paper);
}

.detail-photo {
  min-height: 360px;
  overflow: hidden;
}

.detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-summary {
  display: grid;
  align-content: center;
  gap: 18px;
  min-width: 0;
  padding: clamp(24px, 4vw, 44px);
}

.detail-summary h2 {
  margin: 0;
  font-size: clamp(31px, 3.6vw, 50px);
  line-height: 0.98;
}

.detail-summary h2 span {
  display: block;
  margin-top: 8px;
  color: rgba(251, 248, 241, 0.68);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
}

.detail-summary p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: rgba(251, 248, 241, 0.78);
  font-size: 16px;
  line-height: 1.62;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.share-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  color: var(--paper);
  font-size: 13px;
  font-weight: 850;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.detail-actions span,
.detail-actions a {
  color: rgba(251, 248, 241, 0.68);
  font-size: 12px;
  font-weight: 800;
}

.detail-actions a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.detail-meta span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(251, 248, 241, 0.8);
  font-size: 12px;
  line-height: 1.35;
}

.detail-meta strong {
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(36, 30, 24, 0.12);
}

.detail-panel {
  min-width: 0;
  padding: clamp(18px, 3vw, 26px);
  background: rgba(255, 254, 249, 0.96);
}

.detail-panel-wide {
  grid-column: 1 / -1;
}

.detail-panel h3 {
  margin: 0;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.08;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  min-width: 0;
  padding: 12px;
  border-left: 3px solid var(--green);
  background: #f3f6ed;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.detail-list li:nth-child(2) {
  border-color: var(--blue);
  color: var(--blue);
}

.detail-list li:nth-child(3) {
  border-color: var(--amber);
  color: #80500f;
}

.detail-steps {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.detail-steps p {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.detail-steps strong {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.practical-grid,
.expect-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.practical-grid span,
.expect-grid span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(36, 30, 24, 0.1);
  border-radius: 6px;
  background: #f8fbf4;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.practical-grid strong,
.expect-grid strong {
  color: var(--green-dark);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.menu-depth-grid {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.menu-depth-card {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
}

.menu-depth-card:hover {
  border-color: var(--green);
  background: #f5f8ef;
}

.menu-depth-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.menu-depth-card strong {
  word-break: keep-all;
  font-size: 22px;
  line-height: 1.1;
}

.menu-depth-card em {
  color: var(--blue);
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
}

.menu-depth-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.menu-depth-card b {
  color: var(--amber);
  font-size: 12px;
}

.specific-phrase-grid {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.specific-phrase-card {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff9e8;
  color: var(--ink);
  text-align: left;
}

.specific-phrase-card:hover {
  border-color: var(--amber);
  background: #fff3cf;
}

.specific-phrase-card strong {
  word-break: keep-all;
  font-size: 20px;
  line-height: 1.2;
}

.specific-phrase-card span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

.specific-phrase-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.phrase-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.phrase-strip span {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 2px solid rgba(36, 30, 24, 0.12);
  border-radius: 6px;
  background: #fff9e8;
  color: var(--dark);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.phrase-strip strong {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.order-panel {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  border: 1px solid rgba(36, 30, 24, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.94);
  box-shadow: var(--shadow);
  scrollbar-gutter: stable;
}

.panel-top h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
}

.selected-place {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--wash);
}

.selected-place img {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
}

.selected-place strong,
.selected-place span {
  display: block;
}

.selected-place strong {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.selected-place span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.selected-brief {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(36, 30, 24, 0.1);
  border-radius: var(--radius);
  background: #fffdf5;
}

.selected-brief p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

.fact-grid span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border-radius: 6px;
  background: rgba(31, 111, 82, 0.08);
  color: var(--green-dark);
  font-size: 12px;
  line-height: 1.35;
}

.fact-grid strong {
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}

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

.stepper {
  display: grid;
  grid-template-columns: 42px minmax(40px, 1fr) 42px;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
}

.stepper button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.stepper button:hover {
  background: var(--wash);
}

.stepper strong {
  text-align: center;
}

.script-modes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.mode-button {
  min-width: 0;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.mode-button:hover,
.mode-button.active {
  border-color: var(--dark);
  background: var(--dark);
  color: var(--white);
}

.script-brief {
  padding: 10px 12px;
  border-left: 3px solid var(--blue);
  background: rgba(36, 85, 111, 0.08);
  color: var(--blue);
  font-size: 13px;
  line-height: 1.42;
}

.korean-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 2px solid var(--dark);
  border-radius: var(--radius);
  background: #fff9e8;
}

.korean-card .label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.korean-card .korean-lines {
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: anywhere;
  color: var(--dark);
  font-size: clamp(23px, 2.8vw, 31px);
  font-weight: 900;
  line-height: 1.25;
}

.korean-card .english-lines {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.korean-card .cue-lines {
  padding-top: 10px;
  border-top: 1px solid rgba(36, 30, 24, 0.16);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.panel-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 10px;
}

.primary-btn,
.icon-btn,
.phrase-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: var(--radius);
  font-weight: 850;
}

.primary-btn {
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--white);
}

.primary-btn:hover {
  background: var(--green-dark);
}

.icon-btn,
.phrase-card button {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
}

.icon-btn:hover,
.phrase-card button:hover {
  border-color: var(--green);
}

.tip-box {
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(31, 111, 82, 0.08);
  color: var(--green-dark);
  font-size: 14px;
  line-height: 1.45;
}

.phrase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.phrase-card {
  display: grid;
  gap: 10px;
  min-height: 220px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 254, 249, 0.92);
}

.phrase-card h3 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.phrase-korean {
  word-break: keep-all;
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
}

.romanization {
  color: var(--amber);
  font-weight: 800;
}

.phrase-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.etiquette-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.etiquette-grid article {
  padding: 18px;
  border-top: 2px solid var(--dark);
  background: rgba(255, 254, 249, 0.62);
}

.etiquette-grid span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

.etiquette-grid h3 {
  margin: 22px 0 8px;
  font-size: 19px;
}

.etiquette-grid p,
.sources-section li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.sources-section {
  padding-bottom: 60px;
}

.sources-section ul {
  margin: 0;
  padding-left: 20px;
}

.sources-section li + li {
  margin-top: 8px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--dark);
  color: var(--white);
  font-weight: 850;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.lucide {
  width: 18px;
  height: 18px;
  stroke-width: 2.25;
}

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

  .map-landing {
    grid-template-columns: 1fr;
  }

  .map-side {
    align-content: start;
  }

  .order-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .restaurant-list,
  .phrase-grid,
  .etiquette-grid,
  .meal-flow ol,
  .detail-list,
  .phrase-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meal-flow {
    grid-template-columns: 1fr;
  }

  .detail-hero,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-panel-wide {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    width: 100%;
  }

  .nav-actions a {
    flex: 1;
  }

  .workspace,
  .phrase-section,
  .etiquette-section,
  .sources-section {
    padding: 14px;
  }

  .map-landing {
    min-height: 0;
  }

  .map-shell {
    height: 420px;
  }

  .map-side h1 {
    font-size: 34px;
  }

  .map-stats,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .intro-shell {
    grid-template-columns: 1fr;
  }

  .photo-mosaic {
    min-height: 230px;
  }

  .route-grid,
  .restaurant-list,
  .phrase-grid,
  .etiquette-grid,
  .meal-flow ol,
  .detail-list,
  .phrase-strip {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .restaurant-card {
    grid-template-columns: 96px minmax(0, 1fr);
    min-height: 0;
  }

  .restaurant-thumb {
    min-height: 168px;
  }

  .detail-hero,
  .detail-photo {
    min-height: 300px;
  }

  .restaurant-title {
    flex-direction: column;
    gap: 6px;
  }

  .score {
    width: fit-content;
  }
}

@media (max-width: 460px) {
  .brand small {
    display: none;
  }

  .intro-copy {
    padding: 24px;
  }

  .segment {
    flex: 1 1 96px;
    min-width: 0;
  }

  .chip {
    flex: 1 1 auto;
  }

  .map-overlay {
    align-items: stretch;
    flex-direction: column;
  }

  .map-control {
    width: 100%;
  }

  .restaurant-card {
    grid-template-columns: 1fr;
  }

  .restaurant-thumb {
    min-height: 190px;
  }

  .stepper-grid,
  .panel-actions,
  .fact-grid,
  .practical-grid,
  .expect-grid {
    grid-template-columns: 1fr;
  }

  .panel-actions .icon-btn {
    width: 100%;
  }
}
