/* Stable story frames with a restrained lift for the selected context. */
.night-scenarios {
  --night-muted: #62626b;
  min-width: 0;
  margin-top: 18px;
  color: var(--ink, #202026);
}

.night-scenarios__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, 304px);
  align-items: start;
  gap: 10px;
}

.night-scenarios__item {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 304px;
  overflow: hidden;
  border: 1px solid #e0e0e5;
  border-radius: 21px;
  background: #eeeef1;
  transform-origin: center;
  transition: transform 340ms cubic-bezier(.22,.61,.36,1), box-shadow 340ms, background-color 240ms, border-color 240ms;
}

.night-scenarios__item[open] {
  z-index: 1;
  transform: scale(1.02);
  box-shadow: 0 7px 18px rgb(25 25 35 / .045);
  border-color: #d8d8df;
  background: #fff;
}

.night-scenarios__item > summary {
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.night-scenarios__item > summary::-webkit-details-marker { display: none; }
.night-scenarios__item > summary::marker { content: ''; }

.night-scenarios__item > summary:focus-visible {
  border-radius: 22px;
  outline: 2px solid #37373e;
  outline-offset: -4px;
}

.night-scenarios__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.25;
  letter-spacing: -.25px;
}

.night-scenarios__indicator {
  position: relative;
  flex: none;
  width: 14px;
  height: 17px;
  color: #82828c;
}

.night-scenarios__indicator::before,
.night-scenarios__indicator::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 2px;
  width: 10px;
  height: 1px;
  background: currentColor;
}

.night-scenarios__indicator::after { transform: rotate(90deg); }
.night-scenarios__item[open] .night-scenarios__indicator::after { display: none; }

.night-scenarios__thumbnail {
  display: block;
  width: 100%;
  height: 118px;
  border-radius: 13px;
  object-fit: contain;
  background: #f7f7f9;
  opacity: .65;
}

.night-scenarios__preview {
  margin-top: auto;
  max-width: 195px;
  color: var(--night-muted);
  font-size: 11px;
  line-height: 1.5;
}

.night-scenarios__item[open] > summary {
  height: auto;
  padding-bottom: 12px;
}

.night-scenarios__item[open] .night-scenarios__heading { font-size: 14px; }
.night-scenarios__item[open] .night-scenarios__preview,
.night-scenarios__item[open] .night-scenarios__thumbnail { display: none; }

.night-scenarios__body { padding: 0 16px 16px; }
.night-scenarios__item[open] .night-scenarios__body { animation: night-scenarios-reveal 180ms ease-out; }

.night-scenarios__body > img {
  display: block;
  width: 100%;
  height: 118px;
  border-radius: 13px;
  background: #f7f7f9;
  object-fit: contain;
}

.night-scenarios__copy { margin-top: 10px; }

.night-scenarios__copy > p {
  margin: 0;
  color: var(--night-muted);
  font-size: 11px;
  line-height: 1.6;
}

.night-scenarios__copy > p + p { margin-top: 7px; }
.night-scenarios__copy > p:last-child { color: var(--ink, #202026); }

.night-scenarios__copy p > span {
  margin-right: 5px;
  color: #696973;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .55px;
  text-transform: uppercase;
}

@keyframes night-scenarios-reveal {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .night-scenarios { margin-top: 18px; }
  .night-scenarios__grid {
    display: flex;
    flex-direction: column;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    height: auto;
    transition: none;
  }
  .night-scenarios__item { height: 84px; flex: none; }
  .night-scenarios__item[open] { height: 334px; transform: none; box-shadow: none; }
  .night-scenarios__item > summary {
    min-height: 84px;
    height: auto;
    gap: 8px;
    padding: 16px;
  }
  .night-scenarios__item[open] > summary { min-height: 0; }
  .night-scenarios__thumbnail { display: none; }
  .night-scenarios__heading { font-size: 14px; }
  .night-scenarios__preview { max-width: none; font-size: 11px; }
  .night-scenarios__body > img { height: 130px; }
  .night-scenarios__copy > p { font-size: 12px; line-height: 1.65; }
  .night-scenarios__copy p > span { font-size: 8px; }
  .night-scenarios__item[open] .night-scenarios__body { animation: none; }
}

@media (prefers-contrast: more) {
  .night-scenarios { --night-muted: #44444a; }
}

@media (prefers-reduced-motion: reduce) {
  .night-scenarios__grid,
  .night-scenarios__item { transition: none; }
  .night-scenarios__item[open] { transform: none; box-shadow: none; }
  .night-scenarios__item[open] .night-scenarios__body { animation: none; }
}
