/* ========================================================
   한글 시계 & 타이머 (Hangul Word Timer) 프리미엄 스타일시트
   V1 (10×7), V2 (9×6), V3 (5×5 사진 원본), V4 (5×5 스마트 제로-리던던시)
   ======================================================== */

:root {
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  --font-serif: 'Nanum Myeongjo', serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* 베이스 다크 테마 */
  --bg-main: #0a0d14;
  --bg-card: rgba(18, 23, 34, 0.75);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-cell-off: rgba(25, 33, 49, 0.4);
  --text-cell-off: #334155;
  --text-muted: #64748b;
  --text-main: #e2e8f0;

  /* 기본 테마: 세종대왕 훈민정음 창제 황금빛 & 어진 붉은빛 */
  --glow-color: #d97706;
  --glow-light: #fbbf24;
  --glow-core: #fffbeb;
  --glow-ambient: rgba(245, 158, 11, 0.55);
  --glow-box: rgba(217, 119, 6, 0.28);
}

/* 테마 변형 팔레트 */
.theme-sejong {
  --glow-color: #d97706;
  --glow-light: #fbbf24;
  --glow-core: #fffbeb;
  --glow-ambient: rgba(245, 158, 11, 0.55);
  --glow-box: rgba(217, 119, 6, 0.28);
  --bg-card: rgba(18, 14, 13, 0.82);
  --bg-card-border: rgba(245, 158, 11, 0.24);
  --bg-cell-off: rgba(35, 24, 20, 0.45);
  --text-cell-off: #5a4237;
}

.theme-dancheong {
  --glow-color: #059669;
  --glow-light: #34d399;
  --glow-core: #ecfdf5;
  --glow-ambient: rgba(16, 185, 129, 0.52);
  --glow-box: rgba(5, 150, 105, 0.28);
  --bg-card: rgba(12, 23, 20, 0.84);
  --bg-card-border: rgba(52, 211, 153, 0.32);
  --bg-cell-off: rgba(16, 36, 31, 0.45);
  --text-cell-off: #2c594d;
}

.theme-dancheong .badge-anniversary {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.22), rgba(220, 38, 38, 0.18));
  border-color: rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
}

.theme-dancheong .hangul-cell.active {
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.5), 0 0 32px rgba(5, 150, 105, 0.25), inset 0 0 8px rgba(236, 253, 245, 0.35);
  border-color: rgba(52, 211, 153, 0.75);
}

.theme-dancheong .perimeter-dot.active {
  background: #34d399;
  box-shadow: 0 0 8px #10b981, 0 0 16px rgba(5, 150, 105, 0.6);
}

/* ========================================================
   [경복궁 단청 테마 전용] 전통 오방색 5단계 개별 점등 시스템
   1. 오전/오후: 석황 (따스한 황금빛 골드 네온)
   2. 시 숫자: 진홍/석간주 (화려하고 기품 있는 주홍빛 레드)
   3. '시': 호분 (맑고 정갈한 순백 화이트 네온)
   4. 분 숫자: 뇌록 (청명한 비취 에메랄드 틸 네온)
   5. '분': 삼청/군청 (맑은 코발트 스카이 블루 네온)
   ======================================================== */

/* 1. 오전/오후: 석황 (황금빛 골드 네온) */
.theme-dancheong .grid-cell.lit.role-ampm {
  color: #fffbeb;
  background: rgba(245, 158, 11, 0.28);
  border-color: rgba(251, 191, 36, 0.85);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.55), inset 0 0 10px rgba(245, 158, 11, 0.25);
  text-shadow: 0 0 8px #ffffff, 0 0 16px #fbbf24, 0 0 28px #d97706;
}

/* 2. 시 숫자: 진홍/석간주 (주홍빛 레드 네온) */
.theme-dancheong .grid-cell.lit.role-hour-num {
  color: #fff1f2;
  background: rgba(220, 38, 38, 0.32);
  border-color: rgba(248, 113, 113, 0.85);
  box-shadow: 0 0 22px rgba(239, 68, 68, 0.6), inset 0 0 10px rgba(220, 38, 38, 0.3);
  text-shadow: 0 0 8px #ffffff, 0 0 18px #f87171, 0 0 32px #dc2626;
}

/* 3. '시' 단위: 호분 (순백 화이트 네온) */
.theme-dancheong .grid-cell.lit.role-hour-unit {
  color: #ffffff;
  background: rgba(248, 250, 252, 0.26);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.65), inset 0 0 12px rgba(255, 255, 255, 0.3);
  text-shadow: 0 0 8px #ffffff, 0 0 16px #e2e8f0, 0 0 28px rgba(255, 255, 255, 0.85);
}

/* 4. 분 숫자: 뇌록 (비취 에메랄드 틸 네온) */
.theme-dancheong .grid-cell.lit.role-min-num {
  color: #ecfdf5;
  background: rgba(5, 150, 105, 0.32);
  border-color: rgba(52, 211, 153, 0.85);
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.6), inset 0 0 10px rgba(5, 150, 105, 0.3);
  text-shadow: 0 0 8px #ffffff, 0 0 18px #34d399, 0 0 32px #059669;
}

/* 5. '분' 단위: 삼청/군청 (코발트 스카이 블루 네온) */
.theme-dancheong .grid-cell.lit.role-min-unit {
  color: #f0f9ff;
  background: rgba(2, 132, 199, 0.3);
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 0 22px rgba(14, 165, 233, 0.6), inset 0 0 10px rgba(2, 132, 199, 0.3);
  text-shadow: 0 0 8px #ffffff, 0 0 18px #38bdf8, 0 0 32px #0284c7;
}

/* 하단 실시간 한글 문장 단청 오방색 1:1 매칭 스타일 */
.theme-dancheong .phrase-ampm {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
  font-weight: 800;
}
.theme-dancheong .phrase-hour-num {
  color: #f87171;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.6);
  font-weight: 800;
}
.theme-dancheong .phrase-hour-unit {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  font-weight: 800;
}
.theme-dancheong .phrase-min-num {
  color: #34d399;
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  font-weight: 800;
}
.theme-dancheong .phrase-min-unit {
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(14, 165, 233, 0.6);
  font-weight: 800;
}

/* ========================================================
   [단청 테마 전용] 테두리 60초 블럭 오방색(五方色) 순환 배색
   obang-0: 청/뇌록 (비취 에메랄드 틸)
   obang-1: 적/진홍 (주홍 레드)
   obang-2: 황/석황 (황금 골드)
   obang-3: 백/호분 (순백 화이트)
   obang-4: 흑/삼청·군청 (코발트 스카이 블루)
   ======================================================== */

/* 미점등 상태: 단청 서까래 무늬처럼 은은한 반투명 오방색 배열 (5초 마커 블럭 제외) */
.theme-dancheong .sec-block:not(.marker-5s).obang-0 { background: rgba(52, 211, 153, 0.22); }
.theme-dancheong .sec-block:not(.marker-5s).obang-1 { background: rgba(248, 113, 113, 0.22); }
.theme-dancheong .sec-block:not(.marker-5s).obang-2 { background: rgba(251, 191, 36, 0.22); }
.theme-dancheong .sec-block:not(.marker-5s).obang-3 { background: rgba(255, 255, 255, 0.22); }
.theme-dancheong .sec-block:not(.marker-5s).obang-4 { background: rgba(56, 189, 248, 0.22); }

