/* =========================================================================
 * 岛主和佳佳的旅行手账 · 设计系统
 * 风格：温润纸感 + 衬线正文 + 陶土/藏青/赭黄/橄榄四色叙事
 * 借鉴 renezhang.fun/iberia 的"慢游志"编辑风，但内容本土化为中国旅行
 * ========================================================================= */

:root {
  /* —— 纸张与墨色（温润纸感，最终调色） —— */
  --paper:        #f5f0e7;
  --paper-deep:   #e9dfd0;
  --paper-bright: #fbf8f1;
  --ink:          #173b57;   /* 深藏青，主文字（非纯黑，更有书卷气） */
  --ink-soft:     #5e6f7b;
  --ink-faint:    #8b989d;

  /* —— 叙事四色 —— */
  --terracotta:   #b2573a;   /* 陶土红：主强调（路线/行动） */
  --terracotta-d: #8e3f2b;
  --saffron:      #a98543;   /* 赭黄：美食/暖 */
  --olive:        #66764a;   /* 橄榄绿：自然 */
  --atlantic:     #4a748c;   /* 海蓝：人文/水 */
  --rose:         #966578;   /* 故事/柔 */

  /* —— 线框与阴影 —— */
  --line:         #d8cdbf;
  --line-strong:  #b8a895;
  --shadow:       0 20px 54px rgba(30, 53, 65, 0.09);
  --shadow-sm:    0 8px 22px rgba(30, 53, 65, 0.07);

  /* —— 字体 —— */
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, "Times New Roman", serif;
  --sans:  "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  /* —— 圆角 —— */
  --r:      18px;
  --r-sm:   10px;
  --r-pill: 999px;

  /* —— 动效令牌（统一节奏，便于全局调参） —— */
  --ease:        cubic-bezier(.22,.61,.36,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
  --dur:        420ms;
  --dur-1:      240ms;
  --dur-2:      420ms;
  --dur-3:      680ms;

  /* —— 间距标尺（4px 栅格，纵向韵律统一） —— */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
}

* { box-sizing: border-box; }

html { background: var(--paper); scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 600px at 85% -5%, rgba(189,140,47,.07), transparent 60%),
    radial-gradient(900px 500px at -5% 110%, rgba(62,117,159,.06), transparent 60%),
    var(--paper);
  background-attachment: fixed;
}

a { color: var(--terracotta); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* ============================ 顶部导航 ============================ */
.app-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(247,242,232,.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.app-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; }
.brand .logo { font-size: 22px; }
.brand .name { letter-spacing: .5px; }
.brand .name small { display:block; font-size: 11px; color: var(--ink-soft); font-weight: 400; letter-spacing: 2px; }
.nav-links { display: flex; gap: 22px; font-size: 14px; font-family: var(--sans); }
.nav-links a { color: var(--ink-soft); }
.nav-links a:hover { color: var(--terracotta); text-decoration: none; }
@media (max-width: 720px){ .nav-links{ display:none; } }

/* ============================ Hero（沉浸式照片封面） ============================ */
.hero {
  position: relative; min-height: 78vh; display: flex; align-items: flex-end;
  overflow: hidden; isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2; background: var(--ink);
  transform: scale(1.04); transition: transform 6s ease-out;
}
.hero.scrolled .hero-bg { transform: scale(1); }
.hero-scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(13,49,85,.18) 0%, rgba(13,49,85,.05) 35%, rgba(13,49,85,.82) 100%),
    linear-gradient(90deg, rgba(13,49,85,.45), rgba(13,49,85,.12));
}
.hero-inner { padding: 48px 22px 56px; color: #fff; max-width: 1080px; width: 100%; }
.hero .kicker {
  font-family: var(--sans); font-size: 13px; letter-spacing: 5px;
  color: #ffe9d6; text-transform: none; margin-bottom: 16px;
  text-shadow: 0 1px 12px rgba(0,0,0,.35);
}
.hero h1 {
  font-size: clamp(34px, 6.2vw, 62px); line-height: 1.08; margin: 0 0 18px;
  font-weight: 700; letter-spacing: 1px; max-width: 16em;
  text-shadow: 0 2px 24px rgba(0,0,0,.4);
}
.hero h1 em { font-style: normal; color: #ffd9a8; }
.hero .lead {
  max-width: 600px; margin: 0 0 22px; color: rgba(255,255,255,.92);
  font-size: 18px; line-height: 1.95; text-shadow: 0 1px 14px rgba(0,0,0,.4);
}
.hero .meta {
  margin-bottom: 24px; display: flex; gap: 12px; flex-wrap: wrap;
  font-family: var(--sans); font-size: 13px; color: rgba(255,255,255,.92);
}
.hero .meta span {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  padding: 6px 14px; border-radius: 999px; backdrop-filter: blur(4px);
}
.hero-cta {
  display: inline-block; font-family: var(--sans); font-size: 16px; font-weight: 600;
  padding: 14px 30px; border-radius: 999px; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--terracotta), var(--terracotta-d));
  box-shadow: 0 10px 26px rgba(0,0,0,.35); transition: transform .18s var(--ease), box-shadow .18s;
}
.hero-cta:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 16px 34px rgba(0,0,0,.45); }
.hero-credit {
  margin-top: 14px; font-family: var(--sans); font-size: 11px;
  color: rgba(255,255,255,.6); letter-spacing: .3px;
}

