:root {
  --bg: #faf8f5;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #7d7973;
  --accent: #2c3e2d;
  --accent-text: #ffffff;
  --link: #2c5e3a;
  --line: rgba(127, 127, 127, .18);
  --warm: #c8a96e;
  --radius: 16px;
  --tabs-h: 62px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121512; --card: #1c211d; --text: #ecebe7; --muted: #a09c95; --accent: #c8a96e; --accent-text: #1a1a1a; --link: #d9bf8a; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }
body.playing { padding-bottom: calc(var(--tabs-h) + 56px + env(safe-area-inset-bottom)); }
a { color: var(--link); text-decoration: none; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: 26px; } h2 { font-size: 20px; margin: 22px 0 10px; } h3 { font-size: 17px; }
.wrap { padding: 16px; max-width: 720px; margin: 0 auto; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }

/* hero / greeting */
.hero { position: relative; border-radius: 0 0 24px 24px; overflow: hidden; color: #fff; min-height: 230px;
  background: #2c3e2d url(img/lower_park.jpg) center/cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.65) 100%); }
.hero .in { position: relative; z-index: 1; padding: 22px 16px 18px; display: flex; flex-direction: column; justify-content: flex-end; min-height: 230px; max-width: 720px; margin: 0 auto; }
.greet { font-size: 15px; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); border-radius: 999px; padding: 6px 12px; align-self: flex-start; margin-bottom: auto; }
.hero h1 { font-size: 28px; margin-top: 18px; }
.hero p { margin: 6px 0 0; opacity: .92; }

.card { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.card + .card { margin-top: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; min-width: 0; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 7px 13px; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--accent-text); border-color: transparent; }

.rcard { display: flex; gap: 12px; background: var(--card); border-radius: var(--radius); padding: 10px; color: var(--text); margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.rcard .thumb { width: 92px; height: 92px; border-radius: 12px; flex: none; background: #e8e4de center/cover; display: grid; place-items: center; font-size: 34px; }
.rcard .t { font-weight: 600; font-size: 16px; }
.rcard .d { font-size: 14px; color: var(--muted); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.daynum { width: 46px; height: 46px; border-radius: 14px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; flex: none; line-height: 1; text-align: center; font-size: 12px; }
.daynum b { font-size: 19px; display: block; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 12px; padding: 12px 14px; font-size: 15px; font-weight: 600; cursor: pointer; background: var(--accent); color: var(--accent-text); text-align: center; }
.btn.alt { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.btn.warm { background: var(--warm); color: #2b2205; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.btns .wide { grid-column: 1 / -1; }

.photo { width: 100%; aspect-ratio: 16/10; background: #e8e4de center/cover; display: grid; place-items: center; font-size: 64px; }
.photo.noimg { aspect-ratio: 16/7; }
.credit { font-size: 11px; color: var(--muted); padding: 4px 16px 0; }
.catchip { display: inline-block; font-size: 13px; padding: 3px 10px; border-radius: 999px; color: #fff; margin-bottom: 8px; }
.text { font-size: 17px; line-height: 1.6; }
.tip { background: rgba(233,162,59,.14); border-left: 4px solid var(--warm); padding: 10px 12px; border-radius: 10px; font-size: 15px; margin-top: 12px; }
.coords { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }

.map { height: 300px; border-radius: var(--radius); overflow: hidden; margin-top: 12px; background: #e8e4de; }
.map.full { height: calc(100vh - var(--tabs-h) - 120px); height: calc(100dvh - var(--tabs-h) - 120px); border-radius: 0; margin: 0; }
.ymap { width: 100%; height: 380px; border: 0; border-radius: var(--radius); margin-top: 12px; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 12px; }
.seg button { border: 0; background: none; padding: 7px 14px; font-size: 14px; color: var(--text); cursor: pointer; }
.seg button.on { background: var(--accent); color: var(--accent-text); }

.pin { width: 28px; height: 28px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.pin.home { background: #e0457b; font-size: 15px; }
.leaflet-popup-content { margin: 10px 12px; font: 14px/1.4 -apple-system, Roboto, sans-serif; }

.stop { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.stop:last-child { border-bottom: 0; }
.stop .n { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; margin-top: 2px; }
.stop .leg { font-size: 12px; color: var(--muted); }

.plist .item { display: flex; gap: 10px; align-items: center; padding: 10px; background: var(--card); border-radius: 14px; margin-bottom: 8px; }
.plist .item .thumb { width: 56px; height: 56px; border-radius: 10px; background: #e8e4de center/cover; flex: none; display: grid; place-items: center; font-size: 24px; }
.plist .item .nm { font-weight: 600; color: var(--text); }
.add { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 18px; flex: none; cursor: pointer; color: var(--text); }
.add.on { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.search { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 16px; }
.visited { color: #2e9d5b; font-size: 13px; }

.myitem { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.myitem .ctl { display: flex; gap: 4px; }
.myitem .ctl button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }

#tabs { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: var(--card); border-top: 1px solid var(--line); z-index: 1000; }
#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); position: relative; }
#tabs a span { font-size: 21px; line-height: 1.2; }
#tabs a.on { color: var(--accent); font-weight: 600; }
#tabs b { position: absolute; top: 6px; left: 55%; background: #e0457b; color: #fff; font-size: 10px; border-radius: 999px; padding: 0 5px; min-width: 16px; text-align: center; }
#tabs b:empty { display: none; }

#player { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 6px); z-index: 1001; background: #1f2b20; color: #fff;
  border-radius: 14px; padding: 8px 8px 8px 14px; display: flex; align-items: center; gap: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
#player[hidden] { display: none; }
.pl-title { flex: 1; min-width: 0; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-btn { width: 38px; height: 38px; border-radius: 10px; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 15px; cursor: pointer; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabs-h) + 74px); background: rgba(20,20,20,.88); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 1002; font-size: 14px; max-width: 90vw; text-align: center; }
#offline-bar { background: #6b4e16; color: #fff; text-align: center; font-size: 13px; padding: 6px; }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; max-width: 720px; margin: 0 auto; }
.top a.back { font-size: 15px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 8px 16px; font-size: 13px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.stop .thumb { width: 56px; height: 56px; border-radius: 10px; background: #e8e4de center/cover; flex: none; display: grid; place-items: center; font-size: 24px; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan { background: var(--accent); color: var(--accent-text); border-radius: var(--radius); padding: 14px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.plan b { font-size: 32px; line-height: 1; }
.plan span { font-size: 14px; opacity: .9; margin-top: 4px; }
.dayblock { margin-top: 16px; }
.dayblock > .row { margin-bottom: 8px; }
.dayblock .rcard { margin-left: 0; }
.photo { position: relative; }
.back.over { position: absolute; left: 12px; top: 12px; font-size: 15px; background: rgba(0,0,0,.45); color: #fff; padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(4px); }
