/* ============================================================
   GODDY TABI — SPOTLIGHT.CSS (v2 — premium redesign)
   TikTok-style vertical snap feed, icon-based top nav, glass
   reaction rail, premium create flow. No emoji anywhere — every
   icon is inline SVG. Loaded last, after dashboard.css.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,800;1,600&display=swap');

:root {
  --sl-radius: 22px;
  --sl-gold-grad: linear-gradient(135deg, #F0C040 0%, #D4A017 60%, #B8860B 100%);
  --sl-navy-grad: linear-gradient(160deg, #0F1E42 0%, #1B2D5E 55%, #243875 100%);
}

.spotlight-page {
  padding: 0 0 90px;
  max-width: 470px;
  margin: 0 auto;
  width: 100%;
}

/* ── Smart-hide nav wrapper — slides up on scroll-down ────── */
.spotlight-navwrap {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--bg);
  transform: translateY(0);
  transition: transform 0.25s ease;
}
.spotlight-navwrap--hidden { transform: translateY(-100%); }

/* ── App bar — wordmark + post icon, Instagram-style ────────── */
.spotlight-appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
}
.spotlight-appbar__wordmark {
  font-family: 'Playfair Display', 'Inter', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 24px;
  color: var(--navy-deep);
  display: flex;
  align-items: center;
  gap: 8px;
}
.spotlight-appbar__wordmark svg { width: 20px; height: 20px; stroke: var(--gold); flex-shrink: 0; }
.spotlight-appbar__actions { display: flex; align-items: center; gap: 6px; }
.spotlight-appbar-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--navy);
}
.spotlight-appbar-btn svg { width: 21px; height: 21px; stroke-width: 1.8; }
.spotlight-appbar-btn--post {
  background: var(--sl-navy-grad);
  color: white;
  width: auto;
  padding: 0 14px;
  border-radius: 20px;
  gap: 6px;
  height: 36px;
  font-size: 12.5px;
  font-weight: 700;
}
.spotlight-appbar-btn--post svg { stroke: white; width: 16px; height: 16px; }

/* ── Filter chips row ─────────────────────────────────────── */
.spotlight-chiprow {
  display: flex;
  gap: 8px;
  padding: 2px 16px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.spotlight-chiprow::-webkit-scrollbar { display: none; }
.spotlight-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
}
.spotlight-chip svg { width: 14px; height: 14px; }
.spotlight-chip.active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

/* Small clarifying line under the tab bar — states exactly what the
   active tab includes so "All" and "My Class" never look/read like
   the same thing to a first-time parent. */
.spotlight-scope-hint {
  padding: 0 16px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Feed — Instagram-style stacked cards ─────────────────── */
.spotlight-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.spotlight-card {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  margin: 0 12px 16px;
  box-shadow: 0 4px 18px rgba(15,30,66,0.08);
  opacity: 0;
  animation: gt-card-in 0.45s cubic-bezier(0.22,1,0.36,1) forwards;
  /* Thin category-colored top edge — a small "which template is this"
     signal that reads even before the poster image itself loads. */
  border-top: 3px solid var(--chip, transparent);
}
@keyframes gt-card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.spotlight-card--skeleton { padding: 12px; animation: none; opacity: 1; }
.spotlight-card--skeleton .skel { width: 100%; aspect-ratio: 1; border-radius: 14px; }

/* Header row: colored avatar, poster, class/week, type chip */
.spotlight-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 10px;
}
.spotlight-card__avatar {
  width: 36px; height: 36px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.spotlight-card__avatar svg { width: 18px; height: 18px; }
.spotlight-card__header-text { flex: 1; min-width: 0; }
.spotlight-card__poster {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spotlight-card__subline {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 1px;
}
.spotlight-card__type-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--chip), color-mix(in srgb, var(--chip) 70%, black));
  color: white;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  box-shadow: 0 3px 8px color-mix(in srgb, var(--chip) 40%, transparent);
}
/* Was missing entirely — the category icon (graduation cap, flask,
   book, etc.) had no size constraint here, so it rendered at the
   browser's default ~300x150px instead of a small inline icon. That's
   what was taking over the full-screen preview. */
.spotlight-card__type-chip svg { width: 12px; height: 12px; flex-shrink: 0; }
.spotlight-card__header .spotlight-card__more {
  width: 28px; height: 28px;
  background: var(--bg);
  border-color: transparent;
}

/* Media — full-width square container (unchanged). The photo now
   scales DOWN to fit fully inside it (object-fit: contain) instead of
   being cropped to fill it — portrait, landscape, whatever shape the
   upload is, the whole photo stays visible. */
