/* ATLAS-C2 공통 스타일 */
:root {
  --bg0: #060910;
  --bg1: #0e1420;
  --bg2: #141c2a;
  --bgc: rgba(20, 28, 42, 0.9);
  --bd: rgba(255, 255, 255, 0.06);
  --bdg: rgba(0, 200, 120, 0.15);
  --g: #00c878;
  --gd: rgba(0, 200, 120, 0.12);
  --a: #f0a030;
  --ad: rgba(240, 160, 48, 0.12);
  --r: #ff4060;
  --rd: rgba(255, 64, 96, 0.1);
  --b: #3090ff;
  --bld: rgba(48, 144, 255, 0.1);
  --p: #a060ff;
  --pd: rgba(160, 96, 255, 0.1);
  --t1: #e0e4e8;
  --t2: #7a8898;
  --t3: #3e4e60;
  --pf: #00c878;
  --pp: #3090ff;
  --pc: #f0a030;
  --pe: #ff6040;
  --pr: #a060ff;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: var(--bg0);
  color: var(--t1);
  font-family: "Noto Sans KR", sans-serif;
  height: 100vh;
  display: grid;
  grid-template-rows: 48px 1fr 42px;
  overflow: hidden;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 200, 120, 0.015) 2px,
    rgba(0, 200, 120, 0.015) 4px
  );
  pointer-events: none;
  z-index: 9999;
}
header {
  background: linear-gradient(180deg, rgba(0, 200, 120, 0.06), var(--bg1));
  border-bottom: 1px solid var(--bdg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: relative;
  z-index: 100;
}
header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--g), transparent);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-hex {
  width: 30px;
  height: 30px;
  clip-path: polygon(
    15% 0%,
    85% 0%,
    100% 15%,
    100% 85%,
    85% 100%,
    15% 100%,
    0% 85%,
    0% 15%
  );
  background: var(--gd);
  border: 2px solid var(--g);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Orbitron", sans-serif;
  font-size: 9px;
  font-weight: 800;
  color: var(--g);
}
.logo-name {
  font-family: "Orbitron", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--g);
  letter-spacing: 3px;
}
.logo-sub {
  font-size: 10px;
  color: var(--t2);
  margin-left: 6px;
}
.hc {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 18px;
  align-items: center;
}
.sc {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--t2);
  font-family: "JetBrains Mono", monospace;
}
.pd {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--g);
  animation: pu 2s infinite;
}
@keyframes pu {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 4px var(--g);
  }
  50% {
    opacity: 0.4;
  }
}
.hr {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
  color: var(--t2);
  font-family: "JetBrains Mono", monospace;
}
.bs {
  padding: 2px 8px;
  border: 1px solid var(--r);
  color: var(--r);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  font-family: "Orbitron", sans-serif;
}
.main {
  display: grid;
  grid-template-columns: 220px 1fr 340px;
  overflow: hidden;
}
/* LEFT NAV */
.ln {
  background: var(--bg1);
  border-right: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.ln::-webkit-scrollbar {
  width: 3px;
}
.ln::-webkit-scrollbar-thumb {
  background: var(--bdg);
  border-radius: 2px;
}
.ngt {
  padding: 14px 16px 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--t3);
  font-family: "Orbitron", sans-serif;
}
.nb {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--t2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  border-left: 3px solid transparent;
  font-family: "Noto Sans KR", sans-serif;
  text-align: left;
  width: 100%;
}
.nb:hover {
  background: rgba(0, 200, 120, 0.05);
  color: var(--t1);
}
.nb.active {
  background: rgba(0, 200, 120, 0.08);
  color: var(--g);
  border-left-color: var(--g);
}
.nb i {
  width: 18px;
  text-align: center;
  font-size: 13px;
}
.nn {
  font-family: "Orbitron", sans-serif;
  font-size: 9px;
  font-weight: 700;
  opacity: 0.5;
  margin-right: 2px;
}
.nd {
  height: 1px;
  background: var(--bd);
  margin: 6px 16px;
}
.nb[data-p="ipb"].active {
  color: var(--pf);
  border-left-color: var(--pf);
}
.nb[data-p="predict"].active {
  color: var(--pp);
  border-left-color: var(--pp);
  background: rgba(48, 144, 255, 0.08);
}
.nb[data-p="coa"].active {
  color: var(--pc);
  border-left-color: var(--pc);
  background: rgba(240, 160, 48, 0.08);
}
.nb[data-p="resource"].active {
  color: var(--pe);
  border-left-color: var(--pe);
  background: rgba(255, 96, 64, 0.08);
}
.nb[data-p="dynamic"].active {
  color: var(--pr);
  border-left-color: var(--pr);
  background: rgba(160, 96, 255, 0.08);
}
.ut {
  padding: 4px 12px 8px;
}
.ur {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--t2);
  border-radius: 3px;
  cursor: pointer;
}
.ur:hover {
  background: rgba(255, 255, 255, 0.03);
}
.us {
  width: 16px;
  height: 11px;
  border: 1.5px solid var(--b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6px;
  font-weight: 800;
  font-family: "Orbitron", sans-serif;
  color: var(--b);
}
.ud {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-left: auto;
}
.udg {
  background: var(--g);
}
.uda {
  background: var(--a);
}
.udr {
  background: var(--r);
}
.rs {
  padding: 4px 16px 12px;
}
.rr {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  font-size: 10px;
}
.rl {
  width: 48px;
  color: var(--t3);
  font-size: 9px;
}
.rt {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}
.rf {
  height: 100%;
  border-radius: 3px;
  transition: width 1s;
}
.rfg {
  background: linear-gradient(90deg, var(--g), #00e088);
}
.rfa {
  background: linear-gradient(90deg, var(--a), #ffc040);
}
.rfr {
  background: linear-gradient(90deg, var(--r), #ff6080);
}
.rv {
  width: 28px;
  text-align: right;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  color: var(--t3);
}
/* CENTER */
.ct {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg0);
  position: relative;
}
.ctb {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  background: var(--bg1);
  border-bottom: 1px solid var(--bd);
}
.tb {
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 600;
  color: var(--t3);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.2s;
  font-family: "Noto Sans KR", sans-serif;
}
.tb:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--t2);
}
.tb.active {
  background: rgba(0, 200, 120, 0.1);
  color: var(--g);
}
.ts {
  width: 1px;
  height: 16px;
  background: var(--bd);
  margin: 0 4px;
}
.ma {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg0);
}
.ma .map-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.map-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.ma .wind-map-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
/* OpenLayers 오버레이: ol.css 미로드 시에도 뷰포트가 채워지도록 */
.ma .wind-map-overlay .ol-viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.ma .wind-map-overlay .ol-layer canvas {
  pointer-events: none;
}
.ma .leaflet-container {
  background: var(--bg0);
  font: inherit;
}
.ma .leaflet-control-zoom {
  border: none;
}
/* 확대/축소·바람 버튼을 스케일 바로 위에 배치 */
.ma .leaflet-bottom.leaflet-right {
  bottom: 44px;
}
/* 스케일: 확대/축소 버튼 아래, 1cm = XXXm + 스케일 바 (NAVER 스타일) */
.map-scale-wrap {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  padding: 0 10px 0 12px;
  background: var(--bg1);
  border: 1px solid var(--bd);
  border-radius: 4px;
  pointer-events: none;
}
.map-scale-label {
  font-size: 11px;
  color: var(--t2);
  font-weight: 500;
  white-space: nowrap;
}
.map-scale-value {
  font-size: 11px;
  color: var(--t1);
  font-weight: 600;
  white-space: nowrap;
}
.map-scale-bar {
  position: relative;
  height: 3px;
  width: 38px;
  flex-shrink: 0;
  background: var(--t1);
}
.map-scale-bar::before,
.map-scale-bar::after {
  content: "";
  position: absolute;
  top: 0;
  width: 2px;
  height: 6px;
  background: var(--t1);
  margin-top: -1.5px;
}
.map-scale-bar::before {
  left: 0;
}
.map-scale-bar::after {
  right: 0;
}
/* 낙동강 구역 Leaflet 유닛 마커 */
.map-unit-icon {
  background: none !important;
  border: none !important;
}
.mu-icon {
  width: 34px;
  height: 24px;
  border: 2px solid;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  font-family: "Orbitron", sans-serif;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.mu-icon .mu-icon-txt {
  font-size: 8px;
}
/* 대대 아이콘: 세로 사각 + X + 위쪽 두 줄, 색상 유지 */
.mu-icon-battalion {
  position: relative;
  border: none !important;
  background: none !important;
  box-shadow: none;
}
.mu-icon-battalion svg {
  display: block;
  flex-shrink: 0;
}
.mu-icon-battalion .mu-battalion-code {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  font-weight: 800;
  font-family: "Orbitron", sans-serif;
  pointer-events: none;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.9);
}
.mu-icon-battalion .mu-battalion-txt {
  font-size: 7px;
}
.ma .leaflet-tooltip {
  background: var(--bgc);
  border: 1px solid var(--bdg);
  color: var(--t1);
  font-size: 10px;
  font-family: "Noto Sans KR", sans-serif;
  padding: 6px 10px;
}
.ma .map-line-tooltip {
  font-size: 9px;
}
/* PL ALPHA / PL BRAVO 라인 라벨 (점선 위 항시 표시) */
.ma .map-pl-label {
  background: none !important;
  border: none !important;
}
.ma .map-line-x-marker {
  background: none !important;
  border: none !important;
}
.ma .map-pl-label .map-pl-label-txt {
  font-size: 11px;
  font-weight: 700;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.5px;
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
}
/* 아이콘 아래 항시 표시되는 부대명 라벨 */
.ma .map-unit-label {
  background: var(--bgc);
  border: 1px solid var(--bdg);
  color: var(--t1);
  font-size: 10px;
  padding: 2px 6px;
  white-space: nowrap;
}
/* 마우스 오버 시 자원 정보 팝업 */
.ma .map-unit-popup .leaflet-popup-content-wrapper {
  min-width: 160px;
  max-width: 220px;
}
.ma .map-unit-popup .map-unit-tooltip-box {
  white-space: normal;
  text-align: left;
}
.ma .map-unit-popup .map-unit-tooltip-box strong {
  display: block;
  margin-bottom: 6px;
}
.ma .map-unit-popup .map-unit-tooltip-res {
  font-size: 12px;
  color: var(--t2);
  line-height: 1.5;
}
.map-html-overlay-hidden {
  position: absolute;
  inset: 0;
  pointer-events: none;
  visibility: hidden;
}
.ma .leaflet-control-zoom a {
  background: var(--bgc) !important;
  color: var(--t2) !important;
  border: 1px solid var(--bd);
  width: 28px;
  height: 28px;
  line-height: 26px;
}
.ma .leaflet-control-zoom a:hover {
  color: var(--g) !important;
  border-color: var(--bdg);
}
.ma::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(rgba(0, 200, 120, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 120, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}
.ms {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}
.mu {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s;
  z-index: 10;
}
.mu:hover {
  transform: scale(1.15);
  z-index: 20;
}
.mb {
  width: 34px;
  height: 24px;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  font-family: "Orbitron", sans-serif;
}
.mu.fr .mb {
  border-color: var(--b);
  background: rgba(48, 144, 255, 0.12);
  color: var(--b);
}
.mu.ho .mb {
  border-color: var(--r);
  background: rgba(255, 64, 96, 0.12);
  color: var(--r);
  transform: rotate(45deg);
}
.mu.ho .mb span {
  transform: rotate(-45deg);
  font-size: 7px;
}
.ml {
  font-size: 8px;
  margin-top: 2px;
  color: var(--t3);
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}
.mu.ho .ml {
  color: rgba(255, 64, 96, 0.6);
}
.mu.ho::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--r);
  animation: hp 2.5s infinite;
  pointer-events: none;
}
@keyframes hp {
  0% {
    transform: translate(-50%, -55%) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -55%) scale(2.5);
    opacity: 0;
  }
}
.fb {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  z-index: 4;
  background: repeating-linear-gradient(
    180deg,
    var(--r),
    var(--r) 6px,
    transparent 6px,
    transparent 12px
  );
  opacity: 0.4;
}
.mf {
  position: absolute;
  background: rgba(6, 9, 16, 0.94);
  border: 1px solid var(--bdg);
  border-radius: 5px;
  padding: 8px 12px;
  font-size: 10px;
  z-index: 15;
  backdrop-filter: blur(10px);
  min-width: 150px;
}
/* 바람 버튼: 줌과 같은 줄, 스케일 위 */
.wind-layer-toggle-wrap {
  position: absolute;
  right: 50px;
  bottom: 59px;
  z-index: 15;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}
