/* © 2026 Filip Mráček / Chineseffect. All rights reserved. Proprietary design – see /dictionary/NOTICE.md. */
/* Chineseffect City – architectural sketch × light cycles */
:root {
  --bg: #000; --text: #f5f5f7; --text-2: #a1a1a6; --text-3: #6e6e73;
  --line: rgba(255,255,255,.09); --surface: rgba(22,24,28,.78);
  --cyan: 70 190 255; --cyan-hi: 160 230 255; --orange: 255 150 50;
  --sketch: rgba(110,205,255,.82); --sketch-2: rgba(90,185,255,.26); --sketch-3: rgba(255,160,80,.22); --roof: rgba(255,165,80,.9);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Noto Sans SC", sans-serif;
  --font-zh: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.25,.8,.25,1);
  --hero: 84svh;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { background: #000; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #000; color: var(--text); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none; }
body.in-place { overflow: auto; overflow-x: hidden; }
body.dict-open { overflow: hidden; }
[lang="zh-Hans"] { font-family: var(--font-zh); }
a { color: rgb(var(--cyan-hi)); text-decoration: none; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid rgb(var(--cyan) / .6); outline-offset: 2px; border-radius: 8px; }

/* ───── top bar: floats over the map ───── */
.cbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0;
  display: flex; align-items: center; gap: 14px; pointer-events: none;
  background: linear-gradient(#000c, #0000);
}
.cbar > * { pointer-events: auto; }
.cbar__brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; letter-spacing: -.01em; margin-right: auto; }
.cbar__tile { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #000; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 0 14px rgb(var(--cyan) / .25); font-size: 17px; font-weight: 500; }
.cbar__sub { color: var(--text-2); font-weight: 400; }
.cbar__actions { display: flex; gap: 6px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; color: var(--text);
  background: rgba(20,22,26,.7); border: 1px solid rgba(255,255,255,.12); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.icon-btn svg { fill: currentColor; }
#cardsBtn svg { fill: none; }
.icon-btn:hover { border-color: rgb(var(--cyan) / .6); box-shadow: 0 0 16px rgb(var(--cyan) / .3); }
.icon-btn:active { transform: scale(.94); }
/* back: a pill in the brand's place, only inside a place */
.cbar__back {
  display: none; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 13px; border-radius: 999px; cursor: pointer; margin-right: auto;
  background: rgba(20,22,26,.78); border: 1px solid rgb(var(--orange) / .45); color: var(--text); font-weight: 600; font-size: 15px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 0 18px rgb(var(--orange) / .18);
}
.cbar__back span[aria-hidden] { font-size: 18px; line-height: 1; }
.cbar__back:focus-visible { outline-offset: 3px; }
.cbar__back:hover { box-shadow: 0 0 22px rgb(var(--orange) / .35); }
body.in-place .cbar__back { display: inline-flex; animation: fadeIn .4s .5s both; }
body.in-place .cbar__brand, body.in-place .cbar__nav { display: none; }
@media (max-width: 760px) { .cbar__brand > span:last-child { display: none; } .cbar__brand { margin-right: 0; } .cbar { gap: 8px; } .cbar__nav { flex: 1; } }

/* ───── stage: the city ───── */
.stage { position: relative; height: 100svh; height: 100dvh; transition: height 1.1s cubic-bezier(.65,0,.35,1); overflow: hidden; }
body.in-place .stage { height: var(--hero); }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer; user-select: none; -webkit-user-select: none; }
#map.grabbing { cursor: grabbing; }
body.in-place #map { cursor: default; touch-action: pan-y; }
.stage::after { /* vignette */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, #000 100%);
}
body.in-place .stage::after { background: radial-gradient(120% 90% at 50% 40%, transparent 50%, #000 100%), linear-gradient(transparent 70%, #000); }

/* ground */
.grid line { stroke: rgba(255,255,255,.035); stroke-width: 1; }
.road { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.road--edge { stroke: rgb(var(--cyan) / .5); stroke-width: 36; }
.road--fill { stroke: #020407; stroke-width: 33; }
.road--mid { stroke: rgb(var(--cyan) / .22); stroke-width: 1.4; stroke-dasharray: 14 18; animation: flow 9s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -64; } }
.lawn { fill: rgba(48,209,88,.035); stroke: rgba(130,230,170,.28); stroke-width: 1.2; stroke-dasharray: 4 6; }
.pond { fill: rgba(41,151,255,.07); stroke: rgba(130,200,255,.5); stroke-width: 1.2; }
.pond2 { fill: none; stroke: rgba(130,200,255,.18); stroke-dasharray: 3 7; }
.path { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 12; stroke-linecap: round; }
.plaza { fill: rgba(255,255,255,.022); stroke: rgba(255,255,255,.11); stroke-width: 1; }
.field { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 1.2; }
.tarmac { fill: rgba(255,255,255,.018); stroke: rgba(255,255,255,.1); stroke-width: 1; stroke-dasharray: 10 8; }
.runway { fill: #05070a; stroke: rgba(214,234,255,.32); stroke-width: 1.2; }
.rwline { stroke: rgba(255,255,255,.45); stroke-width: 2; stroke-dasharray: 22 18; }
.rwmark { stroke: rgb(var(--orange) / .55); stroke-width: 3; }
.gshadow { fill: rgba(0,0,0,.6); }

/* buildings: dark solids, fine pencil lines that keep 1px at any zoom */
.f { stroke-linejoin: round; }
.ft { fill: #061627; } .fr { fill: #040f1c; } .ff { fill: #020913; }
.ft.roof { fill: #1c0f05; } .fr.roof { fill: #150b03; } .ff.roof { fill: #0f0802; }
.roof.ln { stroke: rgb(255 165 80 / calc(.92 * var(--glow))); }
.ln, .det, .cons { vector-effect: non-scaling-stroke; fill-opacity: 1; }
.ln { stroke: rgb(110 205 255 / calc(.85 * var(--glow))); stroke-width: 1.1; }
line.ln, path.ln:not(.f) { fill: none; }
.det { stroke: rgb(90 185 255 / calc(.3 * var(--glow))); stroke-width: .9; fill: none; }
.cons { stroke: var(--sketch-3); stroke-width: .8; opacity: 0; transition: opacity .8s; }
.pl.focus .cons { opacity: 1; }
.accent { stroke: rgb(var(--orange) / .85); }
.ft.accent, .f.accent { fill: #160c03; }
.glass { fill: rgb(var(--cyan) / .09); }
.tree { fill: #04111d; stroke: rgba(110,205,255,.6); }
.cross { fill: rgba(255,69,58,.85); stroke: none; }
.lamp { fill: rgb(var(--orange)); }
.signtxt { fill: rgba(220,236,255,.8); font: 600 1px var(--font); font-size: inherit; letter-spacing: .02em; }
.accentfill { fill: rgb(var(--orange)); }
/* the sketch is never finished: each line draws itself in, lingers, and dissolves from where it began,
   in its own tempo (--t) – the faces stay as faint glass so the building never vanishes completely */
/* only a few lines are in motion at any moment (city.js picks them): far cheaper than animating every line */
#places .wv { animation: weave var(--t, 6s) cubic-bezier(.45,0,.55,1) 1 both; }
@keyframes weave {
  0%     { stroke-dasharray: 1 0; stroke-dashoffset: 0; }
  42%    { stroke-dasharray: 1 1; stroke-dashoffset: -1; }   /* dissolves from where it began */
  42.01% { stroke-dasharray: 0 1; stroke-dashoffset: 0; }
  58%    { stroke-dasharray: 0 1; stroke-dashoffset: 0; }    /* a breath of nothing */
  100%   { stroke-dasharray: 1 0; stroke-dashoffset: 0; }    /* and draws itself again */
}
#map.drawing #places .ln { stroke-dasharray: 1; animation: draw 1.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
.ft, .fr, .ff { fill-opacity: .3; }
.pl.focus .ft, .pl.focus .fr, .pl.focus .ff { fill-opacity: .6; }

/* the sketch breathes: every building's lines slowly fade in and out, each in its own rhythm */
/* (one opacity per building – cheap – instead of recolouring every line on every frame) */
.pl { --glow: 1; transition: opacity .9s var(--ease); }
.pl .solid { animation: breathe 8s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -1.7s); }
@keyframes breathe { 0% { opacity: .5; } 100% { opacity: 1; } }
.pl.focus .solid { animation-name: breatheSoft; animation-duration: 6s; }
@keyframes breatheSoft { 0% { opacity: .75; } 100% { opacity: 1; } }
.pl .solid { transition: filter .5s; }
.pl.near .ln { stroke: rgb(255 200 140 / calc(.95 * var(--glow))); }
.pl.dim { opacity: .16; }
.pl.focus .det { stroke: rgb(110 205 255 / calc(.55 * var(--glow))); }
.pl.focus .cons { stroke: rgba(170,210,255,.3); }
.pl.focus .ln { stroke: rgb(150 225 255 / calc(.98 * var(--glow))); }
.pl.focus .roof.ln { stroke: rgb(255 185 110 / var(--glow)); }

/* the sketch draws itself in on first load */
#map.drawing .pl .solid { animation: fillIn 1.6s ease both; animation-delay: calc(var(--i) * 90ms); }
/* the names light up character by character – a slow, even glow, no flicker */
#map.drawing .lbl__zh tspan { animation: lightUpSoft 1.4s ease-in-out both; animation-delay: var(--d); }
#map.drawing .lbl__en { animation: lightUpSoft 1.2s ease-in-out both; animation-delay: var(--d); }
@keyframes lightUpSoft { from { fill-opacity: 0; stroke-opacity: 0; } to { fill-opacity: 1; stroke-opacity: 1; } }
#map.drawing .roads { animation: fadeIn 1.2s both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fillIn { from { opacity: .35; } to { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* labels */
.lbl { cursor: pointer; transition: opacity .5s; }
.lbl__hit { fill: transparent; }
.lbl__zh { font-family: var(--font-zh); font-size: 26px; font-weight: 500; fill: #f5f5f7; paint-order: stroke; stroke: rgba(0,0,0,.85); stroke-width: 5px; stroke-linejoin: round; }
.lbl__en { font: 600 14px var(--font); letter-spacing: .04em; fill: rgba(225,238,250,.92); paint-order: stroke; stroke: rgba(0,0,0,.85); stroke-width: 4px; stroke-linejoin: round; }
.lbl:hover .lbl__zh, .lbl.near .lbl__zh { fill: rgb(255 214 170); }
.lbl.near .lbl__en { fill: rgb(var(--orange)); }
body.in-place .lbl { opacity: 0; pointer-events: none; }
/* phones: the Chinese names stay readable but quieter – smaller, lighter characters, a thinner halo (English as on desktop) */
@media (max-width: 760px) {
  .lbl__zh { font-size: 17px; font-weight: 400; fill: rgba(240,244,250,.86); stroke-width: 3.5px; letter-spacing: .04em; }
}

@keyframes flick { 0% { opacity: .55; } 8% { opacity: 1; } 12% { opacity: .7; } 20%, 100% { opacity: 1; } }

/* data running along the sketch lines */
.run { fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.run--c { stroke: rgb(170 235 255); } .run--o { stroke: rgb(255 190 120); }
.run__head { fill: #fff; }
.run__glow--c { fill: rgb(var(--cyan) / .45); } .run__glow--o { fill: rgb(var(--orange) / .5); }

/* light cycles */
.trail { fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.trail--c { stroke: rgb(var(--cyan-hi)); }
.trail--o { stroke: rgb(255 190 120); }
.bike__head { fill: #fff; }
.bike__glow--c { fill: rgb(var(--cyan) / .4); }
.bike__glow--o { fill: rgb(var(--orange) / .3); }
.plane { fill: #0b1119; stroke: rgba(228,242,255,.85); stroke-width: 1; vector-effect: non-scaling-stroke; }
.plane__shadow { fill: rgba(0,0,0,.55); }
.train__win { fill: none; stroke: rgb(var(--orange) / .85); stroke-width: 2; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; }

/* you */
.me__shadow { fill: rgba(0,0,0,.7); }
.me__fig { fill: none; stroke: rgb(255 190 120); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.me__fig circle { fill: #2a1405; }
.me__ghost * { fill: none; stroke: rgb(var(--orange) / .45); stroke-width: 1.2; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }

/* hint */
.hint {
  position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; z-index: 3;
  padding: 9px 16px; border-radius: 999px; font-size: 14px; color: var(--text-2); white-space: nowrap;
  background: rgba(16,18,22,.72); border: 1px solid rgba(255,255,255,.1); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: opacity .6s, transform .6s;
}
.hint:not(.gone) { animation: fadeIn .8s 2s both; }
body.in-place .hint { animation: none; }
.hint.gone, body.in-place .hint { opacity: 0; transform: translate(-50%, 10px); pointer-events: none; }
@media (hover: none) { .hint__keys { display: none; } }

/* hero title over the zoomed-in building */
.hero { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 max(22px, env(safe-area-inset-left)) 26px; pointer-events: none; display: grid; grid-template-columns: auto 1fr auto; align-items: end; column-gap: 14px; }
.hero:empty { display: none; }
.hero p { margin: 0; }
.hero__zh { grid-row: 1 / 3; font-size: clamp(54px, 11vw, 96px); line-height: .95; font-weight: 500; letter-spacing: .02em; text-shadow: 0 0 30px rgb(var(--cyan) / .35); animation: rise .9s .55s var(--ease) both; }
.hero__zh.has-ill { display: flex; gap: .06em; text-shadow: none; }
.hero__zh.has-ill img { width: 1em; height: 1em; object-fit: contain; display: block; }
.hero__py { color: rgb(var(--cyan-hi)); font-size: 18px; animation: rise .9s .65s var(--ease) both; }
.hero__en { color: var(--text-2); font: 600 13px var(--mono); letter-spacing: .24em; text-transform: uppercase; animation: rise .9s .72s var(--ease) both; align-self: start; }
.hero__cue {
  grid-column: 3; grid-row: 1 / 3; pointer-events: auto; cursor: pointer; align-self: end;
  padding: 10px 16px; border-radius: 999px; background: rgba(16,18,22,.72); border: 1px solid rgba(255,255,255,.16); color: var(--text); font-size: 14px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); animation: rise .9s .85s var(--ease) both;
}
.hero__cue span { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes bob { 50% { transform: translateY(3px); } }

/* ───── place content ───── */
.place { display: none; position: relative; z-index: 1; }
body.in-place .place { display: block; }
.place__inner { max-width: 760px; margin: 0 auto; padding: 18px 18px calc(60px + env(safe-area-inset-bottom)); opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.place.show .place__inner { opacity: 1; transform: none; }
.place__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 10px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.place__head .place__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.place__head h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.place__py { color: rgb(var(--cyan-hi)); font-weight: 400; font-size: 17px; margin-left: 4px; }
.place__en { color: var(--text-2); font-weight: 400; font-size: 17px; }

.scene { margin: 30px 0 10px; }
.scene header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.scene h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.scene header p { margin: 0; color: var(--text-3); font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.lines { display: flex; flex-direction: column; gap: 10px; }
.ln-row { display: flex; flex-direction: column; align-items: flex-start; transition: opacity .3s; }
.scene--dialogue .ln-row.is-you { align-items: flex-end; }
.who { font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin: 0 12px 4px; }
.is-you .who { color: rgb(var(--orange) / .85); }
.bubble {
  max-width: min(560px, 92%); padding: 12px 14px 8px; border-radius: 18px; border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(28,30,36,.82), rgba(18,20,24,.82));
}
.scene--dialogue .bubble { border-top-left-radius: 6px; }
.scene--dialogue .is-you .bubble { border-top-left-radius: 18px; border-top-right-radius: 6px; border-color: rgb(var(--orange) / .3); background: linear-gradient(180deg, rgba(40,28,18,.8), rgba(24,18,13,.8)); }
.scene--phrases .bubble { max-width: 100%; width: 100%; }
.zh { margin: 0; font-family: var(--font-zh); font-size: 24px; line-height: 1.4; color: var(--text); letter-spacing: .02em; }
/* words stay tappable but the sentence reads as one unbroken line: no gaps, no resting underline – a word shows itself only on hover/tap */
.zh .w { cursor: pointer; border-radius: 4px; transition: background .15s, color .15s; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.zh .w:hover, .zh .w:focus-visible, .zh .w.is-hl { color: rgb(var(--cyan-hi)); text-decoration-color: rgb(var(--cyan) / .5); outline: none; }
.py .pw { border-radius: 4px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.py .pw.is-hl { color: #fff; background: rgb(var(--cyan) / .22); box-shadow: inset 0 -2px 0 rgb(var(--cyan-hi)); }
.zh .w.is-on { background: rgb(var(--cyan) / .16); color: #fff; text-decoration-color: transparent; }
.look { width: 34px; height: 34px; border-radius: 999px; border: 0; background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.look:hover { background: rgba(255,255,255,.08); color: var(--text); }
.look svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* word peek: tap a word in a sentence */
.peek { position: fixed; z-index: 35; width: min(320px, calc(100vw - 20px)); padding: 14px 16px 10px; border-radius: 18px; background: rgba(18,20,24,.96); border: 1px solid rgb(var(--cyan) / .35); box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 24px rgb(var(--cyan) / .15); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: opacity .16s, transform .16s; }
.peek.above { transform: translateY(6px) scale(.98); }
.peek.show { opacity: 1; transform: none; pointer-events: auto; }
.peek p { margin: 0; }
.peek__zh { font-family: var(--font-zh); font-size: 34px; line-height: 1.15; }
.peek__py { color: rgb(var(--cyan-hi)); font-size: 17px; margin-top: 2px !important; }
.peek__en { color: var(--text-2); font-size: 15px; margin-top: 2px !important; }
.peek__head { display: flex; align-items: center; gap: 8px; }
.peek__trail { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: -2px 0 6px; font-size: 14px; color: var(--text-3); }
.peek__trail button { border: 0; background: none; color: rgb(var(--cyan-hi)); font-family: var(--font-zh); font-size: 15px; padding: 2px 4px; cursor: pointer; border-radius: 6px; }
.peek__trail button:hover { background: rgba(255,255,255,.08); }
.peek__trail b { color: var(--text); font-weight: 500; font-family: var(--font-zh); font-size: 15px; }
.peek__parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.peek__part { flex: 1 1 0; min-width: 72px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 6px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: var(--text); cursor: pointer; text-align: center; }
.peek__part:hover { border-color: rgb(var(--cyan) / .6); background: rgb(var(--cyan) / .08); }
.peek__pc { font-size: 26px; line-height: 1.1; }
.peek__pp { color: rgb(var(--cyan-hi)); font-size: 13px; }
.peek__pg { color: var(--text-2); font-size: 12px; line-height: 1.25; }
.peek__go { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.92); color: #000; border-radius: 999px; padding: 9px 13px; font-size: 14px; font-weight: 600; cursor: pointer; }
.peek__go:hover { background: #fff; }
.peek__go:hover { border-color: rgb(var(--cyan) / .6); }
.py { margin: 3px 0 0; color: rgb(var(--cyan-hi) / .9); font-size: 15px; }
.en { margin: 2px 0 0; color: var(--text-2); font-size: 15px; }
.tools { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.tools .sp { flex: 1; }
.say, .addc { width: 34px; height: 34px; border-radius: 999px; border: 0; background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.say:hover, .addc:hover { background: rgba(255,255,255,.08); color: var(--text); }
.say svg path:not([fill]) , .addc svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.say.is-playing { color: rgb(var(--cyan-hi)); }
.addc { background: rgba(255,255,255,.08); color: #e8ecf5; font: 500 18px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; transition: background .2s, color .2s; }
.addc:hover { background: rgba(255,255,255,.9); color: #0b0d12; }
.addc.is-added { background: rgba(48,209,88,.16); color: #7ee2a0; font-size: 15px; }
.place__foot .made-by { flex-basis: 100%; margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--text-2); }
.place__foot .made-by a { color: inherit; text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 3px; }
.place__foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.92); color: #000; font-weight: 600; cursor: pointer; font-size: 15px; }
.btn--ghost { background: transparent; color: var(--text); }
.muted { color: var(--text-2); } .pad { padding: 20px 0; }

/* ───── dictionary overlay ───── */
.dict { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
.dict.show { opacity: 1; }
.dict__sheet { position: absolute; inset: calc(10px + env(safe-area-inset-top)) max(10px, calc((100vw - 980px) / 2)) 10px; border-radius: 22px; overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 90px rgba(0,0,0,.7), 0 0 40px rgb(var(--cyan) / .12); transform: translateY(18px) scale(.985); transition: transform .3s var(--ease); }
.dict.show .dict__sheet { transform: none; }
.dict__sheet iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.dict__close { position: absolute; top: 8px; right: 10px; z-index: 2; width: 38px; height: 38px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(20,22,26,.9); color: var(--text); font-size: 24px; line-height: 1; cursor: pointer; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 50; opacity: 0; pointer-events: none; padding: 10px 16px; border-radius: 999px; background: rgba(28,30,34,.95); border: 1px solid rgba(255,255,255,.14); font-size: 14px; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { margin-left: 8px; font-weight: 600; }

@media (prefers-reduced-motion: reduce) { .pl .solid, #places .ln, #places .det, #places .cons, #places .wv { animation: none !important; } }

/* ── lighter devices (phones, tablets, small machines): same look, far less work for the GPU ── */
.lite .cbar__nav, .lite .icon-btn, .lite .cbar__back, .lite .hint, .lite .hero__cue, .lite .peek, .lite .dict { -webkit-backdrop-filter: none; backdrop-filter: none; }
.lite .cbar__nav, .lite .icon-btn, .lite .cbar__back { background: rgba(16,18,22,.92); }
.lite .road--mid, .lite .hero__cue span { animation: none; }
.lite .pl .solid { animation: none; }
/* nothing moves while the map is out of sight (scrolled to the sentences, or another tab) */
.still #map, .still #map * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.trail-glow { fill: none; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; opacity: .18; }
.trail-glow--c { stroke: rgb(var(--cyan)); } .trail-glow--o { stroke: rgb(var(--orange)); }
@media (max-width: 760px) { .tab-long { display: none; } }

/* hover a word: its meaning in this sentence (mouse only) – same label as in the dictionary */
.wtip {
  position: fixed; z-index: 60; pointer-events: none; transform: translate(-50%, -100%) translateY(4px); opacity: 0;
  max-width: 260px; padding: 6px 10px; border-radius: 9px; font: 500 13px/1.3 var(--font, -apple-system, BlinkMacSystemFont, sans-serif); color: #fff; text-align: center;
  background: rgba(30, 30, 36, .94); box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 10px 30px rgba(0,0,0,.45);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); transition: opacity .14s, transform .14s;
}
.wtip.is-on { opacity: 1; transform: translate(-50%, -100%); }
.wtip.is-below, .wtip.is-below.is-on { transform: translate(-50%, 0); }
.wtip::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: inherit; transform: rotate(45deg); box-shadow: 1px 1px 0 rgba(255,255,255,.12); }
.wtip.is-below::after { bottom: auto; top: -5px; box-shadow: -1px -1px 0 rgba(255,255,255,.12); }

/* Plus: lines of a place still in the mist (free version, see /site/plus.js) – readable as shapes, not as words */
.ln-mist { filter: blur(5px); opacity: .42; user-select: none; pointer-events: none; transition: filter .6s, opacity .6s; }
.ln-mist + .ln-mist { opacity: .28; }
.ln-mist + .ln-mist + .ln-mist { opacity: .15; }