/* ====================== 灵感相册（真实旅行图） ====================== */
.inspo { margin: 44px auto 8px; }
.inspo-head { text-align: center; margin-bottom: 18px; }
.inspo-head .kicker { font-family: var(--sans); font-size: 12px; letter-spacing: 3px; color: var(--terracotta); }
.inspo-head h2 { font-size: 26px; margin: 6px 0 0; font-weight: 700; }
.inspo-strip {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
}
@media (max-width: 860px){ .inspo-strip{ grid-template-columns: repeat(3,1fr); } }
@media (max-width: 480px){ .inspo-strip{ grid-template-columns: repeat(2,1fr); } }
.inspo-cell {
  position: relative; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4/5;
  box-shadow: var(--shadow-sm); cursor: pointer; background: var(--paper-deep);
  transition: transform .22s var(--ease), box-shadow .22s;
}
.inspo-cell:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.inspo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inspo-cell .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 9px;
  font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(13,49,85,.78));
}

/* ====================== 定制面板（AI 路线引擎） ====================== */
.customize {
  margin: 40px auto 8px;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.customize .hd {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 26px; border-bottom: 1px dashed var(--line);
}
.customize .hd .badge {
  font-family: var(--sans); font-size: 11px; letter-spacing: 2px;
  background: var(--ink); color: var(--paper-bright); padding: 4px 10px; border-radius: 6px;
}
.customize .hd h2 { margin: 0; font-size: 21px; font-weight: 700; }
.customize .hd p { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); font-family: var(--sans); }

.form-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 26px;
  padding: 24px 26px;
}
@media (max-width: 680px){ .form-grid{ grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 9px; }
.field > label {
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 7px;
}
.field > label .ic { color: var(--terracotta); }

/* 多选标签（口味） */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--sans); font-size: 13px; cursor: pointer; user-select: none;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink-soft); transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--terracotta); color: var(--terracotta); }
.chip.on {
  background: var(--terracotta); border-color: var(--terracotta); color: #fff;
  box-shadow: 0 4px 12px rgba(189,87,50,.28);
}
.chip .dot { display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:5px; vertical-align: middle; }

/* 下拉/输入 */
select, input[type="number"], input[type="text"] {
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  padding: 11px 13px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: #fff; width: 100%; transition: border-color .18s, box-shadow .18s;
  appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23526779' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
select:focus, input:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 3px rgba(189,87,50,.14); }

.field.full { grid-column: 1 / -1; }

/* 节奏 单选条 */
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; font-family: var(--sans); font-size: 14px; cursor: pointer;
  padding: 10px 6px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink-soft); transition: all .18s var(--ease);
}
.seg button.on { background: var(--atlantic); border-color: var(--atlantic); color: #fff; box-shadow: 0 4px 12px rgba(62,117,159,.28); }
.seg button small { display:block; font-size: 11px; opacity:.8; margin-top:2px; }

/* 生成按钮 */
.gen-row { padding: 0 26px 26px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
/* 路线灵感预设 */
.preset-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 6px 0 22px; }
.preset-btn {
  text-align: left; cursor: pointer; border: 1px solid var(--line); background: var(--paper-bright);
  border-radius: var(--r); padding: 14px 16px; transition: transform .18s var(--ease), box-shadow .18s, border-color .18s;
  font-family: var(--sans);
}
.preset-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--terracotta); }
.preset-btn .pl { display: block; font-weight: 700; font-size: 15px; color: var(--ink); font-family: var(--serif); }
.preset-btn .pd { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); }

