:root {
  --bg: #f7f3ec;
  --card: #ffffff;
  --ink: #1f2a2e;
  --muted: #6a7478;
  --line: #ebe5da;
  --accent: #0e8a7e;
  --accent-soft: #e2f3f0;
  --sun: #f2994a;
  --done: #a3abae;
  --shadow: 0 1px 2px rgba(31, 42, 46, .05), 0 6px 18px rgba(31, 42, 46, .06);
  --hero: linear-gradient(135deg, #f6a95b 0%, #ef7b6a 38%, #1f9e95 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12181a;
    --card: #1b2326;
    --ink: #eef3f3;
    --muted: #9aa6a9;
    --line: #2a3438;
    --accent: #3fc6b6;
    --accent-soft: #173a37;
    --sun: #f5ac64;
    --done: #64706f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    --hero: linear-gradient(135deg, #b8673a 0%, #a8505a 40%, #13706a 100%);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }

/* Hero */
.hero {
  background: var(--hero);
  color: #fff;
  padding: 34px 16px 64px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: -10%; right: -10%; bottom: -1px;
  height: 46px;
  background: var(--bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero-inner { max-width: 640px; margin: 0 auto; position: relative; z-index: 1; }
.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .35);
  padding: 4px 10px; border-radius: 999px;
}
.hero h1 { font-size: 30px; line-height: 1.15; margin: 12px 0 6px; font-weight: 800; letter-spacing: -.01em; }
.hero p { margin: 0; opacity: .92; font-size: 15px; }
.hero .pill-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; padding: 9px 14px; border-radius: 999px;
  background: #fff; color: #1f2a2e; font-weight: 700; font-size: 14px; text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}

main { max-width: 640px; margin: -34px auto 0; padding: 0 16px 64px; position: relative; z-index: 2; }

/* Sticky progress */
.progress {
  position: sticky; top: 10px; z-index: 5;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 12px;
}
.progress .meter { flex: 1; height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress .meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sun), var(--accent)); border-radius: 999px; transition: width .35s ease; }
.progress .count { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }

