/* ─────────────────────────────────────
   BOLTSTEP — Style
   Aesthetic: Military brutalist / CRT terminal
───────────────────────────────────── */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.css');

:root {
  --bg: #0b0f18;
  --surface: #111825;
  --border: #2a3a50;
  --accent: #7ecfee;
  --accent2: #d44a1a;
  --text: #ccd8e8;
  --text-dim: #4a6278;
  --danger: #ff2200;
  --warn: #ffaa00;
  --font: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  /* 하위 호환 */
  --font-mono: var(--font);
  --font-display: var(--font);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
  user-select: none;
}

/* ── Screens ── */
.screen {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
}
.screen.active { display: flex; }

/* ── Scanlines overlay ── */
.scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none; z-index: 100;
}

/* ─────────────────────────────────────
   START SCREEN
───────────────────────────────────── */
#screen-start {
  background: #070b12;
  align-items: stretch;
  justify-content: flex-start;
}

.start-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* 왼쪽 대각선 패널 */
.start-panel {
  position: relative;
  width: 52%;
  min-width: 320px;
  height: 100%;
  background: rgba(0, 0, 0, 0.86);
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
  display: flex;
  flex-direction: column;
  padding: 0 clamp(40px, 7vw, 96px) 0 clamp(24px, 5vw, 64px);
  gap: 0;
  z-index: 1;
  overflow-y: auto;
  scrollbar-width: none;
}
.start-panel::-webkit-scrollbar { display: none; }

/* 메인 콘텐츠 래퍼 (로고~메뉴) */
.start-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min-content;
  padding-top: clamp(16px, 4vh, 48px);
  padding-bottom: 8px;
}

/* 로고 박스 */
.start-logo-wrap {
  margin-bottom: 16px;
  width: fit-content;
}
.start-logo-img {
  display: block;
  max-height: 140px;
  max-width: 480px;
  object-fit: contain;
}
.start-logo-fallback {
  font-family: var(--font);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: 6px;
  color: #fff;
}
.start-version {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 28px;
}

/* 닉네임 입력 */
.start-input {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid rgba(255,255,255,0.35);
  color: #fff;
  font-family: var(--font);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 3px;
  padding: 8px 2px;
  outline: none;
  width: 100%;
  max-width: 280px;
  margin-bottom: 24px;
  transition: border-color 0.2s;
}
.start-input::placeholder { color: rgba(255,255,255,0.3); letter-spacing: 3px; }
.start-input:focus { border-bottom-color: rgba(255,255,255,0.8); }

/* 메뉴 항목 */
.start-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}
.start-nav-item {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: 2px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 6px 0;
  transition: color 0.15s, transform 0.15s;
  width: fit-content;
}
.start-nav-item:hover { color: #e03030; transform: translateX(8px); }

/* JOIN 확장 영역 */
.start-join {
  margin-top: 8px;
  margin-bottom: 4px;
}
.start-join.hidden { display: none; }
.start-join-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.start-input-room {
  flex: 1;
  min-width: 0;
}
.start-nav-sub {
  font-size: 16px !important;
  color: rgba(255,255,255,0.6) !important;
  white-space: nowrap;
}
.start-nav-sub:hover { color: #e03030 !important; }
.start-nav-settings {
  font-size: 16px !important;
  color: rgba(255,255,255,0.45) !important;
  margin-top: 8px;
}
.start-nav-settings:hover { color: #e03030 !important; }

/* 메시지 (숨김 처리 — 팝업으로 대체) */
.start-msg { display: none; }

/* ── Windows 스타일 팝업 ── */
.win-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.win-popup-overlay.hidden { display: none; }

.win-popup {
  width: 320px;
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 2px 2px 0 #000, inset 1px 1px 0 #dfdfdf;
  font-family: 'MS Sans Serif', 'Tahoma', Arial, sans-serif;
  font-size: 11px;
  color: #000;
}

.win-popup-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to right, #000080, #1084d0);
  padding: 3px 4px;
  user-select: none;
}
.win-popup-title-left {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
}
.win-popup-icon-title { font-size: 12px; }

.win-popup-controls { display: flex; gap: 2px; }
.win-popup-btn-ctrl {
  width: 16px;
  height: 14px;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  padding: 0;
}
.win-popup-btn-ctrl:active {
  border-color: #808080 #ffffff #ffffff #808080;
}

.win-popup-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 12px;
}
.win-popup-icon {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
}
.win-popup-message {
  font-size: 12px;
  line-height: 1.5;
  padding-top: 4px;
  word-break: keep-all;
}

.win-popup-footer {
  display: flex;
  justify-content: center;
  padding: 0 16px 12px;
  gap: 6px;
}
.win-popup-footer.hidden { display: none; }

.win-popup-ok {
  min-width: 75px;
  padding: 3px 10px;
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  font-family: 'MS Sans Serif', 'Tahoma', Arial, sans-serif;
  font-size: 11px;
  cursor: pointer;
  color: #000;
}
.win-popup-ok:hover { background: #e0ddd5; }
.win-popup-ok:active {
  border-color: #808080 #ffffff #ffffff #808080;
  padding: 4px 9px 2px 11px;
}

/* ── win-popup-cancel 버튼 (win-popup-ok 기반, 색상만 다름) ── */
.win-popup-cancel {
  background: #c8c4bc !important;
}
.win-popup-cancel:hover { background: #b8b4ac !important; }

/* ── PRIVACY MODE 팝업 ── */
.privacy-popup {
  width: 400px;
  max-width: 94vw;
}
.privacy-popup-body {
  padding: 14px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.privacy-popup-question {
  font-size: 13px;
  font-weight: bold;
  color: #000;
  letter-spacing: 0.5px;
}
.privacy-popup-info {
  background: #fff;
  border: 1px solid;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.privacy-info-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: #111;
  line-height: 1.5;
}
.privacy-info-icon {
  flex-shrink: 0;
  font-size: 13px;
  margin-top: 1px;
}
.privacy-popup-footer {
  justify-content: flex-end;
  padding-right: 16px;
}

/* 로딩 상태 점 애니메이션 */
.win-popup-dots::after {
  content: '';
  animation: win-dots 1.2s steps(4, end) infinite;
}
@keyframes win-dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

/* 하단 고정 바 (공지 + 소셜 + 법적) */
.start-bottom-bar {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: clamp(16px, 3vh, 28px);
  padding-top: 16px;
}

/* 공지/이벤트 배너 */
.start-notice-link {
  display: block;
  width: 100%;
}
.start-notice-img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: 72px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 2px;
  opacity: 0.9;
  transition: opacity 0.15s;
}
.start-notice-link:hover .start-notice-img { opacity: 1; }

/* 소셜 아이콘 버튼 */
.start-social-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.start-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  opacity: 0.5;
  transition: opacity 0.15s, transform 0.15s;
}
.start-social-btn:hover { opacity: 1; transform: translateY(-2px); }
.start-social-btn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* 법적 링크 바 */
.start-legal-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.start-legal-link {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.start-legal-link:hover { color: var(--accent); }
.start-legal-sep { color: var(--text-dim); font-size: 10px; }

/* 구버전 .msg .btn 클래스 호환 */
.msg { font-size: 13px; color: var(--accent2); min-height: 18px; }
.btn-group { display: flex; gap: 10px; }
.btn { font-family: var(--font); font-size: 15px; padding: 10px 20px; border: 1px solid; cursor: pointer; }
.join-panel.hidden { display: none; }

/* 시작화면 설정 버튼 */
.start-settings-btn {
  position: absolute;
  bottom: 28px; right: 28px; /* 패널 기준 */
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.15s;
  font-family: var(--font);
}
.start-settings-btn:hover { color: rgba(255,255,255,0.8); }

/* 로비 설정 버튼 */
.lby-settings-btn {
  font-family: var(--font);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  color: #000;
  padding: 4px 12px;
  cursor: pointer;
}
.lby-settings-btn:active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
}

/* ─────────────────────────────────────
   오버레이 (설정 / 일시정지)
───────────────────────────────────── */
.ov-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center;
  z-index: 900;
  backdrop-filter: blur(6px);
}
#settings-overlay { z-index: 950; } /* 일시정지 위에 표시 */
.ov-bg.hidden { display: none; }

.ov-panel {
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #404040;
  border-right: 2px solid #404040;
  outline: 1px solid #808080;
  box-shadow: 2px 2px 0 #000;
  width: min(460px, 92vw);
  display: flex; flex-direction: column;
}
.ov-panel-sm { width: min(300px, 88vw); }

.ov-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 6px;
  background: linear-gradient(to right, #000080, #1084d0);
}
.ov-title {
  font-weight: 700; font-size: 13px;
  letter-spacing: 0; color: #fff;
  padding: 2px 4px;
}
.ov-close-btn {
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  color: #000; font-size: 12px;
  cursor: pointer; font-family: var(--font);
  font-weight: 700; line-height: 1;
  width: 18px; height: 16px; padding: 0;
}
.ov-close-btn:active { border-top: 2px solid #808080; border-left: 2px solid #808080; border-bottom: 2px solid #fff; border-right: 2px solid #fff; }

.ov-body {
  padding: 16px 20px; display: flex; flex-direction: column; gap: 16px;
  background: #d4d0c8;
}
.ov-row { display: flex; flex-direction: column; gap: 8px; }
.ov-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 400; letter-spacing: 0;
  color: #000;
}
.ov-val { font-weight: 700; color: #000; font-size: 12px; }

.ov-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px;
  background: #808080;
  outline: none; border: none; cursor: pointer;
  border-top: 1px solid #404040; border-bottom: 1px solid #fff;
}
.ov-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 20px;
  background: #d4d0c8; cursor: pointer;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-bottom: 2px solid #808080; border-right: 2px solid #808080;
}
.ov-slider::-moz-range-thumb {
  width: 12px; height: 20px;
  background: #d4d0c8; cursor: pointer;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-bottom: 2px solid #808080; border-right: 2px solid #808080;
  border-radius: 0;
}

