.sp-stories{
  --sp-thumb-size:72px;
  --sp-thumb-spacing:12px;
  --sp-bg: rgba(0,0,0,0.65);
  --sp-caption-bg: rgba(220,220,220,0.70);
  --sp-caption-text: #111111;
  --sp-progress: rgba(255,255,255,0.85);
  --sp-caption-space: 92px;
}

.sp-stories-track{
  display:flex;
  align-items:flex-start;
  gap: var(--sp-thumb-spacing);
  overflow-x:auto;
  padding: 6px 2px;
}
.sp-story{
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  min-width: calc(var(--sp-thumb-size) + 2px);
}
.sp-thumb{
  width: var(--sp-thumb-size);
  height: var(--sp-thumb-size);
  border-radius: 999px;
  overflow:hidden;
  border: 2px solid rgba(255, 0, 120, 0.75);
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
}
.sp-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.sp-thumb-fallback{
  background: rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.12);
  color:#111;
  font-weight:700;
}
.sp-title{
  font-size:12px;
  line-height:1.1;
  max-width: calc(var(--sp-thumb-size) + 18px);
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color: var(--sp-caption-text);
}
.sp-thumb-add{
  border-style:dashed;
  border-color: rgba(0,0,0,0.18);
  background: rgba(0,0,0,0.05);
}
.sp-plus{ font-size: 34px; line-height: 1; color:#111; }

/* Viewer */
.sp-viewer{
  position:fixed;
  inset:0;
  display:none;
  z-index:99999;
  background: var(--sp-bg);
}
.sp-viewer.is-open{ display:flex; flex-direction:column; }
.sp-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 12px;
  color:#fff;
}
.sp-top-actions{ display:flex; align-items:center; gap:10px; }

.sp-close, .sp-delbtn{
  border:0;
  background: rgba(255,255,255,0.10);
  color:#fff;
  border-radius: 10px;
  width:40px;
  height:40px;
  cursor:pointer;
  font-size:20px;
  line-height:40px;
  display:none;
  align-items:center;
  justify-content:center;
}
.sp-close{ display:inline-flex; font-size:22px; }
.sp-delbtn.is-show{ display:inline-flex; }

.sp-progress{
  display:flex;
  gap:6px;
  padding: 0 12px 10px 12px;
}
.sp-progress > span{
  flex:1;
  height:3px;
  background: rgba(255,255,255,0.18);
  border-radius:999px;
  overflow:hidden;
}
.sp-progress > span > i{
  display:block;
  height:100%;
  width:0%;
  background: var(--sp-progress);
}

.sp-stage{
  position:relative;
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  box-sizing:border-box;
  padding-bottom: 0;
}
.sp-media{
  width:100%;
  height: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.sp-media img, .sp-media video{
  width:auto;
  height:auto;
  max-width: 92vw;
  max-height: calc(92vh - 120px);
  object-fit:contain;
  display:block;
}

.sp-caption{
  flex:1;
  font-size: 14px;
  line-height: 1.25;
}
.sp-caption-overlay{
  flex:0 0 auto;
  margin: 0 12px 12px 12px;
  display:none;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--sp-caption-bg);
  color: var(--sp-caption-text);
  box-sizing:border-box;
}

.sp-link{
  flex:0 0 auto;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration:none;
  background: rgba(0,0,0,0.08);
  color: inherit;
  font-size: 13px;
}

