/* yeojido unique components (design M002.P023.T017) — step 2: record timeline (4), taxi address card (2), open-now dong diagram (3).
   Additive; load after site.css and provenance.css. Existing tokens only (design-tokens.css); the taxi card is the one place with
   fixed #fff / #000 (it is read by a driver, in light and dark alike). No webfont, no image, no external request. */

/* ============ 4. record timeline (.rec) — home section and inside the 검증·변경 이력 dialog ============ */
.rec-lead{margin:calc(var(--s2) * -1) 0 var(--s5);max-width:40em;font-size:15px;color:var(--ink-2)}
.rec{position:relative;display:grid;gap:var(--s2);max-width:760px;margin:0;padding:0 0 0 30px;list-style:none}
/* one vertical line in the brand purple-to-red, from the first dot to the last */
.rec::before{content:"";position:absolute;left:10px;top:22px;bottom:22px;width:2px;border-radius:2px;background:linear-gradient(180deg,#9349ff,#ff3a4e)}
.rec-pt{position:relative;min-width:0}
.rec-pt[hidden]{display:none}
/* one dot per point, centred on the line, level with the first text line */
.rec-pt::before{content:"";position:absolute;z-index:1;left:-25px;top:17px;width:10px;height:10px;border-radius:50%;background:var(--surface);box-shadow:0 0 0 2px #9349ff}
/* the first public release: a larger filled dot */
.rec-pt--key::before{left:-28px;top:14px;width:16px;height:16px;background:var(--brand-grad);box-shadow:0 0 0 3px var(--bg),0 0 0 5px #9349ff}
.pv-dlg .rec-pt--key::before{box-shadow:0 0 0 3px var(--surface),0 0 0 5px #9349ff}
/* the line stops at the last visible dot: a strip of the page colour covers it below that dot */
.rec-pt:last-child::after,.rec-pt:has(+ .rec-pt[hidden])::after{content:"";position:absolute;left:-23px;top:30px;bottom:-2px;width:6px;background:var(--bg)}
.pv-dlg .rec-pt:last-child::after,.pv-dlg .rec-pt:has(+ .rec-pt[hidden])::after{background:var(--surface)}

/* the row: the whole row is the summary (tap target), at least 44px; mobile stacks date / title / hash */
.rec-row{display:grid;grid-template-columns:minmax(0,1fr) 24px;grid-template-areas:"date chev" "title chev" "hash chev";align-items:center;gap:2px var(--s3);min-height:44px;padding:9px 12px 9px 14px;border-radius:var(--r-sm);background:var(--surface);box-shadow:var(--shadow-1);color:var(--ink);list-style:none;cursor:pointer}
.rec-row::-webkit-details-marker{display:none}
.rec-row::marker{content:""}
.rec-row--static{cursor:default}
.rec-date{grid-area:date;font-size:13px;font-weight:800;letter-spacing:.01em;color:var(--cat-fg);font-variant-numeric:tabular-nums}
.rec-t{grid-area:title;min-width:0;font-size:16px;font-weight:700;line-height:1.4;overflow-wrap:anywhere}
.rec-row>.pv-hash{grid-area:hash;justify-self:start;margin-top:2px}
.rec-chev{grid-area:chev;width:20px;height:20px;color:var(--ink-2);transition:transform .2s var(--ease)}
.rec-d[open]>.rec-row .rec-chev{transform:rotate(180deg)}
.rec-d[open]>.rec-row{border-radius:var(--r-sm) var(--r-sm) 0 0;box-shadow:none;background:var(--surface-tint)}
.rec-d[open]>.rec-row>.pv-hash{background:var(--surface)}
.rec-pt--key .rec-t{font-size:17px;font-weight:800}
.rec-row:hover{box-shadow:var(--shadow-1),inset 0 0 0 1.5px var(--btn-line)}
.rec-row--static:hover{box-shadow:var(--shadow-1)}
.rec-row:focus-visible{outline:3px solid #9349ff;outline-offset:2px}
@media (min-width:768px){
  .rec-row{grid-template-columns:7.2em minmax(0,1fr) auto 24px;grid-template-areas:"date title hash chev";gap:var(--s3)}
  .rec-row>.pv-hash{margin-top:0}
}

/* evidence: dl rows like the provenance dialog (dd row-gap 8px so a 44px link never covers the hash below; 64-char hash is a rounded box) */
.rec-ev{padding:4px 14px 12px;border-radius:0 0 var(--r-sm) var(--r-sm);background:var(--surface-tint);font-size:15px}
.rec-ev dl>div{display:grid;grid-template-columns:minmax(0,1fr);gap:4px;padding:10px 0;box-shadow:inset 0 -1px 0 var(--line)}
.rec-ev dl>div:last-child{box-shadow:none}
.rec-ev dt{font-size:13px;color:var(--ink-2)}
.rec-ev dd{display:flex;flex-wrap:wrap;align-items:center;gap:8px 8px;min-width:0;overflow-wrap:anywhere;color:var(--ink)}
.rec-ev dd a{display:inline-flex;align-items:center;min-height:44px;min-width:44px;margin-block:-7px;color:var(--cat-fg);font-weight:700;text-underline-offset:3px}
.rec-ev .pv-hash{background:var(--surface)}
.rec-ev .pv-hash-long{display:block;flex:1 1 100%;max-width:100%;padding:6px 10px;border-radius:var(--r-sm);line-height:1.5}
@media (min-width:768px){.rec-ev dl>div{grid-template-columns:minmax(0,9.5em) minmax(0,1fr);gap:12px}}

/* "전체 기록 보기": shown only with JS; without JS every point is listed */
.rec-more{margin-top:var(--s4)}
html:not(.js) .rec-more{display:none}

/* in the dialog: flat rows on the dialog surface */
.pv-dlg-body .rec{margin-top:var(--s2)}
.pv-dlg-body .rec-row{background:var(--surface);box-shadow:inset 0 0 0 1px var(--line)}
.pv-dlg-body .rec-row:hover{box-shadow:inset 0 0 0 1.5px var(--btn-line)}

/* ============ 2. taxi address card ============ */
.tx-btn svg{width:18px;height:18px}
/* en / zh / ja: the first and largest thing in the address row */
.tx-lead{display:flex;width:100%;min-height:56px;margin:0 0 var(--s3);padding:8px 16px;justify-content:flex-start;gap:12px;white-space:normal;text-align:left;line-height:1.25}
.tx-lead svg{width:24px;height:24px}
.tx-lead-t{display:grid;gap:2px}
.tx-lead-t b{font-size:16px;font-weight:800}
.tx-lead-t small{font-size:13px;font-weight:600;opacity:1}
html:not(.js) .tx-btn,html:not(.js) .tx-lead{display:none}

/* the card: full screen, white with black type in every theme */
.tx-dlg{position:fixed;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;margin:0;padding:0;border:0;background:#fff;color:#000;color-scheme:light;overflow:auto}
.tx-dlg[open]{display:flex;flex-direction:column}
.tx-dlg::backdrop{background:#fff}
.tx-top{display:flex;justify-content:flex-end;padding:max(12px,env(safe-area-inset-top)) 12px 0}
.tx-x{display:inline-flex;align-items:center;gap:6px;min-height:48px;min-width:48px;padding:0 16px;border:2px solid #000;border-radius:14px;background:#fff;color:#000;font:inherit;font-size:17px;font-weight:800;cursor:pointer}
.tx-x svg{width:20px;height:20px}
.tx-x:focus-visible{outline:3px solid #000;outline-offset:3px}
.tx-card{flex:1 0 auto;display:flex;flex-direction:column;justify-content:center;gap:18px;width:100%;max-width:960px;margin:0 auto;padding:16px 24px max(32px,env(safe-area-inset-bottom))}
.tx-addr{font-size:clamp(28px,8.4vw,36px);line-height:1.32;font-weight:800;letter-spacing:-.01em;word-break:keep-all;overflow-wrap:anywhere}
.tx-name{font-size:26px;line-height:1.3;font-weight:800;overflow-wrap:anywhere}
.tx-stn{font-size:24px;line-height:1.3;font-weight:700}
.tx-ask{margin-top:6px;padding-top:16px;border-top:2px solid #000;font-size:22px;line-height:1.4;font-weight:700;word-break:keep-all}

/* ============ 3. open now (dong diagram + list) ============ */
.on-lead{margin:calc(var(--s2) * -1) 0 var(--s5);max-width:40em;font-size:15px;color:var(--ink-2)}
.on-grid{display:grid;gap:var(--s5)}
@media (min-width:1024px){.on-grid{grid-template-columns:minmax(0,520px) minmax(0,1fr);align-items:start;gap:var(--s8)}}
.on-map{position:relative;width:100%;max-width:520px;aspect-ratio:10/8;border-radius:var(--r-lg);background:var(--surface);box-shadow:var(--shadow-1);overflow:hidden}
.on-map>svg{position:absolute;inset:0;width:100%;height:100%}
.on-river{fill:var(--surface-tint)}
.on-link{fill:none;stroke:var(--line);stroke-width:2;stroke-dasharray:4 5}
.on-dong{position:absolute;display:grid;place-content:center;justify-items:center;gap:1px;width:72px;height:72px;margin:-36px 0 0 -36px;padding:0;border:0;border-radius:50%;background:var(--surface-tint);box-shadow:inset 0 0 0 2px #9349ff;color:var(--cat-fg);font:inherit;cursor:pointer}
.on-n{font-size:24px;line-height:1;font-weight:800;font-variant-numeric:tabular-nums}
.on-dn{font-size:12px;line-height:1.2;font-weight:700;white-space:nowrap}
html:not(:lang(ko)) .on-dn{font-size:11px;letter-spacing:-.02em}
.on-dong:hover{background:var(--btn-soft-hover)}
.on-dong[aria-pressed="true"]{background:var(--pressed-bg);color:var(--pressed-fg);box-shadow:0 0 0 3px var(--surface),0 0 0 5px #9349ff}
.on-dong:focus-visible{outline:3px solid #9349ff;outline-offset:3px}
/* zero now: dimmed (dashed ring, secondary ink, not pressable) */
@media (min-width:1024px){.on-dong{width:84px;height:84px;margin:-42px 0 0 -42px}.on-n{font-size:28px}.on-dn{font-size:13px}}
.on-dong:disabled{background:var(--surface);box-shadow:none;border:1.5px dashed var(--btn-line);color:var(--ink-3);cursor:default}
.on-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--s2);margin-bottom:var(--s3)}
.on-sum{font-size:16px;font-weight:800}
.on-list{display:grid;gap:var(--s2);margin:0;padding:0;list-style:none}
.on-row{display:flex;flex-wrap:wrap;align-items:center;gap:4px var(--s3);min-height:56px;padding:8px 16px;border-radius:var(--r-md);background:var(--surface);box-shadow:var(--shadow-1);color:var(--ink);text-decoration:none}
.on-row:hover .on-name{text-decoration:underline}
.on-row:focus-visible{outline:3px solid #9349ff;outline-offset:2px}
.on-cat{flex:none;font-size:12px;font-weight:800;color:var(--cat-fg)}
.on-name{flex:1 1 6em;min-width:0;font-size:16px;font-weight:700;overflow-wrap:anywhere}
.on-row .pill{flex:none;margin-left:auto;font-size:12px}
.on-empty{padding:var(--s4);border-radius:var(--r-md);background:var(--surface);color:var(--ink-2);font-size:15px}
.on-foot{margin-top:var(--s3);font-size:13px;color:var(--ink-2)}
.on-more{margin-top:var(--s3)}
html:not(.js) .on-sec{display:none}
