/* KAIFONG 街坊: the look.
   THE RULES OF THIS DESIGN (each answers a version that was rejected: do not undo them)
   1 ONE HUE. An azure (--blue) that sits between sky and cobalt and never leans to violet: a blue-to-purple gradient was
     rejected as "AI colours". Its deep tone is for figures, its two tints for soft grounds; neutrals are cool greys.
     One complement, a sunlit amber (--sun), on less than a tenth of any screen: the light in the logo's doorway, the
     "right now" card, a note. Nothing else has a hue: things are told apart by picture and name.
     (Also rejected: six pastels at once, "piecing colours together, no harmony"; pastels with black blocks, "ugly";
     grey with black, "sterile"; cream with terracotta, "muddy yellow"; a dark theme, twice. There is one appearance.)
   2 ONE BLOCK OF COLOUR LEADS EACH SCREEN, and the eye starts there: the header with search and the four services on the
     home screen, the figure on a guide, the whole of the first screen. Everything else is white on the page's grey.
     (Without it the screens had "no visual focus".)
   3 PICTURES ARE MADE WELL, AND ICONS STAY SMALL. (Icons enlarged into card "covers" read as filling space, low effort.)
      Icons are one professional duotone set, drawn large in the brand's blue with no
     pale disc behind them where they stand alone; places have photographs; a guide's figure is set large.
     (Thin hand-drawn line icons in pale discs read as cheap; 3D emoji as cartoonish; screens of text as a demo.)
   4 NO WORDS THE LAYOUT ALREADY SAYS: see the note at the top of src/main.js.
   5 TYPE IS LEAN AND THE PHONE'S OWN. The system font (San Francisco with PingFang on an iPhone), so that Latin, digits and
     Chinese are one design; nothing is heavier than semibold (600), which is the heaviest Chinese there is, and names in
     lists are medium. (A heavy geometric Latin face next to Chinese read as "chubby... AI-made, the weights out of balance".)
     Type is large. Reading text is 17px, nothing a person must read is under 13px, and sizes are in rem so that the
     text-size setting (which changes the root size) scales all of it together.
   6 Surfaces are flat: white cards with a hairline. A shadow only under what floats (the tab bar, sheets) and under
     the block of colour.
   7 Motion follows the hand: pages slide in from the side, sheets rise from below, with one easing (--ease). */
