/* 모두잇길의 둥글고 친근한 인상을 앱 전체에서 유지합니다. */
@font-face {
  font-family: "Gmarket Sans";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff") format("woff");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   4단계 통합 코스 만들기 — 균형형
   ========================================================= */

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

.course-builder-screen {
  min-height: calc(100dvh - 72px);
  padding: clamp(24px, 3.2vw, 54px) 4vw clamp(54px, 6vw, 90px);
}

.course-builder-card {
  width: min(92vw, 1580px);
  margin: 0 auto;
  padding: clamp(24px, 2.6vw, 44px);
  border: 1px solid rgba(45, 83, 58, .13);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 48px rgba(31, 66, 43, .12);
}

.course-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 clamp(34px, 4vw, 56px);
  padding: 0;
  list-style: none;
}

.course-stepper li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 9px;
  color: #8b918e;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.course-stepper li::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 19px;
  right: 50%;
  width: 100%;
  height: 4px;
  background: #e3e6e4;
}

.course-stepper li:first-child::before { display: none; }

.course-stepper b {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e4e6e5;
  color: #7f8582;
  font-size: 16px;
  box-shadow: 0 0 0 5px #fff;
}

.course-stepper .is-current,
.course-stepper .is-complete {
  color: #173924;
}

.course-stepper .is-current b,
.course-stepper .is-complete b {
  background: linear-gradient(145deg, #83c439, #5d9f22);
  color: #fff;
}

.course-stepper .is-complete::before,
.course-stepper .is-current::before {
  background: #87c544;
}

.course-builder-card .inline-wizard {
  margin: 0;
  padding: 0;
  border: 0;
  animation: none;
}

.course-builder-card .inline-wizard .wizard-card {
  width: 100%;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.course-builder-card .wizard-header {
  margin-bottom: 20px;
}

.course-builder-card .wizard-header h3 {
  position: relative;
  margin: 0;
  padding-left: 50px;
  color: #183526;
  font-size: clamp(22px, 2vw, 31px);
  font-weight: 950;
}

.course-builder-card .wizard-header h3::before {
  content: counter(course-step);
  position: absolute;
  top: 50%;
  left: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--home-lime);
  color: #173c28;
  font-size: 20px;
  transform: translateY(-50%);
}

.course-builder-card { counter-reset: course-step; }
.course-builder-card .wizard-header h3::before { content: "1"; }
.course-builder-card:has([data-wizard-step="1"].is-current) .wizard-header h3::before { content: "2"; }
.course-builder-card:has([data-wizard-step="2"].is-current) .wizard-header h3::before { content: "3"; }
.course-builder-card:has([data-wizard-step="3"].is-current) .wizard-header h3::before { content: "4"; }

.course-builder-card .wizard-header p {
  margin: 5px 0 0 50px;
  color: #69766f;
  font-size: 15px;
  font-weight: 650;
}

.course-builder-card .wizard-content {
  min-height: 0;
}

.course-builder-card .region-grid {
  gap: clamp(12px, 1.3vw, 20px);
}

.course-builder-card .region-card {
  aspect-ratio: 1.28 / 1;
  border-radius: 14px;
}

.course-builder-card .region-copy {
  right: 16px;
  bottom: 14px;
  left: 16px;
}

.course-builder-card .region-copy strong { font-size: clamp(17px, 1.45vw, 23px); }
.course-builder-card .region-copy small { font-size: clamp(11px, .9vw, 15px); }

.inline-dart-banner {
  min-height: 86px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
  padding: 14px 22px;
  border-radius: 16px;
  background: linear-gradient(90deg, #eef8df, #f6faee);
  color: #263d2f;
  font-size: clamp(14px, 1.25vw, 20px);
  font-weight: 750;
  text-decoration: none;
}

.inline-dart-banner strong { color: #2f702b; }

.inline-dart-icon {
  font-size: 42px;
  filter: saturate(.85);
}

.inline-dart-banner b {
  min-width: 180px;
  padding: 13px 22px;
  border: 2px solid #67aa33;
  border-radius: 13px;
  background: rgba(255,255,255,.7);
  color: #17452d;
  font-size: 15px;
  text-align: center;
}

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

.custom-destination-field { margin-top: 20px; }

.schedule-detail-section {
  margin-top: 28px;
  margin-bottom: 16px;
  padding-top: 20px;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.schedule-detail-summary {
  min-height: 0;
  display: list-item;
  padding: 0;
  cursor: pointer;
}

.schedule-detail-summary strong {
  color: inherit;
  font-size: inherit;
}

.schedule-detail-summary span {
  margin-left: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.schedule-detail-body {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
}

.schedule-detail-body > .form-row,
.schedule-detail-body > .wizard-field {
  margin-top: 14px;
}

.course-builder-card:has([data-wizard-step="1"].is-current)
  .wizard-content > .wizard-grid:nth-of-type(2) {
  gap: 28px;
  margin-top: 10px;
}

.course-builder-card:has([data-wizard-step="1"].is-current)
  .optional-location-section:not(.schedule-detail-section) {
  margin-top: 30px;
}

.course-builder-card:has([data-wizard-step="1"].is-current)
  .wizard-actions {
  margin-top: 32px;
}

.optional-location-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.optional-location-section > summary {
  cursor: pointer;
  list-style-position: inside;
}

.optional-location-section[open] > summary {
  margin-bottom: 2px;
}

.optional-location-section.schedule-detail-section {
  margin-top: 28px;
  margin-bottom: 16px;
  padding-top: 20px;
}

.saved-place-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.course-builder-card .wizard-field > span {
  color: #263c54;
  font-size: 15px;
  font-weight: 850;
}

.course-builder-card .wizard-field input,
.course-builder-card .wizard-field select,
.course-builder-card .wizard-field textarea {
  min-height: 58px;
  border-radius: 13px;
  background: #fff;
}

.course-builder-card .inline-wizard .wizard-actions {
  position: static;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.course-builder-card .wizard-actions .primary-btn {
  min-height: 60px;
  border-radius: 14px;
  background: linear-gradient(100deg, #236645, #185036);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.course-builder-card .wizard-actions .ghost {
  min-width: 120px;
}

.course-builder-card .wizard-actions .ghost:disabled {
  display: none;
}

.course-builder-card .wizard-actions .ghost:disabled + .primary-btn {
  grid-column: 1 / -1;
}

@media (max-width: 900px) {
  .course-builder-card { width: min(94vw, 760px); padding: 22px; }
  .course-stepper { overflow-x: auto; grid-template-columns: repeat(4, minmax(86px, 1fr)); padding-bottom: 8px; }
  .course-stepper li { font-size: 12px; }
  .course-builder-card .region-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-dart-banner { grid-template-columns: auto 1fr; }
  .inline-dart-banner b { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 620px) {
  .course-builder-screen { padding: 18px 10px 40px; }
  .course-builder-card { width: 100%; padding: 18px 14px; border-radius: 16px; }
  .course-stepper { margin-bottom: 28px; }
  .course-stepper b { width: 34px; height: 34px; }
  .course-stepper li::before { top: 16px; }
  .course-builder-card .wizard-header h3 { padding-left: 42px; font-size: 21px; }
  .course-builder-card .wizard-header h3::before { width: 32px; height: 32px; }
  .course-builder-card .wizard-header p { margin-left: 42px; font-size: 12px; }
  .location-input-row { grid-template-columns: 1fr; }
  .inline-dart-banner { gap: 12px; padding: 14px; }
  .course-builder-card .wizard-actions { grid-template-columns: 1fr; }
  .course-builder-card .wizard-actions .ghost { order: 2; }
}

@font-face {
  font-family: "Gmarket Sans";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff") format("woff");
  font-weight: 700 950;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /*
    전체 배경과 기본 표면
  */
  --bg: #f5f3ed;
  --panel: #fffdf9;
  --text: #26312b;
  --muted: #68756e;
  --line: #dde5df;

  /*
    모두잇길 대표색
    기존 변수명은 app 전체 호환을 위해 유지
  */
  --blue: #2f6b4f;
  --blue-hover: #24563f;
  --blue-soft: #eaf4ee;

  /*
    상태 색상
  */
  --green-soft: #ecfdf5;
  --green-text: #047857;

  --red-soft: #fef2f2;
  --red-text: #b91c1c;

  --orange-soft: #fff7ed;
  --orange-text: #c2410c;

  /*
    방문 순서와 카카오맵 버튼
  */
  --route-accent: #9bdc28;
  --kakao: #fee500;

  --shadow:
    0 8px 24px
    rgba(38, 49, 43, 0.07);

  --modal-shadow:
    0 28px 72px
    rgba(38, 49, 43, 0.22);
}

/* =========================================================
   FINAL LANDING UI — 시안 기준 첫 화면
   기존 지도/일정/마법사 스타일은 그대로 유지한다.
   ========================================================= */

:root {
  --home-forest: #163f2c;
  --home-green: #75ad37;
  --home-lime: #9bdd2c;
  --home-lime-dark: #80bd27;
  --home-pale: #eef8df;
  --home-cream: #fbfcf7;
}

body {
  background: #f8faf5;
}

.home-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 68px);
  border-bottom: 1px solid rgba(39, 78, 55, 0.08);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 5px 18px rgba(39, 71, 48, 0.06);
  backdrop-filter: blur(12px);
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--home-forest);
  text-decoration: none;
}

.home-brand strong {
  color: var(--home-forest);
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -0.065em;
}

.sprout-logo {
  width: 46px;
  height: 42px;
  overflow: visible;
}

.logo-path,
.logo-stem,
.logo-smile,
.logo-leg {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo-path { stroke: #7bb948; stroke-width: 6; }
.logo-stem { stroke: #315d3c; stroke-width: 2.6; }
.logo-leaf { fill: #71ae48; }
.logo-body { fill: #bfda63; stroke: #6da743; stroke-width: 1.2; }
.logo-eye { fill: #143d2b; }
.logo-smile { stroke: #143d2b; stroke-width: 1.8; }
.logo-leg { stroke: #315d3c; stroke-width: 3; }

.home-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 999px;
  background: transparent;
  color: #183b2a;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  background: #eaf7cf;
}

.nav-link .count-badge {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin-left: 1px;
  border-radius: 999px;
  background: #e3f4bc;
  color: #183b2a;
  font-size: 11px;
}

.landing-screen {
  position: relative;
  isolation: isolate;
  min-height: calc(100dvh - 72px);
  overflow-x: clip;
  overflow-y: visible;
  padding: 28px 3vw 40px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.96) 0 32%, transparent 66%),
    linear-gradient(180deg, #ffffff 0%, #fbfcf7 45%, #edf7df 100%);
}

.landing-screen::before,
.landing-screen::after {
  content: "";
  position: absolute;
  z-index: -2;
  bottom: -190px;
  width: 68vw;
  height: 390px;
  border-radius: 50% 55% 0 0;
  transform: rotate(6deg);
}

.landing-screen::before {
  left: -20vw;
  background: #cfe9b0;
}

.landing-screen::after {
  right: -26vw;
  background: #dcefc4;
  transform: rotate(-7deg);
}

.landing-heading {
  text-align: center;
}

.landing-heading h1 {
  position: relative;
  display: inline-block;
  margin: 0;
  color: #071f15;
  font-size: clamp(30px, 3.2vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.065em;
}

.landing-heading h1 > span {
  position: absolute;
  top: -12px;
  right: -34px;
  color: var(--home-lime);
  font-size: 30px;
  transform: rotate(12deg);
}

.landing-heading > p {
  margin: 8px 0 12px;
  color: #536a61;
  font-size: 14px;
  font-weight: 650;
}

.home-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(9px, 1.8vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-steps li:not(.step-arrow) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a2aaa6;
  font-size: 13px;
  font-weight: 800;
}

.home-steps b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e4e8e5;
  color: #8b9590;
}

.home-steps .is-current { color: #142f21 !important; }
.home-steps .is-current b { background: var(--home-lime); color: #153921; }
.home-steps .step-arrow { color: #aeb8b3; font-size: 20px; font-weight: 400; }

.start-grid {
  width: 90vw;
  max-width: 1800px;
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(330px, .9fr);
  align-items: start;
  gap: clamp(18px, 1.4vw, 28px);
  margin: 24px auto 0;
}

.start-card {
  border: 1px solid rgba(43, 74, 54, 0.07);
  border-radius: 20px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 15px 35px rgba(47, 75, 57, 0.09);
}

.choice-card {
  padding: clamp(22px, 1.5vw, 30px);
}

.choice-section + .choice-section {
  margin-top: 16px;
}

.choice-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 11px;
}

.choice-number {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--home-lime);
  color: #163d27;
  font-size: 16px;
  font-weight: 950;
}

.choice-heading h2 {
  color: #14291d;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.choice-heading p {
  margin: 3px 0 0;
  color: #687b71;
  font-size: 12px;
  font-weight: 650;
}

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

.region-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 1.06 / 1;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #d9e2da;
  box-shadow: 0 6px 16px rgba(31, 51, 39, 0.08);
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.region-card::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(180deg, transparent, rgba(7, 24, 15, .84));
  pointer-events: none;
}

.region-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .25s ease;
}

.region-card:hover { transform: translateY(-2px); }
.region-card:hover img { transform: scale(1.025); }

.region-card.is-selected {
  border-color: #69b82d;
  box-shadow: 0 0 0 2px rgba(105,184,45,.14), 0 9px 18px rgba(49,100,42,.14);
  transform: translateY(-2px);
}

.region-copy {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 9px;
  left: 10px;
  display: grid;
  gap: 1px;
  color: #fff;
}

.region-copy strong { font-size: 15px; font-weight: 900; }
.region-copy small { overflow: hidden; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }

.region-check {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: transparent;
  font-size: 14px;
  font-weight: 950;
  box-shadow: 0 1px 5px rgba(14, 34, 22, 0.18);
  backdrop-filter: blur(2px);
}

.region-card.is-selected .region-check {
  border-color: #62ae2d;
  background: #62ae2d;
  color: #fff;
}

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

.taste-chip {
  position: relative;
  min-width: 0;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid #dfe7e1;
  border-radius: 999px;
  background: #fff;
  color: #22382c;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.taste-chip:hover { transform: translateY(-1px); border-color: #9bc872; }
.taste-chip.is-selected { border: 2px solid #68b52f; background: #f4faea; box-shadow: 0 3px 10px rgba(69,125,43,.1); }
.taste-icon { color: #4d982e; font-size: 22px; line-height: 1; }
.taste-chip strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.taste-check { display: none; }
.taste-chip.is-selected .taste-check {
  position: absolute;
  top: -7px;
  right: -3px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #62ae2d;
  color: #fff;
  font-size: 12px;
}

.home-primary-btn {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  border-radius: 13px;
  background: linear-gradient(100deg, #1d5a40, #174a35);
  color: #ffffff;
  font-size: 16px;
  font-weight: 950;
  box-shadow: 0 9px 20px rgba(23, 74, 53, .24);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.home-primary-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(100deg, #174a35, #103d2d);
  box-shadow: 0 12px 24px rgba(16, 61, 45, .28);
}

.dart-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(20px, 1.5vw, 30px);
  text-align: center;
  background: linear-gradient(180deg, rgba(252,255,249,.96), rgba(241,249,230,.94));
}

.dart-card-title {
  color: #173c29;
  font-size: 15px;
  font-weight: 900;
}

.dart-card-title span { color: #27854c; font-size: 20px; }

.dart-card h2 {
  margin: 4px 0 2px;
  color: #0c2116;
  font-size: clamp(26px, 2.4vw, 35px);
  font-weight: 950;
  letter-spacing: -0.055em;
}

.dart-card > p:not(.dart-helper) {
  margin: 0;
  color: #66796f;
  font-size: 12px;
  font-weight: 650;
}

.dart-visual {
  position: relative;
  width: min(310px, 78%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 9px auto 4px;
}

.dart-splash {
  position: absolute;
  inset: 8%;
  border-radius: 44% 56% 43% 57% / 54% 42% 58% 46%;
  background: #c2e5ae;
  transform: rotate(9deg);
}

.dart-board {
  position: relative;
  width: 67%;
  aspect-ratio: 1;
  border: 7px solid #234c37;
  border-radius: 50%;
  background: repeating-conic-gradient(#f7f4df 0deg 18deg, #437848 18deg 36deg);
  box-shadow: 0 7px 14px rgba(29,62,38,.22), inset 0 0 0 4px #eff3dd, inset 0 0 0 12px #2e6141;
}

.dart-board::before,
.dart-board::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  inset: 25%;
  background: repeating-conic-gradient(#416f46 0deg 18deg, #eff0d8 18deg 36deg);
  box-shadow: 0 0 0 3px #315d3c;
}

.dart-board::after {
  inset: 42%;
  background: #75b63a;
  box-shadow: 0 0 0 4px #f3efd7, 0 0 0 7px #2e5a3b;
}

.dart-bullseye { display: none; }

.dart-arrow {
  position: absolute;
  z-index: 3;
  top: 11%;
  right: 12%;
  width: 58%;
  height: 8px;
  border-radius: 999px;
  background: #284f37;
  transform: rotate(132deg);
  transform-origin: right center;
  box-shadow: 0 2px 4px rgba(28,55,36,.22);
}

.dart-arrow::before,
.dart-arrow::after {
  content: "";
  position: absolute;
  right: -3px;
  width: 30px;
  height: 15px;
  border-radius: 70% 8% 70% 8%;
  background: #71bc35;
  transform-origin: right center;
}

.dart-arrow::before { bottom: 4px; transform: rotate(25deg); }
.dart-arrow::after { top: 4px; transform: rotate(-25deg); }

.dart-helper {
  margin: auto 0 8px;
  color: #88998e;
  font-size: 10px;
  font-weight: 650;
}

.dart-btn {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid #65a936;
  border-radius: 12px;
  background: linear-gradient(90deg, #dff1c4, #d0eba5);
  color: #173d29;
  font-size: 15px;
  font-weight: 950;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}

.dart-btn:hover { transform: translateY(-1px); background: #c6e998; }

.result-layout { display: none; }
.app-shell.has-trip .landing-screen { display: none; }
.app-shell.has-trip .result-layout { display: grid; }

@media (max-width: 980px) {
  .landing-screen { padding-inline: 20px; }
  .start-grid { grid-template-columns: 1fr; }
  .dart-card { min-height: 420px; }
  .dart-visual { width: 190px; }
}

@media (max-width: 700px) {
  .home-topbar { height: 62px; padding: 0 14px; }
  .home-brand strong { font-size: 19px; }
  .sprout-logo { width: 40px; height: 37px; }
  .home-nav { gap: 2px; }
  .nav-link { min-height: 34px; padding: 0 9px; font-size: 0; }
  .nav-link span:first-child { font-size: 18px; }
  .nav-link .count-badge { display: none; }
  .landing-screen { min-height: calc(100dvh - 62px); padding: 24px 12px 30px; }
  .landing-heading h1 { font-size: 29px; }
  .landing-heading h1 > span { display: none; }
  .home-steps li:not(.step-arrow) span { display: none; }
  .start-grid { margin-top: 17px; }
  .choice-card { padding: 16px 12px 13px; }
  .region-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .taste-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .region-card { aspect-ratio: 1.25 / 1; }
  .dart-card { min-height: 400px; }
}

/* =========================================================
   코스 만들기 4단계 — 왼쪽 카드 안에서 이어지는 인라인 방식
   ========================================================= */

.inline-wizard {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 2px solid #e2ecdf;
  scroll-margin-top: 92px;
  animation: inline-wizard-open .24s ease both;
}

.inline-wizard .wizard-card {
  width: 100%;
  max-height: none;
  overflow: visible;
  padding: clamp(22px, 1.7vw, 32px);
  border: 1px solid #dce8da;
  border-radius: 18px;
  background: #fbfdf9;
  box-shadow: 0 10px 26px rgba(31, 75, 48, .08);
}

.inline-wizard .wizard-content {
  min-height: 230px;
}

.inline-wizard .wizard-actions {
  position: static;
  margin: 6px -22px -22px;
  padding: 18px clamp(22px, 1.7vw, 32px);
  border-radius: 0 0 18px 18px;
  background: #f5faf2;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.dart-card {
  position: sticky;
  top: 90px;
  align-self: start;
}

@keyframes inline-wizard-open {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .dart-card {
    position: static;
  }
}

@media (max-width: 700px) {
  .inline-wizard {
    margin-top: 20px;
    padding-top: 20px;
  }

  .inline-wizard .wizard-card {
    padding: 20px 14px;
    border-radius: 15px;
  }

  .inline-wizard .wizard-actions {
    margin: 4px -14px -20px;
    padding: 14px;
    border-radius: 0 0 15px 15px;
  }
}

@media (max-width: 430px) {
  .landing-heading > p { font-size: 12px; }
  .home-steps { gap: 8px; }
  .choice-heading h2 { font-size: 15px; }
  .taste-chip { padding-inline: 8px; }
}
/* =========================================================
   기본 초기화
   ========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Gmarket Sans",
    Pretendard,
    "Noto Sans KR",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  min-height: auto;
  accent-color: var(--blue);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.hidden {
  display: none !important;
}

/* =========================================================
   앱 전체 구조
   ========================================================= */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.topbar {
  position: relative;
  z-index: 20;
  height: 64px;
  flex: 0 0 auto;
  padding: 0 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;

  display: grid;
  place-items: center;

  border-radius: 10px;
  background: var(--blue);
  color: #fff;
}

.brand-subtitle {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 7px 10px;
  border-radius: 999px;

  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.count-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  background: var(--blue);
  color: #fff;

  font-size: 11px;
}

/* =========================================================
   메인 레이아웃
   초기: 지도 1열
   일정 생성 후: 지도 + 일정 2열
   ========================================================= */

.planner-layout {
  flex: 1;
  min-height: 0;

  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

/*
  JavaScript에서 일정 생성 완료 후
  .app-shell에 has-trip 클래스를 추가할 수 있다.
*/
.app-shell.has-trip .planner-layout,
.planner-layout:has(.itinerary-panel:not(.hidden)) {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
}

/*
  기존 왼쪽 설정창은 더 이상 사용하지 않는다.
  여행 조건 입력은 Wizard에서만 진행한다.
*/
.setup-panel {
  display: none !important;
}

.panel {
  min-width: 0;
  min-height: 0;

  display: flex;
  flex-direction: column;

  border: 1px solid var(--line);
  border-radius: 16px;

  background: var(--panel);
  box-shadow: var(--shadow);

  opacity: 1;
  transform: none;
}

/*
  이전 opacity: 0 문제 방지
*/
.panel.panel-enter,
.panel.panel-enter.is-visible {
  opacity: 1;
  transform: none;
  transition: box-shadow 220ms ease;
}

.panel-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

/* =========================================================
   공통 버튼
   ========================================================= */

.primary-btn {
  min-height: 42px;
  padding: 10px 16px;

  background: var(--blue);
  color: #fff;

  box-shadow: none;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.primary-btn:hover:not(:disabled) {
  background: var(--blue-hover);
}

.primary-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.ghost {
  min-height: 38px;
  padding: 8px 12px;

  background: var(--blue-soft);
  color: var(--blue);
}

.ghost:hover {
  background: #e2ebff;
}

.wizard-open-btn {
  min-height: 40px;
  padding: 9px 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #dbe6fb;
  border-radius: 10px;

  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
}

.wizard-open-btn:hover {
  background: #e2ebff;
}

/* =========================================================
   지도
   ========================================================= */

.map-panel {
  min-width: 0;
  min-height: calc(100dvh - 92px);

  padding: 14px;
  gap: 10px;
}

.map {
  position: relative;
  flex: 1;
  min-height: 500px;
  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: 12px;

  background:
    linear-gradient(
      180deg,
      #f8fbff 0%,
      #eef4ff 100%
    );
}

.map-empty-state {
  position: absolute;
  inset: 0;
  z-index: 2;

  display: grid;
  place-content: center;
  gap: 8px;

  padding: 24px;
  text-align: center;

  background: rgba(248, 251, 255, 0.9);
  color: var(--muted);

  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.map-empty-state strong {
  color: var(--text);
  font-size: 15px;
}

.map-empty-state span {
  max-width: 300px;
  line-height: 1.5;
}

/* 기본 안내 상태에서는 로더를 숨긴다 */
.map-loader {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
}

/* 실제 계산 중일 때만 로더를 표시한다 */
.map-empty-state.is-loading .map-loader {
  display: inline-flex;
}

.map-loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
  opacity: 0.75;
  animation: none;
}

/* 실제 계산 중일 때만 애니메이션 실행 */
.map-empty-state.is-loading .map-loader-dot {
  animation: map-loader-bounce 1.2s infinite ease-in-out;
}

.map-empty-state.is-loading .map-loader-dot:nth-child(2) {
  animation-delay: 0.16s;
}

.map-empty-state.is-loading .map-loader-dot:nth-child(3) {
  animation-delay: 0.32s;
}

.map-empty-state.is-loading strong {
  color: var(--blue);
}


@keyframes map-loader-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.map-fallback {
  padding: 10px 12px;

  border-radius: 10px;

  background: var(--orange-soft);
  color: #9a2c10;

  font-size: 13px;
  line-height: 1.45;
}

/* =========================================================
   일정 패널
   ========================================================= */

.itinerary-panel {
  min-width: 0;
  overflow-y: auto;

  padding: 14px;
  gap: 10px;
}

.status {
  min-width: 64px;
  padding: 7px 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  font-size: 12px;
  font-weight: 700;
}

.status.idle {
  background: #f2f5fa;
  color: #64748b;
}

.status.loading {
  background: var(--orange-soft);
  color: var(--orange-text);
}

.status.done {
  background: var(--green-soft);
  color: var(--green-text);
}

.status.error {
  background: var(--red-soft);
  color: var(--red-text);
}

.summary {
  padding: 12px;

  display: grid;
  gap: 8px;

  border: 1px solid var(--line);
  border-radius: 12px;

  background: #fbfdff;
  line-height: 1.45;
}

.summary.empty,
.alternatives.empty {
  color: var(--muted);
}

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

.metric {
  min-width: 0;
  padding: 9px;

  border: 1px solid var(--line);
  border-radius: 10px;

  background: #fff;
}

.metric strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
}

.day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.day-tab {
  padding: 8px 10px;

  border-radius: 999px;

  background: #f8fafc;
  color: var(--muted);
}

.day-tab.active {
  background: var(--blue-soft);
  color: var(--blue);
}

.itinerary-content {
  display: grid;
  gap: 10px;
}

.itinerary-card {
  padding: 12px;

  border: 1px solid var(--line);
  border-radius: 12px;

  background: #fff;
}

.itinerary-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.07);
}

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

.itinerary-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.itinerary-meta.subtle {
  margin-top: 4px;
  color: #6b7a93;
}

/* =========================================================
   일정 경로 카드
   ========================================================= */

.route-list {
  list-style: none;

  display: grid;
  gap: 10px;

  margin: 12px 0 0;
  padding: 0;
}

.route-card {
  padding: 10px;

  border: 1px solid var(--line);
  border-radius: 10px;

  background: #fff;
}

.route-card[draggable="true"] {
  cursor: grab;
}

.route-card.dragging {
  opacity: 0.56;
  border-color: var(--blue);
}

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

.route-title {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 0;
  font-weight: 800;
}

.order {
  min-width: 22px;
  height: 22px;

  display: grid;
  place-items: center;

  border-radius: 7px;

  background: var(--blue);
  color: #fff;

  font-size: 11px;
}

.route-actions {
  flex: 0 0 auto;

  display: grid;
  justify-items: end;
  gap: 8px;
}

.route-exclude-btn {
  padding: 7px 9px;

  border-radius: 8px;

  background: var(--red-soft);
  color: var(--red-text);

  font-size: 12px;
}

/* =========================================================
   태그 및 상태 배지
   ========================================================= */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  padding: 5px 8px;

  border-radius: 999px;

  background: var(--blue-soft);
  color: var(--blue);

  font-size: 12px;
  font-weight: 700;
}

.reason {
  margin: 8px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
}

.badge-pill {
  padding: 4px 8px;

  display: inline-flex;
  align-items: center;
  gap: 4px;

  border-radius: 999px;

  background: #fef3c7;
  color: #92400e;

  font-size: 12px;
  font-weight: 700;
}

.badge-pill.saved {
  background: var(--green-soft);
  color: var(--green-text);
}

.badge-pill.must {
  background: var(--red-soft);
  color: var(--red-text);
}

/* =========================================================
   대체 후보
   ========================================================= */

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

.alt-card {
  padding: 10px;

  border: 1px solid var(--line);
  border-radius: 10px;

  background: #fff;
}

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

.alt-include-btn {
  padding: 8px 10px;

  border-radius: 8px;

  background: var(--blue-soft);
  color: var(--blue);

  font-size: 12px;
}

/* =========================================================
   저장 장소
   ========================================================= */

.section-label {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.place-results,
.saved-places {
  display: grid;
  gap: 8px;
}

.place-card,
.saved-card {
  padding: 10px;

  display: grid;
  gap: 8px;

  border: 1px solid var(--line);
  border-radius: 10px;

  background: #fff;
}

.place-card-head,
.saved-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.saved-count {
  margin-left: 6px;
  padding: 2px 6px;

  display: inline-flex;

  border-radius: 999px;

  background: var(--blue-soft);
  color: var(--blue);

  font-size: 11px;
}

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

.place-btn,
.saved-btn {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.place-btn {
  background: var(--blue-soft);
  color: var(--blue);
}

.saved-btn {
  background: var(--red-soft);
  color: var(--red-text);
}

/* =========================================================
   Wizard 배경 및 카드
   ========================================================= */

.wizard-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;

  display: grid;
  place-items: center;

  padding: 24px;

  background: rgba(15, 23, 42, 0.38);

  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.wizard-card {
  width: min(680px, 100%);
  max-height: min(780px, calc(100dvh - 48px));

  overflow-y: auto;
  overscroll-behavior: contain;

  display: grid;
  gap: 20px;

  padding: 28px;

  border: 1px solid rgba(229, 235, 242, 0.95);
  border-radius: 22px;

  background: #fff;
  box-shadow: var(--modal-shadow);
}

/* =========================================================
   Wizard 진행 상태
   ========================================================= */

.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wizard-progress-bar {
  flex: 1;
  height: 5px;

  overflow: hidden;

  border-radius: 999px;
  background: #edf2f8;
}

.wizard-progress-value {
  height: 100%;

  border-radius: inherit;
  background: var(--blue);

  transition: width 180ms ease;
}

.wizard-step-pill {
  min-width: 54px;
  padding: 7px 10px;

  flex: 0 0 auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  background: var(--blue-soft);
  color: var(--blue);

  font-size: 13px;
  font-weight: 800;
}

/* =========================================================
   Wizard 제목
   ========================================================= */

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

.wizard-header h3 {
  margin: 0;

  color: var(--text);

  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.wizard-header p {
  margin: 0;

  color: var(--muted);

  font-size: 14px;
  line-height: 1.55;
}

/* =========================================================
   Wizard 입력
   ========================================================= */

.wizard-grid {
  display: grid;
  gap: 14px;
}

.wizard-field {
  display: grid;
  gap: 7px;

  color: #334155;

  font-size: 14px;
  font-weight: 800;
}

.wizard-field input,
.wizard-field select,
.wizard-field textarea {
  min-height: 48px;
  border-radius: 12px;
  padding: 12px 14px;
}

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

/* =========================================================
   여행 기간 선택
   ========================================================= */

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

.duration-option {
  width: 100%;
  min-height: 62px;
  padding: 13px 10px;

  border: 1px solid var(--line);
  border-radius: 13px;

  background: #fff;
  color: var(--text);

  text-align: center;
  box-shadow: none;

  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.duration-option:hover {
  border-color: #a9bef0;
  background: #fafcff;
}

.duration-option.is-selected,
.duration-option[aria-pressed="true"] {
  border-color: var(--blue);

  background: var(--blue-soft);
  color: var(--blue);

  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

/* =========================================================
   이동수단 및 카테고리 복수 선택
   ========================================================= */

.choice-section {
  display: grid;
  gap: 9px;
}

.choice-section-title {
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

.choice-help {
  margin: -2px 0 0;

  color: var(--muted);

  font-size: 12px;
  line-height: 1.45;
}

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

.wizard-choice {
  width: 100%;
  min-height: 60px;
  padding: 13px 14px;

  border: 1px solid var(--line);
  border-radius: 13px;

  background: #fff;
  color: var(--text);

  text-align: left;
  box-shadow: none;

  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.wizard-choice:hover {
  border-color: #a9bef0;
  background: #fafcff;
}

.wizard-choice.is-selected,
.wizard-choice[aria-pressed="true"] {
  border-color: var(--blue);

  background: var(--blue-soft);
  color: var(--blue);

  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.wizard-choice strong {
  display: block;
  font-size: 14px;
}

.wizard-choice span {
  display: block;
  margin-top: 3px;

  color: var(--muted);

  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.wizard-choice.is-selected span,
.wizard-choice[aria-pressed="true"] span {
  color: #526d9f;
}

/* =========================================================
   단일 우선순위 선택
   ========================================================= */

.segmented-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented-control button {
  min-height: 40px;
  padding: 9px 12px;

  border: 1px solid var(--line);
  border-radius: 999px;

  background: #fff;
  color: #475569;

  box-shadow: none;
}

.segmented-control button:hover {
  border-color: #a9bef0;
}

.segmented-control button.is-selected,
.segmented-control button[aria-pressed="true"] {
  border-color: var(--blue);

  background: var(--blue-soft);
  color: var(--blue);
}

/* =========================================================
   Wizard 체크박스
   ========================================================= */

.checkbox-field {
  padding: 12px 14px;

  display: flex;
  align-items: flex-start;
  gap: 12px;

  border: 1px solid var(--line);
  border-radius: 12px;

  background: #fbfdff;
}

.checkbox-field input {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  flex: 0 0 24px;

  margin: 0;
  cursor: pointer;
  accent-color: var(--blue);
}

.checkbox-field-content {
  display: grid;
  gap: 3px;
}

.checkbox-field-content strong {
  font-size: 14px;
}

.checkbox-field-content span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

/* 기존 구조 호환용 */

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

  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.checkbox-row input {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  flex: 0 0 24px;

  margin: 0;
  cursor: pointer;
  accent-color: var(--blue);
}

/* =========================================================
   Wizard 최종 확인
   ========================================================= */

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

.wizard-summary-card {
  min-width: 0;
  padding: 13px;

  display: grid;
  gap: 5px;

  border: 1px solid var(--line);
  border-radius: 12px;

  background: #fbfdff;
}

.wizard-summary-card strong {
  color: #475569;
  font-size: 12px;
}

.wizard-summary-card span {
  overflow-wrap: anywhere;

  color: var(--text);

  font-size: 14px;
  font-weight: 750;
}

.wizard-error {
  padding: 11px 13px;

  border: 1px solid #fecaca;
  border-radius: 11px;

  background: #fff7f7;
  color: var(--red-text);

  font-size: 13px;
  line-height: 1.45;
}

/* =========================================================
   Wizard 하단 버튼
   ========================================================= */

.wizard-actions {
  position: sticky;
  bottom: -28px;
  z-index: 3;

  display: flex;
  justify-content: flex-end;
  gap: 10px;

  margin: 2px -28px -28px;
  padding: 16px 28px 28px;

  border-top: 1px solid rgba(229, 235, 242, 0.95);

  background:
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.9),
      #fff 28%
    );

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.wizard-actions button {
  min-height: 46px;
  padding: 11px 18px;
}

.wizard-actions .primary-btn {
  min-width: 100px;
}

/* =========================================================
   디버그
   ========================================================= */

.debug-panel {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

pre {
  max-height: 220px;
  overflow: auto;

  padding: 12px;

  border-radius: 10px;

  background: #0f172a;
  color: #e2e8f0;

  font-size: 12px;
}

/* =========================================================
   태블릿
   ========================================================= */

@media (max-width: 1180px) {
  .app-shell.has-trip .planner-layout,
  .planner-layout:has(.itinerary-panel:not(.hidden)) {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
  }
}

/* =========================================================
   작은 태블릿 및 모바일
   ========================================================= */

@media (max-width: 820px) {
  .planner-layout,
  .app-shell.has-trip .planner-layout,
  .planner-layout:has(.itinerary-panel:not(.hidden)) {
    grid-template-columns: 1fr;
  }

  .map-panel {
    min-height: 520px;
  }

  .wizard-backdrop {
    align-items: end;
    padding: 0;
  }

  .wizard-card {
    width: 100%;
    max-height: 92dvh;

    padding: 22px 18px;

    border-radius: 22px 22px 0 0;
  }

  .wizard-actions {
    bottom: -22px;

    margin: 2px -18px -22px;
    padding: 14px 18px 22px;
  }

  .duration-grid,
  .wizard-choice-grid,
  .wizard-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   모바일
   ========================================================= */

@media (max-width: 560px) {
  .topbar {
    height: 58px;
    padding: 0 14px;
  }

  .brand-subtitle {
    display: none;
  }

  .planner-layout {
    gap: 8px;
    padding: 8px;
  }

  .panel-head,
  .section-head,
  .route-card-head,
  .alt-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-row,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .wizard-header h3 {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .duration-grid,
  .wizard-choice-grid,
  .wizard-summary {
    grid-template-columns: 1fr;
  }

  .wizard-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .wizard-actions button {
    width: 100%;
  }
}

.wizard-content {
  display: block;
  min-height: 180px;
}

.wizard-content .wizard-grid {
  display: grid;
  gap: 14px;
}

.wizard-content .wizard-field {
  display: grid;
  gap: 7px;
} 

.random-trip-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  min-height: 40px;
  padding: 0 14px;

  border: 1px solid #dfe7e2;
  border-radius: 10px;

  background: #ffffff;

  color: #17211b;

  font-size: 14px;
  font-weight: 700;

  text-decoration: none;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.random-trip-open-btn:hover {
  background: #f3f7f4;
  border-color: #cbd9cf;
  transform: translateY(-1px);
}

.random-trip-open-icon {
  font-size: 16px;
  line-height: 1;
}

/* =========================================================
   일정 중심 레이아웃
   ========================================================= */

.app-shell.has-trip .planner-layout,
.planner-layout:has(
  .itinerary-panel:not(.hidden)
) {
  grid-template-columns:
    minmax(0, 3fr)
    minmax(460px, 2fr);

  align-items: start;
}


/*
  지도 높이를 제한하여
  일정 영역이 더 잘 보이게 한다.
*/
.map-panel {
  min-height: 0;
  height: calc(100dvh - 92px);
  max-height: 760px;
}

.map {
  min-height: 440px;
}


/*
  일정 패널을 지도와 같은 높이로 맞추고
  내부 일정만 스크롤되게 한다.
*/
.itinerary-panel {
  height: calc(100dvh - 92px);
  max-height: 760px;

  overflow-y: auto;

  border-color: #cbdcd1;
  background: #fffdf9;
}


/* =========================================================
   파란색 잔여 스타일 제거
   ========================================================= */

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);

  box-shadow:
    0 0 0 3px
    rgba(47, 107, 79, 0.12);
}

.ghost:hover,
.wizard-open-btn:hover {
  background: #dcece2;
}

.wizard-open-btn {
  border-color: #cfe1d6;
}

.map {
  background:
    linear-gradient(
      180deg,
      #fbfdfb 0%,
      #eaf4ee 100%
    );
}

.itinerary-card.active {
  border-color: var(--blue);

  box-shadow:
    0 0 0 2px
    rgba(47, 107, 79, 0.08);
}


/* =========================================================
   지도 제목 및 안내
   ========================================================= */

.map-panel .section-head {
  align-items: flex-start;
}

.map-order-note {
  margin: 5px 0 0;

  color: var(--muted);

  font-size: 12px;
  line-height: 1.4;
}


/* =========================================================
   일정 패널 강조
   ========================================================= */

.itinerary-section-head {
  margin-bottom: 2px;
}

.section-eyebrow {
  display: block;

  margin-bottom: 4px;

  color: var(--blue);

  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.summary {
  background: #f8fbf7;
}

.route-card {
  padding: 12px;

  border-color: #e1e7e2;

  box-shadow:
    0 2px 7px
    rgba(38, 49, 43, 0.035);
}


/* =========================================================
   카카오맵 길찾기 버튼
   ========================================================= */

.kakao-route-btn {
  width: 100%;
  min-height: 62px;

  padding: 11px 14px;

  display: grid;

  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto;

  align-items: center;
  gap: 11px;

  border: 1px solid #ead500;
  border-radius: 13px;

  background: var(--kakao);
  color: #191919;

  text-align: left;

  box-shadow:
    0 6px 16px
    rgba(80, 69, 0, 0.12);

  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.kakao-route-btn:hover:not(
  :disabled
) {
  background: #ffea2e;

  transform:
    translateY(-1px);

  box-shadow:
    0 9px 20px
    rgba(80, 69, 0, 0.16);
}

.kakao-route-btn:active:not(
  :disabled
) {
  transform:
    translateY(0);
}

.kakao-route-icon {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border-radius: 11px;

  background: #191919;
  color: var(--kakao);

  font-size: 15px;
  font-weight: 900;
}

.kakao-route-btn
  > span:nth-child(2) {
  min-width: 0;

  display: grid;
  gap: 2px;
}

.kakao-route-btn strong {
  font-size: 14px;
}

.kakao-route-btn small {
  overflow: hidden;

  color:
    rgba(
      25,
      25,
      25,
      0.68
    );

  font-size: 11px;
  font-weight: 650;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.kakao-route-arrow {
  font-size: 20px;
  font-weight: 800;
}


/* =========================================================
   태블릿
   ========================================================= */

@media (
  max-width: 1180px
) {
  .app-shell.has-trip
    .planner-layout,

  .planner-layout:has(
    .itinerary-panel:not(.hidden)
  ) {
    grid-template-columns:
      minmax(0, 1.1fr)
      minmax(400px, 0.9fr);
  }
}


/* =========================================================
   모바일에서는 일정을 먼저 표시
   ========================================================= */

@media (
  max-width: 900px
) {
  .planner-layout,

  .app-shell.has-trip
    .planner-layout,

  .planner-layout:has(
    .itinerary-panel:not(.hidden)
  ) {
    grid-template-columns:
      1fr;
  }

  .itinerary-panel {
    order: 1;

    height: auto;
    max-height: none;

    overflow-y: visible;
  }

  .map-panel {
    order: 2;

    height: 560px;
    max-height: none;
  }
}


@media (
  max-width: 560px
) {
  .map-panel {
    height: 440px;
    min-height: 440px;
  }

  .map {
    min-height: 340px;
  }

  .kakao-route-btn small {
    white-space: normal;
  }
}

/* =========================================================
   B안: 지도 중심 랜덤 여행 랜딩 화면
   기존 Wizard/일정/지도 기능은 유지하고 첫 화면만 재구성
   ========================================================= */

:root {
  --lime: #b7f238;
  --lime-hover: #a8e42c;
  --lime-soft: #effbd6;
  --forest: #123f2d;
  --cream: #fbfaf4;
}

body {
  background: var(--cream);
}

.topbar {
  height: 72px;
  padding: 0 clamp(18px, 4vw, 64px);
  background: rgba(255, 255, 252, 0.96);
  border-bottom-color: rgba(47, 107, 79, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand strong {
  color: var(--forest);
  font-size: 20px;
  letter-spacing: -0.04em;
}

.brand-mark {
  border-radius: 50% 50% 48% 52%;
  background: var(--lime);
  color: var(--forest);
  box-shadow: 0 6px 16px rgba(95, 148, 34, 0.22);
}

.planner-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 0;
}

.map-panel {
  position: relative;
  height: calc(100dvh - 72px);
  min-height: 640px;
  max-height: none;
  padding: 0;
  gap: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #eaf4ee;
}

.map-result-head {
  display: none;
}

.map-stage {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.map-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(251, 250, 244, 0.5) 0%, rgba(251, 250, 244, 0.1) 38%, transparent 63%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 35%);
}

.map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
}

.hero-card {
  position: absolute;
  z-index: 12;
  top: 50%;
  left: clamp(28px, 5.2vw, 92px);
  width: min(560px, calc(100% - 56px));
  padding: clamp(28px, 3vw, 46px);
  transform: translateY(-50%);
  border: 1px solid rgba(47, 107, 79, 0.16);
  border-radius: 28px;
  background: rgba(255, 254, 249, 0.95);
  box-shadow: 0 28px 72px rgba(31, 67, 48, 0.2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.hero-card h1 {
  margin: 0;
  color: var(--forest);
  font-size: clamp(34px, 3.1vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.hero-description {
  margin: 16px 0 22px;
  color: #53645b;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.65;
}

.setup-panel {
  display: block !important;
  min-width: 0;
}

.setup-summary-card {
  display: grid;
  gap: 13px;
}

.setup-summary-title {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.setup-summary-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #dfe8df;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
}

.setup-summary-row {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border-right: 1px solid #e4ebe5;
}

.setup-summary-row:nth-child(3) {
  border-right: 0;
}

.setup-summary-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.setup-summary-row strong {
  overflow: hidden;
  color: var(--forest);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-summary-preference {
  display: none;
}

.hero-start-btn {
  width: 100%;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 17px;
  background: linear-gradient(135deg, #c7f94b 0%, var(--lime) 54%, #a7e92c 100%);
  color: #183522;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 13px 26px rgba(113, 174, 34, 0.25);
}

.hero-start-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #d0fb5b 0%, var(--lime-hover) 100%);
  transform: translateY(-1px);
}

.hero-suggestion-wrap {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e7ece7;
}

.hero-suggestion-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.hero-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-suggestions span {
  padding: 8px 11px;
  border: 1px solid #dfe9df;
  border-radius: 999px;
  background: #fff;
  color: #31503e;
  font-size: 12px;
  font-weight: 750;
}

.hero-random-link {
  margin-top: 17px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.hero-random-link:hover {
  text-decoration: underline;
}

.map-empty-state {
  inset: auto 28px 28px auto;
  z-index: 8;
  width: min(380px, calc(100% - 56px));
  display: grid;
  place-content: initial;
  gap: 5px;
  padding: 16px 18px;
  text-align: left;
  border: 1px solid rgba(47, 107, 79, 0.15);
  border-radius: 16px;
  background: rgba(255, 254, 249, 0.9);
  box-shadow: 0 12px 30px rgba(38, 49, 43, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.map-empty-state strong {
  font-size: 13px;
}

.map-empty-state span {
  max-width: none;
  font-size: 12px;
}

.map-fallback {
  position: absolute;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
}

.app-shell.is-generating .hero-card {
  pointer-events: none;
  opacity: 0.72;
  transform: translateY(-50%) scale(0.985);
}

.app-shell.is-generating .map-empty-state {
  border-color: rgba(155, 220, 40, 0.55);
}

/* 일정이 생성된 뒤에는 기존 지도 + 일정 2열 구조로 전환 */
.app-shell.has-trip .planner-layout,
.planner-layout:has(.itinerary-panel:not(.hidden)) {
  grid-template-columns: minmax(0, 3fr) minmax(420px, 2fr);
  align-items: start;
  gap: 14px;
  padding: 14px;
}

.app-shell.has-trip .map-panel,
.planner-layout:has(.itinerary-panel:not(.hidden)) .map-panel {
  height: calc(100dvh - 100px);
  min-height: 560px;
  max-height: 780px;
  padding: 14px;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  background: var(--panel);
}

.app-shell.has-trip .map-result-head,
.planner-layout:has(.itinerary-panel:not(.hidden)) .map-result-head {
  display: flex;
  flex: 0 0 auto;
}

.app-shell.has-trip .map-stage,
.planner-layout:has(.itinerary-panel:not(.hidden)) .map-stage {
  min-height: 0;
  border-radius: 12px;
}

.app-shell.has-trip .map,
.planner-layout:has(.itinerary-panel:not(.hidden)) .map {
  border: 1px solid var(--line);
  border-radius: 12px;
}

.app-shell.has-trip .map-stage::after,
.planner-layout:has(.itinerary-panel:not(.hidden)) .map-stage::after,
.app-shell.has-trip .hero-card,
.planner-layout:has(.itinerary-panel:not(.hidden)) .hero-card {
  display: none;
}

.app-shell.has-trip .itinerary-panel,
.planner-layout:has(.itinerary-panel:not(.hidden)) .itinerary-panel {
  height: calc(100dvh - 100px);
  max-height: 780px;
}

@media (max-width: 1180px) {
  .hero-card {
    left: 28px;
    width: min(520px, calc(100% - 56px));
  }

  .app-shell.has-trip .planner-layout,
  .planner-layout:has(.itinerary-panel:not(.hidden)) {
    grid-template-columns: minmax(0, 1.1fr) minmax(390px, 0.9fr);
  }
}

@media (max-width: 900px) {
  .app-shell.has-trip .planner-layout,
  .planner-layout:has(.itinerary-panel:not(.hidden)) {
    grid-template-columns: 1fr;
  }

  .app-shell.has-trip .itinerary-panel,
  .planner-layout:has(.itinerary-panel:not(.hidden)) .itinerary-panel {
    order: 1;
    height: auto;
    max-height: none;
  }

  .app-shell.has-trip .map-panel,
  .planner-layout:has(.itinerary-panel:not(.hidden)) .map-panel {
    order: 2;
    height: 560px;
    min-height: 560px;
    max-height: none;
  }
}

@media (max-width: 700px) {
  .topbar {
    height: 60px;
    padding: 0 14px;
  }

  .topbar .pill,
  .topbar .wizard-open-btn {
    display: none;
  }

  .random-trip-open-btn {
    min-height: 36px;
    padding: 0 11px;
    font-size: 12px;
  }

  .map-panel {
    height: calc(100dvh - 60px);
    min-height: 690px;
  }

  .map-stage::after {
    background: linear-gradient(180deg, transparent 25%, rgba(251, 250, 244, 0.18) 54%, rgba(251, 250, 244, 0.58) 100%);
  }

  .hero-card {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    padding: 24px 20px;
    transform: none;
    border-radius: 22px;
  }

  .app-shell.is-generating .hero-card {
    transform: scale(0.985);
  }

  .hero-card h1 {
    font-size: 32px;
  }

  .hero-description {
    margin: 12px 0 17px;
    font-size: 14px;
  }

  .hero-description br {
    display: none;
  }

  .setup-summary-body {
    grid-template-columns: 1fr;
  }

  .setup-summary-row {
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: center;
    padding: 9px 12px;
    border-right: 0;
    border-bottom: 1px solid #e4ebe5;
  }

  .setup-summary-row:nth-child(3) {
    border-bottom: 0;
  }

  .hero-suggestion-wrap {
    display: none;
  }

  .hero-random-link {
    margin-top: 13px;
  }

  .map-empty-state {
    top: 18px;
    right: 12px;
    bottom: auto;
    width: min(330px, calc(100% - 24px));
  }
}

@media (max-width: 430px) {
  .random-trip-open-label {
    display: none;
  }

  .random-trip-open-btn {
    width: 38px;
    padding: 0;
  }

  .hero-card {
    padding: 21px 17px;
  }

  .hero-kicker {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .hero-card h1 {
    font-size: 29px;
  }

  .hero-start-btn {
    min-height: 52px;
    font-size: 15px;
  }
}

/* 마지막 우선순위: 기존 B안 공통 규칙과의 충돌 방지 */
.home-topbar {
  position: sticky;
  top: 0;
  height: 72px;
  padding: 0 clamp(20px, 4vw, 68px);
  display: flex;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.95);
}

.home-brand {
  gap: 5px;
  color: var(--home-forest);
  text-decoration: none;
}

.home-brand strong {
  color: var(--home-forest);
  font-size: 22px;
  font-weight: 950;
}

.result-layout {
  display: none;
}

.app-shell.has-trip .landing-screen {
  display: none;
}

.app-shell.has-trip .result-layout,
.result-layout:has(.itinerary-panel:not(.hidden)) {
  display: grid;
}

@media (max-width: 700px) {
  .home-topbar {
    height: 62px;
    padding: 0 14px;
  }

  .home-brand strong {
    font-size: 19px;
  }
}

+/* =========================================================
   여행 결과 화면 — 여행 노트 시안
   기존 지도/일정 기능은 유지하고 결과 화면의 표현만 통일한다.
   ========================================================= */

.app-shell.has-trip {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 63% 15%, rgba(248, 221, 161, 0.32) 0 58px, transparent 59px),
    linear-gradient(180deg, #fbfcf8 0%, #f5f9ef 70%, #e3f2ce 100%);
}

.app-shell.has-trip .result-layout,
.result-layout:has(.itinerary-panel:not(.hidden)) {
  position: relative;
  width: min(1680px, calc(100% - 48px));
  margin: 0 auto;
  padding: 10px 0 16px;
  grid-template-columns: minmax(0, 1.42fr) minmax(430px, 1fr);
  column-gap: 14px;
  row-gap: 10px;
  align-items: start;
}

.app-shell.has-trip .result-layout::before,
.result-layout:has(.itinerary-panel:not(.hidden))::before {
  content: "";
  position: fixed;
  z-index: 0;
  right: 0;
  bottom: 0;
  left: 0;
  height: 180px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 8% 110%, #a9d878 0 22%, transparent 22.5%),
    radial-gradient(ellipse at 42% 125%, #cce9a8 0 31%, transparent 31.5%),
    radial-gradient(ellipse at 84% 125%, #a7d36f 0 31%, transparent 31.5%);
  opacity: 0.82;
}

.result-notebook-hero,
.app-shell.has-trip .map-panel,
.app-shell.has-trip .itinerary-panel,
.result-action-bar {
  position: relative;
  z-index: 1;
}

.result-notebook-hero {
  grid-column: 1 / -1;
  min-height: 70px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.result-notebook-kicker {
  display: block;
  margin-bottom: 2px;
  color: #78ad39;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.result-notebook-hero h1 {
  margin: 0;
  color: var(--home-forest);
  font-size: clamp(28px, 2.6vw, 42px);
  font-weight: 950;
  letter-spacing: -0.045em;
}

.result-notebook-hero > div > p {
  margin: 6px 0 0;
  color: #5f7467;
  font-size: 15px;
  font-weight: 650;
}

.result-notebook-message {
  margin: 0;
  color: #4d6a58;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
  text-align: right;
  transform: rotate(-2deg);
}

.result-notebook-message span {
  color: #86bc48;
}

.app-shell.has-trip .map-panel,
.planner-layout:has(.itinerary-panel:not(.hidden)) .map-panel,
.app-shell.has-trip .itinerary-panel,
.planner-layout:has(.itinerary-panel:not(.hidden)) .itinerary-panel {
  height: clamp(680px, calc(100dvh - 200px), 900px);
  min-height: 680px;
  max-height: 900px;
  border: 1px solid rgba(51, 101, 68, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 36px rgba(38, 72, 48, 0.10);
}

.app-shell.has-trip .map-panel,
.planner-layout:has(.itinerary-panel:not(.hidden)) .map-panel {
  padding: 16px;
  gap: 12px;
}

.app-shell.has-trip .map-result-head,
.planner-layout:has(.itinerary-panel:not(.hidden)) .map-result-head {
  min-height: 66px;
  padding: 0 2px;
}

.map-result-head h2,
.itinerary-section-head h2 {
  color: #173d2b;
  letter-spacing: -0.025em;
}

.map-result-head h2::before {
  content: "●";
  margin-right: 8px;
  color: #83bc45;
  font-size: 0.65em;
  vertical-align: 0.12em;
}

.map-order-note {
  color: #718078;
  font-size: 12px;
}

.app-shell.has-trip .map-stage,
.planner-layout:has(.itinerary-panel:not(.hidden)) .map-stage,
.app-shell.has-trip .map,
.planner-layout:has(.itinerary-panel:not(.hidden)) .map {
  border-radius: 16px;
}

.app-shell.has-trip .map,
.planner-layout:has(.itinerary-panel:not(.hidden)) .map {
  border-color: rgba(54, 99, 68, 0.16);
}

.app-shell.has-trip .itinerary-panel,
.planner-layout:has(.itinerary-panel:not(.hidden)) .itinerary-panel {
  padding: 18px;
  gap: 11px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 0 42px, #eef6e8 0 5px, transparent 5.5px) 0 0 / 100% 38px repeat-y,
    rgba(255, 255, 255, 0.97);
}

.itinerary-section-head {
  min-height: 52px;
  margin: 0;
  padding-left: 14px;
}

.itinerary-section-head .section-eyebrow {
  color: #78ad39;
}

.status.done {
  background: #eaf8e4;
  color: #286a43;
}

.kakao-route-btn {
  min-height: 54px;
  margin-left: 14px;
  width: calc(100% - 14px);
  border: 1px solid #cfe2b8;
  border-radius: 13px;
  background: #eaf5d4;
  color: #234d35;
  box-shadow: 0 5px 14px rgba(48, 91, 58, 0.09);
}

.kakao-route-btn:hover:not(:disabled) {
  background: #e1f0c6;
  box-shadow: 0 8px 18px rgba(48, 91, 58, 0.12);
}

.kakao-route-icon {
  background: #18211d;
  color: #ddefb9;
}

.kakao-route-btn small {
  color: #68806f;
}

.summary {
  position: relative;
  margin-left: 14px;
  padding: 15px 16px 15px 48px;
  gap: 7px;
  border-color: #d8e8c8;
  border-radius: 16px;
  background: linear-gradient(135deg, #f5faee, #edf6e3);
  color: #4f6456;
  box-shadow: inset 0 -3px 0 rgba(126, 175, 72, 0.07);
}

.summary::before {
  content: "♣";
  position: absolute;
  top: 16px;
  left: 17px;
  color: #77ad3c;
  font-size: 21px;
  transform: rotate(35deg);
}

.summary-main {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: #234c35;
  font-size: 13px;
}

.summary-main strong {
  font-weight: 900;
}

.summary-line {
  font-size: 12px;
  line-height: 1.45;
}

.day-tabs {
  margin: 0 0 -1px 14px;
  gap: 6px;
}

.day-tab {
  min-width: 92px;
  padding: 9px 16px;
  border-radius: 14px 14px 7px 7px;
  background: #f0f5eb;
  color: #69806f;
  font-weight: 850;
}

.day-tab.active {
  background: linear-gradient(135deg, #76ad39, #2b6a45);
  color: #fff;
  box-shadow: 0 5px 12px rgba(43, 106, 69, 0.16);
}

.itinerary-content {
  margin-left: 14px;
}

.itinerary-card,
.itinerary-card.active {
  padding: 13px;
  border-color: #dbe7d8;
  border-radius: 17px;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.95);
}

.itinerary-card-head {
  padding: 1px 2px 10px;
}

.itinerary-card-head strong {
  color: #264b36;
}

.badge-pill {
  background: #eff6dc;
  color: #5f7428;
}

.route-list {
  position: relative;
  gap: 11px;
  margin-top: 4px;
}

.route-list::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 18px;
  border-left: 3px dotted #a7cf78;
}

.route-card {
  position: relative;
  z-index: 1;
  padding: 9px 10px 9px 7px;
  border-color: #dfe8dc;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(40, 73, 49, 0.055);
}

.route-card-head {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.route-card-copy {
  min-width: 0;
}

.route-thumb {
  width: 74px;
  height: 58px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eef5e8;
}

.route-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.route-thumb.is-placeholder {
  color: #72a946;
  font-size: 22px;
}

.route-title {
  color: #1f3528;
  font-size: 14px;
}

.order {
  min-width: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(145deg, #75b23a, #2b6a45);
  box-shadow: 0 0 0 3px #f4f9ef;
}

.route-card .meta {
  margin: 5px 0 0 32px;
  color: #718079;
  font-size: 11px;
  line-height: 1.4;
}

.route-exclude-btn {
  border: 1px solid #f3dddd;
  background: #fff5f5;
  color: #c64c4c;
}

.alternatives {
  margin-left: 14px;
}

.alternatives.empty {
  display: none;
}

.result-action-bar {
  grid-column: 1 / -1;
  min-height: 62px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(51, 101, 68, 0.15);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(38, 72, 48, 0.08);
}

.result-action-bar > div {
  display: flex;
  gap: 9px;
}

.result-action-secondary,
.result-action-primary {
  min-height: 44px;
  padding: 0 19px;
  border-radius: 12px;
  font-weight: 850;
}

.result-action-secondary {
  border: 1px solid #d2dfd3;
  background: #fff;
  color: #315b42;
}

.result-action-secondary:hover {
  background: #f2f7ed;
}

.result-action-primary {
  min-width: 210px;
  background: #286644;
  color: #fff;
  box-shadow: 0 7px 16px rgba(40, 102, 68, 0.17);
}

.result-action-primary:hover {
  background: #205638;
}

@media (max-width: 1180px) {
  .app-shell.has-trip .result-layout,
  .result-layout:has(.itinerary-panel:not(.hidden)) {
    width: min(100% - 28px, 1280px);
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  }

  .route-card-head {
    grid-template-columns: 60px minmax(0, 1fr) auto;
  }

  .route-thumb {
    width: 60px;
    height: 54px;
  }
}

@media (max-width: 900px) {
  .app-shell.has-trip .result-layout,
  .result-layout:has(.itinerary-panel:not(.hidden)) {
    grid-template-columns: 1fr;
  }

  .result-notebook-hero,
  .result-action-bar {
    grid-column: 1;
  }

  .app-shell.has-trip .itinerary-panel,
  .planner-layout:has(.itinerary-panel:not(.hidden)) .itinerary-panel,
  .app-shell.has-trip .map-panel,
  .planner-layout:has(.itinerary-panel:not(.hidden)) .map-panel {
    height: auto;
    min-height: 600px;
    max-height: none;
  }

  .app-shell.has-trip .map-panel,
  .planner-layout:has(.itinerary-panel:not(.hidden)) .map-panel {
    height: 620px;
  }
}

@media (max-width: 620px) {
  .app-shell.has-trip .result-layout,
  .result-layout:has(.itinerary-panel:not(.hidden)) {
    width: min(100% - 20px, 620px);
    padding-top: 10px;
  }

  .result-notebook-hero {
    min-height: 80px;
    padding: 0 6px;
  }

  .result-notebook-message {
    display: none;
  }

  .result-notebook-hero h1 {
    font-size: 28px;
  }

  .app-shell.has-trip .itinerary-panel,
  .planner-layout:has(.itinerary-panel:not(.hidden)) .itinerary-panel {
    padding: 13px;
  }

  .kakao-route-btn,
  .summary,
  .day-tabs,
  .itinerary-content,
  .alternatives {
    margin-left: 0;
    width: 100%;
  }

  .route-card-head {
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .route-thumb {
    width: 54px;
    height: 52px;
  }

  .route-actions {
    align-self: start;
  }

  .route-exclude-btn {
    padding: 6px 7px;
    font-size: 11px;
  }

  .result-action-bar,
  .result-action-bar > div {
    align-items: stretch;
    flex-direction: column;
  }

  .result-action-primary {
    min-width: 0;
  }
}

@media print {
  .home-topbar,
  .kakao-route-btn,
  .result-action-bar,
  .route-exclude-btn,
  .map-result-head .ghost {
    display: none !important;
  }

  .app-shell.has-trip .result-layout {
    width: 100%;
    padding: 0;
  }

  .app-shell.has-trip .map-panel,
  .app-shell.has-trip .itinerary-panel {
    height: auto;
    max-height: none;
    overflow: visible;
    box-shadow: none;
  }
}