.spotlight-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg);
  cursor: pointer;
  overflow: hidden;
}
.spotlight-card__media img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 0.3s ease; }
.spotlight-card__media:active img { transform: scale(0.97); }
.spotlight-card__bubbles { position: absolute; inset: 0; overflow: visible; pointer-events: none; z-index: 4; }

.spotlight-card__caption {
  padding: 10px 14px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-primary);
}
.spotlight-card__caption b { font-weight: 800; }
.spotlight-card__caption-desc { color: var(--text-secondary); margin-top: 2px; }
.spotlight-card__readmore {
  display: block;
  border: none;
  background: none;
  padding: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.spotlight-card__summary {
  display: flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: none;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
}
.spotlight-card__summary-dots { display: inline-flex; align-items: center; }
.spotlight-card__summary-dots svg { width: 15px; height: 15px; margin-left: -5px; filter: drop-shadow(0 0 1px white); }
.spotlight-card__summary-dots span:first-child svg { margin-left: 0; }

/* Double-tap heart burst (on preview) */
.spotlight-burst {
  position: absolute;
  top: 50%; left: 50%;
  width: 90px; height: 90px;
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
}
.spotlight-burst svg { width: 100%; height: 100%; fill: white; stroke: white; }
.spotlight-burst.play { animation: gt-burst 0.7s cubic-bezier(0.17,0.89,0.32,1.49); }
@keyframes gt-burst {
  0%   { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  35%  { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
  55%  { transform: translate(-50%, -50%) scale(0.95); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Action row — colorful circular reaction badges, matching the
   reference mockup, with share/download as separate outlined
   circular buttons after a thin divider. */
.spotlight-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 4px;
}
.spotlight-reaction-badge {
  position: relative;
  width: 30px; height: 30px;
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.12s cubic-bezier(0.34,1.56,0.64,1);
}
.spotlight-reaction-badge svg { width: 15px; height: 15px; }
.spotlight-reaction-badge__count {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 13px; height: 13px;
  padding: 0 3px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--navy);
  font-size: 8.5px;
  font-weight: 800;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.spotlight-reaction-badge.active {
  transform: scale(1.14);
  box-shadow: 0 0 0 2.5px white, 0 0 0 4px currentColor, 0 3px 8px rgba(0,0,0,0.2);
}
.spotlight-reaction-badge:active { transform: scale(0.85); }
.spotlight-reaction-badge.pulse { animation: gt-icon-pulse 0.4s ease; }
@keyframes gt-icon-pulse {
  0% { transform: scale(1); } 45% { transform: scale(1.35) rotate(-6deg); } 100% { transform: scale(1.14); }
}

.spotlight-actions-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 2px;
}

.spotlight-icon-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: transform 0.12s ease, background 0.12s ease;
}
.spotlight-icon-btn svg { width: 16px; height: 16px; }
.spotlight-icon-btn:active { transform: scale(0.85); background: var(--bg); }

/* ── Floating bubbles ─────────────────────────────────────── */
.spotlight-bubble {
  position: absolute;
  bottom: 8%;
  opacity: 0;
  animation: gt-bubble-float 2.5s ease-out forwards;
  will-change: transform, opacity;
}
.spotlight-bubble svg { width: 22px; height: 22px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25)); stroke: white; }
.spotlight-bubble--text {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
@keyframes gt-bubble-float {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.5) rotate(0deg); }
  15%  { opacity: 1; transform: translate(calc(var(--drift) * 0.3), -20%) scale(1) rotate(8deg); }
  100% { opacity: 0; transform: translate(var(--drift), -220%) scale(1.05) rotate(-6deg); }
}

/* ── Load older ───────────────────────────────────────────── */
.spotlight-load-older {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px;
  margin: 4px 14px 0;
  border-radius: 16px;
  border: none;
  background: white;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15,30,66,0.06);
}
.spotlight-load-older svg { width: 15px; height: 15px; }
.spotlight-load-older:hover { background: var(--bg); }

