.main {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.categorydescription {
    font-size: 0.85em;
    text-align: center;
    margin-bottom: 12px;
}

.left {
    flex: none;
    order: 1;
    background-color: #fff;
    box-shadow: 0 0.5rem 1rem rgb(0 0 0 / .1), 0 -0.5rem 1rem rgb(0 0 0 / .1);
    margin: 10px;
    padding-left: 30px;
    padding-right: 30px;
}


.left .occasions {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    padding: 0px;
    margin-bottom: 18px;
}

.left .occasions .col {
    flex: 1;
}


.left .occasions .occasion {
    list-style-type: none;
    margin-bottom: 8px;
}

.left .occasions .occasion a {
    color: black;
    text-align: center;
    text-underline-offset: 4px;
}

.left .occasions .occasion a.active {
    text-decoration: none;
}

.left .occasions .occasion .subgroups {
    margin-top: 6px;
    margin-left: 14px;
    font-size: 0.9em;
    max-width: 240px;
}

.left .occasions .occasion .subgroups a {
    text-underline-offset: 1px;
    margin-left: 4px;
}

.articles {
    max-width: 240px;
    padding-left: 12px;
}

.articles li::marker {
    content: "> ";
}


a.article {
    color: black;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.landings {
    max-width: 240px;
}

.landings > div {
    padding-bottom: 12px;
}


a.landing {
    color: black;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.description {
    margin: 8px;
    font-size: 0.8em;
}

.subcategories h2 {
    margin-block-start: 0em;
    margin-block-end: 0em;
    font-size: smaller;
    font-style: normal;
    font-weight: normal;
    display: inline-block;
}

.subcategories {
    display: flex;
    flex: 10;
}

.subcategories .group {
    flex: 1;
}

.subcategories .filter {
    cursor: pointer;
    display: inline-block;
    font-size: 0.8em;
    margin: 5px;
    padding: 3px;
    padding-left: 9px;
    padding-right: 9px;
    border-radius: 6px;
    text-decoration: none;
    color: black;
    /* font-weight: 100; */
    background-color: #efefef;
}

.subcategories h2 .filter {
    font-size: 1em;
}

.subcategories .filter.top1 {
    background-color: #FFD1DC;
}

.subcategories .filter.top2 {
    background-color: #A8DADC;
}

.subcategories .filter.top3 {
    background-color: #F6EAC2;
}

.subcategories .filter.top4 {
    background-color: #C3B1E1;
}

.subcategories .filter.top5 {
    background-color: #B5EAD7;
}

.subcategories .filter.top6 {
    background-color: #FFDAC1;
}

.subcategories .filter.top7 {
    background-color: #E2F0CB;
}

.subcategories .filter.top8 {
    background-color: #DAD4EF;
}

.subcategories .filter.top9 {
    background-color: #B0E0E6;
}

.subcategories .filter.top10 {
    background-color: #F4CCCC;
}

.subcategories .filter.female {
    background-color: #f6d9d9;
}

.subcategories .filter.male {
    background-color: #90d1ec;
}


.subcategories .filter:hover {
    background-color: #c0c0c0;
}

.subcategories .filter.active {
    background-color: #999999;
}

.filters {
    display: flex;
    justify-content: end;
    align-items: center;
    font-size: 0.8em;
}

.filters .filter {
    color: #655ADD;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 2px 4px;
    border-style: dashed;
}

.filters .filter.active {
    border-color: #655ADD;
}

.editors {
    margin: 16px;
    margin-left: 0px;
    margin-top: 20px;
    width: 100%;
}

.editors .editor {
    display: inline-block;
    width: 49%;
}

.editors .editor > * {
    width: 100%;
}

.editors .label {
    color: #e03400;
}

.editors .editor input {
    padding: 2px 4px;
    font-size: 1.1em;
    border: 1px solid black;
    border-radius: 2px;
    margin-top: 4px;
}

.center {
    flex: 50%;
    order: 2;
    /* border-radius: 20px; */
    box-shadow: 0 0.5rem 1rem rgb(0 0 0 / .1), 0 -0.5rem 1rem rgb(0 0 0 / .1);
    background-color: #fff;
    margin: 10px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 20px;
}


.center .greeting {
    padding: 8px;
    padding-top: 16px;
    padding-bottom: 16px;
    cursor: pointer;
}

.center .greeting .greeting-text {
    font-size: 0.9em;
    line-height: 1.3em;
    font-weight: 400;
    margin-block-start: 0px;
    margin-block-end: 0px;
}

.center .greeting .greeting-text:first-letter {
    color: #e03400;
    font-size: 1.3em;
    font-weight: 700;
}

.center .greeting .greeting-controls {
    margin-top: 12px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

.greeting-controls button.like-button.liked {
    color: white;
    background-color: #ef4444;
    border-color: #dc2626;
}

.greeting-controls button.like-button.liked:hover {
    background-color: #dc2626;
}

.greeting-controls button.like-button.liked:active {
    background-color: #b91c1c;
}

.greeting-controls button.makecard-button {
    display: none;
}

.burst-heart {
    position: absolute;
    font-size: 1rem;
    color: #ef4444;
    opacity: 1;
    pointer-events: none;
    z-index: 1000;
    animation: burst-animation 0.8s forwards ease-out;
}

@keyframes burst-animation {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--end-x), var(--end-y)) scale(0.5);
        opacity: 0;
    }
}



.center .pages {
    margin-top: 16px;
    font-size: 0.9em;
    text-align: center;
}

.center .pages .page {
    margin-left: 6px;
}

.right {
    flex: 40%;
    order: 3;
    padding: 30px;
    padding-top: 0px;
    /* border-radius: 20px; */
    box-shadow: 0 0.5rem 1rem rgb(0 0 0 / .1), 0 -0.5rem 1rem rgb(0 0 0 / .1);
    background-color: #fff;
    margin: 10px;
}

.right .right-wrapper {
    position: sticky;
    top: 0;
}

.right .card-image {
    container: card-image / inline-size;
    position: relative;
    border: 1px solid #cfcfcf;
}

.right .card-image img {
    display: block;
    width: 100%;
    height: 100%;
}

.right .card .hint {
    cursor: pointer;
    text-align: center;
    margin-top: 12px;
    margin-bottom: 12px;
    font-size: 0.8em;
    font-weight: bold;
}

.right .card .card-content-wrapper {
    font-family: "Zhizn", Verdana, Tahoma;;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 4cqi;

    position: absolute;
    top: 5%;
    left: 15%;
    right: 15%;
    bottom: 10%;
}

.right .card .card-content {
    /* outline: 1px dashed #00000033; */
    outline-offset: 6px;
}

.right .card .card-content:hover {
    outline: 1px dashed black;
}

.right .card .card-content:focus-visible {
    outline: 2px dashed black;
}

.right .card .card-content.title,
.right .card .card-content.footer {
    color: #e03400;
    text-align: center;
}

.right .card .card-carousel .caption {
    display: flex;
    align-items: baseline;
    margin-top: 12px;
    font-size: 0.85em;
}

.right .card .card-carousel img {
    max-width: 100%;
    max-height: 100%;
}

.right .card .card-controls {
    font-size: 0.8em;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;

    border: 1px solid #cfcfcf;
    border-top: none;
    margin-top: 0px;
    margin-bottom: 6px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.right .card .card-controls #card-set-font-color {
    color: #ffffff;
    background: #000000;
}

.right .card .card-controls #card-set-font-color option[value="#000000"] {
    color: #ffffff;
    background: #000000;
}

