/* ============================
   RESPONSIVE
   ============================ */
/* ============================
   MOBILE  (≤ 600px)
   ============================ */
@media (max-width: 600px) {

  /* ── 상단 바 ── */
  .top-bar {
    padding:
      calc(10px + env(safe-area-inset-top, 0px))
      calc(14px + env(safe-area-inset-right, 0px))
      8px
      calc(14px + env(safe-area-inset-left, 0px));
  }
  .top-bar__inner { gap: 6px; }

  /* 로고 + 인증 버튼을 한 줄에 */
  .top-header-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 8px;
  }

  .logo {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    flex: 1;
    min-width: 0;
  }

  /* 모바일에서 sync 상태 완전 숨김 (D-day 공간 확보) */
  .sync-status { display: none; }

  .header-right {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    flex-shrink: 0;
  }

  /* 모바일에서 사용자 이름 숨김 (아이콘만) */
  .user-name { display: none; }

  .user-photo {
    width: 26px;
    height: 26px;
  }

  .icon-btn {
    font-size: 1rem;
    padding: 5px;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .auth-btn {
    font-size: 0.75rem;
    padding: 5px 10px;
    white-space: nowrap;
  }

  .auth-btn--outline {
    padding: 5px 8px;
    font-size: 0.72rem;
  }

  /* ── 입력창 ── */
  .task-input-wrap {
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }

  .task-input-wrap input {
    flex: 1;
    min-width: 0;
    padding: 10px 13px;
    font-size: 0.9rem;
  }

  .add-task-btn {
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .deadline-toggle-btn {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .gcal-side-panel { display: none !important; }

  /* ── 할일 풀: 모바일 패딩(14px)에 맞게 네거티브 마진 조정 ── */
  .task-pool {
    margin-left: 0;
    margin-right: 0;
    padding: 4px 0;
  }

  /* ── 풀 카드 ── */
  .pool-card {
    padding: 7px 13px;
    font-size: 0.83rem;
    gap: 5px;
  }

  /* ── 할일 풀: 모바일에서만 가로 스크롤 ── */
  .task-pool {
    width: 100%;
    max-width: 100%;
    padding: 4px 0;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .pool-card {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  /* ── 일정 영역 ── */
  .schedule-area {
    padding:
      14px
      calc(10px + env(safe-area-inset-right, 0px))
      calc(80px + env(safe-area-inset-bottom, 0px))
      calc(10px + env(safe-area-inset-left, 0px));
  }

  .schedule-layout {
    padding-inline: 2px;
  }

  .schedule-area__header {
    gap: 8px;
    margin-bottom: 14px;
  }

  .week-label {
    font-size: 0.82rem;
    min-width: 0;
    text-align: center;
  }

  .week-nav-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .auth-stack {
    align-items: stretch;
  }

  .auth-hint {
    text-align: left;
  }

  /* ── 날짜 카드 ── */
  .day-card {
    width: 100%;
    min-width: 0;
    min-height: auto;
    padding: 14px 12px;
    border-radius: 14px;
    gap: 8px;
  }

  .day-card__header {
    align-items: center;
    row-gap: 6px;
  }

  .day-card__date { font-size: 1.25rem; }
  .day-card__weekday { font-size: 0.78rem; }

  .today-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
  }

  .defer-btn {
    font-size: 0.7rem;
    padding: 4px 9px;
    border-radius: 6px;
  }

  /* ── 일정 아이템 ── */
  .sched-item {
    padding: 11px 10px;
    font-size: 0.85rem;
    border-radius: 10px;
    gap: 6px;
  }

  .sched-item__text {
    font-size: 0.85rem;
    line-height: 1.4;
    min-width: 0; /* 중요: flex 수축이 제대로 동작하도록 */
  }

  .sched-item__deadline {
    font-size: 0.65rem;
    padding: 2px 6px;
  }

  .sched-item__handle {
    font-size: 1rem;
    padding: 0 4px 0 0;
    min-width: 28px;
    min-height: 40px;
    display: flex;
    align-items: center;
    color: var(--text-sub);
  }

  .btn-o {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
    border-radius: 8px;
  }

  /* ── 모달: 바텀시트 스타일 ── */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-box {
    width: 100%;
    max-width: 100%;
    max-height: 88vh;
    border-radius: 22px 22px 0 0;
    animation: slideUpSheet 0.28s cubic-bezier(0.34, 1.3, 0.64, 1);
  }

  @keyframes slideUpSheet {
    from { transform: translateY(100%); opacity: 0.6; }
    to   { transform: translateY(0);    opacity: 1; }
  }

  /* 바텀시트 상단 드래그 핸들 */
  .modal-box::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border-strong);
    border-radius: 999px;
    margin: 10px auto -6px;
    flex-shrink: 0;
  }

  .modal-header {
    padding: 14px 18px 12px;
  }

  .modal-body {
    padding: 16px 18px 28px; /* 홈바 여백 */
  }

  .settings-card {
    padding: 18px 16px;
    border-radius: 18px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-save-btn {
    width: 100%;
  }

  .history-list {
    padding: 10px 18px 28px;
  }
}

/* ════════════════════════════════════════
   🔍 데모 모달
════════════════════════════════════════ */
.demo-modal-box {
  max-width: 480px;
  width: 95%;
  padding: 0;
  overflow: hidden;
}
.demo-modal-box .modal-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.demo-body {
  display: flex;
  flex-direction: column;
}

/* 슬라이드 컨테이너 */
.demo-slides {
  position: relative;
  overflow: hidden;
  height: 340px;
}
.demo-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(40px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
  pointer-events: none;
}
.demo-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0s;
}
.demo-slide.exit-left {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-40px);
}