/* 5초 마커 (= 및 || 두 줄 오방색 독립 바) */
.theme-dancheong .sec-block.marker-5s.obang-0::before, .theme-dancheong .sec-block.marker-5s.obang-0::after { background: rgba(52, 211, 153, 0.5) !important; }
.theme-dancheong .sec-block.marker-5s.obang-1::before, .theme-dancheong .sec-block.marker-5s.obang-1::after { background: rgba(248, 113, 113, 0.5) !important; }
.theme-dancheong .sec-block.marker-5s.obang-2::before, .theme-dancheong .sec-block.marker-5s.obang-2::after { background: rgba(251, 191, 36, 0.5) !important; }
.theme-dancheong .sec-block.marker-5s.obang-3::before, .theme-dancheong .sec-block.marker-5s.obang-3::after { background: rgba(255, 255, 255, 0.5) !important; }
.theme-dancheong .sec-block.marker-5s.obang-4::before, .theme-dancheong .sec-block.marker-5s.obang-4::after { background: rgba(56, 189, 248, 0.5) !important; }

/* 15초 마커 (= 및 || 두 줄 메인 방위 발광) */
.theme-dancheong .sec-block.marker-15s.obang-0::before, .theme-dancheong .sec-block.marker-15s.obang-0::after { background: rgba(52, 211, 153, 0.85) !important; box-shadow: 0 0 4px rgba(16, 185, 129, 0.6) !important; }
.theme-dancheong .sec-block.marker-15s.obang-1::before, .theme-dancheong .sec-block.marker-15s.obang-1::after { background: rgba(248, 113, 113, 0.85) !important; box-shadow: 0 0 4px rgba(239, 68, 68, 0.6) !important; }
.theme-dancheong .sec-block.marker-15s.obang-2::before, .theme-dancheong .sec-block.marker-15s.obang-2::after { background: rgba(251, 191, 36, 0.85) !important; box-shadow: 0 0 4px rgba(245, 158, 11, 0.6) !important; }
.theme-dancheong .sec-block.marker-15s.obang-3::before, .theme-dancheong .sec-block.marker-15s.obang-3::after { background: rgba(255, 255, 255, 0.85) !important; box-shadow: 0 0 4px rgba(255, 255, 255, 0.6) !important; }
.theme-dancheong .sec-block.marker-15s.obang-4::before, .theme-dancheong .sec-block.marker-15s.obang-4::after { background: rgba(56, 189, 248, 0.85) !important; box-shadow: 0 0 4px rgba(14, 165, 233, 0.6) !important; }

/* 단청 테마 마커 누적 궤적(lit-trail) */
.theme-dancheong .sec-block.marker-5s.lit-trail.obang-0::before, .theme-dancheong .sec-block.marker-5s.lit-trail.obang-0::after { background: #34d399 !important; box-shadow: 0 0 8px rgba(5, 150, 105, 0.9) !important; opacity: 0.95 !important; }
.theme-dancheong .sec-block.marker-5s.lit-trail.obang-1::before, .theme-dancheong .sec-block.marker-5s.lit-trail.obang-1::after { background: #f87171 !important; box-shadow: 0 0 8px rgba(220, 38, 38, 0.9) !important; opacity: 0.95 !important; }
.theme-dancheong .sec-block.marker-5s.lit-trail.obang-2::before, .theme-dancheong .sec-block.marker-5s.lit-trail.obang-2::after { background: #fbbf24 !important; box-shadow: 0 0 8px rgba(217, 119, 6, 0.9) !important; opacity: 0.95 !important; }
.theme-dancheong .sec-block.marker-5s.lit-trail.obang-3::before, .theme-dancheong .sec-block.marker-5s.lit-trail.obang-3::after { background: #ffffff !important; box-shadow: 0 0 8px rgba(255, 255, 255, 0.9) !important; opacity: 0.95 !important; }
.theme-dancheong .sec-block.marker-5s.lit-trail.obang-4::before, .theme-dancheong .sec-block.marker-5s.lit-trail.obang-4::after { background: #38bdf8 !important; box-shadow: 0 0 8px rgba(2, 132, 199, 0.9) !important; opacity: 0.95 !important; }

/* 단청 테마 마커 현재 초(lit-current) - 번짐 억제 컴팩트 네온 발광 */
.theme-dancheong .sec-block.marker-5s.lit-current.obang-0::before, .theme-dancheong .sec-block.marker-5s.lit-current.obang-0::after {
  background: #ecfdf5 !important;
  box-shadow: 0 0 4px #ffffff, 0 0 8px #34d399, 0 0 14px #059669 !important;
}
.theme-dancheong .sec-block.marker-5s.lit-current.obang-1::before, .theme-dancheong .sec-block.marker-5s.lit-current.obang-1::after {
  background: #fff1f2 !important;
  box-shadow: 0 0 4px #ffffff, 0 0 8px #f87171, 0 0 14px #dc2626 !important;
}
.theme-dancheong .sec-block.marker-5s.lit-current.obang-2::before, .theme-dancheong .sec-block.marker-5s.lit-current.obang-2::after {
  background: #fffbeb !important;
  box-shadow: 0 0 4px #ffffff, 0 0 8px #fbbf24, 0 0 14px #d97706 !important;
}
.theme-dancheong .sec-block.marker-5s.lit-current.obang-3::before, .theme-dancheong .sec-block.marker-5s.lit-current.obang-3::after {
  background: #ffffff !important;
  box-shadow: 0 0 4px #ffffff, 0 0 8px #e2e8f0, 0 0 14px #cbd5e1 !important;
}
.theme-dancheong .sec-block.marker-5s.lit-current.obang-4::before, .theme-dancheong .sec-block.marker-5s.lit-current.obang-4::after {
  background: #f0f9ff !important;
  box-shadow: 0 0 4px #ffffff, 0 0 8px #38bdf8, 0 0 14px #0284c7 !important;
}

/* 누적 궤적(Trail) 점등: 선명한 오방색 네온 블럭 (5초 마커 컨테이너 제외) */
.theme-dancheong .sec-block.lit-trail:not(.marker-5s).obang-0 {
  background: #34d399 !important;
  box-shadow: 0 0 8px rgba(5, 150, 105, 0.8), 0 0 16px rgba(16, 185, 129, 0.5) !important;
  opacity: 0.95 !important;
}
.theme-dancheong .sec-block.lit-trail:not(.marker-5s).obang-1 {
  background: #f87171 !important;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.8), 0 0 16px rgba(239, 68, 68, 0.5) !important;
  opacity: 0.95 !important;
}
.theme-dancheong .sec-block.lit-trail:not(.marker-5s).obang-2 {
  background: #fbbf24 !important;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.8), 0 0 16px rgba(245, 158, 11, 0.5) !important;
  opacity: 0.95 !important;
}
.theme-dancheong .sec-block.lit-trail:not(.marker-5s).obang-3 {
  background: #ffffff !important;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.85), 0 0 16px rgba(226, 232, 240, 0.5) !important;
  opacity: 0.95 !important;
}
.theme-dancheong .sec-block.lit-trail:not(.marker-5s).obang-4 {
  background: #38bdf8 !important;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.8), 0 0 16px rgba(14, 165, 233, 0.5) !important;
  opacity: 0.95 !important;
}

/* 현재 초(Current) 점등: 오방색 폭발 코어 & 강력한 발광 (5초 마커 컨테이너 제외) */
.theme-dancheong .sec-block.lit-current:not(.marker-5s).obang-0 {
  background: #ecfdf5 !important;
  box-shadow: 0 0 10px #ffffff, 0 0 20px #34d399, 0 0 35px #059669 !important;
}
.theme-dancheong .sec-block.lit-current:not(.marker-5s).obang-1 {
  background: #fff1f2 !important;
  box-shadow: 0 0 10px #ffffff, 0 0 20px #f87171, 0 0 35px #dc2626 !important;
}
.theme-dancheong .sec-block.lit-current:not(.marker-5s).obang-2 {
  background: #fffbeb !important;
  box-shadow: 0 0 10px #ffffff, 0 0 20px #fbbf24, 0 0 35px #d97706 !important;
}
.theme-dancheong .sec-block.lit-current:not(.marker-5s).obang-3 {
  background: #ffffff !important;
  box-shadow: 0 0 10px #ffffff, 0 0 22px #e2e8f0, 0 0 35px #cbd5e1 !important;
}
.theme-dancheong .sec-block.lit-current:not(.marker-5s).obang-4 {
  background: #f0f9ff !important;
  box-shadow: 0 0 10px #ffffff, 0 0 20px #38bdf8, 0 0 35px #0284c7 !important;
}

.theme-porcelain {
  --glow-color: #1d4ed8;
  --glow-light: #60a5fa;
  --glow-core: #f8fafc;
  --glow-ambient: rgba(37, 99, 235, 0.5);
  --glow-box: rgba(29, 78, 216, 0.24);
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-border: rgba(96, 165, 250, 0.2);
  --bg-cell-off: rgba(22, 32, 54, 0.4);
  --text-cell-off: #334155;
}

.theme-blue {
  --glow-color: #0284c7;
  --glow-light: #38bdf8;
  --glow-core: #f0f9ff;
  --glow-ambient: rgba(56, 189, 248, 0.48);
  --glow-box: rgba(2, 132, 199, 0.22);
  --bg-card: rgba(10, 18, 30, 0.82);
  --bg-card-border: rgba(56, 189, 248, 0.22);
  --bg-cell-off: rgba(15, 26, 44, 0.45);
  --text-cell-off: #334e68;
}

.theme-amber {
  --glow-color: #f59e0b;
  --glow-light: #fbbf24;
  --glow-core: #fffbeb;
  --glow-ambient: rgba(245, 158, 11, 0.48);
  --glow-box: rgba(245, 158, 11, 0.22);
  --bg-card: rgba(24, 18, 12, 0.82);
  --bg-card-border: rgba(245, 158, 11, 0.25);
  --bg-cell-off: rgba(38, 28, 18, 0.45);
  --text-cell-off: #664d36;
}

.theme-emerald {
  --glow-color: #10b981;
  --glow-light: #34d399;
  --glow-core: #ecfdf5;
  --glow-ambient: rgba(16, 185, 129, 0.48);
  --glow-box: rgba(16, 185, 129, 0.22);
  --bg-card: rgba(10, 22, 19, 0.82);
  --bg-card-border: rgba(52, 211, 153, 0.22);
  --bg-cell-off: rgba(15, 30, 26, 0.45);
  --text-cell-off: #28544a;
}

.theme-cyan {
  --glow-color: #06b6d4;
  --glow-light: #38bdf8;
  --glow-core: #f0fdfa;
  --glow-ambient: rgba(6, 182, 212, 0.38);
  --glow-box: rgba(6, 182, 212, 0.16);
}

.theme-coral {
  --glow-color: #f43f5e;
  --glow-light: #fb7185;
  --glow-core: #fff1f2;
  --glow-ambient: rgba(244, 63, 94, 0.48);
  --glow-box: rgba(244, 63, 94, 0.22);
  --bg-card: rgba(26, 14, 18, 0.82);
  --bg-card-border: rgba(244, 63, 94, 0.24);
  --bg-cell-off: rgba(36, 18, 24, 0.45);
  --text-cell-off: #662b37;
}

.theme-white {
  --glow-color: #e2e8f0;
  --glow-light: #ffffff;
  --glow-core: #ffffff;
  --glow-ambient: rgba(248, 250, 252, 0.45);
  --glow-box: rgba(226, 232, 240, 0.2);
  --bg-card: rgba(14, 18, 24, 0.82);
  --bg-card-border: rgba(226, 232, 240, 0.22);
  --bg-cell-off: rgba(22, 28, 38, 0.45);
  --text-cell-off: #475569;
}

/* 기본 리셋 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  padding: 24px 16px;
}

/* 앰비언트 배경 조명 */
.app-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.22;
  transition: background 1s ease;
}

.glow-1 {
  width: 500px;
  height: 500px;
  top: -150px;
  left: -100px;
  background: var(--glow-color);
}

.glow-2 {
  width: 600px;
  height: 600px;
  bottom: -200px;
  right: -150px;
  background: var(--glow-light);
}

/* 박스 없는 자연스러운 통배경 앰비언트 (데스크탑 단일 전신 파노라마 통배경) */
.ambient-theme-full-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), background-image 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.ambient-theme-full-bg.active {
  opacity: 0.85;
}

/* 통배경 위에 은은한 궁궐 야경 비네팅을 더해 중앙 시계 가독성과 웅장함 극대화 */
.ambient-theme-full-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 50%, rgba(10, 13, 20, 0.25) 0%, rgba(10, 13, 20, 0.65) 100%),
              linear-gradient(to bottom, rgba(10, 13, 20, 0.4) 0%, transparent 20%, transparent 80%, rgba(10, 13, 20, 0.7) 100%);
  pointer-events: none;
}

/* 레거시 좌우 분할 아트 오브제는 통배경 일원화에 따라 비표시 */
.ambient-art-obj {
  display: none !important;
}

/* 전체 페이지 레이아웃 래퍼 */
.app-page-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 24px 16px 50px 16px;
  z-index: 5;
}

