/* RODI v2 · components.css (WU1) — 하이테크 모티프 컴포넌트 (SPEC §3.6)
   r-btn r-card r-table r-tabs r-sechead r-sheet r-titleblock r-dim r-hud r-scan r-blueprint r-skel
   r-kv r-chip r-count r-kbd r-figure r-note r-coord
   규칙: 접두어 r-. 페이지 전용 스타일은 home/lab/sheet/forms.css에만. */

/* ───────────── 버튼 */
.r-btn {
  --btn-h: 48px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: var(--btn-h);
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-1);
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.r-btn__arrow { font-family: var(--font-mono); font-weight: 400; transition: transform var(--dur-2) var(--ease-out); }
.r-btn:hover .r-btn__arrow { transform: translateX(3px); }
.r-btn__meta { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; opacity: .7; }

.r-btn--primary { background: var(--text); color: var(--bg); }
.r-btn--primary:hover { background: var(--wire); color: var(--bg); }

.r-btn--line { border-color: var(--line-strong); color: var(--text); }
.r-btn--line:hover { border-color: var(--wire); color: var(--wire); }

.r-btn--ghost { min-height: 44px; padding-inline: 0; color: var(--wire); font-weight: 500; }
.r-btn--ghost:hover { color: var(--text); }

.r-btn--sm { --btn-h: 36px; padding: 0 12px; font-size: 13px; gap: 8px; }
@media (pointer: coarse) { .r-btn--sm { --btn-h: 44px; } }
.r-btn--block { width: 100%; }
.r-btn[disabled], .r-btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* 조준 모서리(호버 시 나타나는 레지스트레이션 괄호) */
.r-btn--primary::before, .r-btn--line::before {
  content: "";
  position: absolute;
  inset: -5px;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
  --b: var(--wire);
  background:
    linear-gradient(var(--b), var(--b)) 0 0 / 7px 1px no-repeat,
    linear-gradient(var(--b), var(--b)) 0 0 / 1px 7px no-repeat,
    linear-gradient(var(--b), var(--b)) 100% 0 / 7px 1px no-repeat,
    linear-gradient(var(--b), var(--b)) 100% 0 / 1px 7px no-repeat,
    linear-gradient(var(--b), var(--b)) 0 100% / 7px 1px no-repeat,
    linear-gradient(var(--b), var(--b)) 0 100% / 1px 7px no-repeat,
    linear-gradient(var(--b), var(--b)) 100% 100% / 7px 1px no-repeat,
    linear-gradient(var(--b), var(--b)) 100% 100% / 1px 7px no-repeat;
}
.r-btn--primary:hover::before, .r-btn--line:hover::before,
.r-btn--primary:focus-visible::before, .r-btn--line:focus-visible::before { opacity: 1; transform: none; }

/* ───────────── 페이지 머리 (표제 + 경로 + 표제란) */
.r-pagehead {
  padding-top: clamp(40px, 7vw, 104px);
  padding-bottom: clamp(40px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}
.r-pagehead__grid { display: grid; gap: var(--s-6); align-items: end; }
@media (min-width: 1024px) { .r-pagehead__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--col-gap); } }
.r-pagehead__title {
  margin-top: var(--s-4);
  font-size: clamp(36px, 5.2vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.r-pagehead .r-lead { margin-top: var(--s-5); }
.r-pagehead .r-titleblock { width: 100%; }
.r-pagehead .r-legend { margin-top: var(--s-6); flex-wrap: wrap; row-gap: 8px; }
.r-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: var(--s-6);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-2);
}
.r-crumbs a { color: var(--text-2); text-decoration: none; }
@media (max-width: 1023.98px), (pointer: coarse) {
  /* 터치 영역 44px: 링크 상자만 키우고(좌우 16 · 위아래 14) 같은 크기의 음수 여백으로 글자 위치·줄 높이는 그대로 둔다 */
  .r-crumbs a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -14px -16px; padding: 0 16px; }
}
.r-crumbs a:hover { color: var(--wire); }
.r-crumbs > span[aria-hidden] { color: var(--line-strong); }
.r-crumbs [aria-current] { color: var(--text); }