.ov-select {
  font-family: inherit; font-size: 11px;
  background: #fff; color: #000;
  border-top: 2px solid #808080; border-left: 2px solid #808080;
  border-bottom: 2px solid #fff; border-right: 2px solid #fff;
  padding: 2px 4px; cursor: pointer; min-width: 100px;
}
.ov-select:focus { outline: 1px dotted #000080; }

.ov-foot {
  padding: 8px 16px;
  border-top: 1px solid #808080;
  display: flex; justify-content: flex-end;
  background: #d4d0c8;
  gap: 6px;
}
.ov-save-btn {
  font-family: var(--font); font-weight: 700;
  font-size: 12px; letter-spacing: 0;
  padding: 4px 20px; background: #d4d0c8;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-bottom: 2px solid #808080; border-right: 2px solid #808080;
  outline: 2px solid #000;
  color: #000; cursor: pointer;
}
.ov-save-btn:active { border-top: 2px solid #808080; border-left: 2px solid #808080; border-bottom: 2px solid #fff; border-right: 2px solid #fff; }
.ov-reset-btn {
  font-family: var(--font); font-weight: 700;
  font-size: 11px; letter-spacing: 0;
  padding: 4px 12px; background: #d4d0c8;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-bottom: 2px solid #808080; border-right: 2px solid #808080;
  color: #000; cursor: pointer; width: 100%;
}
.ov-reset-btn:active { border-top: 2px solid #808080; border-left: 2px solid #808080; border-bottom: 2px solid #fff; border-right: 2px solid #fff; }
/* 설정 패널 — 탭 레이아웃 */
.settings-panel-wide { width: min(660px, 94vw); }

.settings-tabs {
  display: flex;
  align-items: flex-end;
  padding: 6px 8px 0;
  gap: 2px;
  background: #d4d0c8;
  border-bottom: 2px solid #fff;
  position: relative;
}
.settings-tab {
  font-family: var(--font); font-size: 12px; font-weight: 400;
  padding: 3px 18px 4px;
  background: #bfbbb4;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  cursor: pointer; color: #000;
  position: relative; top: 2px; z-index: 1;
}
.settings-tab.active {
  font-weight: 700;
  background: #d4d0c8;
  border-bottom: 2px solid #d4d0c8;
  padding-bottom: 6px;
  z-index: 2;
}
.settings-tab-content {
  padding: 18px 20px;
  background: #d4d0c8;
  min-height: 160px;
}
.settings-tab-panel { display: none; flex-direction: column; gap: 16px; }
.settings-tab-panel.active { display: flex; }

/* 조준선 탭 — 좌우 분할 */
.crosshair-settings-layout {
  display: flex; gap: 16px; align-items: stretch;
}
.crosshair-settings-left {
  flex: 1; display: flex; flex-direction: column; gap: 12px;
}
.crosshair-settings-right {
  width: 150px;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  background: #111;
  display: flex; align-items: center; justify-content: center;
}

/* 키 매핑 탭 */
.keybinds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
}
.kb-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.kb-label {
  font-size: 12px; font-weight: 400; color: #000; white-space: nowrap;
}
.kb-btn {
  font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: 0;
  min-width: 64px; padding: 3px 8px; text-align: center;
  background: #d4d0c8; color: #000; cursor: pointer;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-bottom: 2px solid #808080; border-right: 2px solid #808080;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kb-btn:active, .kb-btn.listening {
  border-top: 2px solid #808080; border-left: 2px solid #808080;
  border-bottom: 2px solid #fff; border-right: 2px solid #fff;
  background: #c0c0b8; color: #000;
}
.kb-btn.listening { color: #888; }

/* 설정 섹션 구분선 */
.ov-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0;
  color: #000; padding-bottom: 6px;
  border-bottom: 1px solid #808080;
}
/* 색상 선택 */
.ov-color-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.ov-color-input {
  width: 36px; height: 22px;
  border-top: 2px solid #808080; border-left: 2px solid #808080;
  border-bottom: 2px solid #fff; border-right: 2px solid #fff;
  cursor: pointer; background: none; padding: 1px;
}
/* 토글 → Windows 체크박스 느낌 */
.ov-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
}
.ov-toggle {
  position: relative; width: 36px; height: 18px; cursor: pointer;
}
.ov-toggle input { opacity: 0; width: 0; height: 0; }
.ov-toggle-track {
  position: absolute; inset: 0;
  background: #808080;
  border-top: 2px solid #404040; border-left: 2px solid #404040;
  border-bottom: 2px solid #fff; border-right: 2px solid #fff;
}
.ov-toggle input:checked + .ov-toggle-track { background: #000080; }
.ov-toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 12px; height: 12px; background: #d4d0c8;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-bottom: 2px solid #808080; border-right: 2px solid #808080;
  transition: left 0.1s;
}
.ov-toggle input:checked ~ .ov-toggle-thumb { left: 21px; }

/* 시작화면 전용 설정 행 */
.start-only-row { display: none; }
#settings-overlay.is-start-context .start-only-row { display: flex; }
.ov-setting-desc { font-size: 10px; color: #808080; font-weight: normal; }

/* 일시정지 패널 */
.ov-pause-title {
  font-weight: 700; font-size: 14px;
  letter-spacing: 0; color: #fff;
  text-align: left;
  padding: 4px 6px;
  background: linear-gradient(to right, #000080, #1084d0);
}
.ov-pause-nav {
  display: flex; flex-direction: column;
  padding: 12px 16px; gap: 4px;
  background: #d4d0c8;
}
.ov-pause-btn {
  font-family: var(--font); font-weight: 700;
  font-size: 12px; letter-spacing: 0;
  color: #000; background: #d4d0c8;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-bottom: 2px solid #808080; border-right: 2px solid #808080;
  padding: 6px 16px; text-align: center; cursor: pointer;
}
.ov-pause-btn:active { border-top: 2px solid #808080; border-left: 2px solid #808080; border-bottom: 2px solid #fff; border-right: 2px solid #fff; }
.ov-pause-btn-danger { color: #cc0000; }
.ov-pause-btn-danger:hover { background: #c0bcb4; }

/* ─────────────────────────────────────
   LOBBY  (Windows 98/XP style)
───────────────────────────────────── */
#screen-lobby {
  background: url('img/desktop.jpg') center / cover no-repeat,
              #008080; /* teal fallback = classic Win98 desktop */
}

/* ── Window chrome ── */
.lby-wrap {
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #404040;
  border-right: 2px solid #404040;
  outline: 1px solid #808080;
  width: min(940px, 95vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 2px 2px 0 #000;
}

/* ── Title bar ── */
.lby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  background: linear-gradient(to right, #000080, #1084d0);
  flex-shrink: 0;
  gap: 8px;
}
.lby-title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0;
  color: #fff;
  text-shadow: 1px 1px 0 #000080;
  padding: 2px 4px;
}
.lby-room-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.lby-room-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(255,255,255,0.8);
}
.lby-room-code {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  color: #fff;
  background: rgba(0,0,0,0.25);
  padding: 1px 8px;
  border: 1px solid rgba(255,255,255,0.3);
}
.lby-icon-btn {
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #404040;
  border-right: 2px solid #404040;
  color: #000;
  cursor: pointer;
  padding: 1px 7px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 700;
  line-height: 18px;
}
.lby-icon-btn:active {
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
}

/* ── Body ── */
.lby-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #d4d0c8;
  padding: 4px;
  gap: 4px;
}
.lby-col-left {
  flex: 1;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  background: #d4d0c8;
}
.lby-col-right {
  width: 260px;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
  overflow: hidden;
  background: #d4d0c8;
  border-left: 2px solid #808080;
}

/* ── Section labels (group-box style) ── */
.lby-sec-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  color: #000;
  margin-bottom: 6px;
  background: #d4d0c8;
  display: inline-block;
  padding: 0 2px;
}

/* ── Player list ── */
.lby-player-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  background: #fff;
  scrollbar-width: thin;
}
.lby-player-list::-webkit-scrollbar { width: 16px; }
.lby-player-list::-webkit-scrollbar-track { background: #d4d0c8; }
.lby-player-list::-webkit-scrollbar-thumb {
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
}

#screen-lobby .win-lv-row {
  display: flex;
  align-items: center;
  padding: 3px 6px;
  border: none;
  border-bottom: 1px solid #e0dcd4;
  background: #fff;
  color: #000;
}
#screen-lobby .win-lv-row:hover { background: #000080; color: #fff; }
#screen-lobby .win-lv-row.win-lv-empty { color: #808080; }
#screen-lobby .win-lv-row.win-lv-me { background: #c8c8ff; }
#screen-lobby .win-lv-row.win-lv-host-row { background: #ffe8e8; }

#screen-lobby .win-lv-td {
  font-size: 12px;
  font-weight: 400;
  color: inherit;
  font-family: var(--font);
}
#screen-lobby .btn-kick {
  background: #d4d0c8;
  color: #000;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  padding: 1px 6px;
  cursor: pointer;
  font-size: 11px;
  font-family: var(--font);
}
#screen-lobby .btn-kick:active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
}

