/* aspaz.az — Story sistemi stilləri */

.story-bar-section { padding: 22px 0 4px; }
.story-bar {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary-light) transparent;
}
.story-bar::-webkit-scrollbar { height: 6px; }
.story-bar::-webkit-scrollbar-thumb { background: var(--color-primary-light); border-radius: var(--radius-full); }
.story-bar::-webkit-scrollbar-track { background: transparent; }

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  width: 78px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.story-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--color-primary), #ffb199, var(--color-primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .15s ease;
}
.story-item:hover .story-ring { transform: scale(1.05); }
.story-item:active .story-ring { transform: scale(0.97); }

.story-ring-add {
  background: var(--color-border-strong);
}

.story-avatar-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  border: 2.5px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-avatar-wrap img, .story-avatar-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  background: rgba(20,10,12,.28);
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.story-audio-badge {
  font-size: 20px;
  background: linear-gradient(160deg, rgba(216,31,61,.32), rgba(20,10,12,.42));
}
.story-avatar-fallback {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--color-primary-dark);
  background: var(--color-primary-tint);
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}

.story-add-badge {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #fff;
  box-shadow: var(--shadow-sm);
}

.story-item-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-ink-soft);
  max-width: 78px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.story-item-add .story-item-label { color: var(--color-primary-dark); font-weight: 700; }

.story-item-add[data-has-pending="1"] .story-ring-add {
  background: linear-gradient(135deg, var(--color-warning), #fcd34d);
}

.story-ring-cv-add {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary), #ffb199);
}
.story-avatar-fallback-cv {
  background: var(--color-primary-tint);
  font-size: 24px;
}
.story-item-cv-add .story-item-label { color: var(--color-primary-dark); font-weight: 700; }

/* --- Story əlavə et modalı --- */
.story-add-modal { max-width: 400px; }
.story-upload-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  height: 190px;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--color-border-strong);
  background: var(--color-surface-alt);
  cursor: pointer;
  overflow: hidden;
  margin-bottom: 8px;
  transition: border-color .15s ease, background .15s ease;
}
.story-upload-box:hover { border-color: var(--color-primary-light); background: var(--color-primary-tint); }
.story-upload-box.has-image { border-style: solid; padding: 0; }
.story-upload-box.is-uploading { cursor: default; pointer-events: none; }

/* --- Story yüklənmə faizi göstəricisi --- */
.story-upload-progress {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(24, 12, 15, .74);
  backdrop-filter: blur(2px);
}
.story-upload-progress[hidden] { display: none; }
.story-upload-progress-circle { position: relative; width: 72px; height: 72px; }
.story-upload-progress-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.supc-track { fill: none; stroke: rgba(255,255,255,.28); stroke-width: 5; }
.supc-bar {
  fill: none;
  stroke: #fff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 188.5;
  stroke-dashoffset: 188.5;
  transition: stroke-dashoffset .25s ease;
}
.story-upload-progress-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}
.story-upload-progress-label { color: rgba(255,255,255,.9); font-size: 12.5px; font-weight: 600; }
.story-upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--color-ink-faint); font-size: 12px; font-weight: 600; text-align: center; padding: 0 16px; }
.story-upload-placeholder svg { width: 20px; height: 20px; opacity: .8; }
.story-upload-preview { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-upload-preview[hidden] { display: none !important; }
video.story-upload-preview { background: #000; object-fit: contain; }
.story-upload-audio-preview {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 18px 16px;
  background: linear-gradient(160deg, var(--color-primary-tint) 0%, #fff 70%);
}
.story-upload-audio-preview[hidden] { display: none !important; }
.story-upload-audio-icon {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: #fff; box-shadow: var(--shadow-sm);
}
.story-upload-audio-name {
  font-size: 12.5px; font-weight: 700; color: var(--color-ink); text-align: center;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 8px;
}
.story-upload-audio-preview audio { width: 100%; max-width: 260px; height: 34px; }
.story-upload-change {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary-dark);
  text-align: center;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px;
  width: 100%;
}
.story-upload-change[hidden] { display: none; }

/* --- Story baxış pəncərəsi --- */
.story-view-overlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: storyFadeIn .2s ease both;
}
.story-view-overlay { padding: 24px; }
@supports (height: 100dvh) {
  .story-view-overlay { height: 100dvh; }
}
.story-view-overlay[hidden] { display: none; }
@keyframes storyFadeIn { from { opacity: 0; } to { opacity: 1; } }

.story-view-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  background: #111;
  border-radius: var(--radius-lg);
  overflow: visible;
  box-shadow: 0 12px 40px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.18);
  animation: storyPopIn .28s cubic-bezier(.2,.8,.2,1) both;
}
.story-view-card-inner {
  border-radius: inherit;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  max-height: inherit;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.story-view-card-inner::-webkit-scrollbar { display: none; width: 0; height: 0; }
@keyframes storyPopIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }

