/* =========================================================
   Profile results page
   ========================================================= */
.profile-wrap { max-width: 1100px; }

.mini-search {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 28px;
  max-width: 520px;
}
.mini-search .at { color: var(--ink-3); font-family: var(--font-mono); }
.mini-search input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none;
  color: var(--ink-1); font-size: 15px; font-family: var(--font-display);
}
.mini-search .btn { padding: 8px 16px; font-size: 14px; }

/* Profile header */
.profile-head {
  display: flex; align-items: center; gap: 22px;
  padding: 4px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.profile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #D97757 100%);
  display: flex; align-items: center; justify-content: center;
  color: #2A1C00; font-weight: 700; font-size: 36px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--accent), 0 8px 24px rgba(0,0,0,.35);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Profile picture actions — two symmetrical buttons (view + download) */
.profile-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.profile-actions .dp-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 0;
  min-width: 160px;
  padding: 11px 18px;
}
.profile-actions .dp-action svg { flex-shrink: 0; }

/* Profile picture lightbox — in-page overlay */
.dp-modal {
  position: fixed; inset: 0;
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.8);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.dp-modal[hidden] { display: none; }
.dp-modal-card {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  animation: dpPop .18s ease;
}
@keyframes dpPop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dp-modal-card img {
  width: auto; height: auto;
  max-width: min(88vw, 420px);
  max-height: 70vh;
  border-radius: 16px;
  box-shadow: 0 0 0 3px var(--accent), 0 20px 50px rgba(0,0,0,.5);
  object-fit: contain;
  background: var(--surface);
}
.dp-modal-dl { padding: 12px 26px; }
.dp-modal-close {
  position: absolute;
  top: 18px; right: 20px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .14s ease;
}
.dp-modal-close:hover { background: rgba(255,255,255,.25); }
.profile-meta { min-width: 0; flex: 1; }
.profile-name {
  font-family: var(--font-display);
  font-size: 32px; line-height: 1.1;
  margin: 0 0 4px;
  color: var(--ink-1);
}
.profile-handle { font-family: var(--font-mono); color: var(--ink-3); font-size: 14px; }
.profile-stats {
  margin-top: 10px;
  display: flex; flex-wrap: wrap; gap: 18px;
  font-size: 14px; color: var(--ink-2);
}
.profile-stats b { color: var(--ink-1); font-weight: 600; }
.profile-bio {
  margin: 12px 0 0;
  color: var(--ink-2); font-size: 14.5px;
  max-width: 60ch;
}

/* Clean tabs */
.tabs-clean {
  display: flex; gap: 32px;
  border-bottom: 1px solid var(--line);
  margin: 24px 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs-clean::-webkit-scrollbar { display: none; }
.tabs-clean .tab-btn {
  flex: 0 0 auto;
  background: transparent; border: 0;
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 16px; font-weight: 500;
  padding: 14px 0;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  display: flex; align-items: center; gap: 8px;
}
.tabs-clean .tab-btn:hover { color: var(--ink-1); }
.tabs-clean .tab-btn.is-active { color: var(--ink-1); }
.tabs-clean .tab-btn.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--accent);
  border-radius: 2px;
}
.tabs-clean .tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tabs-clean .tab-btn.is-active .tab-count {
  color: var(--accent-hover);
  border-color: var(--accent);
}

.tab-content { min-height: 400px; }

