/* ==========================================
   1. Material Design 3 토큰 정의
   ========================================== */
:root {
  --md-sys-color-primary: #005fb0;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #d6e4ff;
  --md-sys-color-on-primary-container: #001b3d;
  --md-sys-color-secondary: #535f70;
  --md-sys-color-secondary-container: #e2e8f4;
  --md-sys-color-on-secondary-container: #101c2b;
  --md-sys-color-tertiary: #0b6b52;
  --md-sys-color-tertiary-container: #bbf2dc;
  --md-sys-color-on-tertiary-container: #002117;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-background: #f8fafc;
  --md-sys-color-on-background: #0f172a;
  --md-sys-color-surface: #ffffff;
  --md-sys-color-on-surface: #0f172a;
  --md-sys-color-surface-container: #ffffff;
  --md-sys-color-surface-container-high: #edf2f7;

  --md-sys-color-outline: #64748b;
  --md-sys-color-outline-variant: #cbd5e1;
  --card-border-color: #cbd5e1;
  --cal-cell-border: #e2e8f0;

  --md-shape-corner-small: 8px;
  --md-shape-corner-medium: 12px;
  --md-shape-corner-large: 16px;
  --md-shape-corner-extra-large: 24px;
  --md-shape-corner-sheet: 28px;
  --md-shape-corner-full: 9999px;

  --md-elevation-1: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.08);
  --md-elevation-2: 0 4px 6px -1px rgba(15, 23, 42, 0.10), 0 2px 4px -2px rgba(15, 23, 42, 0.10);
  --md-elevation-3: 0 10px 15px -3px rgba(15, 23, 42, 0.12), 0 4px 6px -4px rgba(15, 23, 42, 0.12);
}

[data-theme="dark"] {
  --md-sys-color-primary: #9ecafe;
  --md-sys-color-on-primary: #003258;
  --md-sys-color-primary-container: #00497d;
  --md-sys-color-on-primary-container: #d1e4ff;
  --md-sys-color-secondary: #bbc7db;
  --md-sys-color-secondary-container: #334155;
  --md-sys-color-on-secondary-container: #d7e3f7;
  --md-sys-color-tertiary: #87d6ba;
  --md-sys-color-tertiary-container: #00513d;
  --md-sys-color-on-tertiary-container: #a3f2d6;
  --md-sys-color-error: #ffb4ab;
  --md-sys-color-error-container: #93000a;
  --md-sys-color-background: #090d16;
  --md-sys-color-on-background: #f8fafc;
  --md-sys-color-surface: #131924;
  --md-sys-color-on-surface: #f8fafc;
  --md-sys-color-surface-container: #131924;
  --md-sys-color-surface-container-high: #1e2636;

  --md-sys-color-outline: #94a3b8;
  --md-sys-color-outline-variant: #334155;
  --card-border-color: #263346;
  --cal-cell-border: #1f2b3d;

  --md-elevation-1: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --md-elevation-2: 0 4px 8px 0 rgba(0, 0, 0, 0.5);
  --md-elevation-3: 0 10px 18px 0 rgba(0, 0, 0, 0.65);
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --md-sys-color-primary: #9ecafe;
    --md-sys-color-on-primary: #003258;
    --md-sys-color-primary-container: #00497d;
    --md-sys-color-on-primary-container: #d1e4ff;
    --md-sys-color-secondary: #bbc7db;
    --md-sys-color-secondary-container: #334155;
    --md-sys-color-on-secondary-container: #d7e3f7;
    --md-sys-color-tertiary: #87d6ba;
    --md-sys-color-tertiary-container: #00513d;
    --md-sys-color-on-tertiary-container: #a3f2d6;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-error-container: #93000a;
    --md-sys-color-background: #090d16;
    --md-sys-color-on-background: #f8fafc;
    --md-sys-color-surface: #131924;
    --md-sys-color-on-surface: #f8fafc;
    --md-sys-color-surface-container: #131924;
    --md-sys-color-surface-container-high: #1e2636;

    --md-sys-color-outline: #94a3b8;
    --md-sys-color-outline-variant: #334155;
    --card-border-color: #263346;
    --cal-cell-border: #1f2b3d;

    --md-elevation-1: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --md-elevation-2: 0 4px 8px 0 rgba(0, 0, 0, 0.5);
    --md-elevation-3: 0 10px 18px 0 rgba(0, 0, 0, 0.65);
  }
}

