/* Single Moment Page - Shadcn-inspired Design */
/* WCAG AAA Compliant */
.moment-page {
  min-height: 100vh;
  background: hsl(0 0% 100%);
}
.moment-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem;
}
@media (max-width: 768px) {
  .moment-container {
    padding: 1rem;
  }
}
@media (max-width: 480px) {
  .moment-container {
    padding: 0.75rem;
  }
}
.moment-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1.5px solid #e3e8f0;
  margin-bottom: 1.5rem;
  overflow: hidden;
  position: relative;
}
/* Time-of-day accent bar */
.moment-card .mc-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: 0.75rem 0 0 0.75rem;
  z-index: 2;
}
/* Hero photo on single moment */
.moment-card .mc-hero-photo {
  width: 100%;
  display: block;
  max-height: 480px;
  object-fit: cover;
}
.moment-card .mc-hero-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 2;
}
.moment-card.mc-has-hero .mc-accent {
  display: none;
}
/* Aging patina */
.moment-card[data-age="days"]{filter:saturate(0.96) sepia(0.01)}
.moment-card[data-age="weeks"]{filter:saturate(0.90) sepia(0.02)}
.moment-card[data-age="months"]{filter:saturate(0.82) sepia(0.04);border-color:hsl(30 10% 88%)}
.moment-card[data-age="year"]{filter:saturate(0.72) sepia(0.08);border-color:hsl(30 12% 86%)}
.moment-card[data-age="years"]{filter:saturate(0.60) sepia(0.14);border-color:hsl(30 15% 84%)}

