/*
Theme Name: Mixedlog Editorial
Theme URI: https://mixedlog.com/
Description: 종이 질감과 편집 매거진 레이아웃을 사용하는 mixedlog 전용 자식 테마
Author: mixedlog
Template: twentytwentyfive
Version: 0.2.5
Text Domain: mixedlog-editorial
*/

:root {
    --mixed-paper: #f5f1e8;
    --mixed-paper-2: #efe9dc;
    --mixed-rule: #ddd4c1;
    --mixed-rule-dark: #c9bfa7;
    --mixed-ink: #1c1a15;
    --mixed-ink-2: #3c3830;
    --mixed-muted: #7a7365;
    --mixed-muted-2: #9c9482;
    --mixed-accent: #a2432a;
    --mixed-accent-dark: #7b3220;
    --mixed-tag: #e8e0cc;
    --mixed-serif: "Noto Serif KR", "Nanum Myeongjo", Georgia, serif;
    --mixed-sans: "Pretendard Variable", Pretendard, system-ui, sans-serif;
    --mixed-mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--mixed-paper);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--mixed-ink);
    background-color: var(--mixed-paper) !important;
    background-image:
        radial-gradient(
            circle at 20% 30%,
            rgba(70, 52, 30, .022) 0 .7px,
            transparent .8px
        ),
        radial-gradient(
            circle at 70% 60%,
            rgba(255, 255, 255, .24) 0 .8px,
            transparent .9px
        ),
        linear-gradient(
            115deg,
            rgba(255, 255, 255, .14),
            transparent 35%,
            rgba(92, 70, 42, .025)
        ) !important;
    background-size: 4px 4px, 7px 7px, 100% 100% !important;
    background-position: 0 0, 1px 2px, center !important;
    font-family: var(--mixed-serif);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before,
body::after {
    display: none !important;
}

::selection {
    color: var(--mixed-paper);
    background: var(--mixed-accent);
}

.wp-site-blocks {
    min-height: 100vh;
    padding: 0 !important;
    background: transparent !important;
}

.wp-site-blocks > * {
    margin-block-start: 0 !important;
}

a {
    color: inherit;
    text-underline-offset: .2em;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
    outline: 2px solid var(--mixed-accent);
    outline-offset: 4px;
}

/* 상단 리본 */

.mixedlog-ribbon {
    width: 100%;
    max-width: none !important;
    padding: 11px 40px !important;
    border-bottom: 1px solid var(--mixed-rule);
    font-family: var(--mixed-mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--mixed-muted);
    background: rgba(245, 241, 232, .68);
}

.mixedlog-ribbon-inner {
    width: min(1360px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
}

.mixedlog-ribbon-inner a {
    margin-left: auto;
    color: var(--mixed-muted);
    text-decoration: none;
}

.mixedlog-ribbon-inner b {
    color: var(--mixed-ink);
    font-weight: 500;
}

.mixedlog-now {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.mixedlog-now i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mixed-accent);
    box-shadow: 0 0 0 3px rgba(162, 67, 42, .14);
}

/* 로고와 메뉴 */

.mixedlog-masthead {
    width: min(1440px, 100%) !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 42px 40px 28px !important;
    border-bottom: 1px solid var(--mixed-rule);
}

.mixedlog-brand {
    gap: 18px !important;
}

.mixedlog-brand .wp-block-site-title {
    margin: 0 !important;
    font-family: var(--mixed-serif);
    font-size: clamp(3rem, 5vw, 4.4rem);
    font-weight: 500;
    line-height: .9;
    letter-spacing: -.045em;
}

.mixedlog-brand .wp-block-site-title a {
    text-decoration: none;
}

.mixedlog-brand .wp-block-site-title::after {
    content: ".";
    color: var(--mixed-accent);
    font-style: italic;
}

.mixedlog-brand .wp-block-site-tagline {
    margin: 0 0 5px !important;
    font-family: var(--mixed-mono);
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--mixed-muted);
}

.mixedlog-brand .wp-block-site-tagline::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 1px;
    margin-right: 10px;
    vertical-align: middle;
    background: var(--mixed-muted-2);
}

