/* ================= HyeokShin Tools ================= */
:root {
  --navy: #0f2b46;
  --navy-2: #16395c;
  --gold: #e8b64c;
  --bg: #f2f4f8;
  --panel: #ffffff;
  --line: #dde3ec;
  --text: #1c2733;
  --muted: #64748b;
  --ok: #157347;
  --ok-bg: #e6f4ec;
  --ng: #b02a37;
  --ng-bg: #fbe9eb;
  --warn: #8a6d1a;
  --warn-bg: #fdf6e3;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 43, 70, .08), 0 4px 16px rgba(15, 43, 70, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "Malgun Gothic", "맑은 고딕", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
h1, h2, h3 { margin: 0; font-weight: 600; }
a { color: inherit; text-decoration: none; }
u { text-decoration: none; color: var(--muted); font-size: 11px; }
small { color: var(--muted); font-weight: 400; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  background: var(--navy); color: #fff;
  padding: 0 20px; height: 52px;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, #1d4c78, #0f2b46);
  border: 1px solid rgba(232,182,76,.55);
  color: var(--gold); font-weight: 700; font-size: 16px;
}
.brand-name { font-size: 15px; letter-spacing: .2px; font-weight: 400; }
.brand-name b { font-weight: 700; color: var(--gold); }
.topbar-title { font-size: 14px; font-weight: 600; flex: 1; text-align: center; }
.topbar-sub { font-weight: 400; color: #9db4cc; margin-left: 6px; font-size: 12.5px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.1); border-radius: 999px;
  padding: 4px 12px; font-size: 12.5px; color: #dbe6f2;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 8px;
  padding: 8px 16px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s;
  font-family: inherit;
}
.btn-primary { background: var(--gold); color: #35270a; }
.btn-primary:hover { background: #f0c260; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; opacity: .75; }
.btn-ghost:hover { opacity: 1; }
.btn-sm { padding: 5px 12px; font-size: 12.5px; font-weight: 500; }
.btn-block { width: 100%; }

/* ---------- layout ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 28px 20px 60px; }
.container-wide { max-width: 1500px; }

/* ---------- login ---------- */
.login-body { background: var(--navy); }
.login-main { padding: 0; max-width: none; }
.login-panel {
  display: grid; grid-template-columns: 1.15fr 1fr;
  min-height: 100vh;
}
.login-hero {
  background:
    radial-gradient(1000px 500px at -10% -20%, #1d4c78 0%, transparent 60%),
    radial-gradient(700px 500px at 110% 110%, #14395c 0%, transparent 55%),
    var(--navy);
  color: #fff; display: flex; align-items: center; justify-content: center;
  padding: 48px;
}
.login-hero-inner { max-width: 460px; }
.brand-lg { margin-bottom: 42px; }
.brand-mark-lg { width: 40px; height: 40px; font-size: 22px; border-radius: 10px; }
.brand-lg .brand-name { font-size: 20px; }
.login-hero h1 { font-size: 40px; line-height: 1.2; font-weight: 700; margin-bottom: 18px; }
.login-tagline { color: #a7bdd4; font-size: 15.5px; margin: 0 0 34px; }
.login-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.login-features li { display: flex; align-items: center; gap: 10px; color: #dbe6f2; font-size: 14px; }
.login-features .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
.login-features .dot.dim { background: #4a648a; }
.login-form-side { background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.login-card {
  background: var(--panel); border-radius: 14px; box-shadow: var(--shadow);
  padding: 38px 36px; width: 100%; max-width: 380px;
}
.login-card h2 { font-size: 22px; margin-bottom: 6px; }
.login-hint { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font-size: 14px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(22,57,92,.12); }
.login-card .btn-primary { margin-top: 6px; padding: 11px; font-size: 14.5px; }
.login-foot { color: var(--muted); font-size: 12px; margin: 18px 0 0; text-align: center; word-break: keep-all; }
.login-copy { color: #6f88a6; font-size: 12px; margin: 40px 0 0; letter-spacing: .02em; }
.login-foot a { color: var(--navy-2); font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field .req { color: var(--ng); font-weight: 700; }
.alert { border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: var(--ng-bg); color: var(--ng); border: 1px solid #f1c2c7; }
.alert-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #ecdaa2; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #b9dfc4; }
@media (max-width: 860px) {
  .login-panel { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- DIN 743 축 강도 ---------- */
.view-block { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.input-panel .input-section > h3 { margin-bottom: 10px; }
.row-table { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.rt-head, .rt-row { display: grid; grid-template-columns: repeat(5, 1fr) 30px; gap: 6px; align-items: center; padding: 6px 8px; }
.row-table#tbl-hollows .rt-head, .row-table#tbl-hollows .rt-row { grid-template-columns: repeat(4, 1fr) 30px; }
.row-table#tbl-bearings .rt-head, .row-table#tbl-bearings .rt-row { grid-template-columns: repeat(3, 1fr) 30px; }

/* 카드형 입력 행 — 한 줄에 다 넣으면 좁아서 두 줄로 나눈다 */
.card-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.crow { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }
.crow .grid4 { display: grid; grid-template-columns: 1fr 1fr 1fr 26px; gap: 8px; align-items: end; }
.crow .grid4 + .grid4 { margin-top: 6px; }
.crow .mini { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.crow .mini.span2 { grid-column: span 2; }
.crow .mini.span3 { grid-column: span 3; }
.crow .mini > span { font-size: 10.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.crow input, .crow select { border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; font-size: 12.5px; font-family: inherit; width: 100%; min-width: 0; }
.crow input:disabled { background: var(--bg); color: var(--muted); }
.crow .off { visibility: hidden; }
.crow .grid4.off { display: none; }
.crow .mini.off { visibility: hidden; }
.crow-note { margin-top: 6px; font-size: 11.5px; color: #46566b; line-height: 1.5; }
.crow-note .dim { color: var(--muted); }
.crow-note.bad { color: var(--ng); font-weight: 600; }
.crow-note .warn-txt { color: var(--warn); font-weight: 600; }
.crow .rt-del { align-self: center; }
.res-table .tag.taper { background: #e3f0ef; color: #1d7d72; }
.row-table#tbl-notches .rt-head, .row-table#tbl-notches .rt-row { grid-template-columns: repeat(6, 1fr); }
.row-table.wide .rt-head, .row-table.wide .rt-row { grid-template-columns: 1.2fr .8fr 1.1fr .9fr .9fr 1fr 30px; }
.rt-head { background: var(--bg); font-size: 11.5px; font-weight: 600; color: var(--muted); }
.rt-row + .rt-row { border-top: 1px solid var(--line); }
.rt-row input, .rt-row select { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; font-size: 12.5px; font-family: inherit; min-width: 0; }
.rt-row input:focus, .rt-row select:focus { outline: none; border-color: var(--navy-2); }
.rt-row .rt-fixed { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rt-row .chk { display: flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; }
.rt-row .chk input { width: auto; }
.rt-del { border: none; background: none; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; padding: 0; }
.rt-del:hover { color: var(--ng); }
.hint { font-size: 11.5px; color: var(--muted); margin: 6px 0 0; }
.mat-info { font-size: 12px; color: var(--muted); margin-top: 10px; padding: 8px 10px; background: var(--bg); border-radius: 6px; }
.res-table .tag { font-size: 10px; background: var(--warn-bg); color: var(--warn); padding: 1px 5px; border-radius: 4px; }
.res-table td.bad { color: var(--ng); font-weight: 700; }
.res-table tr.ng-row { background: var(--ng-bg); }
.view-area { min-height: 200px; }
.view-area svg { width: 100%; height: auto; display: block; }
/* 좌표계가 100단위라 렌더 폭이 배율이 된다. 폭을 묶어 글자 크기를 고정한다
   (넓은 화면에서 폰트가 같이 커져 거대해지는 것을 막는다). */
.view-area svg.chart-svg, .view-area svg.jd-svg { max-width: 560px; margin: 0 auto; }
.shaft-svg .sh-body { fill: #dbe6f2; stroke: #16395c; stroke-width: .6; vector-effect: non-scaling-stroke; }
.shaft-svg .sh-bore { fill: #fff; stroke: #16395c; stroke-width: .5; vector-effect: non-scaling-stroke; }
.shaft-svg .sh-axis { stroke: #94a3b8; stroke-width: .7; stroke-dasharray: 6 3 1 3; vector-effect: non-scaling-stroke; }
.shaft-svg .sh-brg { fill: #16395c; }
.shaft-svg .sh-notch { stroke: #e8b64c; stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.shaft-svg .sh-notch.bad { stroke: var(--ng); stroke-width: 1.6; }
.shaft-svg .sh-worst { stroke: var(--ng); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.shaft-svg .sh-load { stroke: #c0392b; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.shaft-svg .sh-load-h { fill: #c0392b; }
.shaft-svg .sh-lab { fill: #4a5c70; text-anchor: middle; }
.shaft-svg .sh-lab.bad { fill: var(--ng); font-weight: 700; }
/* 선도 공통 — 좌표계가 100단위이므로 글자도 그 단위로 준다 (.dgn = 공통 클래스).
   .chart-svg 에만 걸면 체결선도(.jd-svg)에서 기본 16px가 적용돼 글자가 폭발한다. */
.dgn .tick { font-size: 1.7px; fill: var(--muted); }
.dgn .chart-title { font-size: 2.1px; fill: var(--ink); font-weight: 700; }
.dgn text { font-family: inherit; }
.chart-svg .ax { stroke: #7b8ca0; stroke-width: .25; }
.chart-svg .grid { stroke: #e2e8f0; stroke-width: .18; }
.chart-svg .ser { fill: none; stroke-width: .5; }
.chart-svg .ser.s1 { stroke: #16395c; }
.chart-svg .ser.s2 { stroke: #d35400; }
.chart-svg .ser.s3 { stroke: #1d7d72; }
.chart-svg .brgline { stroke: #94a3b8; stroke-width: .2; stroke-dasharray: 1 1; }
.chart-svg .reqline { stroke: var(--ng); stroke-width: .3; stroke-dasharray: 1.5 1; }
.chart-svg .bar.sf { fill: #16395c; }
.chart-svg .bar.sd { fill: #5a86b5; }
.chart-svg .bar.bad { fill: var(--ng); }

/* ================= 결과 패널 공용 컴포넌트 =================
   판정 배너·뷰 전환·제원표·상세계산(details)은 툴마다 다시 만들지 말고
   여기 있는 것을 쓴다. (DIN 743·오일 툴이 자체 클래스를 만들어
   스타일이 빠져 있던 것을 공용으로 승격) */

/* 판정 배너 — .overall-banner 와 같은 결의 축약형 */
.verdict {
  border-radius: 8px; padding: 9px 13px; font-size: 13.5px;
  margin-bottom: 12px; border: 1px solid; display: flex; gap: 8px;
  align-items: baseline; line-height: 1.5;
}
.verdict b { font-size: 14px; letter-spacing: .02em; flex: none; }
.verdict.ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe3cf; }
.verdict.ng { background: var(--ng-bg); color: var(--ng); border-color: #f1c2c7; }
.verdict.warn { background: var(--warn-bg); color: var(--warn); border-color: #ecdaa2; }

/* 뷰 전환 바 */
.view-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.view-bar .vb-label { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.vbtn { background: var(--bg); border: 1px solid var(--line); color: #46566b; }
.vbtn:hover { background: #eef2f8; }
.vbtn.active { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }

/* 제원표 — geargeo 인라인에 있던 것을 공용으로 승격 */
.spec-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.spec-table th, .spec-table td { border: 1px solid var(--line); padding: 4px 8px; }
.spec-table th { background: var(--bg-soft, #f2f5f9); text-align: left; white-space: pre-line; width: 34%; }
.spec-table td { text-align: right; white-space: pre-line; font-variant-numeric: tabular-nums; }
.spec-table td.sp-l { text-align: left; font-weight: 600; color: #46566b; width: 42%; }
.spec-table td.sp-s { text-align: left; color: var(--navy-2); font-weight: 600; width: 16%; white-space: nowrap; }
.spec-table td.sp-p { font-weight: 700; }
.spec-table td.sp-u { text-align: left; color: var(--muted); width: 14%; white-space: nowrap; }

/* 상세계산 아코디언 — 네이티브 details 를 .acc-item 과 같은 모양으로 */
details.step { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
details.step > summary {
  cursor: pointer; list-style: none; background: var(--bg);
  padding: 9px 12px; font-size: 13px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 9px;
}
details.step > summary::-webkit-details-marker { display: none; }
details.step > summary:hover { background: #eef2f8; }
details.step > summary::after { content: "›"; margin-left: auto; color: var(--muted); transition: transform .15s; }
details.step[open] > summary::after { transform: rotate(90deg); }
details.step .step-id {
  color: var(--gold); background: var(--navy); border-radius: 5px;
  font-size: 10.5px; padding: 2px 7px; font-weight: 700;
  min-width: 26px; text-align: center; flex: none;
}
details.step .step-table td { padding: 5px 12px; }
.step-table .st-sym { font-weight: 600; white-space: nowrap; width: 74px; color: var(--navy-2); }
.step-table .st-lab { color: #46566b; }
.step-table .st-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.step-table .st-unit { color: var(--muted); width: 52px; white-space: nowrap; }
.step-table .st-note { color: var(--muted); font-size: 11.5px; }

/* ---------- 오일 배유구 ---------- */
.oh-svg .oh-center { stroke: #7b8ca0; stroke-width: .25; }
.oh-svg .oh-datum { stroke: #94a3b8; stroke-width: .3; stroke-dasharray: 4 2 1 2; }
.oh-svg .oh-wall { fill: none; stroke: #16395c; stroke-width: .6; }
.oh-svg .oh-oil { fill: rgba(74,144,217,.30); }
.oh-svg .oh-oil-top { stroke: #2a6db5; stroke-width: .45; }
.oh-svg .oh-hole { fill: #fff; stroke: #16395c; stroke-width: .4; }
.oh-svg .oh-rotor { fill: rgba(120,130,145,.16); stroke: #7b8ca0;
  stroke-width: .35; stroke-dasharray: 1.6 1; }
.oh-svg .oh-line { stroke-width: .4; }
.oh-svg .oh-line.allow { stroke: #c0392b; stroke-dasharray: 2 1.2; }
.oh-svg .oh-line.churn { stroke: #d35400; stroke-dasharray: 1.2 1.2; }
.oh-svg .oh-margin { stroke: #1d7d72; stroke-width: .5; }
.oh-svg .oh-margin.bad { stroke: #c0392b; }
.oh-svg .oh-lab { font-size: 2px; fill: #46566b; }
.oh-svg .oh-lab.allow { fill: #c0392b; font-weight: 700; }
.oh-svg .oh-lab.churn { fill: #d35400; font-weight: 700; }
.oh-svg .oh-lab.level { fill: #2a6db5; font-weight: 700; }
.oh-svg .oh-lab.level.bad, .oh-svg .oh-lab.bad { fill: #c0392b; font-weight: 700; }
.oh-svg .oh-lab.dim { fill: #7b8ca0; }
.oh-svg .chart-title { font-size: 2.1px; fill: var(--ink); font-weight: 700; }
.chart-svg .ser.s4 { stroke: #8a4baf; }
.chart-svg .markline { stroke: #1d7d72; stroke-width: .3; stroke-dasharray: 1 1; }
.chart-svg .tick.req { fill: #c0392b; font-weight: 700; }
.chk-line { display: flex; align-items: center; gap: 6px; font-size: 13px;
  font-weight: 600; color: #46566b; margin-bottom: 10px; }
.chk-line input { width: auto; }
.help-p.mono-note { background: var(--bg); border-radius: 6px; padding: 8px 10px;
  font-size: 12.5px; color: #46566b; }

/* ---------- VDI 2230 체결선도 ---------- */
.jd-svg .ax { stroke: #7b8ca0; stroke-width: .25; }
.jd-svg .grid { stroke: #e2e8f0; stroke-width: .18; }
.jd-svg .jd-bolt { fill: rgba(22,57,92,.13); }
.jd-svg .jd-plate { fill: rgba(211,84,0,.13); }
.jd-svg .jd-line { stroke-width: .5; }
.jd-svg .jd-line.bolt { stroke: #16395c; }
.jd-svg .jd-line.plate { stroke: #d35400; }
.jd-svg .jd-fm { stroke: #16395c; stroke-width: .3; stroke-dasharray: 2 1; }
.jd-svg .jd-fkr { stroke: #d35400; stroke-width: .3; stroke-dasharray: 2 1; }
.jd-svg .jd-req { stroke: #c0392b; stroke-width: .35; stroke-dasharray: 1.2 .8; }
.jd-svg .jd-fsa { stroke: #16395c; stroke-width: .8; }
.jd-svg .jd-fz { stroke: #7b8ca0; stroke-width: .5; }
.jd-svg .lab { font-size: 2px; }
.jd-svg .lab.bolt { fill: #16395c; font-weight: 700; }
.jd-svg .lab.plate { fill: #d35400; font-weight: 700; }
.jd-svg .lab.req { fill: #c0392b; font-weight: 700; }
.jd-svg .lab.dim { fill: #7b8ca0; }
.jd-svg .jd-bar.bolt { fill: #16395c; }
.jd-svg .jd-bar.plate { fill: #d35400; }
.chart-svg .fbar.p1 { fill: #16395c; } .chart-svg .fbar.p2 { fill: #7b8ca0; }
.chart-svg .fbar.p3 { fill: #d35400; } .chart-svg .fbar.p4 { fill: #b9dfc4; }
.chart-svg .fbar-t { fill: #fff; font-weight: 700; }
.chart-svg .bar { fill: #16395c; } .chart-svg .bar.bad { fill: #c0392b; }

/* ---------- 내 계정 ---------- */
.acct-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.acct-table th { width: 40%; text-align: left; white-space: nowrap; }
.acct-table td .st-chip { margin-right: 4px; }
.acct-form { max-width: 340px; }
.acct-form .btn { margin-top: 4px; }
a.user-chip { text-decoration: none; }
a.user-chip:hover { background: rgba(255,255,255,.14); }
@media (max-width: 900px) { .acct-wrap { grid-template-columns: 1fr; } }

/* ---------- 오류 화면 ---------- */
.err-page { text-align: center; padding: 80px 20px; }
.err-code { font-size: 64px; font-weight: 700; color: var(--line); line-height: 1; }
.err-page h1 { font-size: 22px; margin: 14px 0 8px; }
.err-page p { color: var(--muted); margin: 0 0 26px; }

/* ---------- 회원 관리 (관리자) ---------- */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-head .result-h { margin: 0; }
.table-scroll { overflow-x: auto; }
.admin-table { width: 100%; min-width: 900px; }
.admin-table td { vertical-align: top; }
.admin-table small { color: var(--muted); }
.admin-table .mono { font-family: Consolas, "Courier New", monospace; font-size: 12.5px; }
.admin-table select { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font-size: 12.5px; font-family: inherit; }
.admin-table .empty { text-align: center; color: var(--muted); padding: 24px 0; }
.adm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.st-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.st-chip.st-pending { background: var(--warn-bg); color: var(--warn); }
.st-chip.st-active { background: var(--ok-bg); color: var(--ok); }
.st-chip.st-rejected, .st-chip.st-disabled { background: var(--ng-bg); color: var(--ng); }
tr.st-pending { background: #fffdf5; }

/* ---------- dashboard ---------- */
.dash-head { margin-bottom: 26px; }
.dash-head h1 { font-size: 26px; margin-bottom: 6px; }
.dash-head p { color: var(--muted); margin: 0; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.tool-card {
  display: flex; gap: 16px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
a.tool-card:hover { transform: translateY(-2px); border-color: #b9c6d8; box-shadow: 0 4px 8px rgba(15,43,70,.1), 0 10px 28px rgba(15,43,70,.1); }
/* 준비 중 카드: 흐리게 + 회색조 아이콘 + 클릭 불가 표시 */
.tool-card-disabled { opacity: .72; background: #fafbfc; cursor: not-allowed; }
.tool-card-disabled .tool-icon { background: #eef1f4 !important;
  color: #9aa4ae !important; box-shadow: none; }
.tool-card-disabled h3 { color: #6b757e; }
.tool-icon {
  flex: none; width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: #eaf0f7; color: var(--navy-2);
}
/* 툴별 아이콘 색 — 사용 가능한 툴은 각자 색으로 구분 */
.tool-icon-bolt { background: #fdf3dd; color: #8a6d1a; }
.tool-icon-gear { background: #e6f0fb; color: #1a5fb4; }      /* 기어 지오메트리 */
.tool-icon-planet { background: #e8f6f3; color: #1d7d72; }    /* 유성기어 */
.tool-icon-strength { background: #f3ecfa; color: #7a4baf; }  /* 기어 강도 */
.tool-icon-flow { background: #e9f2f7; color: #2b6f8a; }      /* 유체 */
.tool-icon-shaft { background: #f1f0ec; color: #6b6355; }     /* 축 */
.tool-icon-fit { background: #fceee6; color: #b0562a; }       /* 축-허브 결합 */

/* fitkey — 한 줄 복수 입력(es/ei, fs 3종)과 상세 접기 박스 */
.pair-in { display: flex; gap: 6px; }
.pair-in input { min-width: 0; flex: 1; }
.adv-box { margin-top: 10px; border: 1px dashed var(--line, #d8dee6);
  border-radius: 8px; padding: 6px 10px; }
.adv-box summary { cursor: pointer; font-size: 13px; color: #5a6470; }
.adv-box .fgrid { margin-top: 8px; }

/* fitkey — 단면·선도 SVG */
.fk-svg .fk-hub { fill: #eef2f7; stroke: #16395c; stroke-width: .55; }
.fk-svg .fk-shaft { fill: #dde7f2; stroke: #16395c; stroke-width: .45; }
.fk-svg .fk-bore { fill: #fff; stroke: #7b8ca0; stroke-width: .35; stroke-dasharray: 1.2 .8; }
.fk-svg .fk-key { fill: #f5c98f; stroke: #b0562a; stroke-width: .4; }
.fk-svg .fk-parr { stroke: #c0392b; stroke-width: .35; marker: none; }
.fk-svg .fk-lab { font-size: 2px; fill: #46566b; }
.fk-svg .fk-lab.dim { fill: #7b8ca0; }
.fk-svg .fk-lab.key { fill: #b0562a; font-weight: 700; }
.chart-svg .fk-band { fill: rgba(123, 140, 160, .16); }
.chart-svg .fk-elim { stroke: #8a4baf; stroke-width: .28; stroke-dasharray: 1 .8; }
.chart-svg .fk-pt { fill: #16395c; }
.chart-svg .fk-bar.s1 { fill: #4a90d9; }
.chart-svg .fk-bar.s2 { fill: #d35400; }
.chart-svg .fk-zline { stroke: #1d7d72; stroke-width: .35; }
.chart-svg .fk-zline.mx { stroke: #c0392b; stroke-dasharray: 1.2 .9; }
a.tool-card:hover .tool-icon { box-shadow: 0 0 0 3px rgba(26, 95, 180, .10); }
/* 좁은 폭에서도 제목은 어절 단위로만 접히고, 배지는 통째로 유지 */
.tool-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tool-title-row h3 { font-size: 16.5px; word-break: keep-all; }
.tool-subtitle { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 2px; letter-spacing: .3px; }
.tool-desc { color: var(--muted); font-size: 13px; margin: 8px 0 0; word-break: keep-all; }
.tool-body { min-width: 0; }
.badge { border-radius: 999px; font-size: 11px; font-weight: 700; padding: 2.5px 9px; letter-spacing: .2px;
  white-space: nowrap; flex: none; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-muted { background: #edf0f4; color: var(--muted); }
.dash-foot { color: var(--muted); font-size: 12px; margin-top: 34px; }

/* ---------- calculator ---------- */
.tool-actionbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.meta-fields { display: flex; gap: 14px; flex-wrap: wrap; }
.meta-fields label { font-size: 11.5px; font-weight: 700; color: var(--muted); display: grid; gap: 4px; }
.meta-fields input {
  border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px;
  font-size: 13px; font-family: inherit; min-width: 220px; font-weight: 400;
}
.actionbar-btns { display: flex; gap: 8px; }
.actionbar-btns .btn-ghost { color: var(--navy-2); }

.calc-layout { display: grid; grid-template-columns: 460px 1fr; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .calc-layout { grid-template-columns: 1fr; } }

.input-panel { display: grid; gap: 14px; }
.input-section {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px 18px;
}
.input-section h3 { font-size: 14.5px; margin-bottom: 13px; display: flex; align-items: baseline; gap: 7px; }
.input-section h3 small { font-size: 11.5px; }
.sec-no { color: var(--gold); background: var(--navy); border-radius: 6px; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.f span { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; color: #46566b; margin-bottom: 4px; }
.f input, .f select {
  width: 100%; border: 1px solid var(--line); border-radius: 7px;
  padding: 7px 9px; font-size: 13.5px; font-family: inherit; background: #fff;
}
.f input:focus, .f select:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(22,57,92,.1); }

.plates-block { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.plates-head { display: flex; flex-direction: column; margin-bottom: 8px; }
.plates-head span { font-size: 12px; font-weight: 700; color: #46566b; }
.plates-head small { font-size: 11px; }
.plate-row { display: grid; grid-template-columns: 52px 1fr 90px 24px; gap: 8px; align-items: center; margin-bottom: 6px; }
.plate-no { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.plate-row select, .plate-row input {
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px;
  font-size: 13px; font-family: inherit; background: #fff; width: 100%;
}
.plate-lk { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.plate-lk b { color: var(--text); }

/* ---------- results ---------- */
.result-panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; min-height: 400px;
  position: sticky; top: 68px;
  max-height: calc(100vh - 84px); overflow: auto;
}
@media (max-width: 1100px) {
  /* overflow:auto가 남으면 #alert-dock sticky의 기준이 (스크롤되지 않는)
     패널이 되어 고정이 무력화됨 — 반드시 visible로 해제 */
  .result-panel { position: static; max-height: none; overflow: visible; }
}
/* 경고 안의 추천값 적용 버튼 */
.fix-btn { display: inline-block; margin-left: 6px; padding: 1px 9px;
  font: inherit; font-size: 0.8rem; line-height: 1.6; cursor: pointer;
  color: #7a4a00; background: #fff6e3; border: 1px solid #e3b872;
  border-radius: 999px; white-space: nowrap; }
.fix-btn:hover { background: #ffefcc; border-color: #d19a3c; }
.fix-btn:active { transform: translateY(1px); }
.fix-opts { margin-top: 5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.fix-opts-lead { font-size: 0.78rem; color: #8a7a5c; margin-right: 2px; }
@keyframes fix-flash { 0% { background: #fff0c9; } 100% { background: inherit; } }
input.fix-applied { animation: fix-flash 1.6s ease-out; outline: 2px solid #e3b872; }
/* 자동 계산된 입력값 / 과잉지정 충돌 — 기어·유성 공통 */
input.auto-val { color: #1d7d72; background: #eefaf7; font-style: italic; }
input.conflict { background: #fdeaea !important; color: #c0392b !important;
  outline: 2px solid #e57373; border-radius: 3px; }
/* 기어별 값 입력 표 — 항목|피니언|기어 (기어·유성 공통, 짝 정렬 유지) */
.pg-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 4px; }
.pg-table th, .pg-table td { border: 1px solid var(--line, #d8dee6); padding: 3px 6px; }
.pg-table thead th { background: var(--bg-soft, #f2f5f9); text-align: center; font-size: 0.8rem; }
.pg-table tbody th { text-align: left; font-weight: 500; background: var(--bg-soft, #f8fafc); width: 44%; word-break: keep-all; }
.pg-table tbody th em { font-style: normal; color: #8a939c; font-size: 0.74rem; margin-left: 4px; }
.pg-table td input { width: 100%; border: none; padding: 4px 6px; font: inherit; background: transparent; }
.pg-table td input:focus { outline: 2px solid #7aa7d8; border-radius: 3px; }
.pg-table td select { border: 1px solid var(--line, #d8dee6); border-radius: 4px;
  padding: 3px 4px; font: inherit; background: #fff; max-width: 100%; }
.pg-table-3 tbody th { width: 28%; }     /* 선·유성·링 3열 */
.pg-table td.na { text-align: center; color: #a7b0b8; font-size: 0.78rem;
  background: repeating-linear-gradient(135deg, #fafbfc 0 6px, #f2f4f7 6px 12px); }
.pg-table thead th small { display: block; font-weight: 500; color: #8a939c;
  font-size: 0.72rem; }
/* 공구 도면 범례/제목 — SVG 밖 HTML (기어·유성 공통) */
.tool-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2px 18px; font-size: 0.82rem; color: #334; padding: 8px 6px 2px;
  border-top: 1px dashed var(--line, #d8dee6); margin-top: 6px; }
.tool-legend span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-legend span:first-child { font-weight: 600; }
.tool-title { font-size: 0.9rem; font-weight: 600; color: #24313f;
  margin: 14px 2px 2px; padding-top: 8px; border-top: 2px solid var(--line, #d8dee6); }
.tool-title:first-child { margin-top: 2px; border-top: none; padding-top: 0; }
/* 공구 도면 여러 종을 한 화면에 (세로로 쌓으면 마지막 도면이 묻힘)
   ※ 대시보드의 .tool-grid/.tool-card와 이름이 겹치지 않도록 별도 접두사 */
.gtool-grid { display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.gtool-card { border: 1px solid var(--line, #d8dee6); border-radius: 8px;
  padding: 6px 8px 8px; min-width: 0; }
.gtool-card .tool-title { margin-top: 0; padding-top: 0; border-top: none; }
.gtool-card svg { max-height: 260px; }
.gtool-card .tool-legend { grid-template-columns: 1fr; font-size: 0.76rem; }
/* KPI 카드 — 주요 결과 한눈에 (기어·유성 공통) */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 8px; margin: 10px 0 4px; }
.kpi { border: 1px solid var(--line, #d8dee6); border-radius: 10px; padding: 8px 12px; background: var(--bg-soft, #f8fafc); min-width: 0; }
.kpi b { display: block; font-size: 1.04rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { color: #67707a; font-size: 0.76rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.ok b { color: #1d7d72; } .kpi.warn b { color: #b7791f; } .kpi.bad b { color: #c0392b; }
/* SVG 하단 노트 줄 (뷰 상태 노트 + 줌 힌트) — 기어·유성 공통 */
.svg-foot { display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; margin-top: 3px; }
.svg-foot small { color: #8a939c; font-size: 0.78rem; }
.svg-foot .zoom-hint { flex: none; color: #b3bac1; }
/* 판정·경고 도크 — 결과를 스크롤해도 계속 보임 (결과 패널 상단 고정) */
#alert-dock { position: sticky; top: -21px; z-index: 30;
  background: var(--panel, #fff); margin: 0 0 10px; padding: 6px 0 4px;
  max-height: 42vh; overflow-y: auto;
  box-shadow: 0 8px 10px -8px rgba(15, 27, 42, .22); }
@media (max-width: 1100px) { #alert-dock { top: 58px; } }
.result-empty { color: var(--muted); text-align: center; padding: 90px 0; }
.result-empty svg { opacity: .35; margin-bottom: 12px; }

.overall-banner {
  border-radius: 9px; padding: 13px 16px; font-size: 15px; font-weight: 700;
  margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.overall-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe3cf; }
.overall-ng { background: var(--ng-bg); color: var(--ng); border: 1px solid #f1c2c7; }

.result-h { font-size: 14.5px; margin: 20px 0 10px; }
.sum-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sum-table th, .sum-table td { padding: 6.5px 8px; border-bottom: 1px solid #edf0f4; text-align: left; }
.sum-table th { font-size: 11.5px; color: var(--muted); font-weight: 700; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.sum-table td.num, .sum-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sum-table .v-ok { color: var(--ok); font-weight: 700; }
.sum-table .v-ng { color: var(--ng); font-weight: 700; }
.sum-table .v-na { color: var(--muted); }
.sum-step { color: var(--muted); font-size: 11.5px; font-weight: 700; }

.acc-item { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.acc-head {
  width: 100%; text-align: left; background: #f7f9fc; border: none;
  padding: 9px 13px; font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--text);
}
.acc-head:hover { background: #eef2f8; }
.acc-head .rid { color: var(--gold); background: var(--navy); border-radius: 5px; font-size: 10.5px; padding: 2px 7px; font-weight: 700; min-width: 26px; text-align: center; }
.acc-head .chev { margin-left: auto; color: var(--muted); transition: transform .15s; }
.acc-item.open .chev { transform: rotate(90deg); }
.acc-body { display: none; }
.acc-item.open .acc-body { display: block; }
.step-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.step-table td { padding: 5px 12px; border-top: 1px solid #f0f3f7; vertical-align: top; }
.step-table .sym { font-weight: 600; white-space: nowrap; width: 74px; color: var(--navy-2); }
.step-table .lbl { color: #46566b; }
.step-table .val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.step-table .unit { color: var(--muted); width: 50px; white-space: nowrap; }
.step-table .note { color: var(--muted); font-size: 11.5px; }
.step-table .val.v-ok { color: var(--ok); }
.step-table .val.v-ng { color: var(--ng); }

/* ---------- 진단 ---------- */
.diag-card { border: 1px solid var(--line); border-radius: 9px; padding: 11px 14px; margin-bottom: 9px; }
.diag-card.diag-ng { border-color: #f1c2c7; background: #fdf5f6; }
.diag-card.diag-ok { background: #f8fcfa; }
.diag-card.diag-na { background: #f8f9fb; }
.diag-head { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 4px; }
.diag-head small { font-size: 11px; }
.diag-chip { border-radius: 5px; font-size: 10.5px; font-weight: 800; padding: 2px 7px; letter-spacing: .3px; }
.chip-ng { background: var(--ng); color: #fff; }
.chip-ok { background: var(--ok); color: #fff; }
.chip-na { background: #cbd5e1; color: #47566a; }
.diag-text { margin: 0; font-size: 12.5px; color: #384555; }
.diag-remedy { margin: 6px 0 0; font-size: 12.5px; color: var(--ng); }
.diag-rest { margin: 4px 0 10px; }
.diag-rest summary { cursor: pointer; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; user-select: none; }
.diag-rest .diag-card { margin-top: 6px; }
.sum-explain { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.sum-table tr.row-ng td { background: #fdf5f6; }

/* ---------- 모달 / 드로어 ---------- */
.btn-link { background: none; border: none; color: var(--navy-2); font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; font-family: inherit; text-decoration: underline; }
.btn-link:hover { color: var(--navy); }
.plates-head-row { display: flex; justify-content: space-between; align-items: center; }
.modal-back, .drawer-back {
  position: fixed; inset: 0; background: rgba(15, 27, 42, .45);
  z-index: 100; display: flex; align-items: center; justify-content: center;
}
/* hidden 속성이 위의 display:flex에 지지 않도록 (도움말이 안 닫히던 버그 수정) */
.modal-back[hidden], .drawer-back[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 14px; box-shadow: 0 12px 48px rgba(0,0,0,.25);
  padding: 24px 26px; width: min(560px, 92vw); max-height: 88vh; overflow: auto;
}
.modal h3 { font-size: 17px; margin-bottom: 6px; }
.modal-hint { color: var(--muted); font-size: 12.5px; margin: 0 0 16px; }
.modal-err { color: var(--ng); font-size: 12.5px; min-height: 18px; margin-top: 8px; }
.modal-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.modal .btn-ghost { color: var(--navy-2); }
.cm-list { margin-top: 14px; }
.cm-list h4 { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
.cm-item { display: flex; align-items: center; gap: 10px; border-top: 1px solid #f0f3f7; padding: 7px 2px; font-size: 13px; }
.cm-item small { color: var(--muted); flex: 1; }
.cm-item .cm-del { color: var(--ng); }

.save-list { max-height: 50vh; overflow: auto; margin: 6px 0 12px; }
.save-item { display: flex; align-items: center; gap: 10px; border-top: 1px solid #f0f3f7; padding: 9px 2px; }
.save-item:first-child { border-top: none; }
.save-info { flex: 1; display: grid; gap: 1px; }
.save-info b { font-size: 13.5px; }
.save-info small { color: var(--muted); font-size: 11.5px; }
.save-info .v-ng { color: var(--ng); }
.save-info .v-ok { color: var(--ok); }
.save-item .btn-ghost { color: var(--navy-2); }
.save-item .btn-danger { color: var(--ng); border-color: var(--ng); }
.help-p { font-size: 12.5px; color: #384555; margin: 0 0 8px; }

.drawer-back { justify-content: flex-end; align-items: stretch; }
.drawer {
  background: #fff; width: min(620px, 94vw); height: 100%;
  box-shadow: -8px 0 40px rgba(0,0,0,.25); display: flex; flex-direction: column;
}
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  background: var(--navy); color: #fff;
}
.drawer-head h3 { font-size: 15px; }
.drawer-close { background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; line-height: 1; padding: 0 2px; }
.drawer-body { padding: 18px 24px 40px; overflow: auto; }
.drawer-body h4 { font-size: 14px; margin: 20px 0 8px; color: var(--navy); }
.drawer-body h4:first-child { margin-top: 0; }
.help-steps { margin: 0; padding-left: 20px; font-size: 13px; }
.help-steps li { margin-bottom: 5px; }
.help-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.help-table th, .help-table td { border: 1px solid #e6ebf2; padding: 7px 10px; text-align: left; vertical-align: top; }
.help-table th { background: #f4f7fb; white-space: nowrap; font-size: 12px; width: 128px; }
.help-faq dt { font-weight: 700; font-size: 13px; margin-top: 10px; }
.help-faq dd { margin: 3px 0 0 0; font-size: 12.5px; color: #384555; }
.help-src { padding-left: 18px; font-size: 12px; color: var(--muted); }
.help-src li { margin-bottom: 3px; }

.result-notes { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 10px; }
.result-notes p { color: var(--muted); font-size: 11.5px; margin: 3px 0; }
#warning-box .alert, #error-box .alert { margin-bottom: 10px; }

/* ---------- print report ---------- */
.print-only { display: none; }
@media print {
  body { background: #fff; font-size: 11px; }
  .no-print { display: none !important; }
  .print-only { display: block; }
  @page { size: A4; margin: 14mm 13mm; }
}
.rep { color: #111; font-family: "Segoe UI", "Malgun Gothic", sans-serif; }
.rep h1 { font-size: 18px; border-bottom: 2.5px solid var(--navy); padding-bottom: 6px; margin-bottom: 2px; }
.rep .rep-sub { color: #555; font-size: 10.5px; margin-bottom: 14px; }
.rep table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.rep th, .rep td { border: 1px solid #c9d2dd; padding: 4px 7px; font-size: 10.5px; text-align: left; }
.rep th { background: #eef2f7; font-weight: 700; }
.rep td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rep .v-ok { color: var(--ok); font-weight: 700; }
.rep .v-ng { color: var(--ng); font-weight: 700; }
.rep h2 { font-size: 13px; margin: 14px 0 6px; }
.rep .rep-overall { border: 1.5px solid; border-radius: 6px; padding: 8px 12px; font-size: 12.5px; font-weight: 700; margin: 10px 0 14px; }
.rep .rep-overall.ok { color: var(--ok); border-color: var(--ok); background: var(--ok-bg); }
.rep .rep-overall.ng { color: var(--ng); border-color: var(--ng); background: var(--ng-bg); }
.rep .rep-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.rep .rep-notes p { font-size: 9.5px; color: #555; margin: 2px 0; }
.rep .step-block { break-inside: avoid; }
.oh-svg .oh-dim { stroke: #7b8ca0; stroke-width: .25; }

/* ---------- 베타 표기 ---------- */
.beta-badge { background: var(--gold); color: #35270a; font-size: 10px;
  font-weight: 800; letter-spacing: .06em; border-radius: 5px;
  padding: 2px 6px; margin-left: 2px; align-self: center; }
.beta-inline { background: var(--gold); color: #35270a; font-size: 15px;
  font-weight: 800; letter-spacing: .06em; border-radius: 7px;
  padding: 3px 9px; vertical-align: middle; }
.beta-free { color: var(--gold); font-weight: 700; }
.st-chip.st-locked { background: #efe3f5; color: #8a4baf; }
.name-form { display: flex; gap: 6px; align-items: center; }
.name-form input[type="text"] { flex: 1; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; font-size: 13px; font-family: inherit; }

/* 입력 라벨(.f span)은 flex space-between 이라 <sub>·<i> 같은 인라인 조각이
   오른쪽 끝으로 밀려난다 (예: "요구 정적 안전율 S ......... F").
   기호가 글줄에 붙도록 이 조각들은 flex 항목에서 제외한다.
   단위 <u>·<b>는 기존처럼 오른쪽 정렬을 유지한다. */
.f > span sub, .f > span sup { display: contents; font-size: .78em; }
.f > span i { display: contents; font-style: italic; }

/* ---------- DIN 743 축 구간 압축 행 ---------- */
.sec-head { display: grid; grid-template-columns: 1fr 1fr 1fr 26px 24px;
  gap: 6px; padding: 0 9px 3px; font-size: 10.5px; font-weight: 700;
  color: var(--muted); }
.card-rows.compact { gap: 5px; }
.sec-row { padding: 6px 8px; }
.sec-line { display: grid; grid-template-columns: 1fr 1fr 1fr 26px 24px;
  gap: 6px; align-items: center; }
.sec-detail { display: grid; grid-template-columns: 74px 74px 1fr 1fr;
  gap: 8px; margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed var(--line); align-items: end; }
.sec-detail.off { display: none; }
.rt-more { border: none; background: none; cursor: pointer; padding: 0;
  font-size: 14px; color: var(--muted); position: relative; line-height: 1; }
.rt-more:hover { color: var(--navy-2); }
.rt-more.dot::after { content: ""; position: absolute; top: -1px; right: -3px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.sec-row .crow-note { margin-top: 3px; font-size: 11px; }
.row-flash { outline: 2px solid var(--gold); outline-offset: 1px;
  transition: outline-color 1.2s; }
.oh-svg .oh-axis0 { stroke: #16395c; stroke-width: .35; stroke-dasharray: 5 2 1 2; }
.oh-svg .oh-lab.axis0 { fill: #16395c; font-weight: 700; }
.shaft-svg { max-height: 540px; }
.shaft-svg .sh-lab.dim2 { fill: #7b8ca0; }
.stale { opacity: .35; filter: grayscale(.6); transition: opacity .2s; }

/* ---------- 크게 보기 (전체화면 뷰) ---------- */
.fullview-back { position: fixed; inset: 0; background: rgba(10, 22, 36, .78);
  z-index: 300; display: flex; padding: 22px; }
.fullview { background: var(--panel); border-radius: 12px; flex: 1;
  display: flex; flex-direction: column; padding: 12px 16px 10px; min-width: 0; }
.fullview-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.fullview-head .dim-note { color: var(--muted); font-size: 12px; }
.fullview-head .fv-close { margin-left: auto; }
.fullview-area { flex: 1; min-height: 0; display: flex; }
.fullview-area svg { width: 100%; height: 100%; max-height: none !important;
  max-width: none !important; }
.vsep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 3px; }
