/* Cteni se zvuky (AI ukol #1400) - prvky vytvari reading.js, proto globalni styl (ne .razor.css) */
.rd-picker { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.rd-pick { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--tdb-border); background: var(--tdb-box); color: var(--tdb-text); text-decoration: none; font-size: 14px; }
.rd-pick:hover { border-color: #A855F7; }
.rd-pick-on { background: #A855F7; border-color: #A855F7; }
.rd-pick-select { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--tdb-border); background: var(--tdb-input); color: var(--tdb-text); font-size: 14px; }

.rd-root { --rd-a: #1e1b4b; --rd-b: #0b1020; --rd-fx: #fff; position: relative; }
.rd-root[data-scene="les"] { --rd-a: #14532d; --rd-b: #052e16; --rd-fx: #fde68a; }
.rd-root[data-scene="noc"] { --rd-a: #1e1b4b; --rd-b: #020617; --rd-fx: #fff; }
.rd-root[data-scene="bourka"] { --rd-a: #334155; --rd-b: #0f172a; --rd-fx: #93c5fd; }
.rd-root[data-scene="hrad"] { --rd-a: #7c2d12; --rd-b: #1c1917; --rd-fx: #fcd34d; }
.rd-root[data-scene="domov"] { --rd-a: #78350f; --rd-b: #292524; --rd-fx: #fb923c; }

.rd-stage { position: sticky; top: 0; z-index: 2; height: 170px; border-radius: 18px; overflow: hidden; margin-bottom: 12px;
    background: linear-gradient(180deg, var(--rd-a), var(--rd-b)); transition: background 1.2s; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.rd-sky { position: absolute; inset: 0; }
.rd-fx { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--rd-fx); opacity: .8; animation: rd-twinkle 4s ease-in-out infinite; }
.rd-root[data-scene="les"] .rd-fx { width: 5px; height: 5px; box-shadow: 0 0 8px 2px var(--rd-fx); animation-name: rd-firefly; }
.rd-root[data-scene="domov"] .rd-fx { width: 4px; height: 4px; box-shadow: 0 0 6px 2px var(--rd-fx); animation-name: rd-spark; top: auto !important; bottom: 0; }
.rd-root[data-scene="hrad"] .rd-fx { width: 4px; height: 4px; box-shadow: 0 0 6px 1px var(--rd-fx); animation-name: rd-firefly; }
.rd-root[data-scene="bourka"] .rd-fx { width: 1px; height: 22px; border-radius: 0; opacity: .5; animation-name: rd-rain; animation-timing-function: linear; }
.rd-deco { position: absolute; right: 22px; bottom: 6px; font-size: 92px; line-height: 1; filter: drop-shadow(0 0 22px rgba(255,255,255,.25)); animation: rd-float 6s ease-in-out infinite; }
.rd-scene-label { position: absolute; left: 14px; top: 12px; padding: 4px 12px; border-radius: 999px; background: rgba(0,0,0,.35); font-size: 13px; color: #fff; }
.rd-flash { animation: rd-flash 1.2s ease-out; }
.rd-pop { position: absolute; inset: 0; pointer-events: none; }
.rd-pop-item { position: absolute; bottom: 10px; font-size: 64px; animation: rd-pop 2.6s ease-out forwards; }
.rd-lightning .rd-stage::after { content: ""; position: absolute; inset: 0; background: #fff; animation: rd-bolt .7s ease-out forwards; }

.rd-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.rd-btn { padding: 10px 16px; border-radius: 12px; border: 1px solid var(--tdb-border); background: var(--tdb-box); color: var(--tdb-text); font-size: 15px; cursor: pointer; }
.rd-btn:hover:not(:disabled) { border-color: #A855F7; }
.rd-btn:disabled { opacity: .4; cursor: not-allowed; }
.rd-btn-main { background: #A855F7; border-color: #A855F7; font-weight: 600; }
.rd-btn.rd-on { background: #ef4444; border-color: #ef4444; animation: rd-pulse 1.6s ease-in-out infinite; }
.rd-status { color: var(--tdb-muted); font-size: 14px; min-height: 20px; }
.rd-heard { color: #c4b5fd; font-style: italic; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; }
.rd-progress { height: 4px; background: var(--tdb-border); border-radius: 2px; margin: 10px 0 14px; overflow: hidden; }
.rd-progress div { height: 100%; width: 0; background: linear-gradient(90deg, #A855F7, #F59E0B); transition: width .4s; }

.rd-book { background: #fdf6e3; color: #3b2f1e; border-radius: 18px; padding: 28px clamp(18px, 4vw, 48px); font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(19px, 2.3vw, 24px); line-height: 1.75; box-shadow: inset 0 0 60px rgba(120, 80, 20, .15); }
.rd-title { font-size: 1.4em; margin: 0 0 .6em; color: #7c2d12; text-align: center; }
.rd-par { margin: 0 0 1em; }
.rd-w { cursor: pointer; border-radius: 6px; padding: 0 2px; transition: color .3s, background .3s; }
.rd-w:hover { background: rgba(168, 85, 247, .15); }
.rd-read { color: #a8977c; }
.rd-cur { background: #fde68a; color: #3b2f1e; box-shadow: 0 2px 0 #F59E0B; }
.rd-has-sound { font-weight: 700; color: #7e22ce; }
.rd-has-sound::after { content: attr(data-emoji); font-size: .7em; margin-left: 2px; vertical-align: super; }
.rd-read.rd-has-sound { color: #a78bfa; }
.rd-fired { animation: rd-word 1s ease-out; }

@keyframes rd-twinkle { 0%, 100% { opacity: .15; } 50% { opacity: .9; } }
@keyframes rd-firefly { 0%, 100% { transform: translate(0, 0); opacity: .2; } 50% { transform: translate(18px, -14px); opacity: 1; } }
@keyframes rd-spark { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-160px); opacity: 0; } }
@keyframes rd-rain { 0% { transform: translateY(-180px); } 100% { transform: translateY(200px); } }
@keyframes rd-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes rd-pop { 0% { transform: translateY(40px) scale(.3); opacity: 0; } 20% { transform: translateY(-20px) scale(1.2); opacity: 1; } 100% { transform: translateY(-90px) scale(1); opacity: 0; } }
@keyframes rd-bolt { 0%, 30% { opacity: .9; } 15%, 100% { opacity: 0; } }
@keyframes rd-flash { 0% { transform: scale(1.4); background: #A855F7; } 100% { transform: scale(1); } }
@keyframes rd-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .5); } 50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } }
@keyframes rd-word { 0% { transform: scale(1); } 30% { background: #e9d5ff; } 100% { transform: scale(1); } }

@media (max-width: 600px) {
    .rd-stage { height: 130px; }
    .rd-deco { font-size: 64px; }
    .rd-btn { flex: 1 1 45%; }
}
