/* «Нечуті пісні»: the voice message from the host that starts his story (src/unheard-story.js). The slot sits over the
   cover; the message is pinned to its lower left corner and never covers the title, the keys or the list. */
.unheard-story { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.unheard-story [data-story-button] { pointer-events: auto; }
.unheard-story [data-story-button]:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

/* In the design's tokens. On phones it shrinks to the play key and the wave, so it stays inside the cover. */
.story-voice { position: absolute; left: -10px; bottom: -14px; display: flex; align-items: center; gap: 10px; max-width: calc(100% + 4px); padding: 8px 14px 8px 8px; border: 1px solid var(--line-strong); border-radius: 18px 18px 18px 4px; background: var(--paper); color: var(--ink); text-align: left; box-shadow: 0 10px 24px #0006; cursor: pointer; transform-origin: 0 100%; }
.story-voice.is-idle { animation: voice-arrive 6s ease-out infinite; }
.story-voice-avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--lime); color: var(--on-lime); }
.story-voice-avatar svg { width: 22px; height: 25px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.story-voice-body { display: grid; gap: 3px; min-width: 0; }
.story-voice-name { font-size: 13px; font-weight: 800; white-space: nowrap; }
.story-voice-row { display: flex; align-items: center; gap: 8px; }
.story-voice-play { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--lime); color: var(--on-lime); }
.story-voice-play .icon { width: 14px; height: 14px; }
.story-voice-play .icon-play { margin-left: 2px; }
.story-voice-play .icon-pause, .story-voice:is(.is-talking, .is-loading) .story-voice-play .icon-play { display: none; }
.story-voice:is(.is-talking, .is-loading) .story-voice-play .icon-pause { display: inline-block; }
.story-voice-wave { display: flex; align-items: center; gap: 2px; height: 24px; }
.story-voice-bar { width: 3px; height: var(--h, 50%); min-height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 35%, transparent); transition: background .2s; }
.story-voice-bar.is-played { background: var(--lime); }
.story-voice-status { color: var(--muted); font-size: 11px; font-weight: 600; white-space: nowrap; }
.story-voice-dot { position: absolute; top: -4px; right: -4px; width: 14px; height: 14px; border: 2px solid var(--paper); border-radius: 50%; background: #3390ec; animation: voice-dot 1.4s ease-in-out infinite; }
.story-voice.is-heard .story-voice-dot { display: none; }
/* Windows 98: a raised grey message window with the navy selection, not the desktop's teal. */
:root[data-theme="win98"] .story-voice { border: 0; border-radius: 0; background: var(--win-face); color: var(--win-text); box-shadow: var(--win-raised), 4px 4px 0 #0005; }
:root[data-theme="win98"] :is(.story-voice-avatar, .story-voice-play) { border-radius: 0; background: var(--win-select); color: #fff; }
:root[data-theme="win98"] .story-voice-bar.is-played { background: var(--win-select); }
:root[data-theme="win98"] .story-voice-status { color: var(--win-text-2); }
/* Neo-Swiss: the block has no side padding, so the message sits flush with the cover's edge, square like its grid. */
:root[data-theme="neo-swiss"] .story-voice { left: 0; border-color: var(--ink); border-radius: 0; }
:root[data-theme="neo-swiss"] :is(.story-voice-avatar, .story-voice-play) { border-radius: 0; }
@keyframes voice-arrive { 0%, 90%, 100% { transform: none; } 93% { transform: translateY(-4px) scale(1.05); } 96.5% { transform: scale(.98); } }
@keyframes voice-dot { 50% { transform: scale(1.3); } }
@media (max-width: 760px) {
  .story-voice { left: -6px; bottom: -10px; gap: 6px; padding: 8px 10px 8px 8px; border-radius: 14px 14px 14px 4px; }
  .story-voice-avatar, .story-voice-name, .story-voice-status { display: none; }
  .story-voice-bar:nth-child(n + 15) { display: none; }
  .story-voice-wave { height: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .story-voice, .story-voice-dot { animation: none; }
  .story-voice-bar { transition: none; }
}