/* Vertical 9:16 grid for stories + spotlight */
.grid-snap {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
@media (max-width: 1024px) { .grid-snap { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px)  { .grid-snap { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media (max-width: 420px)  { .grid-snap { grid-template-columns: repeat(2, 1fr); } }

/* Highlight collection tiles */
.grid-highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1024px) { .grid-highlights { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .grid-highlights { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.highlight-tile {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: block; padding: 0;
  width: 100%;
}
.highlight-tile:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.highlight-tile-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}
.highlight-tile-bg.is-empty {
  background: linear-gradient(135deg, #1d1a14 0%, #2a241a 100%);
}
.highlight-tile-shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.85) 100%);
}
.highlight-tile-foot {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  color: #fff; text-align: left;
}
.highlight-tile-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: 16px; line-height: 1.25;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.highlight-tile-count { font-family: var(--font-mono); font-size: 11px; opacity: .85; }
.highlight-back-btn {
  margin: 0 0 16px;
  background: transparent; border: 0;
  color: var(--ink-3); font-size: 14px;
  cursor: pointer; padding: 8px 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.highlight-back-btn:hover { color: var(--ink-1); }
.highlight-title-bar {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 14px;
}
.highlight-title-bar h3 {
  font-family: var(--font-display); font-size: 22px; margin: 0;
}
.highlight-title-bar .count { color: var(--ink-3); font-size: 13px; font-family: var(--font-mono); }

/* Snap card hover play + dedicated download button */
.card-play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0; transition: opacity .18s ease;
  z-index: 1;
}
.card:hover .card-play-overlay { opacity: 1; }
.card-play-overlay svg {
  width: 56px; height: 56px;
  fill: rgba(255,255,255,.95);
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.6));
}
.card-dl-btn {
  position: absolute; right: 10px; bottom: 10px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: #1a1207; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  z-index: 3;
  transition: transform .15s ease, background .15s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
  opacity: 0;
  transform: translateY(6px);
}
.card:hover .card-dl-btn,
.card:focus-within .card-dl-btn {
  opacity: 1;
  transform: translateY(0);
}
.card-dl-btn:hover { background: var(--accent); transform: scale(1.05); }
.card-dl-btn svg { display: block; }
@media (hover: none) {
  /* Touch devices: keep download visible always */
  .card-dl-btn { opacity: 1; transform: none; }
}

/* Load more */
.load-more-row { display: flex; justify-content: center; margin: 28px 0 8px; }
.load-more-row .btn { min-width: 180px; }

/* Player modal */
.player-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.player-modal[hidden] { display: none; }
/* Player frame wraps the stage + the Download button so they look like one unit */
.player-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  max-height: 88vh;
}
.player-stage {
  max-width: 100%;
  max-height: 72vh;
  aspect-ratio: 9 / 16;
  display: flex; align-items: center; justify-content: center;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}
