/*
    Šablona Doma - teplý domácí vzhled: krémový papír se zrnitostí, kartičky, lístky, polaroidy
    a pásky, ručně tažené linky. Všechno je pod třídou .theme-doma (web: obal stránky, náhled
    v adminu: body iframu), ostatních šablon se nic nedotkne. Jedinou výjimkou je pozadí body,
    které se vybírá přes :has(.theme-doma) - taky jen na stránkách v Domě.

    Barvy jdou z palety (--palette-*), odvozené odstíny přes color-mix, písma přes --font-heading,
    --font-body a --font-accent, tlačítka, odkazy a nadpisy přes proměnné použití barev
    (--button-bg-primary-*, --link-color, --headline-color-from). Rozměry jsou v rem (1rem = 10px)
    nebo px, protože třídy velikosti písma (cm-fs-*) nastavují font-size všem potomkům.

    Natočení a nadzvednutí papírových prvků používá vlastnosti rotate/translate, ne transform -
    animace vjezdu (cm-anim-*) běží přes transform a obojí se tak skládá.
*/

/* ------------------------------------------------------------------------------------------
    Proměnné šablony. Světlý kontext (stránka, karty, lístky) a tmavý kontext (tmavá barva
    palety na pozadí, cm-bg-dark) nastavují stejné proměnné, prvky je jen čtou - lístek
    v tmavé sekci má tak tmavý text a tmavá karta ve světlé sekci světlý.
------------------------------------------------------------------------------------------ */
.theme-doma{
    --doma-ease:cubic-bezier(.22,1,.36,1);

    /* tmavší zlatá (nadtitulky, ruční poznámky, podpisy) a zlatá linek a ozdob */
    --doma-gold-deep:color-mix(in oklch, var(--palette-gold) 66%, var(--palette-brown));
    --doma-gold-line:color-mix(in oklch, var(--palette-gold) 88%, var(--palette-brown));

    /* linky, rámečky a papír */
    --doma-line:color-mix(in oklab, var(--palette-brown) 10%, color-mix(in oklab, var(--palette-gold) 20%, var(--palette-cream)));
    --doma-ruled:color-mix(in oklab, var(--palette-brown) 5%, var(--palette-cream));
    --doma-dots:color-mix(in oklab, var(--palette-brown) 8%, color-mix(in oklab, var(--palette-gold) 15%, var(--palette-cream)));
    --doma-margin-line:color-mix(in oklab, var(--palette-terracotta) 31%, var(--palette-paper));

    /* teplé stíny - hnědá s trochou zlaté */
    --doma-shadow-base:color-mix(in srgb, var(--palette-brown) 78%, var(--palette-gold));
    --doma-shadow:color-mix(in srgb, var(--doma-shadow-base) 50%, transparent);
    --doma-shadow-strong:color-mix(in srgb, var(--doma-shadow-base) 58%, transparent);
    --doma-shadow-tape:color-mix(in srgb, var(--doma-shadow-base) 12%, transparent);
    --doma-button-shadow:color-mix(in srgb, var(--doma-gold-deep) 70%, transparent);

    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}

/* přesnější tmavší zlatá a fialová měsíce - relativní barvy umí jen novější prohlížeče, jinak platí color-mix */
@supports (color: oklch(from red l c h)){
    .theme-doma{
        --doma-gold-deep:oklch(from var(--palette-gold) calc(l - .165) calc(c * .92) calc(h - 7));
        --doma-gold-line:oklch(from var(--palette-gold) calc(l - .055) c calc(h - 5));
        --doma-moon:oklch(from var(--palette-lavender) .65 calc(c * 3.7) h);
    }
}

/* světlý kontext - stránka a papírové prvky (i uvnitř tmavé sekce) */
.theme-doma,
.theme-doma :is(.cm-style-card,.cm-style-sticky,.cm-style-tapeLabel,.cm-style-breath,.cm-text-story-panel):not(.cm-bg-dark,.cm-bg-color-black),
.theme-doma .cm-style-pills :is(li),
.theme-doma .cm-style-polaroid .cm-image-content{
    --doma-text:var(--palette-brown);
    --doma-text-contrast:var(--palette-cream);
    --doma-text-soft:color-mix(in oklab, var(--palette-brown) 91%, var(--palette-cream));
    --doma-text-body:color-mix(in oklab, var(--palette-brown) 83%, var(--palette-cream));
    --doma-text-muted:color-mix(in oklab, var(--palette-brown) 72%, var(--palette-cream));
    --doma-heading:var(--headline-color-from, var(--palette-brown));
    --doma-accent:var(--doma-gold-deep);
    --doma-mark:var(--palette-gold);
    --doma-circle:var(--palette-terracotta);
    --doma-l-min:0;
    --doma-l-max:.64;
    --text-color:var(--palette-brown);
    --line-color:var(--doma-line);
    --white-color:var(--palette-paper);
    color:var(--doma-text-soft);
}

/*
    tmavý kontext - tmavá barva palety na pozadí sekce nebo sloupce (cm-bg-dark), starší černá,
    tmavá stránka a papírový prvek obarvený hnědou (barva volby stylu je inline proměnná)
*/
.theme-doma :is(.cm-bg-dark,.cm-bg-color-black),
.theme-doma:is(.page-bg-color-black,.page-bg-color-brown),
.theme-doma :is(.cm-style-card,.cm-style-sticky,.cm-style-tapeLabel,.cm-style-breath):is([style*="--cm-style-color:var(--palette-brown)"],[style*="--cm-style-color: var(--palette-brown)"]),
.theme-doma .cm-style-pills:is([style*="--cm-style-color:var(--palette-brown)"],[style*="--cm-style-color: var(--palette-brown)"]) li{
    --doma-text:var(--palette-cream);
    --doma-text-contrast:var(--palette-brown);
    --doma-text-soft:color-mix(in srgb, var(--palette-cream) 92%, transparent);
    --doma-text-body:color-mix(in srgb, var(--palette-cream) 86%, transparent);
    --doma-text-muted:color-mix(in srgb, var(--palette-cream) 72%, transparent);
    --doma-heading:var(--palette-cream);
    --doma-accent:var(--palette-lightgold);
    --doma-mark:var(--palette-gold);
    --doma-circle:var(--palette-lightgold);
    --doma-line:color-mix(in srgb, var(--palette-cream) 24%, transparent);
    --doma-l-min:.86;
    --doma-l-max:1;
    --link-color:var(--palette-lightgold);
    color:var(--doma-text-soft);
}

/* ------------------------------------------------------------------------------------------
    Pozadí stránky - barva pozadí webu a zrnitost papíru jako pozadí body (ne vrstva přes
    stránku). Stránka s vlastní barvou (page-bg-color-*) si barvu nechává, zrnitost dostane.
    Web má šablonu na obalu stránky, náhled v adminu přímo na body.
------------------------------------------------------------------------------------------ */
body.theme-doma,
body:has(.theme-doma){
    background-image:url(grain.png);
    background-size:160px 160px;
}
body.theme-doma:not([class*="page-bg-color-"]),
body:has(.theme-doma:not([class*="page-bg-color-"])),
html:has(> body.theme-doma:not([class*="page-bg-color-"])){
    background-color:var(--web-background-color);
}
body.theme-doma:is(.page-bg-color-black,.page-bg-color-brown),
body:has(.theme-doma:is(.page-bg-color-black,.page-bg-color-brown)){
    background-image:url(grain-dark.png);
}
/* prohlížeč bez :has - zrnitost a barva aspoň na obalu stránky */
@supports not selector(:has(*)){
    .theme-doma{
        background-image:url(grain.png);
        background-size:160px 160px;
    }
    .theme-doma:not([class*="page-bg-color-"]){
        background-color:var(--web-background-color);
    }
}

.theme-doma ::selection{
    background-color:color-mix(in srgb, var(--palette-butter) 85%, transparent);
    color:var(--palette-brown);
}

/* ------------------------------------------------------------------------------------------
    Písmo a text
------------------------------------------------------------------------------------------ */
.theme-doma :is(h1,h2,h3,h4,h5,h6){
    font-family:var(--font-heading, inherit);
    font-weight:400;
    line-height:1.15;
    letter-spacing:-.01em;
    color:var(--doma-heading);
    text-wrap:balance;
}
.theme-doma h1{
    letter-spacing:-.015em;
}
/* nadpis s přechodem barev v tmavém kontextu - přechod by byl tmavý na tmavém */
.theme-doma :is(.cm-bg-dark,.cm-bg-color-black) .gradient :is(h1,h2,h3,h4,h5,h6){
    background:none;
    -webkit-text-fill-color:currentColor;
}

.theme-doma section :is(p,li,p *,li *){
    line-height:1.65;
}
.theme-doma section :is(p,li) strong{
    color:var(--doma-text);
}
.theme-doma section li::marker{
    color:var(--doma-gold-line);
}
.theme-doma hr{
    background-color:var(--doma-line);
}

/*
    odkazy v textu (Text a ostatní prvky CM, články) - barva textu se zlatým podtržením, stejně jako
    v článku (blog.css). Barva odkazů (terakota) má na krému jen 3,6 : 1, text 4,5 : 1 potřebuje;
    při najetí barva odkazů (v tmavém kontextu světle zlatá) a podtržení v barvě textu.
    Tlačítka (.btn) a odkazy v patičce (nejsou v sekci) se nemění.
*/
.theme-doma section :is(p,li) a:not(.btn),
.theme-doma .content-text a:not(.btn){
    color:var(--doma-text);
    text-decoration:underline;
    text-decoration-color:var(--palette-gold);
    text-decoration-thickness:2px;
    text-underline-offset:3px;
    text-decoration-skip-ink:auto;
    transition:color .3s, text-decoration-color .3s;
}
.theme-doma section :is(p,li) a:not(.btn):hover,
.theme-doma .content-text a:not(.btn):hover{
    color:var(--link-color);
    text-decoration-color:currentColor;
}
.theme-doma a:focus-visible{
    outline:2px solid var(--link-color);
    outline-offset:3px;
    border-radius:2px;
}

/*
    K1 nadtitulek nad nadpisem - ruční písmo v tmavší zlaté, mírně natočený.
    Šířka podle textu, zarovnání podle nadpisu (text-center / text-right).
*/
.theme-doma .cm-headline-kicker{
    display:block;
    width:fit-content;
    max-width:100%;
    margin:0 0 .8rem;
    font-family:var(--font-accent, cursive);
    font-size:3rem;
    font-weight:600;
    line-height:1.15;
    letter-spacing:normal;
    text-transform:none;
    color:var(--doma-accent);
    rotate:-2deg;
}
.theme-doma .cm-headline-kicker.text-center{
    margin-left:auto;
    margin-right:auto;
}
.theme-doma .cm-headline-kicker.text-right{
    margin-left:auto;
}

