/* =======================================================
   VAULT-BASE — 전 화면 공통 기반 (포쓰 3.4 D1 → 3.5)
   [1부] 부모 main.min.css 에서 이식한 전역 규칙(3.5): 변수·리셋·타이포·링크·간격·레이아웃·WP 코어·블록
        - 실제 렌더에 매칭되는 선택자만 남김(선택자 추출 m35-extract.mjs, 158 URL). 작성자 아카이브(부모 폴백) 전용 규칙은 제외.
        - `#main-container` 규칙은 자체 header.php 에서도 유지. 부모 껍데기용 `#header`·`.ct-footer` 규칙은 3.8 A에서 삭제.
   [2부] 자체 구조 계층(3.4~): vault-wrap, vault-thumb, 히어로 type-1, vault-hide-sm …
   - 이름 규칙: doc/plans/4th_css-naming.md / 설계: doc/plans/4th_base-css-3-5.md §8
======================================================= */

/* ===== [1부] 부모 main.min.css 이식 ===== */
:root{--theme-border: none;--theme-transition: all 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955);--theme-list-indent: 2.5em;--true: initial;--false: "";--has-link-decoration: var(--true);--has-transparent-header: 0;--theme-container-width: min(100%, var(--theme-container-width-base));--theme-container-width-base: calc(var(--theme-container-edge-spacing, 90vw) - var(--theme-frame-size, 0px) * 2);--theme-font-stack-default: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'}
html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);scroll-behavior:smooth}
body{overflow-x:hidden;overflow-wrap:break-word;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
*,*::before,*::after{box-sizing:border-box}
body,p,h1,h2,h3,h4,em,ol,ul,li,tr,th,td,sup,cite,form,small,label,table,figure,button,caption,blockquote{margin:0;padding:0;border:none;font:inherit}
input,select,textarea{margin:0}
b,strong{font-weight:bold}
em{font-style:italic}
small{font-size:80%}
mark{color:inherit;text-decoration:none;background:rgba(0,0,0,0)}
sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
sup{top:-0.5em}
hr{height:1px;border:none}
a{transition:var(--theme-transition)}
a:focus,button:focus{outline:none;transition:none}
a:focus-visible,button:focus-visible{outline:2px solid var(--theme-palette-color-1);outline-offset:var(--outline-offset, 2px)}
img{height:auto;max-width:100%;vertical-align:middle}
figure,textarea{display:block}
canvas{display:inline-block}
iframe{max-width:100%}
code{padding:3px 6px}
pre,code{tab-size:4;border-radius:3px;background:var(--theme-palette-color-6)}
pre:focus,code:focus{outline:none}
pre{overflow:auto;padding:15px 20px}
pre code{padding:0;background:rgba(0,0,0,0)}
table{border-collapse:collapse;border-spacing:0;empty-cells:show;width:100%;max-width:100%}
table,th,td{font-size:var(--theme-table-font-size);border-width:var(--theme-table-border-width, 1px);border-style:var(--theme-table-border-style, solid);border-color:var(--theme-table-border-color, var(--theme-border-color))}
th,td{padding:var(--theme-table-padding, 0.7em 1em)}
th{font-weight:600}
caption{font-weight:600;padding:.7rem}
body{color:var(--theme-text-color)}
body ::selection{color:var(--theme-selection-text-color);background-color:var(--theme-selection-background-color)}
h1{color:var(--theme-heading-color, var(--theme-heading-1-color, var(--theme-headings-color)))}
h2{color:var(--theme-heading-color, var(--theme-heading-2-color, var(--theme-headings-color)))}
h3{color:var(--theme-heading-color, var(--theme-heading-3-color, var(--theme-headings-color)))}
h4{color:var(--theme-heading-color, var(--theme-heading-4-color, var(--theme-headings-color)))}
hr{background-color:var(--theme-form-field-border-initial-color)}
.aligncenter{clear:both;display:block;text-align:center}
.bypostauthor,.screen-reader-text{background:rgba(0,0,0,0)}
body,h1,h2,h3,h4,label,figcaption,.wp-block-quote,.wp-block-pullquote,.entry-meta,.entry-excerpt,.page-description,.comment-reply-title,:where(pre,code,samp,kbd){font-family:var(--theme-font-family);font-size:var(--theme-font-size);font-weight:var(--theme-font-weight);font-style:var(--theme-font-style, inherit);line-height:var(--theme-line-height);letter-spacing:var(--theme-letter-spacing);text-transform:var(--theme-text-transform);-webkit-text-decoration:var(--theme-text-decoration);text-decoration:var(--theme-text-decoration)}
.screen-reader-text{position:absolute !important;word-wrap:normal !important;overflow-wrap:normal !important;width:1px;height:1px;border:0;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);clip:rect(1px, 1px, 1px, 1px)}
.screen-reader-text:focus{z-index:100000;display:block;top:5px;left:5px;width:auto;height:auto;font-size:.875rem;font-weight:700;line-height:normal;text-decoration:none;color:#21759b;padding:15px 23px 14px;clip-path:none;clip:auto !important;border-radius:3px;background-color:#f1f1f1;box-shadow:0 0 2px 2px rgba(0,0,0,.6)}
p{margin-block-end:var(--theme-content-spacing)}
ul,ol{padding-inline-start:var(--theme-list-indent);margin-block-end:var(--theme-content-spacing)}
h1,h2,h3,h4{margin-block-end:calc(var(--has-theme-content-spacing, 1)*(.3em + 10px))}
h1:where(:last-child),h2:where(:last-child),h3:where(:last-child){margin-block-end:0}
:is(.is-layout-flow,.is-layout-constrained)>*:where(:not(h1,h2,h3,h4,h5,h6)){margin-block-start:0;margin-block-end:var(--theme-content-spacing)}
:is(.is-layout-flow,.is-layout-constrained) :where(h1,h2,h3,h4,h5,h6){margin-block-end:calc(var(--has-theme-content-spacing, 1)*(.3em + 10px))}
.entry-meta{list-style-type:none;margin-bottom:0;padding-inline-start:0}
ul:last-child,ol:last-child,ul li:last-child,ol li:last-child,label:last-child,.entry-excerpt *:last-child{margin-bottom:0}
.vault-icon{width:var(--theme-icon-size, 15px);height:var(--theme-icon-size, 15px);fill:var(--theme-icon-color, var(--theme-text-color));transition:var(--theme-icon-transition, fill 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955))}
.vault-icon{position:relative}
a{color:var(--theme-link-initial-color);-webkit-text-decoration:var(--has-link-decoration, var(--theme-text-decoration, none));text-decoration:var(--has-link-decoration, var(--theme-text-decoration, none))}
a:hover{color:var(--theme-link-hover-color)}
body[class] :where(.entry-content :where(p,em,strong)>a,.entry-content>:where(ul,ol) a,.wp-block-table a,.ct-link-styles):not(:hover){--theme-text-decoration: underline}
.entry-meta{color:var(--theme-text-color);--theme-link-initial-color: var(--theme-text-color)}
.entry-meta li{display:inline-block}
.entry-meta li:not(:last-of-type){margin-inline-end:9px}
.entry-meta li:after{margin-inline-start:9px}
.entry-meta li svg,.entry-meta li:after{position:relative;top:-0.1em;vertical-align:var(--vertical-align, middle)}
.entry-meta li svg{fill:currentColor;margin-inline-end:7px}
.entry-meta[data-type*=slash] li:not(:last-of-type):after{content:"/";--vertical-align: baseline}
.entry-meta[data-type*=icons] svg{width:13px;height:13px}
.entry-tags{display:flex;flex-direction:column;align-items:var(--horizontal-alignment);margin-top:40px}
.entry-tags-items{display:flex;flex-wrap:wrap;gap:10px}
.entry-tags-items a{font-size:14px;font-weight:500;padding:.3em .85em;border-radius:var(--theme-border-radius);--theme-button-text-initial-color: var(--theme-text-color);--theme-button-background-initial-color: transparent}
.entry-tags-items a:not(:hover){box-shadow:inset 0px 0px 0px 1px var(--theme-border-color)}
#main-container{display:flex;flex-direction:column;position:relative;min-height:calc(100vh - var(--admin-bar, 0px) - var(--theme-frame-size, 0px)*2);overflow:hidden;overflow:clip}
#main-container .site-main{flex-grow:1}
.is-layout-constrained>:where(:not(.alignleft):not(.alignright):not(.alignfull)){width:var(--theme-block-width)}
.is-width-constrained{margin-inline:auto;width:var(--theme-container-width);max-width:var(--theme-block-max-width)}
[data-content=normal]>article{--theme-block-width: var(--has-wide, var(--theme-container-width));--theme-block-max-width: var(--has-wide, var(--theme-normal-container-max-width));--theme-block-wide-max-width: var(--has-wide, calc(var(--theme-normal-container-max-width) + var(--theme-wide-offset) * 2));--theme-boxed-content-max-width: var(--theme-normal-container-max-width)}
.aligncenter{margin-left:auto;margin-right:auto}
.entry-content:after{display:table;clear:both;content:""}
.wp-block-image:last-child{margin-bottom:0}
.has-drop-cap:not(:focus):first-letter{font-size:5.55em;font-weight:700}
.entry-content figcaption{text-align:center;margin-block:.5em 0}
.wp-block-spacer{margin-block:0}
.wp-block-gallery figcaption{--theme-block-max-width: 100%}
.wp-block-separator{border:none;color:var(--theme-form-field-border-initial-color)}
.wp-block-separator:not(:where(.is-style-wide,.is-style-dots,.alignfull,.alignwide)){max-width:100px}
.wp-block-separator:not(.is-style-dots){height:2px}
blockquote:where(:not(.is-style-plain)):where(:not(.has-text-align-center):not(.has-text-align-right)){border-inline-start:4px solid var(--theme-palette-color-1)}
blockquote:where(:not(.is-style-plain):not(.has-text-align-center):not(.has-text-align-right)){padding-inline-start:1.5em}
blockquote p:last-child{margin-bottom:0}
figure.wp-block-pullquote{position:relative;padding:70px;text-align:initial;border-width:10px;border-style:solid;border-color:var(--theme-palette-color-1)}
@media(max-width: 689.98px){figure.wp-block-pullquote{padding:50px}}
figure.wp-block-pullquote blockquote{border:0;padding:0;position:relative;isolation:isolate}
figure.wp-block-pullquote blockquote:before{position:absolute;z-index:-1;content:"";width:var(--quote-icon-size, 70px);height:var(--quote-icon-size, 70px);top:calc(var(--quote-icon-size, 70px)/-3);inset-inline-start:calc(var(--quote-icon-size, 70px)/-3);opacity:.15;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M0,19.04v-8.62c-0.04-1.24,0.14-2.4,0.54-3.49S1.49,4.88,2.2,4.06C2.92,3.23,3.77,2.55,4.76,2C5.76,1.46,6.84,1.11,8,0.96 v3.72C6.58,5.17,5.6,5.89,5.07,6.85C4.55,7.8,4.29,8.98,4.29,10.37H8v8.67H0zM12,19.04v-8.62c-0.04-1.24,0.14-2.4,0.53-3.49 s0.95-2.05,1.66-2.87c0.71-0.83,1.57-1.51,2.56-2.06c0.99-0.54,2.08-0.89,3.24-1.04v3.72c-1.43,0.49-2.4,1.21-2.93,2.17c-0.53,0.96-0.79,2.13-0.79,3.52H20v8.67H12z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M0,19.04v-8.62c-0.04-1.24,0.14-2.4,0.54-3.49S1.49,4.88,2.2,4.06C2.92,3.23,3.77,2.55,4.76,2C5.76,1.46,6.84,1.11,8,0.96 v3.72C6.58,5.17,5.6,5.89,5.07,6.85C4.55,7.8,4.29,8.98,4.29,10.37H8v8.67H0zM12,19.04v-8.62c-0.04-1.24,0.14-2.4,0.53-3.49 s0.95-2.05,1.66-2.87c0.71-0.83,1.57-1.51,2.56-2.06c0.99-0.54,2.08-0.89,3.24-1.04v3.72c-1.43,0.49-2.4,1.21-2.93,2.17c-0.53,0.96-0.79,2.13-0.79,3.52H20v8.67H12z'/%3E%3C/svg%3E")}
@media(max-width: 689.98px){figure.wp-block-pullquote blockquote:before{--quote-icon-size: 40px}}
figure.wp-block-pullquote blockquote p{margin-bottom:1em}
figure.wp-block-pullquote blockquote p:last-child{margin-bottom:0}

/* ===== [2부] 자체 구조 계층 ===== */

/* ---------- 컨테이너 (vault-wrap) ----------
   data-vertical-spacing 대체: 상하 패딩 60px (≤689px 에서 50px) */
.vault-wrap {
    padding-block: 60px;
}

@media (max-width: 689.98px) {
    .vault-wrap {
        padding-block: 50px;
    }
}

/* 일반 폭(ct-container 대체): 폭·최대 폭 변수는 부모 :root 값을 그대로 쓴다(3.5에서 자체 정의) */
.vault-wrap--normal {
    width: var(--theme-container-width);
    max-width: var(--theme-normal-container-max-width);
    margin-inline: auto;
}


/* 좁은 폭(ct-container-narrow 대체): 댓글 영역 */
.vault-wrap--narrow {
    width: var(--theme-container-width);
    max-width: var(--theme-narrow-container-max-width);
    margin-inline: auto;
}


/* ---------- 썸네일 (vault-thumb) ---------- */
.vault-thumb {
    display: inline-flex;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    isolation: isolate;
    vertical-align: middle;
    position: relative;
    width: 100%;
}

.vault-thumb img {
    width: inherit;
    border-radius: inherit;
    object-fit: var(--theme-object-fit, cover);
}


/* ---------- 히어로 type-1 (부모 page-title.min.css 이식 — 목록·싱글 공통) ---------- */
.hero-section[data-type="type-1"] {
    text-align: var(--alignment);
    margin-bottom: var(--margin-bottom, 40px);
}

.hero-section[data-type="type-1"] .page-description {
    display: inline-block;
    max-width: var(--description-max-width, 100%);
}

.entry-header > *:not(:first-child) {
    margin-top: var(--itemSpacing, 20px);
}

.entry-header .page-title {
    margin-bottom: 0;
}

.entry-header .page-description {
    color: var(--theme-text-color);
}

.entry-header .page-description > *:last-child {
    margin-bottom: 0;
}

/* ---------- 숨김 (vault-hide-sm): ≤689px ---------- */
@media (max-width: 689.98px) {
    .vault-hide-sm {
        display: none !important;
    }
}


/* ---------- 맨위로 버튼 (vault-back-to-top) ----------
   부모 back-to-top.min.css + global.css(오프셋 25px·≤999.98px 21px·≤689.98px 22px, 아이콘 흰색, 그림자) 값 이식.
   상태: data-state="visible" (예전 .ct-show). 설정 5개(모양 circle·오프셋·표시 기기 전체·아이콘 type-1·색)는 상수. */
.vault-back-to-top {
    position: fixed;
    z-index: 110;
    bottom: 25px;
    right: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    opacity: var(--opacity, 0);
    visibility: var(--visibility, hidden);
    transform: var(--transform, translate3d(0, 15px, 0));
    background: var(--top-button-background-color, var(--theme-palette-color-3));
    box-shadow: 0px 5px 20px -9px var(--theme-palette-color-2);
    border-radius: 100%;
    transition: opacity .3s ease, color .3s ease, background .3s ease, transform .3s ease, visibility .3s ease;
    --theme-icon-size: 12px;
    --theme-icon-color: #ffffff;
    --theme-icon-hover-color: #ffffff;
}

.vault-back-to-top:hover {
    background: var(--top-button-background-hover-color, var(--theme-palette-color-4));
}

.vault-back-to-top:hover .vault-icon {
    fill: var(--theme-icon-hover-color, var(--theme-palette-color-2));
}

.vault-back-to-top[data-state="visible"] {
    --opacity: 1;
    --visibility: visible;
    --transform: translate3d(0, 0, 0);
}

@media (max-width: 999.98px) {
    .vault-back-to-top {
        right: 21px;
    }
}

@media (max-width: 689.98px) {
    .vault-back-to-top {
        right: 22px;
    }
}
