/* 东极岛跳岛执行手册 —— 航海路书
   深海蓝 #143A52 · 日出橙 #D96B2B（仅红线/日出）· 苔礁绿 #4A7A62（完成态）· 雾白底 */

:root {
  --navy: #143a52;
  --navy-deep: #0e2c40;
  --navy-soft: #3a6079;
  --terra: #d96b2b;
  --terra-dark: #b1521c;
  --terra-pale: #f9e7d8;
  --grass: #4a7a62;
  --grass-pale: #e3ede7;
  --paper: #f4f4ef;
  --card: #fdfdfa;
  --sand: #dfe5df;
  --ink: #223440;
  --ink-soft: #5b6c78;
  --line: #d8ddd6;
  --sky: #e3edf3;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sans: "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "Menlo", "Consolas", monospace;
  --rail: 4.6rem; /* 时间轴左轨位置 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.65;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

.view { display: none; max-width: 720px; margin: 0 auto; padding: 0 14px 28px; }
.view.active { display: block; }

/* ============ 顶部横幅 ============ */
.masthead {
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 62%, #1f5068 100%);
  color: #f3ecdd;
  margin: 0 -14px 16px;
  padding: 26px 20px 20px;
  position: relative;
  overflow: hidden;
}
.masthead::after { /* 海平线与浪 */
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 42px;
  background:
    linear-gradient(115deg, transparent 42%, rgba(243,236,221,.10) 42.5%, transparent 55%),
    linear-gradient(245deg, transparent 55%, rgba(243,236,221,.07) 55.5%, transparent 70%);
  pointer-events: none;
}
.masthead .kicker {
  font-family: var(--mono);
  font-size: .68rem; letter-spacing: .32em;
  color: #e0a35c; text-transform: uppercase;
  margin-bottom: 8px;
}
.masthead h1 {
  font-family: var(--serif);
  font-size: 1.5rem; font-weight: 700; letter-spacing: .04em;
  line-height: 1.35;
}
.masthead .sub {
  font-size: .78rem; color: #b5c6d2; margin-top: 8px; line-height: 1.7;
}
.masthead .stats { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.masthead .stat {
  border: 1px solid rgba(243,236,221,.25);
  border-radius: 4px; padding: 4px 10px;
  font-size: .72rem; color: #dfe6ef;
}
.masthead .stat b { color: #f5cf9e; font-weight: 600; }

/* ============ 通用卡片/标题 ============ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(27,46,68,.05);
}
.sec-title {
  font-family: var(--serif);
  font-size: 1.02rem; font-weight: 700; color: var(--navy);
  display: flex; align-items: baseline; gap: 8px;
  margin: 22px 2px 10px;
}
.sec-title .no {
  font-family: var(--mono); font-size: .7rem; color: var(--terra);
  letter-spacing: .14em;
}
.muted { color: var(--ink-soft); font-size: .8rem; }

/* ============ 今天视图 ============ */
.today-banner {
  border-radius: 10px; padding: 14px 16px; margin-bottom: 14px;
  background: var(--navy); color: #f3ecdd;
}
.today-banner .tb-label {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .26em;
  color: #e0a35c; margin-bottom: 4px;
}
.today-banner .tb-main { font-family: var(--serif); font-size: 1.08rem; font-weight: 700; }
.today-banner .tb-sub { font-size: .78rem; color: #b5c6d2; margin-top: 4px; }
.today-banner.redline-passed { background: var(--terra-dark); }
.today-banner.redline-passed .tb-label { color: #f5cdb9; }
.today-banner.redline-passed .tb-sub { color: #f2ddd2; }

.countdown-row { display: flex; gap: 10px; margin: 14px 0; }
.cd-cell {
  flex: 1; text-align: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 4px 10px;
}
.cd-cell .cd-num { font-family: var(--mono); font-size: 1.7rem; font-weight: 700; color: var(--navy); }
.cd-cell .cd-unit { font-size: .68rem; color: var(--ink-soft); margin-top: 2px; }

.booking-console .bk-row { border-top: 1px dashed var(--line); padding: 10px 0; display: flex; gap: 10px; align-items: flex-start; }
.booking-console .bk-row:first-of-type { border-top: 0; }

/* ============ 日选择条 ============ */
.day-strip {
  display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--card);
  border-radius: 8px; padding: 6px 10px 5px; text-align: center;
  cursor: pointer; min-width: 58px;
}
.day-chip .dc-d { font-family: var(--mono); font-size: .68rem; color: var(--ink-soft); }
.day-chip .dc-n { font-family: var(--serif); font-size: .92rem; font-weight: 700; color: var(--navy); }
.day-chip.on { background: var(--navy); border-color: var(--navy); }
.day-chip.on .dc-d { color: #e0a35c; }
.day-chip.on .dc-n { color: #f3ecdd; }
.day-chip.is-today { box-shadow: 0 0 0 2px var(--terra); }

/* ============ 单日详情 ============ */
.day-head {
  background: linear-gradient(150deg, var(--navy-deep), var(--navy));
  color: #f3ecdd; border-radius: 10px; padding: 16px; margin-bottom: 12px;
}
.day-head .dh-date { font-family: var(--mono); font-size: .7rem; letter-spacing: .2em; color: #e0a35c; }
.day-head h2 { font-family: var(--serif); font-size: 1.14rem; margin-top: 4px; line-height: 1.45; }
.day-head .dh-goal { font-size: .8rem; color: #c2d2dc; margin-top: 8px; line-height: 1.7; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip {
  font-size: .72rem; border-radius: 5px; padding: 4px 9px;
  background: var(--sky); color: var(--navy); border: 1px solid #cadbe5;
}
.chip b { font-weight: 600; }
.chip.chip-red { background: var(--terra-pale); color: var(--terra-dark); border-color: #eec9ab; font-weight: 600; }

.day-map { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 14px; background: var(--card); }
.day-map img { width: 100%; }
.day-map .cap {
  font-size: .7rem; color: var(--ink-soft); padding: 7px 12px;
  border-top: 1px solid var(--line); font-family: var(--mono);
}

/* ============ 路书时间轴（招牌结构） ============ */
.timeline { position: relative; padding: 4px 0 4px 0; }
.timeline::before { /* 左侧轨道 */
  content: ""; position: absolute; top: 8px; bottom: 8px; left: var(--rail);
  width: 2px; background: var(--sand);
}
.tl-item { position: relative; display: flex; gap: 14px; padding: 9px 0 9px 0; }
.tl-time {
  flex: 0 0 calc(var(--rail) - 14px); text-align: right;
  font-family: var(--mono); font-size: .82rem; font-weight: 700; color: var(--navy);
  padding-top: 1px;
}
.tl-item::before { /* 轨道节点 */
  content: ""; position: absolute; left: calc(var(--rail) - 4px); top: 16px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--card); border: 2.5px solid var(--navy-soft);
}
.tl-body { flex: 1; min-width: 0; padding-left: 12px; }
.tl-act { font-weight: 600; font-size: .92rem; color: var(--ink); }
.tl-note { font-size: .8rem; color: var(--ink-soft); margin-top: 2px; line-height: 1.7; }

.tl-item.done .tl-act { color: var(--ink-soft); }
.tl-item.done::before { background: var(--grass); border-color: var(--grass); }
.tl-item.now::before {
  border-color: var(--terra); background: var(--terra);
  box-shadow: 0 0 0 4px rgba(193,78,51,.18);
}
.tl-item.now .tl-body {
  background: #fdf6ef; border: 1px solid #eeded0; border-radius: 8px;
  padding: 8px 10px 8px 12px; margin: -6px 0;
}
.tl-item.now .tl-act::after {
  content: "现在"; font-size: .62rem; color: #fff; background: var(--terra);
  border-radius: 3px; padding: 1px 6px; margin-left: 8px; vertical-align: 2px;
  font-weight: 600;
}

/* 红线：物理上横穿轨道 */
.tl-redline {
  position: relative; margin: 10px 0; padding: 8px 10px 8px calc(var(--rail) + 12px);
  border-top: 2px solid var(--terra); border-bottom: 2px solid var(--terra);
  background: var(--terra-pale);
}
.tl-redline::before {
  content: ""; position: absolute; left: calc(var(--rail) - 6px); top: 50%;
  width: 14px; height: 14px; transform: translateY(-50%) rotate(45deg);
  background: var(--terra);
}
.tl-redline .rl-tag {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: .6rem; font-weight: 700;
  color: var(--terra-dark); letter-spacing: .1em; writing-mode: horizontal-tb;
}
.tl-redline .rl-text { font-size: .82rem; font-weight: 700; color: var(--terra-dark); }
.tl-redline .rl-sub { font-size: .72rem; color: #96522e; margin-top: 1px; }

/* ============ 住/食双卡 ============ */
.twin { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (max-width: 480px) { .twin { grid-template-columns: 1fr; } }
.twin .card { margin-bottom: 0; }
.twin h4, .block-title {
  font-family: var(--serif); font-size: .86rem; color: var(--navy);
  margin-bottom: 6px; font-weight: 700;
}
.twin p { font-size: .8rem; color: var(--ink-soft); line-height: 1.7; }

/* ============ IF-THEN ============ */
.ifthen { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 14px; background: var(--card); }
.ifthen .it-head {
  font-family: var(--serif); font-size: .86rem; font-weight: 700;
  background: var(--sand); color: var(--navy); padding: 9px 14px;
}
.ifthen .it-row { display: flex; border-top: 1px solid var(--line); }
.ifthen .it-if {
  flex: 0 0 38%; padding: 10px 12px; font-size: .78rem; font-weight: 600;
  color: var(--terra-dark); background: #fcf6f1; border-right: 1px solid var(--line);
}
.ifthen .it-then { flex: 1; padding: 10px 12px; font-size: .78rem; color: var(--ink); line-height: 1.65; }

/* ============ 导航段 ============ */
.seg { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; background: var(--card); }
.seg img { width: 100%; }
.seg .seg-body { padding: 12px 14px; }
.seg .seg-title { font-family: var(--serif); font-weight: 700; font-size: .9rem; color: var(--navy); }
.seg .seg-note { font-size: .78rem; color: var(--ink-soft); margin-top: 4px; line-height: 1.7; }
.seg .nav-btn {
  display: inline-block; margin-top: 10px; text-decoration: none;
  background: var(--navy); color: #f3ecdd; font-size: .78rem; font-weight: 600;
  border-radius: 6px; padding: 8px 14px;
}
.seg .nav-btn::before { content: "▲ "; color: #e0a35c; font-size: .66rem; }
.seg.seg-alt { opacity: .82; }
.seg.seg-alt .seg-title::after {
  content: "不推荐 · 仅参考"; font-size: .62rem; color: var(--terra-dark);
  background: var(--terra-pale); border-radius: 3px; padding: 1px 6px; margin-left: 8px;
  vertical-align: 1px;
}

/* ============ 预约控制台 ============ */
.bk-card { border-left: 4px solid var(--navy-soft); }
.bk-card.due-soon { border-left-color: var(--terra); }
.bk-card.done { border-left-color: var(--grass); background: var(--grass-pale); }
.bk-top { display: flex; align-items: flex-start; gap: 10px; }
.bk-check {
  flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px;
  accent-color: var(--grass);
}
.bk-name { font-weight: 600; font-size: .9rem; }
.bk-card.done .bk-name { text-decoration: line-through; color: var(--ink-soft); }
.bk-due {
  font-family: var(--mono); font-size: .7rem; font-weight: 700;
  color: var(--terra-dark); margin-top: 2px;
}
.bk-card.done .bk-due { color: var(--grass); }
.bk-meta { font-size: .76rem; color: var(--ink-soft); margin-top: 6px; line-height: 1.7; }
.bk-meta b { color: var(--ink); font-weight: 600; }

/* 酒店表 */
.hotel-row { display: flex; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); align-items: flex-start; }
.hotel-row:first-child { border-top: 0; }
.hotel-date { flex: 0 0 74px; font-family: var(--mono); font-size: .74rem; font-weight: 700; color: var(--navy); padding-top: 2px; }
.hotel-city { font-weight: 600; font-size: .86rem; }
.hotel-note { font-size: .76rem; color: var(--ink-soft); margin-top: 1px; line-height: 1.65; }
.hotel-tip { font-size: .72rem; color: var(--terra-dark); margin-top: 2px; }

/* 预算 */
.budget-cards { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
.budget-card { border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px; background: var(--card); }
.budget-card .bc-name { font-size: .74rem; color: var(--ink-soft); }
.budget-card .bc-val { font-family: var(--mono); font-weight: 700; font-size: 1rem; color: var(--navy); margin: 1px 0 2px; }
.budget-card .bc-note { font-size: .72rem; color: var(--ink-soft); }
.budget-line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); font-size: .8rem; }
.budget-line:first-child { border-top: 0; }
.budget-line .bl-name { font-weight: 600; flex: 0 0 auto; }
.budget-line .bl-val { font-family: var(--mono); color: var(--navy); font-weight: 600; text-align: right; }
.budget-line .bl-note { font-size: .7rem; color: var(--ink-soft); flex: 1; text-align: right; align-self: center; }

/* ============ 装备清单 ============ */
.pack-group { margin-bottom: 14px; }
.pack-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0; border-top: 1px dashed var(--line);
  font-size: .82rem; line-height: 1.6;
}
.pack-item:first-of-type { border-top: 0; }
.pack-item input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; accent-color: var(--grass); }
.pack-item.checked label { color: var(--ink-soft); text-decoration: line-through; }
.pack-item label { flex: 1; }
.pack-progress { font-family: var(--mono); font-size: .68rem; color: var(--grass); font-weight: 700; }

/* ============ 应急 ============ */
.safe-card { border-left: 4px solid var(--navy-soft); }
.safe-card.tone-warn { border-left-color: #b98a2e; }
.safe-card.tone-alert { border-left-color: var(--terra); }
.safe-card ul { list-style: none; }
.safe-card li {
  font-size: .8rem; padding: 7px 0 7px 16px; border-top: 1px dashed var(--line);
  position: relative; line-height: 1.7;
}
.safe-card li:first-child { border-top: 0; }
.safe-card li::before { content: "·"; position: absolute; left: 2px; color: var(--terra); font-weight: 700; }
.tel { font-family: var(--mono); font-weight: 700; color: var(--navy); text-decoration: none; border-bottom: 1px dashed var(--navy-soft); }

/* ============ 底部导航 ============ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: var(--navy-deep);
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid rgba(243,236,221,.12);
}
.tab {
  flex: 1; background: none; border: 0; color: #8fa0b5;
  padding: 9px 0 8px; cursor: pointer; text-align: center;
}
.tab .t-ico { font-family: var(--serif); font-size: 1.02rem; display: block; line-height: 1.2; }
.tab .t-txt { font-size: .64rem; display: block; margin-top: 1px; letter-spacing: .06em; }
.tab.on { color: #f5cf9e; }
.tab.on .t-ico { color: #f5cf9e; }

.footer-note {
  text-align: center; font-size: .68rem; color: var(--ink-soft);
  font-family: var(--mono); margin: 26px 0 8px; letter-spacing: .04em;
}

@media (min-width: 640px) {
  body { font-size: 16px; }
  .masthead { border-radius: 0 0 14px 14px; margin: 0 0 18px; }
  .view { padding: 0 0 32px; }
  .budget-cards { grid-template-columns: repeat(3, 1fr); }
}
