.section-select {
  min-height: 100dvh;
  max-width: var(--app-max-width);
  margin: 0 auto;
  padding: 0 0 32px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Top Bar — uses shared .page-top-bar, .page-back-btn, .page-title-badge */
.ss-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top, 14px));
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  width: 100%;
}

.ss-back-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.ss-back-btn:active { transform: scale(0.92); }

/* ── Star Counter (tappable for ad reward) ──────────── */
.ss-star-counter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.ss-star-counter:hover {
  background: rgba(251,191,36,0.18);
  border-color: rgba(251,191,36,0.35);
  transform: scale(1.03);
}
.ss-star-counter:active {
  transform: scale(0.96);
}
.ss-star-counter.loading {
  pointer-events: none;
  opacity: 0.7;
}
.ss-star-counter.pulse {
  animation: starCounterPulse 0.6s ease;
}
@keyframes starCounterPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(251,191,36,0.4); }
  50% { transform: scale(1.1); box-shadow: 0 0 20px 4px rgba(251,191,36,0.3); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(251,191,36,0); }
}

.ss-star-icon { font-size: 16px; }
.ss-star-count {
  font-size: 16px;
  font-weight: 700;
  color: #FBBF24;
  font-family: 'Outfit', sans-serif;
}
.ss-star-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(251,191,36,0.25);
  color: #FBBF24;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  margin-left: 2px;
  transition: all 0.2s;
}
.ss-star-counter:hover .ss-star-plus {
  background: rgba(251,191,36,0.4);
  transform: rotate(90deg);
}

/* ── Header ──────────────────────────────────────────── */
.ss-header {
  text-align: center;
  margin-bottom: 20px;
  padding: 0 16px;
  animation: fadeIn 0.4s ease;
}
.ss-title {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}
.ss-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
}

/* ── No-animation mode (back navigation) ─────────────── */
/* Suppress card slide-in animations, show cards instantly */
.ss-no-anim .ss-card,
.ss-no-anim .ss-card.locked.star-unlockable {
  animation: none !important;
}

/* ── Cards Container ─────────────────────────────────── */
.ss-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px;
}



/* ── Section Card ────────────────────────────────────── */
.ss-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: slideUp 0.4s ease both;
  animation-delay: var(--anim-delay);
  -webkit-tap-highlight-color: transparent;
  border: 1px solid rgba(255,255,255,0.08);
}
.ss-card:active { transform: scale(0.98); }

.ss-card.unlocked { border-color: rgba(255,255,255,0.12); }
.ss-card.locked {
  opacity: 0.55;
  filter: saturate(0.4);
  cursor: default;
}
/* Star-unlockable cards get special treatment — more visible */
.ss-card.locked.star-unlockable {
  opacity: 0.85;
  filter: saturate(0.7);
  border-color: rgba(251,191,36,0.25);
  animation: slideUp 0.4s ease both, starUnlockPulse 3s ease-in-out infinite;
  animation-delay: var(--anim-delay), 0s;
}
@keyframes starUnlockPulse {
  0%, 100% { border-color: rgba(251,191,36,0.2); box-shadow: none; }
  50% { border-color: rgba(251,191,36,0.4); box-shadow: 0 0 16px rgba(251,191,36,0.1); }
}

/* Card layers */
.ss-card-glow {
  position: absolute;
  inset: 0;
  background: var(--section-gradient);
  opacity: 0.7;
  z-index: 0;
}
.ss-card-bg { position: absolute; inset: 0; z-index: 0; }
.ss-card-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, var(--section-glow) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.03) 0%, transparent 40%);
}

/* Card content (horizontal) */
.ss-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 16px 14px;
  gap: 12px;
}

/* Emoji ring */
.ss-card-left { flex-shrink: 0; }
.ss-card-icon-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ss-progress-ring { position: absolute; top: -6px; left: -6px; }
.ss-ring-progress { transition: stroke-dashoffset 0.8s ease; }
.ss-card-emoji {
  font-size: 28px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.ss-crown {
  position: absolute;
  top: -8px;
  right: -4px;
  font-size: 14px;
  animation: crownBounce 2s ease infinite;
}
@keyframes crownBounce {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-2px) rotate(5deg); }
}

