:root {
  --ink: #17333a;
  --muted: #687b7f;
  --sea: #0f8fa3;
  --sea-deep: #0a7181;
  --sea-soft: #dff3f2;
  --sand: #f8f1e4;
  --cream: #fffaf1;
  --sun: #f4a836;
  --coral: #ef7f6d;
  --green: #4f936d;
  --rose: #fbe7e3;
  --line: #c9dddd;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 45px rgba(20, 63, 71, 0.10);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #dff5f4 0, #fff9ef 340px, #fffaf2 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.5;
}
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(30px + var(--safe-bottom));
}

.hero {
  min-height: 255px;
  padding: 52px 22px 26px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 16%, rgba(255,255,255,.72) 0 5%, transparent 6%),
    linear-gradient(160deg, #61cad8 0%, #1597ad 43%, #0c6f87 100%);
  color: white;
}
.hero:after {
  content: "";
  position: absolute;
  left: -8%; right: -8%; bottom: -72px;
  height: 140px;
  background: var(--cream);
  border-radius: 50% 50% 0 0 / 35% 35% 0 0;
}
.hero-copy { position: relative; z-index: 3; }
.eyebrow {
  font-size: 12px;
  letter-spacing: .12em;
  font-weight: 800;
  opacity: .78;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(42px, 11vw, 64px);
  line-height: .95;
  margin: 8px 0 7px;
  letter-spacing: -.04em;
}
.trip-dates { margin: 0; font-weight: 800; font-size: 17px; }
.tagline { margin: 8px 0 0; font-size: 15px; opacity: .92; }
.hero-art { position: absolute; inset: 0; pointer-events: none; }
.sun { position: absolute; right: 10%; top: 35px; font-size: 58px; opacity: .35; }
.palm { position: absolute; right: 8%; bottom: 58px; font-size: 80px; filter: drop-shadow(0 10px 10px rgba(0,0,0,.08)); transform: rotate(-5deg); }
.wave { position: absolute; left: -10%; width: 120%; border-radius: 50%; background: rgba(255,255,255,.17); }
.wave-a { height: 80px; bottom: 36px; transform: rotate(-2deg); }
.wave-b { height: 58px; bottom: 15px; background: rgba(255,255,255,.10); transform: rotate(2deg); }