/* ── Reaction breakdown popover ───────────────────────────── */
.spotlight-breakdown {
  position: fixed;
  inset: 0;
  background: rgba(6,12,28,0.45);
  /* Must render above .spotlight-preview (z-index 99999) — this menu
     is opened from the 3-dot button both in the feed AND from inside
     the full-screen preview. At the old z-index (210) it rendered
     BEHIND the preview when triggered from there — invisible, even
     though the tap still landed on it underneath. */
  z-index: 100010;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.spotlight-breakdown.open { opacity: 1; }
.spotlight-breakdown__sheet {
  background: white;
  width: 100%;
  border-radius: 20px 20px 0 0;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.32,0.72,0,1);
}
.spotlight-breakdown.open .spotlight-breakdown__sheet { transform: translateY(0); }
.spotlight-breakdown__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.spotlight-breakdown__row:last-child { border-bottom: none; }
.spotlight-breakdown__row svg { width: 20px; height: 20px; stroke: var(--navy); }
.spotlight-breakdown__row span { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.spotlight-breakdown__row b { margin-left: auto; color: var(--text-muted); font-weight: 700; }

/* ── Post options menu (3-dot) — currently just Delete ────── */
.spotlight-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: none;
  padding: 14px 4px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}
.spotlight-menu-item svg { width: 19px; height: 19px; stroke: var(--text-secondary); flex-shrink: 0; }
.spotlight-menu-item--danger { color: #E0245E; }
.spotlight-menu-item--danger svg { stroke: #E0245E; }

/* ── Delete confirmation sheet ─────────────────────────────── */
.spotlight-confirm-title { font-size: 15px; font-weight: 800; color: var(--text-primary); margin-bottom: 6px; }
.spotlight-confirm-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.4; }
.spotlight-btn-danger { background: #E0245E; color: #ffffff; border-color: #E0245E; }
.spotlight-btn-danger:active { background: #C01E50; }
/* Same reasoning as .spotlight-breakdown above — must out-rank the
   full-screen preview (z-index 99999) since this can be opened from
   inside it. */
.spotlight-delete-overlay { z-index: 100020; }

/* ── Full-screen preview ──────────────────────────────────── */
.spotlight-preview {
  position: fixed;
  inset: 0;
  background: #05070f;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  touch-action: none;
}
.spotlight-preview.open { opacity: 1; }
.spotlight-preview__drag-handle {
  width: 40px; height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.3);
  margin: calc(10px + env(safe-area-inset-top)) auto 0;
  flex-shrink: 0;
}
.spotlight-preview__close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top)); right: 16px;
  width: 42px; height: 42px;
  border-radius: 50%;
  /* Solid dark backdrop — always visible regardless of the image
     behind it (our flyers are often cream/white, so a translucent
     button would be nearly invisible against them). */
  background: rgba(10, 16, 32, 0.85);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 0 1.5px rgba(255,255,255,0.15);
  border: none;
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 5;
}
.spotlight-preview__close:active { transform: scale(0.88); }
.spotlight-preview__close svg { width: 19px; height: 19px; stroke: white; }
.spotlight-preview__zoom {
  position: absolute;
  top: calc(66px + env(safe-area-inset-top)); right: 16px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(10, 16, 32, 0.85);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4), 0 0 0 1.5px rgba(255,255,255,0.15);
  border: none;
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 5;
}
.spotlight-preview__zoom:active { transform: scale(0.88); }
.spotlight-preview__zoom svg { width: 18px; height: 18px; stroke: white; }
.spotlight-preview__img-wrap--zoomed { cursor: grab; touch-action: none; }
.spotlight-preview__img-wrap--zoomed img { cursor: grab; }
.spotlight-preview__img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 0;
  position: relative;
}
.spotlight-preview__img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.spotlight-preview__footer {
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
}
.spotlight-preview__caption { padding: 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spotlight-preview__caption .spotlight-card__more { margin-left: auto; }
.spotlight-preview__title {
  flex-basis: 100%;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 8px;
  line-height: 1.35;
}
.spotlight-preview__desc {
  flex-basis: 100%;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  margin-top: 3px;
  line-height: 1.5;
}
/* Reaction badges already carry their own solid colors — fine as-is
   on the dark backdrop. Share/download and the divider default to
   light-card styling (white fill, light border), which needs to be
   reskinned here or they render as bright white circles on black. */
.spotlight-preview__footer .spotlight-icon-btn {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  color: #ffffff;
}
.spotlight-preview__footer .spotlight-icon-btn:active { background: rgba(255,255,255,0.22); }
.spotlight-preview__footer .spotlight-actions-divider { background: rgba(255,255,255,0.25); }

/* ── Empty / error states ─────────────────────────────────── */
.spotlight-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 64px 24px;
}
.spotlight-empty__icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--gold-pale);
  display: flex; align-items: center; justify-content: center;
}
.spotlight-empty__icon svg { width: 28px; height: 28px; stroke: var(--gold); }
.spotlight-empty__title { font-size: 16px; font-weight: 800; color: var(--navy-deep); }
.spotlight-empty__sub { font-size: 13px; color: var(--text-muted); max-width: 260px; }

