:root {
    --thyuu-font-color: 0deg 0% 15%;
    --thyuu-nav-height: 4rem;
    --thyuu-edge-tb: var(--thyuu-nav-height);
    --thyuu-bg: hsl(var(--thyuu-font-color) / 4%);
    --thyuu-radius: 16px;
    --thyuu-font-size-small: .75rem;
    --thyuu-card-size: 22.5rem;
    --thyuu-card-mini: 13.5rem;
}


thyuu-embed {
    display: block;
    position: relative;
    background: var(--thyuu-bg);
    border-radius: var(--thyuu-radius);
    outline: thin solid var(--thyuu-bg);
}

thyuu-embed iframe {
    width: 100%;
    transition: .5s .5s;
}

thyuu-embed:not(.loaded) iframe {
    opacity: 0;
    pointer-events: none;
}

thyuu-embed:not(.loaded) .loading {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: var(--thyuu-font-size-small);
    width: fit-content;
    height: fit-content;
    line-height: 1;
    inset: 1em 0 auto;
    margin: auto;
    gap: .5em;
    padding: 1em 2em;
    border-radius: 2em;
    pointer-events: none;
    opacity: .5;
}

thyuu-embed:not(.loaded) .loading:before {
    content: "";
    border-top: 2px solid;
    border-radius: 50%;
    width: 1em;
    aspect-ratio: 1;
    animation: rotate 2s linear infinite;
}

thyuu-embed.loaded .loading {
    display: none;
}

.thyuu-block {
    padding: 1em;
    border-radius: var(--thyuu-radius);
    background: var(--thyuu-bg);
}

.thyuu-music {
    width: 100%;
    height: 65px;
    overflow: hidden;
}

.thyuu-music:is([data-type="nn_lists"], [data-type="nn_album"]) {
    height: 390px;
}

:is([theme="dark"], body.dark-color) .thyuu-music iframe {
    opacity: .6;
    mix-blend-mode: plus-lighter;
}

.thyuu-video {
    --thyuu-font-color: 0 0% 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: calc(80vh - var(--thyuu-edge-tb));
    margin-inline: auto;
    aspect-ratio: 16 / 9;
    background: #000;
    color: #fff;
}

.thyuu-video iframe {
    height: 100%;
    border-radius: inherit;
    align-self: flex-start;
    z-index: 2;
}

.thyuu-video[data-type="dy"] iframe:hover {
    height: calc(100% + 35px);
}

.thyuu-livephoto {
    background: 0;
    outline: 0;
}

.thyuu-livephoto .lpk-live-photo-player {
    position: relative;
    max-width: 100%;
    max-height: calc(100vh - var(--thyuu-edge-tb)*2);
    border-radius: var(--thyuu-radius);
    overflow: hidden;
}

.thyuu-noone {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    text-wrap: balance;
    color: hsl(var(--thyuu-font-color) / .5);
    font-size: var(--thyuu-font-size-small);
    line-height: 2;
    max-width: 100%;
    min-width: min(var(--thyuu-card-size), 100%);
    min-height: 6.5rem;
    padding: 1em;
    background: var(--thyuu-bg);
    border-radius: var(--thyuu-radius);
}

:where(thyuu-embed) {
    margin-block: 1em;
}

@media (max-width: 641px) {
    .thyuu-video.as-tb:not([data-type="dy"]) {
        aspect-ratio: 9 / 16;
    }

    .thyuu-video[data-type="dy"] {
        width: min(324px, 100%);
        max-height: none;
        margin-inline: auto;
        aspect-ratio: .4821;
        overflow: hidden;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg)
    }

    to {
        transform: rotate(1turn)
    }
}