.right .card .card-controls #card-set-font-color option[value="#ffffff"] {
    color: #000000;
    background: #ffffff;
}

.right .card .card-controls #card-set-font-color option[value="#d83134"] {
    color: #ffffff;
    background: #d83134;
}

.right .card .card-controls #card-set-font-color option[value="#3a7e20"] {
    color: #ffffff;
    background: #3a7e20;
}

.right .card .card-controls #card-set-font-color option[value="#4a4ab1"] {
    color: #ffffff;
    background: #4a4ab1;
}

.right .card .card-controls #card-set-font-color option[value="#e3872c"] {
    color: #ffffff;
    background: #e3872c;
}

.right .card .spacer {
    flex: 1;
}

.right .card .alldesigns {
    /* font-size: 0.85em; */
    text-decoration: underline;
    color: #655adc;
    cursor: pointer;
}

.right .card .card-carousel .images {
    border: 1px solid #e0e0e0;
    height: 90px;
    margin-top: 2px;
    margin-bottom: 2px;
    border-radius: 4px;
    overflow-x: scroll;
    overflow-y: hidden;
    display: flex;
    flex-wrap: nowrap;
    scrollbar-width: thin;
}

.right .card .card-carousel .images .item {
    border: 1px solid black;
    margin-left: 8px;
    margin-top: 6px;
    margin-bottom: 8px;
    height: calc(100% - 12px);
    cursor: pointer;
}

/* START MORE BUTTON */

.right .card .card-carousel .images .item.button {
    font-size: 14px;
    padding-left: 8px;
    padding-right: 8px;
    text-align: center;
    display: flex;
    align-items: center;

    box-sizing: border-box;
    --border-radius: 15px;
    --border-width: 4px;
    position: relative;
    border: 0;
    z-index: 2;
}
   