/* ==========================================
   2. 전역 스타일 & 앱 바
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 80px;
  line-height: 1.5;
  overflow-x: hidden;
}

.app-top-bar {
  width: 100%;
  max-width: 1160px;
  padding: 20px 0 12px;
  border-bottom: 1.5px solid var(--card-border-color);
  margin-bottom: 24px;
}

.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-bar-title-wrap {
  flex: 1;
  text-align: left;
}

.brand-title {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--md-sys-color-primary);
}

.brand-subtitle {
  font-size: 0.8125rem;
  color: var(--md-sys-color-outline);
}

.btn-planner-quick {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-weight: 700;
  border: 1px solid rgba(0, 95, 176, 0.2);
}

.app-layout {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  transition: max-width 0.3s ease;
}

.responsive-dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.grid-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================
   3. 타이포그래피 & 카드
   ========================================== */
.title-large { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; }
.title-medium { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
.label-medium { font-size: 0.875rem; font-weight: 600; }
.label-small { font-size: 0.75rem; font-weight: 500; }
.label-unit { font-size: 0.875rem; font-weight: 700; color: var(--md-sys-color-outline); margin-top: 6px; }
.body-small { font-size: 0.8125rem; color: var(--md-sys-color-outline); margin-top: 2px; }

.badge-locked {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--md-shape-corner-full);
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-outline);
  border: 1px solid var(--card-border-color);
}

.material-symbols-outlined { font-size: 20px; vertical-align: middle; }
.icon-small { font-size: 18px; }

.md-card {
  background-color: var(--md-sys-color-surface-container);
  border-radius: var(--md-shape-corner-large);
  padding: 24px;
  border: 1.5px solid var(--card-border-color);
  box-shadow: var(--md-elevation-1);
}

.card-header, .card-headline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-overline {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--md-sys-color-primary);
  display: block;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.target-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--md-shape-corner-medium);
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  border: 1px solid var(--card-border-color);
  cursor: pointer;
}

.target-time-chip:hover {
  border-color: var(--md-sys-color-primary);
}

.time-input-inline {
  background: transparent;
  border: none;
  color: var(--md-sys-color-primary);
  font-size: 0.8125rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.time-input-inline::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.7;
}

[data-theme="dark"] .time-input-inline::-webkit-calendar-picker-indicator,
[data-theme="auto"] .time-input-inline::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
}

.md-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--md-shape-corner-full);
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.md-button-text {
  background: transparent;
  color: var(--md-sys-color-primary);
  padding: 4px 8px;
}

.md-icon-button {
  background: transparent;
  border: 1.5px solid var(--card-border-color);
  color: var(--md-sys-color-on-surface);
  width: 40px;
  height: 40px;
  border-radius: var(--md-shape-corner-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.md-icon-button:hover {
  background-color: var(--md-sys-color-surface-container-high);
  border-color: var(--md-sys-color-primary);
}

/* ==========================================
   4. 클린 텍스트 플립다운 애니메이션
   ========================================== */
.countdown-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 12px 0 24px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}

.flip-text-container {
  position: relative;
  height: 52px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 250px;
  -webkit-perspective: 250px;
}

.flip-num {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--md-sys-color-on-surface);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

.flip-num.active {
  transform: translateY(0) rotateX(0deg);
  opacity: 1;
}

.flip-num.incoming {
  transform: translateY(-50%) rotateX(90deg);
  opacity: 0;
}

.flip-text-container.flipping-down .flip-num.active {
  animation: flipTextOutDown 0.42s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.flip-text-container.flipping-down .flip-num.incoming {
  animation: flipTextInDown 0.42s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes flipTextOutDown {
  0% { transform: translateY(0) rotateX(0deg); opacity: 1; }
  100% { transform: translateY(50%) rotateX(-90deg); opacity: 0; }
}

@keyframes flipTextInDown {
  0% { transform: translateY(-50%) rotateX(90deg); opacity: 0; }
  100% { transform: translateY(0) rotateX(0deg); opacity: 1; }
}

.countdown-separator {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--md-sys-color-outline);
  margin-bottom: 24px;
}

.linear-progress-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  color: var(--md-sys-color-outline);
}

.linear-progress-track {
  width: 100%;
  height: 8px;
  background-color: var(--md-sys-color-surface-container-high);
  border-radius: var(--md-shape-corner-full);
  border: 1px solid var(--card-border-color);
  overflow: hidden;
}

.linear-progress-indicator {
  height: 100%;
  width: 0%;
  background-color: var(--md-sys-color-primary);
  border-radius: var(--md-shape-corner-full);
  transition: width 0.4s ease;
}

/* ==========================================
   5. 캘린더 스타일
   ========================================== */
.cal-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.cal-title-area {
  display: flex;
  flex-direction: column;
}

.cal-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-nav-buttons {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--md-sys-color-outline);
  padding: 4px 0 10px;
  border-bottom: 2px solid var(--card-border-color);
}