:root {
  color-scheme: light;
  --blue: #1a72f4; --blue-top: #0f62e6; --blue-hi: #4a9dff; --blue-deep: #0c4bb4; --navy: #0a1b3d;
  --tint: #e8f1ff; --tint2: #d6e7ff;
  --sun: #ffb224; --sun-deep: #e99400; --sun-tint: #fff3d6; --sun-ink: #8a5600;
  --bg: #f2f4f8; --surface: #fff; --fill: #ecf0f5; --ink: #0e1a2e; --ink2: #55617a; --ink3: #9aa4b6; --line: rgba(14, 26, 46, .08);
  --block: radial-gradient(120% 110% at 100% 100%, var(--blue-hi) 0, transparent 62%), linear-gradient(180deg, var(--blue-top), var(--blue));
  --glass: rgba(255, 255, 255, .88); --glass-line: rgba(14, 26, 46, .07); --desk: #dfe4ec;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --fit: 1;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { height: 100%; overflow: hidden; background: var(--bg); overscroll-behavior: none; }
body { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'PingFang HK', 'Noto Sans CJK SC', 'Microsoft YaHei', 'Kohinoor Devanagari', 'Noto Sans Devanagari', sans-serif; color: var(--ink); font-size: 1.0625rem; line-height: 1.45; -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; }
button, a, input { font: inherit; color: inherit; } button { background: none; border: 0; cursor: pointer; text-align: start; } a { text-decoration: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
svg { display: block; flex: none; }

/* ---------- the app in its frame */
#frame { height: 100%; }
#app { position: relative; width: 100%; height: 100dvh; overflow: hidden; background: var(--bg); isolation: isolate; }
body.framed { display: grid; place-items: center; background: var(--desk); }
body.framed #frame { width: 402px; height: 874px; transform: scale(var(--fit)); border-radius: 58px; box-shadow: 0 0 0 11px #0c0c0c, 0 0 0 12.5px #4a4a48, 0 60px 100px -30px rgba(0, 0, 0, .4); }
body.framed #app { height: 874px; border-radius: 58px; }
body.sim { --sat: 54px; --sab: 26px; }
#status, #homebar { display: none; }
body.sim #status { display: flex; position: absolute; inset: 0 0 auto; height: 54px; padding: 20px 30px 0 48px; justify-content: space-between; align-items: flex-start; font-size: 17px; font-weight: 500; letter-spacing: 0; z-index: 90; pointer-events: none; color: var(--ink); transition: color .35s; }
#status span { display: flex; gap: 6px; align-items: center; padding-top: 3px; }
#app[data-status="light"] #status { color: #fff; }
body.sim #homebar { display: block; position: absolute; left: 50%; bottom: 8px; width: 138px; height: 5px; margin-left: -69px; border-radius: 3px; background: var(--ink); z-index: 90; pointer-events: none; transition: background .35s; }
#app[data-foot="light"] #homebar { background: #fff; }

/* ---------- pages */
#pages { position: absolute; inset: 0; }
.page { position: absolute; inset: 0; display: none; background: var(--bg); will-change: transform; }
.page.show { display: block; }
.page::after { content: ''; position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); z-index: 30; }
.page.under::after { opacity: .12; }
.page.pushed { transform: translate3d(100%, 0, 0); }
.page.pushed.in { transform: none; }
.page.under { transform: translate3d(-24%, 0, 0); }
.page.anim { transition: transform .5s var(--ease); }
.page.root.tabin { animation: tabin .34s var(--ease); }
@keyframes tabin { from { opacity: 0; transform: scale(.985); } }
.scroll { position: absolute; inset: 0; overflow: hidden auto; overscroll-behavior-y: contain; padding-bottom: calc(var(--sab) + 7.25rem); scrollbar-width: none; }
.scroll::-webkit-scrollbar, .rail::-webkit-scrollbar, .banners::-webkit-scrollbar, .filters::-webkit-scrollbar, .pscroll::-webkit-scrollbar { display: none; }
.wrap { padding: 0 1.25rem; } .wrap.top { padding-top: calc(var(--sat) + 1.5rem); }
.wrap.top > .list { margin-top: 1.25rem; }
.page.fresh .stag > * { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 38ms + 130ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
/* the strip behind the phone's own status bar, on pages that have no bar of their own */
.sbar { position: absolute; inset: 0 0 auto; height: var(--sat); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); opacity: 0; transition: opacity .25s; z-index: 5; pointer-events: none; }
.page.scrolled .sbar { opacity: 1; }
.page[data-kind="home"] .sbar { background: var(--blue-top); -webkit-backdrop-filter: none; backdrop-filter: none; opacity: 1; }

/* ---------- type */
.t-hero { font-size: 2.125rem; line-height: 1.12; font-weight: 600; letter-spacing: -.015em; text-wrap: balance; }
.t-title { font-size: 1.75rem; line-height: 1.16; font-weight: 600; letter-spacing: -.013em; text-wrap: balance; }
.t-h2 { font-size: 1.375rem; line-height: 1.22; font-weight: 600; letter-spacing: -.01em; }
.t-h3 { font-size: 1.1875rem; line-height: 1.26; font-weight: 500; letter-spacing: 0; }
.t-lead { font-size: 1.1875rem; line-height: 1.42; letter-spacing: 0; text-wrap: pretty; }
.t-body { font-size: 1.0625rem; line-height: 1.47; text-wrap: pretty; }
.t-sub { font-size: .9375rem; line-height: 1.4; color: var(--ink2); text-wrap: pretty; }
.fine { font-size: .8125rem; line-height: 1.5; color: var(--ink3); text-wrap: pretty; } .soft { color: var(--ink2); }
.sec { margin: 2rem 0 .875rem; } .foot { margin-top: 2rem; }
:lang(zh-Hant-HK) :is(.t-hero, .t-title, .t-h2, .t-h3, .t-lead), :lang(zh-Hans) :is(.t-hero, .t-title, .t-h2, .t-h3, .t-lead), :lang(ne) :is(.t-hero, .t-title, .t-h2, .t-h3, .t-lead) { letter-spacing: 0; }
:lang(zh-Hant-HK) :is(.t-hero, .t-title), :lang(zh-Hans) :is(.t-hero, .t-title) { line-height: 1.22; }
:lang(ne) :is(.t-hero, .t-title, .t-h2, .t-h3) { line-height: 1.4; }

/* ---------- what answers a touch */
.need, .aud, .gcard, .grow, .pcard, .banner, .nowcard, .link, .btn, .primary, .fchip, .counterbtn, .searchbar, .mini, .langbtn, .svc button, .w-langs button, .langs button { transition: transform .22s var(--ease), opacity .22s; }
:is(.need, .aud, .gcard, .grow, .pcard, .banner, .nowcard, .link, .btn, .primary, .fchip, .counterbtn, .searchbar, .mini, .langbtn, .svc button, .w-langs button, .langs button):active { transform: scale(.968); opacity: .82; }
.round, .square { transition: transform .22s var(--ease); } :is(.round, .square):active { transform: scale(.92); }
.row { transition: background .15s; } .row:active { background: var(--fill); }

/* ---------- pictures: an icon's soft second layer is .d; a picture is in the brand's blue */
.ic .d { opacity: var(--duo, .2); }
.pic { color: var(--blue); --duo: .24; }
.chev { color: var(--ink3); }
.ptile { flex: none; display: grid; place-items: center; width: var(--s, 3.25rem); height: var(--s, 3.25rem); border-radius: 30%; background: var(--tint); }
.tile { flex: none; display: grid; place-items: center; width: 2.625rem; height: 2.625rem; border-radius: 30%; background: var(--tint); color: var(--blue); }

/* ---------- cards, rows, lists */
.card { background: var(--surface); border-radius: 1.5rem; box-shadow: 0 0 0 .5px var(--line); overflow: hidden; }
.row { position: relative; display: flex; align-items: center; gap: .875rem; width: 100%; min-height: 4.25rem; padding: .75rem 1rem; }
.row + .row::before { content: ''; position: absolute; top: 0; left: 4.5rem; right: 0; height: .5px; background: var(--line); }
.rtext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .0625rem; }
.rtext b { font-size: 1.0625rem; line-height: 1.3; font-weight: 500; letter-spacing: 0; } .rtext i { font-style: normal; font-size: .9375rem; line-height: 1.36; color: var(--ink2); text-wrap: pretty; }
.row.slim { min-height: 3.5rem; } .row.slim + .row.slim::before { left: 1rem; } .row.static:active { background: none; }
.list { display: grid; gap: .625rem; }
.grow, .link { display: flex; align-items: center; gap: .875rem; width: 100%; padding: .75rem 1rem .75rem .75rem; border-radius: 1.375rem; background: var(--surface); box-shadow: 0 0 0 .5px var(--line); }
.grow .rtext i { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.link + .link { margin-top: .625rem; }
.prog { display: block; height: .375rem; margin: .4375rem 0 .25rem; border-radius: .25rem; background: var(--fill); overflow: hidden; } .prog u { display: block; width: var(--p); height: 100%; border-radius: inherit; background: var(--blue); }
.empty { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 2.75rem 1.25rem .5rem; text-align: center; color: var(--ink3); } .empty b { margin-top: .5rem; color: var(--ink); }
.sech { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 2rem 0 .875rem; }
.sech b { font-size: 1.375rem; line-height: 1.2; font-weight: 600; letter-spacing: -.012em; } .sech button { display: inline-flex; align-items: center; gap: .1875rem; font-size: .9375rem; font-weight: 500; color: var(--blue); white-space: nowrap; }
:lang(zh-Hant-HK) .sech b, :lang(zh-Hans) .sech b, :lang(ne) .sech b { letter-spacing: 0; }
/* a row of cards that is pushed sideways */
.rail { display: flex; gap: .625rem; overflow: auto hidden; padding: .125rem 1.25rem; scroll-snap-type: x proximity; scroll-padding: 0 1.25rem; scrollbar-width: none; }

/* ---------- home: the block of colour (who we are, search, the four services) */
.hero { position: relative; padding: calc(var(--sat) + .5rem) 1.25rem 3.5rem; background: var(--block); color: #fff; }
.hero::before { content: ''; position: absolute; inset: auto 0 100%; height: 60vh; background: var(--blue-top); }   /* (what shows when the page is pulled down) */
.hrow { display: flex; align-items: center; justify-content: space-between; height: 2.75rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.3125rem; font-weight: 600; letter-spacing: -.01em; } .brand i { font-style: normal; font-weight: 500; letter-spacing: .02em; opacity: .82; }
.hero .logo { color: #fff; --honey: var(--sun); }
.langbtn { display: inline-flex; align-items: center; gap: .375rem; height: 2.375rem; padding: 0 .875rem 0 .6875rem; border-radius: 1.25rem; background: rgba(255, 255, 255, .17); font-size: .9375rem; font-weight: 600; }
.searchbar { display: flex; align-items: center; gap: .625rem; width: 100%; height: 3.375rem; margin-top: .875rem; padding: 0 1.125rem; border-radius: 1.6875rem; background: #fff; color: var(--ink3); font-size: 1.0625rem; box-shadow: 0 12px 24px -14px rgba(4, 34, 100, .55); }
.searchbar .ic { color: var(--blue); } .searchbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc { display: grid; grid-template-columns: repeat(4, 1fr); margin: 1.375rem -.625rem 0; --duo: .3; }
.svc button { display: flex; flex-direction: column; align-items: center; gap: .4375rem; } .svc b { font-size: .875rem; font-weight: 500; }

/* home: every need, on the one card that sits over the block's edge */
.needs { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); row-gap: 1.125rem; margin: -2.25rem .875rem 0; padding: 1.25rem .25rem 1.125rem; border-radius: 1.5rem; background: var(--surface); box-shadow: 0 0 0 .5px var(--line), 0 16px 30px -20px rgba(8, 40, 110, .32); }
.need { display: flex; flex-direction: column; align-items: center; gap: .4375rem; }
.need b { max-width: 4.5rem; font-size: .8125rem; line-height: 1.22; font-weight: 500; letter-spacing: 0; text-align: center; text-wrap: balance; }

/* home, under the needs: the hour's question, the places (the photographs), what changed, readers, guides. All small and dense. */

/* home: by who she is, most asked, places */
.nowcard { display: flex; align-items: center; gap: .6875rem; width: 100%; margin-top: .75rem; padding: .75rem 1rem; border-radius: 1.125rem; background: var(--sun-tint); }
.nowcard > .ic:first-child { color: var(--sun-deep); --duo: .34; } .nowcard b { flex: 1; font-size: 1rem; line-height: 1.3; font-weight: 500; text-wrap: balance; } .nowcard .chev { color: var(--sun-ink); opacity: .55; }
.auds { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.aud { display: flex; align-items: center; gap: .625rem; min-height: 3.25rem; padding: .5rem .875rem; border-radius: 1rem; background: var(--surface); box-shadow: 0 0 0 .5px var(--line); }
.aud b { font-size: .9375rem; line-height: 1.25; font-weight: 500; }
.pcard { flex: none; display: flex; flex-direction: column; width: 13rem; border-radius: 1.375rem; background: var(--surface); box-shadow: 0 0 0 .5px var(--line); overflow: hidden; scroll-snap-align: start; }
.pimg { display: grid; place-items: center; height: 7.75rem; background: var(--tint) center / cover; }
.pcard b { margin: .75rem .875rem 0; font-size: 1rem; line-height: 1.25; font-weight: 600; } .pcard i { margin: .1875rem .875rem 0; font-style: normal; font-size: .875rem; line-height: 1.36; color: var(--ink2); } .pcard > :last-child { margin-bottom: .875rem; }

/* ---------- the bar over a page */
.topbar { position: absolute; inset: 0 0 auto; display: flex; align-items: center; gap: .5rem; padding: calc(var(--sat) + .375rem) .875rem .5rem; z-index: 5; }
.topbar::before { content: ''; position: absolute; inset: 0; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); border-bottom: .5px solid var(--glass-line); opacity: 0; transition: opacity .25s; z-index: -1; }
.page.scrolled .topbar::before { opacity: 1; }
.tb-title { flex: 1; min-width: 0; text-align: center; font-size: 1.0625rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.page.scrolled .tb-title { opacity: 1; transform: none; }
.tb-right { display: flex; justify-content: flex-end; min-width: 2.75rem; }
.round { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 .5px var(--line); }

/* ---------- a list of guides, and a guide */
.lhead { padding: calc(var(--sat) + 4.5rem) 1.25rem 0; } .lhead .t-hero { margin-top: .875rem; }
.ltile { display: grid; place-items: center; width: 3.75rem; height: 3.75rem; border-radius: 30%; background: var(--block); color: #fff; --duo: .3; box-shadow: 0 14px 22px -14px rgba(10, 70, 190, .8); }
.wrap.list { padding-top: 1.25rem; }
.ghead { padding-top: calc(var(--sat) + 4.25rem); }
.official { margin-top: .3125rem; font-size: .9375rem; line-height: 1.4; color: var(--ink2); }
/* the guide's block of colour: its figure */
.figcard, .c-out { position: relative; padding: 1.5rem 1.375rem 1.375rem; background: var(--block); color: #fff; overflow: hidden; }
.figcard { margin-top: 1.25rem; border-radius: 1.75rem; box-shadow: 0 18px 30px -22px rgba(10, 70, 190, .8); }
.figcard b, .c-amount { display: block; font-size: 3.5rem; line-height: 1; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
:lang(zh-Hant-HK) .figcard b, :lang(zh-Hans) .figcard b, :lang(ne) .figcard b { letter-spacing: 0; line-height: 1.2; font-size: 3.375rem; }
.figcard span { display: block; max-width: 17rem; margin-top: .625rem; font-size: 1.0625rem; line-height: 1.38; opacity: .94; text-wrap: pretty; }
.lead { margin-top: 1.25rem; }
.block { margin-top: 2.125rem; }
.block > header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.count { font-size: .9375rem; font-weight: 500; color: var(--ink2); white-space: nowrap; }
.lis { padding: .25rem 0; }
.li { position: relative; display: flex; align-items: flex-start; gap: .875rem; width: 100%; padding: .875rem 1.125rem; font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty; }
.li + .li::before { content: ''; position: absolute; top: 0; left: 3.5rem; right: 0; height: .5px; background: var(--line); }
.dot, .num, .box { flex: none; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; }
.dot { background: var(--tint); color: var(--blue); }
.num { background: var(--blue); color: #fff; font-size: .8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.box { width: 1.625rem; height: 1.625rem; margin: -.0625rem; border: 2px solid var(--ink3); color: transparent; transition: background .2s, border-color .2s, color .2s, transform .35s var(--ease); }
.tick.on .box { background: var(--blue); border-color: var(--blue); color: #fff; transform: scale(1.08); }
.tick.on > span:last-child { color: var(--ink3); }
.note { display: flex; align-items: flex-start; gap: .75rem; padding: 1rem 1.125rem 1rem 1rem; border-radius: 1.375rem; background: var(--sun-tint); }
.note .ic { color: var(--sun-deep); --duo: .34; } .note p { font-size: 1.0625rem; line-height: 1.42; text-wrap: pretty; }
.counterbtn { display: flex; align-items: center; gap: .875rem; width: 100%; padding: 1rem 1rem 1rem 1.125rem; border-radius: 1.375rem; background: var(--tint); } .counterbtn > .ic:first-child { color: var(--blue); --duo: .26; }
.counterbtn span { flex: 1; display: flex; flex-direction: column; gap: .0625rem; } .counterbtn b { font-size: 1.0625rem; font-weight: 500; } .counterbtn i { font-style: normal; font-size: .9375rem; line-height: 1.36; color: var(--ink2); } .counterbtn .chev { color: var(--blue-deep); opacity: .5; }
.page[data-kind="r"] .scroll { padding-bottom: calc(var(--sab) + 7rem); }
.actionbar { position: absolute; inset: auto 0 0; display: flex; gap: .625rem; padding: .75rem 1rem calc(var(--sab) + .75rem); background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px); border-top: .5px solid var(--glass-line); z-index: 6; }
.primary { flex: 1; display: flex; align-items: center; justify-content: center; gap: .5rem; height: 3.5rem; border-radius: 1.75rem; background: var(--blue); color: #fff; font-size: 1.0625rem; font-weight: 600; }
.square { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 .5px var(--line); }
.savebtn .ic + .ic, .savebtn.on .ic { display: none; } .savebtn.on .ic + .ic { display: block; color: var(--blue); } .savebtn.pop .ic { animation: pop .45s var(--ease); } @keyframes pop { 40% { transform: scale(1.32); } }

/* ---------- the allowance calculator: its amount is that guide's block of colour */
.calc { margin-top: 1.25rem; border-radius: 1.75rem; }
.c-amount { display: inline; transition: opacity .25s; }
.c-out span { margin-left: .4375rem; font-size: 1.0625rem; opacity: .9; } .c-out p { margin-top: .625rem; font-size: 1.0625rem; font-weight: 500; }
.calc.none .c-amount, .calc.none .c-out span { opacity: .45; }
.c-body { padding: .25rem 1.25rem 1rem; }
.c-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.625rem; } .c-row + .c-row { border-top: .5px solid var(--line); }
.stepper { display: flex; align-items: center; gap: .125rem; padding: .1875rem; border-radius: .9375rem; background: var(--fill); }
.stepper button { display: grid; place-items: center; width: 2.625rem; height: 2.25rem; border-radius: .75rem; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); } .stepper button:active { transform: scale(.92); }
.stepper b { min-width: 2.125rem; text-align: center; font-size: 1.125rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.switch { position: relative; width: 3.25rem; height: 2rem; border-radius: 1rem; background: var(--fill); transition: background .25s, opacity .25s; }
.switch i { position: absolute; top: .125rem; left: .125rem; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .28); transition: transform .32s var(--ease); }
.switch.on { background: var(--blue); } .switch.on i { transform: translateX(1.25rem); } .switch:disabled { opacity: .4; }
.c-slide { display: grid; grid-template-columns: 1fr auto; align-items: baseline; padding: .9375rem 0 .5rem; border-top: .5px solid var(--line); }
.c-slide b { font-size: 1.125rem; font-weight: 500; font-variant-numeric: tabular-nums; } .c-slide input, .hintline { grid-column: 1 / -1; } .hintline { font-size: .9375rem; color: var(--ink2); }
.calc .fine { margin-top: .5rem; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 2.5rem; background: none; --p: 50%; touch-action: pan-y; }
input[type="range"]::-webkit-slider-runnable-track { height: .5rem; border-radius: .25rem; background: linear-gradient(to right, var(--blue) var(--p), var(--fill) var(--p)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 1.875rem; height: 1.875rem; margin-top: -.6875rem; border-radius: 50%; background: #fff; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .1), 0 2px 7px rgba(0, 0, 0, .26); }
input[type="range"]::-moz-range-track { height: .5rem; border-radius: .25rem; background: linear-gradient(to right, var(--blue) var(--p), var(--fill) var(--p)); }
input[type="range"]::-moz-range-thumb { width: 1.875rem; height: 1.875rem; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, .26); }

/* ---------- search, nearby, saved */
.page[data-kind="search"] .wrap.top { padding-top: calc(var(--sat) + .75rem); }
.field { display: flex; align-items: center; gap: .625rem; height: 3.375rem; padding: 0 .75rem 0 1.125rem; border-radius: 1.6875rem; background: var(--surface); box-shadow: 0 0 0 .5px var(--line); color: var(--blue); transition: box-shadow .2s; }
.field:focus-within { box-shadow: 0 0 0 2px var(--blue); }
.field input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 1.0625rem; color: var(--ink); user-select: text; -webkit-user-select: text; }
.field input::placeholder { color: var(--ink3); } .field input::-webkit-search-cancel-button { display: none; }
.clear { display: none; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; background: var(--fill); color: var(--ink2); } .field.has .clear { display: grid; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.results > .list { margin-top: 1.25rem; }
.where { display: flex; align-items: center; gap: .375rem; } .where .ic { margin-left: -.1875rem; color: var(--blue); }
/* the map: the app's own drawing of the town centre, in its own colours, with a pin for every place */
.map { position: relative; margin-top: 1rem; aspect-ratio: 362 / 330; background: #e6ecf5; }
.map > svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.m-park { fill: #d5ead9; } .m-bld { fill: #d6dfec; } .m-ped { stroke: #f4f7fb; stroke-width: 1.6; fill: #f4f7fb; } .m-minor { stroke: #fff; stroke-width: 2.6; } .m-mid { stroke: #fff; stroke-width: 4; } .m-major { stroke: #fff; stroke-width: 6.5; }
.map text { fill: #8391a8; stroke-linejoin: round; font-size: 7.5px; font-weight: 500; text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: #fff; stroke-width: 2.4; }
.mpin, .mstation { position: absolute; display: flex; align-items: center; gap: .3125rem; transform: translate(-1.0625rem, -50%); white-space: nowrap; }
.mpin i { flex: none; display: grid; place-items: center; width: 2.125rem; height: 2.125rem; border-radius: 50%; background: var(--blue); color: #fff; box-shadow: 0 0 0 2.5px #fff, 0 6px 12px -4px rgba(8, 40, 110, .55); transition: transform .25s var(--ease); }
.mpin b { padding: .1875rem .5625rem; border-radius: .75rem; background: #fff; font-size: .8125rem; font-weight: 600; box-shadow: 0 2px 8px -3px rgba(8, 30, 80, .35); }
.mpin.l { flex-direction: row-reverse; transform: translate(calc(-100% + 1.0625rem), -50%); }
.mpin:active i { transform: scale(.88); }
.mstation { gap: .25rem; transform: translate(-.5625rem, -50%); color: var(--ink2); font-size: .75rem; } .mstation .ic { box-sizing: content-box; padding: .1875rem; border-radius: .3125rem; background: var(--ink2); color: #fff; } .mstation b { font-weight: 600; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.mcredit { position: absolute; right: .5rem; bottom: .375rem; font-size: .625rem; color: var(--ink2); text-shadow: 0 0 3px #fff, 0 0 3px #fff; }
.place.ping { animation: ping 1.3s var(--ease); } @keyframes ping { 0%, 60% { box-shadow: 0 0 0 3px var(--blue); } }
.filters { display: flex; gap: .5rem; overflow: auto hidden; margin: 1.125rem -1.25rem 1rem; padding: .125rem 1.25rem; scrollbar-width: none; }
.fchip { flex: none; height: 2.5rem; padding: 0 1rem; border-radius: 1.25rem; background: var(--surface); box-shadow: 0 0 0 .5px var(--line); font-size: 1rem; font-weight: 500; white-space: nowrap; }
.fchip.on { background: var(--blue); color: #fff; box-shadow: none; }
.plist { display: grid; gap: .75rem; }
.place[hidden] { display: none; } .pbody { padding: 1.125rem 1.25rem 1.25rem; } .pphoto { display: block; height: 10rem; background: var(--fill) center / cover; }
.place .t-sub { margin-top: .1875rem; text-wrap: balance; } .pnote { margin-top: .5rem; font-size: .9375rem; line-height: 1.4; color: var(--ink2); }
.used { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .8125rem; }
.mini { display: inline-flex; align-items: center; height: 2rem; padding: 0 .75rem; border-radius: 1rem; background: var(--tint); color: var(--blue-deep); font-size: .875rem; font-weight: 500; white-space: nowrap; }
.pbtns { display: flex; gap: .5rem; margin-top: 1rem; }
.btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: .4375rem; height: 2.875rem; border-radius: 1.4375rem; background: var(--fill); font-size: 1rem; font-weight: 500; white-space: nowrap; } .btn .ic { color: var(--blue); }
.prefs { margin-top: 2rem; }
.seg { display: flex; align-items: center; gap: .125rem; padding: .1875rem; border-radius: .9375rem; background: var(--fill); }
.seg button { width: 2.75rem; height: 2.25rem; border-radius: .75rem; text-align: center; font-weight: 500; line-height: 1; } .seg button.on { background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }

/* ---------- the tab bar */
#tabbar { position: absolute; left: 50%; bottom: calc(var(--sab) + .625rem); display: flex; gap: .125rem; padding: .3125rem; border-radius: 2rem; background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px); border: .5px solid var(--glass-line); box-shadow: 0 12px 36px rgba(8, 30, 80, .16), 0 1px 3px rgba(0, 0, 0, .05); transform: translateX(-50%); transition: transform .5s var(--ease), opacity .3s; z-index: 20; }
#app[data-bar="0"] #tabbar { transform: translate(-50%, 170%); opacity: 0; pointer-events: none; }
#tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1875rem; width: 4.75rem; height: 3.375rem; border-radius: 1.75rem; color: var(--ink3); font-size: .6875rem; font-weight: 500; line-height: 1; transition: background .25s, color .25s; }
#tabbar .ic + .ic, #tabbar .on .ic { display: none; } #tabbar .on .ic + .ic { display: block; }
#tabbar button.on { background: var(--tint); color: var(--blue); }
#tabbar button:active { transform: scale(.94); }

/* ---------- sheets */
#sheets { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.sheet { position: absolute; inset: 0; pointer-events: auto; }
.shade { position: absolute; inset: 0; background: rgba(6, 18, 44, .42); opacity: 0; transition: opacity .45s var(--ease); } .sheet.in .shade { opacity: 1; }
.panel { position: absolute; inset: auto 0 0; padding: .625rem 1.25rem calc(var(--sab) + 1.5rem); border-radius: 2rem 2rem 0 0; background: var(--bg); transform: translateY(104%); transition: transform .5s var(--ease); touch-action: none; }
.sheet.in .panel { transform: none; }
.panel.tall { top: calc(var(--sat) + 2.5rem); display: flex; flex-direction: column; padding-bottom: 0; }
.pscroll { flex: 1; overflow: hidden auto; margin: 0 -1.25rem; padding: .25rem 1.25rem calc(var(--sab) + 2rem); touch-action: pan-y; } .pscroll p { margin-top: .875rem; }
.grab { display: block; width: 2.5rem; height: .3125rem; margin: 0 auto 1.125rem; border-radius: .1875rem; background: var(--ink3); opacity: .55; }
.panel .brand { font-size: 1.1875rem; } .panel .brand i { color: var(--ink2); opacity: 1; } .panel .logo { color: var(--blue); --honey: var(--sun); }
.langs { display: grid; gap: .5rem; }
.langs button { display: flex; align-items: center; gap: .75rem; min-height: 4rem; padding: .625rem 1.125rem; border-radius: 1.25rem; background: var(--surface); box-shadow: 0 0 0 .5px var(--line); }
.langs span { flex: 1; display: flex; flex-direction: column; } .langs b { font-size: 1.25rem; line-height: 1.35; font-weight: 500; } .langs i { font-style: normal; font-size: .875rem; color: var(--ink2); }
.langs .ic { opacity: 0; color: var(--blue); } .langs .on { box-shadow: 0 0 0 2px var(--blue); } .langs .on .ic { opacity: 1; }
.panel.full { inset: 0; display: flex; flex-direction: column; padding: calc(var(--sat) + .75rem) 1.5rem calc(var(--sab) + 2rem); border-radius: 0; background: var(--navy); color: #fff; }
.ghosty { align-self: flex-end; margin-right: -.375rem; background: rgba(255, 255, 255, .14); box-shadow: none; }
.cn { margin: auto 0; }
.cn-zh { font-size: 2.75rem; line-height: 1.2; font-weight: 600; text-wrap: balance; } .cn-en { margin-top: .75rem; font-size: 1.375rem; line-height: 1.3; color: rgba(255, 255, 255, .66); text-wrap: balance; }
.cn hr { height: 1px; margin: 2rem 0; border: 0; background: rgba(255, 255, 255, .2); }
.cn-say { font-size: 1.5rem; line-height: 1.36; font-weight: 500; text-wrap: balance; } .cn-say.en { margin-top: .375rem; font-size: 1.1875rem; font-weight: 400; color: rgba(255, 255, 255, .66); } .cn-say.more { margin-top: 1.5rem; }
#toast { position: absolute; left: 50%; bottom: calc(var(--sab) + 6.75rem); padding: .625rem 1.125rem; border-radius: 1.5rem; background: var(--ink); color: #fff; font-size: .9375rem; font-weight: 500; white-space: nowrap; opacity: 0; transform: translate(-50%, .875rem); transition: opacity .3s, transform .4s var(--ease); pointer-events: none; z-index: 60; }
#toast.in { opacity: 1; transform: translate(-50%, 0); }

/* ---------- the first screen: the app's mark at full size (a doorway with the light on), then a language.
   It is the same blue as the home header, so choosing a language lifts it away onto the home screen. */
#welcome { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 0 1.25rem calc(var(--sab) + 1.5rem); background: linear-gradient(180deg, #0b57d6, var(--blue) 78%); color: #fff; z-index: 50; transition: transform .75s var(--ease); overflow: hidden; }
#welcome.out { transform: translateY(-101%); }
.w-art { position: relative; flex: 1; min-height: 0; }
.w-halo, .w-arch, .w-door, .w-spill { position: absolute; left: 50%; }
.w-halo { bottom: 4.5rem; width: 19rem; height: 24rem; margin-left: -9.5rem; border-radius: 9.5rem 9.5rem 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, 0) 82%); animation: rise 1.1s var(--ease) both; }
.w-arch { bottom: 4.5rem; width: 13rem; height: 18.5rem; margin-left: -6.5rem; border-radius: 6.5rem 6.5rem 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 96%); animation: rise 1s var(--ease) .06s both; }
.w-door { bottom: 4.5rem; width: 5.5rem; height: 10.75rem; margin-left: -2.75rem; border-radius: 2.75rem 2.75rem 0 0; background: linear-gradient(180deg, #fff8e2, #ffdc8b 55%, #ffc552); box-shadow: 0 0 46px 8px rgba(255, 248, 232, .5), 0 0 130px 46px rgba(255, 248, 232, .2); animation: rise 1s var(--ease) .14s both, lit 5s ease-in-out 1.4s infinite; }   /* (the light round it is near white: amber laid over blue turns grey) */
.w-spill { bottom: -.5rem; width: 17rem; height: 5rem; margin-left: -8.5rem; background: linear-gradient(180deg, rgba(255, 244, 214, .62), rgba(255, 244, 214, 0)); clip-path: polygon(34% 0, 66% 0, 100% 100%, 0 100%); filter: blur(5px); animation: rise 1.2s var(--ease) .2s both; }
@keyframes lit { 50% { box-shadow: 0 0 56px 12px rgba(255, 248, 232, .58), 0 0 150px 56px rgba(255, 248, 232, .25); } }
#welcome h1 { font-size: 2.75rem; line-height: 1.05; font-weight: 600; letter-spacing: -.018em; } #welcome h1 span { font-weight: 500; letter-spacing: .02em; opacity: .82; }
.w-tag { margin: .5rem 0 1.5rem; font-size: 1.125rem; line-height: 1.42; opacity: .9; white-space: pre-line; }
.w-langs { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.w-langs button { display: flex; align-items: center; justify-content: space-between; height: 4rem; padding: 0 1rem 0 1.125rem; border-radius: 1.25rem; background: #fff; color: var(--ink); }
.w-langs b { font-size: 1.1875rem; font-weight: 600; } .w-langs .ic { color: var(--blue); }

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