.mixedlog-header-tools {
    gap: 12px !important;
}

.mixedlog-header-tools .wp-block-navigation {
    font-family: var(--mixed-sans);
    font-size: 13px;
}

.mixedlog-header-tools .wp-block-navigation-item__content {
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
}

.mixedlog-header-tools .wp-block-navigation-item__content:hover {
    color: var(--mixed-accent);
    background: var(--mixed-paper-2);
}

.mixedlog-header-tools .wp-block-search {
    width: 170px;
}

.mixedlog-header-tools .wp-block-search__inside-wrapper {
    border: 1px solid var(--mixed-rule-dark);
    border-radius: 999px;
    background: transparent;
}

.mixedlog-header-tools .wp-block-search__input {
    min-width: 0;
    border: 0;
    background: transparent;
    font-family: var(--mixed-sans);
    font-size: 12px;
}

.mixedlog-header-tools .wp-block-search__button {
    padding: 7px 10px;
    border: 0;
    color: var(--mixed-muted);
    background: transparent;
}

.mixedlog-subbar {
    width: 100% !important;
    max-width: none !important;
    padding: 17px 40px 20px !important;
    border-bottom: 1px solid var(--mixed-rule);
    color: var(--mixed-muted);
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0 6px,
            rgba(0, 0, 0, .018) 6px 7px
        );
}

.mixedlog-subbar p {
    margin: 0 !important;
    font-size: 14px;
    font-style: italic;
}

.mixedlog-subbar p:last-child {
    font-family: var(--mixed-mono);
    font-size: 10px;
    font-style: normal;
    letter-spacing: .16em;
}

/* 메인 3단 레이아웃 */

.mixedlog-editorial-layout {
    width: min(1360px, calc(100% - 80px)) !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 54px 0 96px !important;
    display: grid !important;
    grid-template-columns:
        minmax(180px, 240px)
        minmax(0, 1fr)
        minmax(200px, 240px);
    grid-template-areas: "rail stream side";
    gap: clamp(34px, 4vw, 56px);
    align-items: start;
}

.mixedlog-stream {
    grid-area: stream;
    min-width: 0;
}

.mixedlog-rail {
    grid-area: rail;
}

.mixedlog-side {
    grid-area: side;
}

.mixedlog-rail,
.mixedlog-side {
    position: sticky;
    top: 24px;
    align-self: start;
    font-family: var(--mixed-sans);
    color: var(--mixed-ink-2);
}

/* 연도 제목 */

.mixedlog-year-mark {
    display: flex;
    align-items: baseline;
    gap: 20px;
    margin: 0 0 32px;
}

.mixedlog-year {
    font-size: clamp(4.2rem, 7vw, 5.4rem);
    font-weight: 300;
    line-height: .9;
    letter-spacing: -.055em;
}

.mixedlog-year em {
    color: var(--mixed-accent);
    font-weight: 400;
}

.mixedlog-year-meta {
    flex: 1;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--mixed-rule);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--mixed-mono);
    font-size: 10px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--mixed-muted);
}

/* 글 목록 */

.mixedlog-editorial-query,
.mixedlog-editorial-query .wp-block-post-template {
    margin: 0 !important;
    padding: 0 !important;
}

.mixedlog-editorial-query .wp-block-post-template {
    display: block !important;
}