/* ───────────── 섹션 머리 (작은 라벨 ───── + 제목). U15: 라벨은 한글 — 대문자 변환·넓은 자간 없음 */
.r-sechead { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); max-width: 100%; }
.r-sechead__no {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  color: var(--text-2);
}
.r-sechead__no > span:first-child { color: var(--wire); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.r-sechead__no::after {
  content: "";
  flex: 1;
  height: 7px;
  min-width: 40px;
  background:
    linear-gradient(var(--line-strong), var(--line-strong)) 0 50% / 100% 1px no-repeat,
    linear-gradient(var(--line-strong), var(--line-strong)) 100% 0 / 1px 100% no-repeat;
}
.r-sechead__title {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  font-weight: 600;
  max-width: 22ch;
}
.r-sechead__lead { margin: 0; max-width: 60ch; font-size: var(--fs-lead); line-height: 1.65; color: var(--text-2); }
@media (min-width: 1024px) {
  .r-sechead--split { grid-template-columns: 5fr 7fr; column-gap: var(--col-gap); align-items: end; }
  .r-sechead--split .r-sechead__no { grid-column: 1 / -1; }
}

/* ───────────── 카드 */
.r-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-0);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
a.r-card:hover, .r-card--link:hover { border-color: var(--wire); color: inherit; }
.r-card--photo { border-radius: var(--r-2); overflow: hidden; }
.r-card__media {
  position: relative;
  aspect-ratio: var(--ar, 4 / 3);
  overflow: hidden;
  background: var(--bg-3);
}
.r-card__media > img, .r-card__media > picture > img, .r-card__media > video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease-out);
}
a.r-card:hover .r-card__media img { transform: scale(1.035); }
.r-card__body { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-5); flex: 1; }
.r-card__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.r-card__meta > :first-child { color: var(--wire); }
.r-card__title { font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: 600; letter-spacing: -0.01em; }
.r-card__text { margin: 0; font-size: var(--fs-small); line-height: 1.65; color: var(--text-2); }
.r-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: auto;
  padding: 12px var(--s-5);
  border-top: 1px solid var(--line);
  font-family: var(--font-sans); /* U15 2차: '안내 보기'·'서류 · 사양서' 등 한글 위주(파일명 같은 코드도 sans 로 보여도 무방) */
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
a.r-card:hover .r-card__foot { color: var(--wire); }

/* ───────────── 표 */
.r-table-wrap {
  position: relative;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.r-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
.r-table caption {
  caption-side: top;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.r-table th, .r-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.r-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-block: 10px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--text-2);
  white-space: nowrap;
  vertical-align: bottom;
}
.r-table tbody th { font-weight: 600; color: var(--text); }
.r-table tbody tr { transition: background-color var(--dur-1) var(--ease-out); }
.r-table tbody tr:hover { background: color-mix(in srgb, var(--wire) 5%, transparent); }
.r-table tbody tr:last-child > * { border-bottom: 0; }
.r-table [data-col="cart"], .r-table [data-col="drawing"], .r-table .r-nowrap { white-space: nowrap; }
.r-nowrap { white-space: nowrap; } /* 목록 안 붙은 말(테이블·스툴 등)이 가운뎃점 앞에서 끊기지 않게(2026-09-30 화면 QA v6) */
.r-table [data-col="spec"] { min-width: 14em; }
.r-table [data-col="cart"] { text-align: right; padding-block: 7px; }
.r-table .r-num, .r-table [data-col="no"] { font-family: var(--font-mono); font-size: 13px; }
.r-cite { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); letter-spacing: .02em; }
/* 품명·모델 코드는 음절 단위로 끊지 않는다(ZRF-/1015-/2 방지) */
.r-table [data-col="name"] { word-break: keep-all; overflow-wrap: normal; min-width: 11em; }
.r-table [data-col="group"] { white-space: nowrap; }