/* 데모 화면 영역 */
.demo-screen {
  width: 100%;
  background: #f8f9fb;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  min-height: 130px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.demo-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 2px;
}
.demo-logo { font-size: 0.82rem; }

/* 슬라이드1 - 입력 */
.demo-input-area {
  display: flex;
  gap: 6px;
  align-items: center;
}
.demo-input-box {
  flex: 1;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.82rem;
  min-height: 30px;
  display: flex;
  align-items: center;
}
.demo-cursor {
  animation: demo-blink 0.8s step-end infinite;
  color: var(--accent);
  font-weight: 300;
}
@keyframes demo-blink { 0%,100%{opacity:1} 50%{opacity:0} }
.demo-add-btn {
  width: 28px; height: 28px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700;
  flex-shrink: 0;
}
.demo-pool { display: flex; flex-direction: column; gap: 4px; }
.demo-task {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.78rem;
  color: var(--text-main);
}
.demo-task--appear {
  animation: demo-appear 0.4s ease 0.6s both;
}
.demo-task--delay {
  animation-delay: 1s;
}
@keyframes demo-appear {
  from { opacity:0; transform:translateY(-6px); }
  to   { opacity:1; transform:translateY(0); }
}

/* 슬라이드2 - 드래그 */
.demo-calendar-row {
  display: flex;
  gap: 6px;
}
.demo-cal-cell {
  flex: 1;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 6px;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.demo-cal-cell--target {
  border-color: var(--accent);
  background: rgba(108,99,255,0.05);
}
.demo-cal-date {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-sub);
}
.demo-dropped-task {
  font-size: 0.72rem;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  padding: 3px 6px;
  animation: demo-drop 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.4s both;
}
@keyframes demo-drop {
  from { opacity:0; transform:scale(0.7); }
  to   { opacity:1; transform:scale(1); }
}
.demo-drag-task {
  position: absolute;
  bottom: 14px; right: 16px;
  font-size: 0.72rem;
  background: white;
  border: 1.5px dashed var(--accent);
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--text-main);
  animation: demo-float 2s ease-in-out infinite;
  box-shadow: 0 4px 12px rgba(108,99,255,0.2);
}
@keyframes demo-float {
  0%,100% { transform:translateY(0) rotate(-1deg); }
  50%      { transform:translateY(-6px) rotate(1deg); }
}

/* 슬라이드3 - 완료 */
.demo-task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}
.demo-task-item--done {
  background: #f0fdf4;
  border-color: #86efac;
}
.demo-done-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: white;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-sub);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.demo-done-btn--checked {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
}
.demo-task-label { font-size: 0.8rem; flex: 1; }
.demo-task-label--done {
  text-decoration: line-through;
  color: var(--text-sub);
}
.demo-tap-hint {
  font-size: 0.65rem;
  color: var(--accent);
  white-space: nowrap;
}
.demo-tap-hint--sub { color: var(--text-sub); }

