:root {
  --bg: #fbf8f3; --card: #ffffff; --ink: #1f2a37; --muted: #5b6676; --line: #e6e0d6;
  --brand: #0f766e; --brand-ink: #ffffff; --accent: #c2410c; --soft: #f1ece3;
  --red: #b91c1c; --red-bg: #fde8e8; --amber: #92400e; --amber-bg: #fdf1dc; --ok: #166534; --ok-bg: #e6f4ea; --info: #1e40af; --info-bg: #e8eefc;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161c; --card: #1a2029; --ink: #e8ecf1; --muted: #9aa5b4; --line: #2b3440;
    --brand: #2dd4bf; --brand-ink: #062b28; --accent: #fb923c; --soft: #212833;
    --red: #fca5a5; --red-bg: #3a1d1d; --amber: #fcd34d; --amber-bg: #3a2f17; --ok: #86efac; --ok-bg: #173022; --info: #93c5fd; --info-bg: #1a2742;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
img { max-width: 100%; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
header.top { border-bottom: 1px solid var(--line); background: var(--card); }
header.top .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.logo { font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.logo span { color: var(--brand); }
nav.main { display: flex; gap: 16px; margin-left: auto; font-size: 15px; }
nav.main a { color: var(--muted); text-decoration: none; }
nav.main a:hover { color: var(--ink); }
footer.foot { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0 40px; color: var(--muted); font-size: 14px; }
footer.foot a { color: var(--muted); }
h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; letter-spacing: -.02em; margin: 28px 0 12px; }
h2 { font-size: 24px; margin: 32px 0 12px; letter-spacing: -.01em; }
h3 { font-size: 18px; margin: 20px 0 8px; }
.lede { font-size: 18px; color: var(--muted); max-width: 720px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; padding: 11px 20px; font-size: 16px; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: wait; }
.prompt { display: flex; flex-direction: column; gap: 10px; }
.prompt textarea { width: 100%; min-height: 92px; resize: vertical; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; font: inherit; font-size: 17px; background: var(--card); color: var(--ink); }
.prompt textarea:focus, input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--soft); border-radius: 999px; padding: 5px 12px; font-size: 14px; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--brand); }
label { font-size: 13px; color: var(--muted); display: block; margin-bottom: 3px; }
input, select { font: inherit; font-size: 15px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: var(--card); color: var(--ink); width: 100%; }
input[type=checkbox] { width: auto; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.row > div { flex: 1 1 130px; }
details.form { margin-top: 14px; }
details.form summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.stop, .leg { display: grid; gap: 8px; grid-template-columns: 2fr 1.3fr 1fr .8fr auto; align-items: end; margin-bottom: 8px; }
.leg { grid-template-columns: .8fr .8fr 1.6fr 1.6fr auto auto; }
@media (max-width: 700px) { .stop, .leg { grid-template-columns: 1fr 1fr; } }
.interests { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
.interests label { display: inline-flex; gap: 5px; align-items: center; color: var(--ink); font-size: 14px; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat b { display: block; font-size: 24px; letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; margin-top: 8px; }
.tabs button { border: 0; background: none; font: inherit; padding: 10px 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.panel { padding-top: 16px; }
.day { margin-bottom: 18px; padding: 0; overflow: hidden; }
.day-h { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 12px 16px; background: var(--soft); border-bottom: 1px solid var(--line); }
.day-h h3 { margin: 0; font-size: 17px; }
.day-h .sub { color: var(--muted); font-size: 14px; }
.day-h .tot { margin-left: auto; font-size: 14px; color: var(--muted); }
.day-h .tot b { color: var(--ink); }
table.items { width: 100%; border-collapse: collapse; font-size: 15px; }
table.items th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.items td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.items tr:last-child td { border-bottom: 0; }
td.t { white-space: nowrap; font-variant-numeric: tabular-nums; }
td.home { color: var(--muted); white-space: nowrap; font-size: 13px; font-variant-numeric: tabular-nums; }
td.c { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.it-title { font-weight: 600; }
.it-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--soft); color: var(--muted); margin-left: 6px; vertical-align: 1px; }
.tag.pre { background: var(--info-bg); color: var(--info); }
tr.k-meal .it-title, tr.k-travel .it-title, tr.k-hotel .it-title { font-weight: 500; }
tr.k-buffer td { background: repeating-linear-gradient(45deg, transparent 0 8px, var(--soft) 8px 16px); }
tr.k-note .it-title { font-weight: 400; font-style: italic; color: var(--muted); }
.links a { white-space: nowrap; font-size: 14px; }
@media (max-width: 700px) {
  table.items thead { display: none; }
  table.items tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
  table.items td { border: 0; padding: 0; }
  td.home { grid-column: 1; grid-row: 2; }
  td.t { grid-row: 1; }
  td.what { grid-column: 2; grid-row: 1 / span 3; }
  td.c { grid-column: 3; grid-row: 1; }
  td.links { grid-column: 2 / span 2; }
}
.warn { border-radius: 8px; padding: 9px 12px; margin: 6px 0; font-size: 15px; }
.warn.red { background: var(--red-bg); color: var(--red); }
.warn.amber { background: var(--amber-bg); color: var(--amber); }
.warn.ok { background: var(--ok-bg); color: var(--ok); }
.warn.info { background: var(--info-bg); color: var(--info); }
.note { background: var(--soft); border-radius: 8px; padding: 10px 12px; color: var(--muted); font-size: 14px; }
.disclose { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.city-card { text-decoration: none; color: var(--ink); display: block; }
.city-card:hover { border-color: var(--brand); }
.city-card h3 { margin: 0 0 4px; }
.top10 { counter-reset: n; list-style: none; padding: 0; }
.top10 > li { counter-increment: n; position: relative; padding: 14px 0 14px 52px; border-bottom: 1px solid var(--line); }
.top10 > li::before { content: counter(n); position: absolute; left: 0; top: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; }
.top10 h3 { margin: 0 0 4px; }
.facts { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0; }
.skip { background: var(--amber-bg); color: var(--amber); border-radius: 8px; padding: 8px 10px; font-size: 14px; margin: 8px 0; }
.trip-note { border-left: 4px solid var(--accent); background: var(--card); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; margin: 16px 0; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wear { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.wear ul, .card ul { margin: 6px 0; padding-left: 20px; }
@media print {
  header.top, footer.foot, .no-print, .tabs, .prompt, details.form { display: none !important; }
  .panel.hidden { display: block !important; }
  body { background: #fff; color: #000; font-size: 12px; }
  .card, .day { box-shadow: none; break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