.axis-layer-toggle-wrap {
  position: absolute;
  right: 110px;
  bottom: 59px;
  z-index: 15;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}
.wind-layer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  font-size: 12px;
  color: var(--t2);
  background: var(--bg1);
  border: 1px solid var(--bd);
  border-radius: 4px;
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s;
}
.wind-layer-btn i {
  font-size: 20px;
}
.wind-layer-btn:hover {
  color: var(--t1);
  background: var(--bg2);
  border-color: rgba(255, 255, 255, 0.12);
}
.wind-layer-btn.active {
  color: var(--b);
  border-color: var(--b);
  background: var(--bg1);
}
.mft {
  font-weight: 700;
  font-size: 10px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.mfr {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
  color: var(--t2);
}
.mfr .v {
  color: var(--t1);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
}
/* RIGHT */
.rp {
  background: var(--bg1);
  border-left: 1px solid var(--bd);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rh {
  padding: 10px 16px;
  border-bottom: 1px solid var(--bd);
  display: flex;
  align-items: center;
  gap: 8px;
}
.rhd {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.rht {
  font-size: 11px;
  font-weight: 700;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 1px;
}
.rb {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.rb::-webkit-scrollbar {
  width: 3px;
}
.rb::-webkit-scrollbar-thumb {
  background: var(--bdg);
  border-radius: 2px;
}
.rft {
  padding: 8px 12px;
  border-top: 1px solid var(--bd);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
/* CARDS */
.cd {
  background: var(--bgc);
  border: 1px solid var(--bd);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  transition: border-color 0.3s;
}
.cd:hover {
  border-color: rgba(255, 255, 255, 0.1);
}
.ch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.ch .ci {
  font-size: 14px;
}
.ch .ct2 {
  font-size: 12px;
  font-weight: 700;
}
.ch .cb {
  margin-left: auto;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: "Orbitron", sans-serif;
}
.scenario-trash {
  margin-left: auto;
  padding: 4px 6px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--t3);
  border-radius: 4px;
  cursor: pointer;
  font-size: 10px;
  transition:
    color 0.2s,
    background 0.2s;
}
.scenario-trash:hover {
  background: rgba(255, 64, 96, 0.15);
  color: var(--r);
}
.dr {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--t2);
}
.dr .v {
  color: var(--t1);
  font-family: "JetBrains Mono", monospace;
}
.btr {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin: 4px 0 2px;
}
.bf {
  height: 100%;
  border-radius: 3px;
  transition: width 1s;
}
.sp {
  height: 1px;
  background: var(--bd);
  margin: 8px 0;
}
.nt {
  font-size: 10px;
  color: var(--t3);
  line-height: 1.5;
}
/* ALERT */
.ac {
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.ac.w {
  background: var(--ad);
  border: 1px solid rgba(240, 160, 48, 0.3);
}
.ac.w i {
  color: var(--a);
}
.ac.d {
  background: var(--rd);
  border: 1px solid rgba(255, 64, 96, 0.3);
}
.ac.d i {
  color: var(--r);
}
.ac.i {
  background: var(--bld);
  border: 1px solid rgba(48, 144, 255, 0.3);
}
.ac.i i {
  color: var(--b);
}
.ac.s {
  background: var(--gd);
  border: 1px solid rgba(0, 200, 120, 0.3);
}
.ac.s i {
  color: var(--g);
}
.ac i {
  font-size: 16px;
  margin-top: 1px;
}
.ab {
  flex: 1;
}
.abt {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 2px;
}
.abd {
  font-size: 10px;
  color: var(--t2);
  line-height: 1.5;
}
/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: "Noto Sans KR", sans-serif;
  border: 1px solid;
}
.bg {
  background: var(--gd);
  border-color: var(--g);
  color: var(--g);
}
.bg:hover {
  background: rgba(0, 200, 120, 0.25);
  box-shadow: 0 0 12px rgba(0, 200, 120, 0.15);
}
.bb {
  background: var(--bld);
  border-color: var(--b);
  color: var(--b);
}
.bb:hover {
  background: rgba(48, 144, 255, 0.2);
}
.ba {
  background: var(--ad);
  border-color: var(--a);
  color: var(--a);
}
.ba:hover {
  background: rgba(240, 160, 48, 0.2);
}
.br {
  background: var(--rd);
  border-color: var(--r);
  color: var(--r);
}
.br:hover {
  background: rgba(255, 64, 96, 0.2);
}
.bp {
  background: var(--pd);
  border-color: var(--p);
  color: var(--p);
}
.bp:hover {
  background: rgba(160, 96, 255, 0.2);
}
.bd2 {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--bd);
  color: var(--t2);
}
.bd2:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--t1);
}
/* TABLE */
.at {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}
.at th {
  text-align: left;
  padding: 5px 8px;
  font-size: 8px;
  font-weight: 700;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--bd);
  font-family: "Orbitron", sans-serif;
}
.at td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--bd);
  color: var(--t2);
}
.at tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}
.tg {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 600;
}
.tgg {
  background: var(--gd);
  color: var(--g);
}
.tga {
  background: var(--ad);
  color: var(--a);
}
.tgr {
  background: var(--rd);
  color: var(--r);
}
/* COA */
.coa {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.coa.sel {
  border-color: var(--g);
  box-shadow: 0 0 16px rgba(0, 200, 120, 0.06);
}
.cn {
  font-family: "Orbitron", sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}
.cs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--bd);
}
.csl {
  font-size: 9px;
  color: var(--t3);
}
.csb {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
}
.csf {
  height: 100%;
  border-radius: 3px;
}
.csv {
  font-family: "Orbitron", sans-serif;
  font-size: 14px;
  font-weight: 700;
}
.aib {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: "Orbitron", sans-serif;
  background: var(--gd);
  color: var(--g);
}
.mg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}
.mi .mil {
  font-size: 8px;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mi .mib {
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
  margin: 2px 0;
}
.mi .mif {
  height: 100%;
  border-radius: 2px;
}
.mi .miv {
  font-size: 9px;
  font-family: "JetBrains Mono", monospace;
  color: var(--t2);
}
/* PRED */
.pbs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 70px;
  padding: 4px 0;
}
.pb {
  flex: 1;
  border-radius: 2px 2px 0 0;
  min-height: 4px;
  position: relative;
  transition: height 0.8s;
}
.pb::after {
  content: attr(data-l);
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7px;
  color: var(--t3);
  white-space: nowrap;
}
/* TEXTAREA */
.ota {
  width: 100%;
  min-height: 160px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--bd);
  border-radius: 4px;
  color: var(--t2);
  font-size: 10px;
  line-height: 1.6;
  padding: 10px;
  resize: vertical;
  font-family: "JetBrains Mono", "Noto Sans KR", monospace;
}
.ota:focus {
  outline: none;
  border-color: var(--g);
}
/* OLD VAL */
.ov {
  text-decoration: line-through;
  color: var(--t3);
  margin-right: 4px;
}
/* LOG */
.lb {
  background: #000;
  border-top: 1px solid var(--bdg);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  font-size: 10px;
  overflow: hidden;
}
.ll {
  font-family: "Orbitron", sans-serif;
  font-size: 8px;
  font-weight: 700;
  color: var(--g);
  white-space: nowrap;
  padding-right: 8px;
  border-right: 1px solid var(--bd);
}
.lss {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.le {
  display: inline;
  margin-right: 40px;
  color: var(--t3);
}
.le .lt {
  color: var(--g);
  margin-right: 6px;
  font-family: "JetBrains Mono", monospace;
}
.le .lw {
  color: var(--r);
}
.le .ls2 {
  color: var(--g);
}
/* ANIM */
@keyframes fi {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.an {
  animation: fi 0.35s ease forwards;
  opacity: 0;
}
.an:nth-child(1) {
  animation-delay: 0.05s;
}
.an:nth-child(2) {
  animation-delay: 0.1s;
}
.an:nth-child(3) {
  animation-delay: 0.15s;
}
.an:nth-child(4) {
  animation-delay: 0.2s;
}
.an:nth-child(5) {
  animation-delay: 0.25s;
}
.an:nth-child(6) {
  animation-delay: 0.3s;
}
/* 시나리오 선택 모달 */
.scenario-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.scenario-modal.is-open {
  display: flex;
}
.scenario-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}
.scenario-modal-box {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 8px;
  padding: 20px;
  width: max-content;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: max-width 0.3s ease;
}
.scenario-modal-box.has-preview {
  max-width: 670px;
}
.scenario-modal-box.has-preview .scenario-modal-left {
  min-height: calc(52vh + 24px);
  display: flex;
  flex-direction: column;
}
.scenario-modal-box.has-preview .scenario-modal-actions {
  margin-top: auto;
  padding-top: 12px;
}
.scenario-modal-left {
  flex: 0 0 auto;
  width: 320px;
  overflow-y: auto;
}
.scenario-modal-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--t3);
  margin-bottom: 16px;
  font-family: "Orbitron", sans-serif;
}
.scenario-modal-preview {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg0);
  border-left: 1px solid var(--bd);
  border-radius: 0 8px 8px 0;
  padding: 12px;
  margin-left: 0;
  overflow: hidden;
  max-width: 0;
  width: 0;
  opacity: 0;
  border-left-width: 0;
  padding-left: 0;
  padding-right: 0;
  transition:
    max-width 0.35s ease,
    width 0.35s ease,
    opacity 0.25s ease,
    margin-left 0.35s ease,
    padding 0.35s ease,
    border-left-width 0.2s ease;
}
.scenario-modal-preview[aria-hidden="false"] {
  max-width: 320px;
  width: 320px;
  margin-left: 12px;
  padding-left: 12px;
  padding-right: 12px;
  opacity: 1;
  border-left-width: 1px;
  min-height: calc(52vh + 24px);
  box-sizing: border-box;
}
.scenario-modal-preview-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  position: relative;
}
.scenario-preview-media {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
.scenario-modal-preview-img {
  max-width: 100%;
  max-height: 52vh;
  object-fit: contain;
  display: block;
  min-width: 0;
}
.scenario-modal-preview-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 52vh;
  display: none;
  pointer-events: none;
}
.scenario-preview-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 6px;
  flex-shrink: 0;
}
.scenario-gif-btn {
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid var(--bd);
  background: var(--bgc);
  color: var(--t2);
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s;
  font-family: "Noto Sans KR", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.scenario-gif-btn:hover {
  color: var(--t1);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.scenario-gif-btn i {
  font-size: 10px;
}
.scenario-modal-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.scenario-card {
  background: var(--bgc);
  border: 1px solid var(--bd);
  border-radius: 6px;
  padding: 14px 16px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.scenario-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}
.scenario-card.selected {
  border-color: var(--pp);
  box-shadow: 0 0 0 2px rgba(48, 144, 255, 0.25);
}
.scenario-card-head {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.scenario-card-head .scenario-pct {
  font-weight: 700;
}
.scenario-card-desc {
  font-size: 11px;
  color: var(--t3);
  line-height: 1.55;
  margin-bottom: 10px;
}
.scenario-card-dr {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 11px;
  color: var(--t2);
}
.scenario-card-dr:last-child {
  margin-bottom: 0;
}
.scenario-card-dr .v {
  color: var(--t1);
  font-family: "JetBrains Mono", monospace;
}
.scenario-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.scenario-modal-actions .btn {
  flex: 1;
}
.scenario-modal-close {
  margin-top: 0;
}
/* GIF 전체보기 레이어 */
.scenario-gif-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.scenario-gif-fullscreen.is-open {
  display: flex;
}
.scenario-gif-fullscreen-backdrop {
  position: absolute;
  inset: 0;
  background: #000;
  cursor: pointer;
}
.scenario-gif-fullscreen-box {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.scenario-gif-fullscreen-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}
.scenario-gif-fullscreen-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 4px;
  background: var(--bgc);
  color: var(--t2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  z-index: 10002;
  transition:
    color 0.2s,
    background 0.2s;
}
.scenario-gif-fullscreen-close:hover {
  color: var(--t1);
  background: rgba(255, 255, 255, 0.1);
}

/* PDF 뷰어 팝업 */
.pdf-viewer-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pdf-viewer-modal.is-open {
  display: flex;
}
.pdf-viewer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}
.pdf-viewer-modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 900px;
  max-height: 96vh;
  height: 90vh;
  background: var(--bg2);
  border: 1px solid var(--b);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.pdf-viewer-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pdf-viewer-modal-title {
  font-family: Orbitron, sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--t1);
}
.pdf-viewer-modal-close {
  padding: 4px 8px;
  color: var(--t3);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.pdf-viewer-modal-close:hover {
  color: var(--t1);
  background: rgba(255, 255, 255, 0.08);
}
.pdf-viewer-iframe {
  flex: 1;
  min-height: 82vh;
  width: 100%;
  border: none;
  background: #fff;
}
