:root {
  --paper: #f5f1e8;
  --paper-deep: #ebe4d6;
  --ink: #1f2924;
  --muted: #68706a;
  --line: rgba(31, 41, 36, 0.12);
  --forest: #173f35;
  --forest-soft: #dbe7df;
  --orange: #ee7651;
  --yellow: #f2c864;
  --white: #fffdf8;
  --shadow: 0 12px 40px rgba(45, 49, 40, 0.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { width: 100%; min-height: 100%; background: var(--paper); overscroll-behavior-y: none; }

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

.app-shell {
  width: 100%;
  max-width: 540px;
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  background:
    radial-gradient(circle at 95% 6%, rgba(242, 200, 100, .24), transparent 18rem),
    var(--paper);
  overflow-x: hidden;
}

.topbar {
  min-height: calc(60px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(245, 241, 232, .88);
  backdrop-filter: blur(16px);
}

.brand, .trip-chip, .nav-item, .sample-link {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand { min-height: 44px; display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; padding: 0; }
.brand-mark { width: 32px; height: 32px; border-radius: 11px 11px 11px 3px; display: grid; place-items: center; background: var(--forest); color: var(--white); }
.trip-chip { min-height: 44px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.58); border: 1px solid var(--line); font-size: 13px; }
.chevron { margin-left: 5px; color: var(--muted); }

main { padding: 0 14px calc(104px + env(safe-area-inset-bottom)); }
.view { display: none; animation: rise .28s ease both; }
.view.active { display: block; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hero { padding: 32px 4px 22px; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: var(--orange); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-family: "Songti SC", "STSong", serif; font-size: clamp(34px, 9vw, 48px); line-height: 1.08; letter-spacing: -.03em; }
h2 { margin-bottom: 6px; font-size: 20px; }
.hero-copy { max-width: 390px; margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }

.card { background: rgba(255, 253, 248, .92); border: 1px solid rgba(31, 41, 36, .08); border-radius: 24px; box-shadow: var(--shadow); }
.composer { padding: 16px; }
.composer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.composer-head strong { color: var(--forest); font-size: 13px; }
.sample-link { min-height: 44px; margin-left: auto; padding: 5px 0; color: var(--orange); font-size: 12px; font-weight: 700; }
textarea {
  width: 100%; min-height: 148px; padding: 15px; resize: vertical;
  border: 1px solid var(--line); border-radius: 16px; outline: none;
  color: var(--ink); background: #faf8f2; font-size: 16px; line-height: 1.6;
}
textarea:focus, input:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(23,63,53,.09); }
.primary-btn, .secondary-btn, .accent-btn, .primary-small, .ghost-btn {
  border: 0; cursor: pointer; font-weight: 800;
}
.primary-btn { width: 100%; min-height: 50px; margin-top: 12px; padding: 13px 18px; display: flex; justify-content: space-between; align-items: center; border-radius: 15px; color: var(--white); background: var(--forest); }
.primary-btn:disabled { opacity: .68; cursor: wait; }
.primary-btn:active, .accent-btn:active { transform: translateY(1px); }
.result-section { margin-top: 18px; padding: 18px; border-radius: 24px; background: var(--forest); color: var(--white); box-shadow: var(--shadow); }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.result-head p { margin: 3px 0 0; color: rgba(255,255,255,.68); font-size: 13px; }
.result-badge { padding: 5px 8px; border-radius: 99px; background: rgba(255,255,255,.13); font-size: 11px; }
.candidate-list { display: grid; gap: 8px; }
.candidate { padding: 10px 11px; display: grid; grid-template-columns: 24px 1fr; gap: 9px; align-items: start; border-radius: 13px; background: rgba(255,255,255,.09); }
.candidate input[type="checkbox"] { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--yellow); }
.candidate input[type="text"] { width: 100%; padding: 0; border: 0; outline: none; color: white; background: transparent; font-weight: 800; }
.candidate small { display: block; margin-top: 4px; color: rgba(255,255,255,.65); line-height: 1.45; }
.result-action { width: 100%; margin-top: 14px; padding: 13px; border: 0; border-radius: 13px; background: var(--yellow); color: var(--ink); font-weight: 900; cursor: pointer; }
.parse-guidance { display: grid; grid-template-columns: 24px 1fr; gap: 9px 10px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.09); }
.parse-guidance span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: 11px; font-weight: 900; }
.parse-guidance p { margin: 1px 0 0; color: rgba(255,255,255,.74); font-size: 12px; line-height: 1.5; }

