/* Adapter for moqmar/weather.css (MIT). Keeps the source effect behind the UI. */
/* Cropped poster variant: the original bottom contact / email copy is excluded. */
body::before {
  background-image: linear-gradient(90deg, rgba(2,5,7,.88), rgba(2,5,7,.36) 48%, rgba(2,5,7,.8)), url('/ask-static/night-postbox-poster-cropped.png');
}

.vault-stage {
  background-image: linear-gradient(180deg, rgba(4,11,14,.4), rgba(2,7,9,.8)), url('/ask-static/night-postbox-poster-cropped.png');
}

#editModal::before {
  background-image: linear-gradient(rgba(2,7,9,.78), rgba(2,7,9,.9)), url('/ask-static/night-postbox-poster-cropped.png');
}

/* The crescent glyph has uneven side bearings; this is an optical centering correction. */
.moon-mark > span {
  display: block;
  line-height: 1;
  transform: translate(-2px, 4px);
}

.host-topbar h1 span { color: #d7423d; }

/* Presenter reading panel: title and reader name belong to the record itself. */
.host-body .night-record-heading {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 15px;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(230,217,193,.2);
}

.host-body .spotlight-body::before {
  content: none;
}

.spotlight[hidden] { display: none; }

.host-body .spotlight-body #spotlightTitle {
  margin: 0;
  color: #f6ecde;
  font-size: clamp(1.85rem, 3.6vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: .015em;
  text-shadow: 2px 3px 0 #67151a, 0 0 18px rgba(218, 70, 61, .18);
}

.host-body .night-record-nickname {
  color: #d7b6a6;
  font-size: 1rem;
  letter-spacing: .04em;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .host-body .night-record-heading { gap: 7px 11px; margin-bottom: 19px; padding-bottom: 13px; }
  .host-body .spotlight-body #spotlightTitle { font-size: 1.72rem; }
  .host-body .night-record-nickname { font-size: .88rem; }
}

.horror-rain.weather {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: .24;
  mix-blend-mode: screen;
}

.horror-rain.weather::before,
.horror-rain.weather::after {
  z-index: 0;
  opacity: .42;
  /* weather.css' original drop texture, compressed only horizontally for finer rain. */
  transform: rotate(10deg) scaleX(.58);
}

.ask-shell,
.host-shell,
.modal,
.submit-toast {
  position: relative;
  z-index: 1;
}

.modal,
.submit-toast { position: fixed; }

.storm-lightning {
  position: fixed;
  inset: 0;
  /* Keep the bolt inside the night scene, never above letters or controls. */
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  filter: blur(2.2px);
  transition: opacity 140ms ease-out;
}

body.storm-flash::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(190, 211, 255, .1);
  animation: storm-source-flash 380ms ease-out both;
}

@keyframes storm-source-flash {
  0%, 100% { opacity: 0; }
  20% { opacity: 1; }
  48% { opacity: .22; }
}

@media (max-width: 700px) {
  .mobile-break { display: inline; }

  .feature-stage-card .section-head-tight {
    display: block;
  }

  .feature-stage-card .section-head-tight .chip {
    display: inline-block;
    margin-top: 12px;
  }

  .horror-rain.weather { opacity: .14; }
  .horror-rain.weather::before { opacity: .36; animation-duration: 3.4s; }
  .horror-rain.weather::after { display: none; }

  /* Keep the atmosphere, but make each retained layer cheap to composite. */
  .fog {
    display: block;
    width: 58vw;
    height: 16vh;
    filter: blur(18px);
    opacity: .14;
    will-change: transform;
    transform: translate3d(0, 0, 0);
  }
  .fog-one { left: -29vw; bottom: 15vh; }
  .fog-two { right: -27vw; top: 24vh; }

  body::before {
    filter: blur(1.5px);
    transform: translate3d(0, 0, 0) scale(1.02);
    will-change: transform;
  }

  .ask-card {
    background: linear-gradient(135deg, rgba(6,14,17,.95), rgba(9,19,22,.91));
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .vault-stage { height: 430px; }
}

@media (min-width: 701px) {
  .mobile-break { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .horror-rain.weather,
  .storm-lightning { display: none; }
}