.story-view-media {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 62vh;
  max-height: 62dvh;
  flex-shrink: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.story-view-media img, .story-view-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-view-media img[hidden], .story-view-media video[hidden] { display: none !important; }

.story-view-audio {
  position: relative;
  width: 100%; height: 100%;
  flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 30px 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #2a1015, #1a0d12, #3a1608, #1a0d12);
  background-size: 300% 300%;
  animation: storyAudioBgShift 10s ease infinite;
}
.story-view-audio[hidden] { display: none !important; }
@keyframes storyAudioBgShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* --- Mətbəx mövzulu üzən ikonlar (dekorativ arxa fon animasiyası) --- */
.story-audio-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.story-audio-float {
  position: absolute;
  bottom: -40px;
  font-size: 22px;
  opacity: 0;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.35));
  animation-name: storyAudioFloatUp;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
}
.story-audio-float-1 { left: 12%;  font-size: 26px; animation-duration: 9s;  animation-delay: 0s; }
.story-audio-float-2 { left: 78%;  font-size: 20px; animation-duration: 11s; animation-delay: 1.4s; }
.story-audio-float-3 { left: 30%;  font-size: 18px; animation-duration: 8s;  animation-delay: 2.6s; }
.story-audio-float-4 { left: 60%;  font-size: 24px; animation-duration: 12s; animation-delay: 0.8s; }
.story-audio-float-5 { left: 88%;  font-size: 20px; animation-duration: 10s; animation-delay: 3.5s; }
.story-audio-float-6 { left: 8%;   font-size: 18px; animation-duration: 9.5s; animation-delay: 5s; }
@keyframes storyAudioFloatUp {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  12%  { opacity: .55; }
  85%  { opacity: .35; }
  100% { transform: translateY(-340px) rotate(18deg); opacity: 0; }
}

/* --- Musiqi nişanı (pulsasiya + fırlanan halqalar) --- */
.story-audio-cover {
  position: relative;
  z-index: 1;
  width: 108px; height: 108px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--color-primary), var(--color-primary-darker));
  box-shadow: 0 12px 30px rgba(216,31,61,.4);
  animation: storyAudioPulse 2.2s ease-in-out infinite;
}
.story-audio-cover-icon { font-size: 40px; position: relative; z-index: 1; }
@keyframes storyAudioPulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(216,31,61,.4), 0 0 0 0 rgba(216,31,61,.35); }
  50% { box-shadow: 0 12px 30px rgba(216,31,61,.4), 0 0 0 14px rgba(216,31,61,0); }
}
.story-audio-ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,178,153,.4);
  animation: storyAudioRingSpin linear infinite;
}
.story-audio-ring-1 { animation-duration: 7s; }
.story-audio-ring-2 { inset: -26px; border-color: rgba(255,178,153,.2); animation-duration: 11s; animation-direction: reverse; }
@keyframes storyAudioRingSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* --- Ekvalayzer zolaqları (yalnız çalınarkən canlanır) --- */
.story-audio-eq {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 22px;
}
.story-audio-eq span {
  width: 3px;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(180deg, #ffb199, var(--color-primary));
  opacity: .55;
  animation-name: storyAudioEqBar;
  animation-duration: 900ms;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-play-state: paused;
}
.story-view-audio.is-playing .story-audio-eq span { animation-play-state: running; opacity: 1; }
.story-audio-eq span:nth-child(1) { animation-duration: 780ms; animation-delay: 0ms; }
.story-audio-eq span:nth-child(2) { animation-duration: 640ms; animation-delay: 90ms; }
.story-audio-eq span:nth-child(3) { animation-duration: 900ms; animation-delay: 180ms; }
.story-audio-eq span:nth-child(4) { animation-duration: 560ms; animation-delay: 60ms; }
.story-audio-eq span:nth-child(5) { animation-duration: 860ms; animation-delay: 220ms; }
.story-audio-eq span:nth-child(6) { animation-duration: 700ms; animation-delay: 130ms; }
.story-audio-eq span:nth-child(7) { animation-duration: 820ms; animation-delay: 40ms; }
@keyframes storyAudioEqBar {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

.story-view-audio audio { position: relative; z-index: 1; width: 100%; max-width: 300px; }

/* --- Custom mp3 pleyer paneli (native "audio controls" əvəzinə) --- */
.story-audio-player {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  padding: 8px 14px 8px 8px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(6px);
}
.story-audio-playbtn {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--color-primary), var(--color-primary-darker));
  color: #fff;
  cursor: pointer;
  transition: transform .12s ease;
}
.story-audio-playbtn:hover { transform: scale(1.06); }
.story-audio-playbtn:active { transform: scale(0.94); }
.story-audio-icon-play { margin-left: 2px; }
.story-audio-icon-play[hidden], .story-audio-icon-pause[hidden] { display: none !important; }