/* číslování nadpisu - kroužek v máslové s číslem ručním písmem */
.theme-doma .cm-headline-element .number{
    background:var(--palette-butter);
    color:var(--palette-brown);
    font-family:var(--font-accent, cursive);
    font-size:70%;
    font-weight:700;
}

/*
    K2 zvýraznění slov - ručně tažená zlatá linka pod slovem a kroužek kolem slova.
    Kresba je maska, barva z palety. Bez omezení pohybu se při posunu stránky „nakreslí“.
*/
.theme-doma .cm-mark{
    position:relative;
    display:inline-block;
    padding:0;
    border:0;
    border-radius:0;
    text-decoration:none;
}
.theme-doma .cm-mark::after{
    content:"";
    position:absolute;
    left:-2%;
    bottom:-.16em;
    width:104%;
    height:.3em;
    background-color:var(--doma-mark);
    -webkit-mask:url(svg/mark-line.svg) 0 0 / 100% 100% no-repeat;
    mask:url(svg/mark-line.svg) 0 0 / 100% 100% no-repeat;
    pointer-events:none;
}
.theme-doma .cm-mark.cm-mark-circle{
    padding:0 .14em;
}
.theme-doma .cm-mark.cm-mark-circle::after{
    left:-10%;
    top:-22%;
    bottom:auto;
    width:120%;
    height:144%;
    background-color:var(--doma-circle);
    -webkit-mask-image:url(svg/mark-circle.svg);
    mask-image:url(svg/mark-circle.svg);
}
@keyframes cm-doma-mark-draw{
    from{clip-path:inset(0 100% 0 0)}
    to{clip-path:inset(0 0 0 0)}
}
@supports (animation-timeline: view()){
    @media (prefers-reduced-motion: no-preference){
        .theme-doma .cm-mark::after{
            animation:cm-doma-mark-draw linear both;
            animation-timeline:view();
            animation-range:entry 60% cover 40%;
        }
    }
}

/* nadpis s ozdobou - tečkované vlnky, slunce, měsíc a hvězdička pod nadpisem (měsíc ve fialové) */
.theme-doma .cm-headline-element.cm-style-ornament::after{
    content:"";
    display:block;
    width:264px;
    max-width:100%;
    height:28px;
    margin:1.4rem 0 0;
    background:
        linear-gradient(var(--doma-moon, var(--cm-style-color, var(--palette-gold))), var(--doma-moon, var(--cm-style-color, var(--palette-gold)))) 126px 0 / 22px 100% no-repeat,
        var(--cm-style-color, var(--palette-gold));
    -webkit-mask:url(svg/ornament.svg) 0 0 / 264px 28px no-repeat;
    mask:url(svg/ornament.svg) 0 0 / 264px 28px no-repeat;
}
.theme-doma .cm-headline-element.cm-style-ornament:has(> .cm-justify-content-center)::after{
    margin-left:auto;
    margin-right:auto;
}
.theme-doma .cm-headline-element.cm-style-ornament:has(> .cm-justify-content-end)::after{
    margin-left:auto;
}

/*
    nadtitulek s ikonou (styl nadpisu) - ikona ze sady šablony za textem nadtitulku, barva z palety.
    Sluníčko se pomalu otáčí, měsíc, hvězda a srdce stojí. Jen CSS, nadtitulek je pořád jeden span.
*/
.theme-doma .cm-style-kickerIcon .cm-headline-kicker{
    display:flex;
    align-items:center;
    gap:1.2rem;
}
.theme-doma .cm-style-kickerIcon .cm-headline-kicker::after{
    content:"";
    flex:none;
    width:1.25em;
    height:1.25em;
    background-color:var(--cm-style-color, var(--palette-gold));
    -webkit-mask:url(svg/icon-sun.svg) center / contain no-repeat;
    mask:url(svg/icon-sun.svg) center / contain no-repeat;
    rotate:2deg;
}
.theme-doma .cm-style-kickerIcon.cm-style-icon-sun .cm-headline-kicker::after{
    animation:cm-doma-spin 60s linear infinite;
}
.theme-doma .cm-style-kickerIcon.cm-style-icon-moon .cm-headline-kicker::after{
    width:.95em;
    height:.95em;
    -webkit-mask-image:url(svg/icon-moon.svg);
    mask-image:url(svg/icon-moon.svg);
}
.theme-doma .cm-style-kickerIcon.cm-style-icon-star .cm-headline-kicker::after{
    width:.8em;
    height:.8em;
    -webkit-mask-image:url(svg/icon-star.svg);
    mask-image:url(svg/icon-star.svg);
}
.theme-doma .cm-style-kickerIcon.cm-style-icon-heart .cm-headline-kicker::after{
    width:.95em;
    height:.95em;
    -webkit-mask-image:url(svg/icon-heart.svg);
    mask-image:url(svg/icon-heart.svg);
}

/*
    nadpis ručním písmem (styl nadpisu) - doplňkové písmo šablony v barvě z palety. Barva se jako
    u ručního písma textu ztmaví (na tmavém pozadí zesvětlí), aby byl nadpis čitelný.
*/
.theme-doma .cm-headline-element.cm-style-handwritten :is(h1,h2,h3,h4,h5,h6){
    font-family:var(--font-accent, cursive);
    font-weight:700;
    line-height:1.1;
    letter-spacing:0;
    color:var(--cm-style-color, var(--doma-heading));
}
@supports (color: oklch(from red l c h)){
    .theme-doma .cm-headline-element.cm-style-handwritten :is(h1,h2,h3,h4,h5,h6){
        color:oklch(from var(--cm-style-color, var(--doma-heading)) clamp(var(--doma-l-min), l, var(--doma-l-max)) c h);
    }
}
/* přechod barev nadpisů by barvu ručního písma přebil */
.theme-doma .cm-headline-element.cm-style-handwritten .gradient :is(h1,h2,h3,h4,h5,h6){
    background:none;
    -webkit-text-fill-color:currentColor;
}

/* ------------------------------------------------------------------------------------------
    Tlačítka - barvy a zaoblení z použití barev šablony, tvar „pilulky“ s měkkým stínem
------------------------------------------------------------------------------------------ */
.theme-doma :where(.btn){
    font-family:var(--font-body, inherit);
    font-weight:700;
    line-height:1.2;
    letter-spacing:.005em;
    padding:1.8rem 3rem 1.7rem;
    box-shadow:none;
    transition:translate .6s var(--doma-ease), box-shadow .6s var(--doma-ease), background-color .3s, color .3s, border-color .3s;
}
.theme-doma .btn:hover{
    box-shadow:none;
}
.theme-doma .btn:focus-visible{
    outline:3px solid var(--palette-terracotta);
    outline-offset:3px;
}
.theme-doma .btn-primary,
.theme-doma .btn-primary:hover{
    box-shadow:0 14px 30px -14px var(--doma-button-shadow);
}
.theme-doma .btn-primary.gradient,
.theme-doma .btn-primary.gradient:hover{
    background:linear-gradient(180deg, var(--button-bg-primary-from) 0%, var(--button-bg-primary-to) 100%);
}

/*
    tlačítko zarovnané vlevo nebo vpravo stojí přesně u okraje - boční odsazení 2rem z obecných stylů
    potřebuje jen dělicí čára, kterou tlačítko přerušuje (jinak by tlačítko vlevo „uskočilo“ o 20 px)
*/
.theme-doma .cm-button-content:not(:has(> .cm-button-delimiter)) > :is(a,button){
    margin-left:0;
    margin-right:0;
}

/* K7 tmavé tlačítko - hnědé (v tmavém kontextu krémové) */
.theme-doma .cm-style-dark .btn,
.theme-doma .cm-style-dark .btn:hover{
    background:var(--doma-text);
    color:var(--doma-text-contrast) !important;
    box-shadow:none;
}

/* K7 tlačítko s obrysem */
.theme-doma .cm-style-outline .btn,
.theme-doma .cm-style-outline .btn:hover{
    padding-top:1.6rem;
    padding-bottom:1.5rem;
    border:2px solid var(--doma-text);
    background:transparent;
    color:var(--doma-text) !important;
    box-shadow:none;
}

/* K7 tlačítko s kulatou ikonou přehrát před textem (např. „Pustit video“) */
.theme-doma .cm-style-play .btn,
.theme-doma .cm-style-play .btn:hover{
    position:relative;
    display:inline-flex;
    align-items:center;
    min-width:0;
    min-height:4.4rem;
    padding:0 0 0 5.6rem;
    border:0;
    background:transparent;
    color:var(--doma-text) !important;
    box-shadow:none;
    text-align:left;
}
.theme-doma .cm-style-play .btn::before{
    content:"";
    position:absolute;
    left:0;
    top:50%;
    width:4.4rem;
    height:4.4rem;
    margin-top:-2.2rem;
    border-radius:50%;
    background-color:var(--palette-paper);
    box-shadow:0 8px 20px -10px var(--doma-shadow-strong);
}
.theme-doma .cm-style-play .btn::after{
    content:"";
    position:absolute;
    left:1.75rem;
    top:50%;
    width:1.1rem;
    height:1.3rem;
    margin-top:-.65rem;
    background-color:var(--cm-style-color, var(--palette-terracotta));
    -webkit-mask:url(svg/play.svg) center / contain no-repeat;
    mask:url(svg/play.svg) center / contain no-repeat;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference){
    .theme-doma .btn:not([disabled]):hover{
        translate:0 -2px;
    }
}

/* ------------------------------------------------------------------------------------------
    Formuláře, newsletter
------------------------------------------------------------------------------------------ */
.theme-doma :where(input,textarea,select){
    font-family:var(--font-body, inherit);
    color:var(--palette-brown);
}
.theme-doma .input-group{
    border:1.5px solid var(--doma-line);
    background-color:var(--palette-paper);
    box-shadow:none;
    transition:border-color .3s, box-shadow .3s;
}
.theme-doma .input-group :is(input,select),
.theme-doma .input-group :is(.prepend,.append){
    background-color:transparent;
}
.theme-doma .input-group:focus-within{
    border-color:var(--palette-terracotta);
    box-shadow:0 0 0 3px color-mix(in srgb, var(--palette-terracotta) 18%, transparent);
}
.theme-doma textarea{
    border:1.5px solid var(--doma-line);
    border-radius:min(var(--input-border-radius), 2rem);
    background-color:var(--palette-paper);
    box-shadow:none;
}
.theme-doma textarea:focus-visible{
    border-color:var(--palette-terracotta);
    box-shadow:0 0 0 3px color-mix(in srgb, var(--palette-terracotta) 18%, transparent);
}
.theme-doma :is(input,textarea)::placeholder{
    color:color-mix(in oklab, var(--palette-brown) 60%, var(--palette-cream));
    opacity:1;
}
.theme-doma .cm-newsletter-element label{
    color:var(--doma-text-muted);
}