/* ── Weather overlay layer ── */
.mc-weather-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 0.75rem;
  opacity: 0;
  z-index: 1;
}
.moment-card[data-weather="rain"] .mc-weather-layer,.moment-card[data-weather="rainy"] .mc-weather-layer{opacity:1;background:repeating-linear-gradient(105deg,transparent,transparent 6px,rgba(110,145,195,0.08) 6px,rgba(110,145,195,0.08) 7.5px),linear-gradient(180deg,rgba(120,150,200,0.07) 0%,transparent 70%)}
.moment-card[data-weather="rain"],.moment-card[data-weather="rainy"]{border-color:#d0d8e8}
.moment-card[data-weather="cloudy"] .mc-weather-layer{opacity:1;background:radial-gradient(ellipse 120% 40px at 50% 0%,rgba(140,145,165,0.10) 0%,transparent 100%),radial-gradient(ellipse 80% 30px at 30% 5%,rgba(150,155,170,0.08) 0%,transparent 100%)}
.moment-card[data-weather="cloudy"]{border-color:#c8c8d5;background:#f9f9fc}
.moment-card[data-weather="partly-cloudy"] .mc-weather-layer{opacity:1;background:radial-gradient(ellipse 90% 30px at 60% 0%,rgba(140,145,165,0.07) 0%,transparent 100%),linear-gradient(135deg,rgba(255,235,180,0.10) 0%,transparent 40%)}
.moment-card[data-weather="sunny"] .mc-weather-layer{opacity:1;background:linear-gradient(135deg,rgba(255,235,180,0.18) 0%,rgba(255,240,200,0.08) 30%,transparent 60%),radial-gradient(ellipse at 15% 10%,rgba(255,220,130,0.1) 0%,transparent 50%)}
.moment-card[data-weather="sunny"]{border-color:#e8e0c8}
.moment-card[data-weather="storm"] .mc-weather-layer,.moment-card[data-weather="stormy"] .mc-weather-layer{opacity:1;background:linear-gradient(180deg,rgba(60,60,90,0.12) 0%,rgba(70,70,100,0.06) 30%,transparent 55%),repeating-linear-gradient(100deg,transparent,transparent 8px,rgba(80,90,130,0.06) 8px,rgba(80,90,130,0.06) 10px)}
.moment-card[data-weather="storm"],.moment-card[data-weather="stormy"]{border-color:#c8c8d8}
.moment-card[data-weather="fog"] .mc-weather-layer,.moment-card[data-weather="foggy"] .mc-weather-layer{opacity:1;background:linear-gradient(180deg,rgba(160,160,180,0.10) 0%,rgba(165,165,185,0.08) 25%,rgba(170,170,188,0.06) 50%,transparent 100%)}
.moment-card[data-weather="fog"],.moment-card[data-weather="foggy"]{border-color:#c5c5d2;background:#f7f7fb}
.moment-card[data-weather="snow"] .mc-weather-layer,.moment-card[data-weather="snowy"] .mc-weather-layer{opacity:1;background:radial-gradient(circle 3px at 12% 10%,#b0c0e0 0%,#b0c0e0 50%,transparent 51%),radial-gradient(circle 4px at 55% 15%,#a8bad8 0%,#a8bad8 50%,transparent 51%),radial-gradient(circle 2px at 75% 40%,#b8c8e2 0%,#b8c8e2 50%,transparent 51%),radial-gradient(circle 3px at 45% 70%,#b4c4de 0%,#b4c4de 50%,transparent 51%),linear-gradient(180deg,rgba(185,200,225,0.1) 0%,transparent 30%)}
.moment-card[data-weather="snow"],.moment-card[data-weather="snowy"]{border-color:#c8d0e0;background:#f8f9fd}
.moment-card[data-weather="wind"] .mc-weather-layer,.moment-card[data-weather="windy"] .mc-weather-layer{opacity:1;background:repeating-linear-gradient(175deg,transparent,transparent 14px,rgba(130,155,195,0.07) 14px,rgba(130,155,195,0.07) 17px),repeating-linear-gradient(172deg,transparent,transparent 28px,rgba(130,155,195,0.05) 28px,rgba(130,155,195,0.05) 32px)}
.moment-card[data-weather="wind"],.moment-card[data-weather="windy"]{border-color:#d0d8e4}
.moment-card[data-weather="clear"] .mc-weather-layer{display:none}
.moment-card[data-weather="clear"]{border-color:#c0c0d0;background:#fff}
.moment-card[data-weather="clear-stars"] .mc-weather-layer{display:none}
.moment-card[data-weather="clear-stars"]{border-color:#c0c0d0;background:#fff}
.moment-card[data-weather="clear-zodiac"] .mc-weather-layer{display:none}
.moment-card[data-weather="clear-zodiac"]{border-color:#c0c0d0;background:#fff}
/* Clear night sky band */
.mc-sky-band{
  position:relative;height:80px;overflow:visible;
  background:linear-gradient(180deg,#1a1a34 0%,#222248 25%,#3a3a62 45%,#6868a0 62%,#a0a0c0 75%,#d0d0e0 88%,transparent 100%);
  border-radius:0.75rem 0.75rem 0 0;
}
.mc-sky-band::after{content:'';position:absolute;bottom:-28px;left:0;right:0;height:28px;background:linear-gradient(180deg,rgba(208,208,224,0.15) 0%,rgba(220,220,236,0.06) 50%,transparent 100%);pointer-events:none}
.mc-sky-band svg{position:absolute;inset:0;width:100%;height:100%}
.mc-sky-band .star{fill:#8898d0}
.mc-sky-band .star-bright{fill:#e8ecff}
.mc-sky-band .line{stroke:#8898d0;stroke-width:1.2;fill:none;opacity:0.6}
@keyframes mcTwinkle{0%,100%{opacity:0.15}50%{opacity:1}}
.mc-sky-band .twinkle{animation:mcTwinkle 3s ease-in-out infinite}
.mc-sky-band .twinkle:nth-child(3n){animation-duration:2.4s;animation-delay:0.5s}
.mc-sky-band .twinkle:nth-child(5n){animation-duration:3.8s;animation-delay:1.2s}
.mc-sky-band .moon{position:absolute;top:10px;right:16px;z-index:2;opacity:0.65}
.moment-card.mc-has-hero .mc-sky-band{display:none}
@media(prefers-reduced-motion:reduce){.mc-sky-band .twinkle{animation:none !important}}
.moment-card.mc-has-hero .mc-weather-layer{display:none}
.moment-card__body {
  padding: 1.5rem;
}

/* Audio and Video Player Styling */
.moment-audio,
.moment-video {
  background: hsl(0 0% 100%);
  border: 1px solid hsl(240 5.9% 85%);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.moment-audio-header,
.moment-video-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.moment-audio-icon,
.moment-video-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: hsl(240 4.8% 95.9%);
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.moment-audio-icon i,
.moment-video-icon i {
  font-size: 1.5rem;
  color: hsl(240 5.9% 40%);
}

.moment-audio-info,
.moment-video-info {
  flex: 1;
  min-width: 0;
}

.moment-audio-title,
.moment-video-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(240 10% 3.9%);
  margin: 0 0 0.25rem 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moment-audio-subtitle,
.moment-video-subtitle {
  font-size: 0.75rem;
  color: hsl(240 5.3% 45%);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moment-audio audio {
  width: 100%;
  height: 40px;
  border-radius: 0.375rem;
  background: hsl(240 4.8% 97%);
}

/* Custom Audio Controls */
.custom-audio-player {
  width: 100%;
}

.audio-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}

.audio-time-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.audio-time {
  font-size: 0.8125rem;
  color: hsl(240 5.3% 45%);
  font-variant-numeric: tabular-nums;
  min-width: 2.5rem;
}

.audio-progress-container {
  flex: 1;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.audio-progress-bar {
  position: relative;
  width: 100%;
  height: 2px;
  background: hsl(240 5.9% 85%);
  border-radius: 1px;
  overflow: visible;
}

.audio-progress-fill {
  height: 100%;
  background: hsl(240 10% 3.9%);
  border-radius: 1px;
  width: 0%;
  transition: width 0.1s ease;
}

.audio-progress-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background: hsl(240 10% 3.9%);
  border-radius: 50%;
  left: 0%;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.audio-progress-container:hover .audio-progress-handle {
  opacity: 1;
}

.audio-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: hsl(240 10% 3.9%);
  color: hsl(0 0% 100%);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
}

.audio-play-btn:hover {
  background: hsl(240 10% 10%);
  transform: scale(1.05);
}

.audio-play-btn:active {
  transform: scale(0.98);
}

.audio-play-btn i {
  font-size: 0.875rem;
}

.moment-video video {
  width: 100%;
  border-radius: 0.375rem;
}
@media (max-width: 768px) {
  .moment-card__body {
    padding: 1.25rem;
  }
}
@media (max-width: 480px) {
  .moment-card__body {
    padding: 1rem;
  }
}
.moment-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  font-weight: 500;
  background: #294557;
  color: #fff;
  border: none;
  margin-bottom: 1.1rem;
  cursor: pointer;
  transition: background 0.13s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.01);
}
.moment-back-btn:hover, .moment-back-btn:focus {
  background: #1e3340;
  outline: 2px solid #294557;
}
.moment-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}
.moment-title {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.4;
  color: hsl(240 10% 3.9%);
  letter-spacing: -0.01em;
}
.moment-title i {
  font-size: 1.15rem;
  color: hsl(240 5.9% 30%);
  flex-shrink: 0;
}
.moment-date {
  font-size: 0.82rem;
  color: hsl(240 5.3% 35%);
  white-space: nowrap;
}
.moment-content {
  line-height: 1.7;
  color: hsl(240 5.3% 20%);
  margin-bottom: 1.1rem;
  font-size: 1rem;
}
.moment-content img {
  display: block;
  width: calc(100% + 3rem);
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  height: auto;
  max-height: 500px;
  object-fit: cover;
}
.moment-content figure {
  margin: 1rem -1.5rem;
}
.moment-content figure img {
  width: 100%;
  margin: 0;
}
.moment-content figcaption {
  font-size: 0.75rem;
  color: hsl(240 5.3% 35%);
  padding: 0.4rem 1.5rem 0;
  text-align: center;
}
@media (max-width: 480px) {
  .moment-content {
    font-size: 0.97rem;
  }
}
.moment-content p {
  margin: 0 0 0.7rem 0;
}
.moment-content p:last-child {
  margin-bottom: 0;
}
.moment-content h1,
.moment-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.1rem 0 0.5rem 0;
  color: hsl(240 10% 3.9%);
  line-height: 1.3;
}
.moment-content h1:first-child,
.moment-content h2:first-child {
  margin-top: 0;
}
.moment-content h3 {
  font-size: 1.08rem;
  font-weight: 600;
  margin: 0.7rem 0 0.4rem 0;
  color: hsl(240 10% 3.9%);
  line-height: 1.3;
}
.moment-content h4,
.moment-content h5,
.moment-content h6 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0.5rem 0 0.3rem 0;
  color: hsl(240 10% 3.9%);
  line-height: 1.3;
}
.moment-content a {
  color: hsl(221.2 83.2% 40%);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.moment-content a:hover {
  color: hsl(221.2 83.2% 30%);
  text-decoration-thickness: 2px;
}
.moment-content a:focus {
  outline: 3px solid hsl(221.2 83.2% 53.3%);
  outline-offset: 2px;
  border-radius: 2px;
}
.moment-content ul,
.moment-content ol {
  margin: 0 0 0.7rem 1.1rem;
  padding: 0;
}
.moment-content li {
  margin-bottom: 0.25rem;
}
.moment-content blockquote {
  margin: 0.7rem 0;
  padding: 0.7rem 1rem;
  border-left: 4px solid hsl(240 5.9% 85%);
  background: hsl(240 4.8% 97%);
  border-radius: 0 0.375rem 0.375rem 0;
  font-style: italic;
  color: hsl(240 5.3% 30%);
}
.moment-content pre,
.moment-content code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.85rem;
}
.moment-content pre {
  margin: 0.7rem 0;
  padding: 0.7rem;
  background: hsl(240 10% 8%);
  color: hsl(0 0% 95%);
  border-radius: 0.375rem;
  overflow-x: auto;
}
.moment-content code {
  padding: 0.1rem 0.3rem;
  background: hsl(240 4.8% 92%);
  border-radius: 0.25rem;
}
.moment-content pre code {
  padding: 0;
  background: transparent;
}
.moment-images {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  width: calc(100% + 3rem);
}
.moment-images--single {
  grid-template-columns: 1fr;
}
.moment-images--multiple {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}
.moment-image {
  margin: 0;
  border-radius: 0;
  overflow: hidden;
}
.moment-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.moment-image figcaption {
  font-size: 0.75rem;
  color: hsl(240 5.3% 35%);
  padding: 0.3rem 0;
  text-align: center;
}
.moment-voice-memo {
  margin-bottom: 1.1rem;
  padding: 0.7rem;
  background: hsl(240 4.8% 95.9%);
  border: 1px solid hsl(240 5.9% 90%);
  border-radius: 0.375rem;
}
.moment-voice-memo audio {
  width: 100%;
}
.moment-voice-memo__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: hsl(240 10% 3.9%);
  margin-bottom: 0.5rem;
}
.moment-livestream {
  margin-bottom: 1.1rem;
}
.moment-livestream__embed {
  aspect-ratio: 16 / 9;
  border-radius: 0.375rem;
  overflow: hidden;
  background: hsl(240 10% 3.9%);
}
.moment-livestream__embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.moment-livestream__status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.6rem;
  background: hsl(0 84.2% 50%);
  color: hsl(0 0% 100%);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
  animation: pulse-live 2s ease-in-out infinite;
}
@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}
.moment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}
.moment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.6rem;
  background: hsl(240 4.8% 95.9%);
  color: hsl(240 10% 10%);
  border: 1px solid hsl(240 5.9% 85%);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}
.moment-badge:hover {
  background: hsl(240 4.8% 90%);
  border-color: hsl(240 5.9% 70%);
}
.moment-badge:focus {
  outline: 3px solid hsl(221.2 83.2% 53.3%);
  outline-offset: 2px;
}
.moment-badge i {
  font-size: 0.85rem;
}
.moment-badge--live {
  background: hsl(0 84.2% 50%);
  color: hsl(0 0% 100%);
  border-color: hsl(0 84.2% 50%);
}
.moment-badge--pinned {
  background: hsl(45 93% 47%);
  color: hsl(38 92% 15%);
  border-color: hsl(45 93% 47%);
}
.moment-badge--tag {
  background: hsl(210 40% 96%);
  border-color: hsl(210 40% 85%);
  color: hsl(210 40% 20%);
}
.moment-badge--tag:hover {
  background: hsl(210 40% 92%);
  border-color: hsl(210 40% 70%);
}
.moment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.7rem;
  border-top: 1px solid hsl(240 5.9% 90%);
}
.mf-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.5rem;
  background: hsl(0 0% 100%);
  color: hsl(240 10% 10%);
  border: 1px solid hsl(240 5.9% 85%);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.mf-like-btn:hover {
  background: hsl(0 72% 97%);
  border-color: hsl(0 72% 80%);
}
.mf-like-btn:focus {
  outline: 3px solid hsl(221.2 83.2% 53.3%);
  outline-offset: 2px;
}
.mf-like-btn .ph-heart {
  color: hsl(0 72.2% 45%);
}
.mf-like-btn[data-liked="true"] {
  background: hsl(0 72% 95%);
  border-color: hsl(0 72% 75%);
}
.moments-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  border-radius: 0.375rem;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.moments-btn:focus {
  outline: 3px solid hsl(221.2 83.2% 53.3%);
  outline-offset: 2px;
}
.moments-btn--primary {
  background: #294557;
  color: #fff;
  border-color: #294557;
}
.moments-btn--primary:hover {
  background: #1e3340;
}
.moments-btn--secondary {
  background: hsl(0 0% 100%);
  color: hsl(240 10% 3.9%);
  border-color: hsl(240 5.9% 85%);
}
.moments-btn--secondary:hover {
  background: hsl(240 4.8% 95.9%);
  border-color: hsl(240 5.9% 70%);
}
@media (max-width: 768px) {
  .moment-badge,
  .mf-like-btn,
  .moment-back-btn,
  .moments-btn {
    min-height: 44px;
    min-width: 44px;
    font-size: 1rem;
    padding: 0.7rem 1.1rem;
  }
  
  .moment-audio,
  .moment-video {
    padding: 1.25rem;
  }
  
  .moment-audio-header,
  .moment-video-header {
    margin-bottom: 0.75rem;
  }
}
@media (max-width: 480px) {
  .moment-badge,
  .mf-like-btn,
  .moment-back-btn,
  .moments-btn {
    font-size: 1.08rem;
    padding: 0.8rem 1.2rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@media (prefers-contrast: high) {
  .moment-card {
    border-width: 2px;
    border-color: hsl(240 10% 20%);
  }
  .moment-badge,
  .mf-like-btn {
    border-width: 2px;
  }
}
@media (forced-colors: active) {
  .moment-card {
    border: 2px solid CanvasText;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Link Preview Card Styling for single moment page */
.moment-content .mpf-link-preview {
  border: 1px solid hsl(240 5.9% 85%);
  border-radius: 0.5rem;
  overflow: hidden;
  margin: 1rem 0;
  background: hsl(0 0% 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  max-width: 500px;
}

.moment-content .mpf-link-preview:hover {
  border-color: hsl(240 5.9% 70%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.moment-content .mpf-link-preview a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.moment-content .mpf-link-preview-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.moment-content .mpf-link-preview-content {
  padding: 1rem;
}

.moment-content .mpf-link-preview-domain {
  font-size: 0.75rem;
  color: hsl(240 5.3% 45%);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.moment-content .mpf-link-preview-title {
  font-size: 1rem;
  font-weight: 600;
  color: hsl(240 10% 3.9%);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.moment-content .mpf-link-preview-description {
  font-size: 0.875rem;
  color: hsl(240 5.3% 30%);
  line-height: 1.5;
  margin: 0;
}

/* Comments Section Styling */
.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid hsl(240 5.9% 90%);
}

.comments-section__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.comments-section__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: hsl(240 10% 3.9%);
  margin: 0;
}

.comments-section__count {
  font-size: 1rem;
  color: hsl(240 5.3% 45%);
}

/* Comment Form */
.comment-form {
  background: hsl(0 0% 100%);
  border: 1px solid hsl(240 5.9% 85%);
  border-radius: 0.5rem;
  padding: 2.5rem;
  margin-bottom: 3rem;
}

.comment-form__field {
  margin-bottom: 2rem;
}

.comment-form__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(240 10% 3.9%);
  margin-bottom: 0.75rem;
}

.comment-form__input,
.comment-form__textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid hsl(240 5.9% 85%);
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: hsl(240 10% 3.9%);
  background: hsl(0 0% 100%);
  transition: border-color 0.15s ease;
}

.comment-form__input:focus,
.comment-form__textarea:focus {
  outline: 3px solid hsl(221.2 83.2% 53.3%);
  outline-offset: 2px;
  border-color: hsl(221.2 83.2% 53.3%);
}

.comment-form__textarea {
  min-height: 150px;
  resize: vertical;
}

.comment-form__actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Comment List */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Comment Item */
.comment {
  background: hsl(240 4.8% 97%);
  border: 1px solid hsl(240 5.9% 90%);
  border-radius: 0.5rem;
  padding: 1.25rem;
  transition: border-color 0.15s ease;
}

.comment:hover {
  border-color: hsl(240 5.9% 80%);
}

.comment--reply {
  margin-left: 2rem;
  margin-top: 1rem;
  background: hsl(0 0% 100%);
}

@media (max-width: 768px) {
  .comment--reply {
    margin-left: 1rem;
  }
}

.comment__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.comment__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.comment__author-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: hsl(240 10% 3.9%);
}

.comment__date {
  font-size: 0.8125rem;
  color: hsl(240 5.3% 45%);
}

.comment__content {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: hsl(240 5.3% 20%);
  margin-bottom: 1rem;
}

.comment__content p {
  margin: 0 0 0.5rem 0;
}

.comment__content p:last-child {
  margin-bottom: 0;
}

.comment__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid hsl(240 5.9% 88%);
}

.comment__action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  background: hsl(0 0% 100%);
  border: 1px solid hsl(240 5.9% 85%);
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: hsl(240 10% 3.9%);
  cursor: pointer;
  transition: all 0.15s ease;
}

.comment__action-btn:hover {
  background: hsl(240 4.8% 95%);
  border-color: hsl(240 5.9% 70%);
}

.comment__action-btn:focus {
  outline: 3px solid hsl(221.2 83.2% 53.3%);
  outline-offset: 2px;
}

.comment__action-btn--active {
  background: hsl(221.2 83.2% 95%);
  color: hsl(221.2 83.2% 45%);
  border-color: hsl(221.2 83.2% 80%);
}

.comment__reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.comment__reaction {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: hsl(0 0% 100%);
  border: 1px solid hsl(240 5.9% 85%);
  border-radius: 9999px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.comment__reaction:hover {
  background: hsl(240 4.8% 95%);
  border-color: hsl(240 5.9% 70%);
}

.comment__reaction--reacted {
  background: hsl(221.2 83.2% 95%);
  border-color: hsl(221.2 83.2% 80%);
}

/* Reply Form */
.comment__reply-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid hsl(240 5.9% 88%);
}

/* ── Ambient waveform strip ── */
.mf-ambient-strip{
  display:flex;align-items:center;gap:1px;
  height:28px;padding:0 1rem 0 1.25rem;
  background:linear-gradient(180deg,#f8f8fc,#f0f0f6);
  border-top:1px solid #eeeef5;
  cursor:pointer;transition:background 0.15s;
}
.mf-ambient-strip:hover{background:linear-gradient(180deg,#f0f0f8,#e8e8f2)}
.mf-ambient-strip:focus-visible{outline:2px solid #6068a0;outline-offset:-2px}
.mf-wf-bar{width:2px;border-radius:1px;background:#a0a8c8;flex-shrink:0}
.mf-wf-label{font-size:0.6rem;font-weight:700;color:#8890b0;letter-spacing:0.06em;margin-left:8px;text-transform:uppercase;flex-shrink:0}
.mf-ambient-strip.playing .mf-wf-bar{background:#6068a0;animation:mfAudioBar 1.2s ease-in-out infinite}
.mf-ambient-strip.playing .mf-wf-label{color:#6068a0}
@keyframes mfAudioBar{0%,100%{transform:scaleY(0.4)}50%{transform:scaleY(1)}}
@media(prefers-reduced-motion:reduce){.mf-ambient-strip.playing .mf-wf-bar{animation:none !important}}

/* ════════════════════════════════════════════
   DARK MODE — moment detail page
   ════════════════════════════════════════════ */
[data-theme="dark"] .moment-page { background: #0f172a; }
[data-theme="dark"] .moment-container { color: #e2e8f0; }

/* Card */
[data-theme="dark"] .moment-card { background: #1e293b; border-color: #607888; }
[data-theme="dark"] .moment-card[data-weather] { background: #1e293b; border-color: #607888; }
[data-theme="dark"] .moment-card[data-age] { border-color: #607888; filter: none; }

/* Header */
[data-theme="dark"] .moment-header { background: #1e293b; border-color: #607888; }
[data-theme="dark"] .moment-title { color: #f1f5f9; }
[data-theme="dark"] .moment-date { color: #a8b5c4; }
[data-theme="dark"] .moment-meta { color: #a8b5c4; }
[data-theme="dark"] .moment-edited-status { color: #a8b5c4; }

/* Back button */
[data-theme="dark"] .moment-back-btn { background: #7cb8f7; color: #0f172a !important; border-color: #7cb8f7; }
[data-theme="dark"] .moment-back-btn:hover { background: #a5d4fd; color: #0f172a !important; border-color: #a5d4fd; }
[data-theme="dark"] .moment-back-btn:focus { outline-color: #7cb8f7; }

/* Content */
[data-theme="dark"] .moment-content { color: #e2e8f0; }
[data-theme="dark"] .moment-content a { color: #7cb8f7 !important; }
[data-theme="dark"] .moment-content a:hover { color: #a5d4fd !important; }
[data-theme="dark"] .moment-card__body { color: #e2e8f0; }

/* Badges */
[data-theme="dark"] .moment-badge { background: #0f172a; color: #a8b5c4; border-color: #334155; }
[data-theme="dark"] .moment-badge--tag { background: #0f172a; color: #a8b5c4; }
[data-theme="dark"] .moment-badge--live { background: #dc2626; color: #fff; }
[data-theme="dark"] .moment-badge--pinned { background: #1e293b; color: #a8b5c4; }

/* Like button */
[data-theme="dark"] .mf-badge { background: #1e293b; color: #a8b5c4; border-color: #607888; }
[data-theme="dark"] .mf-badge:hover { border-color: #7cb8f7; color: #e2e8f0; }
[data-theme="dark"] .mf-like-btn:hover { color: #f472b6; }

/* Audio player */
[data-theme="dark"] .moment-audio,
[data-theme="dark"] .custom-audio-player { background: #1e293b; border-color: #607888; }
[data-theme="dark"] .moment-audio-title,
[data-theme="dark"] .moment-video-title { color: #f1f5f9; }
[data-theme="dark"] .moment-audio-subtitle,
[data-theme="dark"] .moment-video-subtitle { color: #a8b5c4; }
[data-theme="dark"] .audio-play-btn { background: #7cb8f7; color: #0f172a; }
[data-theme="dark"] .audio-play-btn:hover { background: #a5d4fd; }
[data-theme="dark"] .audio-progress-container { background: #334155; }
[data-theme="dark"] .audio-progress-fill { background: #7cb8f7; }
[data-theme="dark"] .audio-time { color: #a8b5c4; }

/* Video */
[data-theme="dark"] .moment-video { background: #1e293b; border-color: #607888; }

/* Livestream */
[data-theme="dark"] .moment-livestream { background: #1e293b; border-color: #607888; }
[data-theme="dark"] .moment-livestream__status { color: #a8b5c4; }

/* Link preview */
[data-theme="dark"] .mpf-link-preview { background: #1e293b; border-color: #607888; }
[data-theme="dark"] .mpf-link-preview:hover { border-color: #7cb8f7; }
[data-theme="dark"] .mpf-link-preview-title { color: #f1f5f9; }
[data-theme="dark"] .mpf-link-preview-description { color: #a8b5c4; }
[data-theme="dark"] .mpf-link-preview-domain { color: #a8b5c4; }

/* Voice memo */
[data-theme="dark"] .moment-voice-memo { background: #1e293b; border-color: #607888; }
[data-theme="dark"] .moment-voice-memo__label { color: #a8b5c4; }

/* Ambient audio strip */
[data-theme="dark"] .mf-ambient-strip { background: #1e293b; border-color: #607888; }
[data-theme="dark"] .mf-ambient-strip:hover { background: #334155; }
[data-theme="dark"] .mf-wf-bar { background: #607888; }
[data-theme="dark"] .mf-wf-label { color: #a8b5c4; }
[data-theme="dark"] .mf-ambient-strip.playing .mf-wf-bar { background: #7cb8f7; }
[data-theme="dark"] .mf-ambient-strip.playing .mf-wf-label { color: #7cb8f7; }

/* Weather layer */
[data-theme="dark"] .mc-weather-layer { opacity: 0.3; }
[data-theme="dark"] .mc-sky-band { opacity: 0.15; }

/* Star/accent decorations */
[data-theme="dark"] .mc-accent { opacity: 0.4; }
[data-theme="dark"] .mc-hero-accent { opacity: 0.3; }

/* ── MailerLite email subscribe — dark mode ── */
[data-theme="dark"] .ml-embedded,
[data-theme="dark"] .ml-form-embedWrapper {
  background: transparent !important;
}
[data-theme="dark"] .ml-embedded .ml-form-embedBody {
  background: #1e293b !important;
  border-color: #607888 !important;
  border-radius: 8px;
}
[data-theme="dark"] .ml-embedded label,
[data-theme="dark"] .ml-embedded .ml-form-embedBody label {
  color: #e2e8f0 !important;
}
[data-theme="dark"] .ml-embedded h4,
[data-theme="dark"] .ml-embedded .ml-form-embedBody h4 {
  color: #f1f5f9 !important;
}
[data-theme="dark"] .ml-embedded p,
[data-theme="dark"] .ml-embedded .ml-form-embedBody p {
  color: #a8b5c4 !important;
}
[data-theme="dark"] .ml-embedded input[type="email"],
[data-theme="dark"] .ml-embedded .form-control {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #607888 !important;
}
[data-theme="dark"] .ml-embedded input[type="email"]:focus,
[data-theme="dark"] .ml-embedded .form-control:focus {
  border-color: #7cb8f7 !important;
  box-shadow: 0 0 0 3px rgba(124,184,247,.15) !important;
}
[data-theme="dark"] .ml-embedded input::placeholder {
  color: #7a8a9b !important;
}
/* Button — target the button, NOT the .primary wrapper div */
[data-theme="dark"] .ml-embedded .primary {
  background: transparent !important;
}
[data-theme="dark"] .ml-embedded .primary button,
[data-theme="dark"] .ml-embedded button[type="submit"] {
  background: #7cb8f7 !important;
  color: #0f172a !important;
  border-color: #7cb8f7 !important;
}
[data-theme="dark"] .ml-embedded .primary button:hover,
[data-theme="dark"] .ml-embedded button[type="submit"]:hover {
  background: #a5d4fd !important;
}
/* Checkbox */
[data-theme="dark"] .ml-embedded input[type="checkbox"] {
  accent-color: #7cb8f7;
  background-color: #0f172a !important;
  border-color: #607888 !important;
}
[data-theme="dark"] .ml-embedded input[type="checkbox"]:checked {
  background-color: #7cb8f7 !important;
  border-color: #7cb8f7 !important;
}
[data-theme="dark"] .ml-embedded .label-description,
[data-theme="dark"] .ml-embedded .label-description p {
  color: #a8b5c4 !important;
}
[data-theme="dark"] .ml-embedded .label-description a {
  color: #7cb8f7 !important;
}
/* Success/error messages */
[data-theme="dark"] .ml-embedded .ml-form-successContent h4 {
  color: #f1f5f9 !important;
}
[data-theme="dark"] .ml-embedded .ml-form-successContent p {
  color: #a8b5c4 !important;
}
