html {
    min-height: 100%;
    background: oklch(96.7% 0.003 264.542);
}

@supports (-webkit-touch-callout: none) and (not (translate: none)) {
    @media  (width <= 500px) {
        html {
            min-height: 114dvh !important;
        }
        
        html.is-safari body.scene-preview-active {
            height: 114dvh;
        }

        html.is-safari .scene-viewport {
            height: 114dvh;
            min-height: 114dvh;
        }
    }
}

body{
    user-select: none;
    -webkit-user-select: none;
    --scene-subtitle-font-scale: 1;
    min-height: 100%;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    background: oklch(96.7% 0.003 264.542);
    overscroll-behavior-y: none;
}

html.scene-preview-emulated-fullscreen,
body.scene-preview-emulated-fullscreen {
    overflow: hidden;
    background: #0a0618;
}

body.scene-preview-emulated-fullscreen .scene-viewport {
    z-index: 2147483000;
}

*{
    transition: all 0.3s ease;
    box-sizing: border-box;
}

img, svg {
    user-drag: none;
    -webkit-user-drag: none;
}

.scene-viewport {
    position: relative;
    width: 100%;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    height: var(--app-viewport-height, 100dvh);
    min-height: var(--app-viewport-height, 100dvh);
    overflow: hidden;
    background: #0a0618;
    isolation: isolate;
}


.empty-layout-shell {
    min-height: 100vh;
    min-height: 100dvh;
    min-height: var(--app-viewport-height, 100dvh);
}

.scene-frame-page {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.scene-preview-settings-scroll {
    -webkit-overflow-scrolling: touch;
}

.scrollable-instruction-backdrop {
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-top: calc(1rem + max(env(safe-area-inset-top), 0px));
    padding-bottom: calc(1rem + max(env(safe-area-inset-bottom), 0px));
}

.scrollable-instruction-card {
    display: flex;
    flex-direction: column;
    max-height: calc(var(--app-viewport-height, 100dvh) - 2rem - max(env(safe-area-inset-top), 0px) - max(env(safe-area-inset-bottom), 0px));
}

.scrollable-instruction-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}


#dotnet-compile-error{
    display: none;
}

#components-reconnect-modal{
    display: none !important;
}

#scene_subtitles {
    opacity: 0;
    transform-origin: center bottom;
    transition: opacity 220ms ease;
    font-size: calc(1.25rem * var(--scene-subtitle-font-scale));
}

#scene_subtitles.scene-subtitle-visible {
    opacity: 1;
}

.scene-subtitle-word {
    display: inline-block;
    margin: 0 0.14em;
    opacity: 0;
    translate: 0 0.32em;
    filter: blur(3px);
    animation: scene-subtitle-word-in 680ms cubic-bezier(.16, .84, .24, 1) forwards;
}

body.scene-animations-disabled *,
body.scene-animations-disabled *::before,
body.scene-animations-disabled *::after {
    animation: none !important;
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
}

body.scene-animations-disabled .scene-subtitle-word {
    opacity: 1 !important;
    translate: 0 0 !important;
    filter: blur(0) !important;
}

@keyframes scene-subtitle-word-in {
    0% {
        opacity: 0;
        translate: 0 0.32em;
        filter: blur(3px);
    }

    100% {
        opacity: 1;
        translate: 0 0;
        filter: blur(0);
    }
}

.object-center {
    object-position: center;
}

.object-top {
    object-position: center top;
}

.object-bottom {
    object-position: center bottom;
}

.object-left {
    object-position: 30% center;
}

