/* ==========================================================================
   WISMAX 3D 데모 체험 — 풀페이지 전용 스타일
   solution/demo.php 에서 단독 페이지로 사용합니다.
   페이지 자체는 스크롤하지 않고, 우측 패널만 내부 스크롤합니다.
   사이트가 흰 배경이므로 밝은 테마로 맞췄습니다.
   ========================================================================== */

:root {
  --wm3d-bg:      #eef2f7;   /* 작업 영역 배경 */
  --wm3d-surface: #ffffff;   /* 카드 · 패널 */
  --wm3d-line:    #dde4ed;
  --wm3d-line-2:  #eaeff5;
  --wm3d-txt:     #16202e;
  --wm3d-txt-2:   #46586e;
  --wm3d-dim:     #7c8ca0;
  --wm3d-accent:  #0284c7;
  --wm3d-accent-s:#e0f2fe;
  --wm3d-blue:    #2563eb;
  --wm3d-ok:      #059669;
  --wm3d-warn:    #b45309;
  --wm3d-bad:     #dc2626;
  --wm3d-shadow:  0 1px 2px rgba(15,32,55,.06), 0 8px 24px rgba(15,32,55,.07);
  --wm3d-top-h:   60px;
  --wm3d-panel-w: clamp(360px, 26vw, 460px);
}

html.wm3d-page, html.wm3d-page body {
  height: 100%; margin: 0; padding: 0;
  overflow: hidden;                    /* 페이지 스크롤 제거 — 휠은 3D 조작 전용 */
  overscroll-behavior: none;
}
html.wm3d-page body {
  background: var(--wm3d-bg);
  color: var(--wm3d-txt);
  font-family: "Pretendard", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wm3d { height: 100%; display: flex; flex-direction: column; }
.wm3d *, .wm3d *::before, .wm3d *::after { box-sizing: border-box; }
.wm3d button { font-family: inherit; cursor: pointer; }
.wm3d a { text-decoration: none; }

/* ------------------------------ 상단 바 ------------------------------ */
.wm3d-top {
  flex: 0 0 var(--wm3d-top-h); height: var(--wm3d-top-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 clamp(14px, 2vw, 26px);
  background: var(--wm3d-surface);
  border-bottom: 1px solid var(--wm3d-line);
  z-index: 20;
}
.wm3d-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--wm3d-txt-2);
  border: 1px solid var(--wm3d-line); border-radius: 9px;
  padding: 8px 13px; transition: .16s; white-space: nowrap;
}
.wm3d-back:hover { color: var(--wm3d-accent); border-color: var(--wm3d-accent); background: var(--wm3d-accent-s); }
.wm3d-back span { font-size: 14px; line-height: 1; }

