@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;800&display=swap');

:root {
    --primary: #ef4444;
    --primary-dark: #b91c1c;
    --bg-dark: #2d0606;
}

html {
    min-height: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background:
        linear-gradient(180deg, rgba(43, 11, 16, 0.96) 0%, rgba(127, 29, 29, 0.95) 52%, rgba(42, 10, 18, 0.98) 100%),
        radial-gradient(circle at top left, rgba(254, 202, 202, 0.14), transparent 30%),
        linear-gradient(180deg, #2b0b10 0%, #7f1d1d 48%, #2a0a12 100%);
    background-attachment: fixed;
    background-size: cover;
    background-color: #2d0606;
    min-height: 100%;
    margin: 0;
    color: white;
    overflow-x: hidden;
    position: relative;
}

main {
    min-height: 100vh;
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #ff9999 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: glow-pulse 6s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(255, 153, 153, 0.3);
    filter: drop-shadow(0 0 15px rgba(255, 99, 99, 0.2));
    font-weight: 900;
    letter-spacing: -0.02em;
}

@keyframes glow-pulse {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 153, 153, 0.15);
        filter: drop-shadow(0 0 10px rgba(255, 99, 99, 0.1));
    }
    50% {
        text-shadow: 0 0 25px rgba(255, 153, 153, 0.4);
        filter: drop-shadow(0 0 20px rgba(255, 99, 99, 0.25));
    }
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

/* Main heading glow effect */
h1 {
    animation: title-glow 4s ease-in-out infinite;
    text-shadow: 
        0 0 15px rgba(255, 255, 255, 0.15),
        0 0 30px rgba(255, 153, 153, 0.08);
}

@keyframes title-glow {
    0%, 100% {
        text-shadow: 
            0 0 8px rgba(255, 255, 255, 0.08),
            0 0 15px rgba(255, 153, 153, 0.04);
    }
    50% {
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 0.2),
            0 0 40px rgba(255, 153, 153, 0.12);
    }
}

/* Official label sparkle - only on the label div */
.inline-block.glass-card {
    position: relative;
    overflow: hidden;
    animation: label-glow 5s ease-in-out infinite;
}

.inline-block.glass-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 150%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    animation: sparkle 4s infinite;
    border-radius: inherit;
    pointer-events: none;
}

@keyframes sparkle {
    0% {
        top: -100%;
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

@keyframes label-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 99, 99, 0.1), 0 0 20px rgba(255, 153, 153, 0.05);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 99, 99, 0.2), 0 0 30px rgba(255, 153, 153, 0.1);
    }
}

.ai-santa-text {
    color: #f7d7b2;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.06);
}

.btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #fecaca 100%);
    color: #991b1b;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s ease, background 0.28s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    /* use a softer, slightly brighter gradient instead of solid white to avoid harsh flashes */
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(254,202,202,0.95) 100%);
    /* darker subtle shadow to avoid white flash */
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.45);
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.typing-dot {
    animation: typing 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.hamburger-btn {
    position: relative;
    overflow: visible;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
    transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}

.hamburger-line + .hamburger-line {
    margin-top: 4px;
}

.hamburger-btn.open .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.open .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 640px) {
    .chat-widget {
        right: 16px;
        bottom: 16px;
    }

    .child-page {
        padding-left: 0;
        padding-right: 0;
    }

    .parchment-shell {
        margin: 0 16px 20px;
        border-radius: 1.75rem;
    }

    .content-shell {
        padding: 1.25rem 1rem 1.5rem;
    }

    .child-page .text-center {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .child-page .text-center h2 {
        font-size: 2rem;
        line-height: 1.1;
        margin: 0;
    }

    .child-page .text-center p {
        font-size: 0.95rem;
        max-width: 100%;
        margin: 0;
        padding: 0 0.35rem;
        line-height: 1.55;
    }

    .wax-banner {
        position: static;
        display: inline-flex;
        align-self: center;
        margin: 0.5rem auto 0.5rem;
        z-index: 2;
    }

    .child-page button[aria-label="Zavřít"] {
        top: 0.75rem;
        right: 0.75rem;
    }

    .wax-seal {
        display: none;
    }

    .child-page textarea:not(.child-chat-composer-field) {
        padding: 1rem 1rem 1.1rem;
        min-height: 7.25rem;
    }

    .child-page .child-chat-composer-field {
        min-height: 84px;
        padding: 12px 18px;
    }
}

.chat-toggle {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    border: 1px solid rgba(220, 38, 38, 0.4);
    background: radial-gradient(circle at top left, rgba(220, 38, 38, 0.18), rgba(185, 28, 28, 0.22));
    color: #f8fafc;
    font-size: 1.5rem;
    display: grid;
    place-items: center;
    box-shadow: 0 24px 80px -40px rgba(0,0,0,0.55);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.waveform-bar {
    animation: waveform 1.6s ease-in-out infinite;
}

@keyframes waveform {
    0%, 100% { transform: scaleY(0.9); }
    50% { transform: scaleY(1.4); }
}

.chat-toggle:hover {
    transform: translateY(-2px);
    background: rgba(220, 38, 38, 0.24);
}

.chat-toggle:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.08);
}

.parchment-shell {
    position: relative;
    background: linear-gradient(180deg, #fff9e8 0%, #f9e0b7 35%, #f0cf94 100%);
    border: 1px solid rgba(181, 139, 82, 0.25);
    box-shadow: 0 40px 120px -50px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.parchment-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 10%, rgba(255,255,255,0.5), transparent 20%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.35), transparent 18%),
                linear-gradient(180deg, rgba(255,255,255,0.12), transparent 30%, rgba(0,0,0,0.05));
    pointer-events: none;
}