/* Download button anchored directly under the video — close at hand */
.player-download {
  height: 48px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(196, 154, 62, 0.35);
}
.player-download:hover { transform: translateY(-1px); }
.player-stage img,
.player-stage video {
  max-width: 100%; max-height: 100%;
  width: auto; height: 100%;
  object-fit: contain;
  background: #000;
}
.player-close, .player-nav {
  position: absolute;
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  width: 44px; height: 44px; border-radius: 50%;
  font-size: 24px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.player-close:hover, .player-nav:hover { background: rgba(255,255,255,.18); }
.player-close { top: 20px; right: 20px; font-size: 28px; }
.player-nav { top: 50%; transform: translateY(-50%); }
.player-prev { left: 20px; }
.player-next { right: 20px; }
/* legacy .player-actions kept as a no-op for back-compat */
.player-actions { display: none; }

@media (max-width: 640px) {
  .profile-wrap { padding-top: 20px !important; padding-bottom: 32px !important; }
  .mini-search { margin-bottom: 18px; padding: 8px 12px; }
  .mini-search input { font-size: 14px; }
  .mini-search .btn { padding: 7px 14px; font-size: 13px; }
  .profile-head {
    flex-direction: column; align-items: center;
    text-align: center;
    gap: 14px;
    padding: 4px 0 18px;
  }
  .profile-avatar { width: 84px; height: 84px; font-size: 32px; }
  .profile-actions { justify-content: center; margin-top: 14px; }
  .profile-name { font-size: 22px; }
  .profile-handle { font-size: 13px; }
  .profile-stats { justify-content: center; gap: 14px; font-size: 13px; }
  .profile-bio { text-align: center; font-size: 14px; }
  .tabs-clean { gap: 18px; margin: 14px -16px 16px; padding: 0 16px; }
  .tabs-clean .tab-btn { font-size: 14px; padding: 10px 0; gap: 6px; }
  .tabs-clean .tab-count { min-width: 20px; height: 20px; font-size: 10px; padding: 0 6px; }
  .grid-snap { gap: 8px; }
  .card-badge { top: 8px; left: 8px; font-size: 10px; padding: 4px 7px; }
  .card-age { top: 8px; right: 8px; font-size: 9px; padding: 4px 6px; }
  .card-dl-btn { width: 32px; height: 32px; right: 8px; bottom: 8px; }
  .highlight-tile-foot { left: 10px; right: 10px; bottom: 8px; }
  .highlight-tile-title { font-size: 14px; }
  .player-modal { padding: 0 0 12px; }
  .player-frame { width: 100%; max-height: 100dvh; gap: 8px; padding: 0 12px; }
  .player-stage { max-height: calc(100dvh - 80px); aspect-ratio: 9 / 16; border-radius: 0; }
  .player-download { height: 44px; padding: 0 20px; font-size: 14px; }
  .player-close { top: 12px; right: 12px; }
  .player-nav { width: 40px; height: 40px; font-size: 22px; }
  .player-prev { left: 8px; }
  .player-next { right: 8px; }
}

.profile-empty {
  margin: 40px auto;
  max-width: 480px;
  text-align: center;
}
/* Mode banner (view / download) */
.mode-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin: 12px 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 14px;
  color: var(--ink-2);
}
.mode-bar strong { color: var(--ink-1); font-weight: 600; }
.mode-bar-text { line-height: 1.5; }
.mode-bar-switch {
  color: var(--accent-hover);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.mode-bar-switch:hover { text-decoration: underline; }
.mode-bar-view { background: transparent; }

@media (max-width: 640px) {
  .mode-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 12px 14px;
  }
  .mode-bar .btn { width: 100%; }
}

/* Download-mode cards: download button always visible, no play overlay default */
.card.card-dl-mode .card-dl-btn {
  opacity: 1;
  transform: none;
  background: var(--accent);
  color: #1a1207;
}
.card.card-dl-mode .card-play-overlay {
  /* Hover shows the big download glyph instead of play */
  color: rgba(255,255,255,.95);
}
.card.card-dl-mode .card-play-overlay svg {
  fill: none;
  stroke: rgba(255,255,255,.95);
  stroke-width: 2;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.6));
}

/* =========================================================
   Premium Loading Panel & SVG Mascot Animations
   ========================================================= */
.loading-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 680px;
  margin: 40px auto;
  padding: 36px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  animation: fadeIn .3s ease;
}

.loading-animation-container {
  position: relative;
  margin-bottom: 20px;
}

.loading-ghost-svg {
  display: block;
}

.ghost-character {
  transform-origin: 50px 50px;
  transition: transform 0.3s ease;
}

/* --- STATE 1: SEARCHING --- */
.loading-panel.state-searching .ghost-character {
  animation: ghostFloat 3s ease-in-out infinite;
}
.loading-panel.state-searching .ghost-shadow {
  transform-origin: 50px 92px;
  animation: shadowScale 3s ease-in-out infinite;
}

/* --- STATE 2: PROCESSING (TYPING) --- */
.loading-panel.state-processing .ghost-character {
  animation: ghostTypingShake 0.1s infinite;
}
.loading-panel.state-processing .ghost-shadow {
  transform-origin: 50px 92px;
  animation: shadowScale 0.1s infinite;
}

/* --- STATE 3: RENDERING (EXCITED BOUNCE) --- */
.loading-panel.state-rendering .ghost-character {
  animation: ghostExcitedBounce 0.5s ease-in-out infinite;
}
.loading-panel.state-rendering .ghost-shadow {
  transform-origin: 50px 92px;
  animation: shadowBounce 0.5s ease-in-out infinite;
}

/* --- EYE BLINKS --- */
.ghost-eye.left { transform-origin: 42px 42px; animation: eyeBlink 4s infinite; }
.ghost-eye.right { transform-origin: 58px 42px; animation: eyeBlink 4s infinite; }