.story-audio-time {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  font-variant-numeric: tabular-nums;
  min-width: 30px;
}
.story-audio-time:last-of-type { text-align: right; }

.story-audio-seek {
  flex: 1;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary) var(--story-audio-progress, 0%), rgba(255,255,255,.25) var(--story-audio-progress, 0%));
  outline: none;
  cursor: pointer;
}
.story-audio-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  cursor: pointer;
  transition: transform .12s ease;
}
.story-audio-seek::-webkit-slider-thumb:hover { transform: scale(1.15); }
.story-audio-seek::-moz-range-thumb {
  width: 12px; height: 12px;
  border: none;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  cursor: pointer;
}
.story-audio-seek::-moz-range-track {
  height: 4px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.25);
}
.story-audio-seek::-moz-range-progress {
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
}

.story-audio-volbtn {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.story-audio-volbtn:hover { background: rgba(255,255,255,.12); color: #fff; }
.story-audio-icon-vol-on[hidden], .story-audio-icon-vol-off[hidden] { display: none !important; }

@media (max-width: 420px) {
  .story-audio-player { max-width: 100%; padding: 7px 12px 7px 7px; gap: 8px; }
  .story-audio-playbtn { width: 30px; height: 30px; }
  .story-audio-time { font-size: 11px; min-width: 26px; }
}

.story-view-info {
  padding: 14px 20px 20px;
  background: #fff;
  flex-shrink: 0;
}
.story-view-info-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.story-view-who { display: flex; flex-direction: column; min-width: 0; }
.story-view-user { font-weight: 800; font-size: 15px; color: var(--color-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-view-date { font-size: 12px; color: var(--color-ink-faint); margin-top: 2px; }

.story-view-stats { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.story-view-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-ink-faint);
  padding: 7px 10px;
  border-radius: var(--radius-full);
  background: var(--color-surface-alt);
  white-space: nowrap;
}
.story-view-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-ink-soft);
  padding: 7px 11px;
  border-radius: var(--radius-full);
  background: var(--color-surface-alt);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
  white-space: nowrap;
  font-family: inherit;
}
.story-view-like-btn:hover { border-color: var(--color-primary-light); color: var(--color-primary-dark); background: var(--color-primary-tint); }
.story-view-like-btn:active { transform: scale(0.94); }
.story-view-like-btn:disabled { opacity: .7; cursor: default; }
.story-view-like-btn svg { flex-shrink: 0; transition: transform .18s ease; }
.story-view-like-btn.is-liked {
  background: linear-gradient(150deg, var(--color-primary), var(--color-primary-darker));
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.story-view-like-btn.is-liked svg { transform: scale(1.12); }

.story-view-text { margin: 12px 0 0; font-size: 14px; color: var(--color-ink-soft); line-height: 1.55; white-space: pre-line; }
.story-view-text:empty { display: none; margin: 0; }

/* --- Story-yə göndərilmiş hədiyyələr siyahısı --- */
.story-view-gifts { margin: 12px 0 0; }
.story-view-gifts[hidden] { display: none !important; }
.story-view-gifts-list { display: flex; flex-direction: column; gap: 6px; }
.story-view-gift-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--color-primary-tint);
  font-size: 13px;
  color: var(--color-ink);
  line-height: 1.4;
}
.story-view-gift-icon { font-size: 16px; flex-shrink: 0; }
.story-view-gift-row b { color: var(--color-primary-dark); }

.story-gift-open-btn { font-weight: 700; }

/* Story baxış pəncərəsi (z-index:320) açıq ikən "Hədiyyə Göndər" modalı onun ÜSTÜNDƏ görünməlidir —
   .vip-modal-overlay-in ümumi z-index (200) buradan aşağıdır, ona görə xüsusi override lazımdır. */