main { padding: 0 14px; position: relative; z-index: 5; }
.card {
  background: var(--card);
  border: 1px solid rgba(35, 102, 112, .10);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.today-card { padding: 20px; margin-top: -20px; }
.today-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pill { background: var(--sea-soft); color: var(--sea-deep); font-weight: 800; padding: 6px 12px; border-radius: 999px; font-size: 13px; }
.text-button { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 5px; }
.today-grid { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.day-kicker { font-size: 32px; font-weight: 900; color: var(--sea-deep); line-height: 1; letter-spacing: -.04em; }
.today-card h2 { margin: 8px 0 4px; font-size: 20px; }
.today-card p { margin: 0; color: var(--muted); font-size: 14px; }
.today-emoji { font-size: 52px; }
.primary-action {
  margin-top: 18px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--sea), #13a4b5);
  color: white; font-weight: 900;
  border-radius: 18px; padding: 14px 18px;
  box-shadow: 0 10px 20px rgba(15,143,163,.18);
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(64px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding: 14px 1px 4px;
}
.day-tab {
  border: 0;
  background: rgba(255,255,255,.75);
  border-radius: 16px;
  padding: 11px 5px;
  min-width: 64px;
  text-align: center;
  box-shadow: 0 4px 18px rgba(31,65,71,.05);
}
.day-tab strong { display:block; font-size:14px; }
.day-tab span { display:block; font-size:11px; color:var(--muted); margin-top:2px; }
.day-tab.active { background: var(--sea); color:white; }
.day-tab.active span { color: rgba(255,255,255,.8); }

.quick-actions { display:grid; grid-template-columns: repeat(3,1fr); gap:8px; padding: 12px 0 16px; }
.quick-card {
  border: 1px solid rgba(31,91,99,.09);
  background: rgba(255,255,255,.82);
  border-radius: 18px;
  min-height: 82px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px;
  color: var(--ink); font-weight:800; font-size:12px;
}
.quick-icon { font-size: 25px; }

.day-content { margin-top: 2px; }
.day-heading {
  padding: 20px 18px 17px;
  background: linear-gradient(145deg, #fef8ed, #ffffff);
  border-radius: 25px;
  border: 1px solid rgba(35,102,112,.08);
  margin-bottom: 12px;
}
.day-heading-top { display:flex; align-items:start; justify-content:space-between; gap:10px; }
.day-heading h2 { margin:4px 0 2px; font-size:27px; letter-spacing:-.03em; }
.day-heading p { margin:0; color:var(--muted); font-size:13px; }
.day-date { font-size: 13px; font-weight: 800; color: var(--sea-deep); background: var(--sea-soft); padding: 7px 10px; border-radius: 999px; white-space: nowrap; }

.timeline { position: relative; padding-left: 22px; }
.timeline:before {
  content:""; position:absolute; left:7px; top:10px; bottom:10px; width:2px; background:linear-gradient(var(--sea), rgba(15,143,163,.15));
}
.stop {
  position:relative;
  background:rgba(255,255,255,.91);
  border:1px solid rgba(27,85,93,.09);
  border-radius:22px;
  padding:16px;
  margin:0 0 11px 0;
  box-shadow:0 8px 25px rgba(34,73,79,.06);
}
.stop:before {
  content:""; position:absolute; left:-22px; top:22px; width:12px; height:12px; background:white; border:3px solid var(--sea); border-radius:50%;
}
.stop.done { opacity:.62; }
.stop.done .stop-name { text-decoration: line-through; text-decoration-thickness: 1px; }
.stop-top { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:start; }
.stop-time { font-weight:900; color:var(--sea-deep); font-size:14px; min-width:48px; }
.stop-name { font-size:18px; font-weight:900; line-height:1.2; margin-bottom:4px; }
.stop-desc { color:var(--muted); font-size:13px; }
.stop-badge { font-size:10px; padding:5px 7px; border-radius:999px; background:#fff0c9; color:#8a5b00; font-weight:800; white-space:nowrap; }
.stop-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.meta-chip { background:var(--sand); border-radius:10px; padding:6px 8px; font-size:11px; color:#52696d; }
.stop-actions { display:grid; grid-template-columns:1fr 1fr auto; gap:7px; margin-top:12px; }
.action-link, .done-button {
  border:0; border-radius:13px; min-height:40px; padding:9px 10px; font-weight:800; font-size:12px; display:flex; align-items:center; justify-content:center; gap:4px;
}
.action-link.primary { background:var(--sea); color:white; }
.action-link.secondary { background:var(--sea-soft); color:var(--sea-deep); }
.done-button { background:#f0f3f2; color:#607477; }
.done-button.done { background:#dff1e6; color:#31704b; }

.optional-zone { margin:16px 0; }
.section-title { display:flex; align-items:center; gap:7px; margin:0 0 9px 3px; font-size:17px; }
.optional-card {
  border-radius:21px; padding:16px; background:linear-gradient(135deg,#fff9e8,#fffefb); border:1px solid #f3dfac; margin-bottom:10px;
}
.optional-card h4 { margin:0 0 5px; font-size:17px; }
.optional-card p { margin:0; color:#6b715f; font-size:13px; }
.optional-meta { margin-top:9px; display:flex; flex-wrap:wrap; gap:6px; }
.optional-chip { font-size:11px; padding:5px 8px; border-radius:999px; background:#fff1c5; color:#775516; }
.optional-rule { margin-top:10px; font-size:12px; font-weight:800; color:#7d5b21; }

.plan-grid { display:grid; gap:10px; margin:15px 0; }
.plan-card { border-radius:21px; padding:15px; }
.plan-card h3 { margin:0 0 7px; font-size:16px; }
.plan-card p, .plan-card li { font-size:13px; color:#5e6f72; }
.plan-card ul { margin:6px 0 0; padding-left:18px; }
.plan-rain { background:#fbe9ea; border:1px solid #f1ced2; }
.plan-tired { background:#eaf5e7; border:1px solid #d5e8cf; }
.plan-food { background:#fff1dc; border:1px solid #f2ddbc; }

.travel-note { padding:18px; margin:18px 0 0; }
.travel-note h3 { margin:0 0 11px; }
.note-grid { display:grid; gap:9px; font-size:13px; color:#536a6e; }

footer { text-align:center; color:#7c8c8e; font-size:11px; padding:22px 10px 4px; }
.footer-dot { margin: 0 6px; }

.sheet-backdrop { position:fixed; inset:0; background:rgba(13,39,44,.36); z-index:40; }
.bottom-sheet {
  position:fixed; z-index:50; left:50%; bottom:0; transform:translate(-50%, 110%); width:min(100%,760px); max-height:78dvh; overflow:auto;
  background:#fffdf8; border-radius:28px 28px 0 0; padding:10px 18px calc(22px + var(--safe-bottom)); box-shadow:0 -18px 50px rgba(22,54,60,.22); transition:transform .24s ease;
}
.bottom-sheet.open { transform:translate(-50%,0); }
.sheet-handle { width:46px; height:5px; background:#cbd6d7; border-radius:999px; margin:2px auto 14px; }
.sheet-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.sheet-header h2 { margin:3px 0 0; }
.close-button { border:0; background:#eef3f2; border-radius:50%; width:36px; height:36px; font-size:24px; }
.food-option { padding:14px 0; border-bottom:1px solid #e9eeee; }
.food-option:last-child { border:0; }
.food-option strong { display:block; margin-bottom:4px; }
.food-option span { color:var(--muted); font-size:13px; }

@media (min-width: 600px) {
  main { padding: 0 22px; }
  .hero { border-radius: 0 0 38px 38px; }
  .plan-grid { grid-template-columns:1fr 1fr; }
  .plan-food { grid-column:1/-1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bottom-sheet { transition:none; }
}