/* ------------------------------------------------------------------------------------------
    FAQ, záložky, recenze, kvíz
------------------------------------------------------------------------------------------ */
.theme-doma .cm-faq-element .faq-question .title{
    height:auto;
    min-height:6.4rem;
    padding:1.4rem 2rem;
    border:1.5px solid var(--doma-line);
    background-color:var(--palette-paper);
    box-shadow:0 18px 36px -30px var(--doma-shadow);
    transition:border-color .3s;
}
.theme-doma .cm-faq-element .faq-question.open .title{
    border-color:var(--doma-gold-line);
}
.theme-doma .cm-faq-element .faq-question h4{
    font-family:var(--font-heading, inherit);
    font-size:2.1rem;
    line-height:1.3;
    color:var(--palette-brown);
}
.theme-doma .cm-faq-element .faq-question .answer{
    padding:1rem 2rem 1.6rem 3.4rem;
}
.theme-doma .cm-faq-element .faq-question p{
    font-style:normal;
}

.theme-doma .cm-tabs-element ul.tabs{
    gap:.6rem;
    padding:.4rem;
}
.theme-doma .cm-tabs-element ul.tabs li:not(.sticky){
    border-radius:999px;
    transition:background-color .3s;
}
.theme-doma .cm-tabs-element ul.tabs li:not(.sticky),
.theme-doma .cm-tabs-element ul.tabs li:not(.sticky) *{
    font-weight:700;
    color:var(--doma-text);
}
.theme-doma .cm-tabs-element ul.tabs li:not(.sticky):hover{
    background-color:color-mix(in srgb, var(--palette-butter) 55%, transparent);
}
.theme-doma .cm-tabs-element ul.tabs li.selected{
    background-color:var(--palette-butter);
    box-shadow:none;
}
.theme-doma .cm-tabs-element ul.tabs li.selected,
.theme-doma .cm-tabs-element ul.tabs li.selected *{
    color:var(--palette-brown);
}
.theme-doma .cm-tabs-element ul.tabs li:focus-visible{
    outline:3px solid var(--palette-terracotta);
    outline-offset:-3px;
}
.theme-doma .cm-tabs-element ul.tabs li.sticky{
    background:linear-gradient(90deg, transparent 0%, var(--web-background-color) 100%);
}

.theme-doma .cm-review-element .review .content,
.theme-doma .carousel3D-item-content{
    border:0;
    border-radius:6px 6px 22px 6px;
    background-color:var(--palette-paper);
    box-shadow:0 22px 40px -26px var(--doma-shadow);
}
.theme-doma .cm-review-element .review .content *{
    font-style:normal;
}
.theme-doma .cm-review-element .review .content .img-container,
.theme-doma .cm-review-element .review .content .img-container img{
    border-radius:50%;
}
.theme-doma .cm-review-element .review .signature,
.theme-doma .cm-review-element .review .signature *,
.theme-doma .carousel3D-item-signature,
.theme-doma .carousel3D-item-signature *{
    font-family:var(--font-accent, cursive);
    font-size:2.8rem;
    font-weight:700;
    line-height:1.1;
    color:var(--doma-text);
}

.theme-doma .cm-quiz-progress-bar .line{
    background-color:var(--doma-ruled);
}
.theme-doma .cm-quiz-progress-bar .line .overline.here{
    background-color:var(--doma-line);
}
.theme-doma .cm-quiz-progress-bar .line .overline.done{
    background-color:var(--palette-gold);
}
.theme-doma .cm-quiz-big-number{
    font-family:var(--font-heading, inherit);
    font-weight:400;
}
.theme-doma .cm-quiz-tile.exclusive{
    border-color:var(--doma-line);
    background-color:var(--palette-cream);
}

/* Příběh - panel z papíru, linky a kruh ve zlaté */
.theme-doma .cm-text-story{
    --cm-story-vignette-color:var(--palette-paper);
}
.theme-doma .cm-text-story-line{
    background-color:var(--doma-gold-line);
}
.theme-doma .cm-text-story-photo{
    border-color:var(--doma-gold-line);
    box-shadow:0 0 50px 0 color-mix(in srgb, var(--palette-gold) 45%, transparent);
}
.theme-doma .cm-text-story-panel{
    border:0;
    border-radius:6px 6px 24px 6px;
    background-color:var(--palette-paper);
    box-shadow:0 30px 60px -40px var(--doma-shadow);
}

/* ------------------------------------------------------------------------------------------
    Papírové prvky - páska, nadzvednutí při najetí myší
------------------------------------------------------------------------------------------ */

/* K3 karta (styl sloupce) */
.theme-doma .cm-column-elements.cm-style-card{
    position:relative;
    padding:3.6rem 3.2rem 3.2rem;
    border-radius:24px;
    background-color:var(--cm-style-color, var(--palette-paper));
    box-shadow:0 30px 60px -44px var(--doma-shadow);
    transition:rotate .9s var(--doma-ease), translate .9s var(--doma-ease), box-shadow .9s var(--doma-ease);
}
.theme-doma .cm-style-card.cm-style-rotate-left{
    rotate:-1deg;
}
.theme-doma .cm-style-card.cm-style-rotate-right{
    rotate:1deg;
}

/* páska - jedna nahoře, v rohu, nebo dvě (druhá v levandulové) */
.theme-doma .cm-style-card:is(.cm-style-tape-top,.cm-style-tape-corner,.cm-style-tape-two)::before,
.theme-doma .cm-style-card.cm-style-tape-two::after{
    content:"";
    position:absolute;
    z-index:2;
    width:11rem;
    height:2.8rem;
    background-color:color-mix(in srgb, var(--cm-style-tapeColor, var(--palette-butter)) 92%, transparent);
    box-shadow:0 2px 4px var(--doma-shadow-tape);
    pointer-events:none;
}
.theme-doma .cm-style-card.cm-style-tape-top::before{
    top:-1.3rem;
    left:50%;
    margin-left:-5.5rem;
    rotate:-3deg;
}
.theme-doma .cm-style-card.cm-style-tape-corner::before{
    top:-.6rem;
    left:-2.6rem;
    rotate:-38deg;
}
.theme-doma .cm-style-card.cm-style-tape-two::before{
    top:-1.3rem;
    left:6rem;
    rotate:-3deg;
}
.theme-doma .cm-style-card.cm-style-tape-two::after{
    top:-1.3rem;
    right:7rem;
    rotate:4deg;
    background-color:color-mix(in srgb, var(--palette-lavender) 95%, transparent);
}

/* papír - linkovaný, tečkovaný, sešit s okrajem a dírkami */
.theme-doma .cm-style-card.cm-style-paper-lined{
    background-image:repeating-linear-gradient(180deg, transparent 0 39px, var(--doma-ruled) 39px 40px);
    background-position:0 30px;
}
.theme-doma .cm-style-card.cm-style-paper-dotted{
    background-image:radial-gradient(var(--doma-dots) 1.2px, transparent 1.5px);
    background-size:22px 22px;
}
.theme-doma .cm-style-card.cm-style-paper-notebook{
    padding-left:clamp(68px, 7vw, 96px);
    border-radius:10px;
    background-image:
        radial-gradient(circle 9px at 33px 70px, var(--palette-cream) 6.5px, color-mix(in srgb, var(--doma-shadow-base) 28%, var(--palette-cream)) 8.5px, transparent 9px),
        radial-gradient(circle 9px at 33px 50%, var(--palette-cream) 6.5px, color-mix(in srgb, var(--doma-shadow-base) 28%, var(--palette-cream)) 8.5px, transparent 9px),
        radial-gradient(circle 9px at 33px calc(100% - 70px), var(--palette-cream) 6.5px, color-mix(in srgb, var(--doma-shadow-base) 28%, var(--palette-cream)) 8.5px, transparent 9px),
        linear-gradient(90deg, transparent clamp(50px, 5vw, 70px), var(--doma-margin-line) clamp(50px, 5vw, 70px) calc(clamp(50px, 5vw, 70px) + 2px), transparent calc(clamp(50px, 5vw, 70px) + 2px)),
        repeating-linear-gradient(180deg, transparent 0 39px, var(--doma-ruled) 39px 40px);
    background-position:0 0, 0 0, 0 0, 0 0, 0 30px;
}

/* K5 lístek (styl textu) */
.theme-doma .cm-style-sticky{
    position:relative;
    padding:2.8rem 3rem 2.6rem;
    border-radius:6px 6px 22px 6px;
    background-color:var(--cm-style-color, var(--palette-butter));
    box-shadow:0 22px 40px -26px var(--doma-shadow-strong);
    transition:rotate .9s var(--doma-ease), translate .9s var(--doma-ease), box-shadow .9s var(--doma-ease);
}
.theme-doma .cm-style-sticky.cm-style-rotate-left{
    rotate:-1.5deg;
}
.theme-doma .cm-style-sticky.cm-style-rotate-right{
    rotate:1.5deg;
}
.theme-doma .cm-style-sticky:is(.cm-style-tape-top,.cm-style-tape-corner)::before{
    content:"";
    position:absolute;
    z-index:2;
    width:11rem;
    height:2.8rem;
    background-color:color-mix(in srgb, var(--cm-style-tapeColor, var(--palette-lavender)) 95%, transparent);
    box-shadow:0 2px 4px var(--doma-shadow-tape);
    pointer-events:none;
}
.theme-doma .cm-style-sticky.cm-style-tape-top::before{
    top:-1.4rem;
    left:50%;
    margin-left:-5.5rem;
    rotate:-4deg;
}
.theme-doma .cm-style-sticky.cm-style-tape-corner::before{
    top:-.6rem;
    left:-2.6rem;
    rotate:-38deg;
}
.theme-doma .cm-style-sticky.cm-style-font-handwritten :is(p,li,p *,li *){
    font-family:var(--font-accent, cursive);
    font-weight:600;
    line-height:1.18;
}
.theme-doma .cm-style-sticky > :first-child,
.theme-doma .cm-style-sticky > .mce-content-body > :first-child{
    margin-top:0;
}
.theme-doma .cm-style-sticky > :last-child,
.theme-doma .cm-style-sticky > .mce-content-body > :last-child{
    margin-bottom:0;
}