/* Info */
.ss-card-info { flex: 1; min-width: 0; }
.ss-card-name {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ss-card-tagline {
  font-size: 11px;
  color: var(--text-secondary);
  margin: 2px 0 8px;
  font-style: italic;
  line-height: 1.3;
}

/* Stats pills */
.ss-card-stats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.ss-stat-pill {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}
.ss-stat-icon { font-size: 10px; }
.ss-complete-badge { font-size: 14px; }

/* Lock info */
.ss-card-lock-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ss-lock-cost {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
}
.ss-lock-cost.star-ready {
  color: #FBBF24;
  font-weight: 700;
}
.ss-lock-star-cost {
  font-size: 10px;
  color: rgba(251,191,36,0.6);
  font-family: 'Outfit', sans-serif;
}
.ss-lock-remaining {
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
}

/* Right actions */
.ss-card-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ss-card-play {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(
    145deg,
    var(--section-accent, #6366f1),
    color-mix(in srgb, var(--section-accent, #6366f1) 55%, #000)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  color: #fff;
  box-shadow:
    0 4px 18px color-mix(in srgb, var(--section-glow, rgba(99,102,241,0.5)) 80%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.15s ease;
}
.ss-card-play::before,
.ss-card-play::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--section-accent, #6366f1) 65%, transparent);
  animation: ssPlayRing 2.2s ease-out infinite;
  pointer-events: none;
}
.ss-card-play::after {
  inset: -11px;
  border-width: 1.5px;
  animation-delay: 0.6s;
}
@keyframes ssPlayRing {
  0%   { transform: scale(0.78); opacity: 0.75; }
  100% { transform: scale(1.55); opacity: 0;    }
}
.ss-card.unlocked:active .ss-card-play {
  transform: scale(0.88);
}
.ss-lock-icon-right { color: rgba(255,255,255,0.2); }

/* ── Unlock Button ───────────────────────────────────── */
.ss-unlock-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(251,191,36,0.35);
  background: linear-gradient(135deg, rgba(251,191,36,0.2), rgba(245,158,11,0.25));
  color: #FBBF24;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.ss-unlock-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(251,191,36,0.15), transparent);
  transform: translateX(-100%);
  animation: shimmerUnlock 2s ease-in-out infinite;
}
@keyframes shimmerUnlock {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.ss-unlock-btn:hover {
  background: linear-gradient(135deg, rgba(251,191,36,0.3), rgba(245,158,11,0.35));
  border-color: rgba(251,191,36,0.5);
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(251,191,36,0.2);
}
.ss-unlock-btn:active {
  transform: scale(0.95);
}
.ss-unlock-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.ss-unlock-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(251,191,36,0.3);
  border-top-color: #FBBF24;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Toast ───────────────────────────────────────────── */
.ss-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(16,185,129,0.95), rgba(5,150,105,0.95));
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.4),
    0 0 24px rgba(16,185,129,0.3);
  z-index: 100;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  white-space: nowrap;
  text-align: center;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
}
.ss-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ss-toast-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── DAILY CHALLENGE TILE ───────────────────────────────────── */
/* ── Daily Challenge Wrapper ─────────────────────────── */
.ss-dc-wrapper {
  margin-bottom: 12px;
}

/* ── Daily Challenge Tile ────────────────────────────── */
.ss-dc-tile {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border: 1.5px solid rgba(251,191,36,0.32);
  background: linear-gradient(140deg,
    rgba(251,191,36,0.09) 0%,
    rgba(249,115,22,0.07) 55%,
    rgba(239,68,68,0.05) 100%
  );
  display: flex;
  flex-direction: column;
  padding: 16px 16px 14px;
  gap: 10px;
  animation: slideUp 0.35s ease both, dcTilePulse 3.5s ease-in-out infinite;
  transition: transform 0.15s ease;
}
.ss-dc-tile:active { transform: scale(0.97); }

@keyframes dcTilePulse {
  0%,100% { border-color: rgba(251,191,36,0.28); box-shadow: none; }
  50%      { border-color: rgba(251,191,36,0.58); box-shadow: 0 0 28px rgba(251,191,36,0.14); }
}

/* Completed state */
.ss-dc-tile.dc-tile-done {
  border-color: rgba(16,185,129,0.35);
  background: linear-gradient(140deg,
    rgba(16,185,129,0.08) 0%,
    rgba(5,150,105,0.05) 100%
  );
  animation: slideUp 0.35s ease both;
}

/* Radial glow blob */
.ss-dc-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 90% 20%,
    rgba(251,191,36,0.18) 0%, transparent 60%);
  pointer-events: none;
}
.ss-dc-tile.dc-tile-done .ss-dc-glow {
  background: radial-gradient(ellipse at 90% 20%,
    rgba(16,185,129,0.15) 0%, transparent 60%);
}

