:root {
  --bg: #f4efe6;
  --surface: rgba(255, 251, 245, 0.92);
  --surface-strong: #fffdf8;
  --line: rgba(88, 71, 53, 0.14);
  --text: #1f1a17;
  --muted: #6d5d4d;
  --accent: #d46a3a;
  --accent-strong: #af4b1f;
  --accent-soft: rgba(212, 106, 58, 0.12);
  --success: #20735f;
  --shadow: 0 24px 50px rgba(74, 45, 22, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Noto Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(212, 106, 58, 0.24), transparent 32%),
    radial-gradient(circle at bottom right, rgba(32, 115, 95, 0.18), transparent 28%),
    linear-gradient(160deg, #f7f0e7 0%, #efe2d2 52%, #f9f5ef 100%);
}

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

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.site-banner {
  width: 100%;
  display: block;
  margin-bottom: 12px;
  border-radius: 30px;
  overflow: hidden;
}

.hero {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-top,
.hero-actions,
.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.hero-copy {
  max-width: 620px;
  display: grid;
  gap: 12px;
}

.hero-copy h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-copy h3 {
  font-size: clamp(1.5rem, 3.2vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.search-hero-title {
  letter-spacing: 0;
  white-space: normal;
}

.hero-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-signal {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(88, 71, 53, 0.12);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

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

.grid {
  margin-top: 24px;
  display: grid;
  gap: 20px;
}

.search-card,
.example-card,
.results-panel,
.tracking-panel,
.tracking-card,
.empty-state,
.modal-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-card,
.tracking-panel,
.example-card,
.modal-card {
  padding: 20px;
}

.search-form {
  display: grid;
  gap: 14px;
}

.search-form-intro,
.picker-group {
  display: grid;
  gap: 10px;
}

.search-form-intro {
  margin-bottom: 18px;
}

.search-stage-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(88, 71, 53, 0.1);
}

.search-stage-card-form {
  background: rgba(255, 255, 255, 0.84);
}

.search-stage-header {
  display: grid;
  gap: 6px;
}

.search-stage-header h3 {
  font-size: 18px;
  line-height: 1.25;
}

.search-stage-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(212, 106, 58, 0.12);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
}

.picker-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.picker-label {
  font-size: 14px;
  font-weight: 700;
}

.picker-note,
.search-helper-copy {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.picker-summary {
  min-height: 20px;
  font-size: 13px;
  color: var(--accent-strong);
  font-weight: 700;
}

.route-chip-grid,
.date-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.route-chip,
.date-chip {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px 12px;
  border: 1px solid rgba(88, 71, 53, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.route-chip strong,
.date-chip strong {
  font-size: 14px;
  font-weight: 700;
}

.route-chip span,
.date-chip span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.route-chip:hover,
.date-chip:hover {
  border-color: rgba(212, 106, 58, 0.42);
  transform: translateY(-1px);
}

.route-chip.active,
.date-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(212, 106, 58, 0.12), 0 8px 18px rgba(212, 106, 58, 0.12);
}

.search-card-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}

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

.field-grid.compact {
  margin-bottom: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.field-label,
.checkline {
  font-size: 14px;
  font-weight: 600;
}

.trip-type-toggle {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}

.trip-type-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(88, 71, 53, 0.18);
  border-radius: 14px;
  background: var(--surface-strong);
  cursor: pointer;
}

.trip-type-option input {
  margin: 0;
}

input,
select,
button {
  font: inherit;
}

input[type="text"],
input[type="date"],
input[type="number"],
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(88, 71, 53, 0.18);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--text);
}

input:focus,
select:focus {
  outline: 2px solid rgba(212, 106, 58, 0.22);
  border-color: var(--accent);
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-actions {
  display: grid;
  gap: 8px;
}

.button,
.ghost-button,
.inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.button {
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.button:hover,
.ghost-button:hover,
.inline-button:hover {
  transform: translateY(-1px);
}

.ghost-button,
.inline-button {
  padding: 12px 18px;
  border-radius: 14px;
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
}

.results-panel,
.results-list,
.tracking-list {
  display: grid;
  gap: 14px;
}

.results-panel,
.tracking-panel {
  padding: 20px;
}

.result-card,
.tracking-card {
  position: relative;
  padding: 18px;
  overflow: hidden;
}

.show-more-wrap {
  display: flex;
  justify-content: center;
  padding: 4px 0 2px;
}

.show-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.show-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

/*.result-card.cheapest {*/
/*  padding-top: 25px;*/
/*}*/

/*.result-card.cheapest::after {*/
/*  content: "최저가";*/
/*  position: absolute;*/
/*  top: 1px;*/
/*  right: 18px;*/
/*  padding: 6px 10px;*/
/*  border-radius: 999px;*/
/*  background: rgba(32, 115, 95, 0.14);*/
/*  color: var(--success);*/
/*  font-size: 12px;*/
/*  font-weight: 700;*/
/*}*/

.result-head,
.tracking-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.price {
  min-width: 140px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  text-align: right;
}

.route {
  font-weight: 700;
  line-height: 1.35;
  word-break: keep-all;
}

.approx-badge {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(32, 115, 95, 0.12);
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.meta,
.tracking-meta,
.flow-list {
  display: grid;
  gap: 8px;
}

.meta-line,
.tracking-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.meta-line span:last-child,
.tracking-line span:last-child {
  text-align: right;
}

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

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(31, 26, 23, 0.52);
  z-index: 10;
}

.modal.open {
  display: flex;
}

.modal-card {
  position: relative;
  width: min(460px, 100%);
}

.modal-close-x {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.modal-close-x:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.kakao-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  background: #FEE500;
  color: #3C1E1E;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

.kakao-button:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

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

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid rgba(177, 60, 47, 0.28);
  border-radius: 12px;
  background: transparent;
  color: #b13c2f;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.danger-button:hover {
  background: rgba(177, 60, 47, 0.08);
  transform: translateY(-1px);
}

.status,
.inline-note {
  min-height: 20px;
  color: var(--muted);
  font-size: 14px;
}

.status.error {
  color: #b13c2f;
}

.status.success {
  color: var(--success);
}

.flow-list {
  margin-top: 12px;
}

.flow-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(88, 71, 53, 0.08);
}

.demo-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  background: #1d1a17;
  color: #f8f3ee;
  white-space: pre-wrap;
  line-height: 1.5;
}

.message-preview-wrap {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.message-preview {
  margin-top: 12px;
}

.message-bubble {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px 18px 18px 8px;
  background: #f6e54f;
  color: #2d2515;
  box-shadow: 0 14px 24px rgba(45, 37, 21, 0.12);
}

.message-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(45, 37, 21, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.message-bubble p {
  line-height: 1.5;
}

.message-button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.message-chip {
  display: inline-flex;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(45, 37, 21, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.empty-state {
  padding: 24px;
  text-align: center;
}

.landing-grid {
  align-items: start;
}

.search-page-grid {
  align-items: start;
  grid-template-columns: 1fr 320px;
}

.search-main-col,
.search-sidebar-col {
  display: grid;
  gap: 20px;
  align-content: start;
}

.search-form-card {
  max-width: none;
}

.search-results-card .page-top {
  align-items: flex-start;
}

/* --- Exchange Rate Card --- */
.fx-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.fx-updated {
  font-size: 12px;
  white-space: nowrap;
}

.fx-list {
  display: grid;
  gap: 8px;
}

.fx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(88, 71, 53, 0.08);
}

.fx-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.fx-flag {
  font-size: 18px;
  line-height: 1;
}

.fx-currency {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.fx-value {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.fx-skeleton {
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(88,71,53,0.06) 25%, rgba(88,71,53,0.1) 50%, rgba(88,71,53,0.06) 75%);
  background-size: 200% 100%;
  animation: fx-shimmer 1.4s infinite;
}

@keyframes fx-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.landing-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
  white-space: nowrap;
}

.landing-points,
.route-link-grid {
  display: grid;
  gap: 12px;
}

.route-link-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.route-link-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(88, 71, 53, 0.1);
  background: rgba(255, 255, 255, 0.75);
}

.route-link-title {
  display: grid;
  gap: 4px;
  line-height: 1.25;
}

.route-link-title-inline {
  display: block;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-link-title span:first-child::after {
  content: " ->";
  color: var(--muted);
  font-weight: 600;
  margin-left: 4px;
}

.route-link-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 32px;
}

.site-footer-card {
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 251, 245, 0.72);
  color: var(--muted);
  box-shadow: 0 12px 28px rgba(74, 45, 22, 0.08);
  display: grid;
  gap: 14px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.footer-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: color 140ms ease;
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-copyright {
  font-size: 12px;
  color: var(--muted);
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.landing-section {
  padding: 20px;
}

/* --- Hero Nav --- */
.hero-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.deal-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 700;
  border: 1px solid rgba(212, 106, 58, 0.22);
  transition: background 160ms ease, transform 160ms ease;
}

.deal-nav-link:hover {
  background: rgba(212, 106, 58, 0.2);
  transform: translateY(-1px);
}

/* --- Calendar Strip --- */
.calendar-section {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.calendar-section-header {
  display: grid;
  gap: 4px;
}

.calendar-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.calendar-day {
  flex: 1;
  min-width: 72px;
  display: grid;
  gap: 3px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  cursor: pointer;
  text-align: center;
  font: inherit;
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.calendar-day:hover:not([disabled]) {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.calendar-day.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.calendar-day.cheapest {
  border-color: var(--success);
}

.calendar-day.no-data {
  opacity: 0.45;
  cursor: default;
}

.cal-day-name {
  font-size: 11px;
  color: var(--muted);
}

.cal-date {
  font-size: 13px;
  font-weight: 700;
}

.cal-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.calendar-day.cheapest .cal-price {
  color: var(--success);
}

.cal-cheapest-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(32, 115, 95, 0.12);
  color: var(--success);
  font-size: 10px;
  font-weight: 700;
}

/* --- Price History Sparkline --- */
.price-history {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px;
}

.price-history-header {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.sparkline-container {
  min-height: 48px;
  display: flex;
  align-items: center;
}

.sparkline-svg {
  width: 100%;
  height: 56px;
  overflow: visible;
}

.sparkline-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.sparkline-empty {
  font-size: 12px;
  color: var(--muted);
}

/* --- Deals Page --- */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.deal-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(74, 45, 22, 0.07);
  text-decoration: none;
  color: var(--text);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.deal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(74, 45, 22, 0.12);
}

.deal-destination {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.deal-route {
  font-size: 13px;
  color: var(--muted);
}

.deal-price {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.deal-meta {
  display: grid;
  gap: 3px;
  font-size: 13px;
  color: var(--muted);
}

.deal-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 4px;
}

@media (max-width: 1024px) {
  .shell {
    width: min(100% - 24px, 1120px);
    padding: 16px 0 32px;
  }

  .site-footer {
    width: min(100% - 24px, 1120px);
    margin-bottom: 24px;
  }

  .hero {
    padding: 20px;
    border-radius: 24px;
  }

  .search-card,
  .tracking-panel,
  .example-card,
  .results-panel,
  .modal-card,
  .landing-section {
    padding: 18px;
  }

  .price {
    min-width: 0;
    font-size: 1.45rem;
  }

  .route-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-page-grid {
    grid-template-columns: 1fr 280px;
  }

  .route-chip-grid,
  .date-chip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body {
    background:
      radial-gradient(circle at top left, rgba(212, 106, 58, 0.18), transparent 34%),
      radial-gradient(circle at bottom right, rgba(32, 115, 95, 0.14), transparent 28%),
      linear-gradient(180deg, #f7f0e7 0%, #efe2d2 56%, #f9f5ef 100%);
  }

  .shell {
    width: min(100% - 16px, 1120px);
    padding: 12px 0 24px;
  }

  .site-footer {
    width: min(100% - 16px, 1120px);
    margin-bottom: 20px;
  }

  .hero {
    padding: 16px;
    border-radius: 22px;
  }

  .grid {
    margin-top: 18px;
    gap: 16px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .field-grid.compact {
    grid-template-columns: 1fr;
  }

  .hero-top,
  .page-top {
    align-items: flex-start;
  }

  .hero-copy {
    max-width: none;
  }

  .search-page-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .search-main-col,
  .search-sidebar-col {
    gap: 14px;
  }

  .search-hero-copy {
    gap: 8px;
  }

  .search-form-card,
  .search-results-card,
  .search-routes-card,
  .search-guide-card,
  .search-fx-card {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .hero-copy h3,
  .landing-hero h1 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    line-height: 1.12;
  }

  .search-hero-title {
    font-size: clamp(1.12rem, 4.7vw, 1.55rem);
    letter-spacing: -0.045em;
  }

  .search-card,
  .tracking-panel,
  .example-card,
  .results-panel,
  .modal-card,
  .landing-section,
  .result-card,
  .tracking-card {
    padding: 16px;
  }

  .result-head,
  .tracking-head,
  .meta-line,
  .tracking-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .meta-line span:last-child,
  .tracking-line span:last-child {
    text-align: left;
  }

  .price {
    width: 100%;
    text-align: left;
    font-size: 1.4rem;
  }

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

  .button,
  .ghost-button,
  .inline-button,
  .kakao-button,
  .danger-button {
    width: 100%;
    min-height: 46px;
  }

  .search-page-card h2 {
    font-size: 1.15rem;
  }

  .search-form {
    gap: 12px;
  }

  .search-form-card .field-grid {
    gap: 10px;
  }

  .search-form-card .field label,
  .search-form-card .field-label {
    font-size: 13px;
  }

  .search-form-card input[type="date"],
  .search-form-card input[type="number"],
  .search-form-card select {
    padding: 11px 12px;
  }

  .trip-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-signal-row,
  .picker-header {
    gap: 8px;
  }

  .route-chip-grid,
  .date-chip-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .route-chip,
  .date-chip {
    padding: 12px 11px;
  }

  .trip-type-option {
    justify-content: center;
  }

  .checkline {
    align-items: flex-start;
  }

  .route-link-grid {
    grid-template-columns: 1fr;
  }

  .route-chip-grid,
  .date-chip-grid {
    grid-template-columns: 1fr;
  }

  .route-link-card {
    padding: 14px;
  }

  .demo-box {
    font-size: 13px;
    line-height: 1.45;
    overflow-x: auto;
  }

  .modal {
    align-items: flex-end;
    padding: 10px;
  }

  .modal-card {
    width: 100%;
    max-height: min(88vh, 760px);
    overflow-y: auto;
    border-radius: 22px 22px 0 0;
  }

  .results-list,
  .tracking-list {
    gap: 12px;
  }

  .search-main-col {
    order: 1;
  }

  .search-sidebar-col {
    order: 2;
  }

  .search-guide-card .flow-list {
    gap: 10px;
  }

  .search-guide-card .flow-item {
    padding: 10px 12px;
  }

  .search-guide-card .demo-box {
    margin-top: 12px;
    max-height: 220px;
    overflow-y: auto;
  }
}

@media (max-width: 480px) {
  .eyebrow {
    font-size: 11px;
    letter-spacing: 0.05em;
  }

  .hero-copy h3,
  .landing-hero h1 {
    font-size: 1.45rem;
    white-space: normal;
  }

  .search-hero-title {
    font-size: 0.98rem;
  }

  .search-card,
  .tracking-panel,
  .example-card,
  .results-panel,
  .modal-card,
  .landing-section,
  .result-card,
  .tracking-card {
    padding: 14px;
    border-radius: 18px;
  }

  .route-link-title {
    gap: 2px;
  }

  .route-link-card span,
  .meta-line,
  .tracking-line,
  .inline-note,
  .status {
    font-size: 13px;
  }

  .search-hero-copy .muted {
    font-size: 14px;
  }

  .search-form-card {
    padding: 13px;
  }

  .search-form-card .trip-type-toggle {
    gap: 8px;
  }

  .search-form-card .trip-type-option {
    padding: 10px 12px;
  }

  .search-form-card input[type="date"],
  .search-form-card input[type="number"],
  .search-form-card select {
    min-height: 44px;
  }

  .search-guide-card .demo-box {
    display: none;
  }

  .message-bubble {
    padding: 14px;
  }

  .site-footer-card {
    padding: 16px;
    border-radius: 18px;
    gap: 12px;
  }

  .site-footer-line {
    font-size: 12px;
    line-height: 1.55;
  }
}

/* --- Restaurants Page --- */
.restaurants-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.restaurants-map {
  height: 520px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  z-index: 0;
}

.restaurants-panel {
  display: grid;
  gap: 14px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 2px;
}

.restaurants-panel-header {
  display: grid;
  gap: 4px;
}

.restaurant-filters {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.72);
}

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

.restaurant-filter-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.restaurant-filter-grid select {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.restaurant-result-count {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.restaurants-list {
  display: grid;
  gap: 10px;
}

.restaurant-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  display: grid;
  gap: 4px;
}

.restaurant-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.restaurant-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
  min-width: 0;
}

.restaurant-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
}

.restaurant-rating-score {
  font-weight: 700;
  color: var(--accent);
}

.restaurant-rating-stars {
  color: #e8a045;
  letter-spacing: -1px;
  font-size: 12px;
}

.restaurant-rating-count {
  color: var(--muted);
}

.restaurant-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 20px;
}

.restaurant-reason,
.restaurant-score {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.restaurant-reason {
  background: rgba(32, 115, 95, 0.1);
  color: var(--success);
}

.restaurant-score {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.restaurant-map-link {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(212, 106, 58, 0.28);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(212, 106, 58, 0.08);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.restaurant-map-link:hover {
  background: rgba(212, 106, 58, 0.16);
}

.restaurant-category {
  font-size: 12px;
  color: var(--muted);
}

.restaurant-address {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* Leaflet tooltip override for city labels */
.restaurant-city-tooltip {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: "Segoe UI", "Noto Sans", sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  box-shadow: 0 2px 8px rgba(74, 45, 22, 0.14);
  white-space: nowrap;
}

.restaurant-city-tooltip::before {
  border-top-color: var(--line);
}

/* ============================================================
   Kakao Nudge Banner (tracking page)
   ============================================================ */

.nudge-banner {
  border-radius: 14px;
  background: rgba(212, 106, 58, 0.08);
  border: 1.5px solid rgba(212, 106, 58, 0.28);
  padding: 16px 18px;
  margin-bottom: 12px;
}

.nudge-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nudge-text {
  flex: 1;
  min-width: 160px;
}

.nudge-text strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--accent-strong);
}

.nudge-text p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.nudge-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.kakao-unlinked-label {
  font-size: 13px;
  color: var(--muted);
}

.kakao-linked-label {
  font-size: 13px;
  color: var(--success);
  font-weight: 600;
}

.kakao-link-btn {
  margin-left: 8px;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid rgba(212, 106, 58, 0.24);
  cursor: pointer;
  font-weight: 600;
  transition: background 160ms ease;
}

.kakao-link-btn:hover {
  background: rgba(212, 106, 58, 0.18);
}

.kakao-link-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

@keyframes nudge-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(212, 106, 58, 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(212, 106, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 106, 58, 0); }
}

.nudge-pulse {
  animation: nudge-pulse 0.7s ease-out 2;
}

@media (max-width: 900px) {
  .restaurants-layout {
    grid-template-columns: 1fr;
  }

  .restaurants-map {
    height: 340px;
  }

  .restaurants-panel {
    max-height: none;
  }

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