/* ══════════════════════════════════════════════════════════
   CREATE FLOW — premium bottom sheet
   ══════════════════════════════════════════════════════════ */
.sheet--tall { max-height: 94vh; }

/* ── Posting progress overlay ──────────────────────────────
   Covers the whole preview sheet while a post is being prepared and
   uploaded, so the screen doesn't look frozen for the several seconds
   this can take on a slow connection. Positioned against the base
   .sheet class's own `position: fixed` (components.css) — .sheet--tall
   must NEVER add its own `position` here, since .sheet--tall is always
   combined with .sheet on every bottom sheet in the app (attendance,
   personal/class reports, admin forms, not just Spotlight), and
   overriding it to `position: relative` broke every one of them: the
   backdrop still showed, but the sheet itself dropped out of fixed
   positioning and rendered off-screen in normal document flow until
   the user manually scrolled down to find it. */
.spotlight-upload-overlay {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(2px);
  z-index: 20;
  border-radius: inherit;
}
.spotlight-upload-overlay.open { display: flex; }
.spotlight-upload-overlay__text {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-deep);
}

.spotlight-create-progress {
  display: flex;
  gap: 6px;
  padding: 0 20px 4px;
}
.spotlight-create-progress__seg {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
}
.spotlight-create-progress__seg.done::after,
.spotlight-create-progress__seg.active::after {
  content: '';
  display: block;
  height: 100%;
  background: var(--sl-gold-grad);
  border-radius: 4px;
  width: 100%;
}

.spotlight-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.spotlight-choice-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 16px;
  border-radius: 18px;
  border: none;
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.spotlight-choice-card:active { transform: scale(0.97); }
.spotlight-choice-card:hover { box-shadow: 0 6px 18px rgba(15,30,66,0.1); }
.spotlight-choice-card__icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: white;
}
.spotlight-choice-card__icon svg { width: 21px; height: 21px; stroke: var(--navy); stroke-width: 1.7; }
.spotlight-choice-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  background: var(--sl-navy-grad);
  color: white;
}
.spotlight-choice-card--featured .spotlight-choice-card__icon { background: rgba(255,255,255,0.15); }
.spotlight-choice-card--featured .spotlight-choice-card__icon svg { stroke: white; }
.spotlight-choice-card__label { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.spotlight-choice-card__sub { font-size: 11.5px; opacity: 0.7; font-weight: 500; }

/* ── Child picker — avatar grid ───────────────────────────── */
.spotlight-child-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--bg);
  border: 1.5px solid transparent;
  margin-top: 10px;
}
.spotlight-child-search:focus-within { border-color: var(--navy); background: white; }
.spotlight-child-search svg { width: 16px; height: 16px; stroke: var(--text-muted); flex-shrink: 0; }
.spotlight-child-search input { flex: 1; border: none; background: none; font-size: 14px; outline: none; }

.spotlight-child-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.spotlight-child-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px;
}
.spotlight-child-tile__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  color: var(--navy);
  font-size: 18px;
  border: 2.5px solid transparent;
  overflow: hidden;
  transition: all 0.15s ease;
}
.spotlight-child-tile__avatar img { width: 100%; height: 100%; object-fit: cover; }
.spotlight-child-tile.selected .spotlight-child-tile__avatar {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-pale);
}
.spotlight-child-tile__name { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); text-align: center; line-height: 1.2; }

/* ── Photo upload — premium card, not an empty box ────────── */
.spotlight-photo-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold-pale), var(--bg));
  border: 1.5px dashed rgba(212,160,23,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.spotlight-photo-card__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--navy);
}
.spotlight-photo-card__empty-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(212,160,23,0.25);
}
.spotlight-photo-card__empty-icon svg { width: 24px; height: 24px; stroke: var(--gold); }
.spotlight-photo-card__empty-label { font-size: 13px; font-weight: 700; }
.spotlight-photo-card__empty-sub { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.spotlight-photo-card img { width: 100%; height: 100%; object-fit: cover; }
.spotlight-photo-card__change {
  position: absolute;
  bottom: 10px; right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15,30,66,0.75);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 99px;
}
.spotlight-photo-card__change svg { width: 13px; height: 13px; }

/* ── Preview stage ─────────────────────────────────────────── */
.spotlight-stage {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}
.spotlight-stage canvas {
  width: 100%;
  max-width: 300px;
  border-radius: 18px;
  box-shadow: 0 24px 50px rgba(15,30,66,0.28);
}

/* ── Type/scope segmented control (admin only) ────────────── */
.spotlight-seg {
  display: flex;
  background: var(--bg);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}
