/* ROAD TRIP ĐÀI LOAN — Soft / Minimal / Premium Travel Journal */
:root {
  /* Palette: xanh nhạt dịu / xanh mát — travel */
  --off-white: #eef6f6;
  --white: #ffffff;
  --beige: #e2eff0;      /* “beige” role -> xanh xám rất nhạt */
  --sand: #d0e6e6;
  --sky: #d3ecf1;
  --sky-deep: #8ec7d2;
  --sage: #c2e2d6;       /* xanh mint mát */
  --slate: #6f8f93;
  --ink: #23383a;
  --ink-soft: #4f6a6b;
  --line: #d5e7e7;
  --accent: #46a7b0;
  --accent-deep: #2f8791;
  --gold: #d8ab5f;       /* chỉ dùng cho sao đánh giá */
  --danger: #d07b6b;
  --warn: #d9a24a;
  --ok: #5aa98f;
  --shadow: 0 1px 2px rgba(30,60,62,.04), 0 8px 24px rgba(30,70,72,.07);
  --shadow-lg: 0 14px 44px rgba(30,70,72,.16);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --font: "Inter", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-cjk: "Noto Serif TC", "Inter", "PingFang TC", "Microsoft JhengHei", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--off-white);
  line-height: 1.6;
  font-size: 15.5px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: var(--accent-deep); text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.cjk { font-family: var(--font-cjk); }