/* Cards */
section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 16px 8px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}
section h2 {
  font-size: 17px; font-weight: 800; margin: 0 0 6px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
section h2 small {
  font-size: 12px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
section.complete { border-color: var(--accent); }
section.complete h2 small { background: var(--accent); color: #fff; }

/* Checklist rows */
label {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 4px; margin: 0 -4px;
  border-top: 1px solid var(--line);
  cursor: pointer; border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
label:first-of-type { border-top: 0; }
label:active { background: var(--accent-soft); }
input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  flex: 0 0 24px; width: 24px; height: 24px; margin: 0;
  border: 2px solid #c9c2b6; border-radius: 8px;
  display: grid; place-content: center; cursor: pointer;
  background: var(--card);
  transition: background .15s, border-color .15s, transform .1s;
}
input[type=checkbox]:active { transform: scale(.92); }
input[type=checkbox]::after {
  content: ""; width: 6px; height: 11px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0); margin-top: -2px;
  transition: transform .15s ease;
}
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::after { transform: rotate(45deg) scale(1); }
label span { padding-top: 1px; transition: color .15s; }
input:checked + span { color: var(--done); text-decoration: line-through; text-decoration-thickness: 1.5px; }

.note { font-size: 14px; color: var(--muted); margin: 4px 0 8px; }

button {
  margin: 8px 0 10px; background: transparent;
  border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 8px 14px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
button:hover { border-color: var(--accent); color: var(--accent); }

/* Help card */
.help .contacts { display: grid; gap: 8px; margin: 6px 0 4px; }
.help .contacts a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 12px; border-radius: 12px; background: var(--accent-soft);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px;
}
.help .contacts a b { color: var(--accent); }

footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 24px; }

/* Day plan */
.back { display: inline-block; color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; opacity: .95; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.legend span { font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .3); padding: 3px 9px; border-radius: 999px; }
.rules { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); font-size: 14px; }
.rules b { color: var(--accent); }
.day .date { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sun); }
.day h2 { margin-top: 2px; }
.day h2 .sub { font-size: 13px; font-weight: 600; color: var(--muted); }
.stop { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.stop:first-of-type { border-top: 0; }
.stop .time { font-size: 13px; font-weight: 800; color: var(--accent); padding-top: 2px; }
.stop .what { font-size: 15px; }
.stop .what small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.grab {
  display: inline-block; font-weight: 700; font-size: 13.5px;
  background: var(--accent-soft); color: var(--accent);
  padding: 1px 8px; border-radius: 6px;
}
.tip {
  margin: 8px 0 8px; padding: 9px 12px; border-radius: 12px;
  background: #fff4e8; color: #8a4b12; font-size: 13.5px;
}
@media (prefers-color-scheme: dark) { .tip { background: #3a2a1b; color: #f3c79b; } }

@media (max-width: 380px) {
  .hero h1 { font-size: 26px; }
  .stop { grid-template-columns: 56px 1fr; }
}

a.grab { text-decoration: none; }
a.grab:hover { text-decoration: underline; }
.taxi { display: inline-block; margin: 2px 0 6px; font-size: 13px; font-weight: 700; color: #8a4b12; background: #fff4e8; padding: 4px 10px; border-radius: 999px; }
@media (prefers-color-scheme: dark) { .taxi { background: #3a2a1b; color: #f3c79b; } }

/* Money: baht big and bold, rupees tiny and faint */
.thb { font-weight: 800; font-size: 1.06em; white-space: nowrap; color: var(--ink); }
.inr { font-size: 9px; opacity: .45; margin-left: 3px; font-weight: 400; white-space: nowrap; }

/* Prominent day-plan buttons */
.cta-hero {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px; padding: 14px 16px; border-radius: 16px;
  background: #fff; color: #1f2a2e; text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
  animation: nudge 2.4s ease-in-out infinite;
}
.cta-hero > span:first-child { font-size: 28px; }
.cta-hero b { display: block; font-size: 17px; font-weight: 800; }
.cta-hero small { display: block; font-size: 13px; color: #5d676b; margin-top: 2px; }
.cta-hero .arrow, .cta-card .arrow { margin-left: auto; font-size: 24px; font-weight: 800; color: var(--accent); }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .cta-hero { animation: none; } }
.cta-card {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(135deg, #f6a95b, #1f9e95); color: #fff; text-decoration: none;
  box-shadow: var(--shadow);
}
.cta-card .icon { font-size: 26px; }
.cta-card b { display: block; font-size: 17px; font-weight: 800; }
.cta-card small { display: block; font-size: 13px; opacity: .92; margin-top: 2px; }
.cta-card .arrow { color: #fff; }
.cta-float {
  position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 20; padding: 12px 16px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 15px; text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
body:has(.cta-float) main { padding-bottom: 90px; }

/* First-flight guide (collapsible, compact) */
details.guide { margin: 10px 0 8px; border-radius: 14px; border: 2px solid var(--accent); background: var(--accent-soft); overflow: hidden; }
details.guide summary { list-style: none; cursor: pointer; padding: 12px 14px; font-size: 16px; color: var(--ink); display: flex; align-items: center; gap: 6px; }
details.guide summary::-webkit-details-marker { display: none; }
details.guide summary span { margin-left: auto; font-size: 12px; font-weight: 800; color: #fff; background: var(--accent); padding: 4px 10px; border-radius: 999px; }
details.guide[open] summary span::after { content: " ▲"; }
details.guide:not([open]) summary span::after { content: " ▼"; }
.g-stage { background: var(--card); margin: 0 10px 8px; border-radius: 12px; padding: 8px 10px 4px; }
.g-h { font-size: 13px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
ol.g-steps { counter-reset: g; list-style: none; padding: 0; margin: 0; }
ol.g-steps li { counter-increment: g; position: relative; padding: 5px 0 5px 28px; font-size: 14.5px; line-height: 1.35; }
ol.g-steps li::before { content: counter(g); position: absolute; left: 0; top: 5px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; display: grid; place-content: center; }
.g-help { font-size: 13px; color: var(--muted); padding: 2px 14px 12px; }

/* Shared-ticks status line */
.sync { font-size: 12px; font-weight: 700; margin: 6px 4px 0; color: var(--muted); }
.sync.ok { color: var(--accent); }
.sync.warn { color: #c2410c; }

/* Fold-out checklist cards (travel day, move, fly home) */
section.fold { padding: 0; overflow: hidden; }
section.fold details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
section.fold details > summary::-webkit-details-marker { display: none; }
section.fold details > summary h2 { margin: 0; flex: 1; }
section.fold .tap { font-size: 12px; font-weight: 800; color: #fff; background: var(--accent); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
section.fold details:not([open]) .tap::after { content: " ▼"; }
section.fold details[open] .tap::after { content: " ▲"; }
section.fold details > label { margin: 0 12px; padding-left: 4px; padding-right: 4px; }
section.fold details > label:last-of-type { margin-bottom: 8px; }
section.fold details[open] > summary { border-bottom: 1px solid var(--line); }

/* Day-plan buttons: glow + "tap me" hint */
@keyframes glow {
  0%   { box-shadow: 0 0 0 0 rgba(14, 138, 126, .55), 0 6px 20px rgba(0,0,0,.22); }
  70%  { box-shadow: 0 0 0 14px rgba(14, 138, 126, 0), 0 6px 20px rgba(0,0,0,.22); }
  100% { box-shadow: 0 0 0 0 rgba(14, 138, 126, 0), 0 6px 20px rgba(0,0,0,.22); }
}
@keyframes glow-warm {
  0%   { box-shadow: 0 0 0 0 rgba(246, 169, 91, .6); }
  70%  { box-shadow: 0 0 0 14px rgba(246, 169, 91, 0); }
  100% { box-shadow: 0 0 0 0 rgba(246, 169, 91, 0); }
}
@keyframes slide-arrow { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@keyframes tap-hint { 0%, 60%, 100% { transform: scale(1); } 70% { transform: scale(.96); } 80% { transform: scale(1.02); } }
.cta-hero { animation: glow 2s ease-out infinite, tap-hint 3s ease-in-out infinite; }
.cta-card { animation: glow-warm 2.2s ease-out infinite, tap-hint 3.4s ease-in-out infinite; }
.cta-float { animation: glow 2s ease-out infinite; }
.cta-hero .arrow, .cta-card .arrow { display: inline-block; animation: slide-arrow 1.2s ease-in-out infinite; }
.cta-hero b::after, .cta-card b::after { content: "  👆 tap"; font-size: 12px; font-weight: 700; opacity: .75; }
@media (prefers-reduced-motion: reduce) {
  .cta-hero, .cta-card, .cta-float, .cta-hero .arrow, .cta-card .arrow { animation: none; }
}

.subhead { display: flex; justify-content: space-between; align-items: center; margin: 22px 4px 6px; font-size: 15px; font-weight: 800; color: var(--ink); }
.subhead .count2 { font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; }

/* Past days: folded, tap to open. Today: glowing. */
.day.past { cursor: pointer; opacity: .78; }
.day.past > :not(.date):not(h2) { display: none; }
.day.past.open > :not(.date):not(h2) { display: revert; }
.day.past.open > .stop { display: grid; }
.day.past .date { color: var(--done); }
.day.past .date::after { content: " · ✓ Done"; color: var(--accent); }
.day.past h2::after { content: "▾ Tap"; float: right; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; }
.day.past.open h2::after { content: "▴ Close"; }
.day.today { border: 2px solid var(--sun); animation: todayGlow 2.4s ease-in-out infinite; scroll-margin-top: 12px; }
.day.today .date::after { content: " · ★ Today"; color: var(--sun); }
@keyframes todayGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 153, 74, .25), 0 6px 18px rgba(242, 153, 74, .25); }
  50% { box-shadow: 0 0 0 6px rgba(242, 153, 74, .18), 0 8px 28px rgba(242, 153, 74, .45); }
}
@media (prefers-reduced-motion: reduce) { .day.today { animation: none; box-shadow: 0 0 0 4px rgba(242, 153, 74, .3); } }