.parchment-shell::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.25), transparent 55%);
    filter: blur(2px);
    pointer-events: none;
}

.wax-seal {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 90px;
    height: 90px;
    border-radius: 52% 48% 60% 40% / 50% 54% 46% 50%;
    background: radial-gradient(circle at 35% 30%, #ffdf74 0%, #f59e0b 24%, #be123c 52%, #7c1d1d 100%);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: grid;
    place-items: center;
    color: #fde68a;
    font-size: 1.35rem;
    font-weight: 800;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

.wax-seal::before,
.wax-seal::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    transform: rotate(20deg);
}

.wax-seal::before {
    top: 18px;
    left: 10px;
}

.wax-seal::after {
    bottom: 18px;
    right: 10px;
    transform: rotate(-20deg);
}




/* Mobile optimizations for performance (keeps visual effect but reduces repaint cost) */
@media (max-width: 768px) {
    /* avoid costly fixed background on mobile which triggers repaints during scroll */
    body {
        background-attachment: scroll;
    }

    /* reduce backdrop blur to lower GPU work */
    .glass-card {
        backdrop-filter: blur(8px);
    }


}

.child-page {
    position: relative;
    min-height: 100vh;
}

.development-watermark {
    position: fixed;
    z-index: 200;
    top: 46%;
    left: 50%;
    width: 125vw;
    padding: 0.3em 0;
    transform: translate(-50%, -50%) rotate(-18deg);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.015);
    color: rgba(255, 255, 255, 0.085);
    font-size: clamp(1.5rem, 5.5vw, 4.5rem);
    font-weight: 900;
    letter-spacing: 0.16em;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.child-page .child-chat-window {
    border: 1px solid rgba(255, 217, 121, 0.7);
    box-shadow:
        inset 0 1px 0 rgba(255, 240, 190, 0.4),
        inset 0 0 40px rgba(243, 201, 105, 0.08),
        0 0 0 3px rgba(243, 201, 105, 0.07),
        0 24px 70px rgba(0, 0, 0, 0.55),
        0 0 90px rgba(255, 170, 80, 0.2),
        0 30px 120px rgba(2, 6, 23, 0.55);
}

.parent-replies-dialog.parent-replies-dialog {
    position: relative;
    border: 1px solid transparent;
    background:
        linear-gradient(155deg, rgba(16, 31, 53, 0.99), rgba(8, 17, 33, 0.99) 62%, rgba(10, 26, 42, 0.99)) padding-box,
        linear-gradient(145deg, rgba(103, 232, 249, 0.68), rgba(56, 189, 248, 0.22) 45%, rgba(45, 212, 191, 0.52)) border-box;
    box-shadow:
        inset 0 1px 0 rgba(230, 250, 255, 0.16),
        inset 0 0 52px rgba(34, 211, 238, 0.045),
        0 0 0 2px rgba(103, 232, 249, 0.08),
        0 0 0 5px rgba(56, 189, 248, 0.035),
        0 26px 90px rgba(2, 6, 23, 0.76),
        0 0 70px rgba(34, 211, 238, 0.12);
}

.parent-replies-header.parent-replies-header {
    position: relative;
    border-bottom: 1px solid rgba(103, 232, 249, 0.19);
    background: linear-gradient(100deg, rgba(34, 211, 238, 0.09), rgba(56, 189, 248, 0.035) 48%, transparent 82%);
    padding: 0.1rem 0 1rem;
}

.parent-replies-header::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.55), rgba(56, 189, 248, 0.18), transparent);
    content: "";
    pointer-events: none;
}

.parent-replies-title.parent-replies-title {
    color: #f4fbff;
    letter-spacing: -0.035em;
    text-shadow: 0 0 24px rgba(103, 232, 249, 0.16);
}

.parent-replies-view-toggle.parent-replies-view-toggle,
.parent-replies-close.parent-replies-close {
    border-color: rgba(148, 210, 235, 0.2);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.parent-replies-view-toggle.parent-replies-view-toggle:not(:disabled):hover,
.parent-replies-close.parent-replies-close:hover {
    border-color: rgba(103, 232, 249, 0.45);
    background: rgba(34, 211, 238, 0.1);
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.08);
}

.parent-replies-info.parent-replies-info {
    position: relative;
    overflow: hidden;
    border-color: rgba(103, 232, 249, 0.22);
    background:
        radial-gradient(ellipse at 0% 0%, rgba(34, 211, 238, 0.105), transparent 58%),
        linear-gradient(135deg, rgba(27, 48, 70, 0.8), rgba(17, 32, 52, 0.78));
    box-shadow: inset 0 1px 0 rgba(224, 247, 255, 0.09), 0 8px 28px rgba(2, 6, 23, 0.15);
}

.parent-replies-info-kicker.parent-replies-info-kicker {
    color: #8fe8f2;
    text-shadow: 0 0 16px rgba(34, 211, 238, 0.24);
}

.parent-replies-list.parent-replies-list {
    scrollbar-color: rgba(74, 190, 211, 0.45) rgba(5, 13, 27, 0.35);
    scrollbar-width: thin;
}

.parent-replies-list.parent-replies-list::-webkit-scrollbar {
    width: 7px;
}

.parent-replies-list.parent-replies-list::-webkit-scrollbar-track {
    margin-block: 0.5rem;
    border-radius: 999px;
    background: rgba(5, 13, 27, 0.38);
}

.parent-replies-list.parent-replies-list::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(103, 232, 249, 0.72), rgba(56, 189, 248, 0.48)) padding-box;
}

