/* ===== БАЗОВЫЕ СТИЛИ ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink-light: #ffe4ec;
  --pink:       #f06292;
  --pink-dark:  #c2185b;
  --rose:       #e91e63;
  --gold:       #ff8f00;
  --text:       #4a1942;
  --white:      #fff;
  --shadow:     0 8px 32px rgba(192, 24, 91, 0.18);
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: 'Montserrat', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #fce4ec 0%, #f8bbd0 30%, #f48fb1 60%, #f06292 100%);
  color: var(--text);
}

/* ===== СТРАНИЦЫ ===== */
.page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateX(30px);
  overflow: hidden;
}

.page.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
  z-index: 1;
}

.page.exit-left {
  opacity: 0;
  transform: translateX(-40px);
}

canvas {
  /* fixed — оба canvas покрывают весь экран независимо от скролла */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Игровое колесо — НЕ растягивать на весь экран */
#wheel-canvas {
  position: relative;
  top: auto;
  left: auto;
  width: auto;
  height: auto;
  display: block;
  flex-shrink: 0;
}

/* ===== ЭКРАН ПРИВЕТСТВИЯ ===== */
.welcome-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.flowers-icon {
  font-size: 3rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

.welcome-title {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(192, 24, 91, 0.4);
  letter-spacing: 1px;
}

.personal-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  text-shadow: 0 1px 8px rgba(0,0,0,.2);
  min-height: 2rem;
}

.personal-text {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,0.35);
}

/* ===== КНОПКИ ===== */
.btn-primary {
  margin-top: 8px;
  padding: 15px 32px;
  background: linear-gradient(135deg, #e91e63, #c2185b);
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(194, 24, 91, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.3px;
}
.btn-primary:active { transform: scale(0.96); box-shadow: 0 2px 8px rgba(194, 24, 91, 0.4); }

/* ===== ГАЛЕРЕЯ ===== */
#page-gallery {
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 24px;
}

.gallery-header {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px 16px 12px;
  flex-shrink: 0;
}

.gallery-header h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0,0,0,.2);
}

.gallery-subtitle {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  margin-top: 4px;
}

.girls-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 8px 12px 32px;
  width: 100%;
  max-width: 600px;
}

/* Преподаватель — одна на всю ширину */
.girl-card--featured {
  grid-column: 1 / -1;
}

.girl-card--featured .girl-photo-wrapper {
  aspect-ratio: 4 / 3;
}

/* ===== КАРТОЧКА ДЕВОЧКИ ===== */
.girl-card {
  background: rgba(255,255,255,0.92);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255,255,255,0.6);
}

.girl-card:active { transform: scale(0.95); box-shadow: 0 2px 8px rgba(192, 24, 91, .2); }

.girl-photo-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #f8bbd0, #f48fb1);
}

.girl-photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.girl-card:hover .girl-photo-wrapper img { transform: scale(1.05); }

/* Аватар-заглушка (если нет фото) */
.girl-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
  text-shadow: 0 2px 6px rgba(0,0,0,.15);
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
}

.girl-card-name {
  padding: 7px 6px;
  font-size: clamp(0.78rem, 3vw, 0.92rem);
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  /* pointer-events управляем отдельно, без opacity на родителе */
}

.modal.hidden {
  pointer-events: none;
}
.modal.hidden .modal-overlay {
  opacity: 0;
}
.modal.hidden .modal-content {
  transform: translateY(60px);
  opacity: 0;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(74, 25, 66, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 1;
  transition: opacity 0.5s ease;
}

.modal-content {
  position: relative;
  z-index: 1;
  background: linear-gradient(160deg, #fff0f5, #fff);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding-bottom: 32px;
  box-shadow: 0 -12px 40px rgba(192, 24, 91, 0.25);
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s ease;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(240, 98, 146, 0.15);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  color: var(--pink-dark);
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(240, 98, 146, 0.3); }

/* ===== СЛАЙДЕР ===== */
.slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.35s ease;
}

.slide-img {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.slide-placeholder {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  background: linear-gradient(135deg, #fce4ec, #f48fb1);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  color: var(--pink-dark);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
.slider-btn.hidden { opacity: 0; pointer-events: none; }
.slider-prev { left: 10px; }
.slider-next { right: 10px; }

.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  transition: background 0.2s, transform 0.2s;
}
.dot.active { background: var(--white); transform: scale(1.3); }

/* ===== ИНФО В МОДАЛКЕ ===== */
.modal-info {
  padding: 18px 24px 8px;
}

.modal-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--pink-dark);
  margin-bottom: 10px;
}

.modal-greeting {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  background: linear-gradient(135deg, #fff0f5, #fce4ec);
  border-radius: 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--pink);
}

/* ===== АНИМАЦИЯ ПОЯВЛЕНИЯ КАРТОЧЕК ===== */
.girl-card {
  animation: pop-in 0.4s ease both;
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.85) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================================
   ЭКРАН КОЛЕСА ФОРТУНЫ
   ============================================================ */
.wheel-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 16px;
  width: 100%;
  max-width: 460px;
  text-align: center;
}