#storyGiftModalOverlay { z-index: 340; }

.story-view-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--color-ink);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
  transition: transform .15s ease, box-shadow .15s ease;
  z-index: 2;
}
.story-view-close:hover { transform: scale(1.08); box-shadow: 0 4px 14px rgba(0,0,0,.3); }

/* --- Toast --- */
.story-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(16px);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--color-ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  padding: 14px 18px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 400;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  white-space: normal;
  width: max-content;
  max-width: min(420px, calc(100vw - 32px));
}
.story-toast::before {
  content: "✓";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  margin-top: 1px;
}
.story-toast.is-error::before { content: "!"; }
.story-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.story-toast.is-error { background: var(--color-danger); }

@media (max-width: 480px) {
  .story-toast {
    left: 16px;
    right: 16px;
    bottom: 18px;
    width: auto;
    max-width: none;
    transform: translateY(16px);
    padding: 13px 16px;
    font-size: 13px;
    border-radius: 14px;
  }
  .story-toast.is-visible { transform: translateY(0); }
}

/* --- Admin panel: Story kartları --- */
.story-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.story-admin-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.story-admin-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.story-admin-card-media { width: 100%; aspect-ratio: 4 / 3; background: var(--color-surface-alt); overflow: hidden; }
.story-admin-card-media img, .story-admin-card-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-admin-card-media-audio {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; background: linear-gradient(160deg, var(--color-primary-tint) 0%, #fff 75%);
}
.story-admin-audio-cover {
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: #fff; box-shadow: var(--shadow-sm);
}
.story-admin-card-media-audio audio { width: 100%; max-width: 200px; height: 32px; }
.story-admin-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.story-admin-card-user { display: flex; align-items: center; gap: 8px; }
.story-admin-card-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--color-primary-tint); flex-shrink: 0; }
.story-admin-card-avatar-fallback { width: 30px; height: 30px; border-radius: 50%; background: var(--color-primary-tint); color: var(--color-primary-dark); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.story-admin-card-name { font-weight: 700; font-size: 13.5px; color: var(--color-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-admin-card-text { font-size: 12.5px; color: var(--color-ink-soft); line-height: 1.5; margin: 0; max-height: 54px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.story-admin-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--color-ink-faint); gap: 6px 8px; flex-wrap: wrap; }
.story-admin-card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.story-admin-card-actions form { display: flex; gap: 6px; flex: 1; }
.story-admin-card-actions select { padding: 8px 8px; font-size: 12.5px; flex: 1; min-width: 0; }
.story-admin-card-actions .btn { flex-shrink: 0; }

@media (max-width: 760px) {
  .story-ring { width: 64px; height: 64px; }
  .story-item { width: 70px; }
  .story-add-badge { width: 20px; height: 20px; font-size: 14px; }
  .story-view-overlay { padding: 16px; }
  .story-view-card { max-width: 440px; width: 100%; max-height: 92vh; max-height: 92dvh; }
  .story-view-media { aspect-ratio: 4 / 5; max-height: 50vh; max-height: 50dvh; }
  .story-upload-box { height: 170px; }
  .story-upload-placeholder svg { width: 18px; height: 18px; }
  .story-upload-placeholder { font-size: 11.5px; }
  .story-view-info { padding: 12px 16px 16px; }
  .story-view-stat, .story-view-like-btn { padding: 6px 9px; font-size: 12px; }

  /* Admin story cards: single column so there's always room for readable, full-width actions */
  .story-admin-grid { grid-template-columns: 1fr; gap: 12px; }
  .story-admin-card { flex-direction: row; }
  .story-admin-card-media { width: 120px; aspect-ratio: unset; flex-shrink: 0; }
  .story-admin-card-body { padding: 12px 14px 14px; gap: 6px; }

  .story-admin-card-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .story-admin-card-actions form {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }
  .story-admin-card-actions select {
    width: 100%;
    flex: none;
    padding: 10px 10px;
  }
  .story-admin-card-actions .btn {
    width: 100%;
    flex-shrink: 0;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .story-bar { gap: 14px; }
  .story-ring { width: 58px; height: 58px; }
  .story-item { width: 64px; }
  .story-view-info-top { flex-wrap: wrap; }
  .story-view-stats { order: 3; width: 100%; justify-content: flex-start; margin-top: 4px; }
  .story-view-who { order: 1; }

  .story-admin-card { flex-direction: column; }
  .story-admin-card-media { width: 100%; aspect-ratio: 4 / 3; }
}
