:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #1b2430;
  --muted: #64707d;
  --line: #e4e0d8;
  --brand: #e5533d;
  --brand-ink: #ffffff;
  --brand-soft: #fdebe3;
  --accent: #1c2b5a;
  --ok: #1f8a4c;
  --warn: #b26a00;
  --shadow: 0 1px 2px rgba(20, 30, 40, .06), 0 4px 14px rgba(20, 30, 40, .06);
  --radius: 16px;
  --tap: 48px;
  font-size: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161c; --card: #1a222b; --ink: #eef2f5; --muted: #9aa7b3; --line: #2a3440;
    --brand: #ff8a65; --brand-ink: #1f0e08; --brand-soft: #3a2119; --accent: #9fb4ff;
    --ok: #4cc47f; --warn: #f0a640; --shadow: 0 1px 2px rgba(0,0,0,.3);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.45; -webkit-tap-highlight-color: transparent;
  padding-bottom: env(safe-area-inset-bottom);
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.tiny { font-size: .75rem; }

/* ---------- Welcome ---------- */
.welcome { position: fixed; inset: 0; z-index: 50; background: linear-gradient(165deg, #ffb347 0%, #ff7a45 50%, #ff4f6d 100%); color: #fff; overflow: auto; }
.wordmark { font-family: "Fredoka", -apple-system, "Segoe UI", sans-serif; font-weight: 700; letter-spacing: -.02em; }
.welcome .wordmark .yum { color: #fff3c4; }
.top .wordmark .yum { background: linear-gradient(90deg, #ff9a3c, #ff4f6d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.welcome-inner { max-width: 440px; margin: 0 auto; padding: calc(40px + env(safe-area-inset-top)) 24px 32px; text-align: center; }
.welcome-logo { width: 104px; height: 104px; border-radius: 26px; box-shadow: 0 10px 30px rgba(120,20,30,.35); }
.welcome h1 { font-size: 2.6rem; margin: 12px 0 0; letter-spacing: -.02em; }
.tagline { font-size: 1.15rem; opacity: .9; margin: 4px 0 24px; }
.promise { list-style: none; padding: 0; margin: 0 0 28px; text-align: left; display: grid; gap: 10px; }
.promise li { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.16); padding: 12px 14px; border-radius: 14px; }
.promise li span:first-child { font-size: 1.4rem; }
.btn-primary { background: var(--accent); color: #fff; border: 0; border-radius: 999px; min-height: var(--tap); padding: 0 22px; font-weight: 700; }
.btn-primary.big { width: 100%; min-height: 60px; font-size: 1.2rem; background: #fff; color: #e5533d; box-shadow: 0 8px 24px rgba(120,20,30,.3); }
.btn-link { background: none; border: 0; color: inherit; text-decoration: underline; padding: 12px; min-height: var(--tap); }
.welcome .btn-link { color: #fff; opacity: .9; }
.fine { font-size: .82rem; opacity: .8; margin: 14px 0 4px; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-size: 1.35rem; color: #2b1a1a; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top-actions { display: flex; gap: 4px; align-items: center; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; font-size: 1.15rem; }
.icon-btn.lang { font-size: .8rem; font-weight: 700; border: 1px solid var(--line); width: 44px; }
.sos { height: 36px; padding: 0 12px; border-radius: 999px; border: 0; background: #d93025; color: #fff; font-weight: 800; letter-spacing: .04em; margin-left: 4px; }

main { max-width: 720px; margin: 0 auto; padding: 12px 16px 40px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; }
.here-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.here h2 { margin: 2px 0; font-size: 1.3rem; line-height: 1.25; }
.chip-btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; min-height: 40px; padding: 0 14px; white-space: nowrap; }

.famous { background: linear-gradient(135deg, var(--brand-soft), var(--card)); }
.famous h3 { margin: 0 0 8px; font-size: 1.05rem; }
.famous .row { display: flex; gap: 10px; margin: 8px 0; }
.famous .row .ic { font-size: 1.3rem; line-height: 1.3; }
.famous p { margin: 0; }
.famous .clamp p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.distance { margin: 16px 0 8px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: .92rem; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }

.tabs { position: sticky; top: 61px; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: var(--bg); padding: 8px 0; }
.tab { border: 0; background: var(--card); border-radius: 14px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: var(--shadow); min-height: 64px; }
.tab .ic { font-size: 1.45rem; }
.tab .lb { font-size: .78rem; font-weight: 600; }
.tab .n { font-size: .68rem; color: var(--muted); }
.tab.on { background: var(--brand); color: var(--brand-ink); }
.tab.on .n { color: inherit; opacity: .85; }

.toolbar-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px; }
.toggle { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-size: .9rem; }
.toggle input { width: 18px; height: 18px; accent-color: var(--brand); }
select { min-height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); padding: 0 12px; font-size: .9rem; }
.seg { margin-left: auto; display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg button { border: 0; background: none; min-height: 40px; padding: 0 14px; font-size: .9rem; }
.seg button.on { background: var(--ink); color: var(--bg); font-weight: 600; }

.status { padding: 18px; text-align: center; color: var(--muted); }
.status .spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; margin: 0 auto 10px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Place cards ---------- */
.list { display: grid; gap: 10px; }
.place { display: flex; gap: 12px; align-items: stretch; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; border: 0; text-align: left; width: 100%; }
.place .thumb { flex: none; width: 76px; height: 76px; border-radius: 12px; background: var(--brand-soft) center/cover no-repeat; display: grid; place-items: center; font-size: 2rem; }
.place .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.place .nm { font-weight: 700; font-size: 1.02rem; line-height: 1.25; }
.place .loc { font-size: .8rem; color: var(--muted); }
.place .why { font-size: .85rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.place .meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.walk { font-weight: 700; font-size: .85rem; }
.badge { font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--ink); white-space: nowrap; }
.badge.open { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); font-weight: 700; }
.badge.closed { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 700; }
.badge.star { background: #fff3cd; color: #7a5800; font-weight: 700; }
@media (prefers-color-scheme: dark) { .badge.star { background: #3d3212; color: #ffd66b; } }
.more { margin: 8px auto; display: block; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty .big { font-size: 2.4rem; }

@media (prefers-color-scheme: dark) { .brand { color: #fff; } }
.map-wrap { height: 62vh; min-height: 360px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
#map { width: 100%; height: 100%; }
.pin { font-size: 22px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #1a73e8; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(26,115,232,.25); }

.foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- Sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 60; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 90vh; overflow: auto; background: var(--card);
  border-radius: 22px 22px 0 0; padding: 10px 18px calc(24px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto;
  animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 8px; }
.sheet-close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); font-size: 1rem; }
.sheet-close.light { background: rgba(255,255,255,.15); color: #fff; top: calc(14px + env(safe-area-inset-top)); }
.sheet h2 { margin: 6px 44px 2px 0; font-size: 1.35rem; line-height: 1.25; }
.sheet .hero { width: 100%; height: 180px; object-fit: cover; border-radius: 14px; margin: 8px 0; background: var(--brand-soft); }
.facts { display: grid; gap: 2px; margin: 12px 0; }
.fact { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.fact:last-child { border-bottom: 0; }
.fact .ic { width: 24px; text-align: center; flex: none; }
.actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.actions .wide { grid-column: 1 / -1; }
.btn { min-height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--ink); }
.btn.go { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-size: 1.05rem; }
.btn.danger { background: #d93025; color: #fff; border-color: #d93025; }
.search-input { width: 100%; min-height: 52px; border-radius: 14px; border: 2px solid var(--brand); padding: 0 16px; background: var(--bg); font-size: 1.05rem; margin: 10px 0; }
.result { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 14px 4px; }
.sos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 12px 0; }
.sos-num { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 8px; border-radius: 14px; text-decoration: none; background: #fdeceb; color: #a4231b; min-height: 84px; }
.sos-num b { font-size: 1.6rem; }
@media (prefers-color-scheme: dark) { .sos-num { background: #3a1a18; color: #ff9d94; } }
.phrase { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.phrase .loc { font-size: 1.15rem; font-weight: 600; text-align: right; }
.lang-list { display: grid; gap: 6px; margin-top: 10px; }

/* ---------- Driver card ---------- */
.driver { position: fixed; inset: 0; z-index: 70; background: #111; color: #fff; display: grid; place-items: center; padding: 24px; }
.driver-inner { text-align: center; max-width: 900px; }
.driver-hint { opacity: .7; font-size: 1.1rem; margin-bottom: 18px; }
.driver-name { font-size: clamp(2rem, 9vw, 4.5rem); font-weight: 800; line-height: 1.15; word-break: break-word; }
.driver-addr { font-size: clamp(1.1rem, 4.5vw, 2rem); margin-top: 18px; opacity: .92; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: .92rem; max-width: 90vw; text-align: center; }

@media (min-width: 700px) {
  .list { grid-template-columns: 1fr 1fr; }
}

/* ---------- Must-Try ---------- */
.must-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.must-head h3 { margin: 0; font-size: 1.1rem; }
.stamp { font-size: .78rem; font-weight: 700; color: var(--accent); border: 2px solid var(--accent); border-radius: 999px; padding: 2px 10px; white-space: nowrap; transform: rotate(-3deg); }
.must-group { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 4px; }
.must { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: var(--card); border-radius: 12px; padding: 10px; margin: 6px 0; box-shadow: var(--shadow); min-height: 56px; }
.must-ic { font-size: 1.4rem; flex: none; }
.must-body { flex: 1; min-width: 0; }
.must-why { display: block; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.must-go { flex: none; font-size: .78rem; font-weight: 700; color: var(--brand); text-align: right; max-width: 90px; }
.must-local { font-size: 1.6rem; font-weight: 700; color: var(--brand); margin: 4px 0; }
.stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.stampcard { border: 3px dashed var(--accent); border-radius: 16px; padding: 12px; text-align: center; transform: rotate(-2deg); }
.stampcard.full { background: color-mix(in srgb, var(--accent) 12%, transparent); border-style: solid; }
.stamp-city { font-weight: 800; }
.stamp-n { font-size: 1.4rem; color: var(--accent); font-weight: 800; }