.parent-replies-card.parent-replies-card {
    position: relative;
    border-color: rgba(125, 211, 252, 0.17);
    background:
        radial-gradient(ellipse at 100% 0%, rgba(34, 211, 238, 0.055), transparent 48%),
        linear-gradient(145deg, rgba(30, 49, 71, 0.78), rgba(14, 27, 46, 0.86));
    box-shadow: inset 0 1px 0 rgba(224, 247, 255, 0.065), 0 10px 26px rgba(2, 6, 23, 0.2);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.parent-replies-card.parent-replies-card:focus-within {
    border-color: rgba(103, 232, 249, 0.44);
    box-shadow: inset 0 1px 0 rgba(224, 247, 255, 0.09), 0 0 0 2px rgba(34, 211, 238, 0.065), 0 12px 30px rgba(2, 6, 23, 0.24);
}

.parent-replies-message-content.parent-replies-message-content {
    border-color: rgba(148, 210, 235, 0.12);
    background: linear-gradient(135deg, rgba(5, 15, 31, 0.76), rgba(13, 27, 45, 0.66));
    box-shadow: inset 0 1px 4px rgba(1, 8, 20, 0.38);
}

.parent-replies-message-time {
    color: rgba(186, 214, 226, 0.62);
    font-size: 10px;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}

.parent-replies-audio.parent-replies-audio {
    border-color: rgba(103, 232, 249, 0.15);
    background: rgba(5, 15, 31, 0.48);
}

.parent-reply-audio-player {
    display: grid;
    grid-template-columns: 38px auto minmax(40px, 1fr) auto;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    color: #d8f5fb;
}

.parent-reply-audio-player audio {
    display: none;
}

.parent-reply-audio-play {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(103, 232, 249, 0.3);
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(34, 211, 238, 0.24), rgba(56, 189, 248, 0.12));
    color: #a5f3fc;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.parent-reply-audio-play:hover:not(:disabled) {
    transform: scale(1.05);
    border-color: rgba(103, 232, 249, 0.55);
    background: rgba(34, 211, 238, 0.28);
}

.parent-reply-audio-play:focus-visible,
.parent-reply-audio-seek:focus-visible {
    outline: 2px solid #67e8f9;
    outline-offset: 2px;
}

.parent-reply-audio-play:disabled {
    cursor: wait;
    opacity: 0.55;
}

.parent-reply-audio-play svg {
    width: 15px;
    height: 15px;
}