/* Шапка с заголовком */
.wheel-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.wheel-flowers {
  font-size: 1.6rem;
  animation: float 3s ease-in-out infinite;
}

.wheel-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--white);
  text-shadow: 0 2px 14px rgba(192, 24, 91, 0.5);
  letter-spacing: 1px;
}

.wheel-subtitle {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border-radius: 50px;
  padding: 6px 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Обёртка колеса */
.wheel-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Указатель (стрелка сверху) */
.wheel-pointer {
  font-size: 1.8rem;
  line-height: 1;
  color: #fff;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(255, 215, 0, 0.7);
  z-index: 3;
  margin-bottom: -2px;
  animation: pointerFloat 1.2s ease-in-out infinite;
  transition: text-shadow 0.1s;
  user-select: none;
}

@keyframes pointerFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(5px) scale(1.1); }
}

/* Во время кручения — держим указатель внизу без плавания */
.wheel-pointer.pointer-active {
  animation: none;
  transform: translateY(5px);
}

/* Тик — мгновенная вспышка при пересечении сегмента */
.wheel-pointer.pointer-tick {
  animation: pointerTick 0.12s ease-out forwards;
  text-shadow:
    0 0 18px rgba(255, 215, 0, 1),
    0 0 40px rgba(255, 215, 0, 0.8);
}

@keyframes pointerTick {
  0%   { transform: translateY(5px) scale(1.3); }
  100% { transform: translateY(5px) scale(1); }
}

/* Победа! */
.wheel-pointer.pointer-win {
  animation: pointerWin 0.4s ease-in-out infinite;
  color: #ffd700;
  text-shadow:
    0 0 10px rgba(255, 215, 0, 1),
    0 0 30px rgba(255, 100, 0, 0.8);
}

@keyframes pointerWin {
  0%, 100% { transform: scale(1) translateY(5px); }
  50%       { transform: scale(1.4) translateY(5px); }
}

/* Canvas колеса */
#wheel-canvas {
  border-radius: 50%;
  display: block;
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.7),
    0 0 0 7px rgba(255, 190, 200, 0.5),
    0 12px 50px rgba(194, 24, 91, 0.55);
  animation: wheelGlow 2.5s ease-in-out infinite;
}

@keyframes wheelGlow {
  0%, 100% {
    box-shadow:
      0 0 0 5px rgba(255, 255, 255, 0.7),
      0 0 0 7px rgba(255, 190, 200, 0.5),
      0 12px 50px rgba(194, 24, 91, 0.55);
  }
  50% {
    box-shadow:
      0 0 0 5px rgba(255, 255, 255, 0.9),
      0 0 0 9px rgba(255, 150, 180, 0.6),
      0 16px 64px rgba(233, 30, 99, 0.75);
  }
}

/* Кнопка «Покрутить» */
.btn-spin {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 40px;
  background: rgba(255, 255, 255, 0.22);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(194, 24, 91, 0.25);
  letter-spacing: 0.5px;
  animation: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn-spin:hover {
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 6px 24px rgba(194, 24, 91, 0.35);
}
.btn-spin:active {
  transform: scale(0.96);
}

.btn-spin.spinning {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.3);
  animation: none;
  opacity: 0.8;
}

/* Победная вспышка */
.win-flash {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: radial-gradient(circle at 50% 55%,
    rgba(255, 215, 0, 0.55) 0%,
    rgba(233, 30, 99, 0.25) 45%,
    transparent 70%);
  animation: winFlashAnim 0.9s ease-out forwards;
}

.win-flash.hidden {
  display: none;
}