.spotlight-seg button {
  flex: 1;
  border: none;
  background: none;
  padding: 9px 8px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
}
.spotlight-seg button.active { background: white; color: var(--navy); box-shadow: 0 1px 4px rgba(15,30,66,0.1); }

/* ── Gallery grid ──────────────────────────────────────────── */
.spotlight-gallery { padding-top: 2px; }
.spotlight-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 10px;
}
.spotlight-gallery-item {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg);
}
.spotlight-gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.spotlight-gallery-week-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--navy);
  margin: 20px 10px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.spotlight-gallery-week-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Full story sheet — "Read more" reading view ──────────── */
.spotlight-readbody__sub {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.spotlight-readbody__text {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  white-space: pre-wrap;
}

/* ── Create flow — optional field hint text ───────────────── */
.spotlight-field-hint {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 12px;
}

/* ── Floating post button — replaces the old top-bar Post button,
   hides/shows in sync with the nav bar on scroll ─────────────── */
.spotlight-fab {
  position: fixed;
  right: 18px;
  bottom: calc(90px + env(safe-area-inset-bottom));
  width: 56px; height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--sl-navy-grad);
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(15,30,66,0.38), 0 0 0 1px rgba(255,255,255,0.08);
  cursor: pointer;
  z-index: 12;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s ease;
}
.spotlight-fab svg { width: 24px; height: 24px; stroke-width: 2.4; }
.spotlight-fab:active { transform: scale(0.9); }
.spotlight-fab--hidden {
  transform: translateY(140%) scale(0.8);
  opacity: 0;
  pointer-events: none;
}
@media (min-width: 1100px) {
  .spotlight-fab { right: calc(50% - 450px + 18px); }
}

/* ── Desktop: the full-screen preview shouldn't fill a 27" monitor —
   cap it to a centered, app-like lightbox on wider viewports. Using
   margin:auto instead of a translate() keeps it compatible with the
   swipe-to-close drag transform (no transform conflict). ────────── */
/* ── Desktop/tablet: the full-screen preview shouldn't fill a 27"
   monitor edge-to-edge, but it also shouldn't look tiny — size it to
   ~80% of the viewport, capped so it doesn't sprawl on ultrawide
   screens. Using margin:auto instead of a translate() keeps it
   compatible with the swipe-to-close drag transform. ────────────── */
@media (min-width: 640px) {
  .spotlight-preview {
    width: 80vw;
    max-width: 1200px;
    height: 88vh;
    max-height: 900px;
    margin: auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
  }
}

/* Live "N / max" caption-length counter, under the compose textarea. */
.spotlight-char-counter {
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 4px;
}
.spotlight-char-counter--warn { color: #B45309; }
.spotlight-char-counter--over { color: #DC2626; }

@media (min-width: 640px) {
  .spotlight-page { max-width: 600px; }
  .spotlight-gallery-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1100px) {
  .spotlight-page { max-width: 900px; }
  .spotlight-feed { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 12px; }
  .spotlight-gallery-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ── Card design picker (preview step) ────────────────────────────────
   Four templates rather than one. Shown under the live preview so the
   teacher can see the change immediately. */
.spotlight-tpl {
  display: flex;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.spotlight-tpl::-webkit-scrollbar { display: none; }

.spotlight-tpl__btn {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border: 1px solid var(--border, #E8ECF4);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--text-secondary, #5A6485);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.spotlight-tpl__btn:hover { border-color: var(--navy, #1B2D5E); color: var(--navy, #1B2D5E); }
.spotlight-tpl__btn.is-active {
  border-color: var(--navy, #1B2D5E);
  background: var(--navy, #1B2D5E);
  color: #fff;
}
.spotlight-tpl__dot {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.14);
}
.spotlight-tpl__dot[data-d="editorial"] { background: linear-gradient(135deg,#1B2D5E 0 60%,#D4A017 60% 100%); }
.spotlight-tpl__dot[data-d="frame"]     { background: linear-gradient(180deg,#D4A017 0 55%,#1B2D5E 55% 100%); }
.spotlight-tpl__dot[data-d="split"]     { background: linear-gradient(150deg,#D4A017 0 50%,#C2410C 50% 100%); }
.spotlight-tpl__dot[data-d="classic"]   { background: #FBFAF7; box-shadow: inset 0 0 0 2px #1B2D5E; }

/* Photo tile while a picked photo is being decoded and normalised */
.spotlight-photo-card.is-busy,
#photo-card.is-busy { opacity: .6; pointer-events: none; }
