/* Menpai 门牌: school catchment resale, Shanghai. Clean mode: plain document scroll, one signature (the ring lighting). */
@font-face {
  font-family: "Asta Sans";
  src: url("/live/menpai/fonts/asta-sans.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Menpai Hei";
  src: url("/live/menpai/fonts/menpai-hei.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --white: #FFFFFF;
  --mist: #F2F4F3;
  --ink: #111614;
  --green: #3E5249;
  --grey: #5C6A62;
  --line: #DCE1DE;
  --red: #B8173A;
  --sans: "Asta Sans", "Menpai Hei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --gut: clamp(16px, 4vw, 48px);
  --stick: 0px;
  --r: 4px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--stick) + 16px); }
body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
:lang(zh-CN) { letter-spacing: 0; }
html[lang="zh-CN"] body { line-height: 1.7; }
::selection { background: var(--green); color: var(--white); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
a { text-underline-offset: .2em; text-decoration-thickness: 1px; }
.num { font-variant-numeric: tabular-nums; }
.nw { white-space: nowrap; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 16px; height: 16px; flex: none; }
.ico--l { transform: rotate(90deg); }
.ico--r { transform: rotate(-90deg); }
[hidden] { display: none !important; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
input, button { font: inherit; color: inherit; }
img { height: auto; }

.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: var(--r); }
.skip:focus { top: 12px; }

.h2 { font-size: clamp(28px, 3.4vw, 46px); line-height: 1.08; font-weight: 500; letter-spacing: -.028em; text-wrap: balance; }
.h3 { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
html[lang="zh-CN"] .h2, html[lang="zh-CN"] .h3 { letter-spacing: .01em; line-height: 1.3; }
.lede { color: var(--grey); font-size: 17px; max-width: 62ch; margin-top: 14px; text-wrap: pretty; }
.sec { padding: clamp(64px, 9vw, 120px) 0 0; }

/* Buttons: squared, one hover (fill turns ink), press scale. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border: 1px solid var(--green); border-radius: var(--r);
  background: var(--green); color: var(--white); font-weight: 600; font-size: 16px;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), transform .15s var(--ease);
}
.btn:hover { background: var(--ink); border-color: var(--ink); }
.btn:active { transform: scale(.98); }
.btn--line { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--white); }
.back, .linkb {
  border: 0; background: none; padding: 0; min-height: 44px; color: var(--ink); font-weight: 500;
  text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; text-decoration-color: var(--line);
  transition: text-decoration-color .2s var(--ease);
}
.back:hover, .linkb:hover { text-decoration-color: var(--ink); }
.linkb { min-height: 0; }

/* Bar */
.bar { border-bottom: 1px solid var(--line); background: var(--white); }
.bar__in { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.mark__plate {
  display: inline-grid; place-items: center; height: 30px; padding: 0 9px; border-radius: 3px; white-space: nowrap; flex: none;
  background: var(--green); color: var(--white); font-family: "Menpai Hei", sans-serif; font-size: 15px; letter-spacing: .12em;
  outline: 1px solid var(--white); outline-offset: -4px;
}
.mark__word { font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.bar__city { white-space: nowrap; color: var(--grey); font-size: 14px; padding-left: 20px; border-left: 1px solid var(--line); line-height: 20px; }
.bar__nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.bar__nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.bar__nav a:hover { border-bottom-color: var(--ink); }
.bar__count { font-size: 12px; font-weight: 600; padding: 1px 6px; border: 1px solid var(--line); border-radius: 3px; }
.bar__count.is-on { background: var(--green); border-color: var(--green); color: var(--white); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); }
.lang__b { border: 0; background: none; min-height: 36px; min-width: 48px; padding: 0 10px; font-size: 14px; font-weight: 500; color: var(--grey); }
.lang__b[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.lang__b:first-child { border-radius: 3px 0 0 3px; }
.lang__b:last-child { border-radius: 0 3px 3px 0; }

/* Hero: the fork at the door */
.door { padding: clamp(40px, 6vw, 88px) 0 clamp(40px, 5vw, 72px); }
.door__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: end; }
.door__h { grid-column: 1 / span 8; font-size: clamp(36px, 4.6vw, 66px); line-height: 1.02; font-weight: 500; letter-spacing: -.036em; text-wrap: balance; max-width: 16ch; }
html[lang="zh-CN"] .door__h { font-family: "Menpai Hei", sans-serif; font-weight: 400; letter-spacing: .02em; line-height: 1.22; font-size: clamp(34px, 4.4vw, 62px); max-width: none; }
.door__lede { grid-column: 9 / span 4; color: var(--grey); font-size: 17px; text-wrap: pretty; }
.fork { margin-top: clamp(40px, 5vw, 72px); }
.fork__q { font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.fork__cols, .pick { display: grid; grid-template-columns: 40px minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: center; }
.fork__cols { font-size: 13px; color: var(--grey); padding: 0 16px 10px; border-bottom: 1px solid var(--ink); }
.pick { position: relative; padding: 18px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease); }
.pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pick:hover { background: var(--mist); }
.pick:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: -2px; }
.pick__dot { width: 22px; height: 22px; border: 1.5px solid var(--grey); border-radius: 50%; display: grid; place-items: center; }
.pick__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: transparent; }
.pick__name { display: flex; flex-direction: column; }
.pick__zh { font-family: "Menpai Hei", sans-serif; font-size: 26px; line-height: 1.2; letter-spacing: .04em; }
.pick__en { font-size: 14px; color: var(--grey); }
.pick__f { font-size: 15px; }
.pick__k { display: none; }
.pick__chk { color: var(--grey); font-size: 14px; }
.pick.is-on { background: var(--green); color: var(--white); border-bottom-color: var(--green); }
.pick.is-on .pick__en, .pick.is-on .pick__chk { color: var(--white); }
.pick.is-on .pick__dot { border-color: var(--white); }
.pick.is-on .pick__dot::after { background: var(--white); }
.fork__note { font-size: 14px; color: var(--grey); margin-top: 14px; max-width: 60em; }

/* The lane photo */
.lane picture, .lane img { display: block; width: 100%; }
.lane img { height: clamp(240px, 44vw, 620px); object-fit: cover; background: var(--line); }
.lane figcaption { font-size: 14px; color: var(--grey); padding-top: 12px; }

/* Sticky filter row */
.filters { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--line); margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); }
.filters__in { padding-top: 10px; padding-bottom: 10px; }
.filters__sum { display: none; }
.filters__panel { display: grid; grid-template-columns: minmax(170px, 230px) auto minmax(140px, 190px) minmax(0, 1fr) auto; gap: 8px 24px; align-items: start; }
.fl { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fl__k { font-size: 13px; color: var(--grey); line-height: 1.3; }
.fl__note { font-size: 13px; color: var(--grey); line-height: 1.35; min-height: 0; }
.fl__note.is-bad { color: var(--ink); font-weight: 600; }
.field {
  height: 42px; width: 100%; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white);
  font-size: 16px; color: var(--ink); appearance: none; transition: border-color .2s var(--ease);
}
.field:hover { border-color: var(--grey); }
.field:focus-visible { border-color: var(--green); outline-offset: 0; }
.field.is-bad { border-color: var(--ink); border-width: 2px; }
.field::placeholder { color: var(--grey); opacity: 1; }
.unit { display: flex; align-items: stretch; }
.unit .field { border-radius: var(--r) 0 0 var(--r); }
.unit__u { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--r) var(--r) 0; background: var(--mist); font-size: 15px; }
.unit--pre .unit__u { border: 1px solid var(--line); border-right: 0; border-radius: var(--r) 0 0 var(--r); order: -1; }
.unit--pre .field { border-radius: 0 var(--r) var(--r) 0; }