/* 모바일(< 768) 규격표 통일: 표는 폭을 지키고(가로 스크롤), 가장자리 그늘 + '밀어서 보기' 안내로 넘침을 알린다 */
@media (max-width: 767.98px) {
  .r-table-wrap:has(> table[data-spec-table]) > .r-table,
  .r-specsheet .r-table-wrap > .r-table { min-width: 640px; }
  .r-table-wrap:has(> table[data-spec-table]),
  .r-specsheet .r-table-wrap {
    overscroll-behavior-x: contain;
    /* 스크롤 그늘: local 층이 내용과 함께 움직이며 끝에 닿으면 그늘을 덮는다 */
    background:
      linear-gradient(90deg, var(--bg-2) 40%, transparent) left center / 28px 100% no-repeat local,
      linear-gradient(270deg, var(--bg-2) 40%, transparent) right center / 28px 100% no-repeat local,
      linear-gradient(90deg, color-mix(in srgb, var(--text) 16%, transparent), transparent) left center / 14px 100% no-repeat scroll,
      linear-gradient(270deg, color-mix(in srgb, var(--text) 16%, transparent), transparent) right center / 14px 100% no-repeat scroll,
      var(--bg-2);
  }
  .r-table-wrap:has(> table[data-spec-table])::before,
  .r-specsheet .r-table-wrap::before {
    content: "← 밀어서 보기 →";
    position: sticky;
    left: 0;
    display: block;
    width: 100%;
    padding: 6px 12px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-3);
    color: var(--text-2);
    font-family: var(--font-sans);
    font-size: 12px;
    letter-spacing: 0;
    text-align: right;
  }
  .r-table-wrap:has(> table[data-spec-table]) .r-table [data-col="name"],
  .r-specsheet .r-table [data-col="name"] { min-width: 12em; }
}
.r-table__empty td { padding: var(--s-6); text-align: center; color: var(--text-2); font-family: var(--font-sans); font-size: 13px; }

/* ───────────── 탭 (role=tablist data-tabs → main.js가 키보드 처리) */
.r-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line-strong);
  scrollbar-width: none;
}
.r-tabs::-webkit-scrollbar { display: none; }
.r-tab {
  position: relative;
  flex: none;
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  background: none;
  color: var(--text-2);
  font-family: var(--font-mono); /* 도면 번호(D-01)와 한글 이름을 함께 담는다 — 한글은 Pretendard로 보임 */
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--dur-1) var(--ease-out);
}
.r-tab::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--wire);
  transform: scaleX(0);
  transition: transform var(--dur-2) var(--ease-out);
}
.r-tab:hover { color: var(--text); }
.r-tab[aria-selected="true"] { color: var(--text); }
.r-tab[aria-selected="true"]::after { transform: scaleX(1); }
.r-tabpanel { padding-top: var(--s-5); }
.r-tabpanel:focus-visible { outline-offset: 4px; }

/* ───────────── 칩·카운트·키 */
.r-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--dur-1) var(--ease-out);
}
.r-chip:hover { color: var(--text); border-color: var(--text-2); }
.r-chip[aria-pressed="true"], .r-chip[aria-selected="true"], .r-chip[aria-current] { background: var(--text); border-color: var(--text); color: var(--bg); }
@media (pointer: coarse) { .r-chip { min-height: 44px; } }

.r-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2);
}
.r-count[data-count="0"] { opacity: .55; }
.r-count.is-bump { animation: r-bump var(--dur-3) var(--ease-out); }
@keyframes r-bump { 30% { transform: scale(1.35); } }

.r-kbd {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--text-2);
  background: var(--bg-3);
}

/* ───────────── 키-값 목록(사양 요약·사업자 정보 등) */
.r-kv { display: grid; font-size: var(--fs-small); }
.r-kv > div {
  display: grid;
  grid-template-columns: minmax(7em, 34%) 1fr;
  gap: var(--s-4);
  padding-block: 11px;
  border-bottom: 1px solid var(--line);
}
.r-kv > div:first-child { border-top: 1px solid var(--line-strong); }
.r-kv dt {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--text-2);
  padding-top: 1px;
}
.r-kv dd { color: var(--text); font-variant-numeric: tabular-nums; }