.parent-reply-audio-time {
    min-width: 34px;
    color: rgba(219, 245, 250, 0.75);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.parent-reply-audio-seek {
    width: 100%;
    height: 5px;
    border-radius: 999px;
    appearance: none;
    background: linear-gradient(to right, #67e8f9 var(--audio-progress), rgba(148, 210, 235, 0.2) var(--audio-progress));
    cursor: pointer;
}

.parent-reply-audio-seek::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    border: 2px solid #08202c;
    border-radius: 50%;
    appearance: none;
    background: #a5f3fc;
    box-shadow: 0 0 0 2px rgba(103, 232, 249, 0.18);
}

.parent-reply-audio-seek::-moz-range-thumb {
    width: 9px;
    height: 9px;
    border: 2px solid #08202c;
    border-radius: 50%;
    background: #a5f3fc;
    box-shadow: 0 0 0 2px rgba(103, 232, 249, 0.18);
}

.parent-reply-audio-seek:disabled {
    cursor: default;
    opacity: 0.48;
}

.parent-reply-audio-error {
    grid-column: 1 / -1;
    margin: 0;
    color: #fda4af;
    font-size: 12px;
}

.parent-replies-status.parent-replies-status {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.parent-replies-response-label.parent-replies-response-label {
    color: #9dddec;
}

.parent-replies-textarea.parent-replies-textarea {
    border-color: rgba(125, 211, 252, 0.2);
    background: linear-gradient(145deg, rgba(5, 15, 31, 0.9), rgba(9, 21, 38, 0.94));
    box-shadow: inset 0 2px 8px rgba(1, 8, 20, 0.34), 0 1px 0 rgba(224, 247, 255, 0.035);
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.parent-replies-textarea.parent-replies-textarea:focus {
    border-color: rgba(103, 232, 249, 0.62);
    background: rgba(6, 18, 34, 0.98);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1), 0 0 22px rgba(34, 211, 238, 0.08), inset 0 2px 8px rgba(1, 8, 20, 0.28);
}

.parent-replies-textarea.parent-replies-textarea:disabled {
    border-color: rgba(125, 211, 252, 0.1);
    background: rgba(5, 15, 31, 0.58);
    color: rgba(226, 232, 240, 0.68);
}

.parent-replies-send.parent-replies-send,
.parent-replies-save.parent-replies-save {
    box-shadow: 0 5px 18px rgba(34, 211, 238, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.parent-replies-send.parent-replies-send:hover:not(:disabled) {
    background: linear-gradient(135deg, #a5f3fc, #7dd3fc);
    box-shadow: 0 7px 24px rgba(56, 189, 248, 0.24);
    transform: translateY(-1px);
}

.parent-replies-save.parent-replies-save:hover:not(:disabled) {
    box-shadow: 0 7px 24px rgba(56, 189, 248, 0.24);
    transform: translateY(-1px);
}

.parent-replies-edit.parent-replies-edit {
    border-color: rgba(103, 232, 249, 0.26);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.13), rgba(56, 189, 248, 0.07));
}

.parent-replies-cancel.parent-replies-cancel {
    border-color: rgba(148, 210, 235, 0.16);
    background: rgba(255, 255, 255, 0.035);
}

.parent-replies-delete.parent-replies-delete {
    border-color: rgba(103, 232, 249, 0.22);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(56, 189, 248, 0.035));
    color: #a5f3fc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.parent-replies-delete.parent-replies-delete:hover {
    border-color: rgba(103, 232, 249, 0.45);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(56, 189, 248, 0.12));
    color: #ecfeff;
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.parent-replies-delete-tooltip.parent-replies-delete-tooltip {
    border-color: rgba(103, 232, 249, 0.2);
    background: linear-gradient(145deg, rgba(16, 31, 53, 0.99), rgba(7, 17, 33, 0.99));
}

.parent-replies-delete-dialog.parent-replies-delete-dialog {
    border-color: rgba(251, 113, 133, 0.2);
    background:
        radial-gradient(circle at 50% 0%, rgba(244, 63, 94, 0.1), transparent 42%),
        linear-gradient(145deg, rgba(18, 27, 46, 0.99), rgba(24, 17, 34, 0.99));
    box-shadow: 0 30px 120px rgba(2, 6, 23, 0.72), 0 0 42px rgba(244, 63, 94, 0.07);
}

.parent-replies-delete-confirm.parent-replies-delete-confirm {
    background: linear-gradient(135deg, #e44763, #c92e50);
    box-shadow: 0 5px 18px rgba(225, 29, 72, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.parent-replies-delete-confirm.parent-replies-delete-confirm:hover {
    background: linear-gradient(135deg, #f05a74, #dc3659);
    box-shadow: 0 7px 24px rgba(225, 29, 72, 0.27);
}

.parent-replies-delete-cancel.parent-replies-delete-cancel {
    border-color: rgba(148, 210, 235, 0.16);
    background: rgba(255, 255, 255, 0.04);
}

.parent-replies-emoji-picker.parent-replies-emoji-picker {
    border-color: rgba(103, 232, 249, 0.36);
    background: linear-gradient(145deg, rgba(16, 31, 53, 0.99), rgba(7, 17, 33, 0.99));
    box-shadow: 0 14px 38px rgba(2, 6, 23, 0.6), 0 0 24px rgba(34, 211, 238, 0.1);
}

.parent-replies-empty.parent-replies-empty {
    border-color: rgba(103, 232, 249, 0.23);
    background:
        radial-gradient(circle at 50% 42%, rgba(34, 211, 238, 0.095), transparent 40%),
        linear-gradient(145deg, rgba(8, 21, 39, 0.7), rgba(5, 13, 27, 0.48));
    box-shadow: inset 0 0 44px rgba(34, 211, 238, 0.045), inset 0 1px 0 rgba(224, 247, 255, 0.045);
}

.parent-replies-empty-icon.parent-replies-empty-icon {
    border-color: rgba(103, 232, 249, 0.2);
    background: radial-gradient(circle at 35% 25%, rgba(34, 211, 238, 0.15), rgba(15, 30, 50, 0.72));
    color: rgba(207, 250, 254, 0.74);
    box-shadow: 0 0 34px rgba(34, 211, 238, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.parent-replies-empty-kicker.parent-replies-empty-kicker {
    color: rgba(143, 232, 242, 0.72);
}

.parent-replies-empty-title.parent-replies-empty-title {
    color: rgba(241, 249, 255, 0.92);
    text-shadow: 0 0 22px rgba(103, 232, 249, 0.1);
}

@media (max-width: 639px) {
    .child-page .child-chat-lights {
        height: 32px;
        margin-top: -8px;
    }

    .child-page .child-chat-window {
        display: flex;
        height: calc(100dvh - 16px);
        min-height: 0;
        flex-direction: column;
        overflow: hidden;
    }

    .child-page .child-chat-window > .relative.z-10 {
        height: 100%;
        min-height: 0;
        flex: 1 1 auto;
    }

    .child-page .child-chat-stage {
        min-height: 0;
        flex: 1 1 0%;
    }

    .child-page .chat-stream {
        height: 100%;
        min-height: 0;
        flex: 1 1 0%;
        overflow-y: auto;
    }

    .child-page .child-chat-composer {
        flex: 0 0 auto;
        border-top: 1px solid rgba(243, 201, 105, 0.2);
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        background: rgba(10, 5, 12, 0.94);
        box-shadow: 0 -12px 28px rgba(10, 5, 12, 0.24);
        backdrop-filter: blur(14px);
    }
}

@media (max-width: 639px) and (max-height: 600px) {
    .child-page .child-chat-window {
        display: block;
        height: auto;
        min-height: calc(100dvh - 1rem);
    }

    .child-page .child-chat-window > .relative.z-10 {
        height: auto;
    }

    .child-page .child-chat-stage {
        min-height: auto;
    }

    .child-page .chat-stream {
        height: 64vh;
        min-height: 54vh;
    }
}

.child-page .child-chat-header {
    background: linear-gradient(180deg, rgba(243, 201, 105, 0.22), transparent);
    border-bottom: 1px solid rgba(243, 201, 105, 0.35);
}

.child-chat-countdown {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #fff4cf;
}

.child-chat-countdown-desktop {
    display: none;
}

.child-chat-countdown-mobile {
    flex: 0 0 auto;
}

.child-chat-countdown-gift {
    font-size: 1.15rem;
}

.child-chat-countdown-copy {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    line-height: 1.1;
}

.child-chat-countdown-caption {
    color: rgba(255, 225, 158, 0.82);
    font-size: 0.48rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    white-space: nowrap;
}

.child-chat-countdown strong {
    color: #ffe08b;
    font-size: 1.2rem;
    font-weight: 900;
    white-space: nowrap;
}

.child-chat-countdown strong span {
    font-size: 0.65rem;
    font-weight: 700;
}

.child-chat-header-tools {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .child-chat-countdown-desktop {
        position: absolute;
        z-index: 30;
        top: 0.75rem;
        left: 50%;
        display: flex;
        justify-content: center;
        transform: translateX(-50%);
    }

    .child-chat-countdown-mobile {
        display: none;
    }

    .child-chat-header-tools {
        width: auto;
        flex: 0 0 auto;
    }

    .child-chat-header-tools .child-chat-spark {
        width: 240px;
    }
}

@media (max-width: 639px) {
    .child-chat-header-tools .child-chat-spark {
        flex: 1 1 auto;
        width: auto;
        max-width: calc(100% - 122px);
        min-width: 0;
    }

    .child-chat-countdown-mobile {
        max-width: 122px;
    }

    .child-chat-countdown-gift {
        font-size: 1rem;
    }

    .child-chat-countdown-caption {
        font-size: 0.42rem;
        letter-spacing: 0.08em;
    }

    .child-chat-countdown strong {
        font-size: 1.05rem;
    }
}

.child-page h2,
.child-page p {
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.wax-banner {
    position: absolute;
    top: 1.5rem;
    left: 2rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.12);
    color: #7c2d12;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.chat-close {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

body[data-child-view='true'] .chat-close,
html[data-child-view='true'] .chat-close {
    display: none !important;
}

.chat-close:hover {
    background: rgba(255,255,255,0.16);
    transform: scale(1.05);
}

.chat-panel {
    width: min(320px, calc(100vw - 32px));
    max-height: 420px;
    border-radius: 2rem;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 30px 80px -40px rgba(0,0,0,0.7);
}

.chat-header {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 0.75rem;
}

.chat-messages {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-right: 0.25rem;
}

.chat-message {
    padding: 0.9rem 1rem;
    border-radius: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 85%;
    word-break: break-word;
}

.chat-message.bot {
    align-self: flex-start;
    background: rgba(255,255,255,0.08);
    color: #f8fafc;
}

.chat-message.user {
    align-self: flex-end;
    background: rgba(248, 113, 113, 0.14);
    color: #fee2e2;
}

.chat-input-wrapper {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    min-width: 0;
    padding: 0.9rem 1rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #f8fafc;
    outline: none;
}

.chat-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.btn-send {
    border-radius: 999px;
    border: none;
    background: rgba(244, 114, 182, 0.9);
    color: #fff;
    padding: 0 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn-send:hover {
    transform: translateY(-1px);
    background: rgba(244, 114, 182, 1);
}

.child-chat-lights {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    height: 38px;
    padding-inline: 14px;
}

.child-chat-lights::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 0;
    right: 0;
    height: 22px;
    border-top: 2px solid #2b1a14;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    opacity: 0.9;
}

.child-chat-light-bulb {
    --bulb-color: #c8102e;
    position: relative;
    z-index: 1;
    width: 12px;
    height: 18px;
    flex: 0 0 12px;
    border-radius: 50% 50% 55% 55%;
    background: var(--bulb-color);
    box-shadow:
        0 0 10px 2px var(--bulb-color),
        0 0 24px 4px color-mix(in srgb, var(--bulb-color) 45%, transparent);
    animation: child-chat-light-twinkle 2.4s ease-in-out infinite;
}

.child-chat-light-bulb::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 3px;
    width: 6px;
    height: 6px;
    border-radius: 1px;
    background: #2b1a14;
}

@keyframes child-chat-light-twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
    .child-chat-light-bulb { animation: none; }
}

@media (max-width: 480px) {
    .child-chat-light-bulb:nth-child(even) { display: none; }
}

.child-chat-angel {
    width: 56px;
    height: 56px;
    flex: none;
}

.child-chat-angel-face {
    background: radial-gradient(circle at 35% 30%, #fff6d6, #f1c86a);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.child-chat-halo {
    position: absolute;
    z-index: 1;
    top: -9px;
    left: 50%;
    width: 36px;
    height: 11px;
    transform: translateX(-50%);
    border: 3px solid #f3c969;
    border-radius: 50%;
    box-shadow: 0 0 14px 3px rgba(243, 201, 105, 0.8);
    animation: child-chat-halo-glow 3s ease-in-out infinite;
}

@keyframes child-chat-halo-glow {
    50% { box-shadow: 0 0 22px 7px rgba(243, 201, 105, 1); }
}

.child-chat-spark {
    border-color: rgba(243, 201, 105, 0.5);
    background: rgba(243, 201, 105, 0.08);
}

.child-chat-spark [role="meter"] {
    height: 8px;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
}

.child-chat-spark [role="meter"] > div {
    background: linear-gradient(90deg, #e8a33a, #fff0a8);
    box-shadow: 0 0 12px rgba(255, 224, 130, 0.9);
}

@media (prefers-reduced-motion: reduce) {
    .child-chat-halo { animation: none; }
}

.child-chat-stage {
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(70% 60% at 50% 108%, rgba(255, 150, 60, 0.42), transparent 70%),
        linear-gradient(45deg, rgba(243, 201, 105, 0.055) 25%, transparent 25%) 0 0 / 36px 36px,
        linear-gradient(-45deg, rgba(243, 201, 105, 0.055) 25%, transparent 25%) 0 0 / 36px 36px,
        linear-gradient(180deg, #260810 0%, #4a0f1c 100%);
}

.child-chat-scene,
.child-chat-stars,
.child-chat-embers {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.child-chat-scene {
    z-index: 0;
}

.child-chat-stars {
    z-index: 1;
}

.child-chat-stars i {
    position: absolute;
    border-radius: 50%;
    background: #ffe7b0;
    box-shadow: 0 0 5px rgba(255, 217, 121, 0.9);
    animation: child-chat-star-twinkle 3s ease-in-out infinite;
}

@keyframes child-chat-star-twinkle {
    0%, 100% { opacity: 0.95; }
    50% { opacity: 0.2; }
}

.child-chat-garland-lights {
    filter: drop-shadow(0 0 5px rgba(255, 217, 121, 0.85));
    animation: child-chat-garland-glow 3s ease-in-out infinite;
}

@keyframes child-chat-garland-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

.child-chat-fire-glow {
    animation: child-chat-firelight 3s ease-in-out infinite alternate;
}

@keyframes child-chat-firelight {
    from { opacity: 0.65; }
    to { opacity: 1; }
}

.child-chat-flame {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: child-chat-flame-flicker 1.1s ease-in-out infinite alternate;
}

.child-chat-flame-slow {
    animation-duration: 1.4s;
    animation-delay: -0.6s;
}

.child-chat-flame-fast {
    animation-duration: 0.8s;
    animation-delay: -0.3s;
}

@keyframes child-chat-flame-flicker {
    from { transform: scale(1, 0.9) skewX(-3deg); }
    to { transform: scale(1.07, 1.1) skewX(3deg); }
}

.child-chat-stockings path:nth-child(-n+4) {
    transform-box: fill-box;
    transform-origin: 50% 0;
    animation: child-chat-stocking-sway 3.4s ease-in-out infinite alternate;
}

.child-chat-stockings path:nth-child(2),
.child-chat-stockings path:nth-child(4) {
    animation-delay: -1.7s;
}

@keyframes child-chat-stocking-sway {
    from { transform: rotate(-2deg); }
    to { transform: rotate(2deg); }
}

.child-chat-embers {
    z-index: 2;
}

.child-chat-embers i {
    position: absolute;
    bottom: 14%;
    border-radius: 50%;
    background: #ffb347;
    box-shadow: 0 0 6px 1px #ff8a2a;
    opacity: 0;
    animation: child-chat-ember-rise linear infinite;
}

@keyframes child-chat-ember-rise {
    0% { transform: translate(0, 0); opacity: 0; }
    12% { opacity: 0.95; }
    100% { transform: translate(var(--ember-drift), -280px); opacity: 0; }
}

.child-chat-mail {
    position: absolute;
    z-index: 20;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    pointer-events: none;
}

.child-chat-mail-fly {
    transform: translate(0, 0) scale(1) rotate(0);
}

.child-chat-mail.is-active .child-chat-mail-fly {
    animation: child-chat-mail-fly-away 0.9s cubic-bezier(0.5, 0, 0.9, 0.4) 2.5s forwards;
}

@keyframes child-chat-mail-fly-away {
    to { transform: translate(190px, -240px) scale(0.25) rotate(18deg); opacity: 0; }
}

.child-chat-envelope {
    position: relative;
    width: min(230px, calc(100vw - 64px));
    height: 150px;
    perspective: 700px;
    opacity: 0;
    filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55));
}

.child-chat-mail.is-active .child-chat-envelope {
    animation: child-chat-envelope-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
}

@keyframes child-chat-envelope-in {
    from { opacity: 0; transform: scale(0.6) translateY(20px); }
    to { opacity: 1; transform: none; }
}

.child-chat-envelope-back {
    position: absolute;
    inset: 0;
    border-radius: 6px;
    background: #e6c273;
}

.child-chat-letter-paper {
    position: absolute;
    z-index: 1;
    top: 8px;
    left: 9%;
    width: 82%;
    height: 128px;
    overflow: hidden;
    border-radius: 4px;
    padding: 10px 12px;
    background: linear-gradient(160deg, #fff7d6, #fbeab4);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    color: #3b2412;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
    transform: translateY(-78px);
}

.child-chat-letter-paper::before {
    display: block;
    margin-bottom: 4px;
    color: #9a4a12;
    font-weight: 800;
    content: "Milý Ježíšku,";
}

.child-chat-mail.is-active .child-chat-letter-paper {
    animation: child-chat-letter-slide-in 0.5s ease-in-out 0.5s forwards;
}

@keyframes child-chat-letter-slide-in {
    to { transform: translateY(16px); }
}

.child-chat-envelope-front {
    position: absolute;
    z-index: 2;
    inset: 0;
    border-radius: 0 0 6px 6px;
    background: linear-gradient(180deg, #f6dc95, #e8c670);
    clip-path: polygon(0 100%, 0 24%, 50% 62%, 100% 24%, 100% 100%);
}

.child-chat-envelope-flap {
    position: absolute;
    z-index: 3;
    top: 0;
    left: 0;
    width: 100%;
    height: 66%;
    transform: rotateX(180deg);
    transform-origin: top;
    background: linear-gradient(180deg, #e9c675, #d9ac52);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.child-chat-mail.is-active .child-chat-envelope-flap {
    animation: child-chat-envelope-close 0.5s ease-in-out 1s forwards;
}

@keyframes child-chat-envelope-close {
    to { transform: rotateX(0); }
}

.child-chat-envelope-seal {
    position: absolute;
    z-index: 4;
    top: 62%;
    left: 50%;
    display: grid;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    place-items: center;
    transform: scale(2.4);
    border-radius: 52% 48% 50% 50%;
    background: radial-gradient(circle at 35% 30%, #e83a48, #a50d28 60%, #7a0a1d);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45), inset 0 0 0 3px rgba(0, 0, 0, 0.12);
    color: #f3c969;
    font-size: 22px;
    opacity: 0;
}

.child-chat-mail.is-active .child-chat-envelope-seal {
    animation: child-chat-seal-stamp 0.35s cubic-bezier(0.3, 1.6, 0.5, 1) 1.55s forwards;
}

@keyframes child-chat-seal-stamp {
    to { opacity: 1; transform: scale(1); }
}

.child-chat-postmark {
    position: absolute;
    z-index: 5;
    right: 10px;
    bottom: 10px;
    display: flex;
    width: 64px;
    height: 64px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotate(-14deg) scale(1.5);
    border: 2px solid rgba(70, 30, 20, 0.8);
    border-radius: 50%;
    color: rgba(70, 30, 20, 0.85);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.25;
    opacity: 0;
    text-align: center;
}

.child-chat-postmark::before {
    position: absolute;
    top: 22px;
    right: 68px;
    width: 60px;
    height: 20px;
    background: repeating-linear-gradient(180deg, rgba(70, 30, 20, 0.8) 0 2px, transparent 2px 6px);
    content: "";
}

.child-chat-postmark i {
    margin-block: 2px;
    border-block: 1px solid rgba(70, 30, 20, 0.7);
    padding-block: 1px;
    font-size: 10px;
    font-style: normal;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.child-chat-mail.is-active .child-chat-postmark {
    animation: child-chat-postmark-in 0.3s ease-out 2s forwards;
}

@keyframes child-chat-postmark-in {
    to { opacity: 0.9; transform: rotate(-14deg) scale(1); }
}

.child-chat-bubble-me {
    position: relative;
}

.child-chat-mail-badge {
    position: absolute;
    z-index: 1;
    top: -12px;
    left: -12px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    transform: rotate(-14deg) scale(1);
    border: 3px double rgba(255, 243, 220, 0.85);
    border-radius: 50%;
    background: rgba(120, 0, 20, 0.9);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    color: #ffe7b0;
    font-size: 14px;
    opacity: 1;
}

.child-chat-mail-badge {
    animation: child-chat-badge-in 0.4s cubic-bezier(0.3, 1.6, 0.5, 1) 2.6s both;
}

@keyframes child-chat-badge-in {
    from { opacity: 0; transform: rotate(-14deg) scale(2); }
    to { opacity: 1; transform: rotate(-14deg) scale(1); }
}

.chat-stream {
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-bottom: 1px solid rgba(243, 201, 105, 0.15);
    scroll-behavior: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: thin;
    scrollbar-color: rgba(243, 201, 105, 0.42) rgba(255, 255, 255, 0.035);
    background: transparent;
}

.chat-stream::-webkit-scrollbar {
    width: 6px;
}

.chat-stream::-webkit-scrollbar-track {
    margin-block: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
}

.chat-stream::-webkit-scrollbar-thumb {
    border: 1px solid rgba(255, 240, 190, 0.2);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 232, 163, 0.52), rgba(196, 137, 54, 0.38));
    transition: background 0.2s ease, border-color 0.2s ease;
}

.chat-stream::-webkit-scrollbar-thumb:hover {
    border-color: rgba(255, 240, 190, 0.42);
    background: linear-gradient(180deg, rgba(255, 232, 163, 0.78), rgba(196, 137, 54, 0.62));
}

@media (prefers-reduced-motion: reduce) {
    .child-chat-stars i,
    .child-chat-garland-lights,
    .child-chat-fire-glow,
    .child-chat-flame,
    .child-chat-stockings path,
    .child-chat-embers i {
        animation: none;
    }

    .child-chat-embers {
        display: none;
    }
}

.child-chat-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: min(88%, 460px);
}

.child-chat-message-me {
    align-self: flex-end;
}

.child-chat-avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: none;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    font-size: 18px;
}

.child-chat-bubble {
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 10px 14px 8px;
    border-radius: 20px;
}

.child-chat-bubble-angel {
    color: #3b2412;
    border: 2px solid #b98a2e;
    background: linear-gradient(160deg, #fff3c4, #fbeab4 55%, #f3d68a);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 6px 16px rgba(0, 0, 0, 0.35);
}

.child-chat-bubble-angel > div:first-child {
    color: #9a4a12;
}

.child-chat-bubble-me {
    color: #fff;
    border-radius: 20px;
    background: linear-gradient(155deg, #e02a3f, #a50d28);
    box-shadow: 0 6px 16px rgba(120, 0, 20, 0.45);
}

.child-chat-bubble-me > div:first-child {
    color: #ffe4e6;
}

.child-chat-typing-bubble {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 14px 16px;
}

.child-chat-typing-bubble span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9a6a22;
    animation: child-chat-typing-dot 1s infinite;
}

.child-chat-typing-bubble span:nth-child(2) { animation-delay: 0.15s; }
.child-chat-typing-bubble span:nth-child(3) { animation-delay: 0.3s; }

@keyframes child-chat-typing-dot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-5px); opacity: 1; }
}

@media (max-width: 480px) {
    .child-chat-message { max-width: 94%; }

    .child-chat-bubble {
        padding: 8px 10px 6px;
    }

    .child-chat-bubble .whitespace-pre-wrap {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .child-chat-typing-bubble span { animation: none; }
}

.child-audio-player {
    position: relative;
    width: fit-content;
    max-width: 100%;
}

.child-audio-player > audio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.child-audio-controls {
    display: flex;
    align-items: center;
}

.child-audio-toggle {
    display: grid;
    width: 38px;
    height: 38px;
    flex: none;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.child-audio-toggle:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.32);
}

.child-audio-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.child-audio-toggle svg {
    width: 16px;
    height: 16px;
}

.child-audio-load {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    padding: 0;
    color: inherit;
    cursor: pointer;
}

.child-audio-load svg {
    width: 16px;
    height: 16px;
}

.child-audio-load:hover {
    background: rgba(255, 255, 255, 0.26);
}

.child-audio-load:disabled {
    cursor: wait;
    opacity: 0.65;
}

.child-audio-error {
    margin-top: 6px;
    color: #fecdd3;
    font-size: 12px;
}

.child-chat-bubble-angel .child-audio-load,
.child-chat-bubble-angel .child-audio-toggle {
    border-color: rgba(154, 106, 34, 0.35);
    background: rgba(154, 106, 34, 0.12);
}

.child-chat-bubble-angel .child-audio-load:hover,
.child-chat-bubble-angel .child-audio-toggle:hover {
    background: rgba(154, 106, 34, 0.2);
}

.child-chat-bubble-angel .child-audio-progress {
    background: rgba(59, 36, 18, 0.2);
}

.child-chat-bubble-angel .child-audio-error {
    color: #9f1239;
}

.child-chat-composer {
    padding: 14px 16px 16px;
    background: rgba(10, 5, 12, 0.6);
}

.child-voice-preview {
    overflow: hidden;
    border: 1px solid rgba(255, 217, 121, 0.22);
    border-radius: 18px;
    background:
        radial-gradient(circle at 0 0, rgba(243, 201, 105, 0.12), transparent 55%),
        linear-gradient(135deg, rgba(48, 25, 27, 0.94), rgba(17, 15, 29, 0.96));
    padding: 13px 15px;
    box-shadow: inset 0 1px 0 rgba(255, 240, 190, 0.08), 0 8px 24px rgba(0, 0, 0, 0.18);
}

.child-voice-preview audio {
    display: none;
}

.child-voice-preview-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

.child-voice-preview-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: none;
    place-items: center;
    border: 1px solid rgba(255, 217, 121, 0.22);
    border-radius: 12px;
    background: rgba(243, 201, 105, 0.1);
    font-size: 17px;
}

.child-voice-preview-heading p {
    margin: 0;
    color: #fff1c8;
    font-size: 13px;
    font-weight: 800;
}

.child-voice-preview-heading span:not(.child-voice-preview-icon) {
    color: rgba(238, 220, 187, 0.68);
    font-size: 11px;
}

.child-voice-preview-controls {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 12px;
}

.child-voice-preview-play {
    display: grid;
    width: 38px;
    height: 38px;
    flex: none;
    place-items: center;
    border: 1px solid rgba(255, 238, 189, 0.55);
    border-radius: 50%;
    background: linear-gradient(145deg, #ffe9a1, #e3ac4d);
    color: #4a2a12;
    box-shadow: 0 3px 12px rgba(243, 201, 105, 0.2);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.child-voice-preview-play svg {
    width: 15px;
    height: 15px;
}

.child-voice-preview-play:not(:disabled):hover {
    transform: scale(1.06);
    box-shadow: 0 4px 16px rgba(243, 201, 105, 0.32);
}

.child-voice-preview-play:disabled {
    cursor: wait;
    opacity: 0.55;
}

.child-voice-preview-time {
    min-width: 34px;
    color: #f5e5c2;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.child-voice-preview-seek {
    width: 100%;
    height: 5px;
    min-width: 0;
    flex: 1;
    border-radius: 999px;
    appearance: none;
    background: linear-gradient(to right, #f3c969 0%, #f3c969 var(--audio-progress), rgba(255, 255, 255, 0.2) var(--audio-progress), rgba(255, 255, 255, 0.2) 100%);
    cursor: pointer;
}

.child-voice-preview-seek::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    appearance: none;
    border: 2px solid #fff2c7;
    border-radius: 50%;
    background: #e0a240;
    box-shadow: 0 0 0 3px rgba(243, 201, 105, 0.16);
}

.child-voice-preview-seek::-moz-range-thumb {
    width: 9px;
    height: 9px;
    border: 2px solid #fff2c7;
    border-radius: 50%;
    background: #e0a240;
    box-shadow: 0 0 0 3px rgba(243, 201, 105, 0.16);
}

.child-voice-preview-seek:disabled {
    cursor: wait;
    opacity: 0.55;
}

.child-voice-preview-play:focus-visible,
.child-voice-preview-seek:focus-visible {
    outline: 2px solid #ffe9a1;
    outline-offset: 3px;
}

.child-voice-preview-error {
    margin: 8px 0 0;
    color: #fecaca;
    font-size: 12px;
}

.child-chat-composer-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.child-chat-composer-field {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    border: 1.5px solid rgba(243, 201, 105, 0.3);
    border-radius: 999px;
    background: #1d1020;
    padding: 13px 20px;
    color: #fff3dc;
    font: inherit;
    font-size: 16px;
    resize: none;
}

.child-chat-composer-field::placeholder {
    color: #b49c86;
}

.child-chat-composer-field:focus-visible {
    border-color: #f3c969;
    box-shadow: 0 0 0 3px rgba(243, 201, 105, 0.25);
}

.child-chat-send {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ffe9a1, #e0a240);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 20px rgba(243, 201, 105, 0.35);
    font-size: 22px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.child-chat-send:not(:disabled):hover {
    transform: scale(1.07) rotate(-6deg);
}

.child-chat-send:not(:disabled):active {
    transform: scale(0.94);
}

.child-chat-send:focus-visible,
.child-chat-emoji button:focus-visible {
    outline: 3px solid #f3c969;
    outline-offset: 2px;
}

.child-chat-emoji {
    gap: 8px;
}

.child-chat-emoji button {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.child-chat-emoji button:hover {
    transform: translateY(-3px) scale(1.1);
    background: rgba(243, 201, 105, 0.22);
}

@media (max-width: 480px) {
    .child-chat-composer {
        padding: 12px;
    }

    .child-chat-emoji {
        gap: 6px;
    }

    .child-chat-emoji button {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .child-chat-send,
    .child-chat-emoji button,
    .child-voice-preview-play {
        transition: none;
    }

    .child-chat-send:not(:disabled):hover,
    .child-chat-emoji button:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .child-chat-mail-badge {
        animation: none;
    }
}