/* K4 polaroid (styl obrázku) - rámeček kolem fotky, páska a popisek ručním písmem pod fotkou */
.theme-doma .cm-style-polaroid .cm-image-content{
    padding:10px 10px 46px;
    border-radius:10px;
    background-color:var(--palette-paper);
    box-shadow:0 30px 60px -30px var(--doma-shadow);
    transition:rotate .9s var(--doma-ease), translate .9s var(--doma-ease), box-shadow .9s var(--doma-ease);
}
.theme-doma .cm-style-polaroid .cm-image-content:has(> .cm-polaroid-caption){
    padding-bottom:10px;
}
.theme-doma .cm-style-polaroid .cm-image-content img{
    border-radius:6px;
}
/* polaroid s pevnými rozměry - fotka se zmenší, aby se popisek vešel do rámečku */
.theme-doma .cm-style-polaroid .cm-image-content.cm-has-dimensions:has(> .cm-polaroid-caption) > :is(img,a){
    flex:1 1 0;
    min-height:0;
    height:auto;
}
.theme-doma .cm-style-polaroid .cm-image-content::before{
    content:"";
    position:absolute;
    z-index:2;
    top:-12px;
    left:50%;
    width:96px;
    height:26px;
    margin-left:-48px;
    background-color:color-mix(in srgb, var(--cm-style-tapeColor, var(--palette-butter)) 92%, transparent);
    box-shadow:0 2px 4px var(--doma-shadow-tape);
    rotate:-3deg;
    pointer-events:none;
}
.theme-doma .cm-style-polaroid.cm-style-rotate-left .cm-image-content{
    rotate:-2.5deg;
}
.theme-doma .cm-style-polaroid.cm-style-rotate-right .cm-image-content{
    rotate:2.5deg;
}
.theme-doma .cm-style-polaroid .cm-polaroid-caption{
    min-height:3.4rem;
    margin:.8rem 0 0;
    padding:0 .6rem;
    font-family:var(--font-accent, cursive);
    font-size:2.4rem;
    font-weight:600;
    line-height:1.15;
    text-align:center;
    color:var(--palette-brown);
}

/* K5 štítek na pásce - každý odstavec je proužek pásky s ručním písmem */
.theme-doma .cm-style-tapeLabel,
.theme-doma .cm-style-tapeLabel > .mce-content-body{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
}
.theme-doma .cm-style-tapeLabel > .mce-content-body{
    width:100%;
}
.theme-doma .cm-style-tapeLabel p{
    width:fit-content;
    max-width:100%;
    margin:0 0 1rem;
    padding:.4rem 1.8rem;
    background-color:color-mix(in srgb, var(--cm-style-color, var(--palette-butter)) 96%, transparent);
    box-shadow:0 2px 6px var(--doma-shadow-tape);
    color:var(--doma-text);
    rotate:3deg;
}
.theme-doma .cm-style-tapeLabel :is(p,p *){
    font-family:var(--font-accent, cursive);
    font-weight:600;
    line-height:1.2;
}
.theme-doma .cm-style-tapeLabel p:last-child{
    margin-bottom:0;
}
.theme-doma .cm-style-tapeLabel p.text-center{
    align-self:center;
}
.theme-doma .cm-style-tapeLabel p.text-right{
    align-self:flex-end;
}
.theme-doma .cm-style-tapeLabel.cm-style-rotate-left p{
    rotate:-3deg;
}
.theme-doma .cm-style-tapeLabel.cm-style-rotate-none p{
    rotate:0deg;
}

/* K6 ikona v kruhu (styl obrázku) - ikona na měkkém kruhu barvy z palety */
.theme-doma .cm-style-iconCircle .cm-image-content{
    flex:none;
    align-items:center;
    justify-content:center;
    padding:1.4rem;
    border-radius:50%;
    background:radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--cm-style-color, var(--palette-butter)) 35%, var(--palette-paper)), var(--cm-style-color, var(--palette-butter)) 70%);
    box-shadow:0 10px 22px -14px var(--doma-shadow-strong);
    transition:rotate 1.1s var(--doma-ease), scale 1.1s var(--doma-ease);
}
.theme-doma .cm-style-iconCircle .cm-image-content:not(.cm-has-dimensions){
    width:7.8rem;
    height:7.8rem;
}
.theme-doma .cm-style-iconCircle .cm-image-content img{
    width:100%;
    height:100%;
    object-fit:contain;
    border-radius:0;
}
.theme-doma .cm-style-iconCircle .cm-image-content a{
    display:flex;
    width:100%;
    height:100%;
}

/* nadzvednutí papírových prvků při najetí myší (karta jen s volbou lift-hover) */
@media (hover: hover) and (prefers-reduced-motion: no-preference){
    .theme-doma .cm-style-card.cm-style-lift-hover:hover,
    .theme-doma .cm-style-sticky:hover,
    .theme-doma .cm-style-polaroid .cm-image-content:hover{
        rotate:0deg;
        translate:0 -6px;
        box-shadow:0 36px 60px -30px var(--doma-shadow-strong);
    }
    .theme-doma .cm-style-card.cm-style-lift-hover:hover .cm-style-iconCircle .cm-image-content{
        rotate:-8deg;
        scale:1.08;
    }
}

/* ------------------------------------------------------------------------------------------
    K5 styly textu
------------------------------------------------------------------------------------------ */

/* ruční písmo - barva z palety, ztmavená (na tmavém zesvětlená) tak, aby byla čitelná */
.theme-doma .cm-style-handwritten,
.theme-doma .cm-style-handwritten :is(p,li,p *,li *){
    font-family:var(--font-accent, cursive);
    font-weight:600;
    line-height:1.18;
}
.theme-doma :is(.cm-style-handwritten,.cm-style-signature,.cm-style-noteArrow){
    color:var(--cm-style-color, var(--doma-accent));
}
@supports (color: oklch(from red l c h)){
    .theme-doma :is(.cm-style-handwritten,.cm-style-signature,.cm-style-noteArrow){
        color:oklch(from var(--cm-style-color, var(--doma-accent)) clamp(var(--doma-l-min), l, var(--doma-l-max)) c h);
    }
}

/* seznam s ručně kreslenými fajfkami */
.theme-doma .cm-style-checklist ul{
    display:flex;
    flex-direction:column;
    gap:1.2rem;
    padding-left:0;
    list-style:none;
}
.theme-doma .cm-style-checklist ul li{
    position:relative;
    margin:0;
    padding-left:3.6rem;
}
.theme-doma .cm-style-checklist ul li::before{
    content:"";
    position:absolute;
    left:0;
    top:.25em;
    top:calc(.5lh - 1rem);
    width:2.2rem;
    height:2rem;
    background-color:var(--cm-style-color, var(--palette-gold));
    -webkit-mask:url(svg/check.svg) center / contain no-repeat;
    mask:url(svg/check.svg) center / contain no-repeat;
}

/* seznam jako štítky (pilulky) */
.theme-doma .cm-style-pills ul{
    display:flex;
    flex-wrap:wrap;
    gap:.8rem;
    padding-left:0;
    list-style:none;
}
.theme-doma .cm-style-pills ul.text-center{
    justify-content:center;
}
.theme-doma .cm-style-pills ul.text-right{
    justify-content:flex-end;
}
.theme-doma .cm-style-pills ul li{
    margin:0;
    padding:.4rem 1.4rem;
    border-radius:999px;
    background-color:var(--cm-style-color, var(--palette-butter));
    color:var(--doma-text-body);
    rotate:-2deg;
}
.theme-doma .cm-style-pills ul li:nth-child(3n+2){
    rotate:1.5deg;
}
.theme-doma .cm-style-pills ul li:nth-child(3n){
    rotate:-1deg;
}
.theme-doma .cm-style-pills ul :is(li,li *){
    font-weight:700;
    line-height:1.5;
}

/* poznámka s ikonou (štít, hvězda, srdce, informace) */
.theme-doma .cm-style-noteIcon{
    position:relative;
    padding-left:3.4rem;
    color:var(--doma-text-muted);
}
.theme-doma .cm-style-noteIcon :is(p,li,p *,li *){
    font-weight:600;
    line-height:1.45;
}
.theme-doma .cm-style-noteIcon::before{
    content:"";
    position:absolute;
    left:0;
    top:.1em;
    width:2.4rem;
    height:2.4rem;
    background-color:var(--cm-style-color, var(--palette-terracotta));
    -webkit-mask:url(svg/icon-shield.svg) center / contain no-repeat;
    mask:url(svg/icon-shield.svg) center / contain no-repeat;
}
.theme-doma .cm-style-noteIcon.cm-style-icon-star::before{
    -webkit-mask-image:url(svg/icon-star.svg);
    mask-image:url(svg/icon-star.svg);
}
.theme-doma .cm-style-noteIcon.cm-style-icon-heart::before{
    -webkit-mask-image:url(svg/icon-heart.svg);
    mask-image:url(svg/icon-heart.svg);
}
.theme-doma .cm-style-noteIcon.cm-style-icon-info::before{
    -webkit-mask-image:url(svg/icon-info.svg);
    mask-image:url(svg/icon-info.svg);
}

/* ručně psaná poznámka se šipkou - šipka vlevo od textu, míří nahoru, dolů, doleva, nebo vpravo od textu doprava */
.theme-doma .cm-style-noteArrow{
    display:flex;
    align-items:flex-start;
    gap:.8rem;
}
.theme-doma .cm-style-noteArrow::before{
    content:"";
    flex:none;
    width:5.6rem;
    height:4.4rem;
    background-color:currentColor;
    -webkit-mask:url(svg/arrow.svg) center / contain no-repeat;
    mask:url(svg/arrow.svg) center / contain no-repeat;
}
.theme-doma .cm-style-noteArrow > *{
    min-width:0;
    padding-top:2.2rem;
}
.theme-doma .cm-style-noteArrow :is(p,li,p *,li *){
    font-family:var(--font-accent, cursive);
    font-weight:600;
    line-height:1.15;
}
.theme-doma .cm-style-noteArrow.cm-style-direction-down::before{
    scale:1 -1;
}
.theme-doma .cm-style-noteArrow.cm-style-direction-down > *{
    padding-top:0;
}
.theme-doma .cm-style-noteArrow.cm-style-direction-left::before{
    rotate:-90deg;
}
.theme-doma .cm-style-noteArrow.cm-style-direction-left > *{
    padding-top:1.4rem;
}
.theme-doma .cm-style-noteArrow.cm-style-direction-right{
    flex-direction:row-reverse;
    justify-content:flex-end;
}
.theme-doma .cm-style-noteArrow.cm-style-direction-right::before{
    rotate:90deg;
    scale:-1 1;
}
.theme-doma .cm-style-noteArrow.cm-style-direction-right > *{
    padding-top:1.4rem;
}