[hidden] { display: none !important; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section, #itinerary { padding: 44px 0; scroll-margin-top: 172px; }
.section-head { margin-bottom: 26px; }
.section-head h2 { font-size: clamp(1.4rem, 4vw, 2rem); display: flex; align-items: center; gap: 10px; }
.section-head p { color: var(--ink-soft); margin-top: 6px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700; color: var(--slate); }

/* ------------------------------- HERO (compact) ---------------------- */
.hero {
  position: relative;
  color: var(--ink);
  background: linear-gradient(135deg, var(--sky) 0%, var(--sage) 45%, var(--beige) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { position: relative; z-index: 2; padding: 30px 0 26px; }
.hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 800;
}
.hero .dates {
  font-size: clamp(.95rem, 2.6vw, 1.15rem);
  font-weight: 700;
  margin-top: 6px;
  color: var(--accent-deep);
}
.hero .route {
  margin-top: 12px;
  font-size: clamp(.9rem, 2.4vw, 1.05rem);
  font-weight: 600;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.7);
  padding: 8px 14px;
  border-radius: 999px;
  display: inline-block;
}
.hero .tagline { margin-top: 10px; font-size: .92rem; color: var(--ink-soft); font-weight: 600; }

/* --------------------------- TRIP INFO CARD -------------------------- */
.infocard {
  margin-top: 20px;
  position: relative;
  z-index: 5;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 22px;
}
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.info-item { padding: 12px 14px; background: var(--off-white); border-radius: var(--radius-sm); border: 1px solid var(--line); }
.info-item .k { font-size: .74rem; color: var(--slate); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.info-item .v { font-weight: 600; margin-top: 3px; font-size: .98rem; }
.info-item .v.editable, .editable { outline: none; }
.editing .editable {
  background: #f0faf9;
  box-shadow: inset 0 0 0 1.5px var(--gold);
  border-radius: 7px;
  padding: 2px 6px;
  transition: box-shadow .15s;
}
.editing [contenteditable]:focus { box-shadow: inset 0 0 0 2px var(--accent); }

.goal-note { margin-top: 14px; padding: 12px 14px; background: linear-gradient(120deg, var(--sky), var(--beige)); border-radius: var(--radius-sm); font-size: .92rem; color: var(--ink); }
.notexplore { margin-top: 10px; font-size: .85rem; color: var(--ink-soft); }
.notexplore .strike { text-decoration: line-through; opacity: .7; margin: 0 4px; }

/* ------------------------------ TOOLBAR ----------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--off-white);
  box-shadow: 0 2px 10px rgba(51,65,63,.06);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 10px; padding: 8px 20px; max-width: var(--maxw); margin: 0 auto; }
.topbar .brand { font-weight: 800; font-size: .9rem; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.brand-short, .lbl-short { display: none; }
.daynav {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  max-width: var(--maxw); margin: 0 auto; padding: 2px 20px 8px;
}
.daynav::-webkit-scrollbar { display: none; }
.daynav button {
  white-space: nowrap;
  padding: 7px 13px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .84rem;
  color: var(--ink-soft);
  border: 1px solid transparent;
  transition: all .18s;
}
.daynav button .d { font-size: .72rem; color: var(--slate); display: block; font-weight: 700; }
.daynav button.active { background: var(--ink); color: #fff; }
.daynav button.active .d { color: rgba(255,255,255,.7); }
.daynav button:not(.active):hover { background: var(--beige); }
.secnav-row {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
  max-width: var(--maxw); margin: 0 auto; padding: 0 16px 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.secnav {
  flex: 1 1 auto; text-align: center; white-space: nowrap;
  background: var(--white); color: var(--accent-deep);
  border: 1px solid var(--line);
  font-weight: 700; font-size: .8rem; padding: 8px 10px; border-radius: 999px;
  transition: background .18s, color .18s;
}
.secnav:hover, .secnav:active { background: var(--accent); color: #fff; border-color: var(--accent); }

.btn {
  padding: 8px 15px; border-radius: 999px; font-weight: 700; font-size: .84rem;
  background: var(--ink); color: #fff; transition: transform .12s, background .2s;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.btn.gold { background: var(--gold); }
.btn.sm { padding: 6px 11px; font-size: .78rem; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

/* --------------------------- PROGRESS BAR --------------------------- */
.progress { display: flex; align-items: center; gap: 8px; padding: 14px 0 0; font-size: .8rem; color: var(--ink-soft); }
.progress .track { flex: 1; height: 6px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.progress .fill { height: 100%; background: linear-gradient(90deg, var(--sky-deep), var(--accent)); border-radius: 999px; transition: width .4s; }

/* ------------------------------ DAY VIEW --------------------------- */
.day { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none;} }
.day-header { margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.day-header .kicker { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.day-header .daytag { background: var(--ink); color: #fff; font-weight: 800; font-size: .78rem; padding: 3px 10px; border-radius: 999px; }
.day-header .date { font-weight: 700; color: var(--accent-deep); }
.day-header .dow { color: var(--slate); font-size: .85rem; }
.day-header h3 { font-size: clamp(1.5rem, 5vw, 2.1rem); margin-top: 8px; }
.day-header .subtitle { color: var(--ink-soft); margin-top: 4px; font-weight: 500; }
.day-header .routeline { margin-top: 12px; font-size: .9rem; background: var(--beige); padding: 8px 12px; border-radius: 10px; display: inline-block; }
.day-header .summary { margin-top: 12px; font-size: .92rem; color: var(--ink-soft); max-width: 70ch; }
.day-sleep { margin-top: 20px; font-weight: 600; font-size: .92rem; padding: 12px 16px; background: linear-gradient(120deg, var(--sage), var(--beige)); border-radius: var(--radius-sm); }

/* ------------------------------ TIMELINE -------------------------- */
.timeline { position: relative; margin-left: 6px; }
.tl-item { position: relative; padding-left: 40px; padding-bottom: 14px; }
.tl-item::before {
  content: ""; position: absolute; left: 13px; top: 6px; bottom: -8px; width: 2px;
  background: linear-gradient(var(--sand), var(--line));
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  position: absolute; left: 4px; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--sky-deep); display: grid; place-items: center;
  font-size: .7rem; z-index: 1;
}
.tl-item.is-place .tl-dot { border-color: var(--accent); }
.tl-item.is-recommended .tl-dot { border-color: var(--gold); background: #eaf6f2; }
.tl-item.is-drive .tl-dot { border-color: var(--slate); border-style: dashed; }
.tl-time { font-weight: 700; font-size: .82rem; color: var(--accent-deep); margin-bottom: 6px; letter-spacing: .01em; }
.tl-time .arrow { color: var(--slate); font-weight: 500; }

/* soft card */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: transform .16s, box-shadow .2s;
}
.card.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card-mini { padding: 12px 15px; }
.card-mini .mini-name { font-weight: 700; font-size: .96rem; }
.card-mini .mini-sub { color: var(--ink-soft); font-size: .86rem; margin-top: 2px; }
.card-mini .mini-notes { margin-top: 8px; font-size: .84rem; color: var(--ink-soft); background: var(--off-white); border-radius: 8px; padding: 8px 10px; border-left: 3px solid var(--sky-deep); }
.card-mini ul { margin: 8px 0 0 18px; font-size: .85rem; color: var(--ink-soft); }
.card-mini .opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* place card */
.place-card { border-left: 4px solid var(--accent); }
.place-card.is-rec { border-left-color: var(--gold); }
.pc-photo { height: 160px; overflow: hidden; background: var(--sand); }
.pc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.place-card .pc-badges { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 16px 0; }
.place-card .pc-body { padding: 8px 16px 16px; }
.place-card .pc-name { font-size: 1.08rem; font-weight: 800; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.place-card .pc-stars { color: var(--gold); font-size: .85rem; font-weight: 700; margin-left: auto; }
.place-card .pc-en { color: var(--slate); font-size: .85rem; font-weight: 600; margin-top: 1px; }
.place-card .pc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.place-card .pc-desc { margin-top: 10px; font-size: .88rem; color: var(--ink-soft); }
.place-card .pc-actions { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }

.chip {
  font-size: .74rem; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--beige); color: var(--ink-soft); white-space: nowrap;
}
.chip.time { background: var(--sky); color: var(--accent-deep); }
.chip.dur { background: var(--sage); color: #2f6a58; }
.chip.rate { background: #e3f2ee; color: #2f7d6a; }
.chip.tag { background: var(--off-white); border: 1px solid var(--line); }
.badge {
  font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.92); backdrop-filter: blur(3px); color: var(--ink);
}
.badge.rec { background: var(--gold); color: #fff; }
.badge.open { background: var(--ok); color: #fff; }
.badge.closed { background: var(--danger); color: #fff; }
.badge.check { background: #d9a24a; color: #fff; }
.badge.optional { background: var(--slate); color: #fff; }
.badge.must { background: var(--accent-deep); color: #fff; }

.status-line { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; font-weight: 600; }

/* transition strip */
.transition-strip { text-align: center; font-size: .86rem; font-weight: 600; color: var(--ink-soft); padding: 8px; background: linear-gradient(90deg, var(--sky), var(--sage)); border-radius: 999px; }

/* plan A / plan B */
.plan-wrap { display: grid; gap: 12px; }
@media (min-width: 720px) { .plan-wrap { grid-template-columns: 1fr auto 1fr; align-items: center; } }
.plan-box { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--white); }
.plan-box .ph { padding: 5px 12px; font-weight: 800; font-size: .78rem; color: #fff; }
.plan-a .ph { background: var(--accent-deep); }
.plan-b .ph { background: var(--gold); }
.plan-box .pb { padding: 12px 14px; }
.plan-arrow { text-align: center; font-weight: 800; color: var(--slate); }
@media (max-width: 719px) { .plan-arrow { transform: rotate(90deg); } }

/* ------------------------------- MAP ------------------------------- */
.map-route { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.map-route .node { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 700; box-shadow: var(--shadow); }
.map-route .seg { color: var(--slate); font-weight: 700; }
.map-embed { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.map-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 8px; margin-top: 16px; }
.map-links a { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: .84rem; font-weight: 600; display: flex; gap: 6px; align-items: center; box-shadow: var(--shadow); }

/* ----------------------------- HOTELS ----------------------------- */
.hotel-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.hotel-card .photo { height: 130px; }
.hotel-card .hc-body { padding: 14px 16px 16px; }
.hotel-card .hc-night { font-weight: 800; color: var(--accent-deep); font-size: .82rem; }
.hotel-card .hc-name { font-weight: 700; margin-top: 3px; }
.hotel-card .hc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.hotel-card .hc-notes { font-size: .83rem; color: var(--ink-soft); margin-top: 9px; }
.hotel-card .hc-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ---------------------------- EXPENSES ---------------------------- */
.exp-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 12px; margin-bottom: 20px; }
.exp-stat { background: linear-gradient(135deg, var(--white), var(--off-white)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.exp-stat .k { font-size: .76rem; color: var(--slate); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.exp-stat .v { font-size: 1.4rem; font-weight: 800; margin-top: 4px; color: var(--ink); }
.exp-cat { margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.exp-cat .cat-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--beige); font-weight: 700; }
.exp-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: .9rem; }
.exp-row .lbl { flex: 1; }
.exp-row .day { font-size: .74rem; color: var(--slate); white-space: nowrap; }
.exp-row .amt { font-weight: 700; font-variant-numeric: tabular-nums; margin-left: auto; }
.exp-row input[type="number"] { width: 92px; text-align: right; font: inherit; font-weight: 700; border: 1px solid var(--gold); border-radius: 7px; padding: 3px 6px; background: #f0faf9; margin-left: auto; }
.exp-row .del { color: var(--danger); font-weight: 800; }
.exp-row.exp-edit { flex-wrap: wrap; row-gap: 6px; }
.exp-row.exp-edit .lbl { flex: 1 1 100%; font: inherit; border: 1px solid var(--line); border-radius: 7px; padding: 4px 7px; }
.exp-sel { font: inherit; font-size: .82rem; border: 1px solid var(--line); border-radius: 7px; padding: 3px 5px; background: var(--white); max-width: 46%; }
.exp-row.exp-edit input[type="number"] { margin-left: 0; }
.exp-bars { margin-top: 18px; display: grid; gap: 8px; }
.exp-bar-row { display: grid; grid-template-columns: 66px 1fr auto; gap: 10px; align-items: center; font-size: .82rem; }
.exp-bar-track { height: 10px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.exp-bar-fill { height: 100%; background: linear-gradient(90deg, var(--sky-deep), var(--accent)); }

/* ---------------------------- TOP 10 ----------------------------- */
.top-list { display: grid; gap: 8px; }
.top-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); transition: transform .14s; }
.top-item:hover { transform: translateX(3px); }
.top-item .medal { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--beige); font-weight: 800; font-size: .85rem; }
.top-item.gold .medal { background: linear-gradient(135deg, #f3d9a4, #d9b06a); }
.top-item .tname { flex: 1; font-weight: 700; }
.top-item .tstars { color: var(--gold); font-size: .8rem; letter-spacing: 1px; }

/* ----------------------------- MODAL ----------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(35,45,44,.5);
  backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s ease;
}
@media (min-width: 720px) { .modal-backdrop { align-items: center; padding: 20px; } }
.modal {
  position: relative;
  background: var(--off-white); width: 100%; max-width: 560px; max-height: 92vh;
  border-radius: 22px 22px 0 0; overflow-y: auto; box-shadow: var(--shadow-lg);
  animation: slideup .28s cubic-bezier(.2,.8,.2,1);
}
@media (min-width: 720px) { .modal { border-radius: 22px; } }
@keyframes slideup { from { transform: translateY(40px); opacity: .6;} to { transform: none; opacity: 1;} }
.g-wrap { position: relative; background: var(--sand); }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery .g-img { min-width: 100%; width: 100%; height: 260px; object-fit: cover; scroll-snap-align: center; display: block; }
.g-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--ink); font-size: 1.4rem; line-height: 1;
  display: grid; place-items: center; box-shadow: var(--shadow); z-index: 2;
}
.g-prev { left: 10px; } .g-next { right: 10px; }
.g-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; z-index: 2; }
.g-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); }
.g-dots span.on { background: #fff; width: 18px; border-radius: 4px; }
.g-none { height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(135deg, var(--sky), var(--sage)); font-size: 1.8rem; }
.g-none span { font-size: .78rem; color: var(--ink-soft); max-width: 80%; text-align: center; }

.m-rating { margin-top: 6px; font-weight: 700; color: var(--ink); font-size: .92rem; }
.m-rating .m-stars { color: var(--gold); }
.m-info { margin: 14px 0 4px; display: grid; gap: 8px; }
.m-row { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink); }
.m-ic { flex: 0 0 20px; text-align: center; }
.pc-cam { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--ink); color: #fff; }
.modal .m-close { position: absolute; top: 12px; right: 12px; background: var(--white); width: 34px; height: 34px; border-radius: 50%; font-size: 1.1rem; font-weight: 700; box-shadow: var(--shadow); z-index: 3; }
.modal .m-body { padding: 20px 20px 26px; }
.modal .m-title { padding-right: 40px; }
.modal .m-title { font-size: 1.35rem; font-weight: 800; }
.modal .m-en { color: var(--slate); font-weight: 600; margin-top: 2px; }
.modal .m-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.modal .m-section { margin-top: 14px; }
.modal .m-section h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--slate); margin-bottom: 5px; }
.modal .m-section p, .modal .m-section li { font-size: .92rem; color: var(--ink); }
.modal .m-section ul { margin-left: 18px; }
.modal .m-note { background: #eaf6f2; border-left: 3px solid var(--gold); padding: 10px 12px; border-radius: 8px; font-size: .88rem; }
.modal .m-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* editor rows inside modal / edit mode */
.ed-field { margin-bottom: 10px; }
.ed-field label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); display: block; margin-bottom: 3px; }
.ed-field input, .ed-field textarea, .ed-field select {
  width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--white);
}
.ed-field textarea { min-height: 64px; resize: vertical; }
.ed-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.reorder { display: flex; gap: 4px; }
.reorder button { width: 26px; height: 26px; border-radius: 7px; background: var(--beige); font-weight: 800; }

.edit-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 45;
  box-shadow: var(--shadow-lg);
}
.edit-banner {
  background: var(--gold); color: #fff; text-align: center; font-weight: 700; font-size: .82rem;
  padding: 6px 12px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap;
}

.toast {
  position: fixed; left: 50%; bottom: 78px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: .86rem; z-index: 120; box-shadow: var(--shadow-lg);
  animation: fade .2s ease;
}

/* photo themes (gradient "photos") */
.photo { background-size: cover; background-position: center; position: relative; }
.ph-coast { background: linear-gradient(160deg,#8fc3d4 0%,#bfe0e0 45%,#e7dcc4 100%); }
.ph-beach { background: linear-gradient(160deg,#a9d8de 0%,#e4e7cf 55%,#f1e2c4 100%); }
.ph-mountain { background: linear-gradient(160deg,#8fb0a6 0%,#c3cdb7 50%,#e8e0cd 100%); }
.ph-cliff { background: linear-gradient(160deg,#7fa0a8 0%,#a9c3ab 45%,#ded2b6 100%); }
.ph-ricefield { background: linear-gradient(160deg,#b6cf8f 0%,#dbe3b2 45%,#efe6cf 100%); }
.ph-geology { background: linear-gradient(160deg,#a7b0b3 0%,#cdbfa9 50%,#e9dcc6 100%); }
.ph-road { background: linear-gradient(160deg,#87b6c4 0%,#b4c6b8 40%,#d8c9ac 100%); }
.ph-lighthouse { background: linear-gradient(160deg,#9ccad8 0%,#dfe1cf 50%,#efdfc0 100%); }
.ph-stream { background: linear-gradient(160deg,#9fc7bb 0%,#c9d9bd 50%,#e8dfc7 100%); }
.ph-village { background: linear-gradient(160deg,#c2b79a 0%,#d8cbb0 50%,#e9e0cd 100%); }
.ph-city { background: linear-gradient(160deg,#a7bcc5 0%,#cdc9bb 55%,#e6ddcb 100%); }
.ph-night { background: linear-gradient(160deg,#4a5a75 0%,#7c7f9a 45%,#c7a58a 100%); }
.ph-sunset { background: linear-gradient(160deg,#f0b48a 0%,#e9a0a0 45%,#8a6f9a 100%); }
.photo::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 20% 15%, rgba(255,255,255,.35), transparent 55%);
}
.photo .theme-emoji { position: absolute; right: 12px; top: 10px; font-size: 1.5rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }

/* footer */
.footer { text-align: center; padding: 44px 20px 60px; background: linear-gradient(180deg, transparent, var(--beige)); }
.footer .f-title { font-weight: 800; font-size: 1.05rem; }
.footer .f-line { color: var(--ink-soft); font-size: .9rem; margin-top: 6px; }
.footer .f-small { color: var(--slate); font-size: .82rem; margin-top: 14px; }

.two-col { display: grid; gap: 24px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1.3fr 1fr; } }

/* ============================ MOBILE ============================= */
@media (max-width: 860px) {
  html { scroll-padding-top: 210px; }
  #itinerary, .section { scroll-margin-top: 210px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  html { scroll-padding-top: 214px; }
  .wrap { padding: 0 14px; }
  .section, #itinerary { padding: 30px 0; scroll-margin-top: 214px; }
  .section-head { margin-bottom: 18px; }

  /* topbar: brand + actions / day tabs / section tabs / progress */
  .topbar-inner { padding: 7px 14px; gap: 6px; }
  .brand-full, .lbl-full { display: none; }
  .brand-short, .lbl-short { display: inline; }
  .topbar .brand { font-size: .85rem; }
  .daynav { padding: 2px 14px 7px; }
  .daynav button { padding: 6px 11px; font-size: .8rem; }
  .daynav button .d { font-size: .66rem; }
  .secnav-row { padding: 7px 12px; gap: 5px; }
  .secnav { flex: 1 1 40%; font-size: .76rem; padding: 7px 6px; }
  .btn.sm { padding: 6px 10px; }
  .progress { padding: 8px 0 0; font-size: .72rem; gap: 6px; }
  .progress .daychain { display: none; }

  /* hero */
  .hero-inner { padding: 20px 0 18px; }
  .hero h1 { font-size: 1.45rem; }
  .hero .route { font-size: .82rem; padding: 7px 12px; }
  .eyebrow { font-size: .66rem; }

  /* info card */
  .infocard { margin-top: 14px; padding: 15px; border-radius: 14px; }
  .info-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .info-item { padding: 9px 11px; }
  .info-item .k { font-size: .68rem; }
  .info-item .v { font-size: .9rem; }
  .goal-note { font-size: .86rem; padding: 10px 12px; }

  /* day view */
  .day-header h3 { font-size: 1.35rem; }
  .day-header .routeline { font-size: .82rem; }
  .day-header .summary { font-size: .86rem; }
  .timeline { margin-left: 2px; }
  .tl-item { padding-left: 34px; }
  .tl-dot { left: 2px; }
  .tl-item::before { left: 11px; }

  /* cards */
  .place-card .pc-name { font-size: 1rem; }
  .pc-actions .btn, .hc-actions .btn { flex: 1; justify-content: center; }
  .chip { font-size: .7rem; }

  /* map / expenses */
  .map-embed { height: 260px; }
  .map-route { gap: 6px; }
  .map-route .node { padding: 5px 10px; font-size: .82rem; }
  .exp-summary { grid-template-columns: 1fr; gap: 8px; }
  .exp-stat { padding: 12px 14px; }
  .exp-stat .v { font-size: 1.2rem; }
  .exp-row { flex-wrap: wrap; row-gap: 4px; }
  .exp-row .lbl, .exp-row .lbl.cjk { flex: 1 1 100%; }
  .exp-bar-row { grid-template-columns: 46px 1fr auto; font-size: .76rem; }

  /* modal = full-height sheet */
  .modal { max-height: 94vh; }
  .modal .m-body { padding: 18px 16px 24px; }
  .modal .m-title { font-size: 1.15rem; }
  .modal .m-actions .btn { flex: 1; justify-content: center; }

  .edit-fab { right: 12px; bottom: 12px; font-size: .8rem; padding: 10px 14px; }
  .footer { padding: 32px 16px 44px; }
}

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