.wm3d-title { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.wm3d-title strong {
  font-size: 15px; font-weight: 700; letter-spacing: -.02em; color: var(--wm3d-txt);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wm3d-title em {
  font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--wm3d-accent); text-transform: uppercase;
}

.wm3d-tabs {
  margin-left: auto; display: flex; gap: 4px;
  background: var(--wm3d-bg); border: 1px solid var(--wm3d-line);
  border-radius: 11px; padding: 4px;
}
.wm3d-tabs button {
  border: 0; background: transparent; color: var(--wm3d-txt-2);
  font-size: 12.5px; font-weight: 600; padding: 7px 14px; border-radius: 8px;
  white-space: nowrap; transition: .16s;
}
.wm3d-tabs button:hover { color: var(--wm3d-txt); background: #fff; }
.wm3d-tabs button.on { background: var(--wm3d-accent); color: #fff; }

.wm3d-topcta {
  font-size: 13px; font-weight: 700; color: #fff;
  background: var(--wm3d-blue); border-radius: 9px; padding: 9px 18px;
  transition: .16s; white-space: nowrap;
}
.wm3d-topcta:hover { filter: brightness(1.08); }

/* ------------------------------- 본문 ------------------------------- */
.wm3d-body {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--wm3d-panel-w);
}

.wm3d-view {
  position: relative; min-width: 0; min-height: 0;
  background: var(--wm3d-bg); overflow: hidden;
}
.wm3d-view canvas { display: block; width: 100%; height: 100%; }

/* ------------------------------ 핫스팟 핀 ------------------------------ */
.wm3d-pins { position: absolute; inset: 0; pointer-events: none; }
.wm3d-pin {
  position: absolute;
  /* 요소 전체가 아니라 '점'의 중심이 3D 좌표에 오도록 맞춥니다.
     이름표(.tip)는 숨겨져 있어도 자리를 차지하므로 -50% 로 맞추면 점이 왼쪽으로 밀립니다. */
  transform: translate(-8px, -50%);
  display: flex; align-items: center; gap: 9px;
  pointer-events: auto; cursor: pointer;
  transition: opacity .22s ease;
}
.wm3d-pin .dot {
  position: relative; flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--wm3d-accent); border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(2,132,199,.5), 0 2px 8px rgba(15,32,55,.28);
}
.wm3d-pin .dot::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--wm3d-accent); opacity: .6;
  animation: wm3d-ping 2.4s cubic-bezier(0, 0, .2, 1) infinite;
}
@keyframes wm3d-ping {
  0%   { transform: scale(.6); opacity: .8; }
  70%  { transform: scale(2.1); opacity: 0; }
  100% { opacity: 0; }
}
.wm3d-pin .tip {
  background: #fff; border: 1px solid var(--wm3d-line);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 600;
  color: var(--wm3d-txt); white-space: nowrap; box-shadow: var(--wm3d-shadow);
  opacity: 0; transform: translateX(-5px); transition: .2s ease;
}
.wm3d-pin:hover .tip, .wm3d-pin.on .tip { opacity: 1; transform: none; }
.wm3d-pin.on .dot { background: #fff; border-color: var(--wm3d-accent); box-shadow: 0 0 0 4px rgba(2,132,199,.25); }
.wm3d-pin.hidden { opacity: 0; pointer-events: none; }

.wm3d-pin[data-state="warn"] .dot { background: #d97706; box-shadow: 0 0 0 1px rgba(217,119,6,.5), 0 2px 8px rgba(15,32,55,.28); }
.wm3d-pin[data-state="warn"] .dot::after { border-color: #d97706; }
.wm3d-pin[data-state="bad"]  .dot { background: var(--wm3d-bad); box-shadow: 0 0 0 1px rgba(220,38,38,.5), 0 2px 10px rgba(220,38,38,.4); }
.wm3d-pin[data-state="bad"]  .dot::after { border-color: var(--wm3d-bad); animation-duration: 1s; }

/* 전체 보기의 구역 라벨 */
.wm3d-zonepin { transform: translate(-50%, -100%); }
.wm3d-zonepin .zbox {
  display: block; min-width: 186px; text-align: left; position: relative;
  background: #fff; border: 1px solid var(--wm3d-line);
  border-radius: 13px; padding: 13px 16px; box-shadow: var(--wm3d-shadow);
  transition: .18s ease;
}
.wm3d-zonepin .zbox::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px;
  transform: translateX(-50%) rotate(45deg); background: #fff;
  border-right: 1px solid var(--wm3d-line); border-bottom: 1px solid var(--wm3d-line);
}
.wm3d-zonepin:hover .zbox {
  border-color: var(--wm3d-accent); transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(15,32,55,.08), 0 14px 32px rgba(15,32,55,.14);
}
.wm3d-zonepin:hover .zbox::after { border-color: var(--wm3d-accent); }
.wm3d-zonepin b { display: block; font-size: 14.5px; color: var(--wm3d-txt); letter-spacing: -.015em; }
.wm3d-zonepin em { display: block; font-style: normal; font-size: 11.5px; color: var(--wm3d-dim); margin-top: 3px; }
.wm3d-zonepin i {
  display: block; font-style: normal; font-size: 10.5px; font-weight: 700;
  color: var(--wm3d-accent); margin-top: 8px;
}

/* --------------------------- 뷰포트 위 UI --------------------------- */
.wm3d-crumb {
  position: absolute; left: 18px; top: 18px; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.92); border: 1px solid var(--wm3d-line);
  border-radius: 10px; padding: 8px 14px; box-shadow: var(--wm3d-shadow);
  font-size: 12.5px; backdrop-filter: blur(6px);
}
.wm3d-crumb:empty { display: none; }
.wm3d-crumb .here { font-weight: 700; color: var(--wm3d-txt); }
.wm3d-crumb em { font-style: normal; color: var(--wm3d-dim); font-size: 11.5px; }
.wm3d-crumb button { border: 0; background: transparent; color: var(--wm3d-accent); font-size: 12.5px; font-weight: 700; padding: 0; }
.wm3d-crumb button:hover { text-decoration: underline; }
.wm3d-crumb button + .here::before { content: "/"; color: #c3cedb; font-weight: 400; margin-right: 10px; }

.wm3d-hint {
  position: absolute; left: 18px; bottom: 18px; z-index: 4;
  display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--wm3d-dim);
  background: rgba(255,255,255,.9); border: 1px solid var(--wm3d-line);
  padding: 7px 14px; border-radius: 999px; box-shadow: var(--wm3d-shadow);
}
.wm3d-hint b { color: var(--wm3d-txt-2); font-weight: 700; }

.wm3d-reset {
  position: absolute; right: 18px; top: 18px; z-index: 4;
  border: 1px solid var(--wm3d-line); background: rgba(255,255,255,.92);
  color: var(--wm3d-txt-2); border-radius: 9px; padding: 8px 14px;
  font-size: 12px; font-weight: 600; box-shadow: var(--wm3d-shadow);
}
.wm3d-reset:hover { color: var(--wm3d-accent); border-color: var(--wm3d-accent); }

/* 시나리오 자막 */
.wm3d-caption {
  position: absolute; left: 50%; bottom: 66px; transform: translateX(-50%);
  z-index: 5; width: min(720px, calc(100% - 56px));
  background: #fff; border: 1px solid var(--wm3d-line);
  border-radius: 14px; padding: 15px 20px;
  box-shadow: 0 2px 6px rgba(15,32,55,.08), 0 18px 44px rgba(15,32,55,.16);
  opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.wm3d-caption.show { opacity: 1; pointer-events: auto; }
.wm3d-caption p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--wm3d-txt); min-height: 1.65em; }