/*
    nádech a výdech - dva odstavce se v kruhu střídají, kruh uvnitř „dýchá“. Prvek má okraje
    z nastavení (cm-element-margin s !important), proto kruh kreslí pseudoprvky uprostřed prvku.
*/
.theme-doma .cm-style-breath{
    --doma-breath-size:15rem;
    position:relative;
    isolation:isolate;
    display:grid;
    place-items:center;
    min-height:var(--doma-breath-size);
    text-align:center;
}
.theme-doma .cm-style-breath::before,
.theme-doma .cm-style-breath::after{
    content:"";
    position:absolute;
    z-index:-1;
    left:50%;
    top:50%;
    border-radius:50%;
    pointer-events:none;
}
.theme-doma .cm-style-breath::before{
    width:var(--doma-breath-size);
    height:var(--doma-breath-size);
    margin:calc(var(--doma-breath-size) / -2) 0 0 calc(var(--doma-breath-size) / -2);
    background-color:var(--cm-style-color, var(--palette-lavender));
    box-shadow:0 18px 36px -20px var(--doma-shadow);
}
.theme-doma .cm-style-breath::after{
    width:calc(var(--doma-breath-size) * .72);
    height:calc(var(--doma-breath-size) * .72);
    margin:calc(var(--doma-breath-size) * -.36) 0 0 calc(var(--doma-breath-size) * -.36);
    background:radial-gradient(circle, color-mix(in srgb, var(--palette-paper) 95%, transparent), color-mix(in srgb, var(--cm-style-color, var(--palette-lavender)) 55%, transparent));
    animation:cm-doma-breathe 10s ease-in-out infinite;
}
.theme-doma .cm-style-breath > *{
    display:grid;
    place-items:center;
    grid-area:1 / 1;
    max-width:var(--doma-breath-size);
    rotate:8deg;
}
.theme-doma .cm-style-breath p{
    grid-area:1 / 1;
    margin:0;
    padding:0 1.2rem;
    color:var(--doma-text);
}
.theme-doma .cm-style-breath :is(p,p *){
    font-family:var(--font-accent, cursive);
    font-weight:700;
    line-height:1.05;
}
.theme-doma .cm-style-breath p:nth-of-type(1){
    animation:cm-doma-word 10s ease-in-out infinite;
}
.theme-doma .cm-style-breath p:nth-of-type(2){
    animation:cm-doma-word 10s ease-in-out infinite -5s;
}
.theme-doma .cm-style-breath p:nth-of-type(n+3){
    display:none;
}
/* při úpravě v editoru adminu jsou vidět oba odstavce */
.theme-doma .cm-style-breath:focus-within p{
    grid-area:auto;
    animation:none;
    opacity:1;
}
@keyframes cm-doma-word{
    0%,44%{opacity:1}
    50%,94%{opacity:0}
    100%{opacity:1}
}
@keyframes cm-doma-breathe{
    0%,100%{scale:.8}
    50%{scale:1.06}
}

/* citát - písmo nadpisů a velké uvozovky barvou z palety */
.theme-doma .cm-style-quote{
    position:relative;
    padding-top:3.6rem;
    color:var(--doma-text);
}
.theme-doma .cm-style-quote :is(p,li,p *,li *){
    font-family:var(--font-heading, inherit);
    line-height:1.3;
    text-wrap:balance;
}
.theme-doma .cm-style-quote::before{
    content:"\201C";
    content:"\201C" / "";
    position:absolute;
    left:-.04em;
    top:0;
    font-family:var(--font-heading, Georgia, serif);
    font-size:8rem;
    line-height:.9;
    color:var(--cm-style-color, var(--palette-gold));
}
.theme-doma .cm-style-quote:has(.text-center)::before{
    left:50%;
    translate:-50% 0;
}
.theme-doma .cm-style-quote:has(.text-right)::before{
    left:auto;
    right:0;
}

/* podpis */
.theme-doma .cm-style-signature :is(p,li,p *,li *){
    font-family:var(--font-accent, cursive);
    font-weight:700;
    line-height:1.1;
}

/* ------------------------------------------------------------------------------------------
    K7 sloupec „vedle sebe“ - prvky ve sloupci v řádku (např. dvě tlačítka), na mobilu pod sebou
------------------------------------------------------------------------------------------ */
.theme-doma .cm-column-elements.cm-style-row{
    display:flex;
    flex-direction:row;
    flex-wrap:wrap;
    align-items:center;
    gap:1.6rem 2.2rem;
}
.theme-doma .cm-column-elements.cm-style-row > *{
    flex:0 1 auto;
    min-width:0;
}
.theme-doma .cm-style-row .cm-button-content > :is(a,button){
    margin-left:0;
    margin-right:0;
}
@media (max-width: 767px){
    .theme-doma .cm-column-elements.cm-style-row{
        flex-direction:column;
        align-items:flex-start;
    }
}

