/* ============================================================
   PAGER - 레트로 삐삐 가로형 디바이스
   ============================================================ */

.pager-stage {
  min-height: 100vh;
  background: #0a0a0a;
  background-image:
    radial-gradient(circle at 50% 50%, #1a1a1a 0%, #050505 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  font-family: 'VT323', 'Share Tech Mono', 'Courier New', monospace;
  color: #00ff41;
  overflow: hidden;
  position: relative;
}

/* 회전 안내 (모바일 세로에서만) */
.pager-rotate-hint {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: #00ff41;
  gap: 16px;
}
.pager-rotate-hint.hidden {
  display: none !important;
}
@media (max-width: 700px) and (orientation: portrait) {
  .pager-rotate-hint:not(.hidden) {
    display: flex;
  }
}
.rotate-icon {
  font-size: 64px;
  animation: rotate-anim 2s ease-in-out infinite;
}
@keyframes rotate-anim {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(10deg); }
}
.rotate-text {
  font-size: 20px;
  text-align: center;
  padding: 0 24px;
}
.rotate-dismiss {
  background: transparent;
  border: 2px solid #00ff41;
  color: #00ff41;
  padding: 8px 24px;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  margin-top: 16px;
}

/* ============================================================
   디바이스 본체 (가로 560×320)
   ============================================================ */
.pager-device {
  width: 560px;
  max-width: calc(100vw - 24px);
  background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow:
    0 0 0 2px #0a0a0a,
    0 0 0 4px #3a3a3a,
    0 20px 50px rgba(0, 0, 0, 0.8),
    inset 0 2px 4px rgba(255, 255, 255, 0.05);
  position: relative;
}

/* 모바일 축소 */
@media (max-width: 600px) {
  .pager-device {
    width: 100%;
    padding: 10px 12px;
  }
}

/* 상단 */
.pager-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 11px;
  color: #888;
  letter-spacing: 1px;
}
.pager-brand {
  font-weight: bold;
  color: #aaa;
}
.pager-leds {
  display: flex;
  gap: 8px;
}
.led {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #333;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.5);
}
.led.active,
.led-msg.active {
  background: #ff0040;
  box-shadow: 0 0 6px #ff0040, inset 0 0 2px #fff;
  animation: blink 1s infinite;
}
.led-batt {
  background: #00ff41;
  box-shadow: 0 0 3px #00ff41;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

/* ============================================================
   메인 본체: LCD + 버튼 (Flexbox 가로 배치)
   ============================================================ */
.pager-body {
  display: flex;
  gap: 14px;
  align-items: stretch;
}

/* LCD 화면 */
.pager-lcd {
  flex: 1;
  background: #000;
  border-radius: 6px;
  padding: 6px;
  box-shadow:
    inset 0 0 0 2px #3a3a3a,
    inset 0 0 12px rgba(0, 255, 65, 0.1);
}
.lcd-screen {
  background: #0a1a0a;
  border-radius: 3px;
  min-height: 240px;
  height: 240px;
  max-height: 240px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.lcd-scanlines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 255, 65, 0.04) 2px,
    rgba(0, 255, 65, 0.04) 3px
  );
  pointer-events: none;
}

/* LCD 헤더 */
.lcd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(0, 255, 65, 0.3);
  margin-bottom: 6px;
  font-size: 14px;
  color: #00ff41;
  text-shadow: 0 0 3px #00ff41;
}
.lcd-title {
  font-weight: bold;
  letter-spacing: 1px;
}
.lcd-badge {
  font-size: 11px;
  color: #ff0040;
  font-weight: bold;
}

/* LCD 본문 */
.lcd-body {
  flex: 1;
  overflow-y: auto;
  font-size: 15px;
  line-height: 1.4;
  color: #00ff41;
  text-shadow: 0 0 2px #00ff41;
  position: relative;
  z-index: 1;
}
.lcd-body::-webkit-scrollbar {
  width: 4px;
}
.lcd-body::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 65, 0.3);
  border-radius: 2px;
}

.lcd-loading {
  text-align: center;
  padding: 40px 0;
  opacity: 0.6;
}

/* ============================================================
   오른쪽 버튼 패널
   ============================================================ */
.pager-controls {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  width: 110px;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .pager-controls {
    width: 92px;
  }
}

