
#view-scanner {
  --win: var(--tv-panel); --win-2: var(--tv-soft); --hover: var(--tv-hover); --line: var(--tv-line); --line-2: var(--tv-line-2);
  --text: var(--tv-text); --text-2: var(--tv-btn); --text-3: var(--tv-text-3); --grid: var(--tv-grid); --axis-text: var(--tv-axis);
  --brand: var(--tv-accent); --brand-2: var(--tv-accent); --brand-bg: color-mix(in srgb, var(--tv-accent) 16%, transparent);
}
#view-scanner .scn-res .p-head, #view-scanner .scn-list .p-head { background: var(--tv-menu); }


.scn-chart .ph { gap: 10px; padding: 8px 12px; min-height: 48px; }
.scn-chart .ph .sym { display: flex; align-items: center; gap: 8px; min-width: 0; }
.scn-chart .ph .sym > div { min-width: 0; line-height: 1.3; }
.scn-chart .ph .sym b { font-size: 14px; }
.scn-chart .ph .sym .sub { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scn-chart .tf-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 0 5px; border-radius: 3px; background: var(--win-2); color: var(--text); line-height: 17px; vertical-align: 1px; }
.scn-chart .pager .num { min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.scn-chart .pager .tool[disabled] { opacity: .3; pointer-events: none; }
.scn-chart #eyeBtn { gap: 4px; }
.scn-chart #eyeBtn:not(.on) { color: var(--text-3); }
.evi-back { flex: none; margin-left: -4px; }


.scn-chart .kc { position: relative; min-height: 0; transition: opacity .12s; }
.scn-chart.busy .kc { opacity: .35; }
.scn-chart.busy .kc::after {
  content: ''; position: absolute; left: 50%; top: 45%; width: 22px; height: 22px; margin: -11px 0 0 -11px; z-index: 5;
  border: 2px solid var(--line-2); border-top-color: var(--tv-accent); border-radius: 50%; animation: scnSpin .7s linear infinite;
}
@keyframes scnSpin { to { transform: rotate(360deg); } }
.scn-msg { position: absolute; inset: 0; display: grid; place-items: center; z-index: 6; color: var(--text-2); font-size: 13px; background: var(--win); }


.scn-chart .howto { max-height: 42%; padding: 12px 14px 14px; gap: 12px; font-size: 13.5px; color: var(--text-2); background: var(--tv-menu); }
.evi { display: grid; gap: 10px; }
.evi-say { margin: 0; color: var(--text); font-size: 13.5px; line-height: 1.7; word-break: keep-all; }
.evi-facts { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.evi-facts > div { background: var(--win); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; min-width: 0; flex: 0 1 auto; }
.evi-facts dt { font-size: 12px; color: var(--text-3); margin-bottom: 1px; }
.evi-facts dd { margin: 0; color: var(--text); font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.evi-facts dd .dim { font-size: 12px; margin-left: 4px; }
.evi-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--text-2); }
.evi-leg span { display: inline-flex; align-items: center; gap: 6px; }
.evi-leg .sw { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--c); }
.evi-leg .sw.dash { border-top-style: dashed; }
.evi-leg .sw.zone { height: 9px; border: 1px solid var(--c); background: color-mix(in srgb, var(--c) 25%, transparent); border-radius: 1px; }
.evi-leg .sw.dot { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--c); }
.evi-note { font-size: 12.5px; color: var(--text-3); line-height: 1.6; }