/* ───────────── 도면 시트: 레지스트레이션 마크(┼◯) + 표제란 */
.r-sheet {
  --m: var(--line-strong);
  --dim-bg: var(--bg-2);
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-0);
  background: var(--bg-2);
}
.r-sheet::before {
  content: "";
  position: absolute;
  inset: -9px;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at 9.5px 9.5px, transparent 3.5px, var(--m) 3.5px 4.5px, transparent 4.5px) 0 0 / 19px 19px no-repeat,
    radial-gradient(circle at 9.5px 9.5px, transparent 3.5px, var(--m) 3.5px 4.5px, transparent 4.5px) 100% 0 / 19px 19px no-repeat,
    radial-gradient(circle at 9.5px 9.5px, transparent 3.5px, var(--m) 3.5px 4.5px, transparent 4.5px) 0 100% / 19px 19px no-repeat,
    radial-gradient(circle at 9.5px 9.5px, transparent 3.5px, var(--m) 3.5px 4.5px, transparent 4.5px) 100% 100% / 19px 19px no-repeat,
    linear-gradient(var(--m), var(--m)) 0 9px / 19px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) 9px 0 / 1px 19px no-repeat,
    linear-gradient(var(--m), var(--m)) right 0 top 9px / 19px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) right 9px top 0 / 1px 19px no-repeat,
    linear-gradient(var(--m), var(--m)) left 0 bottom 9px / 19px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) left 9px bottom 0 / 1px 19px no-repeat,
    linear-gradient(var(--m), var(--m)) right 0 bottom 9px / 19px 1px no-repeat,
    linear-gradient(var(--m), var(--m)) right 9px bottom 0 / 1px 19px no-repeat;
}
.r-sheet--wire { --m: var(--wire); }
.r-sheet--bare { background: transparent; --dim-bg: var(--bg); }
.r-sheet__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-5);
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-sans); /* U15 2차: 한글 제목 위주(시트·도면 번호도 sans + tabular-nums 로 둔다) */
  font-size: 11px;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.r-sheet__head b { font-weight: 500; color: var(--text); }
.r-sheet__body { padding: var(--s-5); }
@media (min-width: 768px) { .r-sheet__body { padding: var(--s-6); } }

/* 표제란 (시트 · 기준일 · 축척 · 날짜). U15: 칸 이름은 한글 — 대문자 변환 없음.
   2차: 값도 대부분 한글('국산 아까시 심재 원목', '없음')이라 sans + tabular-nums(날짜·번호는 자리만 맞춘다) */