.section { padding-top: 34px; }
.section.compact { padding-top: 26px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 15px; padding: 0 3px; }
.section-heading h2 { margin: 0; font-family: "Songti SC", serif; font-size: 25px; }
.section-kicker { color: var(--muted); font-size: 10px; }
.section-heading-actions { display: flex; align-items: center; gap: 7px; }
.add-place-btn { min-height: 44px; padding: 7px 10px; border: 0; border-radius: 10px; background: var(--forest); color: white; font-size: 11px; font-weight: 800; cursor: pointer; }
.count-pill { padding: 5px 9px; border-radius: 99px; background: var(--paper-deep); color: var(--muted); font-size: 12px; }
.place-list, .area-list { display: grid; gap: 10px; }
.empty-list { min-height: 116px; display: grid; place-items: center; border: 1px dashed rgba(31,41,36,.22); border-radius: 20px; color: var(--muted); font-size: 13px; }
.area-group { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,253,248,.7); }
.area-toggle { width: 100%; min-height: 66px; padding: 12px; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.area-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--forest); color: white; font-size: 17px; }
.area-heading { min-width: 0; display: grid; gap: 2px; }
.area-heading small { color: var(--muted); font-size: 9px; font-weight: 700; }
.area-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.area-summary { color: var(--muted); font-size: 12px; white-space: nowrap; }
.area-summary b { margin-left: 5px; color: var(--forest); font-size: 15px; }
.area-places { padding: 0 9px 9px; display: grid; gap: 8px; }
.place-card { padding: 14px; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; border-radius: 18px; background: rgba(255,253,248,.82); border: 1px solid var(--line); }
.place-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--forest-soft); font-size: 20px; }
.place-card h3 { margin: 0 0 4px; font-size: 16px; }
.place-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.place-copy { min-width: 0; }
.place-card .place-note { margin-top: 6px; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #6f756f; }
.place-actions { display: grid; justify-items: end; gap: 4px; }
.place-tool-row { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.drag-handle, .plan-drag-handle { width: 48px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(23,63,53,.12); border-radius: 12px; background: var(--forest-soft); color: var(--forest); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.drag-handle:active { cursor: grabbing; }
.drag-handle svg, .plan-drag-handle svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.place-card.dragging, .plan-stop.dragging { position: relative; z-index: 5; opacity: .58; transform: scale(.985); border-color: rgba(23,63,53,.38); pointer-events: none; }
.place-card.drop-before, .plan-stop.drop-before { box-shadow: inset 0 4px 0 var(--orange); }
.place-card.drop-after, .plan-stop.drop-after { box-shadow: inset 0 -4px 0 var(--orange); }
.area-places.drag-active, .timeline.drag-active, .is-dragging-place { -webkit-user-select: none !important; user-select: none !important; -webkit-touch-callout: none !important; }
.is-dragging-place * { -webkit-user-select: none !important; user-select: none !important; }
.edit-place-btn { min-width: 44px; height: 40px; padding: 0 9px; border: 0; border-radius: 10px; background: var(--forest-soft); color: var(--forest); font-size: 12px; font-weight: 800; cursor: pointer; }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: #9b6250; cursor: pointer; }

.page-heading { padding: 30px 3px 18px; }
.empty-state { margin-top: 16px; padding: 38px 24px; text-align: center; }
.empty-state p { color: var(--muted); line-height: 1.6; }
.empty-plan-actions { display: grid; gap: 9px; margin-top: 18px; }
.empty-plan-actions button { width: 100%; }
.empty-illustration { width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: var(--forest-soft); color: var(--forest); font-size: 30px; }
.secondary-btn { min-height: 44px; padding: 12px 16px; border-radius: 13px; background: var(--forest); color: white; }
.plan-toolbar { padding: 14px; display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.stepper { display: flex; align-items: center; gap: 9px; }
.stepper button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--paper-deep); font-size: 20px; cursor: pointer; }
.stepper button:disabled { opacity: .38; }
.day-limit { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.accent-btn { min-height: 44px; padding: 10px 12px; border-radius: 12px; background: var(--orange); color: white; font-size: 12px; }
.route-overview { height: 238px; margin-top: 14px; position: relative; display: block; overflow: hidden; color: var(--ink); background: #dfe7dd; text-decoration: none; }
.map-grid { position: absolute; inset: 0; opacity: .25; background-image: linear-gradient(rgba(23,63,53,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(23,63,53,.25) 1px, transparent 1px); background-size: 38px 38px; transform: rotate(-7deg) scale(1.2); }
.map-route { position: absolute; inset: 20px 20px 58px; }
.route-day-label { display: block; margin-bottom: 12px; color: var(--forest); font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.route-line { position: absolute; left: 26px; top: 18px; bottom: 18px; width: 3px; border-left: 3px dashed rgba(23,63,53,.45); }
.map-dot { position: relative; z-index: 2; width: max-content; max-width: 75%; margin-bottom: 16px; padding: 7px 10px 7px 29px; border-radius: 99px; background: rgba(255,253,248,.9); box-shadow: 0 5px 14px rgba(23,63,53,.1); font-size: 11px; font-weight: 800; }
.map-dot::before { content: ""; position: absolute; left: 9px; top: 9px; width: 10px; height: 10px; border: 3px solid white; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.map-dot:nth-of-type(even) { margin-left: 38%; }
.map-cta { position: absolute; right: 12px; bottom: 12px; left: 12px; min-height: 44px; padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; border-radius: 13px; background: var(--forest); color: white; font-size: 11px; }
.map-cta strong { font-size: 12px; }
.days-list { display: grid; gap: 20px; margin-top: 24px; }
.day-block { padding: 18px; }
.day-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.day-head > div { min-width: 0; }
.day-head h2 { margin: 0; font-family: "Songti SC", serif; font-size: 25px; }
.day-head span { color: var(--muted); font-size: 12px; }
.day-head-actions { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.day-head a, .day-head-actions button { min-height: 40px; padding: 0 9px; display: grid; place-items: center; border: 0; border-radius: 11px; background: var(--forest-soft); color: var(--forest); font-size: 11px; font-weight: 800; text-decoration: none; white-space: nowrap; cursor: pointer; }
.day-head-actions button { background: var(--paper-deep); }
.timeline { display: grid; gap: 0; }
.timeline-item { min-height: 116px; display: grid; grid-template-columns: 44px 14px minmax(0,1fr) 44px; gap: 7px; padding: 6px 0; border-radius: 12px; }
.time { padding-top: 2px; color: var(--muted); font-size: 12px; }
.rail { position: relative; display: flex; justify-content: center; }
.rail::before { content: ""; position: absolute; top: 13px; bottom: -7px; width: 1px; background: var(--line); }
.timeline-item:last-child .rail::before { display: none; }
.rail::after { content: ""; position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 4px; border: 3px solid var(--white); border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.timeline-copy h3 { margin: 0 0 5px; font-size: 15px; }
.timeline-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.timeline-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.timeline-title h3 { min-width: 0; }
.timeline-title a { flex: 0 0 auto; color: var(--orange); font-size: 10px; font-weight: 800; text-decoration: none; }
.day-select-label { width: max-content; margin-top: 8px; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; }
.day-select-label select { min-height: 34px; padding: 0 25px 0 9px; border: 1px solid var(--line); border-radius: 9px; color: var(--forest); background: var(--white); font-size: 12px; font-weight: 800; }
.plan-drag-handle { align-self: center; padding: 0; }
.day-empty { margin: 0; padding: 18px 10px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.manual-plan-stop { background: rgba(219,231,223,.28); }
.manual-stop-tools { margin-bottom: 5px; display: flex; align-items: center; gap: 5px; }
.manual-stop-tools span { padding: 3px 7px; border-radius: 99px; background: var(--forest); color: white; font-size: 9px; font-weight: 900; }
.manual-stop-tools button { min-height: 30px; padding: 0 7px; border: 0; border-radius: 8px; background: var(--paper-deep); color: var(--forest); font-size: 10px; font-weight: 800; cursor: pointer; }
.manual-stop-tools button:last-child { color: #9b6250; background: transparent; }

.today-head { padding: 30px 3px 16px; display: flex; justify-content: space-between; align-items: start; }
.weather-pill { padding: 8px 11px; border-radius: 99px; background: rgba(255,255,255,.7); border: 1px solid var(--line); font-size: 12px; }
.progress-row { margin: 2px 4px 18px; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.progress-track { flex: 1; height: 5px; overflow: hidden; border-radius: 99px; background: var(--paper-deep); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--orange); transition: width .3s ease; }
.now-card { padding: 22px; color: white; background: var(--forest); }
.now-label { color: rgba(255,255,255,.62); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.now-card h2 { margin: 10px 0 8px; font-family: "Songti SC", serif; font-size: 32px; }
.now-card p { color: rgba(255,255,255,.72); line-height: 1.55; }
.now-map-link { min-height: 44px; padding: 0 13px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; color: white; background: rgba(255,255,255,.1); font-size: 12px; font-weight: 800; text-decoration: none; }
.now-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 20px; }
.now-actions button { padding: 12px; border: 0; border-radius: 13px; cursor: pointer; font-weight: 800; }
.complete-btn { background: var(--yellow); color: var(--ink); }
.skip-btn { background: rgba(255,255,255,.12); color: white; }
.next-card { margin-top: 12px; padding: 17px 18px; display: flex; justify-content: space-between; align-items: center; }
.next-card p { margin: 0 0 5px; color: var(--muted); font-size: 11px; }
.next-card h3 { margin: 0; font-size: 17px; }
.next-arrow { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--forest-soft); color: var(--forest); }
.tips-list { display: grid; gap: 9px; }
.tip { padding: 12px 14px; display: grid; grid-template-columns: 25px 1fr; gap: 8px; border-radius: 15px; background: rgba(255,253,248,.72); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; }

.profile-card { padding: 18px; display: flex; align-items: center; gap: 14px; }
.avatar { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 18px; background: var(--forest); color: white; font-family: "Songti SC", serif; font-size: 23px; }
.profile-card h2 { margin-bottom: 4px; }
.profile-card p { margin: 0; color: var(--muted); font-size: 13px; }
.settings { margin-top: 16px; overflow: hidden; box-shadow: none; }
.settings button { width: 100%; padding: 17px 18px; display: flex; justify-content: space-between; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.settings button:last-child { border: 0; }
.settings strong { max-width: 55%; color: var(--muted); font-size: 12px; text-align: right; }
.danger-row { color: #a34b3f; }
.mvp-note { margin-top: 22px; padding: 0 8px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.mvp-note span { color: var(--forest); font-weight: 800; }
.install-steps { display: grid; gap: 10px; margin-top: 18px; }
.install-step { padding: 12px 14px; display: grid; grid-template-columns: 28px 1fr; gap: 9px; border-radius: 14px; background: var(--paper); color: var(--muted); font-size: 13px; line-height: 1.55; }
.install-step b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--forest); color: white; font-size: 11px; }
.trip-manager-card { max-height: min(78vh, 660px); display: flex; flex-direction: column; overflow: hidden; }
.trip-manager-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.trip-manager-head h2 { margin-bottom: 16px; }
.dialog-close { width: 34px; height: 34px; flex: 0 0 auto; border: 0; border-radius: 11px; background: var(--paper-deep); color: var(--muted); font-size: 20px; cursor: pointer; }
.trip-library { display: grid; gap: 9px; overflow-y: auto; padding: 2px 2px 8px; }
.trip-library-item { padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.trip-library-item.active { border-color: rgba(23,63,53,.28); background: var(--forest-soft); }
.trip-library-copy { min-width: 0; }
.trip-library-copy span { color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.trip-library-copy h3 { margin: 4px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.trip-library-copy p { margin: 0; color: var(--muted); font-size: 11px; }
.trip-library-actions { display: flex; align-items: center; gap: 5px; }
.trip-library-actions button, .active-trip-mark { min-width: 34px; height: 32px; padding: 0 9px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--white); color: var(--forest); font-size: 12px; font-weight: 800; cursor: pointer; }
.trip-library-actions .trip-delete { min-width: 32px; padding: 0; color: #a34b3f; background: transparent; font-size: 17px; }
.active-trip-mark { padding: 0; color: white; background: var(--forest); }
.trip-manager-card > .primary-btn { margin-top: 10px; flex: 0 0 auto; }

.bottom-nav {
  position: fixed; z-index: 30; left: 0; bottom: 0;
  width: 100%; height: calc(72px + env(safe-area-inset-bottom));
  padding: 7px 20px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4,1fr);
  background: rgba(255,253,248,.94); border-top: 1px solid var(--line); backdrop-filter: blur(18px);
}
.nav-item { min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #8b918d; }
.nav-item > span { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 10px; font-size: 12px; font-weight: 900; }
.nav-item small { font-size: 10px; }
.nav-item.active { color: var(--forest); }
.nav-item.active > span { background: var(--forest-soft); }
.today-nav > span { color: white; background: var(--orange); border-radius: 50%; font-size: 17px; }
.today-nav.active > span { color: white; background: var(--orange); box-shadow: 0 5px 12px rgba(238,118,81,.25); }

.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translate(-50%, 12px); max-width: calc(100% - 32px); padding: 10px 15px; border-radius: 99px; background: rgba(31,41,36,.92); color: white; font-size: 12px; opacity: 0; pointer-events: none; transition: .22s ease; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.hidden { display: none !important; }

dialog { width: min(calc(100% - 32px), 420px); padding: 0; border: 0; border-radius: 24px; background: transparent; }
dialog::backdrop { background: rgba(17,25,21,.42); backdrop-filter: blur(3px); }
.dialog-card { padding: 24px; background: var(--white); border-radius: 24px; }
.dialog-card h2 { font-family: "Songti SC", serif; font-size: 25px; }
.dialog-card input, .dialog-card textarea, .dialog-card select { width: 100%; min-height: 48px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; outline: none; background: white; font-size: 16px; }
.dialog-card input:focus, .dialog-card textarea:focus { border-color: rgba(23,63,53,.48); box-shadow: 0 0 0 3px rgba(23,63,53,.08); }
.dialog-actions { margin-top: 16px; display: flex; justify-content: flex-end; gap: 8px; }
.place-edit-form, .itinerary-edit-form { max-height: min(88vh, 720px); overflow-y: auto; }
.place-edit-form h2, .itinerary-edit-form h2 { margin-bottom: 18px; }
.place-edit-form label, .itinerary-edit-form label { display: grid; gap: 7px; margin-top: 12px; color: var(--muted); font-size: 12px; font-weight: 800; }
.place-edit-form textarea, .itinerary-edit-form textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.merge-dialog-card > p:not(.section-kicker) { color: var(--muted); font-size: 13px; line-height: 1.6; }
.merge-dialog-card h2 { line-height: 1.35; }
.merge-actions { display: grid; grid-template-columns: 1fr 1fr; }
.ghost-btn, .primary-small { min-height: 44px; padding: 10px 15px; border-radius: 11px; }
.ghost-btn { background: var(--paper-deep); }
.primary-small { background: var(--forest); color: white; }

@media (max-width: 380px) {
  main { padding-right: 10px; padding-left: 10px; }
  .place-card { grid-template-columns: 38px minmax(0,1fr) auto; gap: 8px; padding: 11px; }
  .place-icon { width: 38px; height: 38px; }
  .section-heading-actions { gap: 4px; }
  .add-place-btn { padding: 7px 8px; }
  .plan-toolbar { align-items: stretch; flex-direction: column; }
  .accent-btn { width: 100%; }
  .day-head { align-items: stretch; flex-direction: column; }
  .day-head-actions { justify-content: flex-start; }
}

@media (max-width: 540px) {
  dialog { width: 100%; max-width: none; margin: auto 0 0; inset: auto 0 0; border-radius: 24px 24px 0 0; }
  .dialog-card { padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