/* ------------------------------------------------------------------------------------------
    Sloupec „kruh“ - prvky sloupce v papírovém kolečku s ručně taženým prstencem, tečkovanou
    obíhající kružnicí a pulzující září za kolečkem (barvy z palety, tři velikosti).

    Vrstvy: kolečko je pozadí sloupce, záře je ::before pod ním (z-index -1 v izolovaném obalu
    sloupce .cm-col), prstenec s kružnicí je ::after nad okrajem kolečka (obsah je uprostřed,
    s prstencem se nepotká). Proměnné barev jsou inline na sloupci, proto obě vrstvy patří jemu.
------------------------------------------------------------------------------------------ */
.theme-doma .cm-col:has(> .cm-column-elements.cm-style-circle){
    isolation:isolate;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
}
/* otáčená vrstva s kružnicí je čtverec natočený o 45° (1,41× širší) - vodorovný přesah ořízne obal stránky (_base/base.css) */
.theme-doma .cm-column-elements.cm-style-circle{
    --doma-circle-size:25rem;
    position:relative;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    flex:none;
    gap:.2rem;
    box-sizing:border-box;
    width:var(--doma-circle-size);
    max-width:100%;
    height:auto;
    aspect-ratio:1;
    margin:calc(var(--doma-circle-size) * .16) auto;
    padding:2.6rem;
    border-radius:50%;
    text-align:center;
    background:radial-gradient(circle at 40% 32%,
        color-mix(in srgb, var(--palette-paper) 25%, #fff),
        var(--palette-paper) 55%,
        color-mix(in srgb, var(--palette-paper) 72%, var(--cm-style-glowColor, var(--palette-butter))));
    box-shadow:0 28px 54px -30px var(--doma-shadow-strong);
}
.theme-doma .cm-column-elements.cm-style-circle.cm-style-size-small{
    --doma-circle-size:20rem;
    padding:2rem;
}
.theme-doma .cm-column-elements.cm-style-circle.cm-style-size-large{
    --doma-circle-size:30rem;
    padding:3.2rem;
}
.theme-doma .cm-column-elements.cm-style-circle::before,
.theme-doma .cm-column-elements.cm-style-circle::after{
    content:"";
    position:absolute;
    border-radius:50%;
    pointer-events:none;
}
/* pulzující záře za kolečkem */
.theme-doma .cm-column-elements.cm-style-circle::before{
    z-index:-1;
    inset:-20%;
    background:radial-gradient(closest-side, color-mix(in srgb, var(--cm-style-glowColor, var(--palette-butter)) 85%, transparent), transparent);
    animation:cm-doma-circle-glow 10s ease-in-out infinite;
}
/* ručně tažený prstenec a tečkovaná kružnice s tečkami - pomalu se otáčí */
.theme-doma .cm-column-elements.cm-style-circle::after{
    inset:-14%;
    background-color:var(--cm-style-color, var(--palette-gold));
    -webkit-mask:url(svg/circle-orbit.svg) center / 100% 100% no-repeat;
    mask:url(svg/circle-orbit.svg) center / 100% 100% no-repeat;
    animation:cm-doma-spin 160s linear infinite;
}
/* prvky v kolečku nepřetékají přes jeho šířku */
.theme-doma .cm-column-elements.cm-style-circle > *{
    max-width:100%;
}
.theme-doma .cm-column-elements.cm-style-circle img{
    max-width:100%;
}
@keyframes cm-doma-circle-glow{
    0%,100%{opacity:.55;scale:.92}
    50%{opacity:1;scale:1.08}
}

/* ------------------------------------------------------------------------------------------
    Styly sekce - přechod, natržený okraj, zrnitost
------------------------------------------------------------------------------------------ */

/* přechod dvou barev palety s průhlednými okraji - navazuje na pozadí stránky */
.theme-doma section.cm-style-gradient{
    background-image:linear-gradient(180deg,
        transparent 0%,
        color-mix(in srgb, var(--cm-style-from, var(--palette-apricot)) 62%, var(--palette-cream)) 18%,
        color-mix(in srgb, var(--cm-style-to, var(--palette-lavender)) 72%, var(--palette-cream)) 58%,
        color-mix(in srgb, var(--cm-style-to, var(--palette-lavender)) 45%, var(--palette-cream)) 80%,
        transparent 100%);
}

/*
    natržený okraj - nahoře a dole přečnívá papír v barvě pozadí sekce. Okraj leží nad sousední
    sekcí (z-index 1), obsah sousedních sekcí (kontejner má z-index 2) zůstává nad ním.
*/
.theme-doma section.cm-style-waves:is(.cm-style-edges-both,.cm-style-edges-top)::before,
.theme-doma section.cm-style-waves:is(.cm-style-edges-both,.cm-style-edges-bottom)::after{
    content:"";
    position:absolute;
    z-index:1;
    left:0;
    right:0;
    height:26px;
    background-color:inherit;
    pointer-events:none;
}
.theme-doma section.cm-style-waves:is(.cm-style-edges-both,.cm-style-edges-top)::before{
    bottom:calc(100% - 1px);
    -webkit-mask:url(svg/edge-top.svg) 0 0 / 100% 100% no-repeat;
    mask:url(svg/edge-top.svg) 0 0 / 100% 100% no-repeat;
}
.theme-doma section.cm-style-waves:is(.cm-style-edges-both,.cm-style-edges-bottom)::after{
    top:calc(100% - 1px);
    -webkit-mask:url(svg/edge-bottom.svg) 0 0 / 100% 100% no-repeat;
    mask:url(svg/edge-bottom.svg) 0 0 / 100% 100% no-repeat;
}
/* ovládání „+“ v náhledu adminu zůstává nad natrženým okrajem */
.theme-doma section .cm-add-section{
    z-index:2;
}

/* zrnitost sekce - samostatný styl i volba natrženého okraje; na tmavém pozadí slabší */
.theme-doma section:is(.cm-style-grain,.cm-style-waves.cm-style-texture-on){
    background-image:url(grain.png);
    background-size:160px 160px;
}
.theme-doma section:is(.cm-style-grain,.cm-style-waves.cm-style-texture-on):is(.cm-bg-dark,.cm-bg-color-black){
    background-image:url(grain-dark.png);
}

/* ------------------------------------------------------------------------------------------
    Dekorace sekce
------------------------------------------------------------------------------------------ */
.theme-doma .cm-decoration-mandala{
    width:62rem;
    height:62rem;
    background-color:currentColor;
    opacity:.45;
    -webkit-mask:url(decorations/mandala.svg) center / contain no-repeat;
    mask:url(decorations/mandala.svg) center / contain no-repeat;
    animation:cm-doma-spin 160s linear infinite;
}
/* hvězdičky - velká a malá */
.theme-doma .cm-decoration-star{
    width:4.8rem;
    height:4.8rem;
    background-color:currentColor;
    -webkit-mask:url(decorations/star.svg) 0 1.8rem / 3rem 3rem no-repeat, url(decorations/star.svg) 3rem 0 / 1.8rem 1.8rem no-repeat;
    mask:url(decorations/star.svg) 0 1.8rem / 3rem 3rem no-repeat, url(decorations/star.svg) 3rem 0 / 1.8rem 1.8rem no-repeat;
    animation:cm-doma-float 5.5s ease-in-out infinite;
}
.theme-doma .cm-decoration-glow{
    width:90rem;
    height:82rem;
    border-radius:50%;
    background:radial-gradient(closest-side, currentColor, transparent);
    opacity:.6;
}
/* na tmavém pozadí jen jemná záře */
.theme-doma :is(.cm-bg-dark,.cm-bg-color-black) > .cm-decoration-glow{
    opacity:.2;
}
/* v sekci s natrženým okrajem nad okrajem (z-index 1), jinak by ji plný pruh okraje useknul rovnou čarou;
   obsah sekce (kontejner má také z-index 2, ale je v DOM až za dekoracemi) zůstává nad ní */
.theme-doma section.cm-style-waves > .cm-decoration-glow{
    z-index:2;
}
@keyframes cm-doma-spin{to{rotate:360deg}}
@keyframes cm-doma-float{0%,100%{translate:0 0}50%{translate:0 -9px}}

/* ------------------------------------------------------------------------------------------
    K9 video s náhledem - zlaté tlačítko přehrát se světlým lemem, okno v hnědé
------------------------------------------------------------------------------------------ */
.theme-doma .cm-video-preview,
.theme-doma .cm-video-preview img{
    border-radius:14px;
}
.theme-doma .cm-video-play{
    width:8.4rem;
    height:8.4rem;
    margin:-4.2rem 0 0 -4.2rem;
    background:linear-gradient(180deg, var(--palette-lightgold), var(--palette-gold));
    color:var(--palette-brown);
    box-shadow:0 0 0 10px color-mix(in srgb, var(--palette-paper) 45%, transparent), 0 18px 40px -12px var(--doma-shadow-strong);
}
.theme-doma .cm-video-play:focus-visible{
    outline:3px solid var(--palette-terracotta);
    outline-offset:12px;
    box-shadow:0 0 0 10px color-mix(in srgb, var(--palette-paper) 45%, transparent);
}
/* okno s videem web vykresluje do body mimo obal stránky - proto i body:has(.theme-doma) */
:is(.theme-doma,body:has(.theme-doma)) .cm-video-modal-backdrop{
    background:color-mix(in srgb, var(--palette-brown) 88%, transparent);
}
:is(.theme-doma,body:has(.theme-doma)) .cm-video-modal-close{
    background:var(--palette-paper);
    color:var(--palette-brown);
}
:is(.theme-doma,body:has(.theme-doma)) .cm-video-modal-close:focus-visible{
    outline-color:var(--palette-lightgold);
}

/* ------------------------------------------------------------------------------------------
    Kompaktní hlavička (rozvržení drží header.css webu, tady je vzhled). Nahoře průhledná,
    vysunutá při posunu nahoru (cm-header-glass) v teplém matném skle.
------------------------------------------------------------------------------------------ */
.theme-doma header.cm-header-compact{
    background:transparent;
    color:var(--palette-brown);
}
.theme-doma header.cm-header-compact .cm-header-inner{
    max-width:1240px;
    margin:0 auto;
    padding:1.4rem 3.2rem;
    gap:2.4rem;
}
.theme-doma header.cm-header-compact.cm-header-glass{
    background:color-mix(in srgb, var(--palette-cream) 45%, transparent);
    -webkit-backdrop-filter:blur(14px) saturate(1.1);
    backdrop-filter:blur(14px) saturate(1.1);
    border-bottom:1px solid color-mix(in srgb, var(--palette-brown) 8%, transparent);
    box-shadow:0 12px 30px -20px color-mix(in srgb, var(--palette-brown) 45%, transparent);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){
    .theme-doma header.cm-header-compact.cm-header-glass{
        background:color-mix(in srgb, var(--palette-cream) 96%, transparent);
    }
}
.theme-doma header.cm-header-compact.cm-header-glass .cm-header-inner{
    padding-top:.9rem;
    padding-bottom:.8rem;
}
/* logo v bílé pilulce (hlavička, menu na telefonu i patička) - okraj jako tlačítka jazyka a měny, bez stínu;
   jen CSS kolem obrázku, takže sedí na logo jakýchkoli rozměrů */
.theme-doma .cm-header-logo{
    display:flex;
    flex:none;
    align-items:center;
    padding:1.3rem 2.4rem;
    border:1.5px solid var(--doma-line);
    border-radius:999px;
    background-color:#fff;
    font-size:0;
}
.theme-doma .cm-header-logo img{
    display:block;
    width:auto;
    height:36px;
}
.theme-doma header.cm-header-compact.cm-header-glass .cm-header-logo{
    padding:1rem 2rem;
}
.theme-doma header.cm-header-compact.cm-header-glass .cm-header-logo img{
    height:30px;
}

/* menu */
.theme-doma header.cm-header-compact .cm-header-menu{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:.6rem 3rem;
    margin:0;
    padding:0;
    list-style:none;
}
.theme-doma .cm-header-menu-item{
    display:block;
    padding:0;
    border:0;
}
.theme-doma .cm-header-menu-link{
    position:relative;
    display:inline-block;
    padding:.6rem 0;
    font-size:1.6rem;
    font-weight:600;
    line-height:1.3;
    color:var(--palette-brown);
    text-decoration:none;
    cursor:pointer;
    transition:color .3s;
}
.theme-doma .cm-header-menu-link:hover{
    color:var(--link-color);
}
/* aktuální stránka - ručně tažená zlatá linka */
.theme-doma :is(.cm-header-menu-link,.cm-header-mobile-link)[aria-current="page"]::after{
    content:"";
    position:absolute;
    left:-4px;
    right:-4px;
    bottom:-3px;
    height:8px;
    background-color:var(--palette-gold);
    -webkit-mask:url(svg/mark-line.svg) 0 0 / 100% 100% no-repeat;
    mask:url(svg/mark-line.svg) 0 0 / 100% 100% no-repeat;
}

/* rozbalovací jazyk a měna */
.theme-doma .cm-header-actions{
    gap:1rem;
}
.theme-doma .cm-header-dropdown{
    position:relative;
}
.theme-doma .cm-header-dropdown-toggle{
    display:inline-flex;
    align-items:center;
    gap:.6rem;
    min-height:44px;
    padding:0 1.4rem;
    border:1.5px solid var(--doma-line);
    border-radius:999px;
    background-color:var(--palette-paper);
    color:var(--palette-brown);
    font-family:var(--font-body, inherit);
    font-size:1.4rem;
    font-weight:700;
    line-height:1;
    cursor:pointer;
    transition:border-color .3s;
}
.theme-doma .cm-header-dropdown-toggle:hover,
.theme-doma .cm-header-dropdown.is-open .cm-header-dropdown-toggle{
    border-color:var(--doma-gold-line);
}
.theme-doma .cm-header-dropdown-value{
    font-size:inherit;
}
.theme-doma .cm-header-dropdown-chevron{
    transition:rotate .3s var(--doma-ease);
}
.theme-doma .cm-header-dropdown.is-open .cm-header-dropdown-chevron{
    rotate:180deg;
}
.theme-doma .cm-header-dropdown-list{
    min-width:18rem;
    margin:0;
    padding:.8rem;
    border:1px solid var(--doma-line);
    border-radius:18px;
    background-color:var(--palette-paper);
    box-shadow:0 24px 48px -24px var(--doma-shadow-strong);
    list-style:none;
}
.theme-doma .cm-header-dropdown-item{
    display:block;
    padding:0;
    border:0;
}
.theme-doma .cm-header-dropdown-option{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:1.2rem;
    width:100%;
    padding:1rem 1.4rem;
    border:0;
    border-radius:12px;
    background:transparent;
    color:var(--palette-brown);
    font-family:var(--font-body, inherit);
    font-size:1.5rem;
    font-weight:600;
    line-height:1.3;
    text-align:left;
    cursor:pointer;
}
.theme-doma .cm-header-dropdown-option:hover{
    background-color:color-mix(in srgb, var(--palette-butter) 55%, transparent);
}
.theme-doma .cm-header-dropdown-option.is-selected{
    background-color:var(--palette-butter);
    font-weight:700;
}
.theme-doma .cm-header-dropdown-option :is(.cm-header-dropdown-option-label,.cm-header-dropdown-option-short){
    font-size:inherit;
    font-weight:inherit;
}
.theme-doma .cm-header-dropdown-option-short{
    color:var(--doma-text-muted);
}
.theme-doma :is(.cm-header-dropdown-toggle,.cm-header-dropdown-option,.cm-header-hamburger,.cm-header-mobile-close,.cm-header-segment):focus-visible{
    outline:3px solid var(--palette-terracotta);
    outline-offset:2px;
}

/* tlačítko v hlavičce - tmavá pilulka (v mobilním menu zůstává zlaté přes celou šířku) */
.theme-doma .cm-header-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    min-height:48px;
    padding:0 2.4rem;
    font-size:1.5rem;
    white-space:nowrap;
}
.theme-doma .cm-header-button:not(.cm-header-mobile-button),
.theme-doma .cm-header-button:not(.cm-header-mobile-button):hover{
    background:var(--palette-brown);
    color:var(--palette-cream) !important;
    box-shadow:none;
}

/* hamburger a zavření mobilního menu - kulatá tlačítka (zobrazení řídí header.css) */
.theme-doma :is(.cm-header-hamburger,.cm-header-mobile-close){
    align-items:center;
    justify-content:center;
    flex:none;
    width:48px;
    height:48px;
    padding:0;
    border:1.5px solid var(--doma-line);
    border-radius:50%;
    background-color:var(--palette-paper);
    color:var(--palette-brown);
    box-shadow:0 10px 22px -16px var(--doma-shadow-strong);
    cursor:pointer;
}