/* Shimmer sweep */
.ss-dc-shimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.ss-dc-shimmer::after {
  content: '';
  position: absolute;
  top: -40%; left: -60%;
  width: 35%; height: 180%;
  background: linear-gradient(105deg,
    transparent,
    rgba(255,255,255,0.04) 44%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 56%,
    transparent
  );
  animation: dcShimmer 4.5s ease-in-out infinite;
}
@keyframes dcShimmer {
  0%   { transform: translateX(0);    opacity: 0; }
  8%   { opacity: 1; }
  60%  { transform: translateX(500%); opacity: 1; }
  68%  { opacity: 0; }
  100% { transform: translateX(500%); opacity: 0; }
}

/* ── Top row: badge + count ──────────────────────────── */
.ss-dc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.ss-dc-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #FBBF24;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.22);
  border-radius: 6px;
  padding: 3px 8px;
  display: flex;
  align-items: center;
}
.ss-dc-tile.dc-tile-done .ss-dc-badge {
  color: #34D399;
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.22);
}
.ss-dc-count {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #FBBF24;
}
.ss-dc-tile.dc-tile-done .ss-dc-count { color: #34D399; }

/* ── Body: emoji + info ──────────────────────────────── */
.ss-dc-body {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}
.ss-dc-emoji-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ss-dc-tile.dc-tile-done .ss-dc-emoji-wrap {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.18);
}
.ss-dc-emoji {
  font-size: 28px;
  line-height: 1;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(251,191,36,0.45));
}
.ss-dc-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ss-dc-label {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: rgba(205,215,235,0.88);
  line-height: 1.1;
}
.ss-dc-sub {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  color: rgba(140,158,185,0.6);
  line-height: 1.3;
}

/* ── Bottom: pips + play button ─────────────────────── */
.ss-dc-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

/* Pip progress */
.ss-dc-pips {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ss-dc-pip {
  width: 16px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s ease;
  flex-shrink: 0;
}
.ss-dc-pip.done {
  background: #FBBF24;
  border-color: #FBBF24;
  box-shadow: 0 0 6px rgba(251,191,36,0.55);
}
.ss-dc-tile.dc-tile-done .ss-dc-pip.done {
  background: #34D399;
  border-color: #34D399;
  box-shadow: 0 0 6px rgba(52,211,153,0.55);
}
.ss-dc-pip.active {
  background: rgba(251,191,36,0.38);
  border-color: #FBBF24;
  animation: dcPipPulse 1.5s ease-in-out infinite;
}
@keyframes dcPipPulse {
  0%,100% { opacity: 0.6; }
  50%      { opacity: 1; box-shadow: 0 0 8px rgba(251,191,36,0.65); }
}

/* Play button — same shape as level card */
.ss-dc-play {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(145deg, #FBBF24, #F59E0B);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  color: #1a1000;
  box-shadow:
    0 4px 18px rgba(251,191,36,0.45),
    inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform 0.15s ease;
}
.ss-dc-play::before,
.ss-dc-play::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(251,191,36,0.55);
  animation: dcPlayRing 2.2s ease-out infinite;
  pointer-events: none;
}
.ss-dc-play::after {
  inset: -11px;
  border-width: 1.5px;
  animation-delay: 0.6s;
}
@keyframes dcPlayRing {
  0%   { transform: scale(0.78); opacity: 0.75; }
  100% { transform: scale(1.55); opacity: 0;    }
}
.ss-dc-tile:active .ss-dc-play { transform: scale(0.88); }

/* Done checkmark button */
.ss-dc-done-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(16,185,129,0.15);
  border: 1.5px solid rgba(16,185,129,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #34D399;
}

/* ─── RESPONSIVE — Tablet (600px – 1023px) ──────────────── */
@media (min-width: 600px) and (max-width: 1023px) {
  .section-select { max-width: none; }
  .ss-top-bar { padding: 14px clamp(20px, 4vw, 40px); }
  .ss-header { padding: 0 clamp(20px, 4vw, 40px); }
  .ss-cards { padding: 0 clamp(20px, 4vw, 40px); }
}