.object-right {
    object-position: 70% center;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Nunito';
    src: url('/fonts/Nunito-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}


.touch-pan-y {
    touch-action: pan-y;
}

@keyframes notification-in {
    from {
        opacity: 0;
        transform: translateX(24px) scale(0.96);
        filter: blur(4px);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }

}

@keyframes notification-out {

    from {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }

    to {
        opacity: 0;
        transform: translateX(24px) scale(0.96);
        filter: blur(4px);
    }

}

.animate-notification-in {
    animation: notification-in 0.22s ease-out both;
}

.animate-notification-out {
    animation: notification-out 0.22s ease-in both;
    pointer-events: none;
}

@keyframes complete-scene-backdrop-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes complete-scene-card-in {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.96);
        filter: blur(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes complete-scene-hero-in {
    from {
        opacity: 0;
        transform: translateY(36px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.complete-scene-modal-backdrop {
    animation: complete-scene-backdrop-in 0.24s ease-out both;
}

.complete-scene-modal-card {
    animation: complete-scene-card-in 0.42s cubic-bezier(.16, .84, .24, 1) both;
    transform-origin: center bottom;
}

.complete-scene-modal-hero {
    animation: complete-scene-hero-in 0.52s 0.08s cubic-bezier(.2, .9, .24, 1) both;
    transform-origin: center bottom;
}

@keyframes coin-toast-enter {
    0% {
        opacity: 0;
        transform: translateY(-28px) scale(0.82) rotateX(-18deg);
        filter: blur(10px);
    }

    16% {
        opacity: 1;
        transform: translateY(4px) scale(1.04) rotateX(0deg);
        filter: blur(0);
    }

    28%,
    72% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-22px) scale(0.96);
        filter: blur(6px);
    }
}

@keyframes coin-toast-shine {
    0% {
        opacity: 0;
        transform: translateX(-140%) skewX(-24deg);
    }

    20%,
    100% {
        opacity: 0.9;
        transform: translateX(180%) skewX(-24deg);
    }
}

@keyframes coin-toast-glow {
    0%,
    100% {
        transform: scale(0.92);
        opacity: 0.45;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.85;
    }
}

@keyframes coin-toast-particle {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.3);
    }

    18% {
        opacity: 0.95;
    }

    100% {
        opacity: 0;
        transform: translate3d(var(--coin-x), var(--coin-y), 0) scale(1);
    }
}

.coin-toast {
    position: relative;
    display: flex;
    min-width: 260px;
    max-width: min(420px, calc(100vw - 32px));
    align-items: center;
    gap: 14px;
    overflow: hidden;
    border-radius: 28px;
    padding: 16px 22px;
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.22);
    backdrop-filter: blur(18px);
    animation: coin-toast-enter 2.6s cubic-bezier(.22, .88, .24, 1) forwards;
    transform-origin: center top;
    isolation: isolate;
}

.coin-toast--gain {
    color: #1f2937;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.48), transparent 55%),
        linear-gradient(135deg, #ffe78a 0%, #ffca3a 46%, #ffb703 100%);
    border: 1px solid rgba(255, 255, 255, 0.58);
}

.coin-toast--loss {
    color: #ffffff;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.16), transparent 55%),
        linear-gradient(135deg, #374151 0%, #111827 60%, #030712 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.coin-toast__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.coin-toast__value {
    font-size: 1.65rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.coin-toast__title {
    margin-top: 4px;
    font-size: 0.86rem;
    font-weight: 800;
    opacity: 0.8;
}

.coin-toast__badge {
    position: relative;
    z-index: 2;
    display: flex;
    height: 52px;
    width: 52px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-size: 1.35rem;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 12px 28px rgba(17, 24, 39, 0.14);
}

.coin-toast--gain .coin-toast__badge {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 244, 204, 0.92) 100%);
    color: #b45309;
}

.coin-toast--loss .coin-toast__badge {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
    color: #fca5a5;
}

.coin-toast__glow {
    position: absolute;
    inset: auto;
    left: 50%;
    top: 50%;
    z-index: 0;
    height: 120%;
    width: 70%;
    border-radius: 9999px;
    transform: translate(-50%, -50%);
    filter: blur(28px);
    animation: coin-toast-glow 1.6s ease-in-out infinite;
}

.coin-toast--gain .coin-toast__glow {
    background: rgba(255, 244, 173, 0.8);
}

.coin-toast--loss .coin-toast__glow {
    background: rgba(248, 113, 113, 0.22);
}

.coin-toast__shine {
    position: absolute;
    inset: -20% auto -20% -10%;
    z-index: 1;
    width: 44%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, rgba(255, 255, 255, 0.72) 50%, rgba(255, 255, 255, 0.18) 55%, transparent 100%);
    transform: skewX(-24deg);
    animation: coin-toast-shine 2.6s ease-out forwards;
    pointer-events: none;
}

.coin-toast__particle {
    position: absolute;
    z-index: 1;
    left: 22%;
    top: 50%;
    font-size: 0.55rem;
    line-height: 1;
    opacity: 0;
    animation: coin-toast-particle 1.2s ease-out forwards;
}

.coin-toast--gain .coin-toast__particle {
    color: rgba(255, 248, 216, 0.98);
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.55);
}

.coin-toast--loss .coin-toast__particle {
    color: rgba(252, 165, 165, 0.92);
    text-shadow: 0 0 14px rgba(248, 113, 113, 0.35);
}