/* mobilní menu - jedna karta přes obrazovku, čistý papír s jemnou zrnitostí (linky nelícovaly s položkami, Petr 20. 10. 2026) */
.theme-doma .cm-header-mobile-overlay{
    background:color-mix(in srgb, var(--palette-brown) 28%, transparent);
}
.theme-doma .cm-header-mobile-menu{
    padding:1.8rem 2rem 2.2rem;
    border-radius:24px;
    background-color:var(--palette-paper);
    background-image:url(grain.png);
    box-shadow:0 40px 80px -30px color-mix(in srgb, var(--palette-brown) 60%, transparent);
    color:var(--palette-brown);
}
.theme-doma .cm-header-mobile-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
}
.theme-doma .cm-header-mobile-top .cm-header-logo{
    padding:1.1rem 1.4rem;
}
.theme-doma .cm-header-mobile-top .cm-header-logo img{
    height:24px;
}
.theme-doma .cm-header-mobile-links{
    display:flex;
    flex-direction:column;
    gap:.4rem;
    margin:2.8rem 0 0;
    padding:0;
    list-style:none;
}
.theme-doma .cm-header-mobile-item{
    display:block;
    padding:0;
    border:0;
}
.theme-doma .cm-header-mobile-link{
    position:relative;
    display:inline-block;
    padding:.6rem 0;
    font-family:var(--font-heading, inherit);
    font-size:3rem;
    line-height:1.2;
    color:var(--palette-brown);
    text-decoration:none;
}
.theme-doma .cm-header-mobile-bottom{
    display:flex;
    flex-direction:column;
    gap:1.4rem;
    margin-top:auto;
    padding-top:2.4rem;
}
.theme-doma .cm-header-mobile-group{
    display:flex;
    flex-direction:column;
    gap:.8rem;
}
.theme-doma .cm-header-mobile-label{
    font-family:var(--font-accent, cursive);
    font-size:2.4rem;
    font-weight:700;
    line-height:1;
    color:var(--doma-gold-deep);
}
.theme-doma .cm-header-segments{
    display:flex;
    flex-wrap:wrap;
    gap:.8rem;
}
.theme-doma .cm-header-segment{
    min-height:44px;
    padding:0 1.6rem;
    border:1.5px solid var(--doma-line);
    border-radius:999px;
    background-color:var(--palette-paper);
    color:var(--palette-brown);
    font-family:var(--font-body, inherit);
    font-size:1.5rem;
    font-weight:600;
    cursor:pointer;
}
.theme-doma .cm-header-segment:is(.is-selected,[aria-pressed="true"]){
    border-color:var(--palette-gold);
    background-color:var(--palette-butter);
    font-weight:700;
}
.theme-doma .cm-header-mobile-button{
    display:flex;
    width:100%;
    min-height:56px;
    margin-top:.6rem;
    font-size:1.6rem;
}

/*
    Záložky pododkazů (blog a jeho kategorie) - papírové záložky visící z prošité linky jako v diáři,
    natočené střídavě, barvy z palety; aktuální je zlatá, delší a má hvězdičku. Při načtení stránky
    se nehýbou, po najetí myší se narovnají a kousek povyjedou (Petr 21. 10. 2026).
*/
.theme-doma .cm-header-tabs-line{
    border-top-color:color-mix(in oklab, var(--palette-brown) 12%, var(--doma-line));
}
.theme-doma .cm-header-tabs-label{
    font-family:var(--font-accent, cursive);
    font-size:2.6rem;
    font-weight:700;
    line-height:1;
    color:var(--doma-gold-deep);
    text-transform:lowercase;
    transform:rotate(-3deg);
}
.theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tab{
    background-color:var(--palette-paper);
    color:color-mix(in srgb, var(--palette-brown) 85%, var(--palette-paper));
    box-shadow:inset 0 22px 8px -8px color-mix(in srgb, var(--doma-shadow-base) 30%, transparent), 0 12px 18px -14px var(--doma-shadow-strong);
    transition:transform .6s var(--doma-ease), box-shadow .6s var(--doma-ease);
}
.theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tab[data-tone="0"]{
    border:1.5px solid var(--doma-line);
    border-top:0;
}
.theme-doma header.cm-header-compact .cm-header-tabs :is(.cm-header-tab,.cm-header-tabs-tag)[data-tone="1"]{
    background-color:var(--palette-butter);
}
.theme-doma header.cm-header-compact .cm-header-tabs :is(.cm-header-tab,.cm-header-tabs-tag)[data-tone="2"]{
    background-color:var(--palette-apricot);
}
.theme-doma header.cm-header-compact .cm-header-tabs :is(.cm-header-tab,.cm-header-tabs-tag)[data-tone="3"]{
    background-color:var(--palette-lavender);
}
.theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tab.is-current{
    border:0;
    background-color:var(--palette-gold);
    color:var(--palette-brown);
    box-shadow:inset 0 22px 8px -8px color-mix(in srgb, var(--doma-shadow-base) 30%, transparent), 0 16px 22px -14px color-mix(in srgb, var(--doma-gold-deep) 85%, transparent);
}
.theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tab:hover{
    transform:rotate(0deg) translateY(4px);
}
.theme-doma header.cm-header-compact .cm-header-tabs :is(.cm-header-tab,.cm-header-tabs-tag,.cm-header-tabs-more-link):focus-visible{
    outline:2.5px solid var(--palette-terracotta);
    outline-offset:-5px;
}
.theme-doma .cm-header-tab-chevron{
    transition:transform .3s var(--doma-ease);
}
/* telefon: jedna zlatá záložka s popiskem a lístek se štítky (s páskou nahoře) */
.theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tab-toggle{
    min-height:6.6rem;
    padding:0 1.6rem 1.3rem 1.8rem;
    border-radius:0 0 1.6rem 1.6rem;
    font-size:1.6rem;
}
.theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tab-toggle .cm-header-tab-text{
    gap:0.8rem;
}
.theme-doma .cm-header-tab-toggle .cm-header-tabs-label{
    font-size:2.1rem;
    color:color-mix(in oklab, var(--doma-gold-deep) 70%, var(--palette-brown));
    transform:none;
}
.theme-doma .cm-header-tabs-sheet{
    border-radius:2.2rem;
    background-color:var(--palette-paper);
    box-shadow:0 34px 60px -28px color-mix(in srgb, var(--palette-brown) 50%, transparent), 0 0 0 1px color-mix(in srgb, var(--palette-brown) 5%, transparent);
    transform:rotate(-0.8deg);
}
.theme-doma .cm-header-tabs-sheet::before{
    content:"";
    position:absolute;
    top:-1.2rem;
    left:50%;
    width:9.2rem;
    height:2.4rem;
    margin-left:-4.6rem;
    background-color:color-mix(in srgb, var(--palette-lavender) 95%, transparent);
    transform:rotate(3deg);
}
.theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tabs-tag{
    gap:0.7rem;
    border:1.5px solid transparent;
    background-color:var(--palette-paper);
    color:color-mix(in srgb, var(--palette-brown) 85%, var(--palette-paper));
}
.theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tabs-tag[data-tone="0"]{
    border-color:var(--doma-line);
}
.theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tabs-tag.is-current{
    border-color:var(--palette-gold);
    background-color:var(--palette-gold);
    color:var(--palette-brown);
    box-shadow:0 10px 18px -12px color-mix(in srgb, var(--doma-gold-deep) 90%, transparent);
}
/* seznam pod „Další“ - stejný papír jako výběr jazyka a měny */
.theme-doma .cm-header-tabs-more-list{
    border:1px solid var(--doma-line);
    border-radius:18px;
    background-color:var(--palette-paper);
    box-shadow:0 24px 48px -24px var(--doma-shadow-strong);
}
.theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tabs-more-link{
    color:var(--palette-brown);
}
.theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tabs-more-link:hover{
    background-color:color-mix(in srgb, var(--palette-butter) 55%, transparent);
}
.theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tabs-more-link.is-current{
    background-color:var(--palette-butter);
    font-weight:700;
}
/* menší okno - záložky i písmo se mírně zmenšují, nikdy nezvětšují (Petr 21. 10. 2026) */
@media (max-width: 1199px){
    .theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tab{
        padding:0 1.4rem 1.05rem;
        font-size:1.45rem;
    }
}
@media (max-width: 991px){
    .theme-doma .cm-header-tabs-label{
        font-size:2.3rem;
    }
    .theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tab{
        min-height:5.4rem;
        padding:0 1.3rem 1rem;
        font-size:1.4rem;
    }
    .theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tab.is-current{
        min-height:6.8rem;
    }
    .theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tab-toggle{
        min-height:6rem;
        padding:0 1.4rem 1.15rem 1.6rem;
        font-size:1.4rem;
    }
    .theme-doma .cm-header-tab-toggle .cm-header-tabs-label{
        font-size:1.9rem;
    }
    .theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tabs-tag{
        min-height:4.2rem;
        padding:0 1.4rem;
        font-size:1.4rem;
    }
    .theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tabs-more-link{
        font-size:1.4rem;
    }
}
@media (max-width: 419px){
    .theme-doma header.cm-header-compact .cm-header-tabs :is(.cm-header-tab,.cm-header-tab-toggle,.cm-header-tabs-tag){
        font-size:1.35rem;
    }
    .theme-doma .cm-header-tab-toggle .cm-header-tabs-label{
        font-size:1.8rem;
    }
}
/* záložky visí do obsahu - blog a článek pod nimi začínají níž (20 px pod nejdelší záložkou) */
.theme-doma:has(header.cm-header-with-tabs) :is(section.blog,section.blog-article-detail:not(.alone-article)){
    padding-top:17.6rem;
}
@media (prefers-reduced-motion: reduce){
    .theme-doma header.cm-header-compact .cm-header-tabs .cm-header-tab,
    .theme-doma .cm-header-tab-chevron{
        transition:none;
    }
}

/* telefon - menší logo, vysunutá hlavička jako plovoucí skleněná pilulka */
@media (max-width: 991px){
    .theme-doma header.cm-header-compact .cm-header-inner{
        padding:.9rem 1.6rem .8rem;
        gap:1rem;
    }
    .theme-doma .cm-header-logo{
        padding:1.1rem 1.4rem;
    }
    .theme-doma .cm-header-logo img{
        height:24px;
    }
    .theme-doma .cm-header-actions{
        gap:.8rem;
    }
    .theme-doma .cm-header-button:not(.cm-header-mobile-button){
        min-height:44px;
        padding:0 1.6rem;
        font-size:1.4rem;
    }
    .theme-doma header.cm-header-compact.cm-header-glass{
        background:transparent;
        -webkit-backdrop-filter:none;
        backdrop-filter:none;
        border-bottom:0;
        box-shadow:none;
    }
    .theme-doma header.cm-header-compact.cm-header-glass .cm-header-inner{
        margin:8px;
        padding:8px;
        border:1px solid color-mix(in srgb, var(--palette-brown) 8%, transparent);
        border-radius:999px;
        background:color-mix(in srgb, var(--palette-cream) 45%, transparent);
        -webkit-backdrop-filter:blur(14px) saturate(1.1);
        backdrop-filter:blur(14px) saturate(1.1);
        box-shadow:0 18px 36px -20px color-mix(in srgb, var(--palette-brown) 55%, transparent);
    }
    @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))){
        .theme-doma header.cm-header-compact.cm-header-glass .cm-header-inner{
            background:color-mix(in srgb, var(--palette-cream) 96%, transparent);
        }
    }
    .theme-doma header.cm-header-compact.cm-header-glass .cm-header-logo{
        padding:1rem 1.3rem;
    }
    .theme-doma header.cm-header-compact.cm-header-glass .cm-header-logo img{
        height:22px;
    }
    /* záložky pod plovoucí pilulkou visí přímo z její spodní hrany (ne z okraje hlavičky pod ní) a pravým
       krajem končí až tam, kde je spodní hrana pilulky rovná - pod zaoblením by mezi nimi byla mezera;
       lístek se všemi pododkazy lícuje s okraji pilulky */
    .theme-doma header.cm-header-compact.cm-header-glass .cm-header-tabs{
        --doma-pill-gap:8px;
        top:calc(100% - var(--doma-pill-gap));
    }
    .theme-doma header.cm-header-compact.cm-header-glass .cm-header-tabs-inner{
        padding:0 calc(var(--doma-pill-gap) + 2.6rem) 0 var(--doma-pill-gap);
    }
    .theme-doma header.cm-header-compact.cm-header-glass .cm-header-tabs-sheet{
        left:0;
        right:-2.6rem;
    }
    .theme-doma:has(header.cm-header-with-tabs) :is(section.blog,section.blog-article-detail:not(.alone-article)){
        padding-top:15rem;
    }
}

