:root {
    --bg-page: #ffd7e2;
    --bg-card: #ffffff;
    --bg-chip: #f4f4f4;
    --bg-ad: #d9d9d9;
    --text: #020202;
    --accent: #d52781;
    --muted: #5c5c5c;
    --line: rgba(2, 2, 2, 0.12);
    --radius-chip: 6px;
    --radius-ad: 4px;
    --content-max: 1393px;
    --shell-radius: 40px;
    --shell-shadow: 0 24px 48px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(0, 0, 0, 0.06);
    --sidebar-width: 100%;
    --space: 16px;
    --font-heading: "Boldonse", cursive;
    --font-body: "Roboto", system-ui, -apple-system, sans-serif;
    --heading-color: #616161;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    max-width: 100%;
    overflow-x: hidden;
    font-family: var(--font-body);
    color: var(--text);
    background-color: var(--bg-page);
    line-height: 1.45;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-top {
    position: relative;
    width: 100%;
    max-width: 100%;
    --content-max-w: min(var(--content-max), 100% - 2 * var(--space));
    --header-stage-h: calc(100% * 1179 / 3138);
    --shell-top-offset: min(210px, calc(210 * 100% / 1426));
}

.site-header {
    position: relative;
    width: 100%;
    overflow: hidden;
    z-index: 0;
}

.site-header__stage {
    position: relative;
    width: 100%;
    aspect-ratio: 3138 / 1179;
}

.site-header__layer {
    position: absolute;
    display: block;
    pointer-events: none;
    max-width: none;
}

.site-header__layer--shadow {
    top: 0;
    left: calc(693 / 3138 * 100%);
    z-index: 1;
    width: calc(1951 / 3138 * 100%);
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.site-header__layer--strip {
    top: 0;
    left: 0;
    z-index: 2;
    width: 100%;
    height: calc(393 / 1179 * 100%);
    object-fit: cover;
    object-position: center top;
}

.site-header__layer--dots {
    top: 0;
    left: calc(-211 / 3138 * 100%);
    z-index: 3;
    width: calc(3259 / 3138 * 100%);
    height: calc(1300/ 1179 * 100%);
    object-fit: cover;
    object-position: left top;
}

.site-toon {
    display: none;
}

.site-hero {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    pointer-events: none;
}

.site-hero__logo-wrap {
    position: absolute;
    top: clamp(10px, calc(10 / 3138 * 100vw), 24px);
    left: 50%;
    width: min(420px, 90vw, calc(100vw - 2 * var(--space)));
    min-width: 0;
    box-sizing: border-box;
    transform: translateX(-50%);
    pointer-events: auto;
}

.site-hero__logo-link {
    display: block;
    min-width: 0;
    transform: rotate(-5.8deg);
    transform-origin: center center;
    transition: transform 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
    .site-hero__logo-link {
        transition: none;
    }
}

.site-hero__logo-link img {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    object-fit: contain;
}

@media (max-width: 1023px) {
    .site-top {
        --logo-mobile-gutter: clamp(12px, 3.2vw, 28px);
        --logo-mobile-w: min(420px, calc(100vw - 2 * var(--space)));
    }

    .site-hero__logo-wrap {
        top: calc(env(safe-area-inset-top, 0px) + var(--logo-mobile-gutter));
        left: 50%;
        right: auto;
        width: var(--logo-mobile-w);
        max-width: calc(100% - 2 * var(--space));
        transform: translateX(-50%);
        display: block;
        padding-inline: 0;
        box-sizing: border-box;
    }

    .site-hero__logo-link {
        width: 100%;
        max-width: 100%;
        transform: rotate(-5.8deg);
    }
}

@media (max-width: 769px) {
    .site-hero__logo-link {
        transform: rotate(-5.8deg) scale(0.55);
    }
}

.site-shell {
    position: relative;
    z-index: 1;
    width: calc(100% - 2 * var(--space));
    max-width: var(--content-max);
    margin-left: auto;
    margin-right: auto;
    margin-top: calc(-1 * max(0px, var(--header-stage-h) - var(--shell-top-offset)));
    background-color: #ffffff;
    border-radius: var(--shell-radius) var(--shell-radius) 0 0;
    box-shadow: var(--shell-shadow);
}

@media (max-width: 1023px) {
    .site-shell {
        margin-top: calc(
            -1 * max(0px, var(--header-stage-h) - var(--shell-top-offset)) + var(--logo-mobile-gutter)
        );
    }
}

.site-main {
    padding: var(--space);
}

.site-main__grid {
    max-width: none;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.sidebar {
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.content {
    order: 1;
    min-width: 0;
}

.widget__title {
    margin: 0 0 12px;
    font-family: var(--font-heading);
    color: var(--heading-color);
    font-size: clamp(1.15rem, 3vw, 1.5rem);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.sitelist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sitelist__item + .sitelist__item {
    margin-top: 8px;
}

.sitelist__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #d52781;
    font-weight: 400;
    font-size: clamp(1rem, 4vw, 1.25rem);
    text-decoration: none;
}

.sitelist__link:hover {
    color: #d52781;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sitelist__arrow {
    display: block;
    width: 12px;
    height: 21px;
    flex-shrink: 0;
    background: url("../images/arrow.svg") center / contain no-repeat;
}

.tag-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
}

.tag-pill,
.widget--tags .tag-pill {
    display: block;
    text-align: start;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #d52781;
    font-weight: 400;
    font-size: clamp(1rem, 4vw, 1.25rem);
    text-decoration: none;
}

.tag-pill:hover,
.widget--tags .tag-pill:hover {
    color: #d52781;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ad-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ad-placeholder {
    aspect-ratio: 376 / 282;
    width: 100%;
    border-radius: var(--radius-ad);
    background: linear-gradient(135deg, var(--bg-ad), #c4c4c4);
}

.post-card {
    background: transparent;
}

.post-card__thumb {
    border-radius: var(--radius-ad);
    overflow: hidden;
    background: var(--bg-ad);
}

.post-card__thumb,
.post-card__thumb-fallback {
    aspect-ratio: 895 / 550;
}

.post-card__thumb-fallback {
    width: 100%;
    background: linear-gradient(160deg, #e8e8e8, #bdbdbd);
}

.post-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-card__title {
    margin: 32px 0 20px;
    font-family: var(--font-heading);
    color: var(--heading-color);
    font-size: clamp(1.35rem, 4vw, 2rem);
    line-height: 1.58;
    font-weight: 400;
}

.post-card__title a {
    color: var(--heading-color);
}

.post-card__title a:hover,
.post-card__title a:focus-visible {
    color: var(--heading-color);
    text-decoration: none;
}

.post-card__excerpt {
    margin: 0 0 16px;
    color: #000000;
    font-size: 23px;
    line-height: 1.45;
}

.post-card__excerpt p {
    margin: 0 0 0.75em;
}

.post-card__excerpt p:last-of-type {
    margin-bottom: 0;
}

.post-card__excerpt-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 0.5em;
}

.post-card__read-more {
    display: inline-block;
    margin-top: 0;
    color: #d52781;
    font-size: inherit;
    text-decoration: none;
}

.post-card__read-more:hover,
.post-card__read-more:focus-visible {
    color: #d52781;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-sep {
    border: 0;
    height: 1px;
    background: var(--line);
    margin: 28px 0;
}

.post-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    justify-content: flex-start;
    margin-bottom: 48px;
}

.post-card--single .post-card__thumb {
    margin-bottom: 28px;
}

.post-card__title--single {
    margin-top: 0;
    margin-bottom: 12px;
}

.post-single__lead-media {
    margin-bottom: 24px;
}

.post-single__lead-media .wp-block-video,
.post-single__lead-media .wp-block-embed {
    margin: 0;
}

.post-card__meta--single {
    margin-bottom: 24px;
}

.post-card__meta--single-date {
    margin-top: 18px;
    margin-bottom: 0;
}

.post-card__meta--single-tags {
    margin-top: 24px;
    margin-bottom: 0;
}

.post-single__content {
    color: #000000;
    font-size: 23px !important;
    line-height: 1.45;
}

.post-single__content p,
.post-single__content li,
.post-single__content blockquote,
.post-single__content figcaption,
.post-single__content .wp-block-paragraph,
.post-single__content a,
.post-single__content span {
    font-size: 23px !important;
    line-height: 1.45;
}

.post-single__content > *:first-child {
    margin-top: 0;
}

.post-single__content > *:last-child {
    margin-bottom: 0;
}

.post-single__content p {
    margin: 0 0 0.9em;
}

.post-single__content h2,
.post-single__content h3,
.post-single__content h4 {
    margin: 1.1em 0 0.5em;
    font-family: var(--font-heading);
    color: var(--heading-color);
    line-height: 1.3;
    font-weight: 400;
}

.post-single__content h2 {
    font-size: clamp(1.3rem, 3.8vw, 1.9rem);
}

.post-single__content h3 {
    font-size: clamp(1.2rem, 3.2vw, 1.6rem);
}

.post-single__content ul,
.post-single__content ol {
    margin: 0 0 1em;
    padding-left: 1.2em;
}

.post-single__content li + li {
    margin-top: 0.35em;
}

.post-single__content blockquote {
    margin: 1em 0;
    padding: 0.2em 0 0.2em 1em;
    border-left: 3px solid var(--accent);
    color: #3a3a3a;
}

.post-single__content img {
    border-radius: var(--radius-ad);
}

.post-single__content .wp-block-image,
.post-single__content .wp-block-gallery,
.post-single__content .wp-block-embed {
    margin: 1.2em 0;
}

.post-single__nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.post-single__nav-item a {
    color: #d52781;
    font-size: 23px;
    line-height: 1.3;
    text-decoration: none;
}

.post-single__nav-item a:hover,
.post-single__nav-item a:focus-visible {
    color: #d52781;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-card__date {
    margin: 0;
    color: #b5b5b5;
    font-family: var(--font-body);
    font-size: 23px;
    font-weight: 400;
    line-height: 1.44;
    letter-spacing: 0;
}

.post-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.post-card__tags a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 32px;
    border-radius: 28px;
    background: #f4f4f4;
    color: #d52781;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 23px;
    line-height: 1.2;
    border: none;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.post-card__tags a:hover {
    background: #000000;
    color: #ffffff;
    text-decoration: none;
}

.post-card__tags a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.pagination,
.navigation.pagination {
    margin-top: 28px;
}

@media (max-width: 1023px) {
    .pagination,
    .navigation.pagination {
        margin-bottom: var(--space);
    }
}

.navigation.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination .nav-links,
.pagination ul.page-numbers {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-start;
    align-items: center;
}

.pagination ul.page-numbers li {
    display: flex;
    flex-shrink: 0;
}

.pagination a.page-numbers,
.pagination span.page-numbers.current {
    display: inline-flex;
    box-sizing: border-box;
    width: 57px;
    height: 47px;
    min-width: 57px;
    min-height: 47px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 28px;
    border: none;
    font-family: var(--font-body);
    font-size: 23px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.pagination span.page-numbers.dots {
    width: auto;
    min-width: auto;
    height: auto;
    min-height: auto;
    padding: 0 8px;
    border-radius: 0;
    background: transparent;
    color: var(--text);
}

.pagination a.page-numbers {
    background: #d52781;
    color: #ffffff;
}

.pagination .page-numbers.current {
    background: #000000;
    color: #ffffff;
}

.pagination a.page-numbers:hover {
    background: #000000;
    color: #ffffff;
    text-decoration: none;
}

.pagination a.page-numbers:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.site-footer {
    margin-top: 0;
    padding: 48px calc(var(--space) + 16px) 48px;
    background: #222222;
    color: #f0f0f0;
}

.site-footer__inner {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.site-footer__logo img {
    width: min(70vw, 320px);
    height: auto;
    filter: brightness(1.05);
}

.site-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 120px;
    width: 100%;
    max-width: 520px;
}

.site-footer__links a {
    color: #8e8e8e;
    font-family: var(--font-body);
    font-size: 44px;
    font-weight: 300;
    line-height: 1.44;
    letter-spacing: 0;
    text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
    color: #d52781;
    text-decoration: none;
}

@media (max-width: 1023px) {
    .site-footer__links a {
        font-size: 23px;
    }

    .sitelist__link,
    .tag-pill,
    .widget--tags .tag-pill {
        font-size: 23px;
    }
}

@media (max-width: 374px) {
    :root {
        --shell-radius: 22px;
    }
}

@media (min-width: 375px) {
    :root {
        --space: 20px;
    }

    .tag-grid {
        gap: 12px 16px;
    }
}

@media (min-width: 1024px) {
    :root {
        --sidebar-width: min(389px, 35%);
    }

    .site-shell {
        width: min(1393px, 100% - 2 * var(--space));
        max-width: 1393px;
    }

    .site-main {
        padding: 28px 32px 96px;
    }

    .site-main__grid {
        display: grid;
        grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
        align-items: start;
        gap: 32px;
        column-gap: clamp(24px, 3vw, 48px);
    }

    .sidebar,
    .content {
        order: unset;
    }

    .site-footer__inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        align-items: flex-start;
    }

    .site-footer__links {
        max-width: none;
        flex: 1;
        justify-items: end;
    }

    .site-footer__logo img {
        width: min(105vw, 480px);
    }

    .widget__title,
    .post-card__title {
        font-size: 45px;
    }

    .sitelist__link,
    .tag-pill,
    .widget--tags .tag-pill {
        font-size: 33px;
    }

    .post-single__nav {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .post-single__nav-item--next {
        text-align: right;
    }

    .site-toon {
        display: block;
        position: absolute;
        z-index: 0;
        top: 0;
        left: calc(50% - var(--content-max-w) / 2 - 10px);
        width: min(
            calc(667 / 1393 * var(--content-max-w)),
            calc(50% + var(--content-max-w) / 2 + 10px - var(--space))
        );
        max-width: min(667px, calc(100% - 2 * var(--space)));
        pointer-events: none;
    }

    .site-toon__img {
        display: block;
        width: 100%;
        max-width: none;
        height: auto;
    }

    .site-hero__logo-wrap {
        left: calc(50% - var(--content-max-w) / 2 + 651 / 1393 * var(--content-max-w));
        top: 0;
        width: min(
            calc(703 / 1393 * var(--content-max-w)),
            calc(50% + var(--content-max-w) / 2 - 643 / 1393 * var(--content-max-w) - var(--space))
        );
        max-width: min(703px, calc(100% - 2 * var(--space)));
        padding-top: calc(25 / 1393 * var(--content-max-w));
        transform: none;
        box-sizing: border-box;
    }

    .site-hero__logo-link img {
        width: 100%;
        max-width: none;
        height: auto;
    }
}

.error404-card {
    border: 2px solid rgba(213, 39, 129, 0.2);
    border-radius: 24px;
    padding: clamp(24px, 4vw, 44px);
    background: linear-gradient(180deg, #ffffff 0%, #fff7fb 100%);
}

.error404-code {
    margin: 0;
    font-family: var(--font-heading);
    color: #d52781;
    line-height: 1;
    font-size: clamp(3rem, 12vw, 7rem);
}

.error404-title {
    margin: 12px 0 10px;
    font-family: var(--font-heading);
    color: var(--heading-color);
    line-height: 1.1;
    font-weight: 400;
    font-size: clamp(1.8rem, 5vw, 3rem);
}

.error404-text {
    margin: 0;
    max-width: 700px;
    color: #2d2d2d;
    font-size: 23px;
    line-height: 1.4;
}

.error404-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.error404-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 20px;
    line-height: 1;
    text-decoration: none;
    transition: all 0.15s ease;
}

.error404-btn--primary {
    background: #d52781;
    color: #ffffff;
}

.error404-btn--primary:hover,
.error404-btn--primary:focus-visible {
    background: #000000;
    color: #ffffff;
    text-decoration: none;
}

.error404-btn--ghost {
    border: 2px solid #d52781;
    color: #d52781;
    background: transparent;
}

.error404-btn--ghost:hover,
.error404-btn--ghost:focus-visible {
    background: #d52781;
    color: #ffffff;
    text-decoration: none;
}

.error404-search {
    margin-top: 24px;
}

.error404-search .search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.error404-search .search-field {
    flex: 1 1 260px;
    min-height: 48px;
    border: 2px solid rgba(213, 39, 129, 0.35);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 18px;
}

.error404-search .search-submit {
    min-height: 48px;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    background: #000000;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
}

.error404-search .search-submit:hover,
.error404-search .search-submit:focus-visible {
    background: #d52781;
}

body.error404 .content {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
}

body.error404 .site-main__grid {
    display: block;
}

body.error404 .error404-card {
    border: none;
    border-radius: 0;
    padding: clamp(20px, 3vw, 36px) 0 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

body.error404 .error404-code {
    display: block;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #d52781;
    font-size: clamp(64px, 16vw, 150px);
    letter-spacing: 0.04em;
}

body.error404 .error404-title {
    margin-top: 16px;
    font-size: clamp(1.35rem, 4vw, 2rem);
    line-height: 2.4;
}

body.error404 .error404-text {
    margin-top: 14px;
    font-size: 23px;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
}

body.error404 .error404-actions {
    margin-top: 28px;
    gap: 14px;
    justify-content: center;
}

body.error404 .error404-btn {
    min-height: 54px;
    padding: 12px 28px;
    font-size: 21px;
    font-weight: 500;
}

body.error404 .error404-search {
    margin-top: 40px;
    margin-bottom: 28px;
}

body.error404 .error404-search .search-form {
    justify-content: center;
}

body.error404 .error404-search .search-field {
    min-height: 54px;
    font-size: 20px;
    max-width: 420px;
}

body.error404 .error404-search .search-submit {
    min-height: 54px;
    padding-inline: 24px;
    font-size: 20px;
}

@media (min-width: 1366px) {
    .post-card__meta {
        gap: 16px 32px;
    }
}

@media (min-width: 1024px) {
    body.error404 .error404-title {
        font-size: 45px;
    }
}