/* --- RADAR / LENS SWEEPS --- */
.ghost-radar-orbit {
  transform-origin: 50px 50px;
  animation: radarRotate 20s linear infinite;
}
.ghost-radar-orbit-outer {
  transform-origin: 50px 50px;
  animation: radarRotate 35s linear infinite reverse;
}
.lens-scan-line {
  transform-origin: 42px 42px;
  animation: beamSweep 2.5s ease-in-out infinite;
}
.magnifying-glass {
  transform-origin: 28px 56px;
  animation: magnifyingSweep 2s ease-in-out infinite;
}

/* --- HANDS & PARTICLES (STATE 2) --- */

.hand-left { transform-origin: 42px 68px; animation: bongoLeft 0.1s infinite ease-in-out; }
.hand-right { transform-origin: 58px 68px; animation: bongoRight 0.1s infinite ease-in-out; }

/* Flying keycaps styling */
.fkey {
  transform-origin: center;
  animation-duration: 0.7s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-out;
}
.fkey.fk1 { transform-origin: 40px 64px; animation-name: fkeyBounce1; animation-delay: 0s; }
.fkey.fk2 { transform-origin: 56px 64px; animation-name: fkeyBounce2; animation-delay: 0.15s; }
.fkey.fk3 { transform-origin: 44px 65px; animation-name: fkeyBounce3; animation-delay: 0.3s; }
.fkey.fk4 { transform-origin: 52px 65px; animation-name: fkeyBounce4; animation-delay: 0.45s; }

/* Matrix Digital Columns falling rain */
.matrix-column {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 2px;
  animation: matrixRain 1.8s infinite linear !important;
  transform-origin: center;
}
.matrix-column.mc1 { animation-delay: 0s; }
.matrix-column.mc2 { animation-delay: 0.4s; }
.matrix-column.mc3 { animation-delay: 0.8s; }
.matrix-column.mc4 { animation-delay: 1.2s; }

/* Screen code streaming rain */
.screen-rain {
  animation: screenRainAnim 0.4s infinite linear;
}
.screen-rain.sr1 { animation-delay: 0s; }
.screen-rain.sr2 { animation-delay: 0.12s; }
.screen-rain.sr3 { animation-delay: 0.24s; }

/* --- SPARKLES & HEART (STATE 3) --- */
.sparkle {
  transform-origin: center;
  animation: sparklePulse 1s infinite ease-in-out;
}
.sparkle.s1 { transform-origin: 24px 24px; animation-delay: 0s; }
.sparkle.s2 { transform-origin: 78px 21px; animation-delay: 0.25s; }
.sparkle.s3 { transform-origin: 20px 51px; animation-delay: 0.5s; }
.sparkle.s4 { transform-origin: 82px 48px; animation-delay: 0.75s; }

.floating-heart {
  transform-origin: 50px 14px;
  animation: heartFloat 1s infinite ease-in-out;
}

/* =========================================================
   Keyframes
   ========================================================= */
@keyframes eyebrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.5px); }
}
.eyebrow-search {
  animation: eyebrowBounce 2s infinite ease-in-out;
}

@keyframes sweatDropBounce {
  0%, 100% { transform: translate(0, 0); opacity: 0.9; }
  50% { transform: translate(1px, 2px); opacity: 0.6; }
}
.sweat-drop {
  animation: sweatDropBounce 1s infinite ease-in-out;
}

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

@keyframes shadowScale {
  0%, 100% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(0.85); opacity: 0.08; }
}

@keyframes ghostTypingShake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-0.8px, 0.8px); }
  50% { transform: translate(0.8px, -0.8px); }
  75% { transform: translate(-0.8px, -0.8px); }
}

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

@keyframes shadowBounce {
  0%, 100% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(0.6); opacity: 0.04; }
}

@keyframes eyeBlink {
  0%, 8%, 100% { transform: scaleY(1); }
  4% { transform: scaleY(0.1); }
}

@keyframes radarRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