/* úzké telefony - logo v pilulce, tlačítko a hamburger se musí vejít vedle sebe bez vodorovného posuvníku
   (obsah hlavičky potřeboval 383 px, takže přetékal už na 375 px) */
@media (max-width: 419px){
    .theme-doma header.cm-header-compact .cm-header-inner{
        padding:.9rem 1.2rem .8rem;
        gap:.8rem;
    }
    .theme-doma header.cm-header-compact.cm-header-glass .cm-header-inner{
        margin:6px;
        padding:6px;
    }
    .theme-doma header.cm-header-compact.cm-header-glass .cm-header-tabs{
        --doma-pill-gap:6px;
    }
    .theme-doma header.cm-header-compact .cm-header-logo,
    .theme-doma header.cm-header-compact.cm-header-glass .cm-header-logo{
        padding:.9rem 1.2rem;
    }
    .theme-doma header.cm-header-compact .cm-header-logo img,
    .theme-doma header.cm-header-compact.cm-header-glass .cm-header-logo img{
        height:22px;
    }
    .theme-doma .cm-header-actions{
        gap:.6rem;
    }
    /* header.css webu má pro telefon header.cm-header-compact .cm-header-button.btn - selektor musí být silnější */
    .theme-doma header.cm-header-compact .cm-header-button.btn:not(.cm-header-mobile-button){
        padding:0 1.3rem;
        font-size:1.35rem;
    }
    .theme-doma .cm-header-hamburger{
        width:44px;
        height:44px;
    }
}
@media (max-width: 359px){
    .theme-doma header.cm-header-compact .cm-header-logo,
    .theme-doma header.cm-header-compact.cm-header-glass .cm-header-logo{
        padding:.8rem 1rem;
    }
    .theme-doma header.cm-header-compact .cm-header-logo img,
    .theme-doma header.cm-header-compact.cm-header-glass .cm-header-logo img{
        height:20px;
    }
    .theme-doma header.cm-header-compact .cm-header-button.btn:not(.cm-header-mobile-button){
        padding:0 1rem;
        font-size:1.3rem;
    }
}
/* nejužší telefony (320 px) - tlačítko z hlavičky zůstává jen v otevřeném menu */
@media (max-width: 333px){
    .theme-doma header.cm-header-compact .cm-header-button:not(.cm-header-mobile-button){
        display:none;
    }
}

/* ------------------------------------------------------------------------------------------
    Patička ve sloupcích (rozvržení drží footer.css webu) - čárkovaná linka, ruční nadpisy,
    nepodtržené odkazy, logo bez stínu
------------------------------------------------------------------------------------------ */
.theme-doma footer.cm-footer-columns{
    margin-top:14rem;
    border-top:2px dashed var(--doma-line);
    background:transparent;
    color:var(--palette-brown);
    font-size:1.55rem;
}
.theme-doma :where(footer.cm-footer-columns *){
    font-size:inherit;
}
.theme-doma footer.cm-footer-columns .cm-footer-inner{
    max-width:1240px;
    margin:0 auto;
    padding:5.6rem 3.2rem 3.6rem;
    gap:4rem 5.6rem;
}
.theme-doma footer.cm-footer-columns .cm-footer-brand{
    gap:2.4rem;
}
.theme-doma footer.cm-footer-columns .cm-footer-logo{
    display:inline-flex;
    align-self:flex-start;
    align-items:center;
    padding:1.3rem 2.4rem;
    border:1.5px solid var(--doma-line);
    border-radius:999px;
    background-color:#fff;
    font-size:0;
}
.theme-doma footer.cm-footer-columns .cm-footer-logo img{
    display:block;
    width:auto;
    height:36px;
    box-shadow:none;
    filter:none;
}
.theme-doma footer.cm-footer-columns .cm-footer-menu-list{
    display:flex;
    flex-wrap:wrap;
    gap:1rem 2.4rem;
    margin:0;
    padding:0;
    list-style:none;
    font-size:1.5rem;
}
.theme-doma footer.cm-footer-columns :is(.cm-footer-menu-item,.cm-footer-list-item){
    margin:0;
    padding:0;
    border:0;
}
.theme-doma footer.cm-footer-columns :is(.cm-footer-menu-link,.cm-footer-link){
    color:var(--palette-brown);
    font-weight:600;
    line-height:1.4;
    text-decoration:none;
    transition:color .3s;
}
.theme-doma footer.cm-footer-columns :is(.cm-footer-menu-link,.cm-footer-link):hover{
    color:var(--link-color);
}
.theme-doma footer.cm-footer-columns .cm-footer-heading{
    margin:0 0 1.4rem;
    font-family:var(--font-accent, cursive);
    font-size:2.8rem;
    font-weight:700;
    line-height:1;
    letter-spacing:normal;
    color:var(--doma-gold-deep);
}
.theme-doma footer.cm-footer-columns .cm-footer-list{
    display:flex;
    flex-direction:column;
    gap:1.2rem;
    margin:0;
    padding:0;
    list-style:none;
}
.theme-doma footer.cm-footer-columns .cm-footer-address{
    display:flex;
    flex-direction:column;
    gap:1.4rem;
    font-style:normal;
    line-height:1.45;
}
.theme-doma footer.cm-footer-columns .cm-footer-contact-item{
    display:flex;
    align-items:flex-start;
    gap:1rem;
    margin:0;
    line-height:1.45;
}
.theme-doma footer.cm-footer-columns .cm-footer-icon{
    flex:none;
    margin-top:3px;
}
.theme-doma footer.cm-footer-columns .cm-footer-icon :is(.cm-footer-icon-shape,.cm-footer-icon-line){
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.theme-doma .cm-footer-icon-email .cm-footer-icon-shape{
    fill:var(--palette-butter);
    stroke:var(--doma-gold-deep);
}
.theme-doma .cm-footer-icon-email .cm-footer-icon-line{
    fill:none;
    stroke:var(--doma-gold-deep);
}
.theme-doma .cm-footer-icon-phone .cm-footer-icon-shape{
    fill:var(--palette-apricot);
    stroke:var(--palette-terracotta);
}
.theme-doma footer.cm-footer-columns .cm-footer-contact-label{
    font-weight:700;
}
.theme-doma footer.cm-footer-columns .cm-footer-phone-link{
    white-space:nowrap;
}
.theme-doma footer.cm-footer-columns .cm-footer-note{
    display:block;
    margin-top:.4rem;
    font-size:1.35rem;
    color:var(--doma-text-muted);
}
.theme-doma footer.cm-footer-columns .cm-footer-bottom{
    max-width:1240px;
    margin:0 auto;
    padding:0 3.2rem 4rem;
}
.theme-doma footer.cm-footer-columns .cm-footer-copyright{
    margin:0;
    padding-top:2rem;
    border-top:1.5px dashed var(--doma-line);
    font-size:1.4rem;
    line-height:1.5;
    text-align:left;
    color:var(--doma-text-muted);
}
@media (max-width: 767px){
    .theme-doma footer.cm-footer-columns{
        margin-top:9rem;
    }
    .theme-doma footer.cm-footer-columns .cm-footer-inner{
        padding:4.4rem 1.6rem 3rem;
    }
    .theme-doma footer.cm-footer-columns .cm-footer-bottom{
        padding:0 1.6rem 3.2rem;
    }
}

/* ------------------------------------------------------------------------------------------
    Telefon
------------------------------------------------------------------------------------------ */
@media (max-width: 767px){
    .theme-doma .cm-headline-kicker{
        font-size:2.6rem;
    }
    .theme-doma .cm-column-elements.cm-style-card{
        padding:2.8rem 2.2rem 2.4rem;
        border-radius:20px;
    }
    .theme-doma .cm-column-elements.cm-style-card.cm-style-paper-notebook{
        padding-left:68px;
        border-radius:10px;
    }
    .theme-doma .cm-style-sticky{
        padding:2.4rem 2.4rem 2.2rem;
    }
    .theme-doma .cm-video-play{
        width:6.4rem;
        height:6.4rem;
        margin:-3.2rem 0 0 -3.2rem;
        box-shadow:0 0 0 8px color-mix(in srgb, var(--palette-paper) 45%, transparent), 0 14px 30px -12px var(--doma-shadow-strong);
    }
    .theme-doma .cm-decoration-mandala{
        width:42rem;
        height:42rem;
    }
}

/* ------------------------------------------------------------------------------------------
    Omezení pohybu - bez nekonečných animací, kreslení, nadzvedávání a vysouvání hlavičky
------------------------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce){
    .theme-doma .cm-decoration,
    .theme-doma .cm-style-breath::after,
    .theme-doma .cm-style-breath p,
    .theme-doma .cm-mark::after,
    .theme-doma .cm-style-kickerIcon .cm-headline-kicker::after,
    .theme-doma .cm-column-elements.cm-style-circle::before,
    .theme-doma .cm-column-elements.cm-style-circle::after{
        animation:none !important;
    }
    .theme-doma .cm-style-breath p:nth-of-type(2){
        opacity:0;
    }
    .theme-doma .cm-style-breath:focus-within p:nth-of-type(2){
        opacity:1;
    }
    .theme-doma :is(.btn,.cm-style-card,.cm-style-sticky,.cm-style-polaroid .cm-image-content,.cm-style-iconCircle .cm-image-content,.cm-header-dropdown-chevron,.cm-header-menu-link,.cm-faq-element .faq-question .title,.input-group),
    .theme-doma header.cm-header-compact{
        transition:none !important;
    }
    .theme-doma header.cm-header-compact{
        animation:none !important;
    }
}