.coin-toast__particle--1 {
    --coin-x: -34px;
    --coin-y: -38px;
    animation-delay: 0.08s;
}

.coin-toast__particle--2 {
    --coin-x: 12px;
    --coin-y: -54px;
    animation-delay: 0.14s;
}

.coin-toast__particle--3 {
    --coin-x: 54px;
    --coin-y: -24px;
    animation-delay: 0.2s;
}

.coin-toast__particle--4 {
    --coin-x: 34px;
    --coin-y: 10px;
    animation-delay: 0.12s;
}

.coin-toast__particle--5 {
    --coin-x: -10px;
    --coin-y: 22px;
    animation-delay: 0.18s;
}

@keyframes coin-reward-shell-in {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.9);
        filter: blur(10px);
    }

    16% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }

    24%,
    72% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-18px) scale(0.96);
        filter: blur(6px);
    }
}

@keyframes coin-reward-panel-sway {
    0% {
        transform: rotate(-4deg) translateY(0);
    }

    25% {
        transform: rotate(3deg) translateY(-2px);
    }

    50% {
        transform: rotate(5deg) translateY(0);
    }

    75% {
        transform: rotate(-2deg) translateY(2px);
    }

    100% {
        transform: rotate(-4deg) translateY(0);
    }
}

@keyframes coin-reward-mascot-float {
    0% {
        transform: translateY(0) scale(0.96);
    }

    14% {
        transform: translateY(-3px) scale(1.02);
    }

    28% {
        transform: translateY(0) scale(0.97);
    }

    42% {
        transform: translateY(-4px) scale(1.045);
    }

    56% {
        transform: translateY(0) scale(0.985);
    }

    70% {
        transform: translateY(-2px) scale(1.015);
    }

    100% {
        transform: translateY(0) scale(0.96);
    }
}

.coin-reward-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    animation: coin-reward-shell-in 2.8s cubic-bezier(.22, .88, .24, 1) infinite;
}

.coin-reward-panel {
    animation: none;
    transform-origin: center bottom;
}

/* Parent page — AI video notice, centered ~50% width */
.parent-ai-notice {
    width: min(100% - 2rem, 50%);
    max-width: 720px;
    min-width: min(100% - 2rem, 280px);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@media (max-width: 640px) {
    .parent-ai-notice {
        width: calc(100% - 2rem);
        min-width: 0;
    }
}

/* Role switch (child/parent) + burger — compact, not full-bleed */
.role-switch-bar {
    width: min(calc(100vw - 1.5rem), 22rem);
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    box-sizing: border-box;
}

.role-switch-slider {
    width: calc(50% - 0.25rem);
}

.role-switch-slider--child {
    left: 0.25rem;
}

.role-switch-slider--parent {
    left: calc(50%);
}

.role-switch-label {
    white-space: nowrap;
}

@media (min-width: 768px) {
    .role-switch-bar {
        /* Fit content width on desktop (wraps text + burger, no overflow) */
        width: max-content;
        max-width: none;
        min-width: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .role-switch-bar > .role-switch-track {
        flex: 0 1 auto;
        width: max-content;
    }

    .role-switch-bar .role-switch-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

/* Vidialek button — shimmer sweep + soft particles */
.vidialek-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.vidialek-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        transparent 35%,
        rgba(255, 255, 255, 0.5) 50%,
        transparent 65%,
        transparent 100%
    );
    transform: translateX(-160%) skewX(-16deg);
    animation: vidialek-shimmer 2.4s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes vidialek-shimmer {
    0% {
        transform: translateX(-160%) skewX(-16deg);
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    48% {
        transform: translateX(220%) skewX(-16deg);
        opacity: 1;
    }
    55%,
    100% {
        transform: translateX(220%) skewX(-16deg);
        opacity: 0;
    }
}

.vidialek-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 9999px;
    pointer-events: none;
    z-index: 1;
    animation: vidialek-particle 2.8s ease-in-out infinite;
    opacity: 0.18;
}

.vidialek-btn .vidialek-particle:nth-child(2) { animation-delay: -0.7s; }
.vidialek-btn .vidialek-particle:nth-child(3) { animation-delay: -1.4s; }
.vidialek-btn .vidialek-particle:nth-child(4) { animation-delay: -2.1s; }

@keyframes vidialek-particle {
    0%, 100% { transform: translateY(0) scale(0.6); opacity: 0.12; }
    40%      { transform: translateY(-3px) scale(1);   opacity: 0.28; }
    60%      { transform: translateY(-2px) scale(0.85); opacity: 0.22; }
}

.coin-reward-mascot {
    width: min(280px, 52vw);
    max-width: 280px;
    filter: drop-shadow(0 26px 50px rgba(0, 0, 0, 0.26));
    animation: coin-reward-mascot-float 3.2s ease-in-out infinite;
}

.coin-reward-backdrop {
    position: absolute;
    inset: auto;
    top: 52%;
    left: 50%;
    width: min(420px, 72vw);
    height: min(420px, 72vw);
    border-radius: 9999px;
    background:
        radial-gradient(circle, rgba(255, 210, 94, 0.42) 0%, rgba(255, 202, 58, 0.16) 42%, rgba(255, 202, 58, 0) 74%);
    transform: translate(-50%, -50%);
    filter: blur(42px);
    opacity: 0.95;
    z-index: -1;
}

@media (max-width: 640px) {
    #scene_subtitles {
        font-size: calc(1rem * var(--scene-subtitle-font-scale));
    }

    .coin-toast {
        min-width: 0;
        gap: 12px;
        padding: 14px 18px;
    }

    .coin-toast__badge {
        height: 46px;
        width: 46px;
        font-size: 1.2rem;
    }

    .coin-toast__value {
        font-size: 1.35rem;
    }

    .coin-reward-shell {
        gap: 14px;
    }

    .coin-reward-mascot {
        width: min(220px, 60vw);
    }
}

.active{
    font-weight: bold;
}


#resizable {
    width: 100%;
    height: 100%; 
    transition: none !important;
}