@keyframes magnifyingSweep {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(3px, -2px) rotate(10deg); }
}

@keyframes bongoLeft {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(1px, 5px) rotate(-15deg); }
}
@keyframes bongoRight {
  0%, 100% { transform: translate(0, 5px) rotate(15deg); }
  50% { transform: translate(-1px, 0) rotate(0deg); }
}

@keyframes particleFloatUp {
  0% { transform: translateY(10px); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(-20px); opacity: 0; }
}

@keyframes sparklePulse {
  0%, 100% { transform: scale(0.4); opacity: 0.2; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes heartFloat {
  0%, 100% { transform: translateY(0) scale(0.9); }
  50% { transform: translateY(-4px) scale(1.1); }
}

@keyframes fkeyBounce1 {
  0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(-10px, -18px) scale(1.1) rotate(-45deg); opacity: 0; }
}
@keyframes fkeyBounce2 {
  0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(10px, -18px) scale(1.1) rotate(45deg); opacity: 0; }
}
@keyframes fkeyBounce3 {
  0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(-4px, -14px) scale(1.1) rotate(-15deg); opacity: 0; }
}
@keyframes fkeyBounce4 {
  0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(4px, -14px) scale(1.1) rotate(15deg); opacity: 0; }
}

@keyframes matrixRain {
  0% { transform: translateY(-20px); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(25px); opacity: 0; }
}

@keyframes screenRainAnim {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -6; }
}

.loading-text-container {
  margin-bottom: 24px;
}

.loading-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-1);
  margin-bottom: 8px;
}

.loading-status {
  font-size: 14.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  min-height: 1.5em;
  transition: opacity 0.2s ease;
}

.loading-progress-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 12px;
}

.loading-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-sunken);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--line);
}

.loading-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #D97757 100%);
  border-radius: 99px;
  transition: width 0.1s linear;
}

.loading-progress-percent {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-hover);
}

@media (max-width: 640px) {
  .loading-panel {
    padding: 28px 18px;
    margin: 20px auto;
  }
}

/* =========================================================
   Crying Ghost & Empty Error Card Styles
   ========================================================= */
.error-animation-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.crying-ghost {
  animation: ghostFloat 3.5s ease-in-out infinite;
}

.ghost-tear {
  transform-origin: top center;
  animation: tearSlide 1.2s infinite ease-in;
}
.ghost-tear.t1 { animation-delay: 0s; }
.ghost-tear.t2 { animation-delay: 0.6s; }

.ghost-tear-drop {
  transform-origin: center;
  animation: tearDropFall 1.2s infinite ease-in;
}
.ghost-tear-drop.td1 { animation-delay: 0.2s; }
.ghost-tear-drop.td2 { animation-delay: 0.8s; }

.sad-eyebrow {
  transform-origin: center;
  animation: sadEyebrowTremble 1s infinite ease-in-out;
}

.trembling-mouth {
  transform-origin: center;
  animation: mouthTremble 0.2s infinite ease-in-out;
}

.fiddling-hands {
  transform-origin: 50px 64px;
}
.fiddle-left { transform-origin: 46px 64px; animation: handFiddleLeft 0.4s infinite ease-in-out; }
.fiddle-right { transform-origin: 54px 64px; animation: handFiddleRight 0.4s infinite ease-in-out; animation-delay: 0.2s; }

.tear-puddle {
  transform-origin: 50px 90px;
  animation: puddleRipple 2s infinite ease-in-out;
}

@keyframes tearSlide {
  0% { transform: translateY(-2px) scaleY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(14px) scaleY(1.3); opacity: 0; }
}

@keyframes tearDropFall {
  0% { transform: translateY(-5px) scale(0.5); opacity: 0; }
  30% { opacity: 1; transform: translateY(0px) scale(1); }
  100% { transform: translateY(15px) scale(0); opacity: 0; }
}

@keyframes sadEyebrowTremble {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(1px) rotate(-1deg); }
}

@keyframes mouthTremble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.5px) scaleX(0.95); }
}

