/* Worship The King — Youth Week 2026
   Dark, regal, glassmorphic. Committed single look (matches the event
   flyer's night-sky/gold identity), so no light-theme branch. */

:root {
  --bg-deep: #150a2e;
  --bg-glow-1: #3a1470;
  --bg-glow-2: #2d1257;
  --bg-glow-3: #7a2b6e;
  --gold: #f4b942;
  --gold-soft: #e8c874;
  --ink: #f5eefc;
  --ink-dim: #b8a9d9;
  --ink-faint: #8677a8;
  --glass-fill: rgba(255, 255, 255, 0.06);
  --glass-fill-strong: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(244, 185, 66, 0.22);
  --danger: #e85d75;
  --success: #7dde92;
  --squad-crown: #f4b942;
  --squad-throne: #e85d75;
  --squad-altar: #5db3e8;
  --squad-sanctuary: #7dde92;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, var(--bg-glow-3) 0%, transparent 55%),
    radial-gradient(ellipse 90% 50% at 85% 15%, var(--bg-glow-1) 0%, transparent 50%),
    radial-gradient(ellipse 100% 60% at 10% 100%, var(--bg-glow-2) 0%, transparent 55%),
    var(--bg-deep);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  padding: 0 16px calc(96px + env(safe-area-inset-bottom)) 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .brand-title, .countdown-title {
  font-family: "Cinzel", Georgia, serif;
}

::selection { background: var(--gold); color: var(--bg-deep); }

button, input, textarea {
  font: inherit;
  color: inherit;
}

.glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.card {
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 10px;
}

.hint {
  font-size: 13px;
  color: var(--ink-dim);
  margin: 8px 0 0 0;
  line-height: 1.5;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-left: none;
  border-right: none;
  border-top: none;
}

.brand { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-sub {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.brand-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-soft);
  white-space: nowrap;
}

.me-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-fill-strong);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.me-squad-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
.me-chip-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
#me-name { font-size: 12px; font-weight: 700; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#me-points { font-size: 11px; color: var(--gold-soft); }

/* ---------- Tab bar ---------- */

.tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 20;
  border-radius: 20px;
  display: flex;
  padding: 6px;
  gap: 2px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 2px 8px;
  border-radius: 14px;
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.tab-icon { font-size: 21px; line-height: 1; }
.tab-btn.is-active {
  color: var(--gold);
  background: rgba(244, 185, 66, 0.12);
}

/* ---------- Buttons & inputs ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease, filter 0.15s ease;
  text-align: center;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #1c0f36;
  box-shadow: 0 8px 24px -8px rgba(244, 185, 66, 0.6);
}
.btn-gold:not(:disabled):hover { filter: brightness(1.05); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--glass-border);
  color: var(--gold-soft);
}

.text-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  margin: 6px 0 14px 0;
  font-size: 15px;
}
.text-input:focus {
  outline: none;
  border-color: var(--gold);
}
.textarea { resize: vertical; min-height: 70px; }

.field-label {
  font-size: 12px;
  color: var(--ink-dim);
  font-weight: 600;
}

/* ---------- Onboarding / modals ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 4, 24, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }

.modal {
  width: 100%;
  max-width: 400px;
  border-radius: 26px;
  padding: 32px 26px;
  text-align: center;
}

.modal-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 10px;
  font-weight: 700;
}

.modal-title {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 16px 0;
  background: linear-gradient(135deg, #fff, var(--gold-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modal-verse {
  font-size: 13.5px;
  color: var(--ink-dim);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 22px;
}

.modal-note { font-size: 12px; color: var(--ink-faint); margin-top: 14px; }

.modal-squad { padding-top: 40px; }
.squad-reveal-name { font-size: 32px; }

/* Squad identity: a colored initial badge, not an emoji mascot. */
.squad-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #1c0f36;
  flex-shrink: 0;
}
.squad-badge-lg { width: 68px; height: 68px; font-size: 32px; margin: 0 auto 10px; }
.squad-badge-sm { width: 24px; height: 24px; font-size: 13px; }

/* ---------- Home tab ---------- */

.countdown-card { text-align: center; }
.countdown-title { font-size: 22px; margin: 0 0 4px 0; color: var(--ink); }
.countdown-sub { font-size: 13px; color: var(--ink-dim); margin: 0 0 18px 0; }
.countdown-time {
  font-variant-numeric: tabular-nums;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gold);
  margin-bottom: 20px;
}

/* The hero gets its own presence — a gold-tinted glow and a top accent —
   so it reads as the primary element, not just another stacked card. */