/* ── Map select ── */
.lby-map-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.lby-map-btn {
  font-family: var(--font);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0;
  padding: 4px 12px;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  color: #000;
  cursor: pointer;
}
.lby-map-btn:active { border-top: 2px solid #808080; border-left: 2px solid #808080; border-bottom: 2px solid #fff; border-right: 2px solid #fff; }
.lby-map-btn.active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  background: #c0bcb4;
}

/* ── Character panel ── */
.lby-col-char {
  width: 200px;
  flex-shrink: 0;
  padding: 10px 10px;
  border-left: 2px solid #808080;
  border-right: 2px solid #808080;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  background: #d4d0c8;
}
.lby-char-canvas {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: block;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  background: #000;
}
/* ── Customize panel ── */
.lby-cust-panel {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lby-cust-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lby-cust-label {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  color: #000;
  letter-spacing: 0.05em;
}
.lby-cust-color-input {
  width: 48px;
  height: 22px;
  border: 2px solid #808080;
  border-top-color: #808080;
  border-left-color: #808080;
  border-bottom-color: #fff;
  border-right-color: #fff;
  padding: 0 2px;
  cursor: pointer;
  background: #d4d0c8;
}
.acc-panel {
  width: 600px;
  max-width: 96vw;
}
.acc-body {
  padding: 12px;
}
.acc-layout {
  display: flex;
  gap: 12px;
  height: 300px;
}
.acc-preview-col {
  width: 210px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acc-preview-slot {
  flex: 1;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  background: #1a1a2e;
  overflow: hidden;
  position: relative;
}
.acc-preview-slot canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.acc-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.acc-list-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.acc-list-header {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  color: #000;
  letter-spacing: 0.05em;
  padding-bottom: 5px;
  border-bottom: 2px solid #808080;
  flex-shrink: 0;
}
.lby-cust-acc-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: flex-start;
  padding: 2px;
}
.lby-cust-acc-empty {
  font-family: var(--font);
  font-size: 10px;
  color: #888;
  font-style: italic;
}
.lby-cust-acc-btn {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  color: #000;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.lby-cust-acc-btn:hover {
  background: #e0dcd4;
}
.lby-cust-acc-btn.active {
  background: #4a90d9;
  color: #fff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
}
.lby-cust-acc-btn.active:hover {
  background: #5a9de0;
}
.lby-spec-btn {
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0;
  padding: 3px 8px;
  margin-top: 8px;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  color: #000;
  cursor: pointer;
}
.lby-spec-btn:active { border-top: 2px solid #808080; border-left: 2px solid #808080; border-bottom: 2px solid #fff; border-right: 2px solid #fff; }
.lby-spec-btn-active { background: #c0bcb4 !important; border-top: 2px solid #808080 !important; border-left: 2px solid #808080 !important; border-bottom: 2px solid #fff !important; border-right: 2px solid #fff !important; }
.lby-char-name {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  color: #000;
}
.lby-char-swatch {
  display: inline-block;
  width: 10px; height: 10px;
  border: 1px solid #808080;
  flex-shrink: 0;
  margin-right: 5px;
  vertical-align: middle;
}
.lby-map-guest {
  font-size: 12px;
  font-weight: 400;
  color: #000;
  letter-spacing: 0;
}

/* ── Game settings (room settings panel items) ── */
.lby-setting-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.lby-setting-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  color: #000;
  text-transform: uppercase;
  min-width: 88px;
}
.lby-setting-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
}
.lby-setting-btn {
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  color: #000;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  width: 24px; height: 22px;
  cursor: pointer;
  line-height: 1;
}
.lby-setting-btn:active { border-top: 2px solid #808080; border-left: 2px solid #808080; border-bottom: 2px solid #fff; border-right: 2px solid #fff; }
.lby-weapon-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.lby-weapon-btn {
  font-family: var(--font); font-weight: 700; font-size: 10px; letter-spacing: 0;
  color: #000; background: #d4d0c8;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-bottom: 2px solid #808080; border-right: 2px solid #808080;
  padding: 2px 6px; cursor: pointer;
}
.lby-weapon-btn:active,
.lby-weapon-btn.active {
  border-top: 2px solid #808080; border-left: 2px solid #808080;
  border-bottom: 2px solid #fff; border-right: 2px solid #fff;
  background: #c0bcb4;
}
.lby-setting-info { font-size: 11px; color: #000; }
.lby-setting-info b { color: #000; }
.lby-mode-desc { font-size: 10px; color: var(--text-dim); margin-top: 3px; }

/* 게임 모드 버튼 */
.lby-mode-btns { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.lby-mode-btn {
  font-family: var(--font); font-weight: 700; font-size: 10px; letter-spacing: 0;
  color: #000; background: #d4d0c8;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-bottom: 2px solid #808080; border-right: 2px solid #808080;
  padding: 3px 8px; cursor: pointer;
}
.lby-mode-btn:active { border-top: 2px solid #808080; border-left: 2px solid #808080; border-bottom: 2px solid #fff; border-right: 2px solid #fff; }
.lby-mode-btn.active { border-top: 2px solid #808080; border-left: 2px solid #808080; border-bottom: 2px solid #fff; border-right: 2px solid #fff; background: #c0bcb4; }
.lby-mode-cfg { display: block; margin-top: 8px; }
.lby-mode-cfg.hidden { display: none; }
.lby-weapon-multi { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 4px; }
.lby-weapon-multi-btn {
  font-family: var(--font); font-weight: 700; font-size: 10px; letter-spacing: 0;
  color: #000; background: #d4d0c8;
  border-top: 2px solid #fff; border-left: 2px solid #fff;
  border-bottom: 2px solid #808080; border-right: 2px solid #808080;
  padding: 2px 6px; cursor: pointer;
}
.lby-weapon-multi-btn.active { border-top: 2px solid #808080; border-left: 2px solid #808080; border-bottom: 2px solid #fff; border-right: 2px solid #fff; background: #c0bcb4; }
.lby-weapon-quick .lby-weapon-multi-btn { background:#c4d4c4; font-size:9px; padding:1px 7px; }

@keyframes lby-shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-4px); }
  40%  { transform: translateX(4px); }
  60%  { transform: translateX(-3px); }
  80%  { transform: translateX(3px); }
  100% { transform: translateX(0); }
}

/* ── Chat ── */
.lby-chat-log {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  max-height: 240px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  background: #fff;
  padding: 4px;
}
#screen-lobby .lobby-chat-msg {
  font-size: 12px;
  font-weight: 400;
  color: #000;
  line-height: 1.5;
  font-family: var(--font);
}
#screen-lobby .lobby-chat-name {
  font-weight: 700;
  color: #000080;
  margin-right: 4px;
}
.lby-chat-bar {
  display: flex;
  gap: 4px;
  margin-top: auto;
  flex-shrink: 0;
}
.lby-chat-input {
  flex: 1;
  background: #fff;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  color: #000;
  font-family: var(--font);
  font-size: 12px;
  padding: 3px 6px;
  outline: none;
}
.lby-chat-input::placeholder { color: #808080; }
.lby-chat-send {
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  color: #000;
  font-size: 14px;
  padding: 0 10px;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
}
.lby-chat-send:active { border-top: 2px solid #808080; border-left: 2px solid #808080; border-bottom: 2px solid #fff; border-right: 2px solid #fff; }

/* ── Footer (status bar) ── */
.lby-foot {
  border-top: 2px solid #808080;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: #d4d0c8;
}
.lby-foot-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lby-bot-section {
  display: flex;
  align-items: center;
  gap: 4px;
  border-left: 1px solid #808080;
  padding-left: 8px;
  margin-left: 2px;
}
.lby-bot-label {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  color: #444;
  white-space: nowrap;
}
.lby-bot-btn[data-diff="easy"]   { color: #006600; }
.lby-bot-btn[data-diff="medium"] { color: #885500; }
.lby-bot-btn[data-diff="hard"]   { color: #990000; font-weight: 700; }
.rs-panel { width: min(420px, 92vw); }
.rs-body { padding: 16px 20px; overflow-y: auto; max-height: 70vh; background: #d4d0c8; }
.lby-msg {
  flex: 1;
  font-size: 12px;
  color: #cc0000;
  letter-spacing: 0;
  font-weight: 700;
}
.lby-waiting {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  color: #000;
}
/* START GAME = default button (thick border) */
.lby-start-btn {
  font-family: var(--font);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0;
  padding: 6px 24px;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #404040;
  border-right: 2px solid #404040;
  outline: 2px solid #000;
  color: #000;
  cursor: pointer;
}
.lby-start-btn:active { border-top: 2px solid #404040; border-left: 2px solid #404040; border-bottom: 2px solid #fff; border-right: 2px solid #fff; }
.lby-start-btn.hidden { display: none; }
.lby-waiting.hidden { display: none; }

@keyframes blink { 50% { opacity: 0.3; } }

/* ─────────────────────────────────────
   GAME SCREEN
───────────────────────────────────── */
#screen-game { background: #000; }

#game-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* ── HUD 컨테이너 ── */
.hud {
  position: absolute; inset: 0;
  pointer-events: none;
}

/* ── 상단: 킬수 + 핑 배지 ── */
.hud-top {
  position: absolute; top: 16px;
  left: 16px; right: 16px;
  display: flex; justify-content: space-between;
  pointer-events: none;
}
@keyframes pickup-fade { 0%{opacity:1} 60%{opacity:1} 100%{opacity:0} }
@keyframes screen-flash { 0%{opacity:0.45} 100%{opacity:0} }
#pickup-flash {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 50;
}
#pickup-flash.flash-health { background: #00ff44; animation: screen-flash 0.5s ease-out forwards; }
#pickup-flash.flash-ammo   { background: #ffe000; animation: screen-flash 0.5s ease-out forwards; }
.pickup-text {
  position: absolute;
  top: calc(100% + 4px); left: 0;
  font-family: var(--font);
  font-size: 13px; font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  white-space: nowrap;
  animation: pickup-fade 1.6s forwards;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000;
  pointer-events: none;
}
.pickup-text.hidden { display: none; }
/* 픽업 텍스트 기준점: 부모를 relative로 */
.hud-top > div:first-child { position: relative; }
.win-hud-badge {
  font-family: var(--font);
  font-size: 12px; font-weight: 700;
  color: #000;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #404040;
  border-right: 2px solid #404040;
  outline: 1px solid #000;
  padding: 3px 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* 상단 가운데 모드 HUD */
.hud-mode-center {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}
/* Windows 팝업 스타일 HUD 패널 */
.hud-win-popup {
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 2px 2px 0 #000, inset 1px 1px 0 #dfdfdf;
  min-width: 160px;
}
.hud-win-titlebar {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to right, #000080, #1084d0);
  padding: 2px 4px 2px 5px; height: 18px;
}
.hud-win-titlebar-l {
  display: flex; align-items: center; gap: 4px;
}
.hud-win-titlebar-icon {
  width: 12px; height: 12px; flex-shrink: 0;
  background: #c0392b;
  border-top: 1px solid #e74c3c;
  border-left: 1px solid #e74c3c;
  border-right: 1px solid #7f1e13;
  border-bottom: 1px solid #7f1e13;
}
.hud-win-titlebar span {
  color: #fff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 10px; font-weight: bold;
  white-space: nowrap;
  text-shadow: 1px 1px 0 rgba(0,0,40,0.6);
}
.hud-win-body {
  padding: 5px 10px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: #d4d0c8;
}
.hud-timer-val {
  font-family: var(--font); font-size: 22px; font-weight: 700;
  color: #000; letter-spacing: 4px;
}
.hud-timer-val.urgent { color: #cc0000; animation: timer-pulse 0.6s ease-in-out infinite; }
@keyframes timer-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.hud-mode-info {
  font-family: Tahoma, Arial, sans-serif; font-size: 10px; font-weight: 600;
  color: #000; letter-spacing: 1px;
  white-space: nowrap;
}
/* 라운드 결과 오버레이 */
#round-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0.75);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 200; pointer-events: none;
}
#round-overlay.hidden { display: none; }
#round-overlay .ro-title { font-family: var(--font); font-size: 36px; font-weight: 900; color: #fff; letter-spacing: 6px; margin-bottom: 12px; }
#round-overlay .ro-sub { font-family: var(--font); font-size: 14px; color: #aaa; letter-spacing: 3px; }
#round-overlay .ro-scores { margin-top: 20px; min-width: 280px; }
#round-overlay .ro-row { display: flex; justify-content: space-between; padding: 4px 0; font-family: var(--font); font-size: 13px; color: #ccc; border-bottom: 1px solid rgba(255,255,255,0.08); }
#round-overlay .ro-row.ro-me { color: #fff; font-weight: 700; }

/* ── 레이저 충전 게이지 ── */
.laser-gauge {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
}
.laser-gauge.hidden { display: none; }
.laser-gauge-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: conic-gradient(#ff4400 0deg, rgba(255,68,0,0.15) 0deg 360deg);
  -webkit-mask: radial-gradient(circle, transparent 22px, black 22px);
  mask: radial-gradient(circle, transparent 22px, black 22px);
  transition: none;
}

/* ── 조준선 ── */
@keyframes ch-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.hud-crosshair {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  --ch-color: rgba(255,255,255,0.85);
  --hm-color: rgba(255,80,80,0.95);
}
.hud-crosshair.reloading { animation: ch-spin 0.45s linear infinite; }
.ch { position: absolute; background: var(--ch-color); }
.ch-top    { width: 2px; height: 8px; top: -14px;    left: -1px; }
.ch-bot    { width: 2px; height: 8px; bottom: -14px; left: -1px; }
.ch-left   { width: 8px; height: 2px; left: -14px;   top: -1px; }
.ch-right  { width: 8px; height: 2px; right: -14px;  top: -1px; }
/* 중앙 점 */
.ch-dot-el {
  display: none; position: absolute; border-radius: 50%;
  background: var(--ch-color); width: 2px; height: 2px; top: -1px; left: -1px;
}
.hud-crosshair.ch-has-dot .ch-dot-el { display: block; }
/* 아웃라인 */
.hud-crosshair.ch-has-outline .ch,
.hud-crosshair.ch-has-outline .ch-dot-el {
  box-shadow: 0 0 0 1px rgba(0,0,0,0.7);
}
/* 히트마커 */
.ch-hm {
  position: absolute; pointer-events: none;
  width: 2px; height: 6px;
  background: var(--hm-color);
  opacity: 0; transition: opacity 0.12s ease-out;
}
.hud-crosshair.hit .ch-hm { opacity: 1; transition: none; }
.ch-hm-tl { top: -10px; left: -10px; transform: rotate(45deg);  transform-origin: 50% 100%; }
.ch-hm-tr { top: -10px; right: -10px; transform: rotate(-45deg); transform-origin: 50% 100%; }
.ch-hm-bl { bottom: -10px; left: -10px; transform: rotate(-45deg); transform-origin: 50% 0%; }
.ch-hm-br { bottom: -10px; right: -10px; transform: rotate(45deg);  transform-origin: 50% 0%; }

/* ── 크로스헤어 미리보기 패널 ── */
.ch-preview-panel {
  display: flex; align-items: center; justify-content: center;
  background: #111; border: 1px solid #333; border-radius: 6px;
  height: 80px; margin-bottom: 4px;
}
.ch-preview-crosshair {
  position: relative;
  --ch-color: rgba(255,255,255,0.85);
}
.ch-preview-crosshair .ch { position: absolute; background: var(--ch-color); }

/* ── 하단 HUD ── */
.hud-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 24px 22px;
}

/* HP 패널 (좌측) */
.hud-hp-panel {
  display: flex; flex-direction: column; gap: 10px;
}
.hud-hp-value {
  font-family: var(--font);
  font-size: 42px; font-weight: 700; line-height: 1;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.8);
  letter-spacing: -0.01em;
}
.hud-hp-track {
  width: 240px; height: 7px;
  background: rgba(255,255,255,0.2);
  border-radius: 99px; overflow: hidden;
}
.hud-hp-fill {
  height: 100%;
  background: #fff;
  border-radius: 99px;
  transition: width 0.25s ease, background-color 0.4s ease;
}

/* AMMO 패널 (우측) */
.hud-ammo-panel {
  display: flex; align-items: center; gap: 14px;
}
.hud-ammo-nums {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.hud-ammo-count {
  font-family: var(--font);
  font-size: 42px; font-weight: 700; line-height: 1;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.8);
  letter-spacing: -0.01em;
}
.hud-ammo-slash { color: rgba(255,255,255,0.4); margin: 0 3px; }
.hud-ammo-img {
  width: 82px; height: 82px;
  border: 2px solid rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 4px; flex-shrink: 0;
}
.win-reload {
  font-family: var(--font);
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  color: #ff4444;
  animation: reloadBlink 0.5s step-end infinite;
}
@keyframes reloadBlink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── 무기 바 (하단 가운데) ── */
.hud-weapon-bar {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}
.hud-weapon-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 58px;
  opacity: 0.45;
  transition: opacity 0.15s, transform 0.15s;
}
.hud-weapon-slot.active {
  opacity: 1;
  transform: translateY(-5px);
}
.hud-weapon-slot-img {
  width: 58px;
  height: 46px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}
.hud-weapon-slot.active .hud-weapon-slot-img {
  border-color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.65);
  box-shadow: 0 0 8px rgba(255,255,255,0.18);
}
.hud-weapon-slot-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
  box-sizing: border-box;
  display: block;
}
.hud-weapon-slot-name {
  font-family: var(--font);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.7);
  text-align: center;
}
.hud-weapon-slot.active .hud-weapon-slot-name {
  color: #fff;
}

/* ── 킬 피드 (Windows 알림 팝업 스타일) ── */
.kill-feed {
  position: absolute; top: 90px; right: 0;
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 5px;
  pointer-events: none;
  max-width: 440px;
  overflow: hidden;
}
.kill-entry {
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  box-shadow: 2px 2px 0 #000, inset 1px 1px 0 #dfdfdf;
  min-width: 200px;
  max-width: 420px;
  animation: killWinSlide 4s linear forwards;
  white-space: nowrap;
  overflow: hidden;
}
.kill-entry-titlebar {
  display: flex; align-items: center;
  background: linear-gradient(to right, #800000, #c0392b);
  padding: 2px 4px 2px 5px; height: 16px; gap: 4px;
}
.kill-entry-titlebar-icon {
  width: 10px; height: 10px; flex-shrink: 0;
  background: #ffdd44;
  border-top: 1px solid #ffe88a;
  border-left: 1px solid #ffe88a;
  border-right: 1px solid #aa8800;
  border-bottom: 1px solid #aa8800;
}
.kill-entry-titlebar span {
  color: #fff; font-family: Tahoma, Arial, sans-serif;
  font-size: 10px; font-weight: bold;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kill-entry-body {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px; font-weight: 400;
  color: #000;
  padding: 4px 8px 5px;
  word-break: break-all;
  white-space: normal;
  line-height: 1.3;
}
@keyframes killWinSlide {
  0%     { transform: translateX(calc(100% + 20px)); opacity: 1; }
  8%    { transform: translateX(0); opacity: 1; }
  80%  { transform: translateX(0); opacity: 1; }
  100%   { transform: translateX(0); opacity: 0; }
}
.kf-killer { color: #cc0000; font-weight: bold; }
.kf-victim { color: #0055cc; font-weight: bold; }
.kf-weapon { color: #886600; font-weight: bold; }

/* ── 킬 알림 ── */
#kill-notif {
  position: absolute; bottom: 22%; left: 50%; transform: translateX(-50%);
  font-family: var(--font); font-size: 22px; font-weight: 700; letter-spacing: 2px;
  color: #ff4444;
  pointer-events: none; opacity: 0;
}
#kill-notif.show {
  animation: killShake 2.4s forwards;
}
@keyframes killShake {
  0%   { opacity:1; transform: translateX(-50%); }
  70%  { opacity:1; }
  100% { opacity:0; transform: translateX(-50%); }
}

/* ── 채팅 패널 ── */
.chat-panel {
  position: absolute; bottom: 104px; left: 16px;
  width: 290px; pointer-events: none;
  display: flex; flex-direction: column;
  background: #D4D0C8;
  border: 2px solid;
  border-color: #FFFFFF #808080 #808080 #FFFFFF;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}
.win-chat-bar {
  background: linear-gradient(to right, #0A246A 0%, #3A78C9 60%, #5BA3E0 100%);
  padding: 2px 6px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 10px; font-weight: bold; color: #fff;
  height: 18px; display: flex; align-items: center;
  flex-shrink: 0;
}
.chat-log {
  max-height: 110px; overflow-y: auto;
  background: #fff;
  border: 1px solid;
  border-color: #808080 #FFFFFF #FFFFFF #808080;
  margin: 4px 4px 2px;
  display: flex; flex-direction: column;
}
.chat-msg {
  font-family: Tahoma, Arial, sans-serif; font-size: 11px;
  color: #000; background: transparent;
  border-bottom: 1px solid #F0F0F0;
  padding: 2px 5px;
  animation: fadeChat 8s forwards;
  word-break: break-all;
}
.chat-name { color: #000080; font-weight: bold; margin-right: 2px; }
.chat-input-wrap {
  pointer-events: all;
  display: flex; align-items: center; gap: 4px;
  background: #fff;
  border: 1px solid;
  border-color: #808080 #FFFFFF #FFFFFF #808080;
  padding: 2px 5px; margin: 0 4px 4px;
}
.chat-prompt {
  color: #000; font-family: Tahoma, Arial, sans-serif; font-size: 11px;
}
#chat-input {
  background: transparent; border: none; outline: none;
  color: #000; font-family: Tahoma, Arial, sans-serif; font-size: 11px;
  width: 100%; caret-color: #000;
}
@keyframes fadeChat {
  0%,70% { opacity: 1; } 100% { opacity: 0; }
}

/* ── BSOD 사망 화면 ── */
.death-screen {
  position: absolute; inset: 0;
  background: rgba(0, 0, 170, 0.78);
  pointer-events: none;
  padding: 48px 64px;
  font-family: 'Courier New', Courier, monospace;
  color: #fff;
  display: flex; flex-direction: column;
}
.death-cam-label {
  position: absolute; top: 16px; right: 20px;
  font-size: 16px; letter-spacing: 2px;
  color: #ff4444; font-weight: bold;
  animation: dcblink 1s step-end infinite;
}
@keyframes dcblink { 50% { opacity: 0; } }
.death-screen.hidden { display: none; }
.bsod-bar {
  display: inline-block; align-self: flex-start;
  background: #AAAAAA; color: #0000AA;
  font-size: 18px; font-weight: bold; padding: 2px 16px;
  margin-bottom: 24px;
}
.bsod-heading {
  font-size: 20px; font-weight: bold;
  line-height: 1.5; margin-bottom: 0;
}
.bsod-normal { font-size: 18px; line-height: 1.7; margin: 0; }
.bsod-code   { font-size: 18px; font-weight: bold; margin: 0; }
.bsod-timer  { font-size: 22px; font-weight: bold; margin: 0; color: #ffff55; }

/* ── 스코어보드 ── */
.scoreboard {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,80,0.55);
  pointer-events: none; z-index: 80;
}
.scoreboard.hidden { display: none; }
.win-sb-dialog {
  background: #D4D0C8;
  border: 2px solid;
  border-color: #FFFFFF #808080 #808080 #FFFFFF;
  outline: 1px solid #000;
  min-width: 460px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
}
.sb-client { padding: 8px; }
.sb-table {
  width: 100%; border-collapse: collapse;
  font-family: Tahoma, Arial, sans-serif; font-size: 11px;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #FFFFFF #FFFFFF #808080;
}
.sb-table th {
  background: #D4D0C8; color: #000;
  padding: 3px 10px; text-align: left;
  border-bottom: 2px solid #808080;
  border-right: 1px solid #808080;
  font-weight: bold;
}
.sb-table td {
  padding: 3px 10px; color: #000;
  border-bottom: 1px solid #E8E8E8;
  border-right: 1px solid #F0F0F0;
}
.sb-table tr:hover td { background: #000080; color: #fff; }
.sb-table tr.sb-me td { background: #DCF0FF; font-weight: bold; }
.sb-table tr.sb-me:hover td { background: #000080; color: #fff; }

/* ── 게임 종료 화면 ── */
.end-screen {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,60,0.7);
  pointer-events: all;
}
.end-screen.hidden { display: none; }
.win-end-dialog {
  background: #D4D0C8;
  border: 2px solid;
  border-color: #FFFFFF #808080 #808080 #FFFFFF;
  outline: 1px solid #000;
  min-width: 400px;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
}
.end-client { padding: 14px 16px 10px; }
.end-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 8px;
}
.end-head-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  background: #c0392b;
  border-top: 5px solid #e74c3c;
  border-left: 5px solid #e74c3c;
  border-right: 5px solid #7f1e13;
  border-bottom: 5px solid #7f1e13;
}
.end-title {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 20px; font-weight: bold;
  color: #000; letter-spacing: 2px;
}
.end-sub {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px; color: #555; margin-top: 3px;
}
.end-scores {
  display: flex; flex-direction: column;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #FFFFFF #FFFFFF #808080;
}
.score-row {
  display: flex; justify-content: space-between;
  font-family: Tahoma, Arial, sans-serif; font-size: 11px;
  color: #000; padding: 4px 10px;
  border-bottom: 1px solid #E8E8E8;
}
.score-row:last-child { border-bottom: none; }
.score-row.me { background: #DCF0FF; font-weight: bold; }
.score-row:hover { background: #000080; color: #fff; }
.end-actions {
  display: flex; justify-content: flex-end;
  padding: 6px 10px 8px;
  border-top: 1px solid #808080;
  gap: 6px;
}

/* ── 포인터 잠금 힌트 (Windows 툴팁) ── */
.pointer-hint {
  position: absolute;
  bottom: 38px; left: 50%;
  transform: translateX(-50%);
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px; color: #000;
  background: #FFFFE1;
  border: 1px solid #666;
  padding: 3px 10px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 1px 1px 0 #888;
}

/* ── Utility ── */
.hidden { display: none !important; }


/* ═════════════════════════════════════════
   WINDOWS 98 / XP CHROME
   시작화면 + 로비화면 전용
═════════════════════════════════════════ */

/* ── 바탕화면 배경 ── */
#screen-start,
#screen-lobby {
  background: #000 url('../img/desktop.jpg') center / cover no-repeat;
  align-items: center;
  justify-content: center;
}

/* CRT 스캔라인 */
.win-scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 1px,
    rgba(0,0,0,0.06) 1px,
    rgba(0,0,0,0.06) 2px
  );
  pointer-events: none; z-index: 200;
}

/* ── 바탕화면 아이콘 ── */
.win-desktop-icons {
  position: absolute;
  top: 16px; left: 16px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 10;
}
.win-icon-item {
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  width: 72px; padding: 4px;
  cursor: default;
}
.win-icon-item:hover  { background: rgba(10,36,106,0.5); }
.win-icon-gfx {
  width: 32px; height: 32px;
  image-rendering: pixelated;
}

/* 픽셀 아이콘 — CSS로 구현 */
.win-gfx-exe {
  background: #c0392b;
  border-top: 3px solid #e74c3c;
  border-left: 3px solid #e74c3c;
  border-right: 3px solid #7f1e13;
  border-bottom: 3px solid #7f1e13;
  box-shadow: inset 0 0 0 1px #000;
}
.win-gfx-txt {
  background: #fff;
  border: 2px solid #888;
  position: relative;
}
.win-gfx-txt::before {
  content: '';
  position: absolute; top: 4px; left: 4px; right: 4px;
  height: 2px; background: #333;
  box-shadow: 0 4px 0 #333, 0 8px 0 #333, 0 12px 0 #ccc;
}
.win-gfx-txt::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 8px 8px 0 0;
  border-color: #888 transparent transparent transparent;
}
.win-gfx-bin {
  background: #bbb;
  border-top: 2px solid #e0e0e0;
  border-left: 2px solid #e0e0e0;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 100%, 0% 100%, 0% 20%);
}
.win-icon-label {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px; color: #fff;
  text-align: center;
  text-shadow: 1px 1px 2px #000, -1px -1px 2px #000;
  word-break: break-word; line-height: 1.3;
}

/* ── 창 (Dialog) ── */
.win-dialog {
  position: relative; z-index: 20;
  background: #D4D0C8;
  border: 2px solid;
  border-color: #FFFFFF #808080 #808080 #FFFFFF;
  outline: 1px solid #000;
  display: flex; flex-direction: column;
  width: 520px;
  font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif;
  font-size: 11px; color: #000;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.4);
}
.win-dialog-lg { width: 860px; }

/* ── 로비 2열 레이아웃 ── */
.lobby-columns {
  display: flex; gap: 10px;
}
.lobby-left  { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lobby-right { width: 280px; display: flex; flex-direction: column; flex-shrink: 0; }

/* 로비 채팅 */
.lobby-chat-wrap {
  display: flex; flex-direction: column;
  border: 2px solid;
  border-color: #808080 #FFFFFF #FFFFFF #808080;
  background: #fff;
  flex: 1;
}
.lobby-chat-log {
  flex: 1; min-height: 180px; max-height: 240px;
  overflow-y: auto;
  padding: 4px;
  display: flex; flex-direction: column; gap: 1px;
}
.lobby-chat-msg {
  font-family: Tahoma, Arial, sans-serif; font-size: 11px;
  color: #000; padding: 2px 4px;
  border-bottom: 1px solid #F4F4F4;
  word-break: break-all; line-height: 1.4;
}
.lobby-chat-msg:last-child { border-bottom: none; }
.lobby-chat-name { color: #000080; font-weight: bold; }
.lobby-chat-input-row {
  display: flex; border-top: 1px solid #C8C4BC;
}
.lobby-chat-input-row input {
  flex: 1;
  background: #fff !important;
  border: none !important;
  border-right: 1px solid #C8C4BC !important;
  outline: none !important;
  font-family: Tahoma, Arial, sans-serif !important;
  font-size: 11px !important;
  color: #000 !important;
  padding: 4px 6px !important;
  box-shadow: none !important;
}
.lobby-chat-input-row input::placeholder { color: #999 !important; }
.lobby-chat-send {
  min-width: 48px !important;
  border: none !important;
  outline: none !important;
  border-radius: 0 !important;
  background: #D4D0C8 !important;
  border-left: 1px solid #FFFFFF !important;
  font-size: 10px !important;
  padding: 4px 6px !important;
}
.lobby-chat-send:active { background: #C4C0B8 !important; }

/* ── 제목 표시줄 ── */
.win-titlebar {
  background: linear-gradient(to right,
    #0A246A 0%, #1B52AA 40%, #3A78C9 70%, #5BA3E0 100%);
  padding: 2px 4px 2px 6px;
  display: flex; align-items: center;
  justify-content: space-between;
  height: 22px;
  flex-shrink: 0;
}
.win-titlebar-l {
  display: flex; align-items: center; gap: 5px;
  overflow: hidden;
}
.win-titlebar-icon {
  width: 16px; height: 16px; flex-shrink: 0;
  background: #c0392b;
  border-top: 2px solid #e74c3c;
  border-left: 2px solid #e74c3c;
  border-right: 2px solid #7f1e13;
  border-bottom: 2px solid #7f1e13;
}
.win-titlebar span {
  color: #fff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px; font-weight: bold;
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 1px 1px 0 rgba(0,0,40,0.6);
}
.win-titlebar-btns {
  display: flex; gap: 2px; flex-shrink: 0; margin-left: 4px;
}
.win-cbtn {
  width: 17px; height: 15px;
  background: #D4D0C8;
  border: 1px solid;
  border-color: #FFFFFF #808080 #808080 #FFFFFF;
  outline: 1px solid #000;
  font-size: 8px;
  font-family: 'Marlett', Tahoma, Arial, sans-serif;
  font-weight: bold;
  cursor: default; padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: #000; line-height: 1;
}
.win-cbtn:active {
  border-color: #808080 #FFFFFF #FFFFFF #808080;
}
.win-cbtn-x { margin-left: 2px; }

/* ── 메뉴 바 ── */
.win-menubar {
  background: #D4D0C8;
  display: flex;
  padding: 1px 2px 0;
  border-bottom: 1px solid #808080;
  flex-shrink: 0;
}
.win-menu-item {
  padding: 2px 8px 3px;
  font-family: Tahoma, Arial, sans-serif; font-size: 11px;
  cursor: default;
}
.win-menu-item:hover {
  background: #000080; color: #fff;
}

/* ── 클라이언트 영역 ── */
.win-client {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}

/* ── 그룹 박스 ── */
.win-group-box {
  border: 1px solid;
  border-color: #808080 #FFFFFF #FFFFFF #808080;
  outline: 1px solid #000;
  outline-offset: -2px;
  padding: 18px 14px 14px;
  position: relative;
  margin-top: 8px;
}
.win-group-label {
  position: absolute; top: -8px; left: 8px;
  background: #D4D0C8;
  padding: 0 4px;
  font-size: 11px; font-weight: bold;
}

/* ── 행/열 레이아웃 ── */
.win-row {
  display: flex; align-items: center; gap: 6px;
}
.win-btn-row {
  display: flex; gap: 6px;
}

/* ── 레이블 ── */
.win-label {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px; color: #000;
  white-space: nowrap;
}

/* ── 입력창 ── */
.win-input {
  background: #fff !important;
  border: 2px solid !important;
  border-color: #808080 #FFFFFF #FFFFFF #808080 !important;
  color: #000 !important;
  font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif !important;
  font-size: 11px !important;
  padding: 2px 4px !important;
  outline: none;
  flex: 1;
  box-shadow: none !important;
}
.win-input:focus {
  outline: 1px dotted #000;
  outline-offset: -4px;
}
.win-input::placeholder { color: #808080 !important; }

/* ── 버튼 ── */
.win-btn {
  font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif !important;
  font-size: 11px !important;
  color: #000 !important;
  background: #D4D0C8 !important;
  border: 2px solid !important;
  border-color: #FFFFFF #808080 #808080 #FFFFFF !important;
  outline: 1px solid #000 !important;
  padding: 3px 12px !important;
  cursor: default !important;
  min-width: 75px;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0 !important;
  text-transform: none !important;
  line-height: normal !important;
}
.win-btn:hover { background: #E0DDD6 !important; }
.win-btn:active {
  border-color: #808080 #FFFFFF #FFFFFF #808080 !important;
  padding: 4px 11px 2px 13px !important;
}
.win-btn:focus {
  outline: 2px solid #000 !important;
  outline-offset: -4px !important;
}
.win-btn-default {
  border-color: #000000 #808080 #808080 #000000 !important;
  outline: 2px solid #000 !important;
}

/* ── 맵 선택 버튼 ── */
.btn-map.active {
  border-color: #808080 #FFFFFF #FFFFFF #808080 !important;
  outline: 1px dotted #000 !important;
  outline-offset: -4px !important;
  background: #C8C4BC !important;
}

/* ── 경고/메시지 ── */
.win-alert {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px; color: #800000;
  min-height: 14px;
}

/* ── 구분선 ── */
.win-separator {
  height: 0;
  border-top: 1px solid #808080;
  border-bottom: 1px solid #FFFFFF;
  margin: 2px 0;
}

/* ── 툴바 ── */
.win-toolbar {
  display: flex; align-items: center;
  padding: 4px 0; gap: 4px; flex-wrap: wrap;
}

/* ── 방 코드 표시 ── */
.win-code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px; font-weight: bold;
  letter-spacing: 2px; color: #000080;
}

/* ── ListView (플레이어 목록) ── */
.win-listview {
  background: #fff;
  border: 2px solid;
  border-color: #808080 #FFFFFF #FFFFFF #808080;
  min-height: 120px;
}
.win-lv-header {
  display: flex;
  background: #D4D0C8;
  user-select: none;
}
.win-lv-th {
  padding: 2px 6px;
  font-family: Tahoma, Arial, sans-serif; font-size: 11px; font-weight: bold;
  border-right: 1px solid #808080;
  border-bottom: 2px solid #808080;
  border-top: 1px solid #FFFFFF;
  border-left: 1px solid #FFFFFF;
  cursor: default; white-space: nowrap;
  display: flex; align-items: center;
}
.win-lv-th:last-child { border-right: none; }
.win-lv-body { background: #fff; }

/* lobby.js가 생성하는 행 */
.win-lv-row {
  display: flex; align-items: center;
  border-bottom: 1px solid #E8E8E8;
  min-height: 20px; cursor: default;
}
.win-lv-row:hover:not(.win-lv-empty) {
  background: #000080;
  color: #fff;
}
.win-lv-row.win-lv-me { font-weight: bold; }
.win-lv-row.win-lv-host-row { background: #F0F8FF; }
.win-lv-row.win-lv-host-row:hover { background: #000080; color: #fff; }
.win-lv-row.win-lv-empty { color: #808080; }
.win-lv-td {
  padding: 2px 6px;
  font-family: Tahoma, Arial, sans-serif; font-size: 11px;
  white-space: nowrap; overflow: hidden;
}

/* ── 하단 영역 ── */
.win-footer-row {
  display: flex; align-items: center;
  gap: 8px; justify-content: flex-end;
}
.win-waiting {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px; color: #444; font-style: italic;
}

/* ── 상태 표시줄 ── */
.win-statusbar {
  display: flex;
  border-top: 2px solid #808080;
  background: #D4D0C8;
  padding: 2px 4px; gap: 4px;
  flex-shrink: 0;
}
.win-sb-cell {
  border: 1px solid;
  border-color: #808080 #FFFFFF #FFFFFF #808080;
  padding: 1px 6px;
  font-family: Tahoma, Arial, sans-serif; font-size: 11px;
  min-height: 18px; display: flex; align-items: center;
}
.win-sb-flex  { flex: 1; }
.win-sb-fixed { width: 130px; }

/* ── 작업 표시줄 ── */
.win-taskbar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 30px;
  background: linear-gradient(to bottom, #245EDC 0%, #1640B8 50%, #1A48C4 100%);
  border-top: 1px solid #5B8EDC;
  display: flex; align-items: center;
  padding: 2px 3px; gap: 3px;
  z-index: 100;
}

/* Start 버튼 */
.win-start-btn {
  display: flex; align-items: center; gap: 5px;
  background: linear-gradient(to bottom,
    #5BAD4A 0%, #3E9131 45%, #3E9131 55%, #5BAD4A 100%);
  border: 1px solid;
  border-color: #9AD870 #1E6614 #1E6614 #9AD870;
  border-radius: 0 14px 14px 0;
  padding: 2px 12px 2px 8px;
  height: 24px;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 13px; font-weight: bold; color: #fff;
  cursor: default;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
  letter-spacing: 0.5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
  flex-shrink: 0;
}
.win-start-btn:active {
  background: linear-gradient(to bottom,
    #3E9131 0%, #5BAD4A 50%, #5BAD4A 100%);
}

/* Windows 플래그 로고 (4색 격자) */
.win-start-flag {
  width: 14px; height: 14px;
  display: inline-block; flex-shrink: 0;
  background: #f00;
  box-shadow:
    7px 0   0 0 #0a0,
    0   7px 0 0 #00c,
    7px 7px 0 0 #fa0;
  margin-right: 1px;
}

/* 작업 표시줄 항목 */
.win-taskbar-strip {
  flex: 1; display: flex; gap: 3px;
}
.win-tb-item {
  background: linear-gradient(to bottom, #1848B8, #2050C8);
  border: 1px solid;
  border-color: #6A9AE0 #0A2460 #0A2460 #6A9AE0;
  padding: 0 10px;
  height: 22px; display: flex; align-items: center;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px; font-weight: bold; color: #fff;
  cursor: default; max-width: 200px;
  overflow: hidden; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.win-tb-active {
  background: linear-gradient(to bottom, #102898, #1838A8);
  border-color: #0A2460 #6A9AE0 #6A9AE0 #0A2460;
  box-shadow: inset 1px 1px 0 rgba(0,0,0,0.4);
}

/* 시스템 트레이 */
.win-systray {
  display: flex; align-items: center; gap: 5px;
  background: rgba(0,24,100,0.4);
  border: 1px solid;
  border-color: #0A2460 #6A9AE0 #6A9AE0 #0A2460;
  padding: 1px 8px;
  height: 22px;
}
.win-tray-net {
  display: inline-block; width: 16px; height: 12px;
  background: linear-gradient(135deg, #4af 0% 50%, #06c 50%);
  border: 1px solid #024;
}
.win-tray-vol {
  display: inline-block; width: 14px; height: 12px;
  background: #D4D0C8;
  border: 1px solid #888;
  clip-path: polygon(0 30%, 45% 30%, 100% 0, 100% 100%, 45% 70%, 0 70%);
}
.win-clock {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px; color: #fff; white-space: nowrap;
  cursor: default; min-width: 36px; text-align: center;
}

/* ── 맵 선택 버튼 (로비) ── */
.lby-map-open-btn {
  font-family: var(--font);
  font-size: 11px; font-weight: 700;
  padding: 4px 14px;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  color: #000; cursor: pointer;
  letter-spacing: 0;
}
.lby-map-open-btn:active {
  border-top: 2px solid #808080; border-left: 2px solid #808080;
  border-bottom: 2px solid #fff; border-right: 2px solid #fff;
}
.lby-map-open-btn:disabled {
  color: #808080; cursor: default;
}
.lby-map-current-wrap {
  margin-top: 6px;
  font-size: 11px; color: #000;
}
.lby-map-current-label {
  color: #666; margin-right: 4px;
}
.lby-map-current-name {
  font-weight: 700;
}

/* ── 맵 선택 팝업 ── */
.map-sel-panel {
  width: min(740px, 94vw);
  max-height: 90vh;
  display: flex; flex-direction: column;
}
.map-sel-body {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  background: #d4d0c8;
  border-top: 2px solid #808080;
  border-bottom: 2px solid #808080;
}
.map-sel-body::-webkit-scrollbar { width: 16px; }
.map-sel-body::-webkit-scrollbar-track {
  background: #d4d0c8;
  border-left: 1px solid #808080;
}
.map-sel-body::-webkit-scrollbar-thumb {
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
}
.map-sel-body::-webkit-scrollbar-button {
  display: block; height: 16px; width: 16px;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
}

.map-sel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* 맵 카드 */
.map-card {
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  cursor: pointer;
  padding: 6px;
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font);
  position: relative;
  outline: 2px solid transparent;
  transition: outline-color 0s;
}
.map-card:hover:not(.map-card-disabled) {
  background: #c8c4bc;
}
.map-card.active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  outline: 1px dotted #000;
  outline-offset: -4px;
  background: #c0bcb4;
}
.map-card-disabled {
  cursor: default;
  opacity: 0.55;
}

/* 카드 이미지 영역 */
.map-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: #808080;
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.map-card-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.map-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #ccc; letter-spacing: 1px;
  background: repeating-linear-gradient(
    45deg, #666, #666 2px, #777 2px, #777 10px
  );
}
.map-card-coming-soon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5);
  font-size: 10px; font-weight: 700; color: #ccc;
  letter-spacing: 2px;
}

/* 카드 정보 */
.map-card-info {
  padding: 2px 2px 0;
}
.map-card-name {
  font-size: 12px; font-weight: 700; color: #000;
  margin-bottom: 2px;
}
.map-card-mode {
  font-size: 10px; color: #444; letter-spacing: 0;
}
.map-card-mode-label {
  color: #666;
}

/* ── 공개방 목록 ────────────────────────────────── */

/* 외부 인셋 패널 (Win98 ListBox 스타일) */
#public-rooms-panel {
  margin: 8px 12px;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  box-shadow: inset 1px 1px 0 #404040, inset -1px -1px 0 #dfdfdf;
  background: #fff;
}

/* 컬럼 헤더 바 */
.pr-col-header {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #d4d0c8;
  border-bottom: 1px solid #808080;
  font-family: var(--font);
  font-size: 11px;
  user-select: none;
}
.pr-col-icon-pad {
  width: 26px;
  flex-shrink: 0;
  border-right: 1px solid #808080;
}
.pr-col-h {
  padding: 3px 5px;
  font-weight: 700;
  color: #000;
  border-right: 1px solid #808080;
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 0;
}

/* 스크롤 영역 */
#public-rooms-body {
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
  background: #fff;
}
#public-rooms-body::-webkit-scrollbar {
  width: 16px;
}
#public-rooms-body::-webkit-scrollbar-track {
  background: #d4d0c8;
  border-left: 1px solid #808080;
}
#public-rooms-body::-webkit-scrollbar-thumb {
  background: #c0bcb4;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  min-height: 20px;
}
#public-rooms-body::-webkit-scrollbar-thumb:hover { background: #b8b4ac; }
#public-rooms-body::-webkit-scrollbar-button {
  display: block;
  height: 16px;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
}
#public-rooms-body::-webkit-scrollbar-button:hover { background: #c8c4bc; }

/* 방 행 */
.public-room-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 6px;
  font-family: var(--font);
  font-size: 12px;
  cursor: default;
  border-bottom: 1px solid #ececec;
}
.public-room-row:last-child { border-bottom: none; }
.public-room-row:hover {
  background: #000080;
  color: #fff;
}
.public-room-row:hover .pr-host,
.public-room-row:hover .pr-map,
.public-room-row:hover .pr-mode,
.public-room-row:hover .pr-players { color: #fff; }

/* 행 아이콘 */
.pr-icon {
  width: 18px;
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1;
}

.pr-title   { flex: 1.4; font-weight: 700; min-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-host    { flex: 0.8; min-width: 60px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-map     { width: 130px; color: #444; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-mode    { width: 110px; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-status-wrap { width: 72px; flex-shrink: 0; display: flex; align-items: center; }
.pr-players { width: 40px; text-align: center; color: #333; flex-shrink: 0; }
.pr-lock    { width: 20px; text-align: center; font-size: 13px; flex-shrink: 0; }
.pr-join-btn {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #808080;
  border-right: 2px solid #808080;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.pr-join-btn:active {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
}

/* 공개방 필터 바 */
.pr-filter-bar {
  padding: 8px 12px 6px;
  background: #e0dcd4;
  border-bottom: 1px solid #b0aca4;
}
.pr-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.pr-filter-label {
  font-size: 10px;
  font-weight: 700;
  color: #555;
  letter-spacing: 1px;
  margin-right: 4px;
  white-space: nowrap;
}
.pr-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.pr-filter-btn {
  font-family: 'MS Sans Serif', 'Tahoma', Arial, sans-serif;
  font-size: 10px;
  padding: 2px 7px;
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  color: #000;
  cursor: pointer;
  white-space: nowrap;
}
.pr-filter-btn:hover { background: #dcd8d0; }
.pr-filter-btn.active {
  background: #c0bcb4;
  border-color: #808080 #ffffff #ffffff #808080;
  font-weight: 700;
}
.pr-filter-check {
  font-family: 'MS Sans Serif', 'Tahoma', Arial, sans-serif;
  font-size: 10px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.pr-filter-check input { cursor: pointer; }

/* 공개방 상태 배지 */
.pr-status {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.pr-status-waiting  { background: #4a8f4a; color: #fff; }
.pr-status-started  { background: #8f4a1a; color: #fff; }

/* ── 공개방 등록 팝업 ── */
.pub-reg-body {
  padding: 14px 18px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pub-reg-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pub-reg-label {
  width: 64px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.pub-reg-input {
  flex: 1;
  font-family: var(--font);
  font-size: 12px;
  padding: 3px 5px;
  border: 2px inset #808080;
  background: #fff;
  color: #000;
  outline: none;
}
.pub-reg-hint {
  font-family: var(--font);
  font-size: 11px;
  color: #777;
  margin: 0;
  padding-top: 2px;
}

/* 공개방 등록 활성 상태 */
.lby-public-active {
  background: #c0bcb4 !important;
  border-top: 2px solid #808080 !important;
  border-left: 2px solid #808080 !important;
  border-bottom: 2px solid #fff !important;
  border-right: 2px solid #fff !important;
}

/* ─────────────────────────────────────
   시작화면 플레이어 프리뷰 패널 (우측 하단)
───────────────────────────────────── */
.start-preview-panel {
  position: absolute;
  right: clamp(24px, 4vw, 64px);
  bottom: clamp(20px, 3vh, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.72);
  padding: 14px 14px 10px;
  border: 1px solid rgba(255,255,255,0.12);
}

.start-player-label {
  font-family: var(--font);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.45);
}

.start-player-canvas {
  width: clamp(120px, 12vw, 180px);
  height: clamp(170px, 17vw, 260px);
  display: block;
  border: 2px solid rgba(255,255,255,0.6);
  background: transparent;
}

.start-customize-btn {
  font-family: var(--font);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  color: #fff;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.5);
  padding: 7px 0;
  width: 100%;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: center;
}
.start-customize-btn:hover {
  background: rgba(224,48,48,0.22);
  border-color: #e03030;
  color: #e03030;
}

/* 커스터마이징 팝업 내부 (Win98 .win-popup 안) */
.start-cust-body {
  padding: 12px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.start-cust-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000;
}
.start-cust-row label { min-width: 44px; }

.start-cust-acc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 24px;
}
.start-cust-acc-btn {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000;
  background: #d4d0c8;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 2px 10px;
  cursor: pointer;
}
.start-cust-acc-btn:active {
  border-color: #808080 #ffffff #ffffff #808080;
}
.start-cust-acc-btn.active {
  background: #000080;
  color: #fff;
  border-color: #808080 #ffffff #ffffff #808080;
}

/* ─────────────────────────────────────
   시작화면 반응형 (작은 화면 대응)
───────────────────────────────────── */
@media (max-width: 640px) {
  .start-panel {
    width: 100%;
    min-width: 0;
    clip-path: none;
    padding: 0 clamp(20px, 6vw, 40px);
  }
  .start-preview-panel { display: none; }
}

@media (max-height: 560px) {
  .start-logo-img { max-height: 72px !important; }
  .start-version { margin-bottom: 12px !important; }
  .start-input { margin-bottom: 12px !important; }
  .start-nav { margin-bottom: 10px !important; gap: 0 !important; }
  .start-nav-item { font-size: clamp(16px, 1.8vh, 22px) !important; padding: 3px 0 !important; }
  .start-main-content { padding-top: 8px !important; }
}

/* ─────────────────────────────────────
   로딩 화면
───────────────────────────────────── */
#screen-loading {
  background: #008080;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.loading-content {
  display: flex;
  flex-direction: column;
  width: min(480px, 88vw);
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #404040;
  border-right: 2px solid #404040;
  outline: 1px solid #808080;
  box-shadow: 2px 2px 0 #000;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000;
}

.loading-titlebar {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  background: linear-gradient(to right, #000080, #1084d0);
}

.loading-titlebar-text {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  padding: 2px 4px;
  letter-spacing: 0;
}

.loading-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
}

.loading-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
}

.loading-logo-img {
  display: block;
  max-height: 100px;
  max-width: 360px;
  object-fit: contain;
}

.loading-logo-text {
  display: none;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  color: #fff;
}

.loading-bar-wrap {
  width: 100%;
  height: 16px;
  background: #d4d0c8;
  position: relative;
  border: 2px solid;
  border-color: #808080 #dfdfdf #dfdfdf #808080;
  padding: 2px;
  box-sizing: border-box;
  display: flex;
  gap: 0;
  align-items: center;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: #000080;
  transition: width 0.15s linear;
}

.loading-info-row {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  font-size: 11px;
}

.loading-pct {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #000;
  letter-spacing: 1px;
  flex-shrink: 0;
  min-width: 38px;
}

.loading-file {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000;
  letter-spacing: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

/* ─────────────────────────────────────
   HOW TO PLAY 패널
───────────────────────────────────── */
.htp-panel {
  width: min(620px, 94vw);
}
.htp-layout {
  display: flex;
  min-height: 320px;
  max-height: 65vh;
}

/* 사이드바 */
.htp-sidebar {
  display: flex;
  flex-direction: column;
  width: 130px;
  min-width: 130px;
  border-right: 2px solid #bbb8b0;
  background: #c8c4bc;
  padding: 6px 0;
  gap: 1px;
}
.htp-nav-btn {
  font-family: var(--font, 'MS Sans Serif', Tahoma, Arial, sans-serif);
  font-size: 11px;
  font-weight: 400;
  text-align: left;
  padding: 7px 12px;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  color: #333;
  transition: background 0.1s;
}
.htp-nav-btn:hover {
  background: #d4d0c8;
}
.htp-nav-btn.active {
  font-weight: 700;
  background: #d4d0c8;
  border-left-color: #000080;
  color: #000;
}

/* 콘텐츠 영역 */
.htp-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px 14px;
}
.htp-pane { display: none; }
.htp-pane.active { display: block; }

/* 테이블 */
.htp-table {
  width: 100%;
  border-collapse: collapse;
}
.htp-category-row td {
  padding: 12px 0 4px;
}
.htp-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-dim, #888);
  border-bottom: 1px solid #bbb8b0;
  text-transform: uppercase;
}
.htp-table tr:not(.htp-category-row) td {
  padding: 5px 4px;
  border-bottom: 1px solid #e8e5de;
  font-size: 12px;
}
.htp-key {
  width: 38%;
  font-weight: 700;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  color: #222;
  white-space: nowrap;
}
.htp-desc {
  color: #444;
}
.htp-empty {
  color: #aaa;
  font-style: italic;
  padding: 6px 4px !important;
}

/* ─────────────────────────────────────
   크레딧 패널 (Windows XP/95 스타일)
───────────────────────────────────── */
.credits-panel {
  background: #d4d0c8;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #404040;
  border-right: 2px solid #404040;
  outline: 1px solid #808080;
  box-shadow: 2px 2px 0 #000;
  width: min(640px, 94vw);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000;
  max-height: 70vh;
}

.credits-header {
  background: #d4d0c8;
  padding: 12px 12px;
  border-bottom: 2px solid;
  border-color: #808080 #fff #fff #808080;
  position: relative;
  overflow: hidden;
}

.credits-header::before {
  display: none;
}

.credits-header-inner {
  position: relative;
  z-index: 1;
}

.credits-title-big {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #000;
  margin-bottom: 4px;
  line-height: 1;
}

.credits-tagline {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000;
  letter-spacing: 0px;
  font-weight: 400;
  margin-bottom: 6px;
}

.credits-ver-badge {
  display: inline-block;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 10px;
  color: #000;
  letter-spacing: 1px;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #fff #808080 #808080 #fff;
  padding: 2px 8px;
}

.credits-body-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #d4d0c8;
  flex: 1;
  overflow-y: auto;
  border: 1px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  margin: 4px;
}

.credits-col {
  padding: 12px 12px;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
}

.credits-col + .credits-col {
  border-left: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
}

.credits-section {
  margin-bottom: 16px;
}

.credits-section:last-child {
  margin-bottom: 0;
}

.credits-section-label {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #000;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 1;
}

.credits-name {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #000;
  letter-spacing: 0px;
  margin-bottom: 2px;
}

.credits-role {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 10px;
  color: #000;
  letter-spacing: 0px;
}

.credits-tech-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.credits-tech-item {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  color: #000;
  display: flex;
  align-items: center;
  gap: 6px;
}

.credits-tech-item::before {
  content: '•';
  color: #000;
  opacity: 1;
  font-size: 12px;
  line-height: 1;
}

.credits-music-album {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #000;
  margin-bottom: 2px;
  letter-spacing: 0px;
}

.credits-music-artists {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 10px;
  color: #000;
  font-style: italic;
}

.credits-thanks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.credits-thanks-tag {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 10px;
  color: #000;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #fff #808080 #808080 #fff;
  padding: 2px 6px;
  letter-spacing: 0px;
}

.credits-footer-dark {
  background: #d4d0c8;
  padding: 4px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 2px solid;
  border-color: #808080 #fff #fff #808080;
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
}

.credits-copyright {
  font-family: 'MS Sans Serif', Tahoma, Arial, sans-serif;
  font-size: 10px;
  color: #000;
  letter-spacing: 0px;
  text-transform: uppercase;
}

@media (max-width: 500px) {
  .credits-body-grid {
    grid-template-columns: 1fr;
  }
  .credits-col + .credits-col {
    border-left: none;
    border-top: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
  }
}