.seg__row { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: var(--r); width: max-content; max-width: 100%; }
.seg__row label { position: relative; display: block; }
.seg__row label + label { border-left: 1px solid var(--line); }
.seg__row input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg__row span { display: grid; place-items: center; min-height: 40px; min-width: 44px; padding: 0 14px; font-size: 15px; transition: background-color .2s var(--ease), color .2s var(--ease); }
.seg__row label:hover span { background: var(--mist); }
.seg__row input:checked + span { background: var(--green); color: var(--white); }
.seg__row input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; position: relative; z-index: 1; }
.seg__row input:disabled + span { color: var(--grey); background: var(--mist); cursor: not-allowed; }
.seg__row label:first-child span { border-radius: 3px 0 0 3px; }
.seg__row label:last-child span { border-radius: 0 3px 3px 0; }

.tog { position: relative; flex-direction: row; align-items: center; gap: 10px; align-self: center; margin-top: 18px; cursor: pointer; }
.tog input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tog__box { width: 22px; height: 22px; flex: none; border: 1.5px solid var(--grey); border-radius: 3px; display: grid; place-items: center; color: transparent; transition: background-color .2s var(--ease); }
.tog__box svg { width: 16px; height: 16px; }
.tog input:checked + .tog__box { background: var(--green); border-color: var(--green); color: var(--white); }
.tog input:focus-visible + .tog__box { outline: 2px solid var(--green); outline-offset: 2px; }
.tog input:disabled ~ .tog__t { color: var(--grey); }
.tog__t { font-size: 15px; line-height: 1.3; }
.filters__count { align-self: center; margin-top: 18px; font-size: 14px; color: var(--grey); white-space: nowrap; }