.mixedlog-editorial-query .wp-block-post {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
    border: 0 !important;
    border-bottom: 1px solid var(--mixed-rule) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.mixedlog-post-inner {
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 0 28px;
    padding: 28px 0 !important;
}

.mixedlog-post-date {
    grid-column: 1;
    grid-row: 1 / span 4;
    margin: 4px 0 0 !important;
    font-family: var(--mixed-mono);
    font-size: 10px;
    letter-spacing: .1em;
    color: var(--mixed-muted);
}

.mixedlog-post-title,
.mixedlog-post-content,
.mixedlog-post-category,
.mixedlog-post-inner > .mixedlog-expand-area {
    grid-column: 2;
}

.mixedlog-post-title {
    margin: 0 0 11px !important;
    font-family: var(--mixed-serif);
    font-size: clamp(1.3rem, 2.15vw, 1.65rem);
    font-weight: 500;
    line-height: 1.28;
    letter-spacing: -.018em;
}

.mixedlog-post-title a {
    color: var(--mixed-ink) !important;
    text-decoration: none;
}

.mixedlog-post-title a:hover {
    color: var(--mixed-accent) !important;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

.mixedlog-post-content {
    position: relative;
    max-height: 8.2em;
    margin: 0 !important;
    overflow: hidden;
    color: var(--mixed-ink-2);
    font-family: var(--mixed-serif);
    font-size: 15.5px;
    line-height: 1.68;
}

.mixedlog-post-content::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 4.5em;
    pointer-events: none;
    background:
        linear-gradient(
            rgba(245, 241, 232, 0),
            rgba(245, 241, 232, .98)
        );
}

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

.mixedlog-post-content img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--mixed-rule);
}

.mixedlog-post-category {
    margin: 14px 0 0 !important;
    font-family: var(--mixed-mono);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--mixed-muted);
}

.mixedlog-post-category a {
    display: inline-block;
    margin-right: 6px;
    padding: 4px 9px;
    color: var(--mixed-ink-2);
    text-decoration: none;
    background: var(--mixed-tag);
    border-radius: 2px;
}

/* 첫 번째 글: 대표 기사 */

.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child {
    padding-bottom: 44px !important;
    margin-bottom: 18px !important;
}

.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-post-inner {
    display: block !important;
    padding: 0 !important;
}

.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-post-date {
    margin: 0 0 13px !important;
    color: var(--mixed-accent);
}

.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-post-date::before {
    content: "FEATURED  /  ";
}

.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-post-title {
    max-width: 19ch;
    margin-bottom: 18px !important;
    font-size: clamp(2.2rem, 4.2vw, 2.85rem);
    line-height: 1.14;
}

.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-post-content {
    max-height: 12em;
    max-width: 64ch;
    font-size: 17px;
    line-height: 1.72;
}

/* 전문 보기 플러그인과 테마 연결 */

.mixedlog-editorial-layout
.wp-block-post.mixedlog-is-expanded
.mixedlog-post-content {
    max-height: none !important;
    overflow: visible !important;
}

.mixedlog-editorial-layout
.wp-block-post.mixedlog-is-expanded
.mixedlog-post-content::after,
.mixedlog-editorial-layout
.mixedlog-post-content.mixedlog-content-is-short::after {
    display: none !important;
}

.mixedlog-editorial-layout .mixedlog-expand-area {
    grid-column: 2;
    justify-content: flex-start !important;
    margin: .7rem 0 .2rem !important;
}

.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-expand-area {
    justify-content: flex-start !important;
}

.mixedlog-editorial-layout .mixedlog-expand-button {
    color: var(--mixed-accent) !important;
    border-color: rgba(162, 67, 42, .38) !important;
}

.mixedlog-editorial-layout .mixedlog-expand-button:hover {
    color: var(--mixed-accent-dark) !important;
    border-color: var(--mixed-accent) !important;
}

/* 왼쪽 탐색 */

.mixedlog-rail-section {
    margin: 0 0 34px;
}

.mixedlog-rail-section summary,
.mixedlog-side h2 {
    margin: 0 0 14px;
    cursor: pointer;
    font-family: var(--mixed-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--mixed-muted);
}

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

.mixedlog-category-list li {
    border-bottom: 1px dotted var(--mixed-rule-dark);
}

.mixedlog-category-list a {
    padding: 7px 0;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--mixed-ink-2);
    font-size: 13px;
    text-decoration: none;
}

.mixedlog-category-list a:hover {
    color: var(--mixed-accent);
}

.mixedlog-category-list b {
    font-family: var(--mixed-mono);
    font-size: 10px;
    font-weight: 400;
    color: var(--mixed-muted);
}

.mixedlog-year-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mixedlog-year-links a {
    padding: 5px 9px;
    border: 1px solid var(--mixed-rule-dark);
    border-radius: 3px;
    color: var(--mixed-muted);
    font-family: var(--mixed-mono);
    font-size: 10px;
    text-decoration: none;
}

