/*
 * 테마: JavaScript가 설정하는 --desk-* 색상 연결, 글꼴, 카드와 대화상자 효과.
 * 테마별 실제 색상과 밝기 계산은 js/core/appearance.mjs에서 관리합니다.
 * main.css 뒤, clock-screen.css·planning.css·brainstorm.css 앞에 불러옵니다.
 */

/* 색상 변수 연결 */

.desk {
  --bg: var(--desk-background);
  --ink: var(--desk-text);
  --paper: var(--desk-card);
  --line: var(--desk-border);
  --muted: var(--desk-muted);
  background: var(--bg);
  color: var(--ink);
  color-scheme: dark;
}

/* 글꼴 크기와 간격 */

.desk {
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.015em;
}

.desk .intro h1,
.desk .section-title h2,
.desk #focus h1,
.desk #done h1,
.desk .dialog-head h2,
.desk .nodi-about h2 {
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.4;
}

.desk .task-choice strong {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
}

.desk .intro #welcomeHint,
.desk .plan-note,
.desk .start-panel .start-help,
.desk #focusHint,
.desk #taskEmptyHint,
.desk .empty-slot-label {
  font-size: 14px;
  line-height: 1.7;
}

.desk .task-choice small,
.desk .start-panel #selectedMeta,
.desk .start-panel .next-label,
.desk .daily-label,
.desk #carryDetails,
.desk #deskCalendar summary,
.desk .calendar-weekdays,
.desk .floating-controls .text-button,
.desk #colorFields legend,
.desk .theme-presets button {
  font-size: 13px;
  line-height: 1.6;
}

.desk .routine-progress,
.desk .header-datetime .header-date,
.desk footer {
  font-size: 12px;
  line-height: 1.5;
}

.desk .text-button,
.desk .edit-task,
.desk .calendar-grid .today {
  font-weight: 500;
}

.desk .flip-number,
.desk #plannedTimer {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.desk .flip-card small {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

@media (max-width: 500px) {
  .desk .task-choice strong {
    font-size: 15px;
  }

  .desk .flip-card small {
    font-size: 11px;
  }
}

/* 카드·메뉴·대화상자 효과와 접근성 설정 */

.desk .start-panel {
  background:
    linear-gradient(135deg, #ffffff20, #ffffff00 45%),
    radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--desk-accent) 14%, transparent), transparent 65%),
    var(--desk-card);
  border-color: color-mix(in srgb, var(--line) 85%, var(--ink));
  box-shadow: inset 0 1px 0 #ffffff55, inset 0 -1px 0 #ffffff10, 0 12px 32px #00000012;
}

.desk .floating-controls {
  background: var(--paper);
  border-color: color-mix(in srgb, var(--line) 85%, var(--ink));
  box-shadow: inset 0 1px 0 #ffffff66, 0 10px 32px #00000020;
}

.desk dialog {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 #ffffff55, 0 24px 72px #00000038;
}

.desk dialog::backdrop {
  background: #00000038;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .desk .floating-controls {
    background: linear-gradient(135deg, #ffffff24, #ffffff00 65%),
      color-mix(in srgb, var(--paper) 76%, transparent);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }

  .desk .start-panel {
    background:
      linear-gradient(135deg, #ffffff20, #ffffff00 45%),
      radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--desk-accent) 14%, transparent), transparent 65%),
      color-mix(in srgb, var(--desk-card) 85%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .desk dialog {
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
}

@media (hover: hover) and (pointer: fine) {
  .desk .start-panel:hover,
  .desk .start-panel:focus-within {
    border-color: color-mix(in srgb, var(--line) 65%, var(--ink));
    box-shadow: inset 0 1px 0 #ffffff70, 0 18px 40px #0000001c;
  }

  .desk .floating-controls:hover {
    box-shadow: inset 0 1px 0 #ffffff80, 0 14px 36px #00000028;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .desk .start-panel,
  .desk .floating-controls {
    transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .desk .start-panel:hover {
    transform: translateY(-3px);
  }

  .desk .floating-controls:hover {
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .desk .start-panel {
    background: var(--desk-card);
  }

  .desk .floating-controls {
    background: var(--paper);
  }

  .desk dialog {
    background: var(--bg);
  }

  .desk .start-panel,
  .desk .floating-controls,
  .desk dialog,
  .desk dialog::backdrop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* 플립 달력 숫자의 글꼴 */

.flip-date-face strong {
  font-family: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  font-size: clamp(22px, 32cqw, 60px);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.025em;
}

.flip-date-column:nth-child(3) .flip-date-face strong {
  font-size: clamp(30px, 46cqw, 82px);
}

#calendarPreview .flip-date-face strong {
  font-size: clamp(17px, 32cqw, 28px);
}

#calendarPreview .flip-date-column:nth-child(3) .flip-date-face strong {
  font-size: clamp(24px, 46cqw, 40px);
}