/* Rules */
.rules__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.rules__main { grid-column: 1 / span 7; }
.rl { margin-top: 32px; border-top: 1px solid var(--ink); }
.rl__row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 8px 20px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.rl__row dt { font-size: 15px; color: var(--grey); }
.rl__row dt [lang] { color: var(--ink); }
.rl__row dd { font-size: 16px; }
.rl__v { font-weight: 600; display: block; font-size: 18px; letter-spacing: -.01em; }
.rl__d { font-size: 13px; color: var(--grey); white-space: nowrap; }
.rl__row.is-key .rl__v { color: var(--green); }
.hh { grid-column: 9 / span 4; align-self: start; border-top: 1px solid var(--ink); padding-top: 20px; position: sticky; top: calc(var(--stick) + 24px); }
.hh__q { margin-top: 20px; }
.hh__q legend { font-size: 14px; color: var(--grey); margin-bottom: 8px; }
.hh__say { margin-top: 22px; font-size: 15px; padding-top: 18px; border-top: 1px solid var(--line); }
.hh__say p + p { margin-top: 8px; }
.hh__oh { font-size: 14px; color: var(--grey); font-weight: 500; margin-top: 22px; }
.order { margin-top: 10px; counter-reset: o; }
.order li { counter-increment: o; display: grid; grid-template-columns: 26px 1fr; gap: 8px; font-size: 14px; padding: 7px 0; border-top: 1px solid var(--line); color: var(--grey); }
.order li::before { content: counter(o); font-variant-numeric: tabular-nums; font-weight: 600; }
.order [lang] { white-space: nowrap; }
.order li.is-you { color: var(--ink); font-weight: 600; }
.order li.is-you::after { content: attr(data-you); grid-column: 2; font-size: 12px; font-weight: 600; color: var(--green); }

/* Map */
.map__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: end; }
.map__head .h2 { grid-column: 1 / span 6; }
.map__head .lede { grid-column: 7 / span 6; margin-top: 0; }
.map__frame { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--r); background: var(--mist); overflow: hidden; }
.chart { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.map__frame--route { margin-top: 0; }
.map__frame--route .chart { aspect-ratio: 5 / 4; }
.map__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--grey); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.lg { display: inline-block; flex: none; }
.lg--ring { width: 22px; height: 0; border-top: 3px solid var(--green); }
.lg--lit { width: 16px; height: 11px; background: var(--green); }
.lg--off { width: 16px; height: 11px; background: var(--white); border: 1px solid var(--grey); }
.lg--school { width: 11px; height: 11px; border: 3px solid var(--ink); background: var(--white); }
.map__count { font-size: 15px; font-weight: 600; }

