:root {
  --bg: #15110e; --paper: #e9dcc3; --dim: #a08f74; --gilt: #b08a3e; --gilt-dark: #6d5220;
  --accent: #8e2b2b;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(ellipse at 50% 20%, #241c15 0%, var(--bg) 60%, #0b0907 100%);
  color: var(--paper); font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  display: flex; justify-content: center; min-height: 100%;
}
main { width: min(100%, 560px); padding: 20px 16px 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
header { text-align: center; }
h1 { font-weight: 400; font-size: clamp(22px, 4vw, 30px); letter-spacing: .08em; margin: 0; text-transform: uppercase; }
.sub { margin: 6px 0 0; color: var(--dim); font-style: italic; font-size: 16px; }

.frame {
  margin: 0; width: 100%; max-width: 440px;
  padding: 14px; background:
    linear-gradient(135deg, #d4b061, var(--gilt) 30%, var(--gilt-dark) 55%, var(--gilt) 80%, #d4b061);
  border-radius: 3px; box-shadow: 0 30px 60px rgba(0,0,0,.7), inset 0 0 0 2px rgba(0,0,0,.35), inset 0 0 0 6px rgba(255,235,180,.25);
}
.canvas { position: relative; aspect-ratio: 768 / 1376; background: #000; overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0,0,0,.6); }
.canvas img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; }
#layerB { opacity: 0; }
figcaption { margin-top: 12px; color: #2a1e0e; display: flex; flex-direction: column; gap: 2px; text-align: center; min-height: 3.4em; }
figcaption .age { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; }
figcaption .caption { font-style: italic; font-size: 15px; line-height: 1.25; }

.controls { width: 100%; max-width: 440px; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
#play { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gilt);
  background: transparent; color: var(--paper); font-size: 16px; cursor: pointer; }
#play:hover { background: rgba(176,138,62,.18); }
#slider { width: 100%; margin: 0; accent-color: var(--accent); cursor: pointer; height: 28px; }
.ticks { position: relative; height: 18px; font-size: 12px; color: var(--dim); }
.ticks span { position: absolute; transform: translateX(-50%); letter-spacing: .05em; cursor: pointer; }
.ticks span.on { color: var(--paper); }
.hint { color: var(--dim); font-size: 14px; margin: 0; }

@media (prefers-color-scheme: light) { /* the piece is dark by design; nothing to switch */ }