.countdown-card.hero {
  position: relative;
  padding-top: 26px;
  border-color: rgba(244, 185, 66, 0.4);
  box-shadow: 0 0 0 1px rgba(244, 185, 66, 0.12) inset, 0 24px 48px -24px rgba(244, 185, 66, 0.35);
}
.countdown-card.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 14%;
  width: 72%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Quote strip, not a boxed card — quieter than the hero, left-aligned
   so the page doesn't read as an unbroken column of centered cards. */
.verse-strip {
  margin: 0 0 16px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid rgba(244, 185, 66, 0.45);
  text-align: left;
}
.verse-text { font-style: italic; font-size: 14.5px; line-height: 1.6; color: var(--ink-dim); margin: 0 0 4px 0; }
.verse-ref { font-size: 12px; color: var(--gold-soft); font-weight: 700; font-style: normal; }

/* Compact side-by-side actions instead of two more full-width cards. */
.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.action-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px 10px;
  cursor: pointer;
  color: var(--ink);
}
.action-tile:active { transform: scale(0.98); }
.action-tile:disabled { opacity: 0.5; }
.action-tile-icon { font-size: 24px; line-height: 1; color: var(--gold-soft); }
.action-tile-label { font-size: 12.5px; font-weight: 600; line-height: 1.35; }

/* ---------- Today's quests ---------- */

.quests-card { padding-bottom: 6px; }
.quest-list { display: flex; flex-direction: column; }
.quest-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 0;
  border-top: 1px solid var(--glass-border);
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.quest-row:first-child { border-top: none; }
.quest-row:disabled { cursor: default; }
.quest-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(244, 185, 66, 0.14);
  color: var(--gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.quest-row.is-done .quest-icon { background: rgba(125, 222, 146, 0.16); color: #7dde92; }
.quest-label {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.quest-row.is-done .quest-label { color: var(--ink-dim); }
.quest-meta { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.quest-points { font-size: 12.5px; font-weight: 700; color: var(--gold-soft); }
.quest-progress { font-size: 11px; font-weight: 600; color: var(--ink-dim); }
.quest-check { font-size: 20px; color: #7dde92; }

/* ---------- Install banner ---------- */

.install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(10px + env(safe-area-inset-top));
  z-index: 40;
  border-radius: 16px;
  padding: 12px 12px 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.install-banner[hidden] { display: none; }
.install-banner-icon { width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; }
.install-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.install-banner-text strong { font-size: 13px; }
#install-banner-sub { font-size: 11.5px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.install-banner-action {
  flex-shrink: 0;
  background: var(--gold);
  color: #1c0f36;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.install-banner-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--ink-faint);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}

/* ---------- Schedule tab ---------- */

.section-title { font-size: 22px; margin: 6px 0 2px 0; color: var(--gold-soft); }
.section-sub { font-size: 13px; color: var(--ink-dim); margin: 0 0 18px 0; }

.schedule-list { display: flex; flex-direction: column; gap: 12px; }

.day-card {
  border-radius: var(--radius-md);
  padding: 16px 16px 14px;
  position: relative;
}
.day-card.is-today { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.day-card.is-past { opacity: 0.62; }

.day-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.day-card-num {
  font-family: "Cinzel", serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-soft);
  letter-spacing: 0.06em;
}
.day-card-date { font-size: 12px; color: var(--ink-faint); }
.day-card-check {
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
}

.session-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.session-row:first-of-type { border-top: none; }
.session-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #1c0f36;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.session-info { flex: 1; min-width: 0; }
.session-title { font-size: 14.5px; font-weight: 700; margin: 0; }
.session-blurb { font-size: 12.5px; color: var(--ink-dim); margin: 2px 0 0 0; }
.session-time { flex-shrink: 0; font-size: 11.5px; color: var(--gold-soft); white-space: nowrap; font-weight: 700; }

/* ---------- Engage tab ---------- */

.engage-question { font-size: 15.5px; font-weight: 600; margin: 0 0 14px 0; }

.poll-options { display: flex; flex-direction: column; gap: 8px; }
.poll-option-btn {
  text-align: left;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.poll-option-btn:active { transform: scale(0.99); }
.poll-option-btn:disabled { cursor: default; }

.quiz-option-btn.is-correct {
  background: rgba(125, 222, 146, 0.16);
  border-color: rgba(125, 222, 146, 0.5);
  color: #7dde92;
}
.quiz-option-btn.is-wrong {
  background: rgba(232, 93, 117, 0.16);
  border-color: rgba(232, 93, 117, 0.5);
  color: #e85d75;
}

.poll-results { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.poll-result-row { font-size: 13px; }
.poll-result-label { display: flex; justify-content: space-between; margin-bottom: 4px; font-weight: 600; }
.poll-result-track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.poll-result-fill { height: 100%; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); border-radius: 999px; transition: width 0.4s ease; }

/* ---------- Board tab ---------- */

.squad-bars { display: flex; flex-direction: column; gap: 14px; }
.squad-bar-row { }
.squad-bar-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.squad-bar-points { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink-dim); font-weight: 600; }
.squad-bar-track { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.squad-bar-fill { height: 100%; border-radius: 999px; transition: width 0.5s ease; }

.me-rank {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(244, 185, 66, 0.1);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13.5px;
  font-weight: 700;
}

.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}
.rank-row:first-child { border-top: none; }
.rank-pos { width: 22px; font-weight: 800; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.rank-row.is-top3 .rank-pos { color: var(--gold); }
.rank-row.is-me {
  background: rgba(244, 185, 66, 0.1);
  border-radius: 10px;
  border-top-color: transparent;
  margin: 2px 0;
  padding-left: 8px;
  padding-right: 8px;
}
.rank-row.is-me .rank-name { color: var(--gold-soft); }
.rank-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rank-squad-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rank-pts { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--gold-soft); font-size: 13px; }

/* ---------- Wall tab ---------- */

.photo-upload-label { margin-bottom: 4px; cursor: pointer; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 14px;
}
.photo-tile {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}
.photo-tile img,
.photo-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile { cursor: pointer; }

/* Skeleton shimmer while media loads, then fade in — the gallery mixes
   small app photos with much larger phone-camera/video-frame exports. */
.photo-tile.is-loading,
.board-signature.is-loading {
  background-image: linear-gradient(100deg, rgba(255,255,255,0.02) 30%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.02) 70%);
  background-size: 220% 100%;
  animation: tile-shimmer 1.6s ease-in-out infinite;
}
@keyframes tile-shimmer {
  0% { background-position: 140% 0; }
  100% { background-position: -80% 0; }
}
.photo-tile img, .photo-tile video,
.board-signature img { opacity: 0; transition: opacity 0.35s ease; }
.photo-tile img.is-loaded, .photo-tile video.is-loaded,
.board-signature img.is-loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .photo-tile.is-loading, .board-signature.is-loading { animation: none; }
  .photo-tile img, .photo-tile video, .board-signature img { transition: none; }
}

.shoutout-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.shoutout-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.5;
}
.shoutout-msg { margin: 0 0 8px 0; }
.shoutout-time { display: block; font-size: 11px; color: var(--ink-faint); margin-top: 6px; }

.shoutout-comment-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--gold-soft);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 13px;
  cursor: pointer;
}
.shoutout-comment-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ---------- Signature board ---------- */