/* Upload modal */
.sp-upload-modal{ position:fixed; inset:0; z-index:100000; display:none; }
.sp-upload-modal.is-open{ display:block; }
.sp-upload-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,0.55); }
.sp-upload-panel{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:min(720px, 92vw); max-height: 85vh; overflow:auto; background:#fff; border-radius:14px; padding:14px; box-shadow: 0 12px 40px rgba(0,0,0,0.35); }
.sp-upload-panel h3{ margin:0 0 10px 0; }
.sp-upload-row{ display:flex; flex-wrap:wrap; gap:12px; padding:10px 0; border-top:1px solid #eee; }
.sp-upload-row:first-of-type{ border-top:0; }
.sp-upload-thumb{ width:72px; height:72px; border-radius:12px; background:#f2f2f2; display:flex; align-items:center; justify-content:center; overflow:hidden; flex:0 0 auto; }
.sp-upload-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.sp-upload-thumb.is-video{ width:100%; max-width:340px; height:auto; aspect-ratio:16/9; background:#000; }
.sp-upload-thumb.is-video video{ width:100%; height:100%; object-fit:contain; display:block; background:#000; }
.sp-upload-fields{ flex:1; }
.sp-upload-fields label{ display:block; font-size:12px; margin:0 0 4px 0; color:#333; }
.sp-upload-fields textarea{ width:100%; min-height:60px; resize: both; }
.sp-upload-fields input[type='text']{ width:100%; }
.sp-upload-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:12px; }
.sp-music-edit-fields{ margin-top:10px; }
.sp-music-edit-reset-timer{ margin-top:12px; font-size:13px; }
.sp-music-edit-reset-timer label{ display:flex; align-items:flex-start; gap:6px; cursor:pointer; }
.sp-music-picker-list{
  margin-top:8px;
  max-height:220px;
  overflow-y:auto;
  border:1px solid rgba(0,0,0,0.15);
  border-radius:8px;
}
.sp-music-picker-loading{ padding:12px; font-size:13px; color:#888; }
.sp-music-picker-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  width:100%;
  padding:10px 12px;
  border:0;
  border-bottom:1px solid rgba(0,0,0,0.08);
  background:#fff;
  text-align:left;
  cursor:pointer;
  font-size:13px;
}
.sp-music-picker-row:last-child{ border-bottom:0; }
.sp-music-picker-row:hover{ background:#f6f7f7; }
.sp-music-picker-title{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sp-music-picker-date{ flex-shrink:0; color:#888; font-size:11px; }
.sp-btn{ border:0; padding:10px 14px; border-radius:10px; cursor:pointer; }
.sp-btn.primary{ background:#111; color:#fff; }
.sp-btn.ghost{ background:#eee; color:#111; }
.sp-upload-small{ font-size:12px; color:#666; margin-top:6px; }

.sp-up-add-music{ font-size:13px; }
.sp-up-music-trimmer{ margin-top:8px; }
.sp-trim-label{ font-size:11px; color:#888; margin-bottom:6px; }
.sp-trim-window{
  width:280px;
  height:48px;
  position:relative;
  border-radius:8px;
  background:#1a1a1a;
  overflow:hidden;
}
.sp-trim-waveform-dim{ position:absolute; inset:0; opacity:0.45; }
.sp-trim-waveform-dim canvas{ display:block; }
.sp-trim-selection{
  position:absolute;
  top:0;
  height:100%;
  box-sizing:border-box;
  border-radius:6px;
  border:2px solid #ffcc00;
  background:rgba(255,204,0,0.08);
  overflow:hidden;
  cursor:grab;
  touch-action:none;
  user-select:none;
}
.sp-trim-selection:active{ cursor:grabbing; }
.sp-trim-waveform{ position:absolute; inset:0; }
.sp-trim-waveform canvas{
  display:block;
  position:absolute;
  left:0; top:0;
  pointer-events:none;
}
.sp-trim-playhead{
  position:absolute;
  top:0;
  left:0;
  width:2px;
  height:100%;
  background:#fff;
  box-shadow:0 0 4px rgba(0,0,0,0.6);
  pointer-events:none;
  z-index:2;
}
.sp-trim-typed-time{
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: #aaa;
}
.sp-trim-typed-time label{ white-space: nowrap; }
.sp-trim-time-input{
  width: 90px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.2);
  padding: 4px 6px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.sp-trim-controls{ display:flex; gap:8px; margin-top:8px; }
.sp-trim-controls .sp-btn{ font-size:12px; padding:6px 10px; }
.sp-trim-time{ font-size:12px; color:#aaa; margin-top:6px; font-variant-numeric:tabular-nums; }

@media (max-width: 600px){
  .sp-stories{ --sp-caption-space: 96px; }
  .sp-media img, .sp-media video{ max-width: 94vw; max-height: calc(94vh - 130px); }
}

.sp-audio{ border:0; background: rgba(255,255,255,0.10); color:#fff; border-radius:10px; width:40px; height:40px; cursor:pointer; font-size:18px; line-height:40px; display:inline-flex; align-items:center; justify-content:center; }

.sp-play{ border:0; background: rgba(255,255,255,0.10); color:#fff; border-radius:10px; width:40px; height:40px; cursor:pointer; font-size:18px; line-height:40px; display:inline-flex; align-items:center; justify-content:center; }


@media (max-width: 820px){
  /* iOS/Safari sometimes overlays big native controls even when controls=false */
  .sp-media video::-webkit-media-controls,
  .sp-media video::-webkit-media-controls-panel,
  .sp-media video::-webkit-media-controls-enclosure,
  .sp-media video::-webkit-media-controls-overlay-enclosure,
  .sp-media video::-webkit-media-controls-play-button,
  .sp-media video::-webkit-media-controls-start-playback-button,
  .sp-media video::-webkit-media-controls-timeline,
  .sp-media video::-webkit-media-controls-current-time-display,
  .sp-media video::-webkit-media-controls-time-remaining-display,
  .sp-media video::-webkit-media-controls-mute-button,
  .sp-media video::-webkit-media-controls-fullscreen-button,
  .sp-media video::-webkit-media-controls-volume-slider{
    display:none !important;
    -webkit-appearance:none !important;
  }
}

@media (max-width: 820px){ .sp-media video{ pointer-events:none !important; } }

/* v0.1.20 - suppress video controls */
.sp-viewer video{ pointer-events:none; }
.sp-viewer video::-webkit-media-controls{ display:none !important; }
.sp-viewer video::-webkit-media-controls-enclosure{ display:none !important; }
.sp-viewer video::-webkit-media-controls-panel{ display:none !important; }
.sp-viewer video::-webkit-media-controls-play-button{ display:none !important; }
.sp-viewer video::-webkit-media-controls-start-playback-button{ display:none !important; }
.sp-audio,.sp-play{ display:none !important; }

/* v0.1.21 - avatar thumbnails */
.sp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}


/* Social (likes/comments) */
.sp-social-row{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:6px;
}
.sp-like-btn,
.sp-comment-btn{
  appearance:none;
  background:rgba(0,0,0,.35);
  color:#fff;
  border:1px solid rgba(255,255,255,.25);
  padding:6px 10px;
  font-size:14px;
  line-height:1;
  cursor:pointer;
  border-radius:0;
}
.sp-like-btn.is-liked{
  border-color: rgba(255,255,255,.5);
}
.sp-like-count,
.sp-comment-count{
  font-weight:600;
}

.sp-comments{
  margin-top:8px;
  max-height:160px;
  overflow:auto;
  background:rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.15);
  padding:8px;
  border-radius:0;
}
.sp-comment-item{
  display:flex;
  gap:6px;
  align-items:flex-start;
  margin:0 0 6px 0;
  font-size:13px;
}
.sp-comment-author{
  font-weight:700;
}
.sp-comment-empty{
  font-size:13px;
  opacity:.85;
}
.sp-comment-form{
  display:flex;
  gap:8px;
  align-items:flex-end;
  margin-top:8px;
}
.sp-comment-input{
  flex:1;
  width:100%;
  min-height:44px;
  resize:vertical;
  border-radius:0;
}
.sp-comment-send{
  appearance:none;
  background:rgba(0,0,0,.35);
  color:#fff;
  border:1px solid rgba(255,255,255,.25);
  padding:6px 10px;
  cursor:pointer;
  border-radius:0;
}
.sp-comment-login{
  font-size:13px;
  opacity:.9;
}

/* ================= Upload modal — theme/event field ================= */
.sp-upload-theme-row{
  margin: 10px 0 14px;
  padding: 10px 12px;
  background: #f7f7f7;
  border-radius: 8px;
}
.sp-upload-theme-row label{
  display:block;
  font-size:12px;
  font-weight:700;
  margin-bottom:4px;
}
.sp-upload-theme-row input.sp-up-theme{
  width:100%;
  box-sizing:border-box;
  padding:8px 10px;
  border:1px solid #ddd;
  border-radius:6px;
  font-size:14px;
}
.sp-upload-theme-hint{
  font-size:11px;
  color:#888;
  margin-top:4px;
}

/* ================= Wide loop mode ================= */
.sp-wide-story{
  --sp-wide-accent: #ffcc00;
  width: 100%;
  margin: 0 0 16px;
}
.sp-wide-slab{
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  aspect-ratio: 9 / 16; /* sensible default until the real clip's dimensions are known */
  overflow: hidden;
  border-radius: 4px;
  background: #0a0a0c;
  cursor: pointer;
}
.sp-wide-media{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  background:#000;
  cursor: pointer;
}
.sp-wide-media img,
.sp-wide-media video{
  width:100%;
  height:100%;
  object-fit: contain;
  background:#000;
}
.sp-wide-media iframe{
  width:100%;
  height:100%;
  border:0;
  background:#000;
}
.sp-wide-theme{
  position:absolute; top:0; left:0;
  display:flex; align-items:center; gap:7px;
  background: var(--sp-caption-bg);
  padding: 7px 14px 7px 12px;
  border-bottom-right-radius: 6px;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.35);
  width: fit-content;
  max-width: 90%;
}
.sp-wide-dot{
  width:7px; height:7px; border-radius:50%;
  background: #000;
  opacity: 0.85;
  animation: sp-wide-blink 1.4s ease-in-out infinite;
  flex-shrink:0;
}
@keyframes sp-wide-blink{ 0%,100%{opacity:0.85;} 50%{opacity:0.25;} }
.sp-wide-theme-text{
  font-size: 13px;
  font-weight: 700;
  color: var(--sp-caption-text);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-wide-meta{
  position:absolute; bottom:0; left:0; right:0;
  padding: 8px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), rgba(0,0,0,0));
  display:flex; justify-content:space-between; align-items:center;
  pointer-events: none;
}
.sp-wide-count{
  font-size: 11px;
  color: #eee;
}
.sp-wide-dots{ display:flex; gap:8px; pointer-events: auto; }
.sp-wide-queue{
  display:flex;
  gap:8px;
  margin-top:8px;
  overflow-x:auto;
}
.sp-wide-queue-item{
  flex-shrink:0;
  width:44px; height:44px;
  border-radius:50%;
  padding:0;
  border: 2px solid transparent;
  background:#eee;
  overflow:hidden;
  cursor:pointer;
}
.sp-wide-queue-item.is-active{
  border-color: var(--sp-wide-accent);
}
.sp-wide-queue-item img{
  width:100%; height:100%; object-fit:cover; display:block;
}
.sp-wide-queue-fallback{
  display:flex; align-items:center; justify-content:center;
  width:100%; height:100%;
  font-size:15px; font-weight:700; color:#666;
}
.sp-wide-link-badge{
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 0 12px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
}
.sp-wide-views{
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 0 10px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  white-space: nowrap;
}
.sp-wide-link-arrow{
  flex-shrink: 0;
  display: block;
}

/* ================= Wide loop inline controls ================= */
.sp-wide-edge{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  border: 0;
  background: rgba(0,0,0,0.35);
  color: #fff;
  width: 32px;
  height: 44px;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
}
.sp-wide-edge:hover{ background: rgba(0,0,0,0.6); }
.sp-wide-prev{ left: 0; border-radius: 0 6px 6px 0; }
.sp-wide-next{ right: 0; border-radius: 6px 0 0 6px; }

.sp-wide-corner-ctrls{
  position: absolute;
  bottom: 38px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 3;
}
.sp-wide-ctrl{
  appearance: none;
  border: 0;
  background: rgba(0,0,0,0.5);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sp-wide-ctrl:hover{ background: rgba(0,0,0,0.75); }
.sp-wide-ctrl.sp-wide-audio{
  animation: sp-wide-audio-pulse 2.2s ease-in-out infinite;
}
.sp-wide-ctrl.sp-wide-audio:hover{
  animation: none;
}
.sp-wide-ctrl.sp-wide-like,
.sp-wide-ctrl.sp-wide-comment{
  width: auto;
  min-width: 28px;
  border-radius: 14px;
  padding: 0 10px;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}
.sp-wide-ctrl.sp-wide-like.is-liked{
  background: rgba(255,45,85,0.85);
}
.sp-wide-ctrl.sp-wide-like.is-liked:hover{
  background: rgba(255,45,85,1);
}
.sp-wide-comments{
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 56px;
  max-height: 45%;
  overflow-y: auto;
  background: rgba(0,0,0,0.8);
  border-radius: 10px;
  padding: 10px;
  z-index: 4;
  color: #fff;
}
.sp-wide-comments-list{
  margin-bottom: 8px;
}
.sp-wide-comment-form{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sp-wide-comment-input{
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  padding: 6px 8px;
  font-size: 12px;
}
.sp-wide-comment-send{
  align-self: flex-end;
  appearance: none;
  border: 0;
  border-radius: 6px;
  background: var(--sp-wide-accent, #ffcc00);
  color: #000;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  cursor: pointer;
}
.sp-wide-comment-login{
  font-size: 12px;
  color: #ccc;
  text-align: center;
}
@keyframes sp-wide-audio-pulse{
  0%, 100%{ box-shadow: 0 0 0 0 rgba(255,255,255,0.0); }
  50%{ box-shadow: 0 0 0 6px rgba(255,255,255,0.15); }
}

/* Keep the meta bar (count/dots) clear of other overlays */
.sp-wide-meta{ z-index: 2; }
.sp-wide-dots{ gap: 8px; }
.sp-wide-dot-btn{
  appearance: none;
  border: 0;
  padding: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
}
.sp-wide-dot-btn.on{ background: var(--sp-wide-accent); }
.sp-wide-dot-btn:hover{ background: rgba(255,255,255,0.6); }
.sp-wide-dot-btn.on:hover{ background: var(--sp-wide-accent); }

/* ================= Upload spinner overlay ================= */
.sp-upload-spinner{
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
}
.sp-upload-spinner.is-open{ display: flex; }
.sp-upload-spinner-inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: #fff;
}
.sp-spin{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  animation: sp-spin-rotate 0.8s linear infinite;
}
@keyframes sp-spin-rotate{
  to{ transform: rotate(360deg); }
}
.sp-upload-spinner-text{
  font-size: 14px;
  font-weight: 600;
}

/* ================= Drag-and-drop overlay ================= */
.sp-drop-overlay{
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  pointer-events: none;
}
.sp-drop-overlay.is-open{ display: flex; }
.sp-drop-overlay-inner{
  border: 3px dashed rgba(255,255,255,0.8);
  border-radius: 16px;
  padding: 40px 60px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

/* ================= Ad slides ================= */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@600;700&family=Anton&family=Playfair+Display:wght@700&family=Dancing+Script:wght@700&display=swap');

.sp-wide-ad-badge{
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  background: #ffcc00;
  color: #000;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
}

.sp-ad-overlay-text{
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  text-align: center;
  padding: 24px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8), 0 0 2px rgba(0,0,0,0.9);
  line-height: 1.15;
  pointer-events: none;
  word-break: break-word;
}
.sp-ad-line{
  display: block;
  width: 100%;
}
.sp-ad-line-inner{
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.sp-ad-line-2{
  display: none;
}
.sp-ad-line-2:empty{
  display: none !important;
}

.sp-ad-font-oswald{ font-family: 'Oswald', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.sp-ad-font-anton{ font-family: 'Anton', sans-serif; text-transform: uppercase; letter-spacing: 0.02em; }
.sp-ad-font-playfair{ font-family: 'Playfair Display', serif; font-weight: 700; }
.sp-ad-font-dancing{ font-family: 'Dancing Script', cursive; font-weight: 700; }
.sp-ad-font-georgia{ font-family: Georgia, serif; font-weight: 700; }
.sp-ad-font-system{ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-weight: 700; }

.sp-ad-size-small{ font-size: clamp(16px, 4vw, 22px); }
.sp-ad-size-medium{ font-size: clamp(20px, 5.5vw, 30px); }
.sp-ad-size-large{ font-size: clamp(26px, 7.5vw, 42px); }
.sp-ad-size-xl{ font-size: clamp(32px, 10vw, 56px); }

/* Animations — all run once, quickly, then hold in place. */
.sp-ad-anim-zoom-in{ animation: sp-ad-zoom-in 0.5s ease-out both; }
@keyframes sp-ad-zoom-in{
  from{ opacity: 0; transform: scale(0.5); }
  to{ opacity: 1; transform: scale(1); }
}

.sp-ad-anim-zoom-out{ animation: sp-ad-zoom-out 0.5s ease-out both; }
@keyframes sp-ad-zoom-out{
  from{ opacity: 0; transform: scale(1.8); }
  to{ opacity: 1; transform: scale(1); }
}

.sp-ad-anim-run-left{ animation: sp-ad-run-left 0.4s cubic-bezier(.2,.8,.3,1) both; }
@keyframes sp-ad-run-left{
  from{ opacity: 0; transform: translateX(-60vw); }
  to{ opacity: 1; transform: translateX(0); }
}

.sp-ad-anim-run-right{ animation: sp-ad-run-right 0.4s cubic-bezier(.2,.8,.3,1) both; }
@keyframes sp-ad-run-right{
  from{ opacity: 0; transform: translateX(60vw); }
  to{ opacity: 1; transform: translateX(0); }
}

.sp-ad-anim-run-top{ animation: sp-ad-run-top 0.4s cubic-bezier(.2,.8,.3,1) both; }
@keyframes sp-ad-run-top{
  from{ opacity: 0; transform: translateY(-60vh); }
  to{ opacity: 1; transform: translateY(0); }
}

.sp-ad-anim-run-bottom{ animation: sp-ad-run-bottom 0.4s cubic-bezier(.2,.8,.3,1) both; }
@keyframes sp-ad-run-bottom{
  from{ opacity: 0; transform: translateY(60vh); }
  to{ opacity: 1; transform: translateY(0); }
}

.sp-ad-anim-none{ animation: none; }

/* ================= Fake fullscreen (iOS fallback for images) ================= */
.sp-wide-slab.sp-fake-fullscreen{
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  z-index: 999999;
  border-radius: 0;
  margin: 0 !important;
}
.sp-wide-exit-fake{
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  appearance: none;
  border: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sp-ad-textstyle-boxed-solid{
  background: #000;
  padding: 0.12em 0.45em;
  border-radius: 4px;
  text-shadow: none !important;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.sp-ad-textstyle-boxed-translucent{
  background: rgba(0,0,0,0.65);
  padding: 0.12em 0.45em;
  border-radius: 4px;
  text-shadow: none !important;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.sp-ad-textstyle-outline{
  -webkit-text-stroke: 2px #000;
  text-shadow: none !important;
}