/* 메인 컨테이너 (그리드 배경 박스 크기에 맞춰 620px로 최적화) */
.main-container {
  position: relative;
  z-index: 10;
  width: 100%;
  min-width: 0;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 auto;
}

/* 헤더 영역 */
.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 4px 4px;
}

/* 모바일 전용 상단 우측 유물 배경 레이어 (데스크탑에선 비표시) */
.mobile-header-artifact-bg {
  display: none !important;
}

.header-top-badge-row {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.header-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 12px;
}

.header-centered-row {
  justify-content: center !important;
}

.header-centered-row .logo-area {
  align-items: center;
}

.logo-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.title-with-modes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* 타이틀 하단 작은 모드 전환 버튼들 */
.title-sub-modes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sub-mode-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #94a3b8;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.3;
}

.sub-mode-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: var(--glow-light);
  box-shadow: 0 0 10px var(--glow-box);
  transform: translateY(-1px);
}

.header-hamburger-end {
  margin-left: auto;
  flex-shrink: 0;
}

/* 햄버거 메뉴 버튼 */
.hamburger-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  font-size: 1.3rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--glow-light);
  box-shadow: 0 0 15px var(--glow-ambient);
  transform: translateY(-1px);
}

.hamburger-btn:active {
  transform: translateY(1px);
}

/* 버전 스위치 바 (V4 / V3 / V2 / V1 탭) */
.version-switch-bar {
  display: inline-flex;
  background: rgba(22, 29, 43, 0.95);
  border: 1px solid var(--bg-card-border);
  padding: 3px;
  border-radius: 10px;
  width: fit-content;
  gap: 3px;
  flex-wrap: wrap;
}

.version-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.version-tab-btn:hover {
  color: #ffffff;
}

.version-tab-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.v4-star {
  color: #38bdf8;
  font-size: 0.85rem;
}

.version-badge-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.logo-badge {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--glow-light);
  font-weight: 700;
  display: inline-block;
}

.badge-v4 {
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.badge-v5 {
  color: #38bdf8;
  font-weight: 800;
  text-shadow: 0 0 14px rgba(56, 189, 248, 0.6);
}

.highlight-v5 {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.6);
  color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.badge-v6 {
  color: #38bdf8;
  font-weight: 800;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.7);
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.highlight-v6 {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.65);
  color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

.badge-anniversary {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.28), rgba(245, 158, 11, 0.16));
  border: 1px solid rgba(245, 158, 11, 0.48);
  color: #fef08a;
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

/* ========================================================
   2컬럼 대시보드 레이아웃: 좌측 시계 ⇄ 우측 컨트롤/테마
   ======================================================== */
.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(460px, 1.15fr) minmax(360px, 0.85fr);
  gap: 26px;
  align-items: start;
  width: 100%;
}

.dashboard-col-clock {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.dashboard-col-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

/* 매트릭스 카드 */
.archive-dropdown {
  position: relative;
  display: inline-block;
}

.archive-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.archive-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--glow-light);
  color: #ffffff;
}