.calendar-grid-header .sun { color: #dc2626; }
.calendar-grid-header .sat { color: #0284c7; }

.calendar-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 330px;
  margin-top: 8px;
}

.calendar-grid-layer {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform, opacity;
}

.calendar-grid-layer.active-layer {
  position: relative;
  transform: translateY(0);
  opacity: 1;
}

.slide-up-exit {
  animation: slideUpExitAnim 0.32s cubic-bezier(0.2, 0, 0, 1) forwards;
}

.slide-up-enter {
  animation: slideUpEnterAnim 0.32s cubic-bezier(0.2, 0, 0, 1) forwards;
}

.slide-down-exit {
  animation: slideDownExitAnim 0.32s cubic-bezier(0.2, 0, 0, 1) forwards;
}

.slide-down-enter {
  animation: slideDownEnterAnim 0.32s cubic-bezier(0.2, 0, 0, 1) forwards;
}

@keyframes slideUpExitAnim {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-100%); opacity: 0; }
}

@keyframes slideUpEnterAnim {
  0% { transform: translateY(100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes slideDownExitAnim {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}

@keyframes slideDownEnterAnim {
  0% { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.cal-cell {
  min-height: 58px;
  background-color: var(--md-sys-color-surface);
  border: 1.5px solid var(--cal-cell-border);
  border-radius: var(--md-shape-corner-medium);
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
}

.cal-cell.other-month {
  opacity: 0.32;
  background-color: transparent;
  border-style: dashed;
}

.cal-date-num {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
}

.cal-cell.sunday .cal-date-num { color: #dc2626; }
.cal-cell.saturday .cal-date-num { color: #0284c7; }

.cal-cell.holiday {
  background-color: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
}
.cal-cell.holiday .cal-date-num {
  color: #dc2626;
  font-weight: 900;
}

.cal-cell.leave-rec {
  background-color: rgba(16, 185, 129, 0.14);
  border: 1.5px dashed #059669;
}
.cal-cell.leave-rec .cal-date-num {
  color: #047857;
  font-weight: 900;
}

.cal-cell.today {
  outline: 2.5px solid var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary);
  background-color: rgba(0, 95, 176, 0.08);
}

.cal-cell.today .cal-date-num {
  color: var(--md-sys-color-primary);
  font-weight: 900;
}

.cal-sub-label {
  font-size: 0.625rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  padding: 1px 3px;
  border-radius: 4px;
  text-align: center;
  display: block;
}

.cal-cell.holiday .cal-sub-label {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.15);
}

.cal-cell.leave-rec .cal-sub-label {
  color: #047857;
  background: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .cal-cell.holiday .cal-sub-label,
[data-theme="auto"] .cal-cell.holiday .cal-sub-label {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.25);
}

[data-theme="dark"] .cal-cell.leave-rec .cal-sub-label,
[data-theme="auto"] .cal-cell.leave-rec .cal-sub-label {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.25);
}

.calendar-legend {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1.5px solid var(--card-border-color);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--md-sys-color-outline);
}

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

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: var(--md-shape-corner-full);
}

.dot-holiday { background-color: #dc2626; }
.dot-leave { background-color: #059669; }
.dot-today { background-color: var(--md-sys-color-primary); }

/* ==========================================
   6. 인사이트, 통계, 연차 리스트
   ========================================== */
.insight-content-box {
  background-color: var(--md-sys-color-surface);
  border-radius: var(--md-shape-corner-medium);
  padding: 16px;
  border: 1.5px solid var(--card-border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.insight-badge-icon {
  color: var(--md-sys-color-primary);
  font-size: 24px;
}

.insight-headline {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--md-sys-color-on-surface);
}

.insight-description {
  font-size: 0.875rem;
  color: var(--md-sys-color-outline);
  line-height: 1.6;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-box {
  background-color: var(--md-sys-color-surface);
  border: 1.5px solid var(--card-border-color);
  border-radius: var(--md-shape-corner-medium);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-box.total {
  background-color: var(--md-sys-color-primary-container);
  border-color: rgba(0, 95, 176, 0.35);
}

.stat-box.total .stat-label,
.stat-box.total .stat-value {
  color: var(--md-sys-color-on-primary-container);
}

.stat-box.total .stat-icon {
  color: var(--md-sys-color-primary);
}

.stat-content {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--md-sys-color-outline);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--md-sys-color-on-surface);
  line-height: 1.2;
}

.stat-sub {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--md-sys-color-outline);
  margin-top: 4px;
}

.stat-icon {
  font-size: 24px;
  color: var(--md-sys-color-outline);
  opacity: 0.8;
}

.recommendation-list, .md-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.recommendation-item, .md-list-item {
  background-color: var(--md-sys-color-surface);
  border: 1.5px solid var(--card-border-color);
  border-radius: var(--md-shape-corner-medium);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-content h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.item-content p {
  font-size: 0.8125rem;
  color: var(--md-sys-color-outline);
}

.badge-benefit {
  background-color: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  border: 1px solid rgba(11, 107, 82, 0.35);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--md-shape-corner-small);
  white-space: nowrap;
}

.holiday-dday {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border: 1px solid var(--card-border-color);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--md-shape-corner-small);
}

.app-footer {
  text-align: center;
  padding: 32px 0 16px;
  color: var(--md-sys-color-outline);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* ==========================================
   7. 🌟 미래 연차 시뮬레이터 (아래에서 위로 올라오는 바텀 시트)
   ========================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* 바텀 시트 구조: 하단 고정 & 위로 슬라이드 */
.simulation-drawer {
  position: fixed;
  bottom: 0;
  left: 50%;
  width: 100%;
  max-width: 780px;
  height: 88vh;
  max-height: 920px;
  background-color: var(--md-sys-color-background);
  z-index: 1300;
  border-radius: var(--md-shape-corner-sheet) var(--md-shape-corner-sheet) 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.28);
  border: 1.5px solid var(--card-border-color);
  border-bottom: none;
  
  /* 🌟 아래에서 위로 나타나는 트랜스폼 애니메이션 */
  transform: translate(-50%, 100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  will-change: transform;
}

.simulation-drawer.is-open {
  transform: translate(-50%, 0%);
}

/* 모바일 상단 터치 핸들 바 */
.drawer-handle-bar {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  cursor: grab;
}

.drawer-handle {
  width: 44px;
  height: 4px;
  background-color: var(--md-sys-color-outline-variant);
  border-radius: 9999px;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px 16px;
  background-color: var(--md-sys-color-surface);
  border-bottom: 1.5px solid var(--card-border-color);
}

.drawer-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-header-icon {
  font-size: 28px;
  color: var(--md-sys-color-primary);
}

.drawer-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--md-sys-color-on-surface);
}

.drawer-subtitle {
  font-size: 0.75rem;
  color: var(--md-sys-color-outline);
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==========================================
   8. FAB 테마 컨트롤러
   ========================================== */
.theme-switcher-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  transform: translateZ(0);
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1), opacity 0.25s ease;
  will-change: transform, opacity;
}

.theme-switcher-fab.is-hidden {
  transform: translateY(90px) scale(0.85);
  opacity: 0;
  pointer-events: none;
}

.md-fab {
  width: 56px;
  height: 56px;
  border-radius: var(--md-shape-corner-large);
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border: 1.5px solid var(--card-border-color);
  box-shadow: var(--md-elevation-3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.md-fab:hover {
  transform: scale(1.05);
}

.theme-menu {
  display: none;
  flex-direction: column;
  background-color: var(--md-sys-color-surface-container-high);
  border-radius: var(--md-shape-corner-medium);
  box-shadow: var(--md-elevation-2);
  border: 1.5px solid var(--card-border-color);
  overflow: hidden;
  min-width: 120px;
}

.theme-menu.active {
  display: flex;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--md-sys-color-on-surface);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.theme-option:hover {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.theme-option.selected {
  font-weight: 800;
  color: var(--md-sys-color-primary);
}

/* ==========================================
   9. 반응형 미디어 쿼리 (모바일 & PC)
   ========================================== */
@media (max-width: 767px) {
  body {
    padding: 0 12px 72px;
  }
  .app-top-bar {
    padding: 14px 0 10px;
    margin-bottom: 16px;
  }
  .brand-title {
    font-size: 1.35rem;
  }
  .btn-planner-quick .btn-text {
    display: none;
  }
  .md-card {
    padding: 16px;
  }
  .flip-text-container {
    height: 40px;
  }
  .flip-num {
    font-size: 2.15rem;
  }
  .countdown-unit {
    min-width: 50px;
  }
  .countdown-display {
    gap: 8px;
  }
  .countdown-separator {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .calendar-viewport {
    min-height: 285px;
  }
  .cal-cell {
    min-height: 50px;
    padding: 3px 2px;
  }
  .cal-date-num {
    font-size: 0.85rem;
  }
  .cal-sub-label {
    font-size: 0.5625rem;
  }
  .recommendation-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .theme-switcher-fab {
    bottom: 16px;
    right: 16px;
  }
  .simulation-drawer {
    height: 92vh;
    border-radius: 20px 20px 0 0;
  }
  .drawer-content {
    padding: 16px 16px 60px;
  }
}

@media (min-width: 1024px) {
  body {
    padding: 0 24px 80px;
  }
  .app-layout {
    max-width: 1160px;
    gap: 28px;
  }
  .brand-title {
    font-size: 2rem;
  }
  .responsive-dashboard-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    align-items: start;
  }
  .calendar-viewport {
    min-height: 380px;
  }
  .cal-cell {
    min-height: 70px;
    padding: 6px;
  }
  .cal-date-num {
    font-size: 1rem;
  }
  .cal-sub-label {
    font-size: 0.725rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .secondary-col {
    position: sticky;
    top: 24px;
  }
}