.signature-canvas {
  display: block;
  width: 100%;
  height: 160px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-sm);
  touch-action: none;
  cursor: crosshair;
  margin-top: 4px;
}
.signature-actions { display: flex; gap: 10px; margin-top: 10px; }
.signature-btn { padding: 11px 16px; font-size: 13.5px; }

/* One shared board, not a grid of separate cards — a plaque everyone
   signs onto together, like a physical guestbook poster. */
.board-frame {
  position: relative;
  margin: 4px 0 16px 0;
  padding: 18px 16px 16px;
  border-radius: var(--radius-md);
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, rgba(244, 185, 66, 0.05), transparent 60%),
    rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(244, 185, 66, 0.3);
  box-shadow: 0 0 0 1px rgba(244, 185, 66, 0.08) inset, 0 18px 40px -22px rgba(0, 0, 0, 0.6);
}
.board-frame-head {
  text-align: center;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(244, 185, 66, 0.25);
}
.board-frame-title {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-soft);
  letter-spacing: 0.02em;
}
.board-frame-sub {
  display: block;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}
.board-signatures {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 4px;
  min-height: 48px;
}
.board-signature {
  width: 88px;
  height: 40px;
  flex-shrink: 0;
}
.board-signature img { width: 100%; height: 100%; object-fit: contain; display: block; }
.board-empty { text-align: center; margin: 6px 0 0 0; }
.board-empty[hidden] { display: none; }

/* ---------- Wall sub-navigation ---------- */

.wall-subnav {
  display: flex;
  gap: 6px;
  margin: 4px 0 14px 0;
}
.wall-subnav-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 9px 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-dim);
  cursor: pointer;
  text-align: center;
}
.wall-subnav-btn.is-active {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #1c0f36;
  border-color: transparent;
}
.wall-subsection[hidden] { display: none; }

/* ---------- Event gallery: grid + full-screen reel ---------- */

.reel-day-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 10px 0 4px 0;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.reel-day-pills::-webkit-scrollbar { display: none; }
.gallery-grid-tile { position: relative; }
.gallery-grid-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 26px;
  color: rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
  pointer-events: none;
}
.gallery-pill {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-dim);
  cursor: pointer;
}
.gallery-pill.is-active {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #1c0f36;
  border-color: transparent;
}
.gallery-pill:disabled { opacity: 0.35; cursor: default; }