.r-titleblock {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
}
.r-titleblock__cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 96px;
  padding: 8px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: -1px;
}
.r-titleblock__cell:last-child { border-right: 0; }
.r-titleblock__cell--grow { flex: 3 1 260px; }
.r-titleblock__cell > span { font-family: var(--font-sans); font-size: 10.5px; font-weight: 500; letter-spacing: .02em; color: var(--text-2); white-space: nowrap; }
.r-titleblock__cell > b { font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-sheet > .r-titleblock { margin-left: auto; border-width: 1px 0 0 1px; max-width: 100%; width: max-content; }
@media (max-width: 767.98px) { .r-sheet > .r-titleblock { width: 100%; border-left: 0; } }
@media (min-width: 768px) {
  .r-sheet > .r-titleblock { flex-wrap: nowrap; }
  .r-sheet > .r-titleblock .r-titleblock__cell--grow { flex: 1 1 auto; }
}

/* ───────────── 치수선: |←  1,500  →|  (확정값만. 미확정이면 요소를 만들지 않는다) */
.r-dim {
  --dim-c: var(--wire);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  color: var(--dim-c);
}
.r-dim::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask:
    linear-gradient(#000, #000) 0 50% / 1px 100% no-repeat,
    linear-gradient(#000, #000) 100% 50% / 1px 100% no-repeat,
    linear-gradient(#000, #000) 50% 50% / calc(100% - 2px) 1px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6'%3E%3Cpath d='M0 3 7 0v6z'/%3E%3C/svg%3E") 1px 50% / 7px 6px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6'%3E%3Cpath d='M7 3 0 0v6z'/%3E%3C/svg%3E") calc(100% - 1px) 50% / 7px 6px no-repeat;
  mask:
    linear-gradient(#000, #000) 0 50% / 1px 100% no-repeat,
    linear-gradient(#000, #000) 100% 50% / 1px 100% no-repeat,
    linear-gradient(#000, #000) 50% 50% / calc(100% - 2px) 1px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6'%3E%3Cpath d='M0 3 7 0v6z'/%3E%3C/svg%3E") 1px 50% / 7px 6px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6'%3E%3Cpath d='M7 3 0 0v6z'/%3E%3C/svg%3E") calc(100% - 1px) 50% / 7px 6px no-repeat;
}
.r-dim__label {
  position: relative;
  z-index: 1;
  padding: 0 8px;
  background: var(--dim-bg, var(--bg));
  font-family: var(--font-mono);
  font-size: var(--fs-dim);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.r-dim--v { min-height: 0; width: 18px; height: 100%; flex-direction: column; }
.r-dim--v::before {
  -webkit-mask:
    linear-gradient(#000, #000) 50% 0 / 100% 1px no-repeat,
    linear-gradient(#000, #000) 50% 100% / 100% 1px no-repeat,
    linear-gradient(#000, #000) 50% 50% / 1px calc(100% - 2px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 7'%3E%3Cpath d='M3 0 0 7h6z'/%3E%3C/svg%3E") 50% 1px / 6px 7px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 7'%3E%3Cpath d='M3 7 0 0h6z'/%3E%3C/svg%3E") 50% calc(100% - 1px) / 6px 7px no-repeat;
  mask:
    linear-gradient(#000, #000) 50% 0 / 100% 1px no-repeat,
    linear-gradient(#000, #000) 50% 100% / 100% 1px no-repeat,
    linear-gradient(#000, #000) 50% 50% / 1px calc(100% - 2px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 7'%3E%3Cpath d='M3 0 0 7h6z'/%3E%3C/svg%3E") 50% 1px / 6px 7px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 7'%3E%3Cpath d='M3 7 0 0h6z'/%3E%3C/svg%3E") 50% calc(100% - 1px) / 6px 7px no-repeat;
}
.r-dim--v .r-dim__label { writing-mode: vertical-rl; transform: rotate(180deg); padding: 8px 0; }

/* 좌표 판독(HUD·도면 모서리) — U15 2차: 키(기준일·사진·수종)와 값('현재 · 실사', '자안 제작 제품 설치 현장')이 한글 위주 → sans + 고정폭 숫자 */
.r-coord {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  text-transform: none;
  color: var(--text-2);
  white-space: nowrap;
}
.r-coord b { font-weight: 500; color: var(--wire); margin-right: .4em; }
.r-coord[data-404-readout] { font-family: var(--font-mono); } /* 404 도면 좌표 판독(X · Y mm)은 숫자만 → 모노 유지 */

/* ───────────── HUD 오버레이 (3D·미디어 위 DOM, WU3 hud.css가 확장) */
.r-hud {
  --hud-c: color-mix(in srgb, var(--wire) 70%, transparent);
  position: absolute;
  inset: 0;
  z-index: var(--z-hud);
  pointer-events: none;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  background:
    linear-gradient(var(--hud-c), var(--hud-c)) 10px 10px / 14px 1px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) 10px 10px / 1px 14px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) right 10px top 10px / 14px 1px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) right 10px top 10px / 1px 14px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) left 10px bottom 10px / 14px 1px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) left 10px bottom 10px / 1px 14px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) right 10px bottom 10px / 14px 1px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) right 10px bottom 10px / 1px 14px no-repeat;
}
.r-hud > * { pointer-events: auto; }
.r-hud__tl, .r-hud__tr, .r-hud__bl, .r-hud__br { position: absolute; display: flex; flex-direction: column; gap: 4px; max-width: calc(50% - 24px); }
.r-hud__tl { top: 20px; left: 22px; }
.r-hud__tr { top: 20px; right: 22px; align-items: flex-end; text-align: right; }
.r-hud__bl { bottom: 20px; left: 22px; }
.r-hud__br { bottom: 20px; right: 22px; align-items: flex-end; text-align: right; }
.r-hud__step { color: var(--text); font-family: var(--font-sans); font-variant-numeric: tabular-nums; letter-spacing: .02em; } /* U15 2차: '01 / 도면'·'태안 안면도 · 2026' 한글 위주 */
.r-hud__step b { color: var(--wire); font-weight: 500; }
.r-hud__cross {
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  opacity: .5;
  background:
    linear-gradient(var(--hud-c), var(--hud-c)) 50% 0 / 1px 8px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) 50% 100% / 1px 8px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) 0 50% / 8px 1px no-repeat,
    linear-gradient(var(--hud-c), var(--hud-c)) 100% 50% / 8px 1px no-repeat;
}

/* 3D·미디어 무대 공통 프레임 */
.r-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--ar, 16 / 10);
  background:
    radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--wire) 7%, transparent), transparent 60%),
    var(--bg);
  border: 1px solid var(--line);
  isolation: isolate;
}
.r-stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.r-stage > img.r-stage__poster { width: 100%; height: 100%; object-fit: cover; }