@keyframes handFiddleLeft {
  0%, 100% { transform: rotate(-15deg) translateY(0); }
  50% { transform: rotate(-5deg) translateY(-2px); }
}

@keyframes handFiddleRight {
  0%, 100% { transform: rotate(15deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-2px); }
}

@keyframes puddleRipple {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.15); opacity: 0.65; }
}

.error-guide-card {
  max-width: 440px;
  margin: 24px auto 0;
  padding: 20px;
  background: var(--bg-sunken);
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.error-guide-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-1);
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.error-reasons-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.error-reasons-list li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.error-reasons-list li strong {
  color: var(--ink-1);
  font-weight: 600;
}

/* ============================================================
   Download-theme loading props (story downloader mode)
   ============================================================ */
.dl-net {
  transform-origin: 30px 53px;
  animation: dlNetSweep 2.6s ease-in-out infinite;
}
@keyframes dlNetSweep {
  0%, 100% { transform: rotate(0) translateY(0); }
  35% { transform: rotate(-14deg) translateY(-2px); }
  70% { transform: rotate(10deg) translateY(1px); }
}
.dl-file { animation: dlFileFall 2.4s linear infinite; }
.dl-file.df2 { animation-delay: 0.8s; }
.dl-file.df3 { animation-delay: 1.5s; }
@keyframes dlFileFall {
  0%   { transform: translateY(-12px); opacity: 0; }
  20%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(46px); opacity: 0; }
}
.dl-box-flap-l { transform-origin: 34px 64px; animation: dlFlapL 1.6s ease-in-out infinite; }
.dl-box-flap-r { transform-origin: 66px 64px; animation: dlFlapR 1.6s ease-in-out infinite; }
@keyframes dlFlapL { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-8deg); } }
@keyframes dlFlapR { 0%,100% { transform: rotate(0); } 50% { transform: rotate(8deg); } }
.dl-pack { animation: dlPackDrop 1.8s ease-in infinite; }
.dl-pack.pf2 { animation-delay: 0.6s; }
.dl-pack.pf3 { animation-delay: 1.2s; }
@keyframes dlPackDrop {
  0%   { transform: translateY(-16px) rotate(-6deg); opacity: 0; }
  25%  { opacity: 1; }
  75%  { transform: translateY(14px) rotate(4deg); opacity: 1; }
  100% { transform: translateY(20px) rotate(4deg); opacity: 0; }
}
.dl-speed { animation: dlSpeedDash 0.9s linear infinite; }
.dl-speed.sp2 { animation-delay: 0.3s; }
.dl-speed.sp3 { animation-delay: 0.6s; }
@keyframes dlSpeedDash {
  0%   { transform: translateX(8px); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateX(-10px); opacity: 0; }
}
.dl-gift { animation: dlGiftBounce 0.8s ease-in-out infinite; transform-origin: 50px 70px; }
@keyframes dlGiftBounce {
  0%, 100% { transform: scale(1) translateY(0); }
  40% { transform: scale(1.04, 0.94) translateY(1px); }
  70% { transform: scale(0.97, 1.05) translateY(-2px); }
}
.confetti { animation: dlConfettiFall 2.2s linear infinite; }
.confetti.cf2 { animation-delay: 0.4s; }
.confetti.cf3 { animation-delay: 0.8s; }
.confetti.cf4 { animation-delay: 1.2s; }
.confetti.cf5 { animation-delay: 1.6s; }
.confetti.cf6 { animation-delay: 2s; }
@keyframes dlConfettiFall {
  0%   { transform: translateY(-8px) rotate(0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(40px) rotate(220deg); opacity: 0; }
}
.dl-check-badge { animation: dlCheckPop 1.4s ease-in-out infinite; transform-origin: 76px 62px; }
@keyframes dlCheckPop {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
/* Player download button needs relative positioning for the fill */
.player-download.dl-progressing, .spot-player-dl.dl-progressing { min-width: 150px; }
.card-dl-btn.dl-progressing .dlp-label { mix-blend-mode: normal; color: #1A1207; }