.btn-gen {
  font-family: var(--sans); font-size: 16px; font-weight: 600; cursor: pointer;
  padding: 14px 30px; border-radius: 999px; border: none; color: #fff;
  background: linear-gradient(135deg, var(--terracotta), var(--terracotta-d));
  box-shadow: 0 10px 24px rgba(189,87,50,.32); transition: transform .18s var(--ease), box-shadow .18s;
}
.btn-gen:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(189,87,50,.4); }
.btn-gen:active { transform: translateY(0); }
.gen-hint { font-family: var(--sans); font-size: 13px; color: var(--ink-soft); }

/* ============================ 结果区 ============================ */
.result { margin: 36px 0 60px; }
.result.hidden { display: none; }

.trip-head { text-align: center; margin-bottom: 26px; }
.trip-head .kicker { font-family: var(--sans); font-size: 12px; letter-spacing: 3px; color: var(--terracotta); }
.trip-head h2 { font-size: clamp(26px, 4.5vw, 40px); margin: 8px 0 6px; font-weight: 700; }
.trip-head .sub { color: var(--ink-soft); font-family: var(--sans); font-size: 14px; }

/* 进度条 */
.progress { max-width: 520px; margin: 18px auto 0; }
.progress .track { height: 7px; border-radius: 999px; background: var(--paper-deep); overflow: hidden; border: 1px solid var(--line); }
.progress .fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--saffron), var(--terracotta)); border-radius: 999px; transition: width .9s var(--ease); }
.progress .lbl { font-family: var(--sans); font-size: 12px; color: var(--ink-soft); margin-top: 6px; text-align: right; }