.ctrl-dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.dpad-row {
  display: flex;
  gap: 2px;
}
.btn-dpad {
  width: 32px;
  height: 32px;
  background: linear-gradient(180deg, #444 0%, #222 100%);
  border: 1px solid #555;
  border-radius: 4px;
  color: #bbb;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn-dpad:active,
.btn-dpad.pressed {
  background: linear-gradient(180deg, #222 0%, #333 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  color: #00ff41;
}
.btn-dpad.btn-ok {
  background: linear-gradient(180deg, #2a4a2a 0%, #1a3a1a 100%);
  color: #00ff41;
  font-size: 11px;
  font-weight: bold;
}

.ctrl-extra {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}
.btn-extra {
  background: linear-gradient(180deg, #444 0%, #222 100%);
  border: 1px solid #555;
  border-radius: 4px;
  color: #aaa;
  font-family: inherit;
  font-size: 11px;
  padding: 6px 8px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.5px;
}
.btn-extra:active,
.btn-extra.pressed {
  background: linear-gradient(180deg, #222 0%, #333 100%);
  color: #00ff41;
}

/* 디바이스 아래 안내 */
.pager-hint {
  text-align: center;
  color: #555;
  font-size: 11px;
  margin-top: 8px;
  letter-spacing: 1px;
}
.desktop-only {
  display: none;
}
@media (min-width: 768px) and (hover: hover) {
  .desktop-only {
    display: block;
  }
}

/* 게스트 안내 바 */
.guest-notice-bar {
  margin-top: 16px;
  background: rgba(255, 64, 0, 0.1);
  border: 1px solid rgba(255, 64, 0, 0.3);
  color: #ffcc99;
  padding: 8px 16px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  max-width: 560px;
  width: 100%;
}
.guest-join-btn {
  background: #00ff41;
  color: #0a0a0a;
  padding: 4px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 12px;
  margin-left: auto;
}

/* ============================================================
   LCD 내부 컴포넌트 (JS가 렌더링)
   ============================================================ */

/* 메뉴 리스트 */
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.menu-item {
  padding: 4px 8px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.menu-item.selected {
  background: rgba(0, 255, 65, 0.2);
  border-left: 2px solid #00ff41;
}
.menu-item.locked {
  opacity: 0.5;
}
.menu-item-num {
  opacity: 0.6;
  min-width: 16px;
}
.menu-item-icon {
  font-size: 12px;
}

/* 메시지 리스트 */
.msg-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.msg-item {
  padding: 5px 8px;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.msg-item.selected {
  background: rgba(0, 255, 65, 0.2);
  border-left-color: #00ff41;
}
.msg-item.unread {
  color: #fff;
  text-shadow: 0 0 4px #00ff41;
}
.msg-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: 0.8;
}
.msg-item-content {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 1px;
  margin-top: 2px;
}
.msg-item-ago {
  font-size: 10px;
  opacity: 0.5;
}

/* 메시지 상세 */
.msg-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.msg-detail-from {
  font-size: 12px;
  opacity: 0.8;
}
.msg-detail-content {
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 12px 0;
  text-align: center;
  word-break: break-all;
}
.msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.msg-action-btn {
  background: rgba(0, 255, 65, 0.15);
  border: 1px solid #00ff41;
  color: #00ff41;
  font-family: inherit;
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
}
.msg-action-btn.selected {
  background: #00ff41;
  color: #000;
}

/* 전송 폼 */
.send-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.send-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.send-field label {
  font-size: 11px;
  opacity: 0.7;
}
.send-field input {
  background: rgba(0, 255, 65, 0.1);
  border: 1px solid rgba(0, 255, 65, 0.4);
  color: #00ff41;
  font-family: inherit;
  font-size: 16px;
  padding: 4px 6px;
  outline: none;
}
.send-field input:focus {
  border-color: #00ff41;
  box-shadow: 0 0 4px #00ff41;
}
.send-submit {
  background: #00ff41;
  color: #000;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  padding: 6px;
  cursor: pointer;
  margin-top: 4px;
}
.send-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 내 번호 화면 */
.my-number-display {
  text-align: center;
  padding: 16px 0;
}
.my-number-label {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 8px;
}
.my-number-value {
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 3px;
  color: #00ff41;
  text-shadow: 0 0 8px #00ff41;
  margin-bottom: 8px;
}
.my-number-name {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 16px;
}
.my-number-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* 설정 */
.setup-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.setup-item {
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  border-left: 2px solid transparent;
}
.setup-item.selected {
  background: rgba(0, 255, 65, 0.2);
  border-left-color: #00ff41;
}
.setup-item-label {
  font-size: 13px;
}
.setup-item-value {
  font-size: 11px;
  opacity: 0.7;
}

/* 락 화면 */
.locked-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  gap: 12px;
  padding: 16px;
}
.locked-icon {
  font-size: 32px;
}
.locked-msg {
  font-size: 14px;
  white-space: pre-line;
  line-height: 1.5;
}
.locked-join {
  background: #00ff41;
  color: #000;
  text-decoration: none;
  padding: 4px 16px;
  font-weight: bold;
  font-size: 13px;
  border-radius: 3px;
  margin-top: 8px;
}

/* 토스트 */
.lcd-toast {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 255, 65, 0.9);
  color: #000;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 3px;
  z-index: 10;
  pointer-events: none;
  animation: toast-fade 2s ease-in-out;
}
@keyframes toast-fade {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  15%, 85% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}
.lcd-toast.error {
  background: rgba(255, 0, 64, 0.9);
  color: #fff;
}

/* 빈 상태 */
.empty-state {
  text-align: center;
  padding: 60px 0;
  opacity: 0.5;
  font-size: 13px;
}

/* 검색 결과 */
.search-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.search-result-item {
  padding: 4px 8px;
  cursor: pointer;
  font-size: 15px;
  letter-spacing: 1px;
  border-left: 2px solid transparent;
}
.search-result-item.selected {
  background: rgba(0, 255, 65, 0.2);
  border-left-color: #00ff41;
}

/* 도트 폰트 로드 */
@font-face {
  font-family: 'VT323';
  src: url('https://fonts.gstatic.com/s/vt323/v17/pxiKyp0ihIEF2isfFJXUdVNF.woff2') format('woff2');
  font-display: swap;
}

/* ============================================================
   CONVERSATION VIEW (Phase 1-C 추가)
   ★ 기존 pager.css 파일 끝에 아래 내용을 추가하세요.
   ============================================================ */

.conv-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 4px;
}

.conv-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 0;
}

.conv-scroll::-webkit-scrollbar {
  width: 3px;
}
.conv-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 65, 0.3);
}

.conv-bubble {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  max-width: 85%;
  border-radius: 3px;
  font-size: 14px;
}

.conv-bubble.conv-in {
  align-self: flex-start;
  background: rgba(0, 255, 65, 0.1);
  border-left: 2px solid #00ff41;
}

.conv-bubble.conv-out {
  align-self: flex-end;
  background: rgba(0, 255, 65, 0.22);
  border-right: 2px solid #00ff41;
  flex-direction: row-reverse;
}

.conv-content {
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #00ff41;
  text-shadow: 0 0 2px #00ff41;
}

.conv-time {
  font-size: 9px;
  opacity: 0.5;
  white-space: nowrap;
}

.conv-input-row {
  display: flex;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px dashed rgba(0, 255, 65, 0.3);
}

.conv-input-row input {
  flex: 1;
  background: rgba(0, 255, 65, 0.1);
  border: 1px solid rgba(0, 255, 65, 0.4);
  color: #00ff41;
  font-family: inherit;
  font-size: 14px;
  padding: 4px 6px;
  outline: none;
  letter-spacing: 1px;
}

.conv-input-row input:focus {
  border-color: #00ff41;
  box-shadow: 0 0 3px #00ff41;
}

/* ============================================================
   PAGER - Phase 1-D 추가 스타일
   ★ 기존 pager.css 파일 맨 끝에 아래 내용을 붙여넣으세요.
   ============================================================ */

/* 설정 항목 값(ON/OFF, 벨소리) 강조 */
.setup-item-value {
  color: #39ff14;
  text-shadow: 0 0 2px #39ff14;
  letter-spacing: 0.5px;
}

.setup-item.selected .setup-item-value {
  color: #0a0a0a;
  text-shadow: none;
}

/* 메뉴에 7개 들어가도 안 터지게 (기존 대비 좁은 간격) */
.menu-list .menu-item {
  padding: 5px 10px;
  min-height: 22px;
}

/* 토스트 - 소리 설정 피드백용 넓게 */
.lcd-toast {
  letter-spacing: 0.5px;
}

/* ============================================================
   PAGER - 전화번호부 내부 "내 번호" 섹션
   ★ 기존 pager.css 파일 맨 끝에 아래 내용을 붙여넣으세요.
   ============================================================ */

/* 전화번호부 상단 내 번호 카드 */
.contacts-myno {
  padding: 6px 10px 8px;
  background: rgba(0, 255, 65, 0.08);
  border: 1px solid rgba(0, 255, 65, 0.3);
  border-radius: 3px;
  margin-bottom: 2px;
}

.contacts-myno-label {
  font-size: 11px;
  opacity: 0.7;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.contacts-myno-value {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 2px;
  color: #39ff14;
  text-shadow: 0 0 2px #39ff14;
}

.contacts-myno-name {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 2px;
}

.contacts-myno-actions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.contacts-myno-actions .msg-action-btn {
  flex: 1;
  padding: 3px 6px;
  font-size: 11px;
}

/* 내 번호와 연락처 리스트 사이 구분선 */
.contacts-divider {
  border-top: 1px dashed rgba(0, 255, 65, 0.3);
  margin: 6px 0 4px;
  position: relative;
}

.contacts-divider::before {
  content: '';
}

/* ============================================================
   PAGER - LCD 시계 (Phase 1-E)
   ★ 기존 pager.css 파일 맨 끝에 아래 내용을 붙여넣으세요.
   ============================================================ */

/* 상단 베젤 LCD 시계 */
.pager-clock {
  font-family: 'VT323', 'Share Tech Mono', 'Courier New', monospace;
  font-size: 14px;
  color: #39ff14;
  letter-spacing: 1.5px;
  text-shadow: 0 0 3px #39ff14;
  padding: 1px 8px;
  background: rgba(0, 255, 65, 0.06);
  border: 1px solid rgba(0, 255, 65, 0.2);
  border-radius: 2px;
  min-width: 50px;
  text-align: center;
}

/* pager-top의 가로 간격 재배치 (시계 가운데) */
.pager-top {
  gap: 8px;
}
.pager-brand {
  flex: 0 0 auto;
}
.pager-leds {
  flex: 0 0 auto;
  margin-left: auto;
}
.pager-clock {
  flex: 0 0 auto;
  margin: 0 auto;
}

/* 모바일 세로일 때도 시계 보이게 (폰트만 살짝 작게) */
@media (max-width: 480px) {
  .pager-clock {
    font-size: 12px;
    min-width: 40px;
    padding: 1px 5px;
  }
}

/* ============================================================
   PAGER - LCD 헤더 상태바 (Phase 1-E 수정)
   ★ 기존 pager.css 파일 맨 끝에 이 내용만 추가하세요.
   (이전에 추가한 pager_clock.css는 필요 없음)
   ============================================================ */

/* 기존 pager-top의 .pager-clock 흔적 제거 (혹시 남아있으면) */
.pager-clock {
  display: none !important;
}

/* LCD 헤더 — 좌(제목+배지) / 우(배터리+시계) 그룹 */
.lcd-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.lcd-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #39ff14;
  text-shadow: 0 0 2px #39ff14;
  font-family: 'VT323', 'Share Tech Mono', monospace;
  flex: 0 0 auto;
  letter-spacing: 0.5px;
}

/* 배터리 - 블록 문자 3개. letter-spacing으로 간격 좁게 */
.lcd-batt {
  font-size: 11px;
  letter-spacing: -1px;
  opacity: 0.9;
}

/* 시계 */
.lcd-clock {
  font-size: 13px;
  letter-spacing: 1px;
  min-width: 38px;
  text-align: right;
}

/* 좁은 화면에서도 잘 나오게 */
@media (max-width: 480px) {
  .lcd-status {
    gap: 6px;
    font-size: 11px;
  }
  .lcd-clock {
    font-size: 12px;
    min-width: 32px;
  }
}

/* ============================================================
   PAGER - 반응형 크기 조정 (Phase 1-F)
   ★ 기존 pager.css 파일 맨 끝에 이 내용만 추가하세요.
   변경:
   1. 폰 세로에서 "회전하세요" 힌트 제거 (사용자가 알아서 돌려봄)
   2. PC(데스크탑)에서 디바이스 크게 + 숫자 크게
   ============================================================ */

/* 1. 회전 힌트 완전 제거 - 사용자가 원할 때 알아서 회전 */
.pager-rotate-hint,
.pager-rotate-hint:not(.hidden) {
  display: none !important;
}

/* 2. 폰 세로 모드에서도 디바이스 자연스럽게 보이게 (축소) */
@media (max-width: 600px) and (orientation: portrait) {
  .pager-device {
    width: 100%;
    padding: 8px 10px;
  }
  .lcd-screen {
    min-height: 220px;
    height: 220px;
    max-height: 220px;
  }
  .pager-body {
    gap: 8px;
  }
  /* 버튼 약간 작게 */
  .btn-dpad {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  .btn-extra {
    font-size: 10px;
    padding: 4px 8px;
  }
}

/* 3. 데스크탑: 디바이스 크게 + 폰트 키우기 (900px 이상) */
@media (min-width: 900px) {
  .pager-device {
    width: 720px;
    padding: 18px 20px;
  }
  .lcd-screen {
    min-height: 320px;
    height: 320px;
    max-height: 320px;
    padding: 10px 14px;
  }
  .lcd-header {
    font-size: 16px;
    padding-bottom: 8px;
    margin-bottom: 8px;
  }
  .lcd-badge {
    font-size: 13px;
  }
  .lcd-status {
    font-size: 13px;
  }
  .lcd-clock {
    font-size: 15px;
    min-width: 44px;
  }
  .lcd-batt {
    font-size: 13px;
  }
  .lcd-body {
    font-size: 17px;
  }
  /* 메시지 내용 (핵심: 숫자 크게) */
  .msg-item-header {
    font-size: 14px;
  }
  .msg-item-content {
    font-size: 22px;
    letter-spacing: 2px;
    margin-top: 4px;
  }
  .msg-item-ago {
    font-size: 12px;
  }
  /* 대화창 말풍선 */
  .conv-content {
    font-size: 19px;
    letter-spacing: 2px;
  }
  .conv-time {
    font-size: 11px;
  }
  .conv-input-row input {
    font-size: 17px;
    padding: 6px 10px;
  }
  /* 내 번호 */
  .my-number-value {
    font-size: 32px;
    letter-spacing: 3px;
  }
  .my-number-name {
    font-size: 14px;
  }
  /* 전화번호부 상단 내 번호 카드 */
  .contacts-myno-value {
    font-size: 22px;
    letter-spacing: 2.5px;
  }
  .contacts-myno-label {
    font-size: 13px;
  }
  /* 메뉴 리스트 */
  .menu-list .menu-item {
    padding: 8px 12px;
    font-size: 16px;
    min-height: 28px;
  }
  /* 전송 폼 */
  .send-form input {
    font-size: 17px;
    padding: 6px 10px;
  }
  /* 버튼 키우기 */
  .btn-dpad {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  .btn-ok {
    font-size: 14px;
  }
  .btn-extra {
    font-size: 13px;
    padding: 8px 14px;
  }
}

/* 4. 더 넓은 데스크탑: 추가 확대 (1200px 이상) */
@media (min-width: 1200px) {
  .pager-device {
    width: 800px;
  }
  .lcd-screen {
    min-height: 360px;
    height: 360px;
    max-height: 360px;
  }
  .msg-item-content {
    font-size: 24px;
  }
  .conv-content {
    font-size: 21px;
  }
}

/* ============================================================
   PAGER - 폰 세로 회전 레이아웃 (Phase 1-G)
   ★ 기존 pager.css 파일 맨 끝에 이 내용만 추가하세요.

   폰 세로에서 디바이스를 90도 돌려서 화면 가득 채움.
   유저가 폰을 돌려 보면 가로 디바이스가 크게 나옴.
   ============================================================ */

/* 폰 세로 전용: 디바이스 회전 */
@media (max-width: 700px) and (orientation: portrait) {
  /* stage: 여백 최소화 + overflow 잘라냄 */
  .pager-stage {
    padding: 0 !important;
    overflow: hidden;
    min-height: 100vh;
    max-height: 100vh;
    position: relative;
  }

  /* 디바이스 90도 회전, 폰 세로 높이를 가로로 쓰기 */
  .pager-device {
    transform: rotate(90deg);
    transform-origin: center center;
    /* 회전 전 기준 width = 회전 후 화면 세로 높이로 쓰임 */
    width: calc(100vh - 50px) !important;
    max-width: calc(100vh - 50px) !important;
    padding: 14px 16px !important;
  }

  /* 회전된 상태에서 LCD 화면 높이 조정 (가로로 길어지니까) */
  .lcd-screen {
    min-height: 260px !important;
    height: 260px !important;
    max-height: 260px !important;
  }

  /* 버튼 패널 원래 크기로 복원 (회전 반영 위해) */
  .btn-dpad {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .btn-extra {
    font-size: 11px;
    padding: 6px 10px;
  }

  /* 폰 세로에서 가입바는 숨김 (디바이스 안에 가입 메뉴 이미 있음) */
  .guest-notice-bar {
    display: none !important;
  }

  /* 폰 돌리세요 힌트 (작게, 회전 방향 안내) */
  .pager-stage::before {
    content: '↻ 폰을 돌려서 보세요';
    position: fixed;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    color: #39ff14;
    font-family: 'VT323', 'Share Tech Mono', monospace;
    font-size: 12px;
    z-index: 100;
    padding: 3px 10px;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 3px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 3px #39ff14;
    pointer-events: none;
  }
}

/* 폰 가로 (landscape): 회전 없이 정상 가로 레이아웃 */
@media (max-height: 500px) and (orientation: landscape) {
  .pager-stage::before {
    display: none;
  }
  .pager-device {
    transform: none;
  }
}

/* ============================================================
   PAGER - 폰 세로 가입바 복원 (Phase 1-G 패치)
   ★ 기존 pager.css 파일 맨 끝에 이 내용만 추가하세요.

   이전 Phase 1-G의 guest-notice-bar display:none 을 override.
   회전된 디바이스 옆에 가입바가 세로로 붙어 보이도록.
   ============================================================ */

@media (max-width: 700px) and (orientation: portrait) {
  /* stage: 절대 위치 기준점 + overflow 안 잘리게 */
  .pager-stage {
    position: relative;
    overflow: hidden;
  }

  /* 가입바 다시 보이게 + 화면 오른쪽에 세로로 */
  .guest-notice-bar {
    display: flex !important;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: center center;
    /* 회전된 상태에서 "세로로 긴 띠" 처럼 보이게 길이 지정 */
    width: calc(100vh - 200px) !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 6px 14px !important;
    font-size: 11px !important;
    white-space: nowrap;
    gap: 10px !important;
    z-index: 10;
  }

  /* 가입 버튼 약간 작게 (세로 띠 안에 들어가야 함) */
  .guest-join-btn {
    padding: 3px 10px !important;
    font-size: 11px !important;
  }

  /* 힌트는 유지 (폰 돌리라는 안내) */
  .pager-stage::before {
    /* 이미 Phase 1-G에서 정의됨. 그대로 유지 */
    top: 8px !important;
  }
}

/* ============================================================
   PAGER - 가입바 인라인 (Phase 1-H)
   ★ 기존 pager.css 파일 맨 끝에 이 내용만 추가하세요.

   가입바를 디바이스 내부 LCD 위에 작은 배너로 배치.
   디바이스 회전 시 자연스럽게 같이 회전됨.
   ============================================================ */

/* 이전 Phase 1-G에서 추가한 position absolute 가입바 로직 무효화 */
.guest-notice-bar {
  position: static !important;
  transform: none !important;
  right: auto !important;
  top: auto !important;
}

/* 디바이스 내부 인라인 배너 (LCD 위) */
.guest-notice-bar.guest-notice-inline {
  display: flex !important;
  margin: 0 0 6px 0 !important;
  padding: 4px 12px !important;
  font-size: 11px;
  max-width: none !important;
  width: 100% !important;
  background: rgba(255, 64, 0, 0.12);
  border: 1px solid rgba(255, 64, 0, 0.35);
  color: #ffcc99;
  border-radius: 4px;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
}

.guest-notice-bar.guest-notice-inline .guest-join-btn {
  padding: 2px 10px !important;
  font-size: 11px !important;
  margin-left: auto;
  flex-shrink: 0;
}

/* 폰 세로 모드에서 더 컴팩트하게 */
@media (max-width: 700px) and (orientation: portrait) {
  .guest-notice-bar.guest-notice-inline {
    font-size: 10px !important;
    padding: 3px 10px !important;
    margin-bottom: 4px !important;
    gap: 6px;
  }
  .guest-notice-bar.guest-notice-inline .guest-join-btn {
    padding: 1px 8px !important;
    font-size: 10px !important;
  }
}

/* 데스크탑에선 좀 더 넉넉하게 */
@media (min-width: 900px) {
  .guest-notice-bar.guest-notice-inline {
    font-size: 12px;
    padding: 5px 14px !important;
  }
  .guest-notice-bar.guest-notice-inline .guest-join-btn {
    font-size: 12px !important;
    padding: 3px 12px !important;
  }
}