/* 슬라이드4 - 기한 */
.demo-deadline-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.demo-deadline-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
}
.demo-deadline-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}
.demo-deadline-popup {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  animation: demo-appear 0.3s ease both;
}
.demo-popup-row {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.78rem;
}
.demo-popup-select {
  background: #f1f3f5;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 600;
}
.demo-popup-time {
  background: #f1f3f5;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-family: monospace;
}
.demo-popup-confirm {
  align-self: flex-end;
  background: var(--accent);
  color: white;
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 700;
}
.demo-task-with-deadline {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
}
.demo-deadline-chip {
  margin-left: auto;
  font-size: 0.7rem;
  color: #ef4444;
  font-weight: 700;
}

/* 슬라이드5 - 기능 그리드 */
.demo-feature-grid {
  display: flex;
  gap: 8px;
}
.demo-feature-card {
  flex: 1;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  animation: demo-appear 0.4s ease both;
}
.demo-feature-card:nth-child(2) { animation-delay: 0.15s; }
.demo-feature-card:nth-child(3) { animation-delay: 0.3s; }
.demo-feature-icon { font-size: 1.4rem; }
.demo-feature-name { font-size: 0.72rem; font-weight: 700; color: var(--text-main); }
.demo-feature-desc { font-size: 0.65rem; color: var(--text-sub); line-height: 1.4; }

/* 설명 영역 */
.demo-desc {
  width: 100%;
  padding: 12px 4px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.demo-step-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.demo-desc-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}
.demo-desc-text {
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.6;
  margin: 0;
}

/* 네비게이션 */
.demo-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--border);
}
.demo-nav-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  width: 36px; height: 36px;
  font-size: 0.8rem;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex; align-items: center; justify-content: center;
}
.demo-nav-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.demo-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.demo-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.demo-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.2s ease;
}
.demo-dot--active {
  background: var(--accent);
  transform: scale(1.3);
}

/* 다시 보지 않기 */
.demo-dont-show {
  text-align: center;
  padding: 6px 0 2px;
  font-size: 0.78rem;
  color: var(--text-sub);
}
.demo-dont-show label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.demo-dont-show input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--accent);
}

/* 구글 캘린더 가이드 슬라이드 */
.demo-gcal-guide {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
  width: 100%;
}
.demo-gcal-step {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 10px;
  animation: demo-appear 0.35s ease both;
}
.demo-gcal-step:nth-child(2) { animation-delay: 0.07s; }
.demo-gcal-step:nth-child(3) { animation-delay: 0.14s; }
.demo-gcal-step:nth-child(4) { animation-delay: 0.21s; }
.demo-gcal-step:nth-child(5) { animation-delay: 0.28s; }
.demo-gcal-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 18px;
  flex-shrink: 0;
}
.demo-gcal-text {
  font-size: 0.75rem;
  color: var(--text-main);
  line-height: 1.45;
}
.demo-gcal-text strong {
  color: var(--accent);
}

/* ── 오프라인 배너 ── */
.offline-banner {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e1b4b;
  color: white;
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 9999;
  transition: bottom 0.35s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
  pointer-events: none;
}
.offline-banner--show {
  bottom: 28px;
}

/* ============================
   DARK THEME OVERRIDES
   ============================ */