.archive-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: #111726;
  border: 1px solid var(--bg-card-border);
  border-radius: 10px;
  padding: 6px;
  min-width: 250px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.archive-menu.hidden {
  display: none;
}

.archive-item-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.archive-item-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.version-link-btn {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s;
}

.version-link-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.app-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 모드 탭 네비게이션 */
.mode-nav {
  display: flex;
  background: rgba(22, 29, 43, 0.85);
  border: 1px solid var(--bg-card-border);
  padding: 4px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.mode-btn:hover {
  color: #cbd5e1;
}

.mode-btn.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* 매트릭스 카드 (그리드 배경 박스 축소) */
.matrix-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 12px 12px 10px 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.matrix-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.matrix-status-tags {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
}

.mode-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}

.sub-tag {
  background: var(--glow-box);
  border: 1px solid var(--glow-ambient);
  color: var(--glow-light);
}

.highlight-v4 {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.theme-selector-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.theme-select {
  background: #111622;
  border: 1px solid var(--bg-card-border);
  color: #e2e8f0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.theme-select:focus {
  border-color: var(--glow-color);
}

/* ========================================================
   사진 속 액자(Frame) & 테두리 60초 블럭 링 (V5)
   ======================================================== */
.frame-wrapper, .clock-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 6px auto;
  background: #0d111a;
  border: 8px solid #161c2b;
  border-radius: 18px;
  box-shadow: 
    0 16px 40px rgba(0, 0, 0, 0.9),
    inset 0 0 16px rgba(0, 0, 0, 0.95);
  padding: 10px;
  transition: all 0.3s ease;
}

/* V5 테두리 초 블럭 링 전용 프레임 (그리드 크기에 밀착) */
.perimeter-frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 14px 12px; /* 60개 초 블럭 둘레 여백 밀착 */
  background: #090d16;
  border: 8px solid #161c2b;
  border-radius: 20px;
  box-shadow: 
    0 18px 50px rgba(0, 0, 0, 0.92),
    inset 0 0 16px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

.perimeter-seconds-ring {
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  pointer-events: none;
  z-index: 10;
}

/* 60개 개별 초 블럭 */
.sec-block {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

/* 상단/하단 가로 엣지 블럭 - 중심축 일치 정렬 (translate(-50%, -50%)) */
.sec-block.edge-top,
.sec-block.edge-bottom {
  width: 14px;
  height: 5px;
  transform: translate(-50%, -50%);
}

/* 좌측/우측 세로 엣지 블럭 - 중심축 일치 정렬 (translate(-50%, -50%)) */
.sec-block.edge-left,
.sec-block.edge-right {
  width: 5px;
  height: 14px;
  transform: translate(-50%, -50%);
}

/* 5초 간격 마커 (0, 5, 10, 15, 20 ...) - 상하단은 '=', 좌우측은 '||' 듀얼 독립 발광 바 */
.sec-block.marker-5s {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}
.sec-block.marker-5s::before,
.sec-block.marker-5s::after {
  content: '';
  position: absolute;
  border-radius: 2px;
  transition: background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

/* 상하단 = 마커: 가로 15px × 세로 7px (상하 2.5px 도톰한 바 + 중앙 2px 밀착 틈) */
.sec-block.edge-top.marker-5s,
.sec-block.edge-bottom.marker-5s {
  width: 15px !important;
  height: 7px !important;
}
.sec-block.edge-top.marker-5s::before,
.sec-block.edge-bottom.marker-5s::before {
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.4);
}
.sec-block.edge-top.marker-5s::after,
.sec-block.edge-bottom.marker-5s::after {
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.4);
}

/* 좌우측 || 마커: 가로 7px × 세로 15px (좌우 2.5px 도톰한 바 + 중앙 2px 밀착 틈) */
.sec-block.edge-left.marker-5s,
.sec-block.edge-right.marker-5s {
  width: 7px !important;
  height: 15px !important;
}
.sec-block.edge-left.marker-5s::before,
.sec-block.edge-right.marker-5s::before {
  top: 0;
  bottom: 0;
  left: 0;
  width: 2.5px;
  background: rgba(255, 255, 255, 0.4);
}
.sec-block.edge-left.marker-5s::after,
.sec-block.edge-right.marker-5s::after {
  top: 0;
  bottom: 0;
  right: 0;
  width: 2.5px;
  background: rgba(255, 255, 255, 0.4);
}

/* 15초 간격 메인 마커 (0, 15, 30, 45초 - 12시, 3시, 6시, 9시) 기본 명도 강화 */
.sec-block.marker-15s::before,
.sec-block.marker-15s::after {
  background: rgba(255, 255, 255, 0.75) !important;
}

/* 일반 테마 누적 궤적 (lit-trail) */
.sec-block.marker-5s.lit-trail::before,
.sec-block.marker-5s.lit-trail::after {
  background: var(--glow-light) !important;
  box-shadow: 0 0 5px var(--glow-color) !important;
  opacity: 0.85 !important;
}

/* 일반 테마 현재 초 (lit-current) - 두 줄 각각이 선명하고 번짐 없는 순백 LED 네온으로 발광 */
.sec-block.marker-5s.lit-current::before,
.sec-block.marker-5s.lit-current::after {
  background: #ffffff !important;
  box-shadow: 
    0 0 4px #ffffff,
    0 0 8px var(--glow-light),
    0 0 14px var(--glow-color) !important;
}

/* 현재 초 점등 (LED 글로우 폭발) - 중심축 기준 대칭 확대 */
.sec-block.lit-current {
  transform: translate(-50%, -50%) scale(1.35) !important;
  z-index: 20;
}
.sec-block.lit-current:not(.marker-5s) {
  background: var(--glow-core) !important;
  box-shadow: 
    0 0 8px var(--glow-core),
    0 0 16px var(--glow-light),
    0 0 28px var(--glow-color) !important;
}
.sec-block.edge-top.lit-current,
.sec-block.edge-bottom.lit-current,
.sec-block.edge-left.lit-current,
.sec-block.edge-right.lit-current {
  transform: translate(-50%, -50%) scale(1.35) !important;
}

/* 궤적(Trail) 누적 채우기 (분할된 5초 마커 블럭 제외: 분할된 두 줄만 독립 발광 유지) */
.sec-block.lit-trail:not(.marker-5s) {
  background: var(--glow-light) !important;
  opacity: 0.65;
  box-shadow: 0 0 6px var(--glow-color);
}

/* 59초 -> 0초 전환 시 스위핑 클리어 페이드아웃 효과 */
.sec-block.lit-sweep-fade:not(.marker-5s) {
  background: var(--glow-core) !important;
  box-shadow: 0 0 10px var(--glow-light) !important;
  opacity: 0.12;
  transition: opacity 0.18s ease-out, background 0.18s ease-out;
}
.sec-block.marker-5s.lit-sweep-fade::before,
.sec-block.marker-5s.lit-sweep-fade::after {
  background: var(--glow-core) !important;
  box-shadow: 0 0 6px var(--glow-light) !important;
  opacity: 0.12 !important;
  transition: opacity 0.18s ease-out, background 0.18s ease-out;
}

/* 5초 분할 마커(= 및 ||) 부모 컨테이너는 어떤 테마 및 점등 상태(미점등, 궤적 누적, 현재초 등)에서도
   절대 배경색이나 그림자로 채워지지 않고 투명도를 유지하여 두 줄 사이의 틈(Gap)이 영구 보존됨 */
.sec-block.marker-5s,
.sec-block.marker-5s.lit-trail,
.sec-block.marker-5s.lit-current,
.sec-block.marker-5s.lit-sweep-fade,
.theme-dancheong .sec-block.marker-5s,
.theme-dancheong .sec-block.marker-5s.lit-trail,
.theme-dancheong .sec-block.marker-5s.lit-current,
.theme-dancheong .sec-block.marker-5s.lit-sweep-fade {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  opacity: 1 !important;
}