.mixedlog-year-links a:hover {
    color: var(--mixed-paper);
    border-color: var(--mixed-ink);
    background: var(--mixed-ink);
}

.mixedlog-rail-links {
    border-top: 1px solid var(--mixed-ink);
}

.mixedlog-rail-links a {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid var(--mixed-rule);
    font-family: var(--mixed-mono);
    font-size: 10px;
    letter-spacing: .1em;
    text-decoration: none;
    color: var(--mixed-ink-2);
}

/* 오른쪽 정보 */

.mixedlog-side section {
    margin-bottom: 34px;
}

.mixedlog-writer {
    padding-top: 18px;
    border-top: 1px solid var(--mixed-ink);
}

.mixedlog-writer-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.mixedlog-writer-head img {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    filter: grayscale(1);
}

.mixedlog-writer-head strong,
.mixedlog-writer-head span {
    display: block;
}

.mixedlog-writer-head strong {
    font-family: var(--mixed-serif);
    font-size: 18px;
}

.mixedlog-writer-head span {
    margin-top: 3px;
    font-family: var(--mixed-mono);
    font-size: 9px;
    letter-spacing: .1em;
    color: var(--mixed-muted);
}

.mixedlog-writer p {
    font-family: var(--mixed-serif);
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--mixed-ink-2);
}

.mixedlog-recent ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: recent;
}

.mixedlog-recent li {
    counter-increment: recent;
    padding: 11px 0;
    border-bottom: 1px solid var(--mixed-rule);
}

.mixedlog-recent a {
    position: relative;
    display: block;
    padding-left: 26px;
    font-family: var(--mixed-serif);
    font-size: 13px;
    line-height: 1.45;
    text-decoration: none;
}

.mixedlog-recent a::before {
    content: "0" counter(recent);
    position: absolute;
    left: 0;
    font-family: var(--mixed-mono);
    font-size: 9px;
    color: var(--mixed-accent);
}

.mixedlog-recent a:hover {
    color: var(--mixed-accent);
}

.mixedlog-recent span {
    display: block;
    margin-top: 4px;
    font-family: var(--mixed-mono);
    font-size: 9px;
    color: var(--mixed-muted);
}

.mixedlog-colophon {
    padding-top: 14px;
    border-top: 1px solid var(--mixed-rule-dark);
    font-family: var(--mixed-mono);
    font-size: 9px;
    line-height: 1.8;
    color: var(--mixed-muted);
}

.mixedlog-colophon span {
    display: block;
}

.mixedlog-colophon b {
    color: var(--mixed-ink-2);
    font-weight: 500;
}

/* 페이지 이동 */