/* ───────────── 등장 효과: 스캔 라인 스윕 1회 (reveal.js) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal]:not(.is-in),
  .js .r-scan:not(.is-in) { clip-path: inset(0 100% 0 0); }
  .js [data-reveal="fade"]:not(.is-in) { clip-path: none; opacity: 0; transform: translateY(14px); }
  .js [data-reveal="draw"]:not(.is-in) { clip-path: none; }
  .js:not(.reveal-ready) :is([data-reveal], .r-scan) { animation: r-failsafe 1ms 2.5s both; }

  [data-reveal], .r-scan {
    transition:
      clip-path var(--dur-4) var(--ease-scan) var(--reveal-delay, 0ms),
      opacity var(--dur-3) var(--ease-out) var(--reveal-delay, 0ms),
      transform var(--dur-3) var(--ease-out) var(--reveal-delay, 0ms);
  }
  [data-reveal="draw"] .r-drawpath {
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset calc(var(--dur-4) * 1.6) var(--ease-out) var(--reveal-delay, 0ms);
  }
  .js [data-reveal="draw"]:not(.is-in) .r-drawpath { stroke-dashoffset: 1; }
  [data-reveal="draw"].is-drawn .r-drawpath { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
}
@keyframes r-failsafe { to { clip-path: inset(0 0 0 0); opacity: 1; transform: none; } }

.r-scanline {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent calc(100% - 140px), color-mix(in srgb, var(--wire) 14%, transparent) calc(100% - 1px), var(--wire) calc(100% - 1px));
  animation: r-scanline var(--dur-4) var(--ease-scan) var(--reveal-delay, 0ms) both;
}
@keyframes r-scanline {
  0% { transform: translateX(-100%); opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(0); opacity: 0; }
}

/* ───────────── 도면 시트 폴백(fallback blueprint-card) — 슬롯 파일을 못 읽을 때만. 빈 X 대신 구조 예시 선화. 페이지당 2개 이하(check.mjs) */
.r-blueprint {
  --m: var(--line-strong);
  position: relative;
  display: grid;
  place-items: center;
  gap: var(--s-2);
  aspect-ratio: var(--ar, 16 / 9);
  min-height: 180px;
  padding: var(--s-5);
  text-align: center;
  color: var(--text-2);
  background-color: var(--bg-2);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 16px 16px;
}
.r-blueprint__dwg { width: min(100%, 420px); height: auto; color: var(--wire); }
[data-surface="paper"] .r-blueprint__dwg { color: var(--text); }
.r-blueprint__dwg .d { stroke: var(--wire); }
.r-blueprint__label {
  position: relative;
  padding: 6px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}
.r-blueprint__note { position: relative; margin: 0; max-width: 36ch; font-size: 13px; background: var(--bg-2); padding: 2px 8px; }

/* 골격 자리 표시(개발용). 소유 WU가 섹션을 채우면서 제거한다 */
.r-skel {
  display: grid;
  gap: 10px;
  padding: var(--s-5);
  border: 1px dashed var(--line);
  background: color-mix(in srgb, var(--bg-2) 50%, transparent);
}
.r-skel::before, .r-skel::after, .r-skel > i {
  content: "";
  display: block;
  height: 10px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--line) 0 60%, transparent 60%);
}
.r-skel::after { width: 72%; }
.r-skel__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .02em;
  color: var(--text-2);
}

/* ───────────── 그림·캡션 */
.r-figure { position: relative; }
.r-figure > img, .r-figure > picture img { width: 100%; height: auto; }
.r-figure figcaption, .r-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 10px;
  font-family: var(--font-sans); /* U15 2차: 캡션은 한글 문장 위주 */
  font-size: 11px;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
  color: var(--text-2);
}
.r-figure figcaption b, .r-caption b { font-weight: 500; color: var(--text); }
.r-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-2);
  background: var(--bg-3);
}
.r-media > img, .r-media > video, .r-media > picture img { width: 100%; height: 100%; object-fit: cover; }

/* 주석·안내 */
.r-note {
  position: relative;
  padding: 14px 16px 14px 18px;
  border-left: 2px solid var(--wire);
  background: color-mix(in srgb, var(--wire) 6%, transparent);
  font-size: var(--fs-small);
  line-height: 1.65;
  color: var(--text);
}
.r-note__label {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--wire);
}

/* 숫자 목록(공정 단계 등) */
.r-steps { list-style: none; counter-reset: rstep; display: grid; gap: 0; }
.r-steps > li {
  counter-increment: rstep;
  display: grid;
  grid-template-columns: 3.2em 1fr;
  gap: var(--s-4);
  padding-block: var(--s-4);
  border-top: 1px solid var(--line);
}
.r-steps > li::before {
  content: counter(rstep, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--wire);
  padding-top: .2em;
}

