/* Shenzhen pocket guide. Tokens first, themes second, components after. */

@font-face { font-family: 'Archivo'; src: url('../fonts/archivo-var.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'SZ Kai'; src: url('../fonts/sz-kai.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --font-ui: 'Archivo', -apple-system, 'PingFang SC', 'Noto Sans CJK SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-zh: 'SZ Kai', 'Kaiti SC', 'STKaiti', 'PingFang SC', 'Noto Sans CJK SC', serif;
  --zh-weight: 500;
  --wdth: 100%;
  --head-wdth: 80%;
  --head-wght: 750;
  --head-case: none;
  --head-track: -0.01em;
  --r: 6px; --r-s: 3px; --r-pill: 6px;
  --tab-h: 62px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --c-food: #A8400A; --c-tea: #756100; --c-sight: #0E6B52; --c-arch: #3B4B9A; --c-museum: #7A3E9D;
  --c-tech: #0071AD; --c-coast: #00807F; --c-shop: #BE185D; --c-local: #99501F; --c-night: #2B2D6E;
  --shadow: 0 1px 0 rgba(0,0,0,.04), 0 10px 24px -14px rgba(20,40,30,.35);
}

/* 点心纸: the Cantonese teahouse order card. Pink stock, jade ink, vermilion chop. */
:root, [data-theme="yumcha"] {
  --bg: #F3CCC4; --paper: #FAE5DF; --paper-2: #F7D9D2;
  --ink: #0B3F31; --ink-2: #2C5B4C; --line: rgba(11,63,49,.32); --line-soft: rgba(11,63,49,.16);
  --shell: #0E5F49; --shell-ink: #FBE6E0; --shell-ink-2: #BFE0D2;
  --accent: #0E5F49; --accent-ink: #FBE6E0; --stamp: #CF2E1C; --focus: #CF2E1C;
  --chip: transparent; --chip-on: #0B3F31; --chip-on-ink: #FAE5DF;
  --c-food: #A8400A; --c-tea: #756100;
}

/* 地铁: Shenzhen Metro signage. Enamel white, black type, line colours. */
[data-theme="metro"] {
  --bg: #E7EAEE; --paper: #FFFFFF; --paper-2: #F3F5F7;
  --ink: #0A0A0A; --ink-2: #474D55; --line: rgba(10,10,10,.16); --line-soft: rgba(10,10,10,.08);
  --shell: #FFFFFF; --shell-ink: #0A0A0A; --shell-ink-2: #474D55;
  --accent: #007A3D; --accent-ink: #FFFFFF; --stamp: #E4002B; --focus: #007A3D;
  --chip: #FFFFFF; --chip-on: #0A0A0A; --chip-on-ink: #FFFFFF;
  --font-zh: -apple-system, 'PingFang SC', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif; --zh-weight: 700;
  --head-wdth: 100%; --head-wght: 800; --head-track: -0.02em;
  --r: 12px; --r-s: 8px; --r-pill: 999px;
  --c-food: #E4002B; --c-tea: #B94700; --c-sight: #007A3D; --c-arch: #0A3D91; --c-museum: #8031A7;
  --c-tech: #0085CA; --c-coast: #00857D; --c-shop: #C6007E; --c-local: #8A5A2B; --c-night: #6B1E3C;
}

/* 航站: terminal wayfinding. Yellow panels, black type, pictogram squares. */
[data-theme="terminal"] {
  --bg: #FFD100; --paper: #FFDF4D; --paper-2: #F5C600;
  --ink: #0A0A0A; --ink-2: #3D3400; --line: rgba(10,10,10,.85); --line-soft: rgba(10,10,10,.25);
  --shell: #0A0A0A; --shell-ink: #FFD100; --shell-ink-2: #D9B200;
  --accent: #0A0A0A; --accent-ink: #FFD100; --stamp: #B80F26; --focus: #0A0A0A;
  --chip: transparent; --chip-on: #0A0A0A; --chip-on-ink: #FFD100;
  --font-zh: -apple-system, 'PingFang SC', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif; --zh-weight: 600;
  --head-wdth: 92%; --head-wght: 700; --head-track: -0.015em;
  --r: 2px; --r-s: 2px; --r-pill: 2px;
  --c-food: #0A0A0A; --c-tea: #0A0A0A; --c-sight: #0A0A0A; --c-arch: #0A0A0A; --c-museum: #0A0A0A;
  --c-tech: #0A0A0A; --c-coast: #0A0A0A; --c-shop: #0A0A0A; --c-local: #0A0A0A; --c-night: #0A0A0A;
  --shadow: none;
}

/* 简: the familiar travel app, played straight. */
[data-theme="plain"] {
  --bg: #F3F4F6; --paper: #FFFFFF; --paper-2: #F3F4F6;
  --ink: #15171A; --ink-2: #5A6068; --line: rgba(21,23,26,.1); --line-soft: rgba(21,23,26,.06);
  --shell: #FFFFFF; --shell-ink: #15171A; --shell-ink-2: #5A6068;
  --accent: #0B62C4; --accent-ink: #FFFFFF; --stamp: #E0342B; --focus: #0B62C4;
  --chip: #FFFFFF; --chip-on: #15171A; --chip-on-ink: #FFFFFF;
  --font-ui: -apple-system, 'SF Pro Text', 'PingFang SC', 'Noto Sans CJK SC', system-ui, sans-serif;
  --font-zh: -apple-system, 'PingFang SC', 'Noto Sans CJK SC', sans-serif; --zh-weight: 500;
  --head-wdth: 100%; --head-wght: 700; --head-track: -0.02em;
  --r: 18px; --r-s: 12px; --r-pill: 999px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 12px 28px -16px rgba(0,0,0,.28);
}

/* 夜: Huaqiangbei after dark. For taxis at night. */
[data-theme="night"] {
  --bg: #090D11; --paper: #121920; --paper-2: #0E1419;
  --ink: #E9F1EE; --ink-2: #9FB2AC; --line: rgba(233,241,238,.16); --line-soft: rgba(233,241,238,.08);
  --shell: #090D11; --shell-ink: #E9F1EE; --shell-ink-2: #9FB2AC;
  --accent: #2FE08A; --accent-ink: #04130C; --stamp: #FF5442; --focus: #2FE08A;
  --chip: #121920; --chip-on: #2FE08A; --chip-on-ink: #04130C;
  --font-zh: -apple-system, 'PingFang SC', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif; --zh-weight: 600;
  --head-wdth: 72%; --head-wght: 800; --head-case: uppercase; --head-track: .01em;
  --r: 8px; --r-s: 5px; --r-pill: 5px;
  --c-food: #FF6B5A; --c-tea: #FFB347; --c-sight: #2FE08A; --c-arch: #8C9EFF; --c-museum: #D08CFF;
  --c-tech: #4CC9FF; --c-coast: #3FE0D0; --c-shop: #FF7AB8; --c-local: #E0A070; --c-night: #B7B9FF;
  --shadow: 0 0 0 1px rgba(233,241,238,.06);
  color-scheme: dark;
}

/* ───────── base ───────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-padding-top: 70px; }
body {
  font-family: var(--font-ui); font-stretch: var(--wdth); font-size: 15px; line-height: 1.45; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none; font-variant-numeric: tabular-nums;
}
::selection { background: var(--stamp); color: #fff; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: var(--r-s); }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: inherit; text-underline-offset: 3px; }
textarea, input { caret-color: var(--stamp); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.ic { width: 22px; height: 22px; flex: none; }
.zh { font-family: var(--font-zh); font-weight: var(--zh-weight); font-stretch: 100%; letter-spacing: 0; }
h1, h2, h3, .head { font-stretch: var(--head-wdth); font-weight: var(--head-wght); letter-spacing: var(--head-track); text-transform: var(--head-case); line-height: 1.12; text-wrap: balance; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; background: var(--bg); padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 20px); }
@media (min-width: 600px) { html { background: color-mix(in srgb, var(--bg) 82%, #000); } #app { box-shadow: 0 0 80px rgba(0,0,0,.25); } }

/* ───────── shell: header ───────── */
.top { background: var(--shell); color: var(--shell-ink); position: relative; overflow: hidden; padding: calc(env(safe-area-inset-top) + 14px) 18px 0; }
.top-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 12px; text-align: left; }
.brand-seal { width: 46px; height: 46px; flex: none; border-radius: var(--r-s); background: var(--stamp); color: #FFF4EE; display: grid; place-items: center; font-family: var(--font-zh); font-size: 30px; line-height: 1; font-weight: 700; transform: rotate(-4deg); box-shadow: inset 0 0 0 2px rgba(255,255,255,.55), inset 0 0 0 3.5px var(--stamp); }
.brand-seal span { transform: translateY(-1px); }
.brand h1 { font-size: 27px; }
.brand p { font-size: 13px; color: var(--shell-ink-2); margin-top: 3px; }
.me-btn { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 2px var(--shell-ink); }
.me-btn img { width: 100%; height: 100%; }
.skyline { display: block; width: calc(100% + 36px); margin: 4px -18px -1px; height: 64px; color: var(--shell-ink); opacity: .2; position: relative; }
.skyline .win { opacity: 0; fill: #FFE28A; }
.lit .skyline { opacity: .5; } .lit .skyline .win { opacity: 1; animation: twinkle 3.2s steps(2) infinite; }
.lit .skyline .win:nth-child(odd) { animation-delay: -1.6s; }
@keyframes twinkle { 50% { opacity: .35; } }
[data-theme="metro"] .top { border-bottom: 5px solid var(--ink); }
[data-theme="metro"] .top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, #007A3D 0 20%, #E87722 0 40%, #00A3E0 0 60%, #E4002B 0 80%, #8031A7 0); }
[data-theme="metro"] .skyline, [data-theme="plain"] .skyline { opacity: .1; }
[data-theme="plain"] .top { border-bottom: 1px solid var(--line); }
[data-theme="night"] .skyline { color: var(--accent); opacity: .35; }

/* ───────── search ───────── */
.searchbar { position: sticky; top: 0; z-index: 20; background: var(--shell); padding: 10px 14px 12px; display: flex; gap: 8px; }
[data-theme="metro"] .searchbar, [data-theme="plain"] .searchbar { background: var(--bg); }
.search { flex: 1; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; background: var(--paper); color: var(--ink); border-radius: var(--r); border: 1.5px solid var(--ink); }
[data-theme="plain"] .search { border-color: transparent; box-shadow: var(--shadow); }
[data-theme="night"] .search { border-color: var(--line); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; height: 100%; }
.search input::placeholder { color: var(--ink-2); opacity: 1; }
.search:focus-within { outline: 2.5px solid var(--focus); outline-offset: 1px; }
.search .clear { width: 30px; height: 30px; display: grid; place-items: center; color: var(--ink-2); }
.sq { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: var(--r); background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); }
[data-theme="plain"] .sq { border-color: transparent; box-shadow: var(--shadow); }
[data-theme="night"] .sq { border-color: var(--line); }
.sq:active, .btn:active, .chip:active, .act:active { transform: scale(.96); }

/* ───────── chips & segmented ───────── */
.scroller { display: flex; gap: 8px; overflow-x: auto; padding: 2px 14px; scroll-padding-inline: 14px; scrollbar-width: none; scroll-snap-type: x proximity; }
.scroller::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 13px; border-radius: var(--r-pill); border: 1.5px solid var(--ink); background: var(--chip); color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; scroll-snap-align: start; transition: transform .15s var(--ease); }
.chip .ic { width: 18px; height: 18px; }
.chip .zh { font-size: 15px; opacity: .75; }
.chip[aria-pressed="true"] { background: var(--chip-on); color: var(--chip-on-ink); border-color: var(--chip-on); }
[data-theme="plain"] .chip, [data-theme="metro"] .chip { border-color: var(--line); }
[data-theme="night"] .chip { border-color: var(--line); }
[data-theme="terminal"] .chip { border-width: 2px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 14px 14px 12px; border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--chip); }
.seg button { height: 42px; font-weight: 650; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; min-width: 0; border-left: 1.5px solid var(--ink); }
@media (max-width: 460px) { .seg button, [data-theme] .seg button { flex-direction: column; gap: 0; height: 50px; font-size: 13.5px; line-height: 1.15; } .seg button .zh { font-size: 13px; } }
.seg button:first-child { border-left: 0; }
.seg button .zh { font-size: 15px; opacity: .8; }
.seg button[aria-pressed="true"] { background: var(--chip-on); color: var(--chip-on-ink); }
[data-theme="plain"] .seg, [data-theme="metro"] .seg, [data-theme="night"] .seg { border-color: var(--line); background: var(--paper-2); padding: 3px; gap: 3px; }
[data-theme="plain"] .seg button, [data-theme="metro"] .seg button, [data-theme="night"] .seg button { border: 0; border-radius: calc(var(--r) - 4px); height: 38px; }
[data-theme="plain"] .seg, [data-theme="metro"] .seg { background: rgba(0,0,0,.06); }
[data-theme="plain"] .seg button[aria-pressed="true"], [data-theme="metro"] .seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* ───────── section heads ───────── */
.sec { padding: 22px 16px 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sec h2 { font-size: 20px; }
.sec .zh { font-size: 17px; margin-left: 8px; opacity: .7; }
.sec small, .count { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.hint { padding: 0 16px 10px; color: var(--ink-2); font-size: 14px; max-width: 60ch; }

/* ───────── featured strip ───────── */
.feat { flex: none; width: 236px; scroll-snap-align: start; border-radius: var(--r); overflow: hidden; background: var(--paper); border: 1.5px solid var(--ink); text-align: left; display: block; position: relative; }
[data-theme="plain"] .feat, [data-theme="metro"] .feat, [data-theme="night"] .feat { border-color: var(--line-soft); box-shadow: var(--shadow); }
.feat .ph { aspect-ratio: 4 / 3; }
.feat .t { display: block; padding: 10px 12px 12px; }
.feat .zh { font-size: 19px; line-height: 1.2; display: block; }
.feat .en { font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ───────── photo / placeholder ───────── */
.ph { position: relative; background: var(--paper-2); color: var(--ink); overflow: hidden; display: grid; place-items: center; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph .ic { width: 38%; height: 38%; max-width: 64px; max-height: 64px; opacity: .55; stroke-width: 1.25; }
.ph.c-food { color: var(--c-food); } .ph.c-tea { color: var(--c-tea); } .ph.c-sight { color: var(--c-sight); } .ph.c-arch { color: var(--c-arch); } .ph.c-museum { color: var(--c-museum); }
.ph.c-tech { color: var(--c-tech); } .ph.c-coast { color: var(--c-coast); } .ph.c-shop { color: var(--c-shop); } .ph.c-local { color: var(--c-local); } .ph.c-night { color: var(--c-night); }
.ph::before { content: ''; position: absolute; inset: 0; background: currentColor; opacity: .12; }

/* ───────── place rows: the order card ───────── */
.list { margin: 0 14px; border-top: 1.5px solid var(--line); }
.row { display: grid; grid-template-columns: 76px 1fr 40px; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1.5px solid var(--line); text-align: left; width: 100%; position: relative; }
.row .ph { width: 76px; height: 76px; border-radius: var(--r-s); }
.row .zh { font-size: 19px; line-height: 1.22; display: block; overflow-wrap: anywhere; text-wrap: balance; }
.row .en { font-size: 14.5px; font-weight: 650; line-height: 1.25; margin-top: 3px; display: block; text-wrap: balance; }
.row .meta { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; }
.row mark, .feat mark { background: none; color: inherit; box-shadow: inset 0 -.5em 0 color-mix(in srgb, var(--stamp) 35%, transparent); }
.catdot { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.catdot .ic { width: 14px; height: 14px; }
.catdot { color: var(--ink-2); }
.catdot.c-food .ic { color: var(--c-food); } .catdot.c-tea .ic { color: var(--c-tea); } .catdot.c-sight .ic { color: var(--c-sight); } .catdot.c-arch .ic { color: var(--c-arch); } .catdot.c-museum .ic { color: var(--c-museum); } .catdot.c-tech .ic { color: var(--c-tech); } .catdot.c-coast .ic { color: var(--c-coast); } .catdot.c-shop .ic { color: var(--c-shop); } .catdot.c-local .ic { color: var(--c-local); } .catdot.c-night .ic { color: var(--c-night); }
.col { display: grid; justify-items: center; gap: 6px; align-self: stretch; align-content: center; border-left: 1.5px solid var(--line); margin: -11px 0; padding: 11px 0 11px 0; }
.rank b { display: grid; place-items: center; width: 26px; height: 26px; border: 1.5px solid currentColor; border-radius: var(--r-s); font-family: var(--font-zh); font-size: 16px; font-weight: 700; line-height: 1; }
.rank[data-r="3"] b { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.rank i { display: none; }
[data-theme="metro"] .list, [data-theme="plain"] .list, [data-theme="night"] .list { border: 0; display: grid; gap: 10px; }
[data-theme="metro"] .row, [data-theme="plain"] .row, [data-theme="night"] .row { background: var(--paper); border: 0; border-radius: var(--r); padding: 10px; box-shadow: var(--shadow); grid-template-columns: 84px 1fr 30px; }
[data-theme="metro"] .row .ph, [data-theme="plain"] .row .ph, [data-theme="night"] .row .ph { width: 84px; height: 84px; }
[data-theme="metro"] .col, [data-theme="plain"] .col, [data-theme="night"] .col { border: 0; margin: 0; padding: 0; }
.rank em { display: none; font-style: normal; }
[data-theme="metro"] .rank b, [data-theme="plain"] .rank b, [data-theme="night"] .rank b, [data-theme="terminal"] .rank b { display: none; }
[data-theme="metro"] .rank[data-r="3"] em, [data-theme="plain"] .rank[data-r="3"] em, [data-theme="night"] .rank[data-r="3"] em, [data-theme="terminal"] .rank[data-r="3"] em { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 3px 5px; border-radius: var(--r-s); background: var(--ink); color: var(--paper); }
[data-theme="night"] .rank[data-r="3"] em { background: var(--accent); color: var(--accent-ink); }
[data-theme="metro"] .row, [data-theme="plain"] .row, [data-theme="night"] .row { grid-template-columns: 84px 1fr auto; }
[data-theme="terminal"] .list { border-top-width: 2px; } [data-theme="terminal"] .row { border-bottom-width: 2px; } [data-theme="terminal"] .col { border-left-width: 2px; }
[data-theme="terminal"] .row .zh { font-size: 18px; } [data-theme="terminal"] .row .en { font-size: 16px; font-weight: 700; }
[data-theme="plain"] .row .en { order: -1; font-size: 16px; margin: 0 0 2px; } [data-theme="plain"] .row .zh { font-size: 15px; color: var(--ink-2); }
[data-theme="plain"] .row .txt, [data-theme="metro"] .row .txt { display: flex; flex-direction: column; }
[data-theme="metro"] .row .en { order: -1; font-size: 16.5px; font-weight: 800; margin: 0 0 1px; } [data-theme="metro"] .row .zh { font-size: 16px; }

/* ───────── chop stamps: the signature ───────── */
.chop { display: inline-grid; place-items: center; font-family: var(--font-zh); font-weight: 700; color: var(--stamp); border: 2px solid var(--stamp); border-radius: 3px; line-height: 1; font-size: 12px; width: 26px; height: 26px; transform: rotate(-7deg); writing-mode: vertical-rl; letter-spacing: -1px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stamp) 35%, transparent); background: color-mix(in srgb, var(--stamp) 7%, transparent); }
.chop.done { border-radius: 50%; transform: rotate(9deg); }
.chop.big { width: 64px; height: 64px; font-size: 27px; border-width: 3.5px; border-radius: 6px; }
.chop.big.done { border-radius: 50%; }
.row .ph .chop, .feat .ph .chop, .hero .chop { position: absolute; right: 5px; bottom: 5px; background: color-mix(in srgb, var(--paper) 88%, transparent); z-index: 2; }
.row .ph .chop.done, .feat .ph .chop.done { right: auto; left: 5px; }
.slam { animation: slam .5s var(--ease) both; }
@keyframes slam { 0% { transform: scale(2.6) rotate(-22deg); opacity: 0; filter: blur(3px); } 55% { transform: scale(.9) rotate(-7deg); opacity: 1; filter: none; } 100% { transform: scale(1) rotate(-7deg); } }
[data-theme="metro"] .chop { border-radius: 50%; background: var(--stamp); color: #fff; border-color: #fff; font-family: var(--font-ui); transform: none; box-shadow: none; }
[data-theme="metro"] .chop.done { background: var(--accent); }
[data-theme="terminal"] .chop { border-radius: 0; background: var(--ink); color: var(--bg); border-color: var(--ink); transform: none; box-shadow: none; }
[data-theme="plain"] .chop { border-radius: 50%; background: #fff; border-width: 0; box-shadow: 0 1px 4px rgba(0,0,0,.25); transform: none; }
[data-theme="plain"] .chop.done { color: #128A4A; }

/* ───────── buttons ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--r); background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15.5px; border: 1.5px solid var(--accent); transition: transform .15s var(--ease); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
[data-theme="plain"] .btn.ghost, [data-theme="night"] .btn.ghost { border-color: var(--line); background: var(--paper); }
.btn.sm { min-height: 40px; padding: 0 13px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn.danger { background: transparent; color: var(--stamp); border-color: var(--stamp); margin-top: 28px; }
.btn[disabled] { opacity: .45; }
.ibtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r); color: inherit; }
.linkbtn { font-weight: 650; text-decoration: underline; text-underline-offset: 3px; color: var(--ink); font-size: 14px; padding: 8px 0; }

/* ───────── tab bar ───────── */
.tabs { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: 0; width: min(100%, 560px); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--shell); color: var(--shell-ink); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); border-top: 1.5px solid var(--ink); }
[data-theme="plain"] .tabs, [data-theme="night"] .tabs { border-top-color: var(--line); }
[data-theme="metro"] .tabs { border-top: 5px solid var(--ink); }
.tab { display: grid; justify-items: center; gap: 1px; padding: 6px 0 4px; border-radius: var(--r); font-size: 11.5px; font-weight: 650; color: var(--shell-ink-2); position: relative; }
.tab .ic { width: 24px; height: 24px; }
.tab .zh { position: absolute; top: 2px; left: calc(50% + 13px); font-size: 11px; opacity: 0; transition: opacity .2s; }
.tab[aria-current="page"] { color: var(--shell-ink); background: color-mix(in srgb, var(--shell-ink) 13%, transparent); }
.tab[aria-current="page"] .zh { opacity: .9; }
[data-theme="metro"] .tab[aria-current="page"], [data-theme="plain"] .tab[aria-current="page"] { background: none; color: var(--accent); }
[data-theme="night"] .tab[aria-current="page"] { color: var(--accent); background: none; }

/* ───────── page (place detail) ───────── */
#page { position: fixed; inset: 0; z-index: 50; overflow-y: auto; background: var(--bg); width: min(100%, 560px); margin: 0 auto; overscroll-behavior: contain; animation: pagein .34s var(--ease) both; padding-bottom: calc(env(safe-area-inset-bottom) + 30px); }
@keyframes pagein { from { transform: translateY(26px); opacity: 0; clip-path: inset(8% 0 0 0 round 18px); } to { transform: none; opacity: 1; clip-path: inset(0); } }
.hero { position: relative; aspect-ratio: 4 / 3; max-height: 46dvh; width: 100%; }
.hero.ph .ic { max-width: 96px; max-height: 96px; }
.hero .chops { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; z-index: 2; }
.hero .chops .chop { position: static; }
.pagebar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; padding: calc(env(safe-area-inset-top) + 8px) 10px 8px; margin-bottom: calc(-60px - env(safe-area-inset-top)); pointer-events: none; }
.pagebar .ibtn { pointer-events: auto; background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); border-radius: var(--r); }
[data-theme="plain"] .pagebar .ibtn { border: 0; border-radius: 50%; box-shadow: var(--shadow); }
.body { padding: 18px 16px 0; }
.title-zh { font-size: 31px; line-height: 1.15; overflow-wrap: anywhere; }
.title-en { font-size: 19px; margin-top: 6px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.facts span { display: inline-flex; gap: 5px; align-items: center; }
.facts .ic { width: 16px; height: 16px; }
.taxi { margin-top: 16px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--r); }
[data-theme="plain"] .taxi, [data-theme="metro"] .taxi, [data-theme="night"] .taxi { border-color: var(--line-soft); box-shadow: var(--shadow); }
.taxi-line { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 10px 8px 10px 14px; border-bottom: 1.5px solid var(--line-soft); }
.taxi-line small { display: block; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.taxi-line .zh { font-size: 18px; line-height: 1.3; user-select: all; -webkit-user-select: all; }
.taxi-line .copy { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-s); }
.taxi-btns { display: grid; grid-template-columns: 1fr 1fr; }
.taxi-btns > * { display: flex; align-items: center; justify-content: center; gap: 7px; height: 48px; font-weight: 700; font-size: 14.5px; text-decoration: none; }
.taxi-btns > * + * { border-left: 1.5px solid var(--line-soft); }
.acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.act { display: grid; justify-items: center; gap: 4px; padding: 10px 4px 9px; border: 1.5px solid var(--ink); border-radius: var(--r); font-size: 13px; font-weight: 650; background: var(--chip); transition: transform .15s var(--ease); }
[data-theme="plain"] .act, [data-theme="metro"] .act, [data-theme="night"] .act { border-color: var(--line); background: var(--paper); }
.act[aria-pressed="true"] { background: var(--chip-on); color: var(--chip-on-ink); border-color: var(--chip-on); }
.prose { margin-top: 20px; font-size: 16.5px; line-height: 1.5; max-width: 62ch; }
.tip { margin-top: 14px; padding: 12px 14px; background: var(--paper-2); border-radius: var(--r); font-size: 15px; display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.tip b { font-family: var(--font-zh); font-size: 15px; width: 28px; height: 28px; display: grid; place-items: center; background: var(--ink); color: var(--paper); border-radius: var(--r-s); }
.kv { margin-top: 18px; border-top: 1.5px solid var(--line); }
.kv div { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1.5px solid var(--line-soft); font-size: 14.5px; align-items: start; }
.kv .ic { width: 19px; height: 19px; margin-top: 1px; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { font-size: 12.5px; font-weight: 600; padding: 4px 9px; border-radius: var(--r-pill); border: 1.25px solid var(--line); color: var(--ink-2); }
.minimap { height: 190px; margin-top: 18px; border-radius: var(--r); overflow: hidden; border: 1.5px solid var(--ink); background: var(--paper-2); }
[data-theme="plain"] .minimap, [data-theme="metro"] .minimap, [data-theme="night"] .minimap { border-color: var(--line-soft); }
.field { margin-top: 22px; display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 14px; }
.field textarea, .field input, .inp { width: 100%; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper); padding: 11px 12px; font-size: 16px; min-height: 48px; resize: vertical; outline: none; }
[data-theme="plain"] .field textarea, [data-theme="plain"] .inp, [data-theme="night"] .field textarea, [data-theme="night"] .inp, [data-theme="metro"] .field textarea, [data-theme="metro"] .inp { border-color: var(--line); }
.field textarea:focus, .inp:focus { outline: 2.5px solid var(--focus); outline-offset: 1px; }
.field small, .credit { font-size: 12px; color: var(--ink-2); }
.credit { margin-top: 26px; overflow-wrap: anywhere; }
.credit a { color: inherit; }

/* ───────── map ───────── */
.mapwrap { position: fixed; inset: 0 0 calc(var(--tab-h) + env(safe-area-inset-bottom) + 6px) 0; width: min(100%, 560px); margin: 0 auto; background: var(--paper-2); }
#map { position: absolute; inset: 0; z-index: 1; background: var(--paper-2); font-family: var(--font-ui); }
.map-top { position: absolute; z-index: 5; top: calc(env(safe-area-inset-top) + 8px); left: 0; right: 0; display: grid; gap: 8px; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.map-top .chip, .map-top .seg { background: var(--paper); box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.map-top .seg { margin: 0 14px; }
.map-top .chip[aria-pressed="true"] { background: var(--chip-on); }
.map-side { position: absolute; z-index: 5; right: 12px; bottom: 18px; display: grid; gap: 8px; transition: bottom .3s var(--ease); }
.map-side .sq { box-shadow: 0 2px 8px rgba(0,0,0,.22); font-weight: 800; font-size: 13px; }
.peek { position: absolute; z-index: 6; left: 10px; right: 10px; bottom: 10px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0,0,0,.28); animation: peekin .3s var(--ease) both; overflow: hidden; }
@keyframes peekin { from { transform: translateY(30px); opacity: 0; } }
.peek .row { border: 0; padding: 10px; grid-template-columns: 76px 1fr 36px; box-shadow: none; background: none; }
.peek .taxi-btns { border-top: 1.5px solid var(--line-soft); }
.pinm { display: grid; place-items: center; border-radius: 50% 50% 50% 2px; transform: rotate(-45deg); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.pinm .ic { transform: rotate(45deg); width: 58%; height: 58%; stroke-width: 2; }
.pinm.sel { outline: 3px solid var(--stamp); outline-offset: 2px; z-index: 999 !important; }
.pinm.fav::after { content: ''; position: absolute; right: -4px; top: -4px; width: 11px; height: 11px; background: var(--stamp); border: 2px solid #fff; border-radius: 2px; transform: rotate(45deg); }
[data-theme="terminal"] .pinm { background: #0A0A0A !important; color: #FFD100; border-color: #FFD100; border-radius: 3px; transform: none; }
[data-theme="terminal"] .pinm .ic { transform: none; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #1677FF; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(22,119,255,.25); }
.leaflet-container { background: var(--paper-2); }
.leaflet-control-attribution { font-size: 10px !important; background: rgba(255,255,255,.75) !important; }
[data-theme="night"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.95) saturate(.7); }
.map-note { position: absolute; z-index: 4; left: 12px; bottom: 18px; font-size: 11.5px; background: var(--paper); padding: 5px 8px; border-radius: var(--r-s); max-width: 60%; border: 1px solid var(--line); }

/* ───────── plan ───────── */
.day { margin: 0 14px 12px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; }
[data-theme="plain"] .day, [data-theme="metro"] .day, [data-theme="night"] .day { border-color: var(--line-soft); box-shadow: var(--shadow); }
.day > summary, .day-h { list-style: none; display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; cursor: pointer; }
.day > summary::-webkit-details-marker { display: none; }
.date { display: grid; justify-items: center; line-height: 1; padding: 6px 0 5px; border: 1.5px solid var(--ink); border-radius: var(--r-s); }
.date b { font-size: 21px; font-stretch: 85%; font-weight: 800; }
.date small { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; }
.day.today .date { background: var(--stamp); color: #fff; border-color: var(--stamp); }
.day-h h3, .day summary h3 { font-size: 16px; }
.day summary p { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.day[open] summary .ic.chev { transform: rotate(180deg); }
.day-b { padding: 0 12px 12px; }
.stops { position: relative; margin: 4px 0 10px; }
.stop { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; position: relative; }
.stop::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2.5px; background: var(--ink); }
.stop:first-child::before { top: 50%; } .stop:last-child::before { bottom: 50%; }
.stop:only-child::before { display: none; }
.stop i { width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); margin-left: 4px; position: relative; z-index: 1; }
.stop.c-food i { border-color: var(--c-food); } .stop.c-tea i { border-color: var(--c-tea); } .stop.c-sight i { border-color: var(--c-sight); } .stop.c-arch i { border-color: var(--c-arch); } .stop.c-museum i { border-color: var(--c-museum); }
.stop.c-tech i { border-color: var(--c-tech); } .stop.c-coast i { border-color: var(--c-coast); } .stop.c-shop i { border-color: var(--c-shop); } .stop.c-local i { border-color: var(--c-local); } .stop.c-night i { border-color: var(--c-night); }
.stop .nm { text-align: left; min-width: 0; }
.stop .nm .zh { font-size: 16.5px; display: block; line-height: 1.2; }
.stop .nm span:last-child { font-size: 13px; color: var(--ink-2); font-weight: 550; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop .ops { display: flex; }
.stop .ops button { width: 34px; height: 38px; display: grid; place-items: center; color: var(--ink-2); }
.stop .ops .ic { width: 18px; height: 18px; }
.day-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.empty { margin: 8px 14px; padding: 26px 18px; border: 1.5px dashed var(--line); border-radius: var(--r); text-align: center; color: var(--ink-2); display: grid; gap: 10px; justify-items: center; }
.empty .zh { font-size: 34px; color: var(--ink); opacity: .8; }
.routecard { margin: 0 14px 12px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--r); padding: 14px; }
[data-theme="plain"] .routecard, [data-theme="metro"] .routecard, [data-theme="night"] .routecard { border-color: var(--line-soft); box-shadow: var(--shadow); }
.routecard h3 { font-size: 17.5px; }
.routecard h3 .zh { display: block; font-size: 16px; opacity: .75; margin-top: 2px; text-transform: none; }
.routecard p { color: var(--ink-2); font-size: 14px; margin: 6px 0 4px; }

/* ───────── me ───────── */
.profile { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; padding: 18px 16px 6px; }
.profile img { width: 84px; height: 84px; border-radius: var(--r); border: 1.5px solid var(--ink); }
.profile h2 { font-size: 26px; }
.profile .zh { font-size: 18px; opacity: .8; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 12px 14px 0; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper); }
[data-theme="plain"] .stats, [data-theme="metro"] .stats, [data-theme="night"] .stats { border-color: var(--line-soft); box-shadow: var(--shadow); }
.stats div { padding: 10px 6px; text-align: center; border-left: 1.5px solid var(--line-soft); }
.stats div:first-child { border: 0; }
.stats b { font-size: 24px; font-stretch: 85%; font-weight: 800; display: block; line-height: 1.1; }
.stats span { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.book { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; margin: 0 14px; padding: 14px 8px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--r); }
[data-theme="plain"] .book, [data-theme="metro"] .book, [data-theme="night"] .book { border-color: var(--line-soft); box-shadow: var(--shadow); }
.badge { display: grid; justify-items: center; gap: 7px; text-align: center; font-size: 11.5px; font-weight: 600; line-height: 1.2; color: var(--ink-2); }
.badge .chop.big { width: 54px; height: 54px; font-size: 23px; writing-mode: horizontal-tb; letter-spacing: 0; }
.badge.off .chop { color: var(--ink-2); border-color: var(--line); border-style: dashed; background: none; box-shadow: none; opacity: .6; }
.badge.off .chop span { opacity: .4; }
.sheetlist { margin: 0 14px; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--paper); overflow: hidden; }
[data-theme="plain"] .sheetlist, [data-theme="metro"] .sheetlist, [data-theme="night"] .sheetlist { border-color: var(--line-soft); box-shadow: var(--shadow); }
.todo { display: grid; grid-template-columns: 44px 1fr 40px; align-items: center; border-bottom: 1.5px solid var(--line-soft); min-height: 50px; }
.todo:last-child { border-bottom: 0; }
.todo input { position: absolute; opacity: 0; }
.todo .box { width: 24px; height: 24px; border: 1.75px solid var(--ink); border-radius: var(--r-s); margin: 0 auto; display: grid; place-items: center; color: transparent; }
.todo input:checked + .box { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.todo input:focus-visible + .box { outline: 2.5px solid var(--focus); outline-offset: 2px; }
.todo .box .ic { width: 17px; height: 17px; stroke-width: 2.5; }
.todo label { display: contents; cursor: pointer; }
.todo .tx { padding: 12px 0; font-size: 15.5px; }
.todo input:checked ~ .tx { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--ink-2); }
.todo .del { width: 40px; height: 44px; display: grid; place-items: center; color: var(--ink-2); }
.todo .del .ic { width: 18px; height: 18px; }
.addrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 10px 14px 0; }
.acc { border-bottom: 1.5px solid var(--line-soft); }
.acc:last-child { border-bottom: 0; }
.acc summary { list-style: none; display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 13px 12px; cursor: pointer; font-weight: 700; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .zh { font-weight: var(--zh-weight); font-size: 14.5px; opacity: .7; margin-left: 6px; }
.acc[open] summary .chev { transform: rotate(180deg); }
.acc p { padding: 0 14px 14px 50px; font-size: 15px; color: var(--ink); max-width: 64ch; }
.phrase { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 11px 14px; border-bottom: 1.5px solid var(--line-soft); }
.phrase:last-child { border-bottom: 0; }
.phrase .zh { font-size: 19px; display: block; }
.phrase small { font-size: 13px; color: var(--ink-2); }
.themes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 14px; }
.theme { text-align: left; border-radius: 10px; overflow: hidden; border: 2px solid transparent; outline: 1.5px solid var(--line); background: var(--tb); color: var(--ti); padding: 0 0 10px; }
.theme[aria-pressed="true"] { border-color: var(--stamp); outline-color: var(--stamp); }
.theme .sw { height: 34px; background: var(--ts); display: flex; align-items: center; justify-content: flex-end; padding: 0 8px; gap: 4px; }
.theme .sw i { width: 12px; height: 12px; border-radius: 3px; background: var(--ta); border: 1.5px solid var(--tb); }
.theme b { display: block; padding: 8px 10px 0; font-size: 15px; }
.theme span { display: block; padding: 0 10px; font-size: 12.5px; opacity: .8; }
.foot { padding: 26px 16px 10px; font-size: 12.5px; color: var(--ink-2); display: grid; gap: 8px; }

/* ───────── sheets & overlays ───────── */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.45); animation: fade .25s both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: fixed; z-index: 61; left: 50%; bottom: 0; width: min(100%, 560px); transform: translateX(-50%); background: var(--bg); color: var(--ink); border-radius: 16px 16px 0 0; border-top: 1.5px solid var(--ink); max-height: 86dvh; overflow-y: auto; padding: 8px 0 calc(env(safe-area-inset-bottom) + 18px); animation: sheetin .36s var(--ease) both; overscroll-behavior: contain; }
@keyframes sheetin { from { transform: translate(-50%, 100%); } }
.sheet-h { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 16px; position: sticky; top: -8px; background: var(--bg); z-index: 2; }
.sheet-h h2 { font-size: 19px; }
.pick { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; width: calc(100% - 28px); margin: 0 14px 8px; padding: 8px 10px; text-align: left; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r); }
.pick p { font-size: 13px; color: var(--ink-2); }
.pick[aria-pressed="true"] { border-color: var(--stamp); }
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 18px); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r); font-weight: 650; font-size: 14.5px; max-width: 86vw; text-align: center; animation: toast 2.4s var(--ease) both; pointer-events: none; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 12px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.driver { position: fixed; inset: 0; z-index: 95; background: #FFFFFF; color: #000; display: grid; grid-template-rows: auto 1fr auto; padding: calc(env(safe-area-inset-top) + 12px) 20px calc(env(safe-area-inset-bottom) + 20px); animation: fade .2s both; }
.driver .say { font-family: -apple-system, 'PingFang SC', 'Noto Sans CJK SC', sans-serif; font-size: 22px; color: #555; }
.driver .big { align-self: center; font-family: -apple-system, 'PingFang SC', 'Noto Sans CJK SC', sans-serif; font-weight: 700; font-size: clamp(38px, 12.5vw, 76px); line-height: 1.18; overflow-wrap: anywhere; }
.driver .addr { font-family: -apple-system, 'PingFang SC', sans-serif; font-size: clamp(20px, 6vw, 30px); line-height: 1.35; margin-top: 18px; font-weight: 500; }
.driver .btn { background: #000; color: #fff; border-color: #000; }

/* ───────── onboarding ───────── */
.hello { min-height: 100dvh; background: var(--shell); color: var(--shell-ink); padding: calc(env(safe-area-inset-top) + 34px) 18px 30px; display: grid; align-content: start; gap: 22px; position: relative; overflow: hidden; }
.hello h1 { font-size: 40px; position: relative; }
.hello h1 .zh { display: block; font-size: 64px; line-height: 1.05; text-transform: none; }
.hello p { color: var(--shell-ink-2); font-size: 16px; max-width: 34ch; position: relative; }
.who { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; position: relative; }
.who button { background: var(--paper); color: var(--ink); border-radius: var(--r); padding: 10px 10px 12px; text-align: left; display: grid; gap: 8px; border: 1.5px solid var(--ink); animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
.who button:first-child { grid-column: span 2; grid-template-columns: 112px 1fr; align-items: center; }
.who img { width: 100%; height: auto; aspect-ratio: 1; border-radius: var(--r-s); }
.who b { font-size: 21px; font-stretch: var(--head-wdth); font-weight: var(--head-wght); display: block; }
.who .zh { font-size: 16px; opacity: .75; }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } }
.hello .skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; margin: 0; height: 120px; opacity: .14; }

/* ───────── easter eggs ───────── */
.egg { position: fixed; inset: 0; z-index: 99; pointer-events: none; overflow: hidden; }
.egg > * { position: absolute; }
.fly { top: 16%; left: -80px; width: 64px; animation: fly 4.2s linear both; color: var(--ink); }
.fly svg { width: 64px; height: 64px; animation: bob .5s ease-in-out infinite alternate; }
@keyframes fly { to { transform: translateX(calc(100vw + 160px)); } }
@keyframes bob { to { transform: translateY(-9px) rotate(3deg); } }
.coin { top: -40px; width: 30px; height: 30px; border-radius: 50%; background: #F5C518; border: 2.5px solid #B8860B; color: #8A5A00; display: grid; place-items: center; font-family: var(--font-zh); font-weight: 700; font-size: 15px; animation: fall linear both; }
@keyframes fall { to { transform: translateY(115vh) rotate(540deg); } }
.cat { bottom: calc(var(--tab-h) + 26px); width: 54px; animation: walk 6s linear both; }
.cat.w { animation-delay: .9s; }
@keyframes walk { from { left: -70px; } to { left: 110%; } }
.eggmsg { position: fixed; z-index: 100; left: 50%; top: 24%; transform: translateX(-50%); width: min(88vw, 440px); background: var(--stamp); color: #fff; border-radius: var(--r); padding: 18px 18px 16px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.35); animation: eggin 4.6s var(--ease) both; pointer-events: none; }
.eggmsg .zh { font-size: 25px; display: block; line-height: 1.3; }
.eggmsg small { display: block; margin-top: 8px; font-size: 13.5px; opacity: .92; }
@keyframes eggin { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.9); } 8%, 88% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -10px); } }
.stripe711 { height: 9px; background: linear-gradient(#F58220 0 33.3%, #00824A 0 66.6%, #EE2526 0); }
.speed { position: fixed; inset: 0; z-index: 98; background: var(--stamp); color: #fff; display: grid; place-items: center; text-align: center; padding: 30px; animation: fade .3s both; }
.speed .zh { font-size: clamp(30px, 9vw, 52px); line-height: 1.3; }
.speed p { margin-top: 14px; font-size: 16px; opacity: .95; max-width: 30ch; }
.speed .floors { display: grid; gap: 3px; justify-items: center; margin: 0 auto 26px; width: 74px; }
.speed .floors i { display: block; height: 7px; width: 100%; background: #fff; animation: rise .3s var(--ease) both; animation-delay: calc((16 - var(--i)) * 150ms); }
.banner { margin: 12px 14px 0; padding: 12px 14px; background: var(--stamp); color: #fff; border-radius: var(--r); display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.banner .zh { font-size: 24px; }
.banner p { font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ───────── review fixes ───────── */
.phz { display: none; font-family: var(--font-zh); }
[data-theme="yumcha"] .ph:not(:has(img)) { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
[data-theme="yumcha"] .ph:not(:has(img))::before { display: none; }
[data-theme="yumcha"] .ph:not(:has(img)) > .ic { display: none; }
[data-theme="yumcha"] .ph:not(:has(img)) .phz { display: block; font-size: 34px; line-height: 1; font-weight: 700; }
[data-theme="yumcha"] .hero.ph:not(:has(img)) .phz { font-size: 96px; }
[data-theme="yumcha"] .feat .ph:not(:has(img)) .phz { font-size: 64px; }
.ph[data-id="dameisha-711"]:not(:has(img))::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 16%; background: linear-gradient(#F58220 0 33.3%, #00824A 0 66.6%, #EE2526 0); }
.act .chop, .chip .chop { position: static; }
.chip .chop { width: 20px; height: 20px; font-size: 9px; border-width: 1.5px; }
[data-theme] .chop.ghost { background: none; color: var(--ink-2); border: 1.5px dashed var(--ink-2); box-shadow: none; }
[data-theme] [aria-pressed="true"] > .chop { background: var(--paper); color: var(--stamp); border: 2px solid var(--stamp); }
[data-theme="yumcha"] .days { margin: 0 14px; border-top: 1.5px solid var(--line); }
[data-theme="yumcha"] .day { border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; background: none; margin: 0; }
[data-theme="yumcha"] .day > summary { padding: 10px 2px; }
[data-theme="yumcha"] .day-b { padding: 0 2px 14px; }
[data-theme="yumcha"] .theme[aria-pressed="true"] { border-color: var(--ink); outline-color: var(--ink); }
[data-theme="yumcha"] .todo input:checked + .box { background: var(--ink); border-color: var(--ink); color: var(--paper); }
[data-theme="yumcha"] .map-top .chip, [data-theme="yumcha"] .map-top .seg, [data-theme="yumcha"] .map-side .sq, [data-theme="yumcha"] .peek { box-shadow: none; }
@media (min-width: 600px) { [data-theme="yumcha"] #app { box-shadow: none; border-inline: 1.5px solid var(--ink); } }

/* ───────── tab bar pinned without transforms (iOS Safari keeps transformed fixed bars less reliably) ───────── */
.tabs { left: 0; right: 0; transform: none; width: auto; max-width: 560px; margin-inline: auto; bottom: 0; }
html, body { min-height: 100%; }
/* rank: one readable badge in every theme */
.rank[data-r="3"] em { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 3px 5px; border-radius: var(--r-s); background: var(--ink); color: var(--paper); }
[data-theme="yumcha"] .row { grid-template-columns: 76px 1fr 44px; }
/* photo-less tile: paper with the category icon */
[data-theme="yumcha"] .ph:not(:has(img)) > .ic { display: block; opacity: .8; }
.tip b .ic { width: 17px; height: 17px; }
.banner .head { font-size: 19px; }
@media (max-width: 460px) { .seg button, [data-theme] .seg button { flex-direction: row; height: 44px; font-size: 13.5px; } }

/* ── weather and what to wear ── */
.top-row .brand { margin-right: auto; }
.wx-btn { display: inline-flex; align-items: center; gap: 5px; height: 44px; padding: 0 10px; border-radius: var(--r, 10px); color: var(--shell-ink); font-size: 16px; flex: none; }
.wx-btn svg { width: 22px; height: 22px; }
.wx-btn b { font-weight: 750; }
.wx { padding: 4px 2px 16px; border-bottom: 1.5px solid var(--line-soft); margin-bottom: 14px; }
.wx:last-of-type { border-bottom: 0; margin-bottom: 0; }
.wx h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 20px; margin: 0 0 6px; }
.wx h3 span { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.wx h3 svg { width: 18px; height: 18px; align-self: center; }
.wx-cap { font-size: 13px; color: var(--ink-2); margin: 0 0 2px; }
.wx-days { list-style: none; margin: 0 0 8px; padding: 0; }
.wx-days li { display: grid; grid-template-columns: 58px 22px 1fr auto 78px; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
.wx-days li:last-child { border-bottom: 0; }
.wx-days svg { width: 20px; height: 20px; }
.wx-days .wd { font-weight: 650; }
.wx-days .wt, .wx-days .wr { color: var(--ink-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-days b { text-align: right; }
.wx-norm { font-size: 14px; color: var(--ink-2); margin: 0 0 10px; }
.wx-wear h4 { display: flex; align-items: center; gap: 7px; font-size: 15px; margin: 0 0 6px; }
.wx-wear h4 svg { width: 20px; height: 20px; }
.wx-wear ul { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.45; max-width: 60ch; }
.wx-wear li { margin-bottom: 4px; }
/* keyboard open: the fixed tab bar would float above the keyboard on iOS */
.kb .tabs { display: none; }
#wxsheet { padding: 0 16px calc(env(safe-area-inset-bottom) + 18px); }