/* 10x7, 9x6 버전일 때는 액자 테두리를 가볍게 완화 */
.frame-wrapper:not(.is-v3):not(.is-v4) {
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.04);
  max-width: 100%;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

/* V4 서라운드 오라 (테두리 네온 게이지) */
.surround-aura {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.is-v4 .surround-aura {
  opacity: 1;
  box-shadow: inset 0 0 15px var(--glow-ambient);
}

/* 4개 코너 닷 인디케이터 (+1, +2, +3, +4분) */
.corner-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1e2638;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.25s ease;
  display: none;
  z-index: 5;
}

.is-v3 .corner-dot, .is-v4 .corner-dot {
  display: block;
}

.dot-tl { top: 8px; left: 8px; }
.dot-tr { top: 8px; right: 8px; }
.dot-br { bottom: 8px; right: 8px; }
.dot-bl { bottom: 8px; left: 8px; }

.corner-dot.lit-dot {
  background: var(--glow-core);
  box-shadow: 0 0 10px var(--glow-light), 0 0 18px var(--glow-color);
}

/* ========================================================
   한글 그리드 매트릭스 레이아웃
   ======================================================== */
.hangul-grid {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: rgba(10, 14, 23, 0.75);
  border-radius: 14px;
  user-select: none;
}

/* [V6 실시간 시계 전용] 8열 × 4행 (32칸 - 빈칸 0개, 와이드 매트릭스) */
.grid-clock-8x4 {
  grid-template-columns: repeat(8, 1fr);
  gap: 11px;
  padding: 16px;
}

.grid-clock-8x4 .grid-cell {
  font-family: var(--font-serif);
  font-size: 1.68rem;
  font-weight: 700;
  border-radius: 10px;
  background: rgba(22, 28, 42, 0.35);
}

/* [V5 실시간 시계 아카이브] 6열 × 6행 (36칸 정사각 - 빈칸 0개) */
.grid-clock-6x6 {
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  padding: 14px;
  aspect-ratio: 1;
}

.grid-clock-6x6 .grid-cell {
  font-family: var(--font-serif);
  font-size: 1.95rem;
  font-weight: 700;
  border-radius: 10px;
  background: rgba(22, 28, 42, 0.35);
}

/* [V5 90분 전용 타이머] 5열 × 4행 (20칸 - 빈칸 0개) */
.grid-timer-5x4 {
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  padding: 16px;
}

.grid-timer-5x4 .grid-cell {
  font-family: var(--font-serif);
  font-size: 2.35rem;
  font-weight: 700;
  border-radius: 12px;
  background: rgba(22, 28, 42, 0.35);
}

/* [V5 스톱워치 전용] 8열 × 4행 (32칸 - 빈칸 0개!) */
.grid-stopwatch-8x4 {
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  padding: 14px;
}

.grid-stopwatch-8x4 .grid-cell {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 700;
  border-radius: 9px;
  background: rgba(22, 28, 42, 0.35);
}

/* [버전 4 & 버전 3] 5 × 5 그리드 (25칸) */
.grid-5x5 {
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  padding: 16px;
  aspect-ratio: 1;
}

.grid-5x5 .grid-cell {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 700;
  border-radius: 12px;
  background: rgba(22, 28, 42, 0.35);
}

/* [버전 2] 9 × 6 압축 그리드 (54칸) */
.grid-9x6 {
  grid-template-columns: repeat(9, 1fr);
  gap: 10px;
}

.grid-9x6 .grid-cell {
  font-size: 1.45rem;
  border-radius: 10px;
}

/* [버전 1] 10 × 7 기본 그리드 (70칸) */
.grid-10x7 {
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
}

.grid-10x7 .grid-cell {
  font-size: 1.3rem;
  border-radius: 8px;
}

/* 일반 그리드 셀 */
.grid-cell {
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-sans);
  color: var(--text-cell-off);
  background: var(--bg-cell-off);
  border: 1px solid rgba(255, 255, 255, 0.02);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

/* 빈 공란 셀 (억지 글자 배제 & 단아한 여백의 미) */
.grid-cell.empty-cell {
  opacity: 0;
  pointer-events: none;
  background: transparent;
  border-color: transparent;
}

/* 불이 들어온(점등된) 셀 */
.grid-cell.lit {
  color: var(--glow-core);
  background: var(--glow-box);
  border-color: var(--glow-ambient);
  font-weight: 800;
  transform: scale(1.05);
  box-shadow: 
    0 0 20px var(--glow-ambient),
    inset 0 0 12px var(--glow-ambient);
  text-shadow: 
    0 0 8px var(--glow-core),
    0 0 18px var(--glow-light),
    0 0 32px var(--glow-color);
  z-index: 2;
}

/* V4 스마트 다중 컬러 레이어링 */
.grid-cell.lit.lit-half {
  /* '반' 글자: 따뜻한 앰버 골드 글로우 */
  color: #fffbeb;
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.5);
  text-shadow: 0 0 8px #ffffff, 0 0 18px #fbbf24, 0 0 30px #f59e0b;
}

.grid-cell.lit.lit-sec {
  /* '초' 글자: 산뜻한 코랄/핑크 하이라이트 */
  color: #fff1f2;
  background: rgba(244, 63, 94, 0.22);
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 0 22px rgba(244, 63, 94, 0.5);
  text-shadow: 0 0 8px #ffffff, 0 0 18px #fb7185, 0 0 30px #f43f5e;
}

/* V4 순차 물결 점등 애니메이션 */
@keyframes flow-appear {
  0% { transform: scale(0.92); opacity: 0.6; }
  50% { transform: scale(1.1); filter: brightness(1.3); }
  100% { transform: scale(1.05); opacity: 1; }
}

.flow-anim {
  animation: flow-appear 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 펄스 애니메이션 (타이머 완료 시) */
@keyframes pulse-finish {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.08); filter: brightness(1.4); box-shadow: 0 0 35px var(--glow-light); }
  100% { transform: scale(1); filter: brightness(1); }
}

.pulse-active {
  animation: pulse-finish 1s infinite ease-in-out;
}

/* 매트릭스 하단 (한글 시간 문장 & 디지털 뷰) */
.matrix-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.frame-footer {
  margin-top: 4px;
}

.reading-phrase-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* 듣기 및 자동 버튼 복합 컴포넌트 */
.btn-listen-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 6px 3px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  line-height: 1.3;
  white-space: nowrap;
  user-select: none;
}

.btn-listen-time:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: var(--glow-light);
  box-shadow: 0 0 12px var(--glow-box);
}