.right .card .card-carousel .images .item.button::after {
    box-sizing: border-box;
    --m-i: linear-gradient(#000, #000);
    --m-o: content-box, padding-box;
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: var(--border-width);
    border-radius: var(--border-radius);
    background-image: conic-gradient(
           #488cfb,
           #29dbbc,
           #ddf505,
           #ff9f0e,
           #e440bb,
           #655adc,
           #488cfb
       );
    -webkit-mask-image: var(--m-i), var(--m-i);
    mask-image: var(--m-i), var(--m-i);
    -webkit-mask-origin: var(--m-o);
    mask-origin: var(--m-o);
    -webkit-mask-clip: var(--m-o);
    mask-composite: exclude;
    -webkit-mask-composite: destination-out;
    filter: hue-rotate(0);
    animation: rotate-hue linear 500ms infinite;
    animation-play-state: paused;
}
   
.right .card .card-carousel .images .item.button:hover::after {
    animation-play-state: running;
}
   
@keyframes rotate-hue {
    to {
        filter: hue-rotate(1turn);
    }
}

.right .card .card-carousel .images .item.button:active {
    --border-width: 5px;
}

/* UPLOAD BUTTON */

.right .send {
    margin-top: 12px;
    margin-bottom: 8px;
}

.right .senders {
    display: flex;
    align-items: center;
}

.right .download {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 12px;
}

.right .download button {
    background-color: #ff6161;
    color: white;
    font-weight: bold;
    padding: 8px 14px;
}

.right .download button:hover {
    background-color: #ef4444;    
}

.right .download button img {
    height: 22px;
    width: 22px;
    margin-left: 6px;
}

.right .sendto {
    margin: 2px;
}

.right .sendto img {
    height: 36px;
    width: 36px;
}

.gifts {
    margin-left: 24px;
}

.gift {
    cursor: pointer;
    display: inline-block;
    font-size: 0.8em;
    margin: 4px;
    padding: 6px;
    padding-left: 12px;
    padding-right: 12px;
    border: 1px solid black;
}

.gift:hover {
    background-color: #f0f0f0;
}

.gift.active {
    background: #e5e5e5;
    box-shadow: inset 0px 0px 5px #c1c1c1;
    outline: none;
}

.notice-wrap {
    display: flex;
    justify-content: center;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.notice {
    display: none;
    background: #FFD1DC;
    padding: 4px 16px;
    border-radius: 16px 16px 0px 0px;
    font-size: 1.1em; 
}


body > .footer {
    display: flex;
    align-items: center;
    padding-left: 12px;
    padding-bottom: 12px;
    font-size: 0.8em;
}

body > .footer .contacts {
    flex: 2;
}

body > .footer .description {
    flex: 6;
}

dialog {
    height: 80%;
    width: 80%;
    overflow-y: hidden;
    padding: 0px;
    border: 1px solid #707070;
    background-color: white;
    border-radius: 0px;
    box-shadow: 0 0.5rem 1rem rgb(0 0 0 / .5), 0 -0.5rem 1rem rgb(0 0 0 / .3);
}

dialog:focus-visible {
    outline: none;
}

dialog .title {
    background: linear-gradient(45deg, #f86a6a, #7b70e6);
    display: flex;
    border-bottom: 1px solid #909090;
    padding: 8px;
    font-size: 1.2em;
    top: 0;
    position: sticky;
}

dialog .title .caption {
    width: 100%;
    text-align: center;
    font-weight: bold;
    color: white;
    font-weight: bold;

}

dialog .title .spacer {
    flex: 1;
}

dialog .title .close-button {
    cursor: pointer;
}

.allcards {
    margin: 12px;
    overflow: auto;
    height: calc(100% - 60px);
}

.allcards .group {
    padding: 8px;
    border: 1px solid #00000020;
    margin-bottom: 8px;
}

.allcards .group .group-caption {
    padding-bottom: 8px;
    font-weight: bold;
}

.allcards .group .carousel {

}

.allcards .group .carousel img {
    height: 128px;
    border: 1px solid #cfcfcf;
}

.allcards .group .carousel img:hover {
    outline: 1px solid #333333;
}

.allcards .group .carousel img:active {
    outline: 2px solid black;
}

@media (max-width: 1500px) {
    .right .card .card-controls {
        font-size: 0.7em;
        gap: 4px;
    }

    .right .card .card-controls button {
        padding: 5px 4px;
        font-size: 0.9em;
    }

    .right .card .card-controls select {
        padding: 5px 4px;
        font-size: 0.9em;
    }
}


@media (min-width: 1001px) {
    .left { flex: none; }
    .center { flex: 6; }
    .right { flex: 3; }
}

@media (max-width: 1000px) {
    .center {
        flex: 100%;
    }
    .right {
        flex: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }
    .left {
        flex: 100%;
        order: 4;
        padding-left: 20px;
        padding-right: 20px;
    }
    .left .occasions {
        flex-direction: row;
        column-gap: 40px;
    }

    .heading {
        display: none;
    }

    .mini-heading {
        display: flex;
    }

    .landings-wrapper {
        display: none;
    }

    .right .right-wrapper {
        position: static;
    }

    .greeting-controls button.makecard-button {
        display: flex;
    }

    .subcategories .label {
        display: none;
    }
}

@media (max-width: 500px) {
    .allcards .group .carousel img {
        height: 110px;
    }
}
