/* 노선 데이터 작업대 · 가람시(가상) GTFS 구축 시연 */
:root {
  --bg: #F2F0EA;
  --surface: #FFFFFF;
  --surface-2: #F8F7F3;
  --text: #16181B;
  --muted: #595E65;
  --line: #D8D3C8;
  --grid: rgba(22, 24, 27, .055);
  --head: #15171B;
  --ink: #2B2F36;
  --primary: #0B6E7F;
  --primary-ink: #075563;
  --primary-soft: #E1EFF1;
  --accent: #D9480F;
  --accent-ink: #A63A0B;
  --accent-soft: #FCEBE1;
  --ok: #2B7A3D;
  --ok-soft: #E4F2E7;
  --warn: #8F5400;
  --warn-soft: #FBF0D9;
  --danger: #B42318;
  --danger-soft: #FDE8E6;
  --r: 4px;
  --body: "Pretendard Variable", "Pretendard", system-ui, sans-serif;
  --display: "Overpass", "Pretendard Variable", system-ui, sans-serif;
  --mono: "Overpass Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body.tr {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
:where(.tr) button, :where(.tr) input, :where(.tr) select { font: inherit; color: inherit; }
:where(.tr) button { cursor: pointer; }
:where(.tr) a { color: var(--primary-ink); }
.tr :focus-visible { outline: 3px solid rgba(11, 110, 127, .4); outline-offset: 2px; }
.tr [hidden] { display: none !important; }
.tr-sprites { position: absolute; width: 0; height: 0; overflow: hidden; }
.tr-mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tr-muted { color: var(--muted); }
.tr-accent { color: var(--accent-ink); }

/* 안내 띠 · 머리 */
.tr-band { height: 28px; display: flex; align-items: center; justify-content: center; padding: 0 12px; background: #E6E2D8; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-top { background: var(--head); color: #fff; }
.tr-top__inner { max-width: 1200px; margin: 0 auto; padding: 10px 16px 0; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand reset" "nav nav"; gap: 8px 12px; align-items: center; }
.tr-brand { grid-area: brand; display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; min-width: 0; flex-wrap: wrap; }
.tr-brand__mark { width: 30px; height: 30px; flex: none; }
.tr-brand__name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.tr-env { padding: 2px 8px; border-radius: 3px; background: rgba(255,255,255,.12); font-size: 12px; font-weight: 600; color: #F6C9B4; }
.tr-reset { grid-area: reset; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid rgba(255,255,255,.28); border-radius: var(--r); background: transparent; color: #fff; font-size: 13px; font-weight: 600; }
.tr-reset:hover { background: rgba(255,255,255,.1); }
.tr-nav { grid-area: nav; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.tr-nav::-webkit-scrollbar { display: none; }
.tr-nav__item { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: rgba(255,255,255,.72); text-decoration: none; font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; }
:where(.tr) .tr-nav__item { color: rgba(255,255,255,.72); }
.tr-nav__item:hover { color: #fff; }
.tr-nav__item.is-active { color: #fff; border-bottom-color: var(--accent); }
@media (min-width: 900px) {
  .tr-top__inner { grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav reset"; padding: 0 24px; gap: 24px; }
  .tr-nav { margin: 0; padding: 0; align-self: stretch; }
  .tr-nav__item { min-height: 56px; }
}

/* 처리 단계(노선도 모양) */
.tr-line-wrap { background: var(--surface); border-bottom: 1px solid var(--line); }
.tr-line { position: relative; max-width: 1200px; margin: 0 auto; padding: 18px 8px 10px; list-style: none; display: flex; }
.tr-line::before { content: ""; position: absolute; left: calc(8px + (100% - 16px) / 12); right: calc(8px + (100% - 16px) / 12); top: 25px; height: 4px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 12px); }
.tr-stop { flex: 1 1 0; min-width: 0; position: relative; }
.tr-stop__link { display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--muted); padding-bottom: 2px; min-height: 44px; }
.tr-stop__dot { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); position: relative; z-index: 1; transition: background .3s, border-color .3s; }
.tr-stop__num { display: none; }
.tr-stop__label { font-size: 12px; font-weight: 700; white-space: nowrap; }
.tr-stop.is-done .tr-stop__dot { background: var(--primary); border-color: var(--primary); }
.tr-stop.is-done .tr-stop__dot::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tr-stop.is-done .tr-stop__link { color: var(--primary-ink); }
.tr-stop.is-here .tr-stop__dot { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.tr-stop.is-here .tr-stop__link { color: var(--text); }
.tr-stop.is-todo .tr-stop__dot { border-color: var(--ink); }
.tr-stop.is-todo .tr-stop__link { color: var(--text); }
.tr-line__train { position: absolute; left: 0; top: 0; width: 26px; height: 12px; border-radius: 6px 6px 3px 3px; background: var(--accent); transform: translate(-50%, -165%); opacity: 0; pointer-events: none; }
.tr-line__train::before { content: ""; position: absolute; left: 5px; right: 5px; top: 3px; height: 3px; border-radius: 1px; background: #fff; opacity: .9; }
.tr-line__train.is-on { opacity: 1; }
@media (min-width: 700px) {
  .tr-line { padding: 20px 24px 12px; }
  .tr-line::before { left: calc(24px + (100% - 48px) / 12); right: calc(24px + (100% - 48px) / 12); top: 27px; }
  .tr-stop__link { grid-template-columns: auto; }
  .tr-stop__label { font-size: 13px; }
  .tr-stop__num { display: inline; font-family: var(--mono); font-size: 11px; color: var(--muted); }
}

/* 본문 */
.tr-main { max-width: 1200px; margin: 0 auto; padding: 20px 16px 132px; }
@media (min-width: 900px) { .tr-main { padding: 28px 24px 132px; } }
.tr-eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.tr-h1 { margin: 0; font-size: 24px; line-height: 1.3; letter-spacing: -.03em; font-weight: 800; }
.tr-h2 { margin: 0; font-size: 19px; line-height: 1.35; letter-spacing: -.02em; font-weight: 800; }
.tr-h3 { margin: 0; font-size: 15px; letter-spacing: -.01em; font-weight: 800; }
.tr-lead { margin: 8px 0 0; color: var(--muted); max-width: 720px; }
.tr-help { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.tr-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.tr-link { font-weight: 700; }
@media (min-width: 900px) { .tr-h1 { font-size: 30px; } .tr-h2 { font-size: 21px; } }

.tr-head { display: grid; gap: 14px; margin-bottom: 18px; }
@media (min-width: 900px) { .tr-head { grid-template-columns: 1fr auto; align-items: end; } }
.tr-head__act { display: flex; gap: 8px; flex-wrap: wrap; }

.tr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--r); border: 1px solid transparent; font-weight: 700; font-size: 14.5px; text-decoration: none; white-space: nowrap; }
.tr-btn--primary { background: var(--primary); color: #fff; }
:where(.tr) a.tr-btn--primary { color: #fff; }
.tr-btn--primary:hover { background: var(--primary-ink); }
.tr-btn--primary:disabled { background: #B9C9CC; cursor: default; }
.tr-btn--ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
:where(.tr) a.tr-btn--ghost { color: var(--text); }
.tr-btn--ghost:hover { border-color: var(--ink); }
.tr-btn--small { min-height: 34px; padding: 0 12px; font-size: 13px; background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.tr-btn--small:disabled { opacity: .5; }

.tr-kpis { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tr-kpis li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; }
.tr-kpi__num { font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.tr-kpi__label { font-size: 12.5px; color: var(--muted); }
@media (min-width: 900px) { .tr-kpis { grid-template-columns: repeat(4, 1fr); gap: 12px; } .tr-kpi__num { font-size: 30px; } }

.tr-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.tr-pill.is-ok { background: var(--ok-soft); color: var(--ok); }
.tr-pill.is-warn { background: var(--warn-soft); color: var(--warn); }
.tr-pill.is-info { background: var(--primary-soft); color: var(--primary-ink); }
.tr-pill.is-wait { background: #ECEAE4; color: var(--muted); }
.tr-pill.is-timetable { background: #E7E8EA; color: var(--ink); }
.tr-pill.is-measured { background: var(--primary-soft); color: var(--primary-ink); }
.tr-pill.is-estimated { background: var(--accent-soft); color: var(--accent-ink); }
.tr-tag { display: inline-block; padding: 1px 7px; border: 1px dashed var(--muted); border-radius: 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tr-chip { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }

.tr-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tr-table th { text-align: left; font-weight: 700; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 7px 10px; white-space: nowrap; font-size: 12px; }
.tr-table td { padding: 7px 10px; border-bottom: 1px solid #ECE8DF; vertical-align: top; }
.tr-table.tr-mono td, .tr-table--csv td { white-space: nowrap; }
.tr-table tr.is-flag td { background: var(--warn-soft); }

/* 단계 카드 */
.tr-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 16px; }
@media (min-width: 900px) { .tr-step { padding: 22px 24px; } }
.tr-step__head { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; margin-bottom: 14px; }
.tr-step__head > .tr-state { grid-column: 2; justify-self: start; }
@media (min-width: 760px) { .tr-step__head { grid-template-columns: auto 1fr auto; } .tr-step__head > .tr-state { grid-column: 3; grid-row: 1; justify-self: end; } }
.tr-step__no { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--ink); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 15px; line-height: 1; padding-top: 2px; }
.tr-step.is-run .tr-step__no, #collect .tr-step__no { border-color: var(--primary); background: var(--primary); color: #fff; }
.tr-state { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: #ECEAE4; color: var(--muted); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.tr-state.is-done { background: var(--ok-soft); color: var(--ok); }
.tr-step__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; }
.tr-step__foot .tr-help { margin: 0; }

.tr-sources { display: grid; gap: 12px; }
@media (min-width: 980px) { .tr-sources { grid-template-columns: 1fr 1fr; } }
.tr-src { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-width: 0; background: var(--surface-2); }
.tr-src__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.tr-src__meta { margin: 4px 0 8px; font-size: 12px; color: var(--muted); }
.tr-src .tr-table { background: var(--surface); font-size: 12px; }

.tr-checks4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
@media (min-width: 760px) { .tr-checks4 { grid-template-columns: repeat(4, 1fr); } }
.tr-check4 { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 2px; background: var(--surface); }
.tr-check4__label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.tr-check4__num { font-family: var(--display); font-size: 22px; font-weight: 800; }
.tr-check4__sub { font-size: 11.5px; color: var(--muted); }
.tr-check4.is-done { border-color: #BFDCC6; }
.tr-check4.is-done .tr-check4__num { color: var(--ok); }

.tr-table--wide { min-width: 1000px; }
.tr-table--wide td:nth-child(-n+3) { white-space: nowrap; }
.tr-only-m { display: inline; }
@media (min-width: 760px) { .tr-only-m { display: none; } }
.tr-step:not(.is-run) [data-after] { display: none; }
.tr-step.is-run [data-before] { display: none; }
.tr-conv td[data-after] { transition: opacity .3s; }
.tr-step.is-run .tr-conv:not(.is-shown) td[data-after] { opacity: 0; }
.tr-step.is-run .tr-conv.is-bad.is-shown td { background: var(--warn-soft); }

.tr-cands { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 900px) { .tr-cands { grid-template-columns: 1fr 1fr; } }
.tr-cand { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; gap: 6px; background: var(--surface-2); transition: border-color .3s, background .3s; }
.tr-cand > .tr-pill { justify-self: start; }
.tr-cand__pair { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.tr-cand__pair .tr-mono { font-size: 12px; color: var(--muted); }
.tr-cand__why { margin: 0; font-size: 13px; color: var(--muted); }
.tr-step.is-run .tr-cand:not(.is-shown) [data-after] { opacity: 0; }
.tr-step.is-run .tr-cand.is-shown[data-decision="merge"], .tr-step.is-run .tr-cand.is-shown[data-decision="station"], .tr-step.is-run .tr-cand.is-shown[data-decision="ars"] { border-color: #BFDCC6; background: #F6FBF7; }
.tr-result { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.tr-result__line { margin: 0; font-size: 14.5px; }

/* 소요시간 지도 */
.tr-mapbar { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.tr-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; max-width: 100%; }
.tr-seg__btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; min-width: 72px; padding: 4px 12px; border: 0; border-right: 1px solid var(--line); background: transparent; font-weight: 700; font-size: 14px; color: var(--text); text-decoration: none; line-height: 1.2; }
:where(.tr) a.tr-seg__btn { color: var(--text); }
.tr-seg__btn:last-child { border-right: 0; }
.tr-seg__btn small { font-size: 10.5px; font-weight: 400; color: var(--muted); }
.tr-seg__btn.is-on { background: var(--head); color: #fff; }
:where(.tr) a.tr-seg__btn.is-on { color: #fff; }
.tr-seg__btn.is-on small { color: rgba(255,255,255,.7); }
.tr-seg--small .tr-seg__btn { min-width: 0; font-size: 13px; }

.tr-mapgrid { display: grid; gap: 12px; margin-bottom: 20px; }
@media (min-width: 980px) { .tr-mapgrid { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; } }
.tr-mapbox { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-width: 0; }
.tr-mapbox figcaption { margin-top: 8px; }
.tr-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; font-size: 12.5px; font-weight: 600; }
.tr-legend.is-hidden { visibility: hidden; }
.tr-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.tr-key { display: inline-block; width: 28px; height: 6px; border-radius: 3px; }
.tr-key--timetable { background: var(--ink); }
.tr-key--measured { background: var(--primary); }
.tr-key--estimated { background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 12px); }
.tr-mapscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 3px; background: #FBFAF6; }
.tr-svg { display: block; width: 100%; min-width: 700px; height: auto; font-family: var(--body); }
@media (min-width: 760px) { .tr-svg { min-width: 0; } }
.tr-river { fill: none; stroke: #D3E6EC; stroke-width: 30; stroke-linecap: round; }
.tr-river__label { font-size: 13px; font-style: italic; fill: #6F9AA8; font-weight: 600; }
.tr-sg { cursor: pointer; }
.tr-sg__line { fill: none; stroke-width: 7; stroke-linecap: round; transition: stroke .25s, stroke-width .2s; }
.tr-sg.is-rail .tr-sg__line { stroke-width: 9; }
.tr-sg__hit { stroke: transparent; stroke-width: 24; stroke-linecap: round; pointer-events: stroke; }
.is-basis .tr-sg.is-timetable .tr-sg__line { stroke: var(--ink); }
.is-basis .tr-sg.is-measured .tr-sg__line { stroke: var(--primary); }
.is-basis .tr-sg.is-estimated .tr-sg__line { stroke: var(--accent); }
.is-route .tr-sg .tr-sg__line { stroke: var(--route); }
.tr-sg.is-estimated .tr-sg__line { stroke-dasharray: 11 8; stroke-linecap: butt; }
.tr-sg.is-sel .tr-sg__line { stroke-width: 12; }
.tr-sg.is-rail.is-sel .tr-sg__line { stroke-width: 13; }
.tr-sg:hover .tr-sg__line { stroke-width: 10; }
.tr-sg__badge rect { fill: #fff; stroke: var(--line); stroke-width: 1; }
.tr-sg__badge text { font-family: var(--mono); font-size: 11px; font-weight: 600; fill: var(--text); text-anchor: middle; }
.tr-sg.is-estimated .tr-sg__badge rect { fill: var(--accent-soft); stroke: var(--accent); }
.tr-sg.is-estimated .tr-sg__badge text { fill: var(--accent-ink); }
.tr-sg.is-sel .tr-sg__badge rect { fill: var(--head); stroke: var(--head); }
.tr-sg.is-sel .tr-sg__badge text { fill: #fff; }
.tr-busstop { fill: #fff; stroke: var(--route); stroke-width: 2.5; pointer-events: none; }
.tr-station, .tr-xfer { fill: #fff; stroke: var(--head); stroke-width: 3; pointer-events: none; }
.tr-lbl { font-size: 13.5px; font-weight: 800; fill: var(--text); paint-order: stroke; stroke: #FBFAF6; stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.tr-lbl--bus { font-size: 11.5px; font-weight: 600; fill: var(--muted); }
.tr-routechips text { font-size: 12px; font-weight: 800; }

.tr-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
@media (min-width: 980px) { .tr-panel { position: sticky; top: 16px; } }
.tr-panel__title { margin: 0 0 8px; font-size: 19px; letter-spacing: -.02em; }
.tr-panel__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.tr-panel__table th[scope="row"] { background: transparent; color: var(--text); font-weight: 600; font-size: 12.5px; white-space: normal; }
.tr-panel__table th.is-hl, .tr-panel__table td.is-hl { background: var(--primary-soft); color: var(--primary-ink); }
.tr-panel__why { margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.tr-panel__why b { color: var(--text); margin-right: 4px; }
.tr-formula { margin-top: 12px; padding: 12px; background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 var(--r) var(--r) 0; }
.tr-formula__title { margin: 0 0 4px; font-weight: 800; font-size: 13.5px; color: var(--accent-ink); }
.tr-formula__steps { margin: 0; padding-left: 18px; font-size: 12.5px; display: grid; gap: 3px; }
.tr-formula__foot { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

.tr-block { margin-top: 28px; }
.tr-block__sub { margin: 22px 0 8px; }
.tr-routes { display: grid; gap: 8px; margin-top: 12px; }
@media (min-width: 900px) { .tr-routes { grid-template-columns: 1fr 1fr; align-items: start; } }
.tr-route { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tr-route summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 12px; cursor: pointer; list-style: none; }
.tr-route summary::-webkit-details-marker { display: none; }
.tr-route summary::after { content: "+"; margin-left: 4px; font-weight: 800; color: var(--muted); }
.tr-route[open] summary::after { content: "−"; }
.tr-route__name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; }
.tr-route__est { font-size: 12px; color: var(--muted); }
.tr-seglist { list-style: none; margin: 0; padding: 0 8px 8px; }
.tr-seglist__btn { width: 100%; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px; border: 0; border-top: 1px solid #ECE8DF; background: transparent; text-align: left; font-size: 13.5px; }
.tr-seglist__btn:hover { background: var(--surface-2); }
.tr-seglist__btn.is-sel { background: var(--primary-soft); }
.tr-seglist__min { font-size: 12.5px; }

/* GTFS 표 */
.tr-feed { display: grid; gap: 12px; }
@media (min-width: 980px) { .tr-feed { grid-template-columns: 230px minmax(0, 1fr); align-items: start; } }
.tr-files { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.tr-files__group { display: none; }
.tr-file { flex: none; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; font-size: 13px; }
:where(.tr) a.tr-file { color: var(--text); }
.tr-file__n { font-size: 11.5px; color: var(--muted); }
.tr-file.is-on { background: var(--head); border-color: var(--head); }
:where(.tr) a.tr-file.is-on { color: #fff; }
.tr-file.is-on .tr-file__n { color: rgba(255,255,255,.65); }
@media (min-width: 980px) {
  .tr-files { flex-direction: column; overflow: visible; position: sticky; top: 16px; }
  .tr-files__group { display: block; margin: 8px 0 2px; font-size: 12px; font-weight: 700; color: var(--muted); }
  .tr-files__group:first-child { margin-top: 0; }
}
.tr-preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.tr-preview__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.tr-preview__head > div { flex: 1 1 320px; }
.tr-preview .tr-seg { margin-bottom: 12px; }
.tr-preview__sub { margin: 16px 0 6px; font-size: 13.5px; }
.tr-csvbox { border: 1px solid var(--line); border-radius: 3px; background: #FBFAF7; margin-bottom: 6px; }
.tr-table--csv { font-size: 12.5px; }
.tr-table--csv th { font-family: var(--mono); font-weight: 600; font-size: 12px; }
.tr-table--csv th.is-hl { background: var(--primary-soft); color: var(--primary-ink); }
.tr-table--csv td.is-hl { background: #EEF6F7; }
.tr-table--csv td.is-est { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }

/* 검증·납품 */
.tr-validator { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--ok); border-radius: var(--r); padding: 16px; }
@media (min-width: 900px) { .tr-validator { grid-template-columns: auto 1fr; align-items: start; padding: 20px 24px; gap: 24px; } }
.tr-validator__nums { display: grid; grid-template-columns: repeat(3, auto); gap: 8px; justify-content: start; }
@media (min-width: 900px) { .tr-validator__nums { grid-template-columns: 1fr; } }
.tr-vnum { padding: 8px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.tr-vnum__n { font-family: var(--display); font-weight: 600; font-size: 13px; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.tr-vnum__n b { font-size: 24px; font-weight: 800; margin-left: 4px; color: var(--text); letter-spacing: 0; }
.tr-vnum.is-ok { background: var(--ok-soft); border-color: #BFDCC6; }
.tr-vnum.is-ok b { color: var(--ok); }
.tr-vnum.is-warn b { color: var(--warn); }
.tr-validator__text .tr-help:first-of-type { margin-bottom: 10px; }
.tr-vnotice { margin: 10px 0 0; font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tr-vnotice code { font-size: 12.5px; background: var(--surface-2); padding: 1px 6px; border-radius: 3px; }

.tr-checklist { list-style: none; margin: 12px 0 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tr-checklist__row { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 10px 14px; border-top: 1px solid #ECE8DF; }
.tr-checklist__row:first-child { border-top: 0; }
.tr-checklist__mark { grid-row: span 2; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 800; color: var(--ok); }
.tr-checklist__mark.is-bad { color: var(--danger); }
.tr-checklist__label { font-size: 14px; font-weight: 600; }
.tr-checklist__detail { font-size: 12px; color: var(--muted); }
@media (min-width: 760px) { .tr-checklist__row { grid-template-columns: 70px 1fr auto; } .tr-checklist__mark { grid-row: auto; } }

.tr-cards-table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tr-table--cards tr.is-gap td { background: var(--warn-soft); }
@media (max-width: 759px) {
  .tr-cards-table { background: transparent; border: 0; }
  .tr-table--cards thead { display: none; }
  .tr-table--cards, .tr-table--cards tbody, .tr-table--cards tr, .tr-table--cards td { display: block; width: 100%; }
  .tr-table--cards tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; padding: 6px 0; }
  .tr-table--cards tr.is-gap { border-color: #E9C98E; }
  .tr-table--cards td { display: grid; grid-template-columns: 92px 1fr; gap: 8px; border: 0; padding: 4px 12px; }
  .tr-table--cards td::before { content: attr(data-label); font-size: 12px; font-weight: 700; color: var(--muted); }
  .tr-table--cards tr.is-gap td { background: transparent; }
}

.tr-ratio { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.tr-ratio__bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--line); }
.tr-ratio__bar .is-real { background: var(--primary); }
.tr-ratio__bar .is-est { background: repeating-linear-gradient(135deg, var(--accent) 0 6px, #F08A5D 6px 10px); }
.tr-ratio__text { margin: 10px 0 0; font-size: 13px; }
.tr-ratio__routes { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }

.tr-deliver { list-style: none; margin: 12px 0 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.tr-deliver__row { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 12px 14px; border-top: 1px solid #ECE8DF; }
.tr-deliver__row:first-child { border-top: 0; }
.tr-deliver__row > svg { color: var(--primary); grid-row: span 2; align-self: start; margin-top: 2px; }
.tr-deliver__name { font-weight: 700; font-size: 14px; }
.tr-deliver__meta { grid-column: 2; font-size: 12.5px; color: var(--muted); }
.tr-deliver__act { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tr-deliver__row.is-plan > svg { color: var(--muted); }
@media (min-width: 900px) {
  .tr-deliver__row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .tr-deliver__act { grid-column: 3; grid-row: 1 / span 2; margin: 0; }
}
.tr-deliver__files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px 44px; border-top: 0; }
.tr-deliver__files span { font-size: 12px; padding: 3px 8px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; }
.tr-deliver__files span.is-shown { opacity: 1; transform: none; }
.tr-deliver__files small { color: var(--muted); }

.tr-term { margin-top: 12px; background: var(--head); color: #E9E6DE; border-radius: var(--r); overflow: hidden; }
.tr-term__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.tr-term__log { list-style: none; margin: 0; padding: 10px 14px 14px; font-size: 12.5px; display: grid; gap: 6px; }
.tr-term__line { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; transition: opacity .25s; }
.tr-term__step { color: #8FD3DE; font-weight: 600; }
.tr-term__text { grid-column: 1; color: #CFCBC2; }
.tr-term__ok { grid-column: 2; grid-row: 1; color: #8BD49A; font-weight: 600; }
.tr-term__line.is-pending { opacity: .25; }
.tr-term__line.is-pending .tr-term__ok { visibility: hidden; }
.tr-term__line.is-run { color: #fff; }
@media (min-width: 900px) { .tr-term__line { grid-template-columns: 170px 1fr auto; } .tr-term__text { grid-column: 2; } .tr-term__ok { grid-column: 3; } }

/* 공고 대응표 · 알림 */
.tr-fab { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: var(--head); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.22); }
.tr-sheet { width: min(640px, calc(100% - 24px)); max-height: calc(100% - 48px); padding: 0; border: 0; border-radius: 8px; background: var(--surface); color: var(--text); }
.tr-sheet::backdrop { background: rgba(21, 23, 27, .5); }
.tr-sheet__body { padding: 18px; }
.tr-sheet__head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 10px; }
.tr-sheet__title { margin: 0; font-size: 20px; }
.tr-icon-btn { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); display: grid; place-items: center; flex: none; }
.tr-map-list { list-style: none; margin: 0; padding: 0; }
.tr-map-list__row { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid #ECE8DF; }
@media (min-width: 600px) { .tr-map-list__row { grid-template-columns: 1fr auto; align-items: center; gap: 12px; } }
.tr-map-list__need { font-size: 14px; font-weight: 600; }
.tr-map-list__show { font-size: 13.5px; font-weight: 700; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.tr-sheet__foot { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.tr-toast { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: var(--r); background: var(--head); color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.2); }

.demo-notice { max-width: 1200px; margin: -100px auto 0; padding: 0 16px 100px; font-size: 12px; color: var(--muted); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .tr *, .tr *::before, .tr *::after { transition: none !important; animation: none !important; }
}