.reel-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #000;
}
.reel-overlay[hidden] { display: none; }
.reel-back-btn {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  left: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(10, 4, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.reel-feed {
  height: 100%;
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}
.reel-item {
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: #000;
}
.reel-media { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.35s ease; }
.reel-media.is-loaded { opacity: 1; }
.reel-item.is-loading {
  background-image: linear-gradient(100deg, rgba(255,255,255,0.02) 30%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.02) 70%);
  background-size: 220% 100%;
  animation: tile-shimmer 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .reel-item.is-loading { animation: none; }
  .reel-media { transition: none; }
}

.reel-type-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(10, 4, 24, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  backdrop-filter: blur(6px);
}

.reel-mute-badge {
  position: absolute;
  top: 58px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(10, 4, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  backdrop-filter: blur(6px);
  pointer-events: none;
  opacity: 0.85;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.reel-mute-badge.is-flash { transform: scale(1.25); opacity: 1; }

.reel-heart-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 90px;
  color: #fff;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5));
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  pointer-events: none;
  z-index: 2;
}
.reel-heart-burst.is-bursting { animation: heart-burst 0.75s ease-out; }
@keyframes heart-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  40% { transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .reel-heart-burst.is-bursting { animation: none; opacity: 0; }
}

.reel-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.reel-day-label { font-size: 12.5px; font-weight: 700; color: var(--ink); }

/* Floats independently of the bottom caption, at real thumb height
   (roughly where a right-hand grip naturally rests) rather than pinned
   to the very bottom edge. */
.reel-actions {
  position: absolute;
  right: 14px;
  bottom: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.reel-actions .like-btn,
.reel-actions .reel-comment-btn {
  flex-direction: column;
  gap: 2px;
  background: none;
  border: none;
  padding: 0;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.reel-actions .like-icon { font-size: 24px; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }
.reel-comment-icon { font-size: 24px; line-height: 1; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)); }

.reel-comment-drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 62%;
  display: flex;
  flex-direction: column;
  background: rgba(12, 6, 26, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(244, 185, 66, 0.3);
  border-radius: 20px 20px 0 0;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  z-index: 3;
}
.reel-comment-drawer[hidden] { display: none; }
.reel-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.reel-drawer-close { background: none; border: none; color: var(--ink-dim); font-size: 16px; cursor: pointer; padding: 4px; }
.reel-drawer-list { flex: 1; min-height: 60px; }

/* ---------- Comments ---------- */

.comment-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; max-height: 220px; overflow-y: auto; }
.comment-list-inline { max-height: 160px; }
.comment-item {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  padding: 8px 10px;
}
.comment-item strong { color: var(--gold-soft); margin-right: 6px; }
.comment-empty { margin: 0; }
.comment-compose { display: flex; gap: 8px; align-items: center; }
.comment-input { flex: 1; margin: 0; padding: 10px 12px; font-size: 13.5px; }
.comment-submit-btn { flex-shrink: 0; width: auto; padding: 10px 16px; font-size: 13px; }

/* ---------- Photo lightbox ---------- */

.lightbox-modal { max-width: 440px; padding: 18px; position: relative; text-align: left; }
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: var(--ink);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  z-index: 1;
}
.lightbox-img { width: 100%; border-radius: var(--radius-sm); display: block; margin-bottom: 10px; max-height: 50vh; object-fit: contain; background: rgba(0,0,0,0.3); }
.lightbox-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px 0; }
.lightbox-meta { font-size: 12.5px; color: var(--ink-dim); margin: 0; }

/* ---------- Likes ---------- */

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-dim);
  cursor: pointer;
  flex-shrink: 0;
}
.like-btn.is-liked { border-color: rgba(232, 93, 117, 0.5); color: var(--ink); }
.like-btn:active { transform: scale(0.96); }
.like-btn:disabled { opacity: 0.45; cursor: default; }
.like-icon { font-size: 15px; line-height: 1; flex-shrink: 0; }
.like-icon-fill { display: none; color: var(--danger); }
.like-btn.is-liked .like-icon-outline { display: none; }
.like-btn.is-liked .like-icon-fill { display: inline; }
.like-count { font-variant-numeric: tabular-nums; }

.shoutout-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(20, 10, 40, 0.95);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.5);
  max-width: calc(100% - 40px);
  text-align: center;
}
.toast[hidden] { display: none; }

/* ---------- Small screens ---------- */

@media (max-width: 360px) {
  .countdown-time { font-size: 28px; }
  .modal-title { font-size: 32px; }
}