/* width */
/*::-webkit-scrollbar {
    width: 3px;
}*/

/* Track */
/*::-webkit-scrollbar-track {
    background: #D9D9D920;
    border-radius: 10px;
}*/

/* Handle */
/*::-webkit-scrollbar-thumb {
    background: #D9D9D9;
    border-radius: 10px
}*/

/* Handle on hover */
/*::-webkit-scrollbar-thumb:hover {
    background: #404040eb;
}*/


@keyframes cloudFloat {
    0% {
        transform: translateY(0px) translateX(0px);
    }

    25% {
        transform: translateY(-8px) translateX(3px);
    }

    50% {
        transform: translateY(-15px) translateX(0px);
    }

    75% {
        transform: translateY(-8px) translateX(-3px);
    }

    100% {
        transform: translateY(0px) translateX(0px);
    }

}

.cloud-float {
    transition: all 0.3s ease;
    animation: cloudFloat var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

.cloud-repel {
    display: inline-block;
    will-change: transform;
}

/* Scroll-to-top button (bottom-right) */
.scroll-top-btn {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 10px 5px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    border: none;
    opacity: 0;
    transform: translateY(1.75rem);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.scroll-top-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.scroll-top-btn.scroll-top-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-top-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}

.scroll-top-btn:focus-visible {
    outline: 3px solid rgba(248, 73, 83, 0.6);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .scroll-top-btn {
        right: 1rem;
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        width: 2.75rem;
        height: 2.75rem;
    }

    .scroll-top-btn svg {
        width: 1.125rem;
        height: 1.125rem;
    }
}

/* Blog article HTML content (public page + admin preview) */
.article-content {
    min-width: 0;
    word-break: break-word;
}

.article-content > * {
    margin-top: 0;
    margin-bottom: 0;
}

.article-content p {
    font-size: 17px;
    line-height: 2;
    color: #374151;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: #111827;
    font-weight: 800;
    line-height: 1.25;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.article-content h1:first-child,
.article-content h2:first-child,
.article-content h3:first-child,
.article-content h4:first-child,
.article-content h5:first-child,
.article-content h6:first-child {
    margin-top: 0;
}

.article-content ul,
.article-content ol {
    margin: 0.75em 0;
    padding-left: 1.5rem;
    color: #374151;
    font-size: 17px;
    line-height: 2;
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin: 0.25em 0;
}

.article-content a {
    color: #F84953;
    text-decoration: underline;
    font-weight: 700;
}

.article-content strong {
    font-weight: 800;
    /* inherit so nested color spans keep working */
    color: inherit;
}

.article-content em {
    font-style: italic;
}

/* Allow inline font/size/color from the admin editor */
.article-content span[style] {
    /* styles come from inline attributes set by the editor */
}

.article-content u {
    text-decoration: underline;
}

.article-content blockquote {
    border-left: 4px solid #FFCA3A;
    margin: 1em 0;
    padding: 0.5em 1em;
    background: #fff7e0;
    border-radius: 0.5rem;
    color: #374151;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1.5rem;
    margin: 1em 0;
}

.article-content video {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 1em 0;
}

.article-content code {
    background: #f3f4f6;
    padding: 0.15em 0.4em;
    border-radius: 0.375rem;
    font-size: 0.9em;
}

.article-content pre {
    background: #111827;
    color: #f9fafb;
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    overflow-x: auto;
    margin: 1em 0;
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 16px;
}

.article-content th,
.article-content td {
    border: 1px solid #e5e7eb;
    padding: 0.5em 0.75em;
    text-align: left;
}

.article-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1.5em 0;
}

/* Admin constructor file upload drag-and-drop highlight */
.file-drop-zone.is-dragover {
    border-color: #F84953 !important;
    background-color: #fff1f2 !important;
    box-shadow: 0 0 0 3px rgba(248, 73, 83, 0.15);
}

/* Admin rich text editor (articles, characters) */
.rich-text-shell {
    min-height: 0;
}

.rich-text-toolbar button:active {
    transform: translateY(1px);
}

.rich-text-editor {
    min-height: 320px;
    max-height: 70vh;
    background: #fff;
    cursor: text;
}

.rich-text-editor:focus {
    box-shadow: inset 0 0 0 2px rgba(248, 73, 83, 0.12);
}

.rich-text-editor:empty:before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
    font-weight: 600;
    font-size: 15px;
}