@keyframes winFlashAnim {
  0%   { opacity: 0; transform: scale(0.6); }
  30%  { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* Конфетти-частицы */
.confetti-piece {
  position: absolute;
  z-index: 11;
  pointer-events: none;
  animation: confettiFly 1.4s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

@keyframes confettiFly {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(720deg) scale(0.3); }
}

/* ============================================================
   КНОПКА «НЕ НУЖНАЯ ИНФА» В ГАЛЕРЕЕ
   ============================================================ */
.btn-about {
  display: inline-block;
  margin: 12px auto 28px;
  padding: 8px 22px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 50px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.3px;
}
.btn-about:active { transform: scale(0.96); }

/* ============================================================
   ЭКРАН 3: О ПРОЕКТЕ
   ============================================================ */
#page-about {
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 40px;
}

.about-header {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 10px;
  flex-shrink: 0;
  width: 100%;
}

.about-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
  line-height: 1.3;
  padding: 0 8px;
}

.btn-back {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 50px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s, transform 0.15s;
}
.btn-back:active { transform: scale(0.96); }

.about-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 600px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Кредиты ── */
.credits-block {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  padding: 22px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}

.credits-line {
  font-size: 1rem;
  color: var(--text);
  letter-spacing: 0.3px;
}

.credits-line span {
  color: var(--pink-dark);
  font-style: italic;
}

.credits-line strong {
  color: var(--pink-dark);
  font-weight: 700;
  font-style: italic;
  font-size: 1.05rem;
}

/* ── Текстовый блок ── */
.about-text-block {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 18px 20px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  border-left: 4px solid var(--pink);
  box-shadow: var(--shadow);
}

.about-text-placeholder {
  color: #ccc;
  font-style: italic;
  text-align: center;
  padding: 4px 0;
}

.about-info-row {
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.6;
}

.about-info-note {
  font-size: 0.83rem;
  color: #a0527a;
  background: rgba(233, 30, 99, 0.06);
  border-radius: 10px;
  padding: 8px 12px;
  line-height: 1.55;
}

.about-divider {
  border: none;
  border-top: 1.5px solid rgba(240, 98, 146, 0.15);
  margin: 2px 0;
}

.about-link {
  color: var(--pink-dark);
  font-weight: 700;
  text-decoration: none;
  word-break: break-all;
}
.about-link:hover { text-decoration: underline; }

/* Декоративные фото между блоками */
.about-deco-img {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  display: block;
  box-shadow: var(--shadow);
  max-height: 260px;
}

/* ── Секция скачивания ── */
.download-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.download-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.download-hint {
  display: none;
}

.download-grid {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow);
  border: 1.5px solid rgba(255,255,255,0.6);
}

/* Заголовок */
.dl-table-header {
  display: grid;
  grid-template-columns: 44px 1fr 52px;
  align-items: center;
  padding: 8px 12px;
  background: rgba(240, 98, 146, 0.1);
  border-bottom: 1.5px solid rgba(240, 98, 146, 0.18);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--pink-dark);
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Строка */
.dl-table-row {
  display: grid;
  grid-template-columns: 44px 1fr 52px;
  align-items: center;
  padding: 7px 12px;
  gap: 10px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(240, 98, 146, 0.1);
}
.dl-table-row:last-child { border-bottom: none; }
.dl-table-row:active { background: rgba(240, 98, 146, 0.08); }
.dl-table-row.selected { background: rgba(233, 30, 99, 0.07); }

/* Миниатюра */
.dl-col-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f8bbd0, #f48fb1);
}
.dl-col-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Имя */
.dl-col-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Чекбокс */
.dl-col-check {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.dl-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid rgba(233, 30, 99, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.dl-table-row.selected .dl-checkbox {
  background: var(--rose);
  border-color: var(--rose);
  color: var(--white);
}

/* Кнопка «все» */
.dl-select-all {
  background: rgba(233, 30, 99, 0.1);
  border: 1.5px solid rgba(233, 30, 99, 0.3);
  color: var(--pink-dark);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.dl-select-all:active { background: rgba(233, 30, 99, 0.2); }

.download-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  transition: transform 0.2s, outline 0.15s;
  user-select: none;
}
.download-item:active { transform: scale(0.95); }

.download-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.download-item-name {
  padding: 6px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
}

.check-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: transparent;
  transition: background 0.2s, color 0.2s;
}

.download-item.selected {
  outline: 3px solid var(--rose);
  outline-offset: -1px;
}
.download-item.selected .check-overlay {
  background: var(--rose);
  color: var(--white);
}

.download-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 28px 16px;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  border: 2px dashed rgba(255, 255, 255, 0.35);
}

.btn-download {
  margin-top: 4px;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.15s;
}
.btn-download:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