[data-theme="dark"] .top-bar {
  background: rgba(15,23,42,0.92);
}
[data-theme="dark"] .modal-box,
[data-theme="dark"] .settings-card {
  background: #1e293b;
}
[data-theme="dark"] .settings-card {
  background: linear-gradient(180deg, #1e293b 0%, #172033 100%);
  border-color: rgba(148,163,184,0.1);
}
[data-theme="dark"] .settings-card--danger {
  background: linear-gradient(180deg, #2a1f2e 0%, #1e1826 100%);
}
[data-theme="dark"] .task-input-wrap input,
[data-theme="dark"] .task-pool,
[data-theme="dark"] .day-col {
  background: var(--surface);
  color: var(--text);
}
[data-theme="dark"] .pool-item,
[data-theme="dark"] .sched-item {
  background: #2d3748;
  border-color: rgba(148,163,184,0.15);
  color: var(--text);
}
[data-theme="dark"] .login-screen {
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
}
[data-theme="dark"] .login-screen__card {
  background: rgba(30,41,59,0.85);
  border-color: rgba(148,163,184,0.12);
}
[data-theme="dark"] .login-screen__title { color: #e2e8f0; }
[data-theme="dark"] .login-screen__btn {
  background: #2d3748;
  border-color: rgba(148,163,184,0.2);
  color: #e2e8f0;
}
[data-theme="dark"] .login-screen__btn:hover {
  border-color: var(--accent);
}

/* ── 스타레일 오버라이드 ── */
[data-theme="starrail"] .top-bar {
  background: rgba(14,29,53,0.96);
  border-bottom-color: rgba(137,196,255,0.18);
}
[data-theme="starrail"] .modal-box {
  background: #162a48;
  border-color: rgba(137,196,255,0.2);
}
[data-theme="starrail"] .settings-card {
  background: linear-gradient(180deg, #1b3254 0%, #152844 100%);
  border-color: rgba(137,196,255,0.16);
}
[data-theme="starrail"] .settings-card--danger {
  background: linear-gradient(180deg, #2a1a40 0%, #1e1234 100%);
}
[data-theme="starrail"] .task-input-wrap input,
[data-theme="starrail"] .task-pool,
[data-theme="starrail"] .day-col {
  background: var(--surface);
  color: var(--text);
}
[data-theme="starrail"] .pool-item,
[data-theme="starrail"] .sched-item {
  background: #1a3050;
  border-color: rgba(137,196,255,0.18);
  color: var(--text);
}
[data-theme="starrail"] .sched-item.done .sched-item__text,
[data-theme="starrail"] .sched-item.done .sched-item__handle,
[data-theme="starrail"] .sched-item.done .sched-item__gcal-badge,
[data-theme="starrail"] .sched-item.done .sched-item__deadline { opacity: 0.45; }

/* ── 스타레일 폰트 — 제목/날짜류만 Black Han Sans ── */
[data-theme="starrail"] .day-col__title,
[data-theme="starrail"] .week-label,
[data-theme="starrail"] .top-bar__title {
  font-family: 'Black Han Sans', 'Pretendard', sans-serif !important;
  letter-spacing: 0.04em;
}

[data-theme="starrail"] body {
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(137,196,255,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 85%, rgba(200,223,248,0.09) 0%, transparent 50%);
}
[data-theme="starrail"] .login-screen {
  background: linear-gradient(160deg, #0e1d35 0%, #0a1828 55%, #0d1230 100%);
}
[data-theme="starrail"] .login-screen__card {
  background: rgba(18,34,60,0.93);
  border-color: rgba(137,196,255,0.28);
  box-shadow: 0 24px 64px rgba(0,0,0,0.45), 0 0 48px rgba(137,196,255,0.1);
}
[data-theme="starrail"] .login-screen__icon {
  background: linear-gradient(135deg, #1a3358 0%, #122540 100%);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 24px rgba(137,196,255,0.22);
  border: 1.5px solid rgba(137,196,255,0.3);
}
[data-theme="starrail"] .login-screen__title {
  color: #e8f4ff;
  text-shadow: 0 0 20px rgba(137,196,255,0.35);
}
[data-theme="starrail"] .login-screen__subtitle { color: #8ab0d0; }
[data-theme="starrail"] .login-screen__btn {
  background: #1a3050;
  border-color: rgba(137,196,255,0.3);
  color: #c8dfff;
}
[data-theme="starrail"] .login-screen__btn:hover {
  border-color: #89c4ff;
  box-shadow: 0 4px 20px rgba(137,196,255,0.25);
}
[data-theme="starrail"] .login-screen__note { color: #4a6888; }
[data-theme="starrail"] .login-screen__icon { display: none; }
[data-theme="starrail"] .login-screen__title { display: none; }
[data-theme="starrail"] .dday-badge {
  background: linear-gradient(135deg, #1e4a80, #2e60a8);
  color: #89c4ff;
  border: 1px solid rgba(137,196,255,0.35);
}

/* ============================
   THEME PICKER
   ============================ */
.theme-picker {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.theme-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  outline: none;
  position: relative;
}
.theme-swatch:hover { transform: scale(1.12); }

/* 테마 스와치 툴팁 */
.theme-swatch[data-label]::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(30,27,60,0.88);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 4px 9px;
  border-radius: 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100;
}
.theme-swatch[data-label]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.theme-swatch--active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--accent);
}
.theme-swatch[data-theme="purple"]   { background: linear-gradient(135deg,#6c63ff,#a78bfa); }
.theme-swatch[data-theme="blue"]     { background: linear-gradient(135deg,#2563eb,#60a5fa); }
.theme-swatch[data-theme="green"]    { background: linear-gradient(135deg,#16a34a,#4ade80); }
.theme-swatch[data-theme="dark"]     { background: linear-gradient(135deg,#1e293b,#475569); }
.theme-swatch[data-theme="starrail"] {
  background: linear-gradient(135deg, #070e1c 0%, #1a3a6a 55%, #89c4ff 100%);
  border: 2px solid rgba(137,196,255,0.4);
}

/* ============================
   DDAY SETTING
   ============================ */
.dday-setting-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.dday-input {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.dday-input:focus { border-color: var(--accent); }
.dday-input--date { flex: 1; min-width: 140px; }

/* ── 스타레일 로고 ── */
.login-screen__starrail-logo {
  display: none;
  width: 260px;
  max-width: 80%;
  object-fit: contain;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 24px rgba(137,196,255,0.35));
  animation: starRailGlow 3s ease-in-out infinite alternate;
}
[data-theme="starrail"] .login-screen__starrail-logo {
  display: block;
}
@keyframes starRailGlow {
  from { filter: drop-shadow(0 0 16px rgba(137,196,255,0.25)); }
  to   { filter: drop-shadow(0 0 32px rgba(137,196,255,0.55)); }
}

/* ── 스타레일 일쾌 아이템 ── */
.starrail-daily {
  background: linear-gradient(90deg, #0a1628 0%, #0f2040 100%) !important;
  border-color: rgba(137,196,255,0.3) !important;
  cursor: default !important;
  opacity: 0.92;
  gap: 6px;
}
.starrail-daily:hover {
  border-color: rgba(137,196,255,0.55) !important;
  box-shadow: 0 0 12px rgba(137,196,255,0.15);
}
.starrail-daily__icon {
  color: #89c4ff;
  font-size: 0.85rem;
  flex-shrink: 0;
  animation: starRailGlow 2s ease-in-out infinite alternate;
}
.starrail-daily .sched-item__text {
  color: #c8dfff;
  font-weight: 600;
  flex: 1;
}
.starrail-daily__badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #89c4ff;
  background: rgba(137,196,255,0.1);
  border: 1px solid rgba(137,196,255,0.25);
  border-radius: 6px;
  padding: 2px 6px;
  flex-shrink: 0;
}

/* ── 스타레일 암호 다이얼로그 ── */
.sr-pw-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: srFadeIn 0.2s ease;
}
@keyframes srFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.sr-pw-box {
  background: #0c1628;
  border: 1.5px solid rgba(137,196,255,0.25);
  border-radius: 24px;
  padding: 36px 32px 28px;
  width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 40px rgba(137,196,255,0.1);
  animation: srSlideUp 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes srSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.sr-pw-logo {
  font-size: 2rem;
  color: #89c4ff;
  animation: starRailGlow 2s ease-in-out infinite alternate;
}
.sr-pw-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #c8dfff;
  margin: 0;
}
.sr-pw-desc {
  font-size: 0.85rem;
  color: #7a9cbd;
  margin: 0;
}
.sr-pw-input {
  width: 100%;
  padding: 10px 14px;
  background: #07101e;
  border: 1.5px solid rgba(137,196,255,0.2);
  border-radius: 12px;
  color: #c8dfff;
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.2em;
  outline: none;
  transition: border-color 0.15s;
  font-family: var(--font);
}
.sr-pw-input:focus { border-color: #89c4ff; }
.sr-pw-btns {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}
.sr-pw-cancel, .sr-pw-confirm {
  flex: 1;
  padding: 9px 0;
  border-radius: 12px;
  border: none;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  font-family: var(--font);
}
.sr-pw-cancel {
  background: rgba(137,196,255,0.08);
  color: #7a9cbd;
  border: 1.5px solid rgba(137,196,255,0.15);
}
.sr-pw-confirm {
  background: linear-gradient(135deg, #1a3a6a, #2a5090);
  color: #89c4ff;
  border: 1.5px solid rgba(137,196,255,0.3);
}
.sr-pw-confirm:hover { opacity: 0.85; }
.sr-pw-error {
  font-size: 0.8rem;
  color: #f87171;
  margin: 0;
}
@keyframes srShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.sr-pw-shake { animation: srShake 0.4s ease; }

/* 열차 데코레이션 제거됨 */
.starrail-bottom-train { display: none !important; }

.theme-swatch--locked {
  font-size: 0.9rem;
  line-height: 36px;
}