.scn-chart .cases { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 6px; }
.cases-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cases-h b { color: var(--text); font-size: 13.5px; }
.cases-h .dim { font-size: 12px; }
.cases-sum { font-size: 13px; color: var(--text-2); }
.cases-sum b { color: var(--text); font-weight: 600; }
.case-t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.case-t th { font-weight: 500; color: var(--text-3); font-size: 12px; text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.case-t td { text-align: right; padding: 4px 6px; border-bottom: 1px solid var(--line); color: var(--text); }
.case-t th:first-child, .case-t td:first-child { text-align: left; padding-left: 0; }
.case-t tr:last-child td { border-bottom: 0; }
.cases-foot { font-size: 12px; }


#view-scanner .res-row .why span { background: var(--win-2); }


@media (max-width: 1100px) {
  #view-scanner.evi-mode .scn-list, #view-scanner.evi-mode .scn-res { display: none; }
  #view-scanner.evi-mode .scn-chart { display: flex; flex: 1; width: auto; }
}
@media (max-width: 640px) {
  #view-scanner.evi-mode .scn-chart { overflow-y: auto; overflow-x: hidden; }
  #view-scanner.evi-mode .scn-chart .kc { flex: none; height: min(56vh, 460px); }
  #view-scanner.evi-mode .scn-chart .howto { max-height: none; overflow: visible; }
  .scn-chart .ph { flex-wrap: wrap; row-gap: 6px; padding: 8px 10px; position: sticky; top: 0; z-index: 7; background: var(--win); }
  .scn-chart .ph .sym { flex: 1 1 150px; }
  .scn-chart .ph .sym .dim { display: none; }
  .scn-chart .ph .pager { margin-left: auto; }
  .scn-chart .ph > .sp { display: none; }
  .scn-chart #eyeBtn span { display: none; }
  .scn-chart #scnOpen { padding: 0 10px; }
  .evi-say { font-size: 14px; }
  .evi-facts > div { flex: 1 1 40%; }
  .evi-facts dd { white-space: normal; }
}


.evi-card { position: absolute; top: 8px; right: 72px; z-index: 6; width: 360px; max-width: calc(100% - 96px); background: var(--win); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow); font-size: var(--fs-xs); display: flex; flex-direction: column; max-height: calc(100% - 60px); }
.evi-card .ec-h { display: flex; align-items: center; gap: 2px; padding: 4px 4px 4px 10px; min-height: 34px; }
.evi-card .ec-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.evi-card .ec-t b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evi-card .ec-t .dim { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evi-card .tool { width: 26px; height: 26px; flex: none; }
.evi-card .tool .ico { width: 15px; height: 15px; }
.evi-card .tool.on { color: var(--brand-2); }
.evi-card .pager { margin-right: 2px; }
.evi-card .ec-b { display: none; border-top: 1px solid var(--line); padding: 10px 12px 12px; overflow: auto; min-height: 0; }
.evi-card.open .ec-b { display: block; }
.evi-card .evi-say { font-size: 13.5px; line-height: 1.65; }
.evi-card .evi-facts dd { font-size: 13px; }
@media (max-width: 640px) {
  .evi-card { left: 8px; right: 8px; width: auto; max-width: none; top: 6px; }
  .evi-card.open .ec-b { max-height: 38vh; }
}


.res-lock { position: relative; min-height: 420px; overflow: hidden; }
.rl-rows { filter: blur(5px); opacity: .55; user-select: none; pointer-events: auto; cursor: pointer; }
.rl-row .rl-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--line-2); flex: none; }
.rl-row .why span { display: inline-block; color: transparent !important; background: var(--win-2); border-radius: 4px; }
.rl-cta { position: absolute; left: 50%; top: 120px; transform: translateX(-50%); width: min(320px, calc(100% - 32px)); display: grid; justify-items: center; gap: 6px; text-align: center; padding: 20px 18px; border-radius: 14px; background: var(--win); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.rl-cta .rl-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand-bg); color: var(--brand-2); }
.rl-cta b { font-size: 14px; color: var(--text); line-height: 1.5; }
.rl-cta > span:not(.rl-ic) { font-size: 12.5px; color: var(--text-2); }
.rl-cta .btn { margin-top: 6px; height: 38px; padding: 0 22px; justify-content: center; }
.tfc.lk i .ico { width: 10px; height: 10px; }