/* 재생 컨트롤 — 일시정지 · 드래그 탐색 · 시간 · 종료 */
.wm3d-player { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.wm3d-player button {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  border: 1px solid var(--wm3d-line); background: #fff; color: var(--wm3d-txt);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.wm3d-player button svg { width: 13px; height: 13px; fill: currentColor; }
.wm3d-player button:hover { border-color: var(--wm3d-accent); color: var(--wm3d-accent); }
.wm3d-player .pp { background: var(--wm3d-accent); border-color: var(--wm3d-accent); color: #fff; }
.wm3d-player .pp:hover { color: #fff; filter: brightness(1.08); }
.wm3d-player .x { width: 26px; height: 26px; color: var(--wm3d-dim); }
.wm3d-player .x svg { width: 11px; height: 11px; }
.wm3d-player .track {
  position: relative; flex: 1 1 auto; height: 22px; cursor: pointer; touch-action: none; outline: none;
}
.wm3d-player .rail {
  position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px;
  border-radius: 2px; background: var(--wm3d-line-2); overflow: hidden; transition: height .15s ease, margin .15s ease;
}
.wm3d-player .track:hover .rail, .wm3d-caption.scrub .rail { height: 6px; margin-top: -3px; }
.wm3d-player .rail i { display: block; height: 100%; width: 0; background: var(--wm3d-accent); }
.wm3d-player .cues { position: absolute; inset: 0; pointer-events: none; }
.wm3d-player .cues i {
  position: absolute; top: 50%; width: 2px; height: 10px; margin: -5px 0 0 -1px;
  border-radius: 1px; background: #b8c4d2;
}
.wm3d-player .cues i.on { background: #fff; opacity: .9; }
.wm3d-player .knob {
  position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: #fff; border: 2px solid var(--wm3d-accent);
  box-shadow: 0 1px 4px rgba(15,32,55,.25); transition: transform .15s ease;
}
.wm3d-player .track:hover .knob, .wm3d-caption.scrub .knob { transform: scale(1.18); }
.wm3d-player .track:focus-visible .knob { box-shadow: 0 0 0 4px rgba(2,132,199,.22); }
.wm3d-player .track::after {
  content: attr(data-tip); position: absolute; bottom: 100%; left: var(--tx, 0); transform: translateX(-50%);
  margin-bottom: 2px; padding: 1px 6px; border-radius: 5px; background: #1f2937; color: #fff;
  font-size: 10.5px; opacity: 0; transition: opacity .15s ease; pointer-events: none;
}
.wm3d-player .track:hover::after { opacity: 1; }
.wm3d-player .tm {
  flex: 0 0 auto; min-width: 74px; text-align: right;
  font-size: 12px; font-variant-numeric: tabular-nums; color: var(--wm3d-dim);
}
.wm3d-caption.paused .tm { color: var(--wm3d-accent); font-weight: 600; }

/* 알람 토스트 */
.wm3d-toast {
  position: absolute; right: 18px; top: 66px; z-index: 6; width: 274px;
  background: #fff; border: 1px solid #f3b9b9; border-left: 4px solid var(--wm3d-bad);
  border-radius: 13px; padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(15,32,55,.08), 0 18px 44px rgba(180,30,30,.18);
  opacity: 0; transform: translateY(-8px); transition: .3s ease; pointer-events: none;
}
.wm3d-toast.show { opacity: 1; transform: none; }
.wm3d-toast strong { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--wm3d-bad); }
.wm3d-toast strong i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--wm3d-bad);
  animation: wm3d-blink 1s infinite; font-style: normal;
}
@keyframes wm3d-blink { 50% { opacity: .2; } }
.wm3d-toast ul { list-style: none; margin: 9px 0 0; padding: 0; }
.wm3d-toast li { font-size: 11.5px; color: var(--wm3d-txt-2); line-height: 1.8; }
.wm3d-toast li::before { content: "→ "; color: var(--wm3d-bad); }

/* 로딩 */
.wm3d-loading {
  position: absolute; inset: 0; z-index: 9; display: flex; gap: 13px;
  flex-direction: column; align-items: center; justify-content: center;
  background: var(--wm3d-bg); color: var(--wm3d-dim); font-size: 13px; transition: opacity .5s;
}
.wm3d-loading.done { opacity: 0; pointer-events: none; }
.wm3d-loading i {
  width: 26px; height: 26px; border: 2px solid var(--wm3d-line);
  border-top-color: var(--wm3d-accent); border-radius: 50%;
  animation: wm3d-spin .8s linear infinite;
}
@keyframes wm3d-spin { to { transform: rotate(360deg); } }

/* ------------------------------- 패널 ------------------------------- */
.wm3d-panel {
  background: var(--wm3d-surface); border-left: 1px solid var(--wm3d-line);
  padding: 18px 20px 22px; overflow-y: auto; min-height: 0;
  overscroll-behavior: contain;          /* 패널 끝에서 페이지로 스크롤이 넘어가지 않도록 */
}
.wm3d-panel::-webkit-scrollbar { width: 9px; }
.wm3d-panel::-webkit-scrollbar-thumb { background: #cfd8e3; border-radius: 5px; }
.wm3d-panel::-webkit-scrollbar-thumb:hover { background: #b6c2d1; }

.wm3d-empty { display: flex; flex-direction: column; gap: 15px; }
.wm3d-empty h3 { font-size: 17px; margin: 0; color: var(--wm3d-txt); letter-spacing: -.02em; }
.wm3d-empty p { font-size: 13px; line-height: 1.8; color: var(--wm3d-txt-2); margin: 0; }
.wm3d-empty p b { color: var(--wm3d-accent); }

.wm3d-zonelist, .wm3d-list { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wm3d-zonelist button {
  width: 100%; text-align: left; display: block;
  border: 1px solid var(--wm3d-line); background: #fff;
  border-radius: 12px; padding: 14px 16px; color: var(--wm3d-txt); transition: .16s;
}
.wm3d-zonelist button:hover { border-color: var(--wm3d-accent); background: var(--wm3d-accent-s); }
.wm3d-zonelist strong { display: block; font-size: 14px; letter-spacing: -.015em; }
.wm3d-zonelist em { display: block; font-style: normal; font-size: 12px; color: var(--wm3d-dim); margin-top: 5px; line-height: 1.55; }
.wm3d-zonelist span { display: block; font-size: 11px; font-weight: 700; color: var(--wm3d-accent); margin-top: 9px; }

.wm3d-list button {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  border: 1px solid var(--wm3d-line); background: #fff;
  border-radius: 10px; padding: 11px 13px; color: var(--wm3d-txt);
  font-size: 13px; font-weight: 600; transition: .16s;
}
.wm3d-list button:hover { border-color: var(--wm3d-accent); background: var(--wm3d-accent-s); }
.wm3d-list em {
  font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  color: var(--wm3d-accent); background: var(--wm3d-accent-s);
  border-radius: 5px; padding: 3px 8px; flex: 0 0 auto;
}

.wm3d-tag {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--wm3d-accent); background: var(--wm3d-accent-s);
  border: 1px solid #bae0f7; padding: 4px 9px; border-radius: 6px;
}
.wm3d-name { font-size: 18.5px; font-weight: 700; margin: 9px 0 3px; letter-spacing: -.024em; color: var(--wm3d-txt); }
.wm3d-model { font-size: 12px; color: var(--wm3d-dim); font-family: ui-monospace, Consolas, monospace; }
.wm3d-lead { font-size: 12.5px; line-height: 1.66; color: var(--wm3d-txt-2); margin: 7px 0 0; }

.wm3d-live {
  margin: 12px 0 13px; padding: 11px 15px; border-radius: 12px;
  background: linear-gradient(135deg, #f0f9ff, #eef4fd);
  border: 1px solid #c9e5f6;
}
.wm3d-live.alarm { background: linear-gradient(135deg, #fef2f2, #fdeaea); border-color: #f5bcbc; }
.wm3d-vals { display: flex; align-items: stretch; }
.wm3d-vals .v { flex: 1 1 0; min-width: 0; }
.wm3d-live.two .wm3d-vals .v + .v {
  border-left: 1px solid rgba(2,132,199,.22); padding-left: 14px; margin-left: 14px;
}
.wm3d-vals b {
  font-size: 29px; font-weight: 800; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; color: var(--wm3d-txt);
}
.wm3d-live.two .wm3d-vals b { font-size: 25px; }
.wm3d-vals span { font-size: 13px; color: var(--wm3d-dim); font-weight: 700; margin-left: 3px; }
.wm3d-vals em {
  display: block; font-style: normal; font-size: 10.5px; font-weight: 700;
  letter-spacing: .03em; color: var(--wm3d-dim); margin-top: 2px;
}
.wm3d-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 11.5px; }
.wm3d-state { font-weight: 700; color: var(--wm3d-ok); }
.wm3d-state.bad { color: var(--wm3d-bad); }
.wm3d-clock { color: var(--wm3d-dim); }
.wm3d-clock::before { content: "● "; color: var(--wm3d-ok); animation: wm3d-blink 1.6s infinite; }

.wm3d-block { margin-bottom: 9px; }
.wm3d-block h4 {
  font-size: 11px; font-weight: 700; letter-spacing: .09em; color: var(--wm3d-dim);
  text-transform: uppercase; margin: 0 0 7px;
}
.wm3d-chart { width: 100%; height: auto; display: block; border-radius: 11px; background: #f7fafd; border: 1px solid var(--wm3d-line-2); }
.wm3d-legend { display: flex; gap: 14px; margin-top: 7px; font-size: 11px; color: var(--wm3d-dim); }
.wm3d-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.wm3d-desc { font-size: 12.5px; line-height: 1.72; color: var(--wm3d-txt-2); margin: 0; }
.wm3d-desc b { color: var(--wm3d-txt); font-weight: 700; }

.wm3d-spec { width: 100%; border-collapse: collapse; font-size: 12px; }
.wm3d-spec td { padding: 4.5px 0; border-bottom: 1px solid var(--wm3d-line-2); vertical-align: top; line-height: 1.55; color: var(--wm3d-txt); }
.wm3d-spec td:first-child { color: var(--wm3d-dim); width: 38%; padding-right: 10px; }
.wm3d-spec tr:last-child td { border-bottom: 0; }

.wm3d-use { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wm3d-use li { font-size: 12px; line-height: 1.5; color: var(--wm3d-txt-2); padding-left: 19px; position: relative; }
.wm3d-use li::before {
  content: ""; position: absolute; left: 3px; top: 7px;
  width: 6px; height: 6px; border-radius: 2px; background: var(--wm3d-accent);
}

/* 시나리오 카드 */
.wm3d-story {
  margin: 0 0 12px; padding: 11px 14px; border-radius: 12px;
  border: 1px solid #f0dca6; background: #fffbeb;
}
.wm3d-story strong { display: block; font-size: 13.5px; color: #92400e; margin-bottom: 6px; }
.wm3d-story p { margin: 0 0 10px; font-size: 11.5px; line-height: 1.6; color: #8a6a2f; }
.wm3d-story-btns { display: flex; gap: 7px; }
.wm3d-story button {
  flex: 1; border: 0; border-radius: 9px; padding: 9px; font-size: 12.5px; font-weight: 700;
  background: #d97706; color: #fff; transition: .16s;
}
.wm3d-story button:hover { filter: brightness(1.08); }
.wm3d-story button.ghost { flex: 0 0 auto; background: #fff; border: 1px solid #e6cf9a; color: #92400e; padding: 11px 15px; }

.wm3d-cta { display: flex; flex-direction: column; gap: 8px; margin-top: 13px; }
.wm3d-cta a, .wm3d-cta button {
  display: flex; align-items: center; justify-content: center;
  padding: 12px; border: 0; border-radius: 10px; font-size: 13.5px; font-weight: 700;
  background: var(--wm3d-blue); color: #fff; transition: .16s;
}
.wm3d-cta a:hover { filter: brightness(1.08); }
.wm3d-cta .ghost { background: #fff; border: 1px solid var(--wm3d-line); color: var(--wm3d-txt-2); }
.wm3d-cta .ghost:hover { color: var(--wm3d-accent); border-color: var(--wm3d-accent); }

/* 대체 화면 */
.wm3d-fallback {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; height: 100%; padding: 60px 24px; text-align: center;
  color: var(--wm3d-txt-2); font-size: 13.5px; line-height: 1.9;
}

/* ------------------------------ 반응형 ------------------------------ */
@media (max-width: 1240px) {
  .wm3d-title em { display: none; }
  .wm3d-tabs button { padding: 7px 10px; font-size: 12px; }
}
@media (max-width: 1000px) {
  :root { --wm3d-top-h: 56px; }
  .wm3d-title { display: none; }
  :root { --wm3d-panel-w: 330px; }
  .wm3d-hint { display: none; }
}
@media (max-width: 820px) {
  .wm3d-top { gap: 10px; overflow-x: auto; }
  .wm3d-tabs { margin-left: 0; }
  .wm3d-topcta { display: none; }
  .wm3d-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 52fr) minmax(0, 48fr); }
  .wm3d-panel { border-left: 0; border-top: 1px solid var(--wm3d-line); padding: 18px 18px 26px; }
  .wm3d-caption { bottom: 16px; width: calc(100% - 32px); padding: 12px 15px; }
  .wm3d-caption p { font-size: 12.5px; }
  .wm3d-player { gap: 8px; }
  .wm3d-player .tm { min-width: 62px; font-size: 11px; }
  .wm3d-toast { width: 224px; top: 58px; right: 14px; padding: 12px 14px; }
  .wm3d-crumb { left: 14px; top: 14px; padding: 7px 12px; font-size: 11.5px; }
  .wm3d-reset { right: 14px; top: 14px; padding: 7px 11px; }
  .wm3d-zonepin .zbox { min-width: 150px; padding: 10px 13px; }
  .wm3d-zonepin em { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wm3d-pin .dot::after { animation: none; }
}


/* ------------------- 시나리오 오버레이 콜아웃 ------------------- */
.wm3d-callout {
  position: absolute; z-index: 7; transform: translate(-50%, -100%);
  min-width: 178px; padding: 11px 14px 12px;
  background: #fff; border: 1px solid var(--wm3d-line);
  border-radius: 12px; box-shadow: var(--wm3d-shadow);
  pointer-events: none; transition: opacity .2s;
}
.wm3d-callout[hidden] { display: none; }
.wm3d-callout.hidden { opacity: 0; }
.wm3d-callout::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px;
  transform: translateX(-50%) rotate(45deg); background: #fff;
  border-right: 1px solid var(--wm3d-line); border-bottom: 1px solid var(--wm3d-line);
}
.wm3d-callout b {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  color: var(--wm3d-dim);
}
.wm3d-callout strong {
  display: flex; align-items: baseline; gap: 3px; margin-top: 3px;
  font-size: 25px; font-weight: 800; letter-spacing: -.035em;
  font-variant-numeric: tabular-nums; color: var(--wm3d-txt);
}
.wm3d-callout strong i { font-style: normal; font-size: 13px; font-weight: 700; color: var(--wm3d-dim); }
.wm3d-callout .bar {
  margin-top: 8px; height: 6px; border-radius: 3px;
  background: var(--wm3d-line-2); overflow: hidden;
}
.wm3d-callout .bar span {
  display: block; height: 100%; border-radius: 3px;
  background: var(--wm3d-accent); transition: width .25s linear;
}
.wm3d-callout[data-tone="warn"] .bar span { background: #d97706; }
.wm3d-callout[data-tone="warn"] strong { color: #b45309; }
.wm3d-callout[data-tone="bad"] .bar span { background: var(--wm3d-bad); }
.wm3d-callout[data-tone="bad"] strong { color: var(--wm3d-bad); }
.wm3d-callout[data-tone="bad"] { border-color: #f3b9b9; }

/* ---------- 제품 구성 사진 ---------- */
.wm3d-parts { display: flex; align-items: stretch; gap: 5px; margin: 2px 0 7px; }
.wm3d-parts figure {
  margin: 0; flex: 1 1 0; min-width: 0; background: #fff;
  border: 1px solid var(--wm3d-line-2); border-radius: 10px; padding: 5px 5px 4px; text-align: center;
}
.wm3d-parts img { display: block; width: 100%; height: 50px; object-fit: contain; }
.wm3d-parts figcaption {
  font-size: 10.5px; font-weight: 600; color: var(--wm3d-txt); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.02em;
}
.wm3d-parts .plus { align-self: center; color: #9aa7b6; font-weight: 700; font-size: 12px; flex: 0 0 auto; }
.wm3d-parts .plus.or { font-size: 10.5px; color: var(--wm3d-accent); }
.wm3d-parts figure.noimg .ph {
  height: 50px; display: flex; align-items: center; justify-content: center;
  background: #f4f7fa; border-radius: 6px; color: var(--wm3d-dim); font-size: 10.5px; line-height: 1.3; padding: 0 4px;
}
.wm3d-parts figure.noimg figcaption { visibility: hidden; }

/* 구역 센서 목록의 대표 제품 썸네일 */
.wm3d-list button { padding: 7px 12px 7px 7px; }
.wm3d-list .th {
  width: 44px; height: 34px; object-fit: contain; flex: 0 0 auto;
  background: #fff; border: 1px solid var(--wm3d-line-2); border-radius: 7px; padding: 2px;
}
.wm3d-list .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 센서 패널의 시나리오 카드 — 버튼을 제목 옆에 두어 한 화면에 다 들어오게 합니다 */
.wm3d-story.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; }
.wm3d-story.row .st-txt { flex: 1 1 auto; min-width: 0; }
.wm3d-story.row strong { margin-bottom: 3px; }
.wm3d-story.row p { margin: 0; }
.wm3d-story.row button { flex: 0 0 auto; padding: 10px 13px; white-space: nowrap; }
.wm3d-parts { margin: 0 0 5px; }
.wm3d-parts figure { padding: 4px 4px 3px; }
.wm3d-parts img, .wm3d-parts figure.noimg .ph { height: 42px; }
.wm3d-live { margin-bottom: 10px !important; }

/* 센서 상세 상단 — 분류 태그 + 목록으로 돌아가기 */
.wm3d-phead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wm3d-phead + .wm3d-name { margin-top: 4px; }
.wm3d-plist {
  display: inline-flex; align-items: center; gap: 3px; flex: 0 0 auto;
  height: 24px; padding: 0 10px 0 6px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--wm3d-line); background: #fff;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--wm3d-txt);
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.wm3d-plist svg { width: 14px; height: 14px; }
.wm3d-plist:hover { border-color: var(--wm3d-accent); color: var(--wm3d-accent); background: #f3f9fd; }

/* ---------------------- 페이지 모드 (simulator.php) ---------------------- */
.wm3d.is-page { height: auto; flex: 1 1 auto; min-height: 0; }
.wm3d-ztabs {
  position: absolute; left: 18px; top: 18px; z-index: 6; margin: 0;
  background: rgba(255,255,255,.94); box-shadow: var(--wm3d-shadow); backdrop-filter: blur(6px);
}
.wm3d-ztabs:empty { display: none; }
.wm3d-ztabs ~ .wm3d-crumb { top: 70px; padding: 6px 12px; }
.wm3d.is-page .wm3d-hint { display: none; }          /* 조작 안내는 페이지 하단 줄에 */
@media (max-width: 820px) {
  .wm3d-ztabs { left: 10px; top: 10px; max-width: calc(100% - 118px); overflow-x: auto; scrollbar-width: none; }
  .wm3d-ztabs::-webkit-scrollbar { display: none; }
  .wm3d-ztabs button { padding: 7px 10px; font-size: 12px; }
  .wm3d-ztabs ~ .wm3d-crumb { top: 58px; left: 10px; }
  .wm3d.is-page .wm3d-reset { top: 10px; right: 10px; }
}

/* ---------------------- 제품 구성 전환 (스마트형 / 방폭형) ---------------------- */
.wm3d-variant {
  position: absolute; left: 18px; top: 66px; z-index: 6;
  display: flex; gap: 4px; padding: 4px; border-radius: 12px;
  background: rgba(255,255,255,.94); border: 1px solid var(--wm3d-line);
  box-shadow: var(--wm3d-shadow); backdrop-filter: blur(6px);
}
.wm3d-variant[hidden] { display: none; }
.wm3d-variant .vgrp { display: flex; align-items: center; gap: 3px; }
.wm3d-variant .vgrp + .vgrp { margin-left: 4px; padding-left: 8px; border-left: 1px solid var(--wm3d-line); }
.wm3d-variant .vg-h { font-size: 11.5px; font-weight: 800; color: var(--wm3d-txt); padding: 0 6px 0 4px; letter-spacing: -.01em; white-space: nowrap; }
.wm3d-variant button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  border: 0; background: transparent; border-radius: 9px; padding: 6px 13px 6px 11px;
  color: var(--wm3d-txt-2); font: inherit; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.wm3d-variant button b { font-size: 12.5px; font-weight: 700; letter-spacing: -.01em; }
.wm3d-variant button em { font-style: normal; font-size: 10.5px; color: var(--wm3d-dim); }
.wm3d-variant button:hover { background: #f3f6fa; }
.wm3d-variant button.on.v-smart { background: #e8f4fd; color: #0b6fb8; box-shadow: inset 0 0 0 1px #9fd0f2; }
.wm3d-variant button.on.v-ex { background: #fff3e6; color: #c25a06; box-shadow: inset 0 0 0 1px #f5c48f; }
.wm3d-variant button.on em { color: inherit; opacity: .8; }
.wm3d.has-variant .wm3d-crumb { top: 122px; }
.wm3d.has-variant .wm3d-ztabs ~ .wm3d-variant { top: 70px; }
.wm3d.has-variant .wm3d-ztabs ~ .wm3d-crumb { top: 126px; }
.wm3d-tags { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wm3d-vtag {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 9px; border-radius: 6px; vertical-align: top;
}
.wm3d-vtag.v-smart { color: #0b6fb8; background: #e8f4fd; border: 1px solid #b6dcf6; }
.wm3d-vtag.v-ex { color: #c25a06; background: #fff3e6; border: 1px solid #f5c48f; }
.wm3d-vnote {
  font-size: 12px !important; line-height: 1.6; margin: 10px 0 12px !important;
  padding: 9px 12px; border-radius: 10px;
}
.wm3d-vnote.v-smart { background: #f0f8fe; border: 1px solid #cfe7f8; color: #22507a; }
.wm3d-vnote.v-ex { background: #fff7ee; border: 1px solid #f6d3ad; color: #7a4210; }
/* 현장 경보형 (원격 알림 없음) 안내 상자 */
.wm3d-toast.local { border-color: #f5c48f; border-left-color: #ea7a12; box-shadow: 0 2px 6px rgba(15,32,55,.08), 0 18px 44px rgba(194,90,6,.18); }
.wm3d-toast.local strong { color: #c25a06; }
.wm3d-toast.local strong i { background: #ea7a12; }
.wm3d-toast.local li::before { color: #ea7a12; }
@media (max-width: 820px) {
  .wm3d-variant { left: 10px; top: 54px; }
  .wm3d-variant button { padding: 5px 10px 5px 9px; }
  .wm3d-variant button em { display: none; }
  .wm3d-variant .vg-h { padding: 0 3px 0 2px; font-size: 11px; }
  .wm3d-variant .vgrp + .vgrp { margin-left: 2px; padding-left: 4px; }
  .wm3d-variant button b { font-size: 12px; }
  .wm3d.has-variant .wm3d-ztabs ~ .wm3d-variant { top: 54px; }
  .wm3d.has-variant .wm3d-ztabs ~ .wm3d-crumb, .wm3d.has-variant .wm3d-crumb { top: 98px; }
}

/* ---------------------- 패널 안 구성 탭 (설치형 | 휴대형 → 스마트형 | 방폭형) ---------------------- */
.wm3d-vtabs { margin: 10px 0 10px; }
.wm3d-vtabs-top { display: flex; border-bottom: 1px solid var(--wm3d-line); margin-bottom: 10px; }
.wm3d-vtabs-top button {
  flex: 1 1 0; border: 0; background: transparent; padding: 9px 4px 10px; margin-bottom: -1px;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--wm3d-dim); cursor: pointer;
  border-bottom: 2px solid transparent; transition: color .15s ease, border-color .15s ease;
}
.wm3d-vtabs-top button:hover { color: var(--wm3d-txt); }
.wm3d-vtabs-top button.on { color: var(--wm3d-txt); border-bottom-color: var(--wm3d-txt); }
.wm3d-vtabs-sub { display: flex; gap: 6px; }
.wm3d-vtabs-sub button {
  flex: 1 1 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0;
  border: 1px solid var(--wm3d-line); background: #fff; border-radius: 10px; padding: 7px 11px;
  font: inherit; color: var(--wm3d-txt-2); cursor: pointer; text-align: left; transition: .15s ease;
}
.wm3d-vtabs-sub button b { font-size: 13px; font-weight: 700; }
.wm3d-vtabs-sub button em { font-style: normal; font-size: 10.5px; color: var(--wm3d-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wm3d-vtabs-sub button:hover { border-color: #b8c4d2; }
.wm3d-vtabs-sub button.on.v-smart { background: #e8f4fd; color: #0b6fb8; border-color: #9fd0f2; }
.wm3d-vtabs-sub button.on.v-ex { background: #fff3e6; color: #c25a06; border-color: #f5c48f; }
.wm3d-vtabs-sub button.on em { color: inherit; opacity: .8; }
.wm3d-vtip { font-size: 11.5px !important; line-height: 1.55; margin: 8px 0 0 !important; padding: 7px 10px; border-radius: 8px; }
.wm3d-vtip.v-smart { background: #f0f8fe; color: #22507a; }
.wm3d-vtip.v-ex { background: #fff7ee; color: #7a4210; }

/* 센서 장점 칩 (측정 방식 · 방폭 · 가스 선택 …) */
.wm3d-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0; }
.wm3d-chips span {
  font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 8px; border-radius: 999px;
  color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0; white-space: nowrap;
}
.wm3d-chips .c-ex { color: #c25a06; background: #fff3e6; border-color: #f5c48f; }
.wm3d-chips .c-m { color: #334155; background: #eef2f6; border-color: #cbd5e1; }
.wm3d-chips .c-g { color: #15803d; background: #ecfdf3; border-color: #bbe6cb; }
.wm3d-chips .c-r { color: #0b6fb8; background: #e8f4fd; border-color: #b6dcf6; }
.wm3d-chips .c-a { color: #b42318; background: #fef0ee; border-color: #f6c7c0; }

/* 말풍선 — 복합 가스 줄 */
.wm3d-callout .rows { list-style: none; margin: 8px 0 0; padding: 7px 0 0; border-top: 1px solid var(--wm3d-line); display: grid; grid-template-columns: 1fr 1fr; gap: 3px 12px; }
.wm3d-callout .rows[hidden] { display: none; }
.wm3d-callout .rows li { display: flex; align-items: baseline; gap: 4px; font-size: 11.5px; white-space: nowrap; }
.wm3d-callout .rows em { font-style: normal; color: var(--wm3d-dim); min-width: 28px; font-weight: 600; }
.wm3d-callout .rows b { font-size: 13px; color: var(--wm3d-txt); font-variant-numeric: tabular-nums; }
.wm3d-callout .rows i { font-style: normal; color: var(--wm3d-dim); font-size: 10.5px; }
.wm3d-callout .rows li.bad b { color: var(--wm3d-bad); }
