:root {
    --article-inner-width: calc(100% - 48px);
}

body {
    font-family: "Zen Kaku Gothic New", sans-serif;

    >div {
        >main#x-media {

            &::before {
                content: none;
            }

            >article {
                >.headerwrap {
                    position: relative;
                    padding-bottom: 64px;

                    @media (width >=1000px) {
                        display: flex;
                        flex-wrap: wrap;
                        column-gap: 60px;
                        justify-content: center;
                    }

                    >hgroup {
                        width: 100%;
                    }

                    &::before {
                        content: "";
                        position: absolute;
                        top: -11.6rem;
                        left: 0;
                        z-index: -1;
                        mix-blend-mode: multiply;
                        background-image: radial-gradient(at 0% 0%, hsl(55deg, 100%, 93%) 0px, transparent 50%), radial-gradient(at 100% 0%, hsl(210deg, 30%, 98%) 0px, transparent 50%), radial-gradient(at 0% 100%, hsl(145deg, 40%, 88%) 0px, transparent 50%), radial-gradient(at 100% 100%, hsl(215deg, 60%, 85%) 0px, transparent 50%), radial-gradient(at 50% 50%, hsl(180deg, 20%, 95%) 0px, transparent 70%);
                        background-size: cover;
                        background-position: bottom;
                        pointer-events: none;
                        filter: saturate(220%) contrast(0.8);
                        width: 100%;
                        height: calc(100% + 11.6rem);
                        display: block;
                    }

                    >.headerwrap-left {
                        border-radius: 15px;
                        overflow: hidden;
                        position: relative;
                        aspect-ratio: 327/184;
                        width: var(--article-inner-width);
                        margin-inline: auto;

                        @media (width >=1000px) {
                            width: 500px;
                            margin-inline: 0;
                        }

                        >img {
                            position: absolute;
                            top: 50%;
                            left: 50%;
                            transform: translate(-50%, -50%);
                            max-width: none;
                            width: 100%;
                            height: 100%;
                            object-fit: cover;
                            object-position: center;
                        }
                    }

                    >.headerwrap-right {
                        width: var(--article-inner-width);
                        margin-inline: auto;

                        @media (width >=1000px) {
                            width: calc(1000px - 560px);
                            margin-inline: 0;
                        }

                        @media (width >=1120px) {
                            width: calc(1120px - 560px);
                        }

                        >header {
                            >dl {
                                display: flex;
                                flex-direction: row;
                                flex-wrap: wrap;
                                padding-top: 24px;

                                @media (width >=1000px) {
                                    padding-top: 0;
                                }

                                >* {
                                    font-size: 12px;
                                    line-height: 16px;
                                    color: #8D8D8D;
                                    font-weight: 500;
                                }

                                >dt {
                                    position: relative;
                                    padding-left: 20px;

                                    &::before {
                                        content: "";
                                        aspect-ratio: 1/1;
                                        width: 16px;
                                        position: absolute;
                                        top: 50%;
                                        left: 0;
                                        transform: translateY(-50%);
                                        background-position: center center;
                                        background-repeat: no-repeat;
                                        background-size: cover;
                                    }

                                    &:first-of-type {
                                        &::before {
                                            background-image: url(/assets/img/media/icon-pub.png);
                                        }
                                    }

                                    &:nth-of-type(2) {
                                        margin-left: 20px;

                                        &::before {
                                            background-image: url(/assets/img/media/icon-up.png);
                                        }
                                    }
                                }

                                >dd {
                                    padding-left: 8px;
                                    font-family: "poppins", sans-serif;
                                }
                            }

                            >nav {
                                padding-top: 8px;

                                >a {
                                    display: inline-block;
                                    background-color: #fff;
                                    line-height: 28px;
                                    font-size: 12px;
                                    position: relative;
                                    padding: 0 12px 0 24px;
                                    border-radius: 9999px;
                                    font-weight: bold;

                                    &:before {
                                        content: "";
                                        position: absolute;
                                        top: 50%;
                                        left: 12px;
                                        transform: translateY(-50%);
                                        aspect-ratio: 1/1;
                                        width: 8px;
                                        background-color: #0059AA;
                                        border-radius: 9999px;
                                    }

                                    &:hover {
                                        background-color: #0059AA;
                                        color: #fff;
                                        transition: 0.5s;

                                        &:before {
                                            background-color: #fff;
                                        }
                                    }
                                }
                            }

                            >h1 {
                                padding-top: 24px;
                                font-size: 24px;
                                line-height: 1.5;
                                font-weight: bold;

                                @media (width >=1000px) {
                                    padding-top: 32px;
                                    font-size: 36px;
                                    line-height: 54px;
                                }
                            }
                        }

                        >p {
                            font-size: 16px;
                            line-height: 1.5;
                            padding-top: 16px;

                            @media (width >=1000px) {
                                padding-top: 36px;
                                font-size: 20px;
                                line-height: 28px;
                            }
                        }
                    }
                }

                >.bodywrap {
                    width: var(--article-inner-width);
                    margin-inline: auto;
                    padding-top: 60px;
                    padding-bottom: 80px;
                    max-width: 1040px;

                    @media (width >=1000px) {
                        display: flex;
                        column-gap: 60px;
                    }

                    >.sidebar {
                        display: none;
                        position: sticky;
                        top: 100px;
                        align-self: flex-start;

                        @media (width >=1000px) {
                            display: block;
                            width: 300px;
                        }

                        >nav {
                            &:first-of-type {
                                >header {
                                    >h2 {
                                        font-size: 18px;
                                        line-height: 26px;
                                        font-weight: bold;
                                    }
                                }

                                >.pagelink {
                                    padding-top: 12px;

                                    >ul {
                                        >li {
                                            padding-block: 12px;
                                            border-bottom: solid 1px #EDEDED;
                                            position: relative;
                                            padding-left: 16px;

                                            &:first-of-type {
                                                border-top: solid 1px #EDEDED;
                                            }

                                            &::before {
                                                content: "";
                                                position: absolute;
                                                top: 22px;
                                                left: 0;
                                                aspect-ratio: 1/1;
                                                width: 8px;
                                                background-color: #8D8D8D;
                                                border-radius: 9999px;
                                            }

                                            >a {
                                                font-size: 14px;
                                                line-height: 20px;
                                            }
                                        }
                                    }
                                }
                            }

                            &:nth-of-type(2) {
                                padding-top: 16px;

                                >a {
                                    display: block;

                                    >img {
                                        width: 98px;
                                    }
                                }
                            }

                            &:nth-of-type(3) {
                                padding-top: 96px;

                                >header {
                                    >h2 {
                                        font-size: 16px;
                                        line-height: 24px;
                                        font-weight: 600;
                                    }
                                }

                                >ul {
                                    padding-top: 24px;
                                    display: flex;
                                    column-gap: 18px;

                                    >li {
                                        width: 36px;

                                        >a {
                                            display: block;

                                            >img {
                                                width: 100%;
                                                height: auto;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    >.miraium-body {
                        @media (width >=1000px) {
                            width: calc(1040px - 300px - 60px);
                        }

                        >nav {
                            >header {
                                >h2 {
                                    font-size: 16px;
                                    line-height: 3;
                                    font-weight: bold;

                                    @media (width >=1000px) {
                                        font-size: 18px;
                                        line-height: 26px;
                                        padding-bottom: 16px;
                                        padding-left: 48px;
                                    }
                                }
                            }

                            >.pagelink {
                                background-color: #EDEDED;
                                border-radius: 15px;
                                padding: 20px 24px;

                                @media (width >=1000px) {
                                    padding: 32px 48px;
                                }

                                >ul {
                                    >li {
                                        padding-block: 12px;
                                        padding-left: 28px;
                                        font-size: 14px;
                                        line-height: 20px;
                                        border-top: solid 1px #fff;
                                        position: relative;

                                        &:first-of-type {
                                            border-top: none;
                                        }

                                        &::before,
                                        &::after {
                                            content: "";
                                            position: absolute;
                                            display: block;
                                            aspect-ratio: 1/1;
                                        }

                                        &::before {
                                            background-color: #5AAAF2;
                                            border-radius: 9999px;
                                            width: 20px;
                                            left: 0;
                                            top: 13.5px;
                                        }

                                        &::after {
                                            width: 6px;
                                            border-right: solid 2px #fff;
                                            border-bottom: solid 2px #fff;
                                            transform: rotate(45deg);
                                            left: 7px;
                                            top: 20px;
                                        }

                                        >a {
                                            display: block;
                                            width: 100%;
                                            font-weight: 600;
                                            ;

                                            @media (width >=1000px) {
                                                font-size: 16px;
                                                line-height: 24px;
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        .entry-content {
                            h2 {
                                padding-top: 80px;
                                font-size: 22px;
                                line-height: 33px;
                                font-weight: bold;

                                @media (width >=1000px) {
                                    padding-top: 100px;
                                    font-size: 28px;
                                    line-height: 42px;
                                }

                                &~p {
                                    padding-top: 32px;
                                    width: 100%;
                                    font-size: 14px;
                                    line-height: 24px;

                                    >img {
                                        max-width: 100%;
                                        height: auto;
                                    }

                                    &:has(img[src=""]) {
                                        display: none !important;

                                        img[src=""] {
                                            display: none !important;
                                        }
                                    }

                                    &:not(:has(img[src=""])) {
                                        font-size: 14px;
                                        line-height: 24px;

                                        @media (width >=1000px) {
                                            font-size: 16px;
                                            line-height: 28px;
                                        }
                                    }
                                }
                            }

                            h3 {
                                padding-top: 32px;
                                font-size: 20px;
                                line-height: 30px;
                                font-weight: bold;

                                @media (width >=1000px) {
                                    padding-top: 30px;
                                    font-size: 24px;
                                    line-height: 32px;
                                }

                                &~p {
                                    padding-top: 16px;
                                    font-size: 14px;
                                    line-height: 24px;

                                    @media (width >=1000px) {
                                        font-size: 16px;
                                        line-height: 28px;
                                    }
                                }
                            }

                            h4 {
                                padding-top: 32px;
                                font-size: 18px;
                                line-height: 28px;
                                font-weight: bold;

                                @media (width >=1000px) {
                                    font-size: 20px;
                                    line-height: 32px;
                                }

                                &~p {
                                    padding-top: 16px;
                                    font-size: 14px;
                                    line-height: 24px;

                                    @media (width >=1000px) {
                                        font-size: 16px;
                                        line-height: 28px;
                                    }
                                }
                            }

                            h5 {
                                padding-top: 32px;
                                font-size: 16px;
                                line-height: 24px;
                                font-weight: bold;

                                @media (width >=1000px) {
                                    font-size: 18px;
                                    line-height: 26px;
                                }

                                &~p {
                                    padding-top: 16px;
                                    font-size: 14px;
                                    line-height: 24px;

                                    @media (width >=1000px) {
                                        font-size: 16px;
                                        line-height: 28px;
                                    }
                                }
                            }
                        }
                    }
                }

                >nav {

                    &.links {
                        width: var(--article-inner-width);
                        margin-inline: auto;
                        display: flex;
                        flex-direction: column;
                        row-gap: 24px;
                        max-width: 1040px;

                        >section {
                            padding: 32px;

                            @media (width >=1000px) {
                                width: 100%;
                                display: flex;
                                margin-inline: auto;
                                padding: 40px 132px;
                            }

                            >header {
                                @media (width >=1000px) {
                                    width: 225px;
                                }

                                >h2 {
                                    font-size: 16px;
                                    line-height: 1.5;
                                    font-weight: bold;
                                    text-align: center;
                                }
                            }

                            >ul {
                                padding-top: 16px;
                                display: flex;
                                flex-wrap: wrap;

                                @media (width >=1000px) {
                                    padding-top: 0;
                                    width: calc(100% - 225px);
                                }
                            }

                            &:first-of-type {
                                background-color: #EEF6FE;

                                >header {
                                    >h2 {
                                        color: #5AAAF2;
                                    }
                                }

                                >ul {
                                    row-gap: 12px;
                                    flex-direction: column;

                                    @media (width >=1000px) {
                                        flex-direction: row;
                                        column-gap: 20px;
                                    }

                                    >li {
                                        text-align: center;

                                        >a {
                                            display: inline-block;
                                            font-size: 16px;
                                            line-height: 28px;
                                            border: solid 1px #5AAAF2;
                                            border-radius: 9999px;
                                            background-color: #fff;
                                            padding-inline: 20px;
                                            color: #5AAAF2;
                                            font-weight: 600;
                                        }
                                    }
                                }
                            }

                            &:nth-of-type(2) {
                                background-color: #EDEDED;

                                >ul {
                                    column-gap: 18px;
                                    justify-content: center;

                                    @media (width >=1000px) {
                                        justify-content: flex-start;
                                    }

                                    >li {
                                        >a {
                                            >img {
                                                width: auto;
                                                height: 36px;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }

                    &.related-posts {
                        padding-top: 100px;

                        >section {
                            >header {
                                >h2 {
                                    font-size: 28px;
                                    line-height: 40px;
                                    font-weight: bold;
                                    text-align: center;
                                    color: #5AAAF2;

                                    @media (width >=1000px) {
                                        font-size: 24px;
                                        line-height: 28px;
                                    }
                                }
                            }

                            >ul {
                                width: var(--article-inner-width);
                                margin-inline: auto;
                                padding-top: 32px;
                                display: flex;
                                flex-direction: column;
                                row-gap: 32px;
                                max-width: 1120px;

                                @media (width >=1000px) {
                                    flex-direction: row;
                                    column-gap: 32px;
                                }

                                >li {
                                    width: 100%;

                                    @media (width >=1000px) {
                                        width: calc((100% - 64px) / 3);
                                    }
                                }
                            }
                        }

                    }
                }

                #author {
                    width: var(--article-inner-width);
                    margin-inline: auto;
                    padding-top: 48px;
                    display: flex;
                    flex-direction: column;
                    row-gap: 12px;
                    align-items: center;
                    font-style: normal;

                    @media (width >=1000px) {
                        width: 760px;
                        display: grid;
                        grid-template-columns: 100px 1fr;
                        grid-template-areas:
                            "thumb name"
                            "thumb desc";
                        column-gap: 24px;
                        row-gap: 12px;
                        align-items: start;
                    }

                    >p {

                        &:nth-of-type(1) {
                            @media (width >=1000px) {
                                grid-area: thumb;
                            }
                        }

                        &:nth-of-type(2) {
                            padding-top: 32px;
                            position: relative;
                            font-size: 14px;
                            line-height: 20px;
                            font-weight: bold;

                            @media (width >=1000px) {
                                grid-area: name;
                                font-size: 16px;
                                line-height: 24px;
                            }

                            &::before {
                                content: "ライター";
                                font-size: 14px;
                                line-height: 20px;
                                font-weight: bold;
                                position: absolute;
                                top: 0;
                                left: 50%;
                                transform: translateX(-50%);
                                color: #8D8D8D;

                                @media (width >=1000px) {
                                    left: 0;
                                    transform: translateX(0);
                                }
                            }
                        }

                        &:nth-of-type(3) {
                            font-size: 14px;
                            line-height: 24px;

                            @media (width >=1000px) {
                                grid-area: desc;
                            }

                            >a {
                                color: #0059AA;
                            }
                        }
                    }
                }

                #attention {
                    margin-top: 100px;
                    background-color: #EEF6FE;
                    padding: 32px 48px;

                    >h2 {
                        font-size: 24px;
                        line-height: 40px;
                        font-weight: bold;
                        color: #5AAAF2;
                        text-align: center;

                        @media (width >=1000px) {
                            font-size: 28px;
                        }
                    }

                    >ul {
                        max-width: 1120px;
                        display: flex;
                        flex-direction: column;
                        flex-wrap: wrap;
                        row-gap: 12px;
                        column-gap: 12px;
                        justify-content: center;
                        padding-top: 24px;

                        @media (width >=1000px) {
                            flex-direction: row;
                            flex-wrap: wrap;
                            margin-inline: auto;
                        }

                        >li {
                            display: flex;
                            justify-content: center;

                            >a {
                                display: inline-block;
                                font-size: 16px;
                                line-height: 28px;
                                border: solid 1px #5AAAF2;
                                border-radius: 9999px;
                                background-color: #fff;
                                padding-inline: 20px;
                                color: #5AAAF2;
                                font-weight: 600;
                            }
                        }
                    }
                }
            }
        }

        &.category-m-comm {
            >main#x-media {
                >article {
                    >.headerwrap {
                        &::before {
                            background-color: #EEFCED;
                            mix-blend-mode: normal;
                            background-image: none;
                            filter: none;
                            z-index: -2;
                        }

                        &::after {
                            content: "";
                            background-image: url(/assets/img/media/m-comm.png);
                            background-size: contain;
                            width: 56%;
                            aspect-ratio: 337.25/316.71;
                            height: auto;
                            position: absolute;
                            bottom: 0;
                            right: -12%;
                            z-index: -1;
                            pointer-events: none;

                            @media (width >=1000px) {
                                width: 336px;
                                bottom: auto;
                                top: 0;
                                right: auto;
                                left: -20px;
                            }
                        }

                        >.headerwrap-right {
                            >header {
                                >nav {
                                    >a {
                                        &::before {
                                            background-color: #009245;
                                        }
                                    }
                                }

                                >h1 {
                                    position: relative;

                                    &::before {
                                        content: "";
                                        aspect-ratio: 1/1;
                                        width: 68px;
                                        height: auto;
                                        background-image: url(/assets/img/media/magpyon.png);
                                        background-size: contain;
                                        background-repeat: no-repeat;
                                        background-position: center;
                                        position: absolute;
                                        top: -48px;
                                        right: 0;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}