.card-h .pv-line { display: block; margin-top: 3px; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.card-h .pv-line b { font-weight: 600; color: var(--text); }
.rl-real { cursor: pointer; }
.rl-real .why .rl-hid { display: inline-flex; align-items: center; gap: 4px; color: var(--text-3); background: none; }
.rl-real .why .rl-hid .ico { width: 12px; height: 12px; }

.rl-real .why .rl-open { color: #22c55e; background: none; font-weight: 600; }
.rl-real.on { background: var(--brand-bg); }

#resHead .res-tg { display: inline-flex; align-items: center; gap: 5px; margin-right: 8px; white-space: nowrap; flex: none; }
#resHead .res-tg.on { color: #2aabee; border-color: rgba(42, 171, 238, .45); }
#resHead .res-tg .rt-s { display: none; }
@media (max-width: 600px) { #resHead .res-tg { padding: 0 8px; margin-right: 6px; } #resHead .res-tg .rt-l { display: none; } #resHead .res-tg .rt-s { display: inline; } }



#view-scanner .res-list > .res-sort { position: sticky; top: 0; z-index: 3; background: var(--win); }

#view-scanner .scn-res .p-head h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#view-scanner .scn-res .p-head h3 .dim { white-space: nowrap; text-wrap: nowrap; } 

.res-row .res-wl { display: inline-grid; place-items: center; width: 24px; height: 22px; margin-left: 2px; vertical-align: -5px; border: 0; background: none; color: var(--text-3); cursor: pointer; border-radius: 4px; padding: 0; }
.res-row .res-wl:hover { color: var(--text); background: var(--hover); }
.res-row .res-wl.on { color: #f0b90b; }
.res-row .res-wl.on .ico { fill: currentColor; }
.res-more { padding: 12px; font-size: 12px; color: var(--text-3); text-align: center; }

.gl-q { display: inline-grid; place-items: center; width: 15px; height: 15px; margin: 0 1px 0 2px; padding: 0; border: 1px solid var(--line-2, var(--line)); border-radius: 50%; background: none; color: var(--text-3); font: 600 10px/1 Pretendard, sans-serif; vertical-align: 1px; cursor: help; }
.gl-w { white-space: nowrap; }
.gl-q:hover, .gl-q:focus-visible { color: var(--text); border-color: var(--text-3); }
@media (pointer: coarse) { .gl-q { width: 18px; height: 18px; font-size: 11px; position: relative; } .gl-q::after { content: ''; position: absolute; inset: -8px; } }
.gl-pop { max-width: 270px; padding: 10px 12px; font-size: 13px; line-height: 1.6; white-space: normal; word-break: keep-all; color: var(--text); }
.gl-pop b { display: block; margin-bottom: 2px; font-size: 13px; }
.gl-pop p { margin: 0; color: var(--text-2); }

.scn-shared { padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--text-2); line-height: 1.5; word-break: keep-all; }
.scn-shared > b { color: var(--text); font-weight: 600; margin-right: 4px; }
.scn-intro { display: flex; align-items: flex-start; gap: 6px; padding: 10px 8px 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.6; color: var(--text-2); word-break: keep-all; }
.scn-intro p { margin: 0; flex: 1; }
.scn-intro a { color: var(--brand); text-decoration: underline; white-space: nowrap; }
.scn-intro .tool { flex: none; width: 28px; height: 28px; margin-top: -3px; }
.scn-intro.in-sh { padding: 6px 0 0; border: 0; }

.log-f { border-bottom: 1px solid var(--line); }
.log-f .res-sort { border-bottom: 0; }
.log-f .res-sort + .res-sort { padding-top: 0; }
.log-cap { margin: 0; padding: 8px 14px 6px; font-size: 11.5px; color: var(--text-3); }
.log-row[role="button"] { cursor: pointer; }
.log-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.log-row .num { font-variant-numeric: tabular-nums; }

#view-scanner .scn-list > .legal-line { display: none; }

@media (max-width: 640px) { #view-scanner.evi-mode .scn-chart .howto { padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); } }

:root[data-theme="light"]:not([data-updown="rb"]) #view-scanner { --up: #047857; }