.rich-text-preview-frame {
    background:
        linear-gradient(180deg, rgba(249, 250, 251, 0.9), rgba(243, 244, 246, 0.95));
}

.rich-text-preview-scroll {
    scrollbar-gutter: stable;
}

/* Keep list markers visible inside contenteditable */
.rich-text-editor ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.rich-text-editor ol {
    list-style: decimal;
    padding-left: 1.5rem;
}

.rich-text-editor ul,
.rich-text-editor ol {
    margin: 0.5em 0;
}

.rich-text-editor li {
    display: list-item;
    margin: 0.2em 0;
}

.rich-text-editor p {
    margin: 0.35em 0;
}

.rich-text-toolbar select {
    max-width: 10rem;
}

.rich-text-editor .article-lead,
.rich-text-editor h2.article-lead {
    position: relative;
    margin: 0.85rem 0;
    padding: 1.55rem 0.95rem 0.75rem;
    border: 2px dashed #f84953;
    border-radius: 0.9rem;
    background: #fff5f6;
    color: #111827;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
}

.rich-text-editor .article-lead::before {
    content: "Заголовок над картинкой — продублируется в тексте";
    position: absolute;
    top: 0.4rem;
    left: 0.85rem;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f84953;
}

.article-content .article-lead,
.article-lead-above .article-lead {
    margin: 0;
    color: #111827;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
}

.article-lead-above {
    color: #4b5563;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.55;
}

.article-lead-above p,
.article-lead-above h1,
.article-lead-above h2,
.article-lead-above h3,
.article-lead-above h4 {
    margin: 0;
}

.article-lead-on-image,
.article-lead-on-image .article-lead {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.preview-image-slot {
    display: flex;
    min-height: 140px;
    align-items: center;
    justify-content: center;
    border-radius: 1.25rem;
    background:
        linear-gradient(180deg, #e5e7eb 0%, #d1d5db 100%);
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.html-source-shell {
    position: relative;
    min-height: 320px;
    max-height: 70vh;
    background: #fff;
}

.html-source-backdrop,
.html-source-input {
    box-sizing: border-box;
    margin: 0;
    width: 100%;
    min-height: inherit;
    max-height: 70vh;
    padding: 0.75rem 1rem;
    border: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.5rem;
    letter-spacing: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    tab-size: 2;
}

.html-source-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: auto;
    color: #111827;
    pointer-events: none;
}

.html-source-input {
    position: relative;
    z-index: 1;
    display: block;
    resize: vertical;
    color: transparent;
    caret-color: #111827;
    background: transparent;
    outline: none;
}

.html-source-input::selection {
    background: rgba(248, 73, 83, 0.18);
}

.html-src-paragraph {
    color: #16a34a;
    font-weight: 800;
}

.html-src-format {
    color: #2563eb;
    font-weight: 700;
}

.html-src-known {
    color: #F84953;
    font-weight: 700;
}

.html-src-unknown {
    color: #7c3aed;
    font-weight: 800;
}

.html-src-comment {
    color: #9ca3af;
    font-style: italic;
}