/* ───────────── 도면 ↔ 실사 비교 슬라이더 r-compare (compare.js · SPEC §3.6)
   홈 §05 FORM, 울타리·목책 #mokchaek 에서 쓴다(2026-09-30 home.css 에서 옮김) */
.r-compare { margin: 0; }
.r-compare__frame {
  --pos: 50%;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
@media (min-width: 768px) { .r-compare__frame { aspect-ratio: 16 / 9; } }
.js .r-compare__frame { cursor: ew-resize; }
.r-compare__layer { position: absolute; inset: 0; }
.r-compare__layer--a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11% 5% 9%;
  color: var(--text);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--bg-2);
}
.r-compare__layer--a > img,
.r-compare__layer--a > [data-slot-drawing],
.r-compare__layer--a > [data-slot-drawing] svg { width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
.r-compare__layer--a > [data-slot-drawing] { display: flex; align-items: center; color: var(--text); }
.r-compare__layer--b { clip-path: inset(0 0 0 var(--pos)); }
.r-compare__layer--b > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.r-compare__tag {
  position: absolute;
  top: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
}
.r-compare__tag b { font-weight: 500; }
.r-compare__tag--a { left: 14px; background: var(--bg-2); border: 1px solid var(--line-strong); color: var(--text-2); }
.r-compare__tag--a b { color: var(--wire); }
.r-compare__tag--b { right: 14px; background: rgba(11, 14, 16, .72); color: rgba(232, 234, 229, .8); }
.r-compare__tag--b b { color: var(--night-wood); }
.r-compare__handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  z-index: 4;
  width: 44px;
  margin-left: -22px;
  display: flex;
  justify-content: center;
  outline: none;
  touch-action: none;
}
.r-compare__handle::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: var(--night-wire);
  box-shadow: 0 0 0 1px rgba(11, 14, 16, .25), 0 0 18px rgba(95, 212, 196, .7);
}
.r-compare__grip {
  position: absolute;
  top: 50%;
  width: 40px; height: 40px;
  margin-top: -20px;
  display: grid;
  place-items: center;
  background: rgba(11, 14, 16, .86);
  border: 1px solid var(--night-wire);
  transform: rotate(45deg);
  transition: transform var(--dur-2) var(--ease-out);
}
.r-compare__grip i { position: relative; width: 14px; height: 14px; transform: rotate(-45deg); }
.r-compare__grip i::before, .r-compare__grip i::after { content: ""; position: absolute; top: 3px; width: 6px; height: 6px; border: solid var(--night-wire); border-width: 1.5px 1.5px 0 0; }
.r-compare__grip i::before { left: -1px; transform: rotate(-135deg); }
.r-compare__grip i::after { right: -1px; transform: rotate(45deg); }
.r-compare__handle:hover .r-compare__grip, .r-compare.is-drag .r-compare__grip { transform: rotate(45deg) scale(1.1); }
.r-compare__handle:focus-visible .r-compare__grip { outline: 2px solid var(--focus); outline-offset: 3px; }
.r-compare__read {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 8px;
  background: rgba(11, 14, 16, .86);
  border: 1px solid rgba(95, 212, 196, .5);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--night-wire);
  white-space: nowrap;
}
.r-compare__read::after { content: " %"; color: rgba(232, 234, 229, .55); }
.r-compare figcaption { margin-top: 12px; }
/* 사진 ↔ 사진 전후 비교(시공 사례 진입로 정비): 두 층 모두 같은 비율·같은 위치로 채워 구도를 맞춘다 */
.r-compare--photo .r-compare__layer--a { padding: 0; background: var(--bg-2); }
.r-compare--photo .r-compare__layer > img { width: 100%; height: 100%; object-fit: cover; object-position: var(--cmp-pos, 50% 60%); }
.r-compare--photo .r-compare__tag--a { background: rgba(11, 14, 16, .72); border: 0; color: rgba(232, 234, 229, .8); }
.r-compare--photo .r-compare__tag--a b { color: var(--night-wire); }
@media (max-width: 599.98px) {
  .r-compare__tag { top: 10px; padding: 3px 7px; font-size: 11px; gap: 0; }
  .r-compare__tag--a { left: 10px; } .r-compare__tag--b { right: 10px; }
  .r-compare__tag b + * { display: none; }
}
@media print { .r-compare__handle { display: none !important; } }
