:root {
  --paper: #f4efe7;
  --paper-deep: #e9e0d2;
  --card: #fffdf9;
  --ink: #17211d;
  --muted: #687069;
  --line: rgba(23, 33, 29, 0.13);
  --line-strong: rgba(23, 33, 29, 0.22);
  --accent: #df5d3f;
  --accent-dark: #a53a25;
  --moss: #274e42;
  --soft-moss: #e2ebe5;
  --gold: #d2a54e;
  --shadow: 0 22px 70px rgba(34, 40, 35, 0.08);
  --radius-lg: 26px;
  --radius-md: 17px;
  --radius-sm: 11px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Aptos", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
  line-height: 1.5;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 10% 5%, rgba(223, 93, 63, 0.08), transparent 28rem),
    var(--paper);
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
::selection { color: var(--ink); background: rgba(223, 93, 63, 0.2); }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(223, 93, 63, 0.26);
  outline-offset: 3px;
}

.site-header,
.site-footer {
  width: min(1380px, calc(100% - 64px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
}

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50% 50% 50% 8px;
  color: #fff;
  background: var(--moss);
  font-family: Georgia, serif;
  font-size: 19px;
  font-style: italic;
}

.brand strong,
.brand small { display: block; line-height: 1.05; }
.brand strong { font-size: 16px; letter-spacing: 0.14em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: 0.3em; }

.header-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.header-note span { margin-right: 7px; color: #4c8369; font-size: 8px; }

.header-actions { display: flex; align-items: center; gap: 18px; }
.account-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px 4px 5px;
  cursor: pointer;
  color: var(--moss);
  background: rgba(255, 253, 249, 0.72);
  font-size: 10px;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.account-button:hover { transform: translateY(-1px); border-color: var(--moss); background: var(--soft-moss); }
.account-button[hidden] { display: none; }
.account-button__icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #fff; background: var(--moss); font-size: 10px; font-weight: 800; }
.account-button strong { font-weight: 800; white-space: nowrap; }
.account-button.is-authenticated .account-button__icon { background: var(--accent); }
.account-button--planner { min-height: 38px; }

.auth-dialog {
  width: min(430px, calc(100% - 28px));
  max-width: none;
  margin: auto;
  overflow: visible;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
}
.auth-dialog::backdrop { background: rgba(18, 25, 22, 0.5); backdrop-filter: blur(6px); }
.auth-card { position: relative; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 26px; padding: 34px; background: var(--card); box-shadow: 0 28px 90px rgba(17, 27, 22, 0.26); }
.auth-card::before { position: absolute; top: -90px; right: -70px; width: 190px; height: 190px; border-radius: 50%; background: rgba(223, 93, 63, 0.08); content: ""; }
.auth-close { position: absolute; z-index: 2; top: 17px; right: 17px; display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 50%; cursor: pointer; color: var(--muted); background: rgba(23, 33, 29, 0.05); font-size: 22px; font-weight: 300; line-height: 1; }
.auth-close:hover { color: var(--ink); background: rgba(23, 33, 29, 0.09); }
.auth-mark { display: grid; width: 43px; height: 43px; margin-bottom: 24px; place-items: center; border-radius: 50% 50% 50% 10px; color: #fff; background: var(--moss); font-family: Georgia, serif; font-size: 21px; font-style: italic; }
.auth-view[hidden] { display: none; }
.auth-view h2 { margin-bottom: 10px; font-family: Georgia, "Songti SC", serif; font-size: 30px; font-weight: 550; letter-spacing: -0.03em; }
.auth-view .eyebrow { margin-bottom: 8px; }
.auth-lead { margin-bottom: 24px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.auth-lead strong { color: var(--ink); }
.auth-form { display: grid; gap: 10px; }
.auth-form label { font-size: 11px; font-weight: 750; }
.phone-input-row { display: grid; min-height: 50px; grid-template-columns: auto 1fr; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color 160ms ease, box-shadow 160ms ease; }
.phone-input-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(223, 93, 63, 0.08); }
.phone-input-row > span { padding: 0 12px 0 14px; border-right: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.phone-input-row input { min-height: 48px; border: 0; padding-inline: 12px; box-shadow: none; }
.phone-input-row input:focus { box-shadow: none; }
.code-input { min-height: 56px; text-align: center; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 22px; font-weight: 700; letter-spacing: 0.42em; }
.auth-primary, .auth-secondary { min-height: 48px; border-radius: 12px; padding: 0 16px; cursor: pointer; font-size: 12px; font-weight: 800; }
.auth-primary { margin-top: 5px; border: 1px solid var(--moss); color: #fff; background: var(--moss); box-shadow: 0 12px 24px rgba(39, 78, 66, 0.15); }
.auth-primary:hover { background: #1e4036; }
.auth-primary:disabled, .auth-secondary:disabled { cursor: wait; opacity: 0.6; }
.auth-secondary { width: 100%; border: 1px solid var(--line); color: var(--muted); background: #fff; }
.auth-secondary:hover { border-color: var(--accent); color: var(--accent-dark); }
.auth-code-actions { display: flex; justify-content: space-between; margin-top: 12px; }
.auth-code-actions button { border: 0; padding: 3px 0; cursor: pointer; color: var(--moss); background: transparent; font-size: 10px; text-decoration: underline; text-decoration-color: rgba(39, 78, 66, 0.25); text-underline-offset: 3px; }
.auth-code-actions button:disabled { cursor: default; color: #9a9e99; text-decoration: none; }
.auth-message { min-height: 18px; margin: 13px 0 0; color: var(--moss); font-size: 10px; line-height: 1.5; }
.auth-message.error { color: var(--accent-dark); }
.auth-debug-code { margin: 16px 0 -3px; border: 1px dashed rgba(39, 78, 66, 0.3); border-radius: 10px; padding: 9px 11px; color: var(--moss); background: var(--soft-moss); font-size: 11px; font-weight: 750; text-align: center; }
.auth-wechat-note { margin: 19px 0 0; border-top: 1px solid var(--line); padding-top: 16px; color: #929993; font-size: 10px; text-align: center; }
.account-summary { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 13px; align-items: center; margin: 4px 0 22px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: rgba(226, 235, 229, 0.45); }
.account-avatar { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); font-family: Georgia, "Songti SC", serif; font-size: 16px; }
.account-summary strong, .account-summary small { display: block; }
.account-summary strong { font-size: 13px; }
.account-summary small { margin-top: 4px; color: var(--muted); font-size: 10px; }

.home-shell {
  width: min(1380px, calc(100% - 64px));
  margin: 0 auto;
  padding: 54px 0 70px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(440px, 0.82fr);
  gap: clamp(40px, 7vw, 110px);
  align-items: center;
}

.home-copy { min-width: 0; padding: 18px 0; }

.eyebrow,
.section-kicker {
  margin-bottom: 13px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-copy h1 {
  max-width: 760px;
  margin-bottom: 25px;
  font-family: Georgia, "Songti SC", "SimSun", serif;
  font-size: clamp(48px, 5.7vw, 82px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.hero-lead {
  max-width: 610px;
  margin-bottom: 36px;
  color: #4f5a53;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.82;
}

.route-preview {
  max-width: 680px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.56);
}

.preview-head,
.preview-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

.preview-head { border-bottom: 1px solid var(--line); font-size: 12px; }
.preview-head strong { color: var(--accent-dark); font-size: 10px; letter-spacing: 0.15em; }

.preview-route {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 28px 24px 24px;
}

.preview-line {
  position: absolute;
  top: 42px;
  right: 14%;
  left: 14%;
  height: 1px;
  background: var(--line-strong);
}

.preview-stop { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; }
.preview-stop i {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--moss);
  border-radius: 50%;
  color: var(--moss);
  background: var(--paper);
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}
.preview-stop:nth-child(3) i { color: #fff; background: var(--moss); }
.preview-stop small { color: var(--muted); font-size: 11px; }
.preview-foot { gap: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.request-panel,
.panel {
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.request-panel { min-width: 0; padding: clamp(25px, 3vw, 42px); }
.form-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.form-heading h2 { margin-bottom: 0; font-family: Georgia, "Songti SC", serif; font-size: 28px; font-weight: 550; }
.form-step { color: var(--muted); font-size: 10px; letter-spacing: 0.12em; }
.resume-trip {
  flex: 0 0 auto;
  border: 0;
  padding: 3px 0;
  cursor: pointer;
  color: var(--moss);
  background: transparent;
  font-size: 10px;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: rgba(39, 78, 66, 0.28);
  text-underline-offset: 4px;
}
.resume-trip:hover { color: var(--accent-dark); }

.field { position: relative; min-width: 0; margin-bottom: 20px; }
.field label { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.field label span { color: #9a9e99; font-weight: 400; }
.field-hint { display: block; margin-top: 7px; color: #939893; font-size: 10px; }

input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input, select { min-height: 48px; padding: 0 14px; }
textarea { min-height: 88px; padding: 13px 14px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #a4aaa5; }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(223, 93, 63, 0.08); outline: none; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.interest-field { min-width: 0; margin: 0 0 20px; border: 0; padding: 0; }
.interest-field legend { width: 100%; margin-bottom: 9px; padding: 0; font-size: 12px; font-weight: 700; }
.interest-field legend span { float: right; color: #9a9e99; font-size: 10px; font-weight: 400; }
.interest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.interest-grid label { position: relative; min-width: 0; }
.interest-grid input { position: absolute; width: 1px; min-height: 0; height: 1px; margin: 0; padding: 0; opacity: 0; }
.interest-grid span { display: grid; min-height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--muted); background: #fff; font-size: 10px; transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, transform 160ms ease; }
.interest-grid label:hover span { transform: translateY(-1px); border-color: var(--line-strong); }
.interest-grid input:checked + span { border-color: var(--moss); color: #fff; background: var(--moss); }
.interest-grid input:focus-visible + span { outline: 3px solid rgba(223, 93, 63, 0.26); outline-offset: 2px; }
.interest-field > small { display: block; min-height: 15px; margin-top: 7px; color: #939893; font-size: 9px; }
.actions { display: grid; gap: 12px; margin-top: 4px; }

.primary-action,
.secondary-action,
.category-grid button,
.day-card,
.stop-card,
.place-card,
.back-button,
.detail-links a {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.primary-action {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 19px;
  border: 1px solid var(--moss);
  border-radius: 13px;
  color: #fff;
  background: var(--moss);
  font-weight: 700;
  box-shadow: 0 13px 30px rgba(39, 78, 66, 0.16);
}
.primary-action b { font-size: 22px; font-weight: 400; }
.primary-action:hover { transform: translateY(-2px); background: #1e4036; box-shadow: 0 16px 32px rgba(39, 78, 66, 0.23); }
.primary-action:active { transform: translateY(0); }
.primary-action:disabled { cursor: wait; opacity: 0.72; transform: none; }

.secondary-action {
  min-height: 38px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  text-decoration: underline;
  text-decoration-color: rgba(104, 112, 105, 0.3);
  text-underline-offset: 4px;
}
.secondary-action:hover { color: var(--accent-dark); }

.form-privacy { margin: 16px 0 0; color: #89908a; font-size: 10px; text-align: center; }
.form-privacy span { color: var(--moss); }

.generation-status,
.workbench-status {
  margin-top: 16px;
  border: 1px solid rgba(39, 78, 66, 0.15);
  border-radius: 12px;
  color: var(--moss);
  background: var(--soft-moss);
  font-size: 12px;
  line-height: 1.5;
  padding: 11px 13px;
}
.generation-status { display: grid; gap: 10px; padding: 14px; }
.generation-status.running {
  position: fixed;
  z-index: 60;
  right: 18px;
  bottom: 18px;
  width: min(440px, calc(100vw - 36px));
  margin: 0;
  box-shadow: 0 18px 50px rgba(24, 49, 42, 0.2);
  backdrop-filter: blur(18px);
}
.workbench-status { display: flex; align-items: center; gap: 10px; }
.generation-status[hidden], .workbench-status[hidden] { display: none; }
.generation-status.error, .workbench-status.error { border-color: rgba(165, 58, 37, 0.18); color: #8f2e1d; background: #fae9e3; }
.generation-status__head { display: flex; min-width: 0; align-items: center; gap: 9px; }
.generation-status__head > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.generation-status__head strong { margin-left: auto; color: currentColor; font-size: 10px; white-space: nowrap; }
.generation-progress { height: 4px; overflow: hidden; border-radius: 999px; background: rgba(39, 78, 66, 0.12); }
.generation-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: currentColor; transition: width 600ms ease; }
.generation-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 0; padding: 0; list-style: none; }
.generation-steps li { position: relative; padding-top: 13px; color: rgba(39, 78, 66, 0.52); font-size: 8px; line-height: 1.35; }
.generation-steps li::before { position: absolute; top: 0; left: 0; width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%; content: ""; }
.generation-steps li.active, .generation-steps li.done { color: currentColor; }
.generation-steps li.active::before { background: currentColor; box-shadow: 0 0 0 4px rgba(39, 78, 66, 0.1); }
.generation-steps li.done::before { border-color: var(--moss); background: var(--moss); }
.generation-status.error .generation-progress, .generation-status.error .generation-steps { opacity: 0.45; }
.demo-action { min-height: 38px; border: 1px solid currentColor; border-radius: 10px; cursor: pointer; color: inherit; background: rgba(255, 255, 255, 0.48); font-size: 10px; font-weight: 750; }
.demo-action:hover { background: #fff; }
.status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }

@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.75); } }

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 64px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.workflow-strip article { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 26px 28px; }
.workflow-strip article + article { border-left: 1px solid var(--line); }
.workflow-strip article > span { color: var(--accent-dark); font-family: Georgia, serif; font-size: 12px; font-style: italic; }
.workflow-strip strong { font-family: Georgia, "Songti SC", serif; font-size: 17px; font-weight: 550; }
.workflow-strip p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent-dark); }

/* Planner */
.planner-page { background: #f3f0ea; }
.planner-topbar { position: relative; z-index: 5; padding: 22px max(24px, calc((100vw - 1380px) / 2)); }
.planner-titlebar { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.back-button { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 50%; text-decoration: none; background: rgba(255, 253, 249, 0.72); }
.back-button:hover { transform: translateX(-2px); border-color: var(--accent); color: var(--accent-dark); }
.planner-titlecopy .eyebrow { margin-bottom: 4px; }
.planner-titlecopy h1 { margin-bottom: 3px; font-family: Georgia, "Songti SC", serif; font-size: clamp(25px, 2.4vw, 36px); font-weight: 550; letter-spacing: -0.03em; }
.planner-titlecopy > p:last-child { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.draft-badge { align-self: start; margin-top: 4px; border: 1px solid rgba(165, 58, 37, 0.18); border-radius: 999px; padding: 6px 10px; color: var(--accent-dark); background: #fae8e1; font-size: 10px; font-weight: 700; }
.planner-actions { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.edit-trip-button { min-height: 38px; border: 1px solid var(--moss); border-radius: 999px; padding: 0 15px; cursor: pointer; color: #fff; background: var(--moss); font-size: 10px; font-weight: 800; }
.edit-trip-button:hover { transform: translateY(-1px); background: #1e4036; }
.export-menu { position: relative; }
.export-menu > summary { min-height: 38px; border: 1px solid var(--line); border-radius: 999px; padding: 0 13px; cursor: pointer; color: var(--moss); background: rgba(255, 253, 249, 0.78); font-size: 10px; font-weight: 750; line-height: 36px; list-style: none; }
.export-menu > summary::-webkit-details-marker { display: none; }
.export-menu[open] > summary { border-color: var(--moss); background: var(--soft-moss); }
.export-bar { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; display: grid; min-width: 210px; grid-template-columns: 1fr 1fr; gap: 7px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--card); box-shadow: 0 18px 50px rgba(23, 33, 29, 0.14); }
.export-bar .export-note { grid-column: 1 / -1; }
.export-note { margin-right: 3px; color: var(--muted); font-size: 9px; }
.export-bar button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  color: var(--moss);
  background: rgba(255, 253, 249, 0.78);
  font-size: 10px;
  font-weight: 750;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.export-bar button:hover { transform: translateY(-1px); border-color: var(--moss); background: var(--soft-moss); }
.export-bar button:disabled { cursor: wait; opacity: 0.55; transform: none; }
.export-status { min-height: 13px; color: var(--moss); font-size: 9px; }

.summary-strip { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; margin-top: 20px; }
.budget-summary, .route-summary { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 253, 249, 0.72); }
.budget-summary { display: grid; align-content: center; padding: 15px 18px; }
.budget-summary span, .summary-label span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.05em; }
.budget-summary strong { margin: 3px 0 1px; font-family: Georgia, "Songti SC", serif; font-size: 25px; font-weight: 550; }
.budget-summary small, .summary-label small { color: #949a95; font-size: 9px; }
.route-summary { display: grid; grid-template-columns: 85px minmax(0, 1fr); align-items: stretch; padding: 7px; }
.summary-label { display: grid; align-content: center; gap: 2px; padding: 8px 10px; }
.day-list { display: flex; min-width: 0; gap: 7px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity; }
.day-list::-webkit-scrollbar, .timeline::-webkit-scrollbar { display: none; }
.day-card { display: grid; min-width: 180px; max-width: 220px; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 1px 9px; align-content: center; padding: 10px 12px; border: 1px solid transparent; border-radius: 13px; text-align: left; background: transparent; scroll-snap-align: start; }
.day-card strong { grid-row: 1 / 3; align-self: center; color: var(--accent-dark); font-family: Georgia, serif; font-size: 19px; font-style: italic; font-weight: 500; }
.day-card span, .day-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-card span { font-size: 11px; font-weight: 700; }
.day-card small { color: var(--muted); font-size: 9px; }
.day-card:hover { background: rgba(255, 255, 255, 0.62); }
.day-card.active { border-color: rgba(223, 93, 63, 0.28); background: #fff6f1; }

.planner-shell { width: min(1380px, calc(100% - 40px)); margin: 0 auto; padding: 8px 0 52px; }
.trip-fit-panel { display: grid; grid-template-columns: minmax(0, 1fr) 250px; align-items: center; gap: 34px; margin-bottom: 12px; padding: 27px 30px; }
.trip-fit-copy .section-kicker { margin-bottom: 4px; font-size: 9px; }
.trip-fit-copy h2 { margin-bottom: 7px; font-family: Georgia, "Songti SC", serif; font-size: clamp(23px, 2.2vw, 31px); font-weight: 550; letter-spacing: -0.025em; }
.trip-fit-copy > p { max-width: 780px; margin-bottom: 13px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.preference-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.preference-chips span { border: 1px solid rgba(39, 78, 66, 0.13); border-radius: 999px; padding: 5px 9px; color: var(--moss); background: var(--soft-moss); font-size: 9px; font-weight: 700; }
.trip-fit-actions { display: grid; gap: 10px; }
.trip-fit-actions button { display: grid; min-height: 58px; align-content: center; gap: 1px; border: 1px solid var(--moss); border-radius: 14px; padding: 0 16px; cursor: pointer; color: #fff; background: var(--moss); text-align: left; }
.trip-fit-actions button:hover { transform: translateY(-1px); background: #1e4036; }
.trip-fit-actions button span { font-size: 12px; font-weight: 800; }
.trip-fit-actions button small { color: rgba(255, 255, 255, 0.7); font-size: 9px; }
.trip-fit-actions a { color: var(--muted); font-size: 9px; text-align: center; text-underline-offset: 3px; }

.trust-panel { margin-bottom: 16px; }
.trust-panel > summary { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 11px; min-height: 66px; padding: 11px 18px; cursor: pointer; list-style: none; }
.trust-panel > summary::-webkit-details-marker { display: none; }
.trust-check { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #fff; background: var(--moss); font-size: 13px; font-weight: 800; }
.trust-panel.needs-review .trust-check { background: var(--gold); }
.trust-copy { display: grid; min-width: 0; gap: 1px; }
.trust-copy strong { font-family: Georgia, "Songti SC", serif; font-size: 14px; font-weight: 600; }
.trust-copy small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.trust-score { display: grid; justify-items: end; min-width: 62px; }
.trust-score strong { color: var(--moss); font-family: Georgia, serif; font-size: 19px; font-weight: 550; line-height: 1; }
.trust-score small, .trust-more { color: var(--muted); font-size: 8px; }
.trust-more { border-left: 1px solid var(--line); padding-left: 13px; }
.trust-panel[open] .trust-more { color: var(--accent-dark); }
.trust-panel .quality-metrics { margin: 0 18px 16px 63px; padding-top: 12px; border-top: 1px solid var(--line); }

.edit-mode-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; border: 1px solid rgba(39, 78, 66, 0.18); border-radius: 14px; padding: 11px 14px; color: var(--moss); background: var(--soft-moss); }
.edit-mode-bar[hidden] { display: none; }
.edit-mode-bar > div { display: flex; align-items: baseline; gap: 9px; }
.edit-mode-bar strong { font-size: 11px; }
.edit-mode-bar span { font-size: 9px; }
.edit-mode-bar button { border: 1px solid var(--moss); border-radius: 999px; padding: 6px 11px; cursor: pointer; color: #fff; background: var(--moss); font-size: 9px; font-weight: 750; }
.editor-only { display: none; }
.edit-mode .editor-only { display: block; }
.edit-mode .route-list-section { display: none; }
.edit-mode .route-panel { border-color: rgba(39, 78, 66, 0.3); box-shadow: 0 22px 65px rgba(39, 78, 66, 0.1); }
.quality-panel { display: grid; grid-template-columns: minmax(260px, 1fr) 120px minmax(440px, 1.15fr); align-items: center; gap: 24px; margin-bottom: 16px; padding: 20px 24px; }
.quality-intro .section-kicker { margin-bottom: 3px; font-size: 9px; }
.quality-intro h2 { margin-bottom: 4px; font-family: Georgia, "Songti SC", serif; font-size: 20px; font-weight: 550; }
.quality-intro p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.quality-score { display: grid; justify-items: center; align-content: center; min-height: 78px; border-right: 1px solid var(--line); border-left: 1px solid var(--line); }
.quality-score span, .quality-metrics span { color: var(--muted); font-size: 9px; }
.quality-score strong { color: var(--moss); font-family: Georgia, serif; font-size: 28px; font-weight: 550; line-height: 1.1; }
.quality-score small { color: var(--accent-dark); font-size: 9px; font-weight: 750; }
.quality-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.quality-metrics > div { display: grid; gap: 3px; min-width: 0; padding: 11px 12px; border-radius: 12px; background: #f5f3ed; }
.quality-metrics strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.panel { min-width: 0; overflow: hidden; border-color: var(--line); box-shadow: 0 18px 55px rgba(41, 43, 40, 0.055); }
.route-panel { overflow: hidden; }

.map-area {
  position: relative;
  min-height: 290px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #dce5df;
}
.real-map { position: absolute; inset: 0; z-index: 1; background: #dce5df; }
.map-empty { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; gap: 5px; padding: 28px; text-align: center; background: linear-gradient(135deg, #d7e4dc, #ebe5ce 58%, #efd4c8); }
.map-empty[hidden] { display: none; }
.map-empty strong { font-family: Georgia, "Songti SC", serif; font-size: 19px; font-weight: 550; }
.map-empty span { color: var(--muted); font-size: 10px; }
.route-visual-label { position: absolute; z-index: 2; top: 19px; right: 21px; display: grid; justify-items: end; }
.route-visual-label span { font-size: 9px; font-weight: 800; letter-spacing: 0.17em; }
.route-visual-label small { color: rgba(23, 33, 29, 0.58); font-size: 9px; }
.map-caption { position: absolute; z-index: 3; bottom: 18px; left: 20px; display: grid; min-width: 205px; gap: 1px; padding: 14px 16px; border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 14px; backdrop-filter: blur(12px); background: rgba(255, 253, 249, 0.78); }
.map-caption > span { color: var(--accent-dark); font-size: 9px; font-weight: 800; letter-spacing: 0.08em; }
.map-caption strong { font-family: Georgia, "Songti SC", serif; font-size: 20px; font-weight: 550; }
.map-caption small { max-width: 260px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.route-head, .map-tools, .route-list-section, .place-index { padding: 22px 24px; }
.route-head { display: flex; align-items: start; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.route-head h2, .map-tools h2, .section-title-row h2, .detail-heading h2, .prep-heading h2 { margin-bottom: 0; font-family: Georgia, "Songti SC", serif; font-weight: 550; letter-spacing: -0.02em; }
.route-head h2 { font-size: 24px; }
.route-head p { max-width: 760px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.route-head .spatial-note { width: max-content; max-width: 100%; margin-top: 10px; border-radius: 999px; padding: 5px 9px; color: #496057; background: var(--soft-moss); font-size: 9px; }
.route-head .spatial-note.warning { color: #845120; background: #f6ead3; }
.day-navigation { flex: 0 0 auto; margin-top: 18px; border: 1px solid var(--moss); border-radius: 999px; padding: 8px 12px; color: var(--moss); background: #fff; font-size: 10px; font-weight: 750; text-decoration: none; }
.day-navigation:hover { color: #fff; background: var(--moss); }
.day-navigation[hidden] { display: none; }
.map-tools { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 18px; border-bottom: 1px solid var(--line); }
.map-tools .section-kicker, .section-title-row .section-kicker, .detail-heading .section-kicker { margin-bottom: 3px; font-size: 9px; }
.map-tools h2, .section-title-row h2, .detail-heading h2 { font-size: 18px; }
.category-grid { display: flex; min-width: 0; flex-wrap: wrap; gap: 7px; }
.category-grid button { min-height: 35px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 11px; }
.category-grid button:hover { border-color: var(--accent); color: var(--accent-dark); }
.category-grid button.active { border-color: var(--moss); color: #fff; background: var(--moss); }
.category-grid button.all-filter.active { border-color: var(--accent); background: var(--accent); }

.route-list-section { border-bottom: 1px solid var(--line); }
.section-title-row { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.hint-text { color: #8a918b; font-size: 9px; }
.route-edit-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.route-edit-actions button { border: 0; padding: 3px 0; cursor: pointer; color: var(--moss); background: transparent; font-size: 9px; font-weight: 750; text-decoration: underline; text-decoration-color: rgba(39, 78, 66, 0.28); text-underline-offset: 3px; }
.route-edit-actions button:hover { color: var(--accent-dark); }
.route-edit-actions button:disabled { cursor: default; opacity: 0.38; text-decoration: none; }
.route-editor { display: grid; gap: 7px; margin-bottom: 22px; }
.route-editor-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 13px; padding: 7px 8px; background: #fff; }
.route-editor-row.active { border-color: rgba(223, 93, 63, 0.4); background: #fff8f5; }
.route-editor-place { display: grid; min-width: 0; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 9px; border: 0; padding: 0; cursor: pointer; text-align: left; background: transparent; }
.route-editor-index { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: #fff; background: var(--moss); font-family: Georgia, serif; font-size: 11px; font-style: italic; }
.route-editor-copy { display: grid; min-width: 0; }
.route-editor-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.route-editor-copy small { color: var(--muted); font-size: 9px; }
.route-editor-controls { display: flex; gap: 5px; }
.route-editor-controls button { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; color: var(--moss); background: #faf9f5; font-size: 11px; }
.route-editor-controls button:hover { border-color: var(--moss); background: var(--soft-moss); }
.route-editor-controls button:disabled { cursor: default; opacity: 0.28; }
.route-editor-controls button.remove { color: var(--accent-dark); }
.candidate-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.candidate-heading > div:first-child { display: grid; }
.candidate-heading strong { font-size: 11px; }
.candidate-heading span { color: var(--muted); font-size: 9px; }
.timeline { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px; }
.stop-card { position: relative; display: grid; grid-template-columns: 25px 1fr; gap: 9px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 14px; text-align: left; background: #fff; }
.stop-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 12px 24px rgba(32, 41, 36, 0.07); }
.stop-card.active { border-color: rgba(223, 93, 63, 0.4); background: #fff8f5; box-shadow: inset 3px 0 var(--accent); }
.route-dot { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #fff; background: var(--moss); font-family: Georgia, serif; font-size: 11px; font-style: italic; }
.stop-copy { display: grid; min-width: 0; gap: 5px; }
.stop-meta { display: flex; align-items: center; gap: 6px; }
.time { color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.tag { display: inline-flex; width: max-content; align-items: center; border-radius: 999px; padding: 2px 7px; color: #fff; background: #65746c; font-size: 9px; font-weight: 700; }
.tag.food { background: #bf4c2e; }
.tag.drinks { background: #6f5b8d; }
.tag.activities { background: #3d6f73; }
.tag.shopping { background: #a2762c; }
.tag.lodging { background: #4e7454; }
.tag.transport { background: #59656f; }
.tag.prep { background: #8b6757; }
.stop-copy strong { overflow: hidden; font-family: Georgia, "Songti SC", serif; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.stop-note { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.place-drawer { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.place-card { display: grid; grid-template-columns: 27px 1fr; align-items: center; gap: 9px; min-height: 47px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 12px; text-align: left; background: #fff; }
.place-card:hover { border-color: var(--line-strong); }
.place-card.active { border-color: rgba(223, 93, 63, 0.38); background: #fff8f5; }
.place-card.excluded { color: var(--muted); background: #f7f6f2; }
.index-state { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; color: var(--moss); background: var(--soft-moss); font-size: 12px; font-weight: 800; }
.place-card.excluded .index-state { color: var(--accent-dark); background: #f8e5de; }
.place-card strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.empty-state { grid-column: 1 / -1; border: 1px dashed var(--line-strong); border-radius: 14px; padding: 22px; color: var(--muted); background: #f8f7f3; font-size: 11px; text-align: center; }

.right-panel { position: sticky; top: 15px; }
.detail-heading { padding: 22px 22px 18px; border-bottom: 1px solid var(--line); }
#detailPanel { padding: 23px 22px; }
.detail-name { margin: 12px 0 9px; font-family: Georgia, "Songti SC", serif; font-size: 26px; font-weight: 550; line-height: 1.25; }
.detail-description { margin-bottom: 18px; color: #4e5952; font-size: 12px; line-height: 1.75; }
.detail-links { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 19px; }
.detail-links a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; color: var(--moss); background: #fff; font-size: 10px; font-weight: 700; text-decoration: none; }
.detail-links a:hover { border-color: var(--moss); background: var(--soft-moss); }
.detail-facts { border-top: 1px solid var(--line); }
.detail-facts > summary { padding: 13px 0; cursor: pointer; color: var(--moss); font-size: 10px; font-weight: 750; list-style: none; }
.detail-facts > summary::-webkit-details-marker { display: none; }
.detail-facts > summary::after { float: right; content: "+"; }
.detail-facts[open] > summary::after { content: "−"; }
.fact-list { border-top: 1px solid var(--line); }
.fact { display: grid; grid-template-columns: 68px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); color: #414a45; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.fact > span { color: #858c87; font-size: 9px; font-weight: 700; }
.verification-note { margin-top: 17px; border-radius: 12px; padding: 11px 12px; color: #755d2e; background: #f6edda; font-size: 9px; line-height: 1.55; }

.prep-board { margin-top: 16px; padding: 0; }
.prep-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin: 0; padding: 24px 28px; cursor: pointer; list-style: none; }
.prep-heading::-webkit-details-marker { display: none; }
.prep-board[open] .prep-heading { margin-bottom: 0; border-bottom: 1px solid var(--line); }
.prep-heading h2 { font-size: 26px; }
.prep-heading p { max-width: 520px; margin-bottom: 2px; color: var(--muted); font-size: 10px; text-align: right; }
.prep-summary-copy { display: grid; justify-items: end; gap: 3px; }
.prep-summary-copy > span { color: var(--moss); font-size: 9px; font-weight: 750; }
.prep-sections { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 24px 28px 28px; }
.prep-sections > section { min-width: 0; border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #faf9f5; }
.prep-sections h3 { display: flex; gap: 8px; margin-bottom: 13px; font-family: Georgia, "Songti SC", serif; font-size: 15px; font-weight: 550; }
.prep-sections h3 span { color: var(--accent-dark); font-family: Georgia, serif; font-size: 10px; font-style: italic; }
.info-grid { display: grid; gap: 8px; }
.info-chip { padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.info-chip:last-child { padding-bottom: 0; border-bottom: 0; }
.info-chip strong, .info-chip span { display: block; }
.info-chip strong { margin-bottom: 2px; font-size: 10px; }
.info-chip span { color: var(--muted); font-size: 9px; line-height: 1.55; }
.sources-section { grid-column: 1 / -1; }
.source-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 26px; margin: 0; padding-left: 20px; }
.source-list li { padding-left: 3px; color: var(--muted); font-size: 9px; }
.source-list a { color: var(--moss); font-size: 10px; font-weight: 700; text-underline-offset: 3px; overflow-wrap: anywhere; }
.source-list span { display: block; margin-top: 2px; }

.feedback-panel { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 16px; padding: 24px 28px; }
.feedback-panel .section-kicker { margin-bottom: 3px; font-size: 9px; }
.feedback-panel h2 { margin-bottom: 4px; font-family: Georgia, "Songti SC", serif; font-size: 21px; font-weight: 550; }
.feedback-panel p { margin: 0; color: var(--muted); font-size: 10px; }
.feedback-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.feedback-actions button, .feedback-actions a { min-height: 36px; border: 1px solid var(--line); border-radius: 999px; padding: 0 13px; cursor: pointer; color: var(--moss); background: #fff; font-size: 10px; font-weight: 750; line-height: 34px; text-decoration: none; }
.feedback-actions button:hover, .feedback-actions a:hover, .feedback-actions button.active { border-color: var(--moss); background: var(--soft-moss); }
.feedback-actions button.active { color: #fff; background: var(--moss); }
.feedback-actions span { flex-basis: 100%; min-height: 13px; color: var(--muted); font-size: 9px; text-align: right; }

.is-dragging { cursor: grabbing; user-select: none; scroll-snap-type: none; }
.export-only { display: none; }
.all-days-export { margin-top: 16px; padding: 28px; }
.all-days-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.all-days-heading h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 26px; font-weight: 550; }
.all-days-heading p { max-width: 520px; margin: 0; color: var(--muted); font-size: 10px; text-align: right; }
.export-day { padding: 18px 0; border-top: 1px solid var(--line); break-inside: avoid; }
.export-day-heading { display: grid; grid-template-columns: 38px 1fr; gap: 12px; }
.export-day-heading > span { color: var(--accent-dark); font-family: Georgia, serif; font-size: 19px; font-style: italic; }
.export-day-heading h3 { margin-bottom: 3px; font-family: Georgia, "Songti SC", serif; font-size: 18px; font-weight: 550; }
.export-day-heading p, .export-spatial { margin: 0; color: var(--muted); font-size: 10px; }
.export-stops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 10px 50px; padding: 0; list-style: none; }
.export-stops li { display: grid; grid-template-columns: 42px 1fr; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; }
.export-stops time { color: var(--accent-dark); font-size: 10px; font-weight: 750; }
.export-stops strong, .export-stops span { display: block; }
.export-stops strong { font-size: 10px; }
.export-stops span { margin-top: 2px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.export-spatial { margin-left: 50px; }
.exported-report .export-only { display: block; }

.roam-map-marker { display: grid; width: 34px; height: 34px; place-items: center; border: 4px solid rgba(255, 253, 249, 0.94); border-radius: 50%; color: #fff; background: var(--accent); box-shadow: 0 8px 20px rgba(23, 33, 29, 0.24); font-family: Georgia, serif; font-size: 12px; font-style: italic; font-weight: 700; }
.roam-map-marker.active { width: 40px; height: 40px; background: var(--moss); box-shadow: 0 0 0 7px rgba(39, 78, 66, 0.18), 0 8px 20px rgba(23, 33, 29, 0.25); }
.leaflet-div-icon { border: 0; background: transparent; }
.leaflet-popup-content-wrapper { border-radius: 13px; color: var(--ink); box-shadow: 0 14px 40px rgba(23, 33, 29, 0.18); }
.leaflet-popup-content { margin: 12px 14px; font-family: "Aptos", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 11px; line-height: 1.5; }
.map-popup { display: grid; gap: 3px; }
.map-popup strong { font-family: Georgia, "Songti SC", serif; font-size: 14px; }
.map-popup span { color: var(--muted); font-size: 9px; }
.leaflet-control-attribution { font-size: 8px !important; }

@media (max-width: 1080px) {
  .home-hero { grid-template-columns: minmax(0, 1fr) minmax(390px, 0.9fr); gap: 42px; }
  .home-copy h1 { font-size: clamp(46px, 6vw, 66px); }
  .workspace { grid-template-columns: minmax(0, 1fr) 320px; }
  .quality-panel { grid-template-columns: minmax(230px, 1fr) 105px minmax(360px, 1fr); gap: 16px; }
  .prep-sections { grid-template-columns: 1fr 1fr; }
  .sources-section { grid-column: auto; }
  .source-list { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .site-header, .home-shell, .site-footer { width: min(100% - 36px, 680px); }
  .site-header { min-height: 76px; }
  .home-shell { padding-top: 34px; }
  .home-hero { grid-template-columns: 1fr; }
  .home-copy { padding-top: 0; }
  .home-copy h1 { max-width: 620px; }
  .request-panel { max-width: 680px; }
  .workflow-strip { grid-template-columns: 1fr; margin-top: 38px; }
  .workflow-strip article + article { border-top: 1px solid var(--line); border-left: 0; }

  .planner-topbar { padding: 18px; }
  .planner-shell { width: calc(100% - 28px); }
  .workspace { grid-template-columns: 1fr; }
  .trip-fit-panel { grid-template-columns: minmax(0, 1fr) 220px; }
  .quality-panel { grid-template-columns: minmax(0, 1fr) 110px; }
  .quality-metrics { grid-column: 1 / -1; }
  .right-panel { position: static; }
  .summary-strip { grid-template-columns: 180px minmax(0, 1fr); }
  .map-area { min-height: 260px; }
}

@media (max-width: 600px) {
  body { background: var(--paper); }
  .site-header, .home-shell, .site-footer { width: calc(100% - 28px); }
  .header-note { display: none; }
  .header-actions { gap: 8px; }
  .account-button { padding-right: 10px; }
  .home-shell { padding: 28px 0 45px; }
  .home-copy h1 { margin-bottom: 19px; font-size: clamp(38px, 11.5vw, 48px); overflow-wrap: anywhere; }
  .hero-lead { margin-bottom: 26px; font-size: 15px; }
  .route-preview { border-radius: 20px; }
  .preview-foot { flex-wrap: wrap; justify-content: center; }
  .request-panel { padding: 24px 19px; border-radius: 22px; }
  .form-heading h2 { font-size: 24px; }
  .form-heading { align-items: end; }
  .resume-trip { max-width: 95px; text-align: right; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .interest-grid { grid-template-columns: 1fr 1fr; }
  .generation-steps { grid-template-columns: 1fr 1fr; }
  .field { margin-bottom: 17px; }
  .workflow-strip article { padding: 22px 12px; }
  .site-footer { min-height: 72px; }

  .planner-topbar { padding: 14px 14px 10px; }
  .planner-titlebar { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
  .back-button { width: 38px; height: 38px; }
  .planner-titlecopy .eyebrow, .planner-titlecopy > p:last-child { display: none; }
  .planner-titlecopy h1 { overflow: hidden; font-size: 23px; text-overflow: ellipsis; white-space: nowrap; }
  .planner-actions { grid-column: 1 / -1; display: grid; width: 100%; grid-template-columns: 1fr 1fr 1fr; justify-items: stretch; }
  .edit-trip-button, .export-menu > summary, .account-button--planner { width: 100%; justify-content: center; text-align: center; }
  .account-button--planner { padding-inline: 7px; }
  .account-button--planner .account-button__icon { display: none; }
  .export-menu .export-bar { right: 0; min-width: min(82vw, 260px); }
  .draft-badge { display: none; }
  .export-bar { justify-content: flex-end; }
  .export-note { margin-right: auto; }
  .export-status { text-align: right; }
  .summary-strip { grid-template-columns: 1fr; margin-top: 13px; }
  .budget-summary { grid-template-columns: 1fr auto; align-items: center; padding: 11px 14px; }
  .budget-summary strong { grid-row: 1 / 3; grid-column: 2; font-size: 21px; }
  .route-summary { grid-template-columns: 64px minmax(0, 1fr); }
  .summary-label { padding: 7px; }
  .day-card { min-width: 145px; padding: 9px; }

  .planner-shell { width: calc(100% - 20px); padding-bottom: 30px; }
  .trip-fit-panel { grid-template-columns: 1fr; gap: 20px; padding: 22px 18px; }
  .trip-fit-copy h2 { font-size: 25px; }
  .trip-fit-actions { grid-template-columns: 1fr; }
  .trust-panel > summary { grid-template-columns: 31px minmax(0, 1fr) auto; gap: 9px; padding: 10px 13px; }
  .trust-copy small { white-space: normal; }
  .trust-more { display: none; }
  .trust-panel .quality-metrics { margin: 0 13px 13px; }
  .edit-mode-bar { display: block; padding: 12px 13px; }
  .edit-mode-bar > div { display: grid; gap: 2px; }
  .edit-mode-bar button { margin-top: 9px; }
  .quality-panel { grid-template-columns: minmax(0, 1fr) 92px; gap: 14px; padding: 18px 16px; }
  .quality-score { min-height: 72px; border-right: 0; }
  .quality-metrics { gap: 6px; }
  .quality-metrics > div { padding: 9px 8px; }
  .quality-metrics strong { font-size: 9px; }
  .panel { border-radius: 20px; }
  .map-area { min-height: 235px; }
  .route-visual-label { top: 14px; right: 14px; }
  .map-caption { bottom: 13px; left: 13px; min-width: 180px; padding: 10px 12px; }
  .map-caption strong { font-size: 17px; }
  .route-head { display: block; }
  .day-navigation { display: inline-flex; margin-top: 12px; }
  .route-head, .map-tools, .route-list-section, .place-index { padding: 19px 16px; }
  .map-tools { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .map-tools > * { min-width: 0; }
  .category-grid { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .category-grid button { flex: 0 0 auto; }
  .timeline { display: flex; margin-right: -16px; overflow-x: auto; padding-right: 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .stop-card { min-width: min(78vw, 275px); scroll-snap-align: start; }
  .place-drawer { grid-template-columns: 1fr 1fr; }
  .place-index .section-title-row { align-items: start; }
  .route-edit-actions { display: grid; justify-items: end; gap: 3px; text-align: right; }
  .route-editor-row { grid-template-columns: minmax(0, 1fr) auto; }
  .candidate-heading { display: grid; }
  .candidate-heading .category-grid { margin-right: -16px; padding-right: 16px; }
  .detail-name { font-size: 24px; }
  .fact { grid-template-columns: 62px 1fr; }
  .prep-board { padding: 22px 16px; }
  .prep-board { padding: 0; }
  .prep-heading { display: block; padding: 20px 16px; }
  .prep-heading p { margin-top: 8px; text-align: left; }
  .prep-summary-copy { justify-items: start; }
  .prep-sections { padding: 18px 16px 20px; }
  .prep-sections { grid-template-columns: 1fr; }
  .sources-section { grid-column: auto; }
  .feedback-panel { display: block; padding: 22px 16px; }
  .feedback-actions { justify-content: flex-start; margin-top: 16px; }
  .feedback-actions span { text-align: left; }
  .planner-page .site-footer { width: calc(100% - 28px); }
  .auth-card { border-radius: 22px; padding: 29px 22px 24px; }
  .auth-view h2 { font-size: 27px; }
}

@media print {
  @page { size: A4; margin: 10mm; }
  :root { --paper: #fff; --card: #fff; }
  body { min-width: 0; color: #111; background: #fff !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .planner-topbar, .planner-shell { width: 100%; padding: 0; }
  .planner-titlebar { grid-template-columns: 1fr; }
  .back-button, .planner-actions, .workbench-status, .map-tools, .map-scroll, .route-head, .right-panel, .feedback-panel, .day-navigation, .edit-mode-bar, .editor-only, .trip-fit-actions, .site-footer, .leaflet-control-zoom, .auth-dialog { display: none !important; }
  .summary-strip { grid-template-columns: 150px 1fr; margin: 8mm 0 4mm; }
  .day-list { flex-wrap: wrap; overflow: visible; }
  .day-card { min-width: 0; flex: 1 1 120px; }
  .planner-shell { margin: 0; }
  .trip-fit-panel { display: block; margin: 0 0 4mm; padding: 5mm; }
  .trust-panel { margin: 0 0 4mm; }
  .trust-panel > summary { min-height: 0; padding: 3mm 4mm; }
  .trust-panel .quality-metrics { display: grid !important; margin: 0 4mm 4mm; }
  .workspace { display: block; }
  .export-only { display: block !important; }
  .all-days-export { margin: 0 0 4mm; padding: 6mm; break-before: page; break-inside: auto; }
  .export-day { break-inside: avoid; }
  .panel { border-color: #ccc; box-shadow: none; break-inside: avoid; }
  .panel.all-days-export { break-inside: auto; }
  .route-panel { margin-bottom: 4mm; break-inside: avoid; }
  .map-area { min-height: 62mm; }
  .map-caption { box-shadow: none; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .prep-board { margin-top: 0; padding: 0; break-inside: auto; }
  .prep-heading { break-after: avoid-page; }
  .prep-sections { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 3mm; padding: 5mm; }
  .prep-sections > section { margin-bottom: 0; break-inside: avoid; }
  .prep-sections .sources-section { grid-column: 1 / -1; }
  .sources-section { grid-column: 1 / -1; }
  a { text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