.btn-listen-time .listen-content {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-listen-time .listen-icon {
  font-size: 0.85rem;
}

.btn-listen-time .listen-divider {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 2px;
}

/* 듣기 버튼 내부의 '자동' 버튼 */
.btn-listen-auto {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-listen-auto:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* 자동 버튼에 불이 들어온 상태 (Lit) */
.btn-listen-auto.lit,
.btn-listen-auto.active {
  background: var(--glow-box, rgba(245, 158, 11, 0.28)) !important;
  border-color: var(--glow-light, #fbbf24) !important;
  color: var(--glow-core, #fffbeb) !important;
  box-shadow: 0 0 10px var(--glow-box, rgba(245, 158, 11, 0.5)), inset 0 0 4px var(--glow-box, rgba(245, 158, 11, 0.4)) !important;
  text-shadow: 0 0 6px var(--glow-light, #fbbf24);
  font-weight: 800;
}

/* 매분 자동 듣기 실행 중 상태 (Auto-Running) */
.btn-listen-time.auto-running {
  border-color: var(--glow-light, #fbbf24);
  box-shadow: 0 0 16px var(--glow-box, rgba(245, 158, 11, 0.4));
  background: rgba(255, 255, 255, 0.16);
}

.btn-listen-time.auto-running .listen-icon {
  animation: pulse-listen-icon 1.2s infinite ease-in-out;
}

@keyframes pulse-listen-icon {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.22); filter: brightness(1.4); }
  100% { transform: scale(1); filter: brightness(1); }
}

.theme-dancheong .btn-listen-time {
  background: rgba(5, 150, 105, 0.18);
  border-color: rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
}

.theme-dancheong .btn-listen-time:hover {
  background: rgba(5, 150, 105, 0.32);
  border-color: #34d399;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
}

.theme-dancheong .btn-listen-auto.lit,
.theme-dancheong .btn-listen-auto.active {
  background: rgba(5, 150, 105, 0.35) !important;
  border-color: #34d399 !important;
  color: #ecfdf5 !important;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.5) !important;
  text-shadow: 0 0 6px #34d399;
}

.hangul-sentence {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin: 0;
}

/* 디지털 시계 12시간제 & 시 앞에 AM/PM 상하 배치 디스플레이 */
.digital-time-display {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(10, 14, 23, 0.65);
  padding: 5px 13px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.digital-ampm-stacked {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.06em;
  user-select: none;
  padding-right: 1px;
}

.digital-ampm-stacked .ampm-item {
  color: rgba(148, 163, 184, 0.22);
  transition: all 0.25s ease;
}

.digital-ampm-stacked .ampm-item.active {
  color: var(--glow-core, #fbbf24);
  text-shadow: 0 0 6px var(--glow-light, #f59e0b);
  font-weight: 800;
}

.theme-dancheong .digital-ampm-stacked .ampm-item.active {
  color: #a7f3d0;
  text-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}

.digital-time {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.08em;
  line-height: 1;
  background: transparent;
  padding: 0;
  border: none;
}

/* ========================================================
   우측 패널: 테마 큐레이션 카드 & 감성 스토리 설명 박스
   ======================================================== */
.theme-panel-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.theme-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.theme-header-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-header-icon {
  font-size: 1.15rem;
}

.theme-header-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #f8fafc;
}

.theme-select {
  background: #111622;
  border: 1px solid var(--bg-card-border);
  color: #e2e8f0;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  max-width: 100%;
}

.theme-select:focus {
  border-color: var(--glow-color);
  box-shadow: 0 0 10px var(--glow-box);
}

.theme-desc-box {
  background: rgba(10, 14, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 3px solid var(--glow-color);
  transition: all 0.3s ease;
}

.theme-desc-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--glow-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-desc-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.theme-desc-body {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.58;
}

/* ========================================================
   [공통 테마 선택 바] 시계, 타이머, 스톱워치 전 모드 상시 노출 & 독립 카드
   ======================================================== */
.theme-standalone-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-standalone-card .theme-inline-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 520px;
}

.theme-standalone-card .inline-theme-select {
  flex: 1;
  max-width: 360px;
}

/* ========================================================
   컨트롤 패널 & V4 개선안 설명 박스
   ======================================================== */
.controls-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  width: 100%;
}

/* 3행 컴팩트 컨트롤 레이아웃 (1행: 오전/오후 + 초침, 2행: 정각 알림, 3행: 분각 알림) */
.controls-compact-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.controls-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* 정각 알림 컨트롤 그룹 */
.chime-control-group {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* 분각 알림 컨트롤 그룹 & 스텝퍼 ([-1] [1분] [+1]) */
.minute-alert-row {
  width: 100%;
}

.minute-alert-control-group {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.minute-stepper-wrap {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 2px 4px;
  gap: 6px;
  transition: opacity 0.2s ease;
}

.minute-stepper-wrap.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.stepper-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.stepper-btn:hover {
  background: var(--glow-light);
  color: #0b1120;
  border-color: var(--glow-light);
  box-shadow: 0 0 8px var(--glow-ambient);
}

.stepper-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
  min-width: 36px;
  text-align: center;
  user-select: none;
}

.theme-inline-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* 스위치와 동일한 모양과 크기(44px × 24px, 캡슐형)의 '테마' 버튼 */
.theme-switch-btn {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: all 0.2s ease;
  user-select: none;
  flex-shrink: 0;
}

.theme-switch-btn:hover {
  background: var(--glow-color);
  border-color: var(--glow-light);
  color: #0b1120;
  box-shadow: 0 0 10px var(--glow-ambient);
  transform: translateY(-1px);
}

.inline-theme-select {
  background: #111622;
  border: 1px solid var(--bg-card-border);
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
  max-width: 250px;
}

/* 테마 콤보 뒤 해설 버튼 */
.btn-theme-desc {
  height: 29px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-theme-desc:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--glow-light);
  color: #ffffff;
  box-shadow: 0 0 10px var(--glow-ambient);
  transform: translateY(-1px);
}

.control-section {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.control-section.active {
  display: flex;
}

.v4-improvements-box {
  background: rgba(14, 21, 35, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v4-box-title {
  font-size: 0.85rem;
  color: #38bdf8;
  font-weight: 700;
}

.v4-improvements-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.v4-improvements-box li strong {
  color: #ffffff;
}

.preset-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preset-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.time-adjusters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* 90분 전용 타이머 조절기 (분 2fr : 초 1fr) */
.timer-90m-adjusters {
  grid-template-columns: 2fr 1fr;
}

.timer-90m-adjusters .adjuster-controls {
  gap: 6px;
  flex-wrap: wrap;
}

.adjuster-box {
  background: rgba(10, 14, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.adjuster-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.adjuster-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.adj-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.15s ease;
}

.adj-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.adj-btn:active {
  transform: scale(0.95);
}

.time-input {
  width: 56px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.time-input::-webkit-outer-spin-button,
.time-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.progress-container {
  width: 100%;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--glow-color), var(--glow-light));
  border-radius: 3px;
  transition: width 0.3s linear;
  box-shadow: 0 0 10px var(--glow-ambient);
}

.action-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-btn {
  flex: 1;
  min-width: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
}

.action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.primary-btn {
  background: linear-gradient(135deg, var(--glow-color), var(--glow-light));
  color: #031525;
  box-shadow: 0 4px 15px var(--glow-ambient);
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--glow-ambient);
  filter: brightness(1.08);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.tertiary-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.tertiary-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.clock-options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.toggle-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-option input {
  display: none;
}

.toggle-slider {
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  position: relative;
  transition: background 0.25s;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  top: 3px;
  left: 3px;
  transition: transform 0.25s;
}

.toggle-option input:checked + .toggle-slider {
  background: var(--glow-color);
}

.toggle-option input:checked + .toggle-slider::after {
  transform: translateX(20px);
}

.toggle-option input:disabled + .toggle-slider {
  background: rgba(255, 255, 255, 0.04) !important;
  opacity: 0.35;
  cursor: not-allowed;
}

.toggle-option input:disabled ~ .toggle-text {
  opacity: 0.45;
  cursor: not-allowed;
}

.toggle-text {
  font-size: 0.9rem;
  color: #cbd5e1;
}

.clock-options-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.options-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chime-options-group {
  background: rgba(10, 14, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chime-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.voice-picker-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-select {
  background: #111622;
  border: 1px solid var(--bg-card-border);
  color: #e2e8f0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
}

.btn-voice-test {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-voice-test:hover {
  background: var(--glow-box);
  border-color: var(--glow-light);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-voice-test:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-voice-guide {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fef08a;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-voice-guide:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--glow-light);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.btn-voice-guide.pulse-guide {
  animation: guide-pulse 2s infinite ease-in-out;
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, 0.28) !important;
}

@keyframes guide-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(245, 158, 11, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.8); transform: scale(1.04); }
}

.voice-status-badge {
  font-size: 0.73rem;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(10, 14, 23, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  display: block;
  line-height: 1.5;
  word-break: keep-all;
}

.voice-status-badge.voice-missing {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(40, 15, 15, 0.75);
  color: #fca5a5;
}

.voice-status-badge.voice-detected {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(10, 25, 20, 0.75);
}

.voice-status-badge strong {
  color: var(--glow-light);
}

.chime-sub-text {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.5;
}

.chime-sub-text strong {
  color: var(--glow-light);
}

.clock-info-box {
  background: rgba(10, 14, 23, 0.4);
  border-left: 3px solid var(--glow-color);
  padding: 10px 14px;
  border-radius: 8px;
}

.clock-info-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.lap-records-container {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lap-records-container.hidden {
  display: none;
}

.lap-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.lap-list {
  list-style: none;
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lap-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 14, 23, 0.4);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.lap-number {
  color: var(--text-muted);
}

.lap-time {
  color: var(--glow-light);
  font-weight: 600;
}

.app-info-footer {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bullet {
  color: var(--glow-color);
  font-size: 0.6rem;
}

/* ========================================================
   [하단 우측 플로팅 메뉴 (Speed Dial FAB)]
   - 햄버거 메인 버튼 클릭 시 도움말 & 사운드 아이콘 수직 전개
   ======================================================== */
.floating-menu-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* 메인 햄버거 플로팅 버튼 */
.floating-main-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(18, 23, 34, 0.92);
  border: 1px solid var(--bg-card-border);
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-main-btn:hover {
  transform: scale(1.08);
  border-color: var(--glow-color);
  box-shadow: 0 0 16px var(--glow-ambient);
}

.floating-main-icon {
  display: inline-block;
  transition: transform 0.25s ease;
  line-height: 1;
}

.floating-menu-container.open .floating-main-btn {
  background: var(--glow-color);
  color: #0f172a;
  box-shadow: 0 0 20px var(--glow-ambient);
}

/* 펼쳐지는 서브 액션 버튼 목록 */
.floating-sub-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-menu-container.open .floating-sub-actions {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.floating-action-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(22, 29, 43, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
  position: relative;
}

.floating-action-btn:hover {
  transform: scale(1.1);
  border-color: var(--glow-light);
  box-shadow: 0 0 12px var(--glow-box);
}

.floating-action-btn.muted {
  opacity: 0.55;
  filter: grayscale(1);
}

/* 텍스트 툴팁 라벨 */
.floating-action-btn .action-label {
  position: absolute;
  right: 50px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.floating-menu-container.open .floating-action-btn .action-label {
  opacity: 1;
  transform: translateX(0);
}

/* ========================================================
   반응형 미디어 쿼리
   ======================================================== */
@media (max-width: 1080px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ambient-art-obj {
    opacity: 0.22;
    width: 45vw;
  }
}

@media (max-width: 680px) {
  body {
    padding: 8px 6px;
    align-items: flex-start;
  }

  .app-page-wrapper {
    padding: 8px 6px 28px 6px;
    min-height: auto;
  }

  .badge-anniversary {
    font-size: 0.66rem;
    padding: 4px 10px;
    letter-spacing: 0.01em;
    white-space: normal;
    line-height: 1.35;
    text-align: center;
    max-width: 100%;
    display: inline-block;
  }

  .matrix-card {
    padding: 12px 8px;
  }

  .frame-wrapper, .clock-frame {
    padding: 8px;
    border-width: 6px;
  }

  .grid-5x5 {
    gap: 8px;
    padding: 8px;
  }

  .grid-5x5 .grid-cell {
    font-size: 1.5rem;
  }

  .grid-cell {
    font-size: 1.05rem;
    border-radius: 6px;
  }

  .hangul-sentence {
    font-size: 1.05rem;
  }

  .digital-time {
    font-size: 1.15rem;
    padding: 4px 10px;
  }

  .time-adjusters {
    gap: 8px;
  }

  .action-btn {
    min-width: 100%;
  }

  .app-header {
    position: relative;
    width: 100%;
    min-height: 135px;
    padding: 10px 12px 14px 12px;
    border-radius: 18px;
    margin-bottom: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    background: transparent;
  }

  /* 모바일 전용 우측 유물 배경 & 3면(좌, 상, 하) 정밀 그라데이션 블렌딩 */
  .mobile-header-artifact-bg {
    display: block !important;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    z-index: 1;
    cursor: pointer;
    transition: background-image 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
  }

  .mobile-header-artifact-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    /* 좌측 55%는 다크 배경(--bg-main)으로 가려 타이틀/버튼 가독성을 100% 확보하고, 상하단도 부드럽게 페이드 */
    background: 
      linear-gradient(to right, 
        var(--bg-main, #0a0d14) 0%, 
        var(--bg-main, #0a0d14) 38%, 
        rgba(10, 13, 20, 0.88) 54%, 
        rgba(10, 13, 20, 0.28) 72%, 
        transparent 100%),
      linear-gradient(to bottom, 
        rgba(10, 13, 20, 0.85) 0%, 
        transparent 28%, 
        transparent 68%, 
        var(--bg-main, #0a0d14) 100%);
    pointer-events: none;
    z-index: 2;
  }

  /* 우측 하단 미니 해설 안내 힌트 (상단 배지와 겹침 방지) */
  .mobile-artifact-hint {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 5;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--glow-light, #fbbf24);
    background: rgba(10, 13, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 3px 9px;
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.02em;
    pointer-events: auto;
    cursor: pointer;
  }

  .header-top-badge-row {
    position: relative;
    z-index: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    text-align: center;
    margin-bottom: 6px;
  }

  .badge-anniversary {
    font-size: 0.66rem;
    padding: 3px 10px;
    letter-spacing: 0.02em;
    background: rgba(15, 20, 30, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  }

  .header-main-row,
  .header-centered-row {
    position: relative;
    z-index: 3;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    width: 100%;
  }

  .header-centered-row .logo-area,
  .logo-area {
    align-items: flex-start !important;
    text-align: left;
  }

  .title-with-modes {
    display: flex;
    flex-direction: column; /* 타이틀 아래에 타이머/스톱워치 버튼 배치 */
    align-items: flex-start;
    gap: 8px;
  }

  .app-title {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 0 16px var(--glow-ambient);
  }

  .title-sub-modes {
    display: flex;
    flex-direction: row; /* 타이머, 스톱워치 버튼은 가로 나란히 */
    gap: 6px;
    align-items: center;
  }

  .sub-mode-btn {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-muted);
    backdrop-filter: blur(4px);
  }

  .controls-row-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .inline-theme-select {
    width: 100%;
    max-width: 100%;
  }

  .grid-clock-8x4 {
    gap: 5px;
    padding: 8px 4px;
  }

  .grid-clock-8x4 .grid-cell {
    font-size: clamp(0.82rem, 3.6vw, 1.12rem);
    border-radius: 6px;
  }

  .grid-timer-5x4 {
    gap: 8px;
    padding: 10px 8px;
  }

  .grid-timer-5x4 .grid-cell {
    font-size: clamp(1.15rem, 5.2vw, 1.75rem);
    border-radius: 9px;
  }

  .grid-stopwatch-8x4 {
    gap: 5px;
    padding: 8px 4px;
  }

  .grid-stopwatch-8x4 .grid-cell {
    font-size: clamp(0.80rem, 3.5vw, 1.10rem);
    border-radius: 6px;
  }

  .timer-90m-adjusters {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .theme-bar-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .bottom-controls-card .theme-select {
    max-width: 100%;
    width: 100%;
  }

  .clock-options-bar {
    justify-content: flex-start;
    gap: 12px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
}

/* ========================================================
   [모바일 반응형] 초 블럭 길이 및 두께 자동 축소 (간격 확보 및 중첩 방지)
   ======================================================== */
@media (max-width: 768px) {
  .sec-block.edge-top,
  .sec-block.edge-bottom {
    width: 9px !important;
    height: 4px !important;
  }
  .sec-block.edge-left,
  .sec-block.edge-right {
    width: 4px !important;
    height: 9px !important;
  }
  .sec-block.edge-top.marker-5s,
  .sec-block.edge-bottom.marker-5s {
    width: 11px !important;
    height: 6px !important;
  }
  .sec-block.edge-top.marker-5s::before,
  .sec-block.edge-bottom.marker-5s::before,
  .sec-block.edge-top.marker-5s::after,
  .sec-block.edge-bottom.marker-5s::after {
    height: 2px !important;
  }
  .sec-block.edge-left.marker-5s,
  .sec-block.edge-right.marker-5s {
    width: 6px !important;
    height: 11px !important;
  }
  .sec-block.edge-left.marker-5s::before,
  .sec-block.edge-right.marker-5s::before,
  .sec-block.edge-left.marker-5s::after,
  .sec-block.edge-right.marker-5s::after {
    width: 2px !important;
  }
}

@media (max-width: 480px) {
  .sec-block.edge-top,
  .sec-block.edge-bottom {
    width: 6.5px !important;
    height: 3.5px !important;
  }
  .sec-block.edge-left,
  .sec-block.edge-right {
    width: 3.5px !important;
    height: 6.5px !important;
  }
  .sec-block.edge-top.marker-5s,
  .sec-block.edge-bottom.marker-5s {
    width: 8.5px !important;
    height: 5.5px !important;
  }
  .sec-block.edge-top.marker-5s::before,
  .sec-block.edge-bottom.marker-5s::before,
  .sec-block.edge-top.marker-5s::after,
  .sec-block.edge-bottom.marker-5s::after {
    height: 1.8px !important;
  }
  .sec-block.edge-left.marker-5s,
  .sec-block.edge-right.marker-5s {
    width: 5.5px !important;
    height: 8.5px !important;
  }
  .sec-block.edge-left.marker-5s::before,
  .sec-block.edge-right.marker-5s::before,
  .sec-block.edge-left.marker-5s::after,
  .sec-block.edge-right.marker-5s::after {
    width: 1.8px !important;
  }
}

@media (max-width: 360px) {
  .sec-block.edge-top,
  .sec-block.edge-bottom {
    width: 5px !important;
    height: 3px !important;
  }
  .sec-block.edge-left,
  .sec-block.edge-right {
    width: 3px !important;
    height: 5px !important;
  }
  .sec-block.edge-top.marker-5s,
  .sec-block.edge-bottom.marker-5s {
    width: 7px !important;
    height: 4.5px !important;
  }
  .sec-block.edge-left.marker-5s,
  .sec-block.edge-right.marker-5s {
    width: 4.5px !important;
    height: 7px !important;
  }
  .sec-block.edge-top.marker-5s::before,
  .sec-block.edge-top.marker-5s::after,
  .sec-block.edge-bottom.marker-5s::before,
  .sec-block.edge-bottom.marker-5s::after {
    height: 1.5px !important;
  }
  .sec-block.edge-left.marker-5s::before,
  .sec-block.edge-left.marker-5s::after,
  .sec-block.edge-right.marker-5s::before,
  .sec-block.edge-right.marker-5s::after {
    width: 1.5px !important;
  }
}

/* ========================================================
   고품질 한국어 음성 팩 설치 안내 모달 다이얼로그
   ======================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-card {
  background: #111726;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.85),
    0 0 30px rgba(245, 158, 11, 0.15);
  display: flex;
  flex-direction: column;
  animation: modal-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modal-pop {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-icon {
  font-size: 1.3rem;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-close-modal:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.modal-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-status-box {
  background: rgba(18, 26, 44, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.status-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
}

.detected-voices-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.voice-item-chip {
  font-size: 0.76rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  color: #e2e8f0;
}

.voice-item-chip.is-native-male {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fef08a;
  font-weight: 700;
}

.guide-step-card {
  background: rgba(14, 20, 32, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-step-card.highlight-tip {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(30, 58, 138, 0.15);
}

.guide-step-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f5f9;
}

.highlight-tip .guide-step-title {
  color: #93c5fd;
}

.guide-step-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.5;
}

.guide-steps-list {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.guide-steps-list strong {
  color: #ffffff;
}

.guide-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid var(--glow-color);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #fef08a;
  line-height: 1.5;
}

.note-icon {
  font-size: 1rem;
}

.modal-footer {
  padding: 16px 24px 20px 24px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-btn-confirm {
  background: linear-gradient(135deg, var(--glow-color), var(--glow-light));
  color: #0c1427;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px var(--glow-ambient);
}

.modal-btn-confirm:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ========================================================
   [테마 해설 팝업 모달 전용 스타일]
   ======================================================== */
.theme-modal-card {
  max-width: 520px;
  border-color: var(--glow-color);
}

.theme-modal-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.theme-modal-header-info .theme-desc-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--glow-light);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--bg-card-border);
  padding: 2px 8px;
  border-radius: 6px;
  width: fit-content;
}

.theme-modal-img-wrap {
  width: 100%;
  height: 190px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000000;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
  margin-bottom: 6px;
}

.theme-modal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.theme-modal-subheading {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--glow-light);
  margin-bottom: 8px;
}

.theme-modal-desc-body {
  font-size: 0.88rem;
  line-height: 1.68;
  color: #cbd5e1;
  word-break: keep-all;
}

/* ========================================================
   [그리드 하단 통합 컨트롤 바 & 옵션 레이아웃]
   ======================================================== */
.bottom-controls-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 18px 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s ease;
}

/* 테마 선택 바 */
.theme-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.theme-label-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-icon {
  font-size: 1.15rem;
}

.theme-label-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.bottom-controls-card .theme-select {
  flex: 1;
  max-width: 400px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bottom-controls-card .theme-select:hover,
.bottom-controls-card .theme-select:focus {
  border-color: var(--glow-color);
  box-shadow: 0 0 12px var(--glow-box);
}

/* 시계 옵션 가로 배치 바 */
.clock-options-bar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 16px;
  padding: 4px 0;
}

.chime-control-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-voice-test {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-voice-test:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--glow-color);
  box-shadow: 0 0 10px var(--glow-ambient);
  transform: translateY(-1px);
}

.btn-voice-test:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========================================================
   [하단 푸터: 멘토의수첩 & 구글 플레이 공식 뱃지 중앙 정렬]
   ======================================================== */
.clean-footer {
  width: 100%;
  padding: 16px 12px 14px 12px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-center-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  text-align: center;
}

.app-promo-phrase {
  font-size: 0.88rem;
  color: #e2e8f0;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.footer-download-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 구글 플레이 공식 디자인 뱃지 */
.google-play-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000000;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: 9px;
  padding: 6px 16px;
  text-decoration: none;
  color: #ffffff;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}

.google-play-badge:hover {
  background: #111827;
  border-color: var(--glow-light);
  box-shadow: 0 0 18px var(--glow-box), 0 4px 16px rgba(0, 0, 0, 0.6);
  transform: translateY(-2px);
}

.gp-badge-icon {
  flex-shrink: 0;
}

.gp-badge-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.gp-text-sub {
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
}

.gp-text-main {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  font-family: var(--font-sans);
}

.footer-copyright-wrap {
  margin-top: 2px;
}

.footer-copyright {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

/* ========================================================
   [사이드 메뉴 드로어 & 오버레이]
   ======================================================== */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.menu-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.side-menu-drawer {
  position: fixed;
  top: 0;
  right: -440px;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  background: #0f172a;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.7);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.side-menu-drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.95);
  position: sticky;
  top: 0;
  z-index: 10;
}

.drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-icon {
  font-size: 1.3rem;
}

.drawer-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: #f8fafc;
}

.btn-close-drawer {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.btn-close-drawer:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.drawer-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.section-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--glow-light);
}

.section-desc {
  font-size: 0.84rem;
  line-height: 1.6;
  color: #cbd5e1;
}

.section-desc strong {
  color: #ffffff;
}

.drawer-list {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.drawer-list strong {
  color: #ffffff;
}

.drawer-action-btn {
  margin-top: 6px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.drawer-action-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}