.mixedlog-pagination {
    margin-top: 46px !important;
    gap: 8px !important;
    font-family: var(--mixed-mono);
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.mixedlog-pagination a,
.mixedlog-pagination .current {
    padding: 9px 12px;
    border: 1px solid var(--mixed-rule-dark);
    text-decoration: none;
}

.mixedlog-pagination .current,
.mixedlog-pagination a:hover {
    color: var(--mixed-paper);
    border-color: var(--mixed-ink);
    background: var(--mixed-ink);
}

/* 푸터 */

.mixedlog-footer {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 54px 40px 64px !important;
    border-top: 1px solid var(--mixed-rule-dark);
    background: rgba(239, 233, 220, .48);
}

.mixedlog-footer > * {
    width: min(1360px, 100%);
    margin-right: auto !important;
    margin-left: auto !important;
}

.mixedlog-footer .wp-block-site-title {
    margin-bottom: 32px !important;
    font-family: var(--mixed-serif);
    font-size: clamp(2.8rem, 6vw, 5rem);
    letter-spacing: -.05em;
}

.mixedlog-footer .wp-block-site-title::after {
    content: ".";
    color: var(--mixed-accent);
}

.mixedlog-footer .wp-block-site-title a {
    text-decoration: none;
}

.mixedlog-footer-row {
    padding-top: 24px;
    border-top: 1px solid var(--mixed-ink);
    align-items: flex-start !important;
}

.mixedlog-footer-row .wp-block-navigation {
    font-family: var(--mixed-sans);
    font-size: 12px;
}

.mixedlog-footer-row .wp-block-shortcode {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-family: var(--mixed-mono);
    font-size: 9px;
    letter-spacing: .1em;
    color: var(--mixed-muted);
}

/* 노트북: 오른쪽 영역을 아래로 이동 */

@media (max-width: 1260px) {
    .mixedlog-editorial-layout {
        grid-template-columns: 190px minmax(0, 1fr);
        grid-template-areas:
            "rail stream"
            "side side";
    }

    .mixedlog-side {
        position: static;
        margin-top: 24px;
        padding-top: 32px;
        border-top: 1px solid var(--mixed-rule-dark);
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }

    .mixedlog-colophon {
        grid-column: 1 / -1;
    }
}

/* 태블릿: 한 칼럼과 상단 필터 */

@media (max-width: 900px) {
    .mixedlog-masthead {
        align-items: flex-start !important;
    }

    .mixedlog-header-tools {
        width: 100%;
        justify-content: space-between !important;
        margin-top: 18px;
    }

    .mixedlog-editorial-layout {
        width: min(760px, calc(100% - 40px)) !important;
        padding-top: 36px !important;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "rail"
            "stream"
            "side";
        gap: 38px;
    }

    .mixedlog-rail {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        padding-bottom: 24px;
        border-bottom: 1px solid var(--mixed-rule-dark);
    }

    .mixedlog-rail-section {
        margin: 0;
    }

    .mixedlog-rail-links {
        grid-column: 1 / -1;
        display: flex;
        gap: 24px;
        border-top: 0;
    }

    .mixedlog-rail-links a {
        border-bottom: 0;
    }
}

/* 모바일 */

@media (max-width: 700px) {
    body {
        background-image:
            radial-gradient(
                rgba(70, 52, 30, .014) 0 .6px,
                transparent .7px
            ),
            linear-gradient(
                rgba(255, 255, 255, .1),
                rgba(92, 70, 42, .015)
            ) !important;
        background-size: 5px 5px, 100% 100% !important;
    }

    .mixedlog-ribbon {
        padding: 10px 18px !important;
    }

    .mixedlog-ribbon-count,
    .mixedlog-ribbon-update {
        display: none;
    }

    .mixedlog-masthead {
        padding: 30px 20px 22px !important;
    }

    .mixedlog-brand .wp-block-site-title {
        font-size: 3rem;
    }

    .mixedlog-brand .wp-block-site-tagline {
        display: none;
    }

    .mixedlog-header-tools .wp-block-search {
        width: 44px;
    }

    .mixedlog-header-tools .wp-block-search__input {
        display: none;
    }

    .mixedlog-subbar {
        padding: 14px 20px 16px !important;
    }

    .mixedlog-subbar p:last-child {
        display: none;
    }

    .mixedlog-editorial-layout {
        width: calc(100% - 36px) !important;
        padding: 30px 0 64px !important;
        gap: 32px;
    }

    .mixedlog-rail {
        display: block;
    }

    .mixedlog-rail-section {
        margin-bottom: 16px;
    }

    .mixedlog-category-list {
        display: flex;
        gap: 7px;
        padding-bottom: 8px;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .mixedlog-category-list li {
        flex: 0 0 auto;
        border: 1px solid var(--mixed-rule-dark);
        border-radius: 999px;
    }

    .mixedlog-category-list a {
        padding: 7px 11px;
        gap: 8px;
    }

    .mixedlog-year-mark {
        gap: 14px;
    }

    .mixedlog-year {
        font-size: 4rem;
    }

    .mixedlog-year-meta {
        display: block;
    }

    .mixedlog-year-meta span {
        display: block;
        margin-top: 4px;
    }

    .mixedlog-post-inner {
        display: block !important;
        padding: 24px 0 !important;
    }

    .mixedlog-post-date {
        margin: 0 0 9px !important;
    }

    .mixedlog-post-title {
        font-size: 1.35rem;
    }

    .mixedlog-post-content {
        font-size: 15px;
    }

    .mixedlog-editorial-query
    .wp-block-post-template
    > .wp-block-post:first-child
    .mixedlog-post-title {
        max-width: none;
        font-size: clamp(1.9rem, 9vw, 2.35rem);
    }

    .mixedlog-editorial-query
    .wp-block-post-template
    > .wp-block-post:first-child
    .mixedlog-post-content {
        font-size: 16px;
    }

    .mixedlog-editorial-layout .mixedlog-expand-area {
        justify-content: flex-start !important;
    }

    .mixedlog-side {
        display: block;
        margin-top: 0;
    }

    .mixedlog-footer {
        padding: 42px 20px 48px !important;
    }

    .mixedlog-footer-row {
        align-items: flex-start !important;
        gap: 28px !important;
    }
}

/* 작은 모바일 */

@media (max-width: 420px) {
    .mixedlog-ribbon-inner {
        gap: 14px;
    }

    .mixedlog-ribbon-inner a {
        font-size: 9px;
    }

    .mixedlog-brand .wp-block-site-title {
        font-size: 2.65rem;
    }

    .mixedlog-editorial-layout {
        width: calc(100% - 28px) !important;
    }

    .mixedlog-year {
        font-size: 3.5rem;
    }

    .mixedlog-post-category {
        line-height: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* === screenshot responsive corrections 0.2.1 === */

.mixedlog-post-title,
.mixedlog-post-title a,
.mixedlog-post-content {
    word-break: keep-all;
    overflow-wrap: break-word;
}

.mixedlog-rail,
.mixedlog-side,
.mixedlog-stream {
    scroll-margin-top: 24px;
}

.mixedlog-category-list {
    scrollbar-width: none;
}

.mixedlog-category-list::-webkit-scrollbar {
    display: none;
}

/* 긴 데스크톱 카테고리도 내부에서 접근 가능 */
@media (min-width: 1261px) {
    .mixedlog-rail {
        max-height: calc(100vh - 48px);
        padding-right: 6px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--mixed-rule-dark) transparent;
    }
}

/* 태블릿부터 카테고리를 가로 필터로 압축 */
@media (max-width: 900px) {
    .mixedlog-masthead {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 18px !important;
        align-items: center !important;
    }

    .mixedlog-brand {
        min-width: 0;
    }

    .mixedlog-header-tools {
        width: auto !important;
        margin-top: 0 !important;
        justify-content: flex-end !important;
        gap: 8px !important;
    }

    .mixedlog-header-tools
    .wp-block-navigation__container {
        display: none !important;
    }

    .mixedlog-header-tools
    .wp-block-navigation__responsive-container-open {
        width: 42px;
        height: 42px;
        padding: 9px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--mixed-rule-dark);
        border-radius: 50%;
    }

    .mixedlog-rail {
        display: block !important;
    }

    .mixedlog-rail-section {
        margin-bottom: 18px !important;
    }

    .mixedlog-category-list {
        display: flex !important;
        gap: 7px;
        padding: 1px 0 8px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: x proximity;
    }

    .mixedlog-category-list li {
        flex: 0 0 auto;
        border: 1px solid var(--mixed-rule-dark) !important;
        border-radius: 999px;
        scroll-snap-align: start;
    }

    .mixedlog-category-list a {
        min-height: 38px;
        padding: 8px 13px !important;
        align-items: center;
        gap: 9px;
    }

    .mixedlog-year-links {
        flex-wrap: nowrap;
        padding-bottom: 5px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .mixedlog-year-links::-webkit-scrollbar {
        display: none;
    }

    .mixedlog-year-links a {
        flex: 0 0 auto;
    }

    .mixedlog-rail-links {
        display: flex !important;
        flex-wrap: wrap;
        gap: 12px 24px !important;
        padding-top: 8px;
    }
}

@media (max-width: 700px) {
    .mixedlog-masthead {
        grid-template-columns: minmax(0, 1fr) auto !important;
    }

    .mixedlog-header-tools {
        width: auto !important;
        margin: 0 !important;
    }

    .mixedlog-header-tools .wp-block-search {
        width: 42px;
    }

    .mixedlog-header-tools
    .wp-block-search__inside-wrapper {
        width: 42px;
        height: 42px;
    }

    .mixedlog-brand .wp-block-site-title {
        white-space: nowrap;
    }
}

/* === archive and category layout correction 0.2.2 === */

.mixedlog-archive-heading {
    margin-bottom: 34px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--mixed-rule-dark);
}

.mixedlog-archive-heading .wp-block-query-title {
    margin: 0;
    color: var(--mixed-ink);
    font-family: var(--mixed-serif);
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -.035em;
    word-break: keep-all;
}

.mixedlog-archive-heading
.wp-block-term-description {
    max-width: 60ch;
    margin-top: 14px;
    color: var(--mixed-muted);
    font-size: 14px;
}

/* 아카이브에서는 첫 글도 일반 목록 형태로 표시 */
.mixedlog-archive-layout
.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.mixedlog-archive-layout
.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-post-inner {
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 0 28px;
    padding: 28px 0 !important;
}

.mixedlog-archive-layout
.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-post-date {
    grid-column: 1;
    grid-row: 1 / span 4;
    margin: 4px 0 0 !important;
    color: var(--mixed-muted);
}

.mixedlog-archive-layout
.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-post-date::before {
    content: none;
}

.mixedlog-archive-layout
.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-post-title {
    max-width: none;
    margin: 0 0 11px !important;
    font-size: clamp(1.3rem, 2.15vw, 1.65rem);
    line-height: 1.28;
}

.mixedlog-archive-layout
.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-post-content {
    max-width: none;
    max-height: 8.2em;
    font-size: 15.5px;
    line-height: 1.68;
}

.mixedlog-archive-layout
.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-post-category,
.mixedlog-archive-layout
.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-expand-area {
    grid-column: 2;
}

@media (max-width: 700px) {
    .mixedlog-archive-heading {
        margin-bottom: 20px;
    }

    .mixedlog-archive-heading .wp-block-query-title {
        font-size: 2.15rem;
    }

    .mixedlog-archive-layout
    .mixedlog-editorial-query
    .wp-block-post-template
    > .wp-block-post:first-child
    .mixedlog-post-inner {
        display: block !important;
        padding: 24px 0 !important;
    }

    .mixedlog-archive-layout
    .mixedlog-editorial-query
    .wp-block-post-template
    > .wp-block-post:first-child
    .mixedlog-post-date {
        margin: 0 0 9px !important;
    }
}

/* === slightly wider desktop canvas 0.2.3 === */

@media (min-width: 1261px) {
    .mixedlog-ribbon-inner,
    .mixedlog-footer > * {
        width: min(1480px, 100%);
    }

    .mixedlog-masthead {
        width: min(1480px, calc(100% - 64px)) !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .mixedlog-subbar {
        padding-right:
            max(32px, calc((100vw - 1480px) / 2)) !important;
        padding-left:
            max(32px, calc((100vw - 1480px) / 2)) !important;
    }

    .mixedlog-editorial-layout {
        width: min(1480px, calc(100% - 64px)) !important;
        grid-template-columns:
            minmax(190px, 240px)
            minmax(0, 1fr)
            minmax(200px, 240px);
        gap: 48px;
    }
}

/* === balanced post preview 0.2.5 === */

/* 일반 글: 약 2줄 더 표시 */
.mixedlog-editorial-layout .mixedlog-post-content {
    max-height: 9.4em;
}

/* 홈의 첫 번째 대표 글: 약 2~3줄 더 표시 */
.mixedlog-editorial-layout:not(.mixedlog-archive-layout)
.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-post-content {
    max-height: 13.2em;
}

/* 카테고리·검색 결과의 첫 글은 일반 목록과 동일 */
.mixedlog-archive-layout
.mixedlog-editorial-query
.wp-block-post-template
> .wp-block-post:first-child
.mixedlog-post-content {
    max-height: 9.4em;
}
