:root {
  --bg: #f6f6f4; --card: #ffffff; --ink: #141414; --muted: #6b6b6b; --line: #e3e3df;
  --accent: #141414; --accent-ink: #ffffff; --soft: #efefeb; --ok: #1f7a3d; --warn: #9a5b00; --bad: #b3261e;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111111; --card: #1b1b1b; --ink: #f2f2f0; --muted: #9b9b96; --line: #2c2c2a;
          --accent: #f2f2f0; --accent-ink: #111111; --soft: #232321; --ok: #5cc27e; --warn: #e2a94a; --bad: #ff8a80; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
body { padding-bottom: 72px; }
a { color: inherit; }
header.top { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
header.top .title { flex: 1; min-width: 0; }
header.top .title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
header.top .title small { color: var(--muted); }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
h1 { font-size: 24px; margin: 8px 0 16px; }
h2 { font-size: 18px; margin: 24px 0 10px; }
h3 { font-size: 16px; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 10px 0; }
.card.tap { cursor: pointer; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin-top: 6px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.badge.ok { color: var(--ok); } .badge.warn { color: var(--warn); } .badge.bad { color: var(--bad); }
.time { font-variant-numeric: tabular-nums; font-weight: 600; }
button, .btn { font: inherit; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  border-radius: 10px; padding: 10px 14px; cursor: pointer; text-decoration: none; display: inline-block; }
button.ghost, .btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
button.link { background: none; border: none; color: var(--ink); text-decoration: underline; padding: 4px; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); }
textarea { min-height: 84px; }
label { display: block; margin: 10px 0 4px; font-size: 14px; color: var(--muted); }
form .actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }
nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; background: var(--card);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav.tabs a { flex: 1; text-align: center; padding: 10px 2px 12px; font-size: 12px; text-decoration: none; color: var(--muted); }
nav.tabs a.on { color: var(--ink); font-weight: 600; }
nav.tabs a span { display: block; font-size: 18px; line-height: 1.2; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; }
.chips button { white-space: nowrap; }
.notice { padding: 10px 12px; border-radius: 10px; background: var(--soft); margin: 10px 0; }
.notice.bad { color: var(--bad); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 10px; z-index: 20; max-width: 90vw; }
table.perm { width: 100%; border-collapse: collapse; font-size: 14px; }
table.perm th, table.perm td { border-bottom: 1px solid var(--line); padding: 8px 4px; text-align: center; }
table.perm th:first-child, table.perm td:first-child { text-align: left; }
.scroll-x { overflow-x: auto; }
.center { max-width: 420px; margin: 12vh auto 0; }
.logo { font-weight: 800; letter-spacing: .5px; font-size: 22px; }
details summary { cursor: pointer; padding: 6px 0; }
.hidden { display: none !important; }

/* ---------- day dashboard ---------- */
.greet { font-size: 22px; font-weight: 750; letter-spacing: -.2px; margin: 2px 0 10px; }
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 20px 18px 18px; margin: 4px 0 14px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #ff7a45 0%, #c2185b 45%, #3a1c71 100%); box-shadow: 0 10px 30px rgba(58,28,113,.25); }
.hero.travel { background: radial-gradient(120% 140% at 0% 0%, #36d1dc 0%, #2b5876 55%, #1c1c3c 100%); }
.hero.off { background: radial-gradient(120% 140% at 0% 0%, #b4a5ff 0%, #5b4b8a 55%, #22223b 100%); }
.hero .eyebrow { font-size: 13px; opacity: .85; letter-spacing: .3px; }
.hero .city { font-size: 30px; font-weight: 800; line-height: 1.1; margin: 6px 0 2px; }
.hero .date { font-size: 15px; opacity: .9; }
.hero .wx { display: flex; align-items: center; gap: 10px; margin-top: 14px; background: rgba(255,255,255,.16);
  border-radius: 14px; padding: 10px 12px; backdrop-filter: blur(4px); }
.hero .wx .icon { font-size: 34px; line-height: 1; }
.hero .wx .temp { font-size: 22px; font-weight: 700; }
.hero .wx .desc { font-size: 13px; opacity: .9; }
.hero .monogram { position: absolute; right: -10px; top: -18px; font-size: 120px; font-weight: 900; opacity: .12; letter-spacing: -6px; pointer-events: none; }
.next { border-radius: 18px; padding: 14px 16px; margin: 0 0 14px; background: var(--card); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; }
.next .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--soft); flex: none; }
.next .label { font-size: 13px; color: var(--muted); }
.next .what { font-weight: 700; font-size: 17px; }
.next .when { margin-left: auto; text-align: right; }
.next .when b { display: block; font-size: 20px; color: #e8590c; font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .next .when b { color: #ff922b; } }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 18px; }
.quick a, .quick button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 12px; text-decoration: none; font-weight: 500; }
.quick .q { font-size: 22px; line-height: 1; }
.quick .soon { opacity: .5; }
.timeline { position: relative; margin: 6px 0 8px; padding-left: 4px; }
.timeline .item { display: grid; grid-template-columns: 56px 26px 1fr; align-items: start; gap: 8px; padding: 9px 0; position: relative; }
.timeline .item::before { content: ''; position: absolute; left: 76px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline .item:first-child::before { top: 18px; } .timeline .item:last-child::before { bottom: calc(100% - 18px); }
.timeline .t { font-variant-numeric: tabular-nums; font-weight: 700; padding-top: 2px; }
.timeline .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--card);
  border: 2px solid var(--line); position: relative; z-index: 1; }
.timeline .item.past { opacity: .45; }
.timeline .item.now .dot { border-color: #e8590c; }
.timeline .sub { color: var(--muted); font-size: 13px; }
.room { font-size: 26px; font-weight: 800; letter-spacing: .5px; }
.attrib { font-size: 11px; color: var(--muted); text-align: center; margin: 22px 0 6px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 8px; }
.section-title h2 { margin: 0; }
.cats button { padding: 7px 12px; font-size: 14px; border-radius: 99px; }
.places { padding: 4px 16px; }
.near-note { font-size: 11px; color: var(--muted); margin: 6px 2px 0; }
.place { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.place:last-child { border-bottom: 0; }
.place .name { font-weight: 650; }
.place .sub { color: var(--muted); font-size: 13px; }
.place .dist { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.place .dist small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.badge.tr { color: #c2185b; }
@media (prefers-color-scheme: dark) { .badge.tr { color: #ff6f9c; } }