/* SVG map parts */
.m-world { fill: var(--mist); }
.m-in { fill: var(--white); }
.m-ring { fill: none; stroke: var(--green); stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.m-ring--far { stroke: var(--grey); stroke-width: 1; stroke-dasharray: 5 5; opacity: .7; }
.m-lanes { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.m-case { fill: none; stroke: var(--line); stroke-linecap: round; stroke-linejoin: round; }
.m-core { fill: none; stroke: var(--white); stroke-linecap: round; stroke-linejoin: round; }
.m-lbl { fill: var(--grey); font-family: var(--sans); paint-order: stroke; stroke: var(--white); stroke-width: 3px; stroke-linejoin: round; }
.m-lbl--road { fill: var(--grey); }
.m-lbl--st { fill: var(--ink); font-weight: 500; }
.m-lbl--sch { fill: var(--ink); font-weight: 600; }
.m-lbl--far { fill: var(--grey); }
.m-sch { fill: var(--white); stroke: var(--ink); stroke-width: 3; vector-effect: non-scaling-stroke; }
.m-blk rect { fill: var(--white); stroke: var(--grey); stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill .45s var(--ease), stroke .45s var(--ease); }
.m-blk text { fill: var(--grey); font-family: var(--sans); font-weight: 600; transition: fill .45s var(--ease); pointer-events: none; }
.m-blk .m-name { font-weight: 500; }
.m-blk.is-lit rect { fill: var(--green); stroke: var(--green); }
.m-blk.is-lit .m-id { fill: var(--white); }
.m-blk.is-lit .m-name { fill: var(--ink); }
.m-blk.is-hot rect { stroke: var(--ink); stroke-width: 3; }
.m-blk.is-far rect { stroke: var(--line); }
.m-blk.is-far text { fill: var(--grey); }
.m-blk:focus { outline: none; }
.m-blk:focus-visible rect { stroke: var(--ink); stroke-width: 3; }
a.m-blk { cursor: pointer; }
.m-leg { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.m-stop { fill: var(--ink); }
.m-stop-n { fill: var(--white); font-family: var(--sans); font-weight: 700; }
.m-time { fill: var(--ink); font-family: var(--sans); font-weight: 600; paint-order: stroke; stroke: var(--white); stroke-width: 4px; stroke-linejoin: round; }
.m-meet { fill: var(--ink); font-family: var(--sans); font-weight: 500; paint-order: stroke; stroke: var(--white); stroke-width: 4px; }

/* Flats */
.flats__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px 32px; }
.flats__main { grid-column: 1 / span 8; min-width: 0; }
.peek { grid-column: 9 / span 4; }
.peek__fig { position: sticky; top: calc(var(--stick) + 24px); }
.peek__frame { aspect-ratio: 3 / 2; border-radius: var(--r); overflow: hidden; background: var(--line); }
.peek__frame img { width: 100%; height: 100%; object-fit: cover; }
.peek__cap { font-size: 14px; color: var(--grey); margin-top: 12px; }
.peek__cap strong { color: var(--ink); font-weight: 600; display: block; font-size: 15px; }
.rows { margin-top: 32px; border-top: 1px solid var(--ink); }
.row { border-bottom: 1px solid var(--line); transition: background-color .2s var(--ease); }
.row.is-hot, .row.is-open { background: var(--mist); }
.row__head { display: grid; grid-template-columns: 44px 104px minmax(0, 1fr) auto 44px; gap: 16px; align-items: center; padding: 16px 12px 16px 4px; }
.tick { position: relative; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.tick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tick__box { width: 22px; height: 22px; border: 1.5px solid var(--grey); border-radius: 3px; display: grid; place-items: center; color: transparent; background: var(--white); transition: background-color .2s var(--ease); }
.tick__box svg { width: 16px; height: 16px; }
.tick input:checked + .tick__box { background: var(--green); border-color: var(--green); color: var(--white); }
.tick input:focus-visible + .tick__box { outline: 2px solid var(--green); outline-offset: 2px; }
.plate { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 4px 5px; border: 1px solid var(--green); border-radius: 3px; background: var(--white); text-align: center; line-height: 1.15; outline: 1px solid var(--green); outline-offset: 2px; margin: 3px; }
.plate__rd { font-family: "Menpai Hei", sans-serif; font-size: 13px; letter-spacing: .06em; }
.plate__no { font-size: 22px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plate__no small { font-family: "Menpai Hei", sans-serif; font-size: 13px; font-weight: 400; margin-left: 1px; }
.plate__py { font-size: 9.5px; font-weight: 600; letter-spacing: .08em; color: var(--grey); text-transform: uppercase; }
.row__spec { min-width: 0; }
.row__name { font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.row__name .row__id { color: var(--grey); font-weight: 500; margin-right: 8px; }
.spec { display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 14px; color: var(--grey); margin-top: 3px; }
.spec > span { white-space: nowrap; }
.spec > span:not(:last-child)::after { content: ""; display: inline-block; width: 1px; height: 11px; background: var(--line); margin: 0 9px; vertical-align: -1px; }
.verd { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; font-size: 14px; font-weight: 600; }
.verd::before { content: ""; width: 9px; height: 9px; flex: none; transform: translateY(-1px); border-radius: 1px; }
.verd--works::before { background: var(--green); }
.verd--later::before { border: 1.5px solid var(--green); }
.verd--late::before, .verd--placed::before, .verd--none::before { border: 1.5px solid var(--grey); }
.verd--works { color: var(--green); }
.verd--late, .verd--placed, .verd--none { color: var(--ink); font-weight: 500; }
.row__price { text-align: right; white-space: nowrap; }
.row__wan { font-size: 24px; font-weight: 600; letter-spacing: -.02em; display: block; line-height: 1.1; }
.row__wan small { font-size: 15px; font-weight: 500; margin-left: 1px; font-family: "Menpai Hei", var(--sans); }
.row__unit { font-size: 13px; color: var(--grey); }
.row__open { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); display: grid; place-items: center; transition: border-color .2s var(--ease); }
.row__open:hover { border-color: var(--ink); }
.row__open .ico { transition: transform .3s var(--ease); }
.row__open[aria-expanded="true"] .ico { transform: rotate(180deg); }
.row__limit { margin: 0 12px 14px 64px; font-size: 14px; font-weight: 500; padding: 10px 12px; background: var(--white); border: 1px solid var(--ink); border-radius: var(--r); }
.rows__off { margin-top: 14px; font-size: 14px; color: var(--grey); }
.rows__empty { padding: 28px 0; border-bottom: 1px solid var(--line); }
.rows__empty p + p { margin-top: 6px; color: var(--grey); }
.others { margin-top: 28px; font-size: 15px; color: var(--grey); }
.others button { border: 1px solid var(--line); background: var(--white); border-radius: var(--r); min-height: 40px; padding: 0 12px; margin: 8px 8px 0 0; color: var(--ink); transition: border-color .2s var(--ease); }
.others button:hover { border-color: var(--ink); }

/* The true-listing record (opens in place) */
.rec { padding: 4px 16px 28px 64px; }
.rec__photo { display: none; }
.rec__photo img { width: 100%; height: auto; border-radius: var(--r); aspect-ratio: 3 / 2; object-fit: cover; background: var(--line); }
.rec__v { padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); font-size: 16px; }
.rec__v strong { display: block; font-size: 13px; font-weight: 500; color: var(--grey); margin-bottom: 4px; }
.rec__note { margin-top: 10px; font-size: 14px; font-weight: 500; }
.rec__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; margin-top: 22px; }
.rec__h { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.chk li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 4px 12px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.chk li:last-child { border-bottom: 1px solid var(--line); }
.seal { width: 22px; height: 22px; margin-top: 1px; }
.chk__t { font-weight: 600; font-size: 14px; }
.chk__t [lang] { font-weight: 400; color: var(--grey); margin-left: 4px; }
.chk__f { display: block; color: var(--ink); }
.chk__d { display: block; color: var(--red); font-size: 12px; font-weight: 600; margin-top: 2px; }
.cost { width: 100%; border-collapse: collapse; font-size: 14px; }
.cost th, .cost td { text-align: left; padding: 9px 0; border-top: 1px solid var(--line); vertical-align: baseline; font-weight: 400; }
.cost td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 12px; }
.cost th small { display: block; color: var(--grey); font-size: 12px; }
.cost tr.is-sum th, .cost tr.is-sum td { border-top: 1px solid var(--ink); font-weight: 600; font-size: 15px; }
.cost tr.is-big td { font-size: 22px; letter-spacing: -.02em; }
.rec__tip { font-size: 13px; color: var(--grey); margin-top: 10px; }

/* Route */
.route { padding-bottom: clamp(72px, 10vw, 140px); }
.route__head { max-width: 860px; }
.route__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; margin-top: 36px; align-items: start; }
.route__left { grid-column: 1 / span 6; min-width: 0; }
.route__right { grid-column: 7 / span 6; position: sticky; top: calc(var(--stick) + 24px); min-width: 0; }
.step { padding: 22px 0 26px; border-top: 1px solid var(--ink); transition: opacity .3s var(--ease); }
.step.is-locked .step__h { color: var(--grey); }
.step.is-locked .step__n { border-color: var(--grey); }
.step.is-locked img { opacity: .55; }
.step.is-locked .agent, .step.is-locked .dayer, .step.is-locked .field, .step.is-locked .seg__row { border-style: dashed; }
.step.is-locked .btn { background: var(--mist); color: var(--grey); border-color: var(--line); }
.step__h { display: flex; align-items: center; gap: 12px; font-size: 19px; font-weight: 600; letter-spacing: -.01em; outline-offset: 4px; }
.step__n { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--ink); border-radius: 3px; font-size: 14px; }
.step.is-done .step__n { background: var(--green); border-color: var(--green); color: var(--white); }
.step__note { margin-top: 12px; font-size: 14px; color: var(--grey); }
.step__note.is-bad { color: var(--ink); font-weight: 600; }
.step .back { margin-top: 10px; }
.picked { margin-top: 14px; }
.picked li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.picked__n { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--white); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.picked__s { color: var(--grey); font-size: 13px; display: block; }
.picked button { border: 1px solid var(--line); background: var(--white); border-radius: var(--r); min-height: 36px; padding: 0 10px; font-size: 14px; }
.picked button:hover { border-color: var(--ink); }
.agents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.agent { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); cursor: pointer; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.agent input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.agent picture, .agent img { display: block; width: 100%; }
.agent img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; background: var(--line); margin-bottom: 8px; }
.agent:hover { border-color: var(--grey); }
.agent:has(input:checked) { border-color: var(--green); background: var(--green); color: var(--white); }
.agent:has(input:checked) .agent__f, .agent:has(input:checked) .agent__lic { color: var(--white); }
.agent:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.agent:has(input:disabled) { cursor: not-allowed; background: var(--mist); }
.agent:has(input:disabled) img { opacity: .5; }
.agent__name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.agent__name [lang] { display: block; font-family: "Menpai Hei", sans-serif; font-weight: 400; font-size: 18px; }
.agent__lic { font-size: 12px; color: var(--grey); }
.agent__f { font-size: 13px; color: var(--grey); line-height: 1.35; }
.agent__no { font-size: 13px; font-weight: 600; color: var(--ink); }
.agent__no:empty { display: none; }
.dayer { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 8px; align-items: center; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r); padding: 6px; }
.dayer__b { width: 48px; height: 48px; border: 0; border-radius: 3px; background: var(--mist); display: grid; place-items: center; transition: background-color .2s var(--ease); }
.dayer__b:hover:not(:disabled) { background: var(--line); }
.dayer__b:disabled { color: var(--line); background: var(--white); cursor: not-allowed; }
.dayer__d { text-align: center; font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.dayer__d small { display: block; font-size: 13px; font-weight: 500; color: var(--grey); letter-spacing: 0; }
.times { margin-top: 14px; }
.who { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.who__f { display: flex; flex-direction: column; gap: 6px; }
.steps__go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 22px; }
.steps__go .back { margin-top: 0; }
.legs { margin-top: 14px; }
.legs li { display: grid; grid-template-columns: 30px max-content minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.legs li.is-walk { grid-template-columns: 30px minmax(0, 1fr); color: var(--grey); font-size: 13px; padding: 7px 0; }
.legs li.is-walk::before { content: ""; width: 0; height: 18px; border-left: 2px dashed var(--ink); justify-self: center; align-self: center; }
.legs__t { font-weight: 600; white-space: nowrap; }
.legs__s { color: var(--grey); font-size: 13px; display: block; }
.legs li.legs__empty { display: block; font-size: 14px; color: var(--grey); padding: 12px 0; }
.done { border-top: 1px solid var(--ink); padding-top: 24px; }
.done__h { font-size: clamp(24px, 2.6vw, 34px); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; outline-offset: 4px; }
.done__ref { margin-top: 6px; font-size: 14px; color: var(--grey); }
.done__meet { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 20px; margin-top: 22px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); align-items: center; }
.done__mtext p { font-size: 15px; margin-top: 10px; }
.done__mtext .plate { width: 112px; margin: 3px 3px 0; }
.done__ph img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; background: var(--line); }
.done__dl { margin-top: 20px; }
.done__dl div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.done__dl dt { color: var(--grey); font-size: 14px; }
.done__call { margin: 20px 0 22px; padding: 16px 18px; background: var(--mist); border-radius: var(--r); font-size: 16px; font-weight: 500; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--mist); padding: 56px 0 40px; }
.foot__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; }
.foot__app { grid-column: 1 / span 4; }
.foot__app > p { color: var(--grey); font-size: 15px; margin-top: 8px; max-width: 30em; }
.qr { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.qr__code { width: 132px; height: 132px; flex: none; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.qr figcaption { font-size: 14px; color: var(--grey); max-width: 14em; }
.foot__shops { grid-column: 5 / span 4; }
.shops { margin-top: 14px; }
.shops li { display: flex; flex-direction: column; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.shops__n { font-weight: 600; font-size: 15px; }
.foot__legal { grid-column: 9 / span 4; font-size: 13px; color: var(--grey); }
.foot__co { color: var(--ink); font-size: 14px; font-weight: 500; }
.foot__co [lang] { display: block; }
.foot__lic { margin-top: 12px; line-height: 1.8; }
.foot__fic { margin-top: 16px; color: var(--ink); }

/* Tablet and down */
@media (max-width: 1100px) {
  .filters__panel { grid-template-columns: minmax(170px, 220px) auto minmax(140px, 180px) minmax(0, 1fr); }
  .filters__count { grid-column: 1 / -1; margin-top: 0; }
  .agents { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route__left { grid-column: 1 / span 7; }
  .route__right { grid-column: 8 / span 5; }
}
@media (max-width: 1023px) {
  .door__h { grid-column: 1 / -1; }
  .door__lede { grid-column: 1 / span 9; }
  .rules__main { grid-column: 1 / -1; }
  .hh { grid-column: 1 / -1; position: static; }
  .map__head .h2, .map__head .lede { grid-column: 1 / -1; }
  .flats__main { grid-column: 1 / -1; }
  .peek { display: none; }
  .rec__photo { display: block; margin-bottom: 18px; }
  .route__left, .route__right { grid-column: 1 / -1; }
  .route__right { position: static; }
  .foot__app { grid-column: 1 / span 6; }
  .foot__shops { grid-column: 7 / span 6; }
  .foot__legal { grid-column: 1 / -1; }
}
@media (hover: none) {
  .peek { display: none; }
  .rec__photo { display: block; margin-bottom: 18px; }
  .flats__main { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .door__head, .rules__grid, .map__head, .flats__grid, .route__grid, .foot__grid { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
  .door__head > *, .rules__grid > *, .map__head > *, .flats__grid > *, .route__grid > *, .foot__grid > * { grid-column: 1 / -1; }
  .bar__nav a:not([href="#route"]) { display: none; }
  .fork__cols { display: none; }
  .fork__cols + .pick { border-top: 1px solid var(--ink); }
  .pick { grid-template-columns: 30px minmax(0, 1fr) minmax(0, 1fr); gap: 6px 14px; align-items: start; padding: 16px 12px; }
  .pick__dot { grid-row: 1; margin-top: 6px; }
  .pick__name { grid-column: 2 / -1; }
  .pick__f { grid-column: auto / span 1; font-size: 14px; display: flex; flex-direction: column; }
  .pick__f:nth-of-type(odd) { grid-column: 2; }
  .pick__k { display: block; font-size: 12px; color: var(--grey); }
  .pick.is-on .pick__k { color: var(--white); }
  .filters__sum {
    display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px;
    border: 0; background: none; padding: 0; text-align: left; font-size: 14px; font-weight: 500;
  }
  .filters__sum[aria-expanded="true"] .ico { transform: rotate(180deg); }
  .filters__panel { display: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; padding: 12px 0 8px; max-height: calc(100vh - 70px); overflow-y: auto; }
  .filters.is-open .filters__panel { display: grid; }
  .fl--dob { grid-column: 1 / -1; }
  .seg { grid-column: 1 / -1; }
  .fl--budget { grid-column: 1 / -1; }
  .tog { grid-column: 1 / -1; margin-top: 0; min-height: 44px; }
  .filters__count { grid-column: 1 / -1; }
  .rl__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rl__d { white-space: normal; }
  .chart { aspect-ratio: 1 / 1; }
  .map__frame--route .chart { aspect-ratio: 1 / 1; }
  .row__head { grid-template-columns: 44px 92px minmax(0, 1fr) 44px; gap: 10px 12px; padding: 14px 4px 14px 0; align-items: start; }
  .row__spec { grid-column: 1 / -1; grid-row: 2; }
  .row__price { grid-column: 3; grid-row: 1; align-self: center; }
  .row__open { grid-column: 4; grid-row: 1; align-self: center; }
  .tick { align-self: center; }
  .row__limit { margin: 0 4px 14px; }
  .rec { padding: 4px 4px 24px; }
  .rec__grid { grid-template-columns: minmax(0, 1fr); }
  .agents { grid-template-columns: minmax(0, 1fr); }
  .agent { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 2px 14px; align-items: start; }
  .agent picture { grid-row: 1 / span 6; }
  .agent img { margin-bottom: 0; }
  .who { grid-template-columns: minmax(0, 1fr); }
  .legs li { grid-template-columns: 30px minmax(0, 1fr); gap: 2px 12px; }
  .legs li > span:not(.picked__n) { grid-column: 2; }
  .done__meet { grid-template-columns: minmax(0, 1fr); }
  .done__ph { max-width: 220px; }
  .done__dl div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .foot__app, .foot__shops, .foot__legal { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .bar__in { gap: 12px; }
  .bar__city { padding-left: 12px; font-size: 13px; }
  .bar__city [data-i18n] { display: none; }
}
@media (max-width: 420px) {
  .bar__in { gap: 10px; }
  .bar__city { padding-left: 10px; }
  .bar__nav [data-i18n="nav.route"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lang__b { min-width: 44px; padding: 0 8px; }
  .bar__nav { gap: 12px; }
  .door__lede { grid-column: 1 / -1; }
  .lane img { height: 260px; }
  .pick__zh { font-size: 22px; }
  .plate__no { font-size: 19px; }
  .row__wan { font-size: 21px; }
  .row__head { grid-template-columns: 44px 84px minmax(0, 1fr) 44px; }
}

@media (max-width: 360px) {
  .bar__city { display: none; }
  .mark__word { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