/* 地图 */
.map-card {
  background: var(--paper-bright); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-sm); padding: 18px; margin: 26px 0;
}
.map-card .map-title { font-family: var(--sans); font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; display:flex; justify-content: space-between; }
.map-svg { width: 100%; height: auto; display: block; border-radius: 10px; background: linear-gradient(180deg, #eef3f6, #e7eef0); }
.map-svg .cn-land { fill: #f3ead9; stroke: var(--line-strong); stroke-width: 1; }
.map-svg .cn-isl { fill: #f3ead9; stroke: var(--line-strong); stroke-width: 1; }
.map-svg .route { fill: none; stroke: var(--terracotta); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .9; stroke-dasharray: 2000; stroke-dashoffset: 2000; }
.map-svg .route.drawn { animation: draw 1.6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.map-svg .city { fill: #fff; stroke: var(--terracotta); stroke-width: 2; }
.map-svg .city.done { fill: var(--terracotta); }
.map-svg .city.now { fill: var(--saffron); stroke: var(--terracotta-d); r: 6; }
.map-svg .city-label { font-family: var(--sans); font-size: 9px; fill: var(--ink); }
.map-svg .foot { fill: var(--olive); opacity:.5; }
.map-svg .grid { stroke: #cdd8dd; stroke-width: .5; opacity:.5; }

/* 视图切换 tabs */
.tabs { display: flex; gap: 6px; justify-content: center; margin: 8px 0 22px; flex-wrap: wrap; }
.tab {
  font-family: var(--sans); font-size: 14px; cursor: pointer; padding: 9px 20px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-soft);
  transition: all .18s var(--ease);
}
.tab.on { background: var(--ink); border-color: var(--ink); color: var(--paper-bright); }
.tab .ic { margin-right: 6px; }

/* 每日卡片 */
.day-list { display: flex; flex-direction: column; gap: 18px; }
.day-card {
  background: var(--paper-bright); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-sm); overflow: hidden; opacity: 0; transform: translateY(14px);
}
.day-card.in { opacity: 1; transform: none; animation: rise .5s var(--ease) both; }
.day-card.instant { animation: none; } /* 切 Tab 等二次渲染：直接显形，不重放动画 */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 地图站点点击 -> 对应日卡高亮闪一下 */
.day-card.flash { box-shadow: 0 0 0 2px var(--terracotta), var(--shadow-sm); transition: box-shadow var(--dur-1) var(--ease); }

/* ====================== 流畅层：生成后的编排式揭幕 ====================== */
/* generate() 给 #result 加 .reveal-in，让头部/地图/标签/贴士错落上浮入场，
   每日卡片仍由各自 .in 错落动画负责，二者不重叠。 */
#result.reveal-in > .trip-head    { animation: su-rise .55s var(--ease) both; }
#result.reveal-in > .map-card     { animation: su-rise .55s .08s var(--ease) both; }
#result.reveal-in > .poster-launch{ animation: su-rise .55s .14s var(--ease) both; }
#result.reveal-in > .poster-panel { animation: su-rise .55s .14s var(--ease) both; }
#result.reveal-in > .tabs        { animation: su-rise .55s .18s var(--ease) both; }
#result.reveal-in > .tips        { animation: su-rise .55s .26s var(--ease) both; }
@keyframes su-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.day-card .dc-head {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(189,87,50,.06), transparent);
}
.day-card .dc-no {
  font-family: var(--sans); font-weight: 700; font-size: 13px; color: #fff;
  background: var(--terracotta); min-width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; line-height: 1.1;
}
.day-card .dc-no small { display:block; font-size: 9px; opacity:.85; font-weight: 400; }
.day-card .dc-title { font-size: 19px; font-weight: 700; }
.day-card .dc-sub { font-family: var(--sans); font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.day-card .dc-tags { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dc-tags .t { font-family: var(--sans); font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-soft); }

.dc-body { padding: 8px 20px 18px; }

/* 卡片封面图 */
.dc-cover { position: relative; height: 188px; overflow: hidden; background: var(--paper-deep); }
.dc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.day-card:hover .dc-cover img { transform: scale(1.05); }
.dc-cover .dc-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 9px;
  font-family: var(--sans); font-size: 11.5px; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(13,49,85,.72));
}

/* 时间线 */
.timeline { position: relative; padding-left: 22px; margin-top: 10px; }
.timeline::before { content:""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 9px 0; }
.tl-item::before { content:""; position: absolute; left: -19px; top: 15px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--terracotta); }
.tl-item.fixed .tl-time { color: var(--terracotta); }
.tl-item.opt::before { border-color: var(--saffron); background: var(--saffron); }
.tl-time { font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--saffron); letter-spacing: .5px; }
.tl-title { font-weight: 700; font-size: 16px; margin: 1px 0 2px; }
.tl-note { color: var(--ink-soft); font-size: 14.5px; line-height: 1.7; }
.tl-flag { font-family: var(--sans); font-size: 11px; padding: 1px 8px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.tl-flag.fixed { background: rgba(189,87,50,.12); color: var(--terracotta-d); }
.tl-flag.opt { background: rgba(189,140,47,.14); color: var(--saffron); }

/* 区块小标题 */
.sec-h { font-family: var(--sans); font-size: 12px; letter-spacing: 2px; color: var(--ink-soft); margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; }
.sec-h::after { content:""; flex:1; height:1px; background: var(--line); }

/* 吃喝 / 出片 网格 */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 12px; margin-top: 8px; }
.gitem { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: #fff; }
.gitem .gt { font-weight: 700; font-size: 15px; display:flex; align-items:center; gap:7px; }
.gitem .gt .mk { font-size: 15px; }
.gitem .gn { color: var(--ink-soft); font-size: 13.5px; font-family: var(--sans); margin-top: 3px; }

/* 真实照片墙（出片视图） */
.photo-fig { margin: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.photo-fig img { width: 100%; height: 230px; object-fit: cover; display: block; background: var(--paper-deep); }
.photo-fig figcaption { padding: 11px 13px 13px; }
.photo-fig .cap { font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.photo-fig .cr { display: block; margin-top: 6px; font-family: var(--sans); font-size: 11px; color: var(--ink-faint); line-height: 1.5; }
.photo-fig .cr a { color: var(--ink-faint); }

/* 故事视图 */
.story-block { background: linear-gradient(180deg, rgba(176,87,111,.06), transparent); border-left: 3px solid var(--rose); border-radius: 0 10px 10px 0; padding: 14px 18px; margin-top: 10px; font-size: 16px; line-height: 1.9; color: var(--ink); }
.story-block .dayname { font-family: var(--sans); font-size: 12px; letter-spacing: 1px; color: var(--rose); display:block; margin-bottom: 4px; }

/* 出行贴士 */
.tips { background: var(--paper-bright); border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 16px 22px; margin-top: 26px; }
.tips h3 { margin: 0 0 8px; font-size: 17px; }
.tips ul { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 14.5px; font-family: var(--sans); }
.tips li { margin: 4px 0; }

/* ====================== 我们的足迹 ====================== */
.footprints { margin: 50px 0; }
.footprints .fp-head { text-align: center; margin-bottom: 22px; }
.footprints .fp-head h2 { font-size: 28px; margin: 6px 0; }
.footprints .fp-head p { color: var(--ink-soft); font-family: var(--sans); font-size: 14px; }
.fp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; }
.fp-card { background: var(--paper-bright); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s; }
.fp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.fp-card .fp-cover { height: 150px; overflow: hidden; background: linear-gradient(135deg, #efe6d2, #d9c9a6); position: relative; }
.fp-card .fp-cover.noimg::after { content: "📍"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; opacity: .45; }
.fp-card .fp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fp-card .fp-body { padding: 14px 16px 16px; }
.fp-card .fp-city { font-weight: 700; font-size: 18px; display:flex; align-items:center; gap:8px; }
.fp-card .fp-city .pin { color: var(--olive); }
.fp-card .fp-note { color: var(--ink-soft); font-size: 14px; margin-top: 6px; }
.fp-card .fp-when { font-family: var(--sans); font-size: 11px; color: var(--saffron); margin-top: 8px; letter-spacing: 1px; }

/* ============================ 页脚 ============================ */
.app-footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 30px 0 50px; text-align: center; color: var(--ink-soft); font-family: var(--sans); font-size: 13px; }
.app-footer a { color: var(--terracotta); }

/* 回到顶部 */
.totop { position: fixed; right: 20px; bottom: 22px; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; border: none; cursor: pointer; font-size: 18px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 70; }
.totop.show { opacity: 1; pointer-events: auto; }

/* 空状态 */
.empty { text-align:center; color: var(--ink-soft); padding: 40px; font-family: var(--sans); }

/* ====================== 杂志感升级（视觉细化层，沿用上方 :root 令牌） ====================== */
button, input, select { font: inherit; }

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(178, 87, 58, 0.42);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 18px;
  top: 12px;
  z-index: 100;
  padding: 9px 13px;
  border-radius: 9px;
  color: var(--paper-bright);
  background: var(--ink);
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}

.skip-link:focus { transform: translateY(0); }

.wrap { max-width: 1160px; padding-inline: 28px; }

.app-header {
  background: rgba(245, 240, 231, 0.88);
  border-bottom-color: rgba(184, 168, 149, 0.72);
}

.app-header .bar { height: 68px; }
.brand { gap: 12px; }
.brand .logo { font-size: 21px; }
.brand .name { font-size: 16px; }
.brand .name small { letter-spacing: 1.6px; }
.nav-links { gap: 26px; }
.nav-links a { position: relative; padding: 4px 0; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--terracotta);
  transition: right .24s var(--ease);
}
.nav-links a:hover::after { right: 0; }

.hero {
  min-height: min(780px, 84svh);
  align-items: flex-end;
}

.hero-inner { padding: 78px 28px 72px; }
.hero .kicker { letter-spacing: 4px; margin-bottom: 18px; }
.hero h1 {
  max-width: 12em;
  font-size: clamp(38px, 6vw, 66px);
  letter-spacing: 0;
  text-wrap: balance;
}
.hero h1 em { color: #f4c899; }
.hero .lead { max-width: 520px; font-size: 17px; line-height: 1.85; }
.hero .meta { gap: 10px; margin-bottom: 28px; }
.hero .meta span {
  padding: 6px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
}
.hero-cta,
.btn-gen {
  border-radius: 12px;
  background: var(--terracotta);
}
.hero-cta:hover,
.btn-gen:hover { background: var(--terracotta-d); }

.inspo { margin-top: 72px; }
.inspo-head { text-align: left; margin-bottom: 22px; }
.inspo-head h2 { font-size: clamp(26px, 3vw, 34px); }
.inspo-strip { gap: 14px; }
.inspo-cell { border-radius: 14px; box-shadow: none; }
.inspo-cell:hover { box-shadow: var(--shadow-sm); }

.customize {
  margin-top: 76px;
  background: var(--paper-bright);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.customize .hd { padding: 28px 30px; }
.customize .hd .badge {
  padding: 6px 10px;
  border-radius: 8px;
  letter-spacing: 1.4px;
}
.customize .hd h2 { font-size: 24px; }
.form-grid { gap: 22px 30px; padding: 30px; }
.field { gap: 8px; }
.field > label { font-size: 13px; letter-spacing: .1px; }
.field-mark {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--terracotta);
  transform: rotate(45deg);
}
.chips { gap: 9px; }
.chip {
  appearance: none;
  border-radius: 10px;
  background: transparent;
  padding: 8px 12px;
}
.chip.on { background: var(--terracotta); }
.seg {
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}
.seg button {
  border-color: transparent;
  border-radius: 9px;
  background: transparent;
}
.seg button.on { background: var(--ink); box-shadow: none; }
select, input[type="number"], input[type="text"] {
  background: rgba(255, 255, 255, 0.56);
  border-color: var(--line);
}
.preset-bar { margin: 0 30px 4px; gap: 10px; }
.preset-btn {
  border-color: var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: none;
}
.preset-btn:hover { box-shadow: none; }
.gen-row {
  padding: 22px 30px 30px;
  border-top: 1px solid var(--line);
}
.btn-gen { box-shadow: 0 10px 24px rgba(178, 87, 58, .2); }

.result { margin-top: 78px; }
.trip-head { max-width: 760px; margin: 0 0 30px; text-align: left; }
.trip-head h2 { text-wrap: balance; }
.progress { margin-left: 0; }
.progress .fill { background: var(--terracotta); }
.map-card {
  padding: 14px;
  border-radius: 22px;
  box-shadow: none;
}
.map-card .map-title { padding: 2px 4px 6px; }
.map-card .map-title small { color: var(--ink-faint); }
.map-svg { border-radius: 14px; }
.tabs {
  justify-content: flex-start;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.tab {
  border-color: transparent;
  border-radius: 10px;
  background: transparent;
  padding-inline: 15px;
}
.tab.on { background: var(--ink); }
.day-list { gap: 26px; }
.day-card { border-radius: 22px; box-shadow: none; }
.day-card .dc-head { padding: 18px 22px; background: transparent; }
.day-card .dc-no { border-radius: 14px; }
.dc-body { padding: 12px 22px 22px; }
.tips { box-shadow: none; }

.footprints { margin-top: 92px; }
.footprints .fp-head { max-width: 660px; margin: 0 0 28px; text-align: left; }
.footprints .fp-head h2 { font-size: clamp(28px, 3vw, 36px); }
.footprints .fp-head p { line-height: 1.8; }
.fp-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px 18px;
}
.fp-card {
  grid-column: span 4;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.fp-card:hover { box-shadow: none; }
.fp-card .fp-cover { height: 210px; border-radius: 16px; }
.fp-card .fp-body { padding: 14px 2px 0; }
.fp-card .fp-city { font-size: 19px; }

.app-footer {
  margin-top: 72px;
  padding-top: 28px;
  text-align: left;
}

@media (max-width: 720px) {
  .app-header .bar {
    height: auto;
    padding-block: 12px 10px;
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
  .brand .name small { display: none; }
  .nav-links {
    display: flex;
    width: 100%;
    overflow-x: auto;
    gap: 20px;
    white-space: nowrap;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .hero { min-height: 720px; }
  .hero-inner { padding: 64px 22px 54px; }
  .hero h1 { font-size: clamp(38px, 11vw, 54px); }
  .hero .lead { font-size: 16px; }
  .wrap { padding-inline: 20px; }
  .inspo { margin-top: 54px; }
  .customize { margin-top: 54px; border-radius: 18px; }
  .customize .hd { display: block; padding: 22px 20px; }
  .customize .hd .badge { display: inline-block; margin-bottom: 12px; }
  .form-grid { padding: 22px 20px; }
  .preset-bar { margin: 0 20px 4px; grid-template-columns: 1fr; }
  .gen-row { padding: 20px; align-items: stretch; }
  .btn-gen { width: 100%; }
  .gen-hint { display: block; }
  .result { margin-top: 60px; }
  .map-card { padding: 10px; border-radius: 18px; }
  .map-card .map-title { font-size: 12px; }
  .tabs { overflow-x: auto; white-space: nowrap; }
  .tab { flex: 0 0 auto; }
  .day-card { border-radius: 18px; }
  .day-card .dc-head,
  .dc-body { padding-inline: 16px; }
  .day-card .dc-tags { margin-left: 0; justify-content: flex-start; }
  .day-card .dc-head { flex-wrap: wrap; }
  .footprints { margin-top: 66px; }
  .fp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .fp-card { grid-column: span 1; }
  .fp-card .fp-cover { height: 160px; border-radius: 13px; }
}

@media (max-width: 480px) {
  .hero { min-height: 680px; }
  .hero .meta { display: grid; grid-template-columns: 1fr 1fr; }
  .hero .meta span { font-size: 12px; }
  .inspo-strip { gap: 9px; }
  .inspo-cell { border-radius: 11px; }
  .fp-grid { grid-template-columns: 1fr; }
  .fp-card .fp-cover { height: 210px; }
}

/* ====================== B 方案：路线地图工具化 ====================== */
.map-card {
  padding: 16px;
  background: rgba(251, 248, 241, 0.72);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(230px, 0.7fr);
  gap: 14px;
  align-items: stretch;
}

.map-stage {
  min-height: clamp(360px, 42vw, 520px);
  overflow: hidden;
  border: 1px solid rgba(184, 168, 149, 0.58);
  border-radius: 16px;
  background:
    radial-gradient(circle at 72% 30%, rgba(178, 87, 58, 0.06), transparent 27%),
    linear-gradient(145deg, #eef3f3, #e5edef);
}

.map-svg {
  width: 100%;
  height: 100%;
  min-height: inherit;
  border-radius: 0;
  background: transparent;
}

.map-svg .cn-land,
.map-svg .cn-isl {
  fill: rgba(246, 236, 218, 0.62);
  stroke: rgba(164, 145, 123, 0.58);
  stroke-width: 0.8;
}

.map-svg .grid {
  stroke: #c5d3d5;
  stroke-width: 0.5;
  stroke-dasharray: 2 8;
  opacity: 0.28;
}

.map-svg .foot {
  fill: var(--olive);
  opacity: 0.18;
}

.map-svg .route {
  stroke: var(--terracotta);
  stroke-width: 7;
  opacity: 0.16;
}

.map-svg .route.drawn {
  stroke-width: 3.5;
  opacity: 1;
  filter: drop-shadow(0 3px 4px rgba(142, 63, 43, 0.18));
}

.map-svg .city {
  fill: var(--paper-bright);
  stroke: var(--terracotta);
  stroke-width: 2.4;
}

.map-svg .city.done { fill: var(--terracotta); }
.map-svg .city.now { fill: var(--saffron); stroke: var(--ink); stroke-width: 2.6; }

.map-svg .city-number {
  fill: var(--ink);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  pointer-events: none;
}

.map-svg .city.done + .city-number { fill: var(--paper-bright); }

.map-svg .city-label { pointer-events: none; }
.map-svg .city-label rect {
  fill: rgba(251, 248, 241, 0.9);
  stroke: rgba(184, 168, 149, 0.68);
  stroke-width: 0.8;
}

.map-svg .city-label text {
  fill: var(--ink);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
}

.map-aside {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.map-aside-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.map-aside-head span {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 1.5px;
}

.map-aside-head strong {
  color: var(--terracotta);
  font-family: var(--serif);
  font-size: 20px;
}

.map-stops {
  display: flex;
  overflow: auto;
  flex: 1;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  max-height: 410px;
  margin: 0;
  padding: 4px 0 0;
  list-style: none;
}

.map-stop {
  display: grid;
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid rgba(216, 205, 191, 0.72);
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color .2s var(--ease), transform .2s var(--ease);
}

.map-stop:hover { color: var(--terracotta); transform: translateX(2px); }
.map-stop.now { color: var(--terracotta); }
.map-stop.return { border-top: 1px dashed rgba(184, 168, 149, 0.9); margin-top: 4px; padding-top: 14px; }
.map-stop.return .stop-no { color: var(--ink); border: 1px dashed var(--ink-soft); background: transparent; }

.stop-no {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  font-family: var(--sans);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.map-stop.now .stop-no { color: var(--paper-bright); background: var(--terracotta); }
.stop-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.stop-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.stop-copy small { color: var(--ink-faint); font-family: var(--sans); font-size: 11px; }
.map-stop.now .stop-copy small { color: var(--terracotta); }

.return-leg {
  margin-top: 18px;
  padding: 13px 15px;
  border-left: 3px solid var(--ink);
  border-radius: 0 12px 12px 0;
  background: rgba(23, 59, 87, 0.055);
}

.return-label {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.return-leg strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}

.return-leg p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.7;
}

.map-note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.7;
}

@media (max-width: 880px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-stage { min-height: min(64vw, 470px); }
  .map-stops {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    max-height: none;
  }
  .map-note { margin-top: 12px; }
}

@media (max-width: 480px) {
  .map-card { padding: 10px; }
  .map-stage { min-height: 300px; }
  .map-aside { padding: 15px 14px 13px; }
  .map-stops { grid-template-columns: 1fr; }
}

/* ====================== 路线手账图 ====================== */
.poster-launch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin: 22px 0 14px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(251, 248, 241, 0.92), rgba(236, 229, 213, 0.62));
}

.poster-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--terracotta);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 1.8px;
}

.poster-launch h3,
.poster-panel-head h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 700;
}

.poster-launch p {
  max-width: 560px;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.7;
}

.btn-poster,
.btn-quiet {
  border: 1px solid var(--ink);
  border-radius: 10px;
  color: var(--paper-bright);
  background: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
  transition: transform .22s var(--ease), background .22s var(--ease), color .22s var(--ease);
}

.btn-poster { padding: 13px 17px; white-space: nowrap; }
.btn-poster:hover,
.btn-quiet:hover { color: var(--ink); background: transparent; transform: translateY(-1px); }
.btn-poster:active,
.btn-quiet:active { transform: translateY(1px); }
.btn-poster:focus-visible,
.btn-quiet:focus-visible { outline: 3px solid rgba(178, 87, 58, 0.3); outline-offset: 3px; }

.poster-panel {
  margin: 14px 0 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(251, 248, 241, 0.74);
}

.poster-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 15px;
  max-width: 760px;
}

.poster-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-quiet { padding: 9px 12px; color: var(--ink); background: transparent; font-size: 12px; }
.btn-quiet:hover { color: var(--paper-bright); background: var(--ink); }

.poster-stage {
  max-width: 760px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(129, 150, 148, 0.72);
  border-radius: 14px;
  background: #b9c6c3;
  box-shadow: 0 18px 42px rgba(32, 61, 65, 0.14);
}

.poster-svg { display: block; width: 100%; height: auto; }
.poster-status {
  max-width: 760px;
  margin: 12px auto 0;
  color: var(--ink-faint);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.7;
}

@media (max-width: 620px) {
  .poster-launch { grid-template-columns: 1fr; gap: 15px; padding: 18px; }
  .btn-poster { width: 100%; }
  .poster-panel { padding: 10px; border-radius: 18px; }
  .poster-panel-head { display: block; }
  .poster-tools { margin-top: 12px; }
  .btn-quiet { flex: 1; }
}

/* 减少动效偏好 */
/* ===================== 愉悦层：手账里的小惊喜 ===================== */
/* 生成完成：盖一枚朱砂印 + 一行手写批注 */
.trip-stamp {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  margin: 12px auto 0; padding: 7px 16px;
  font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 2px;
  color: var(--terracotta-d); border: 2px solid var(--terracotta);
  border-radius: 11px; background: rgba(189,87,50,.05);
  transform: rotate(-7deg); opacity: 1;
  box-shadow: 0 2px 0 rgba(147,65,39,.16) inset;
  animation: stampIn .55s var(--ease) .12s both;
}
.trip-stamp::after {
  content: ""; position: absolute; inset: 3px; border-radius: 7px;
  border: 1px dashed rgba(147,65,39,.32); pointer-events: none;
}
.trip-stamp .mk { color: var(--terracotta); font-size: 14px; }
@keyframes stampIn {
  0%   { opacity: 0; transform: rotate(-7deg) scale(1.9); }
  55%  { opacity: 1; transform: rotate(-7deg) scale(.9); }
  72%  { transform: rotate(-7deg) scale(1.05); }
  100% { opacity: 1; transform: rotate(-7deg) scale(1); }
}
.trip-script {
  margin: 10px 0 0; font-family: var(--serif); font-style: italic;
  font-size: 14px; color: var(--ink-soft); letter-spacing: .5px;
}

/* 生成按钮：按下溅起一点墨 */
.btn-gen { position: relative; overflow: hidden; }
.btn-gen::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(255,255,255,.55);
  transform: translate(-50%,-50%) scale(0); opacity: 0; pointer-events: none;
}
.btn-gen.splat::after { animation: splat .5s var(--ease); }
@keyframes splat {
  0%   { opacity: .6; transform: translate(-50%,-50%) scale(0); }
  100% { opacity: 0;  transform: translate(-50%,-50%) scale(15); }
}

