/* Dekhte Hain — scene mode (spec §3.7). A full-screen layer above the app header with its
   own scroll container, so each scene is exactly one screen tall and snaps into place. */
.in-scenes, .in-scenes body { overflow: hidden; }
.scenes { position: fixed; inset: 0; z-index: 20; background: var(--bg); }
.scenes__scroll {
  height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
}
.scenes__bar {
  position: absolute; z-index: 2; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(6px + env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left));
  pointer-events: none;
}
.scenes__bar > * { pointer-events: auto; background: color-mix(in srgb, var(--bg) 85%, transparent); }
.scenes__count { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: var(--ink-soft); padding: 2px 12px; border-radius: 999px; }

.scene {
  height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; grid-template-rows: minmax(0, 62%) 1fr;
  padding: calc(56px + env(safe-area-inset-top)) max(52px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  gap: 12px;
}
.scene__art { position: relative; min-height: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.scene__img, .scene__art .img-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.scene__words { display: grid; align-content: start; gap: 12px; overflow-y: auto; }
.socho { justify-self: start; font-style: normal; text-align: left; }
.socho[aria-expanded="true"] { font-style: italic; background: color-mix(in srgb, var(--glow) 15%, var(--surface)); border-color: var(--glow); }

.scene--end { display: flex; flex-direction: column; align-items: center; gap: 12px; overflow-y: auto; }
.scene--end > * { flex-shrink: 0; }
.scene--end .yaad { width: min(100%, 520px); margin: auto 0 0; padding: 16px; font-size: 17px; line-height: 1.45; }
.scene--end .yaad__beats { gap: 4px; }
.end__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: auto; }

.rail {
  position: absolute; z-index: 2; right: max(2px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%);
  display: grid;
}
.rail__dot {
  width: 44px; height: 40px; border: 0; background: transparent; display: grid; place-items: center; padding: 0;
}
.rail__dot::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--line); border: 2px solid var(--ink-soft); transition: transform .2s; }
.rail__dot[aria-current="step"]::before { background: var(--glow); border-color: var(--glow); transform: scale(1.35); }
.rail__dot--end::before { border-radius: 2px; }
@media (max-height: 520px) { .rail__dot { height: 26px; } }

/* Landscape phones and tablets: picture left (55%), words right. */
@media (orientation: landscape), (min-width: 768px) {
  .scene:not(.scene--end) { grid-template-rows: minmax(0, 1fr); grid-template-columns: 55% 1fr; align-items: center; }
  .scene__art { aspect-ratio: 3 / 4; width: 100%; max-height: 100%; }
  .scene__words { align-content: center; max-height: 100%; }
}
