/* Sheet page: scheme A — the painting first, full width, title and actions at the lower left. */
.hero {
  position: relative; min-height: 100svh;
  display: grid; grid-template-rows: 1fr auto;
  background: var(--color-bg);
}
.hero-art {
  width: 100%; height: 100%; max-height: 72svh; object-fit: contain; object-position: 50% 45%;
  align-self: center;
}
.hero-text { padding: var(--space-5) var(--gutter) var(--space-6); display: grid; gap: var(--space-3); }
.hero-text h1 { margin-top: var(--space-1); }
.hero-by { font-size: 1.125rem; color: var(--color-text); }
.hero-where { color: var(--color-text-muted); max-width: var(--measure); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
.hero-note { margin-top: calc(-1 * var(--space-1)); }

.credit { padding: 0 var(--gutter) var(--space-5); color: var(--color-text-faint); font-size: var(--micro-size); line-height: 1.5; max-width: var(--measure); }

main { display: grid; gap: var(--space-8); padding-bottom: calc(var(--space-8) + 96px); }
.section { padding: 0 var(--gutter); }
.section > h2 { margin-bottom: var(--space-5); }
.section-text { max-width: var(--measure); }

/* «А вот как в книге» — the colouring drawing from the book, full width, no frame */
.book-art { width: 100%; height: auto; }
.book-caption { margin-top: var(--space-3); color: var(--color-text-muted); max-width: var(--measure); }

/* story: sentences light up while the voice reads them */
.story-text { display: grid; gap: var(--space-4); max-width: var(--measure); font-size: 1.125rem; line-height: 1.6; }
.story-text .s { transition: color var(--duration-label) var(--ease), opacity var(--duration-label) var(--ease); }
.story.is-playing .story-text .s { opacity: 0.7; }
.story.is-playing .story-text .s.is-active,
.story.is-playing .story-text p.is-active .s { opacity: 1; color: var(--color-moon); }

/* facts: a column with large numerals, hairlines between, no icons */
.facts-list { list-style: none; margin: 0; padding: 0; max-width: var(--measure); }
.facts-list li { display: grid; grid-template-columns: 3rem 1fr; gap: var(--space-3); padding: var(--space-4) 0; border-top: 1px solid var(--color-line); }
.facts-list li:last-child { border-bottom: 1px solid var(--color-line); }
.facts-no { font: 800 2rem / 1 var(--font-display); color: var(--color-moon); letter-spacing: -0.03em; padding-top: 2px; }

/* closing call: the living sheet */
.cta { padding: var(--space-6) var(--gutter); background: var(--color-surface); display: grid; gap: var(--space-4); }
.cta .btn { justify-self: start; min-height: 64px; padding: 0 36px; font-size: 1.25rem; }
.cta .note { margin-top: calc(-1 * var(--space-2)); }

footer { padding: var(--space-6) var(--gutter) var(--space-7); display: grid; gap: var(--space-3); color: var(--color-text-faint); font-size: 0.9375rem; max-width: var(--measure); }

/* player: fixed at the bottom once the story has started */
.player {
  position: fixed; inset: auto 0 0 0; z-index: 10;
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--gutter) calc(var(--space-3) + env(safe-area-inset-bottom));
  background: rgb(15 20 48 / 0.78); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border-top: 1px solid var(--color-line);
}
.player[hidden] { display: none; }
.player .btn { min-height: var(--cta-min); padding: 0 22px; }
.player-time { text-align: right; font-variant-numeric: tabular-nums; color: var(--color-text-muted); }
.player-status { grid-column: 1 / -1; font-size: var(--micro-size); line-height: 1.4; color: var(--color-text-muted); min-height: 1.2em; }
.player-status:empty { display: none; }

@media (min-width: 720px) {
  :root { --gutter: 32px; }
  /* desktop: the painting on the right, the label at the lower left — like a wall label beside the canvas */
  .hero { grid-template-columns: minmax(22rem, 36rem) 1fr; grid-template-rows: 1fr; }
  .hero-text { order: -1; align-self: end; padding: var(--space-8) var(--gutter) var(--space-7); }
  .hero-art { max-height: 100svh; object-position: 50% 50%; padding: var(--space-6) var(--gutter) var(--space-6) 0; }
  .player { grid-template-columns: auto auto 1fr auto; }
  .player-status { grid-column: auto; text-align: right; }
}