/* 路线节点：悬停落下一枚定位针 */
.map-stop::after {
  content: "\1F4CD"; position: absolute; right: 2px; top: 50%;
  font-size: 13px; opacity: 0; transform: translateY(-12px) rotate(-10deg);
  pointer-events: none;
}
.map-stop:hover::after, .map-stop:focus-within::after { animation: pinDrop .5s var(--ease) forwards; }
@keyframes pinDrop {
  0%   { opacity: 0; transform: translateY(-14px) rotate(-10deg); }
  55%  { opacity: 1; transform: translateY(2px) rotate(-10deg); }
  78%  { opacity: 1; transform: translateY(-3px) rotate(-10deg); }
  100% { opacity: 1; transform: translateY(0) rotate(-10deg); }
}

/* 彩蛋：手账里飘起的小符号 */
.fly-emoji {
  position: fixed; left: var(--x, 50%); bottom: 92px; z-index: 95;
  font-size: 26px; pointer-events: none; opacity: 0;
  animation: flyUp 2.6s var(--ease) forwards;
}
@keyframes flyUp {
  0%   { opacity: 0; transform: translateY(0) rotate(0); }
  15%  { opacity: .95; }
  100% { opacity: 0; transform: translateY(-190px) translateX(var(--dx, 0)) rotate(var(--rot, 20deg)); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .map-svg .route { stroke-dashoffset: 0 !important; }
}
