:root {
  --bg: #f6f7f6; --card: #fff; --text: #1c2421; --muted: #5f6b66; --line: #dde3e0;
  --accent: #0f766e; --accent-2: #115e59; --warn-bg: #fff7e6; --warn: #8a5a00; --err: #b42318; --chip: #e6f2f0;
  --radius: 12px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111615; --card: #1a2120; --text: #e7eceb; --muted: #9aa7a2; --line: #2b3533; --chip: #183230; --warn-bg: #2d2412; --warn: #f2c46d; --err: #ff8a80; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); padding-bottom: 72px; }
a { color: var(--accent); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--accent); color: #fff; }
.top a { color: #fff; text-decoration: none; font-weight: 700; }
.who { font-size: 14px; opacity: .9; }
.who button { margin-left: 6px; background: transparent; border: 1px solid #fff8; color: #fff; padding: 2px 8px; border-radius: 8px; font-size: 13px; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.35rem; margin: .2em 0 .6em; }
h2 { font-size: 1.1rem; margin: 1.2em 0 .5em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 0 0 12px; }
.card h3 { margin: 0 0 4px; font-size: 1rem; }
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 15px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 4px 12px 4px 0; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); }
input[type=checkbox], input[type=radio] { width: auto; }
textarea { min-height: 90px; resize: vertical; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
button, .btn { display: inline-block; font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 11px 16px; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; text-align: center; }
button:hover, .btn:hover { background: var(--accent-2); }
button.secondary, .btn.secondary { background: var(--chip); color: var(--text); }
button.danger { background: transparent; color: var(--err); border: 1px solid var(--err); }
button:disabled { opacity: .6; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; background: var(--chip); font-size: 14px; border: 1px solid transparent; cursor: pointer; user-select: none; }
.chip input { display: none; }
.chip.on { background: var(--accent); color: #fff; }
.tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--chip); margin-right: 4px; }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.notice { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: 15px; }
.error { color: var(--err); font-weight: 600; }
.people .person { display: flex; gap: 8px; margin-bottom: 6px; }
.people .person input:first-child { flex: 2; }
.people .person input:nth-child(2) { flex: 1; }
.people .person button { padding: 6px 12px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 62px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.timeline .time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; }
.timeline .travel { color: var(--muted); font-size: 14px; }
.timeline .travel .time { font-weight: 400; }
.timeline .meal .what::before { content: "🍽 "; }
.timeline .activity .what { font-weight: 600; }
.daysep { font-weight: 700; margin-top: 14px; text-transform: capitalize; }
.totals { display: flex; justify-content: space-between; font-weight: 700; padding: 10px 0; }
.tabs { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.tabs a { flex: 1; text-align: center; padding: 12px 2px; font-size: 13px; color: var(--muted); text-decoration: none; }
.tabs a.on { color: var(--accent); font-weight: 700; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.list-item { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.list-item .meta { font-size: 14px; color: var(--muted); }
details summary { cursor: pointer; font-weight: 600; }
