/*
 * SHOWTHINGS rebrand — dark editorial system
 * Figma: showthings > 02 Design System (01–05), 03 Page Mockups
 * Tokens: showthings-tokens.css (--st-*)
 */

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

html {
	background: var(--st-color-canvas);
	color-scheme: dark;
	-webkit-text-size-adjust: 100%;
	scroll-padding-top: calc(var(--st-header-height) + 24px);
}

body {
	margin: 0;
	padding-top: var(--st-header-height);
	background: var(--st-color-canvas);
	color: var(--st-color-text);
	font-family: var(--st-font-family);
	font-size: 16px;
	line-height: 1.6;
	font-weight: 400;
	letter-spacing: -0.01em;
	word-break: keep-all;
	overflow-wrap: anywhere;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6, p, figure, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; }

:focus-visible {
	outline: var(--st-focus-ring);
	outline-offset: var(--st-focus-offset);
	border-radius: 4px;
}

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}

.st-skip-link {
	position: absolute; left: 16px; top: -100px; z-index: 1000;
	padding: 12px 16px; border-radius: var(--st-radius-md);
	background: var(--st-color-brand); color: var(--st-color-on-brand); font-weight: 700;
}
.st-skip-link:focus { top: 12px; }

.st-container,
.st-header__inner,
.st-footer__inner,
.st-footer__bottom {
	width: min(var(--st-container), 100% - 2 * var(--st-page-padding));
	margin-inline: auto;
}

.st-icon {
	width: 24px; height: 24px; flex: none;
	fill: none; stroke: currentColor; stroke-width: 1.8;
	stroke-linecap: round; stroke-linejoin: round;
}

@media (min-width: 768px) { .st-only-mobile { display: none !important; } }
@media (max-width: 767px) { .st-only-desktop { display: none !important; } }

/* ============================================================
 * Controls
 * ============================================================ */
.st-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	height: var(--st-button-md); padding: 0 24px;
	border-radius: var(--st-radius-md); border: 1px solid transparent;
	font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
	white-space: nowrap;
}
.st-btn--primary { background: var(--st-color-brand); color: var(--st-color-on-brand); }
.st-btn--primary:hover { background: #e64000; }
.st-btn--secondary { background: transparent; color: var(--st-color-text); border-color: var(--st-color-border-control); }
.st-btn--secondary:hover { background: var(--st-color-raised); border-color: var(--st-color-text); }
.st-btn[disabled], .st-btn[aria-busy="true"] { opacity: .6; cursor: default; }

.st-icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; padding: 0;
	border-radius: var(--st-radius-md);
	border: 1px solid var(--st-color-border-control);
	background: transparent; color: var(--st-color-text); cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}
.st-icon-btn:hover { background: var(--st-color-raised); border-color: var(--st-color-text); }

.st-input {
	width: 100%; height: 52px; padding: 0 18px;
	border-radius: var(--st-radius-md);
	border: 1px solid var(--st-color-border-control);
	background: var(--st-color-raised); color: var(--st-color-text);
	font: inherit; font-size: 15px;
}
.st-input::placeholder { color: var(--st-color-text-muted); }
.st-input:focus { outline: none; border: 2px solid var(--st-color-text); padding-inline: 17px; }

/* ============================================================
 * Header
 * ============================================================ */
.st-header {
	position: fixed; inset: 0 0 auto 0; z-index: 900;
	height: var(--st-header-height);
	background: var(--st-color-canvas);
	border-bottom: 1px solid var(--st-color-border-decorative);
}
body.admin-bar .st-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .st-header { top: 46px; } }

.st-header__inner {
	height: 100%;
	display: flex; align-items: center; gap: 40px;
}

.st-header__brand {
	display: inline-flex; align-items: center;
	margin-left: -6px; /* 심볼 여백 보정 */
	border-radius: var(--st-radius-md);
}

.st-symbol { display: block; height: 37px; width: auto; overflow: visible; }
.st-symbol path { transform-box: fill-box; transform-origin: center; }

/* Magnet Snap: 2초 대기 → 0.45초 분리 → 0.3초 유지 → 0.5초 결합 (3.6초 반복) */
.st-symbol--motion .st-symbol__top { animation: st-snap-top 3.6s infinite; }
.st-symbol--motion .st-symbol__bottom { animation: st-snap-bottom 3.6s infinite; }

@keyframes st-snap-top {
	0%, 55.6% { transform: none; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
	68.1%, 76.4% { transform: translate(-4.8px, -.2px) rotate(-20deg); animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
	90.3%, 100% { transform: none; }
}
@keyframes st-snap-bottom {
	0%, 55.6% { transform: none; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
	68.1%, 76.4% { transform: translate(5.4px, .8px) rotate(20deg); animation-timing-function: cubic-bezier(.65, 0, .35, 1); }
	90.3%, 100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.st-symbol--motion path { animation: none !important; }
}

.st-nav {
	margin-left: auto;
	display: flex; align-items: center; gap: 40px;
}
.st-nav__item { position: relative; }
.st-nav__trigger,
.st-nav__link {
	display: inline-flex; align-items: center; gap: 8px;
	height: 48px; padding: 0 4px;
	background: none; border: 0; cursor: pointer;
	font-size: 15px; font-weight: 600; color: var(--st-color-text);
}
.st-nav__trigger .st-icon { width: 22px; height: 22px; }
.st-nav__trigger .st-icon--chevron { width: 20px; height: 20px; transition: transform .2s ease; }
.st-nav__trigger[aria-expanded="true"] .st-icon--chevron { transform: rotate(180deg); }
.st-nav__trigger:hover, .st-nav__link:hover { color: #fff; }

.st-nav__menu {
	position: absolute; top: calc(100% + 12px); right: -24px;
	min-width: 236px; padding: 8px;
	display: grid; gap: 2px;
	background: var(--st-color-surface);
	border: 1px solid var(--st-color-border-decorative);
	border-radius: var(--st-radius-md);
	box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}
.st-nav__menu[hidden] { display: none; }
.st-nav__menu-link {
	display: block; padding: 11px 12px; border-radius: 8px;
	font-size: 14px; font-weight: 500; color: var(--st-color-text-secondary);
}
.st-nav__menu-link:hover, .st-nav__menu-link.is-all { background: var(--st-color-raised); color: var(--st-color-text); }

.st-header__actions { display: flex; align-items: center; gap: 8px; }

/* Reading progress (글 상세) */
.st-progress {
	position: absolute; left: 0; right: 0; top: 100%;
	height: var(--st-progress-height);
	background: var(--st-color-raised);
}
.st-progress__bar {
	display: block; height: 100%; width: 100%;
	background: var(--st-color-brand);
	transform-origin: 0 50%; transform: scaleX(var(--st-progress, 0));
}
body.single-post { padding-top: calc(var(--st-header-height) + var(--st-progress-height)); }

@media (max-width: 767px) {
	.st-header__inner { gap: 16px; }
	.st-nav { display: none; }
	.st-header__actions { margin-left: auto; }
	.st-symbol { height: 32px; }
}

/* ============================================================
 * Drawer & search dialog
 * ============================================================ */
dialog.st-drawer,
dialog.st-search {
	border: 0; padding: 0; color: var(--st-color-text);
	background: var(--st-color-canvas);
}
dialog.st-drawer::backdrop,
dialog.st-search::backdrop { background: rgba(0, 0, 0, .64); }

dialog.st-drawer {
	margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh;
	width: min(var(--st-drawer-width), 100vw);
	border-left: 1px solid var(--st-color-border-decorative);
	padding: 24px;
}
.st-drawer__head, .st-search__head {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.st-drawer__title { font-size: 22px; font-weight: 700; }
.st-drawer__head { padding-bottom: 24px; border-bottom: 1px solid var(--st-color-border-decorative); }
.st-drawer__nav { display: grid; padding: 16px 0 24px; }
.st-drawer__nav a, .st-drawer__nav button {
	display: flex; align-items: center; min-height: 52px;
	background: none; border: 0; padding: 0; text-align: left; cursor: pointer;
	font-size: 16px; font-weight: 600;
}
.st-drawer__label { font-size: 12px; font-weight: 700; color: var(--st-color-text-muted); margin-bottom: 12px; }

dialog.st-search {
	width: min(560px, 100vw - 40px); margin-top: 120px;
	border: 1px solid var(--st-color-border-decorative);
	border-radius: var(--st-radius-lg);
}
.st-search__head { padding: 24px 24px 20px; border-bottom: 1px solid var(--st-color-border-decorative); }
.st-search__title { font-size: 24px; font-weight: 700; }
.st-search__form { display: flex; gap: 8px; padding: 24px 24px 0; }
.st-search__form .st-btn { height: 52px; min-width: 84px; }
.st-search__hint { padding: 16px 24px 24px; font-size: 13px; color: var(--st-color-text-muted); }

@media (max-width: 767px) {
	dialog.st-search { margin-top: 80px; }
	.st-search__title { font-size: 20px; }
}

/* ============================================================
 * Chips
 * ============================================================ */
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chips--scroll {
	flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
	scroll-snap-type: x proximity;
}
.st-chips--scroll::-webkit-scrollbar { display: none; }
.st-chip {
	display: inline-flex; align-items: center; gap: 6px; flex: none;
	height: 44px; padding: 0 20px;
	border-radius: 8px;
	background: var(--st-color-raised);
	border: 1px solid var(--st-color-border-decorative);
	font-size: 15px; font-weight: 600; color: var(--st-color-text);
	white-space: nowrap; scroll-snap-align: start;
	transition: border-color .15s ease, background-color .15s ease;
}
.st-chip:hover { border-color: var(--st-color-border-control); }
.st-chip__count { font-size: 13px; font-weight: 500; color: var(--st-color-text-muted); }
.st-chip.is-active { background: var(--st-color-brand); border-color: var(--st-color-brand); color: var(--st-color-on-brand); font-weight: 700; }
.st-chip.is-active .st-chip__count { color: var(--st-color-on-brand); font-weight: 600; }

/* ============================================================
 * Cards
 * ============================================================ */
.st-card {
	position: relative; height: 100%;
	background: var(--st-color-surface);
	border: 1px solid var(--st-color-border-decorative);
	border-radius: var(--st-radius-md);
	overflow: hidden;
	transition: border-color .2s ease;
}
.st-card:hover { border-color: var(--st-color-border-control); }
.st-card__link { display: flex; flex-direction: column; height: 100%; }
.st-card__media {
	position: relative; aspect-ratio: 16 / 9; overflow: hidden;
	background: var(--st-color-raised);
	display: flex; align-items: center; justify-content: center;
}
.st-card__media img {
	position: absolute; inset: 0; width: 100%; height: 100%;
	object-fit: cover; display: block;
	transition: transform .35s ease;
}
.st-card:hover .st-card__media img { transform: scale(1.03); }
.st-card__placeholder { height: 40px; opacity: .9; }
.st-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 20px 24px; }
.st-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 18px; }
.st-card__cat { font-size: 11px; line-height: 14px; font-weight: 700; color: var(--st-color-text-secondary); letter-spacing: .01em; }
.st-card__date { margin-left: auto; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--st-color-text-muted); }
.st-card__title {
	font-size: 20px; line-height: 28px; font-weight: 700; color: var(--st-color-text);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.st-card__excerpt {
	font-size: 17px; line-height: 28px; color: var(--st-color-text-secondary);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.st-card--featured .st-card__media { aspect-ratio: auto; flex: 1 1 auto; min-height: 320px; }
.st-card--featured .st-card__body { flex: none; padding: 24px 24px 28px; gap: 12px; }
.st-card--featured .st-card__title { font-size: 32px; line-height: 42px; }

.st-card--related .st-card__title { font-size: 18px; line-height: 26px; font-weight: 600; }

@media (max-width: 767px) {
	.st-card--featured .st-card__media { aspect-ratio: 16 / 9; min-height: 0; flex: none; }
	.st-card--featured .st-card__body { padding: 16px 16px 20px; gap: 8px; }
	.st-card--featured .st-card__title { font-size: 22px; line-height: 30px; -webkit-line-clamp: 3; }
	.st-card--featured .st-card__excerpt { font-size: 15px; line-height: 22px; }

	/* 모바일 썸네일 목록 */
	.st-card--list-mobile { background: none; border: 0; border-radius: 0; overflow: visible; }
	.st-card--list-mobile .st-card__link { flex-direction: row; gap: 16px; align-items: flex-start; }
	.st-card--list-mobile .st-card__media { width: 96px; height: 96px; aspect-ratio: 1; flex: none; border-radius: 8px; }
	.st-card--list-mobile .st-card__body { padding: 2px 0 0; gap: 6px; min-width: 0; }
	.st-card--list-mobile .st-card__meta { display: contents; }
	.st-card--list-mobile .st-card__cat { order: 1; }
	.st-card--list-mobile .st-card__title { order: 2; font-size: 16px; line-height: 22px; font-weight: 600; -webkit-line-clamp: 3; }
	.st-card--list-mobile .st-card__date { order: 3; margin-left: 0; }
	.st-card--list-mobile:hover .st-card__media img { transform: none; }
}

/* ============================================================
 * Sections & grids (home / archive)
 * ============================================================ */
.st-main { padding-bottom: 96px; }

.st-section { margin-top: 96px; }
.st-section:first-child { margin-top: 48px; }
.st-section__head {
	display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
	margin-bottom: 24px;
}
.st-section__titles { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.st-section__title { font-size: 32px; line-height: 42px; font-weight: 700; }
.st-section__title--sm { font-size: 24px; line-height: 32px; }
.st-section__sub { font-size: 17px; color: var(--st-color-text-muted); }
.st-section__link { flex: none; font-size: 14px; font-weight: 600; color: var(--st-color-text-secondary); padding: 8px 0; }
.st-section__link:hover { color: var(--st-color-text); }

.st-hero {
	display: grid; grid-template-columns: minmax(0, 2.06fr) minmax(0, 1fr);
	gap: 24px; margin-top: 48px;
}
.st-hero__side { display: grid; gap: 24px; }

.st-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.st-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.st-more { display: flex; justify-content: center; margin-top: 40px; }
.st-more .st-btn { min-width: 200px; }
.st-more__status { text-align: center; color: var(--st-color-text-muted); font-size: 14px; margin-top: 16px; min-height: 1em; }

/* Rank (많이 본 글) */
.st-rank { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; }
.st-rank__item { border-top: 1px solid var(--st-color-border-decorative); }
.st-rank__link { display: flex; gap: 24px; padding: 20px 0 28px; }
.st-rank__num { flex: none; min-width: 44px; white-space: nowrap; font-size: 32px; line-height: 36px; font-weight: 800; color: var(--st-color-brand); font-variant-numeric: tabular-nums; }
.st-rank__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-rank__cat { font-size: 11px; line-height: 14px; font-weight: 700; color: var(--st-color-text-muted); }
.st-rank__title {
	font-size: 18px; line-height: 26px; font-weight: 600; color: var(--st-color-text);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.st-rank__link:hover .st-rank__title { text-decoration: underline; text-decoration-color: var(--st-color-border-control); text-underline-offset: 4px; }

.st-rank--rail { grid-template-columns: 1fr; }
.st-rank--rail .st-rank__link { gap: 16px; padding: 16px 0; }
.st-rank--rail .st-rank__num { min-width: 30px; font-size: 22px; line-height: 26px; }
.st-rank--rail .st-rank__title { font-size: 15px; line-height: 22px; }

@media (max-width: 1023px) {
	.st-hero { grid-template-columns: 1fr; }
	.st-hero__side { grid-template-columns: 1fr 1fr; }
	.st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.st-rank { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.st-main { padding-bottom: 56px; }
	.st-section { margin-top: 56px; }
	.st-section:first-child { margin-top: 24px; }
	.st-section__head { margin-bottom: 16px; align-items: center; }
	.st-section__title { font-size: 26px; line-height: 34px; }
	.st-section__title--sm { font-size: 22px; line-height: 30px; }
	.st-section__sub { font-size: 14px; }
	.st-section__link { font-size: 13px; }

	.st-hero { margin-top: 24px; gap: 24px; }
	.st-hero__side { grid-template-columns: 1fr; gap: 20px; }

	.st-grid, .st-grid--3 { grid-template-columns: 1fr; gap: 20px; }
	.st-grid--carousel {
		display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
		margin-inline: calc(-1 * var(--st-page-padding)); padding-inline: var(--st-page-padding);
		scrollbar-width: none;
	}
	.st-grid--carousel::-webkit-scrollbar { display: none; }
	.st-grid--carousel > .st-card { flex: 0 0 248px; scroll-snap-align: start; }
	.st-grid--carousel .st-card__body { padding: 16px 16px 20px; gap: 8px; }
	.st-grid--carousel .st-card__title { font-size: 16px; line-height: 22px; }
	.st-grid--carousel .st-card__date { display: none; }

	.st-rank { grid-template-columns: 1fr; }
	.st-rank__link { gap: 20px; padding: 16px 0; }
	.st-rank__num { min-width: 30px; font-size: 22px; line-height: 26px; }
	.st-rank__cat { display: none; }
	.st-rank__title { font-size: 16px; line-height: 22px; }

	.st-more .st-btn { width: 100%; }

	.st-home-chips { margin-inline: calc(-1 * var(--st-page-padding)); padding: 16px var(--st-page-padding) 0; }
}

/* ============================================================
 * Archive (프로그램 / 태그 / 검색)
 * ============================================================ */
.st-archive-head { padding-top: 48px; }
.st-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--st-color-text-muted); }
.st-breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.st-breadcrumb li + li::before { content: "/"; color: var(--st-color-border-control); }
.st-breadcrumb a:hover { color: var(--st-color-text); }

.st-archive-head__title { margin-top: 24px; font-size: 48px; line-height: 60px; font-weight: 800; letter-spacing: -0.02em; }
.st-archive-head__meta { margin-top: 12px; font-size: 13px; color: var(--st-color-text-muted); }
.st-archive-head__meta span + span::before { content: "·"; margin: 0 8px; }
.st-archive-head__desc { margin-top: 20px; max-width: 808px; font-size: 20px; line-height: 32px; color: var(--st-color-text-secondary); }
.st-archive-head__desc p { margin: 0; }
.st-archive-head .st-chips { margin-top: 40px; }

.st-tabs {
	display: flex; align-items: flex-end; gap: 32px;
	margin-top: 48px; border-bottom: 1px solid var(--st-color-border-decorative);
}
.st-tabs__link {
	position: relative; padding: 0 0 12px;
	font-size: 15px; font-weight: 600; color: var(--st-color-text-secondary);
}
.st-tabs__link[aria-current="page"] { color: var(--st-color-brand); font-weight: 700; }
.st-tabs__link[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--st-color-brand); }
.st-tabs__count { margin-left: auto; padding-bottom: 12px; font-size: 13px; color: var(--st-color-text-muted); }
.st-archive-grid { margin-top: 32px; }

.st-pagination ul { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 56px; }
.st-pagination a, .st-pagination span.page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; height: 44px; padding: 0 12px;
	border-radius: 8px; border: 1px solid var(--st-color-border-decorative);
	font-size: 14px; font-weight: 700;
}
.st-pagination a:hover { border-color: var(--st-color-border-control); }
.st-pagination .current { background: var(--st-color-brand); border-color: var(--st-color-brand) !important; color: var(--st-color-on-brand); }
.st-pagination .dots { border: 0 !important; }

.st-search-head__form { display: flex; gap: 8px; max-width: 560px; margin-top: 32px; }
.st-search-head__form .st-btn { height: 52px; }

.st-empty {
	margin-top: 48px; padding: 56px 24px;
	border: 1px dashed var(--st-color-border-decorative); border-radius: var(--st-radius-md);
	text-align: center;
}
.st-empty .st-symbol { height: 44px; margin: 0 auto 20px; }
.st-empty__title { font-size: 24px; line-height: 32px; font-weight: 700; }
.st-empty__desc { margin-top: 8px; color: var(--st-color-text-secondary); }
.st-empty .st-chips { justify-content: center; margin-top: 28px; }
.st-empty__actions { display: flex; justify-content: center; gap: 8px; margin-top: 28px; flex-wrap: wrap; }

@media (max-width: 767px) {
	.st-archive-head { padding-top: 24px; }
	.st-archive-head__title { margin-top: 16px; font-size: 32px; line-height: 42px; }
	.st-archive-head__desc { font-size: 16px; line-height: 26px; margin-top: 12px; }
	.st-archive-head .st-chips { margin-top: 24px; margin-inline: calc(-1 * var(--st-page-padding)); padding-inline: var(--st-page-padding); }
	.st-tabs { margin-top: 32px; gap: 24px; }
	.st-archive-grid { margin-top: 24px; }
}

/* ============================================================
 * Article (single)
 * ============================================================ */
.st-article-layout {
	width: min(1200px, 100% - 2 * var(--st-page-padding));
	margin: 48px auto 0;
	display: grid; grid-template-columns: minmax(0, 808px) 352px;
	justify-content: space-between; gap: 40px;
	align-items: start;
}
.st-article { min-width: 0; }
.st-article__cat {
	display: inline-block; margin-top: 28px;
	font-size: 11px; line-height: 14px; font-weight: 700; color: var(--st-color-brand); letter-spacing: .01em;
}
.st-article__title { margin-top: 12px; font-size: 48px; line-height: 60px; font-weight: 800; letter-spacing: -0.02em; }
.st-article__meta { margin-top: 16px; display: flex; flex-wrap: wrap; font-size: 13px; color: var(--st-color-text-muted); }
.st-article__meta > * + *::before { content: "·"; margin: 0 8px; }
.st-article__hero { margin-top: 32px; }
.st-article__hero-media { aspect-ratio: 16 / 9; border-radius: var(--st-radius-md); overflow: hidden; background: #f5f5f5; }
.st-article__hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-article__hero-media.is-contain img { object-fit: contain; }
.st-article__hero figcaption { margin-top: 12px; font-size: 13px; color: var(--st-color-text-muted); }

.st-rail { position: sticky; top: calc(var(--st-header-height) + 24px); display: grid; gap: 40px; }
body.admin-bar .st-rail { top: calc(var(--st-header-height) + 56px); }

.st-toc {
	padding: 24px 24px 18px;
	background: var(--st-color-surface);
	border: 1px solid var(--st-color-border-decorative);
	border-radius: var(--st-radius-md);
}
.st-toc[hidden] { display: none; }
.st-toc__title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.st-toc__list { list-style: none; display: grid; gap: 2px; }
.st-toc__link {
	position: relative; display: flex; gap: 12px; padding: 8px 0;
	font-size: 14px; line-height: 20px; font-weight: 500; color: var(--st-color-text-secondary);
}
.st-toc__num { flex: none; width: 20px; font-size: 13px; font-weight: 700; color: var(--st-color-border-control); font-variant-numeric: tabular-nums; }
.st-toc__link:hover { color: var(--st-color-text); }
.st-toc__link.is-active { color: var(--st-color-text); }
.st-toc__link.is-active .st-toc__num { color: var(--st-color-brand); }
.st-toc__link.is-active::before { content: ""; position: absolute; left: -24px; top: 6px; bottom: 6px; width: 3px; background: var(--st-color-brand); }
.st-rail__title { font-size: 20px; line-height: 28px; font-weight: 700; margin-bottom: 8px; }

/* Article footer blocks */
.st-article-foot {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
	margin-top: 56px;
}
.st-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.st-tag {
	display: inline-flex; align-items: center; height: 44px; padding: 0 16px;
	border-radius: 8px; background: var(--st-color-raised); border: 1px solid var(--st-color-border-decorative);
	font-size: 14px; font-weight: 600;
}
.st-tag:hover { border-color: var(--st-color-border-control); }
.st-copy-btn { gap: 12px; padding: 0 20px; min-width: 192px; justify-content: flex-start; font-weight: 600; font-size: 14px; background: var(--st-color-raised); border-color: var(--st-color-border-decorative); }

.st-author {
	display: flex; gap: 16px; align-items: flex-start;
	margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--st-color-border-decorative);
}
.st-author .st-symbol { height: 34px; flex: none; margin-left: -6px; }
.st-author__name { font-size: 15px; font-weight: 700; }
.st-author__desc { margin-top: 4px; font-size: 13px; color: var(--st-color-text-muted); }

.st-related { margin-top: 72px; }
.st-related .st-section__head { margin-bottom: 24px; }

@media (max-width: 1199px) {
	.st-article-layout { grid-template-columns: minmax(0, 808px); justify-content: center; }
	.st-rail { display: none; }
}
@media (max-width: 767px) {
	.st-article-layout { margin-top: 24px; }
	.st-article__cat { margin-top: 20px; }
	.st-article__title { margin-top: 10px; font-size: 32px; line-height: 42px; }
	.st-article__meta { margin-top: 12px; }
	.st-article__hero { margin-top: 24px; }
	.st-article-foot { margin-top: 40px; }
	.st-copy-btn { width: 100%; }
	.st-related { margin-top: 56px; }
}

/* ============================================================
 * Article content (block HTML)
 * ============================================================ */
.st-content { margin-top: 40px; font-size: 18px; line-height: 30px; color: var(--st-color-text); }
.st-content > * + * { margin-top: 20px; }
.st-content > p:not(h2 ~ p):not(h3 ~ p) { font-size: 20px; line-height: 32px; color: var(--st-color-text-secondary); }
.st-content h2 { margin-top: 56px; font-size: 32px; line-height: 42px; font-weight: 700; letter-spacing: -0.02em; }
.st-content h3 { margin-top: 40px; font-size: 24px; line-height: 32px; font-weight: 700; }
.st-content h4 { margin-top: 32px; font-size: 20px; line-height: 28px; font-weight: 700; }
.st-content h2 + *, .st-content h3 + *, .st-content h4 + * { margin-top: 16px; }
.st-content strong, .st-content b { font-weight: 700; color: var(--st-color-text); }
.st-content a:not(.wp-block-button__link) {
	color: var(--st-color-text); text-decoration: underline;
	text-decoration-color: var(--st-color-brand); text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.st-content .half_highlight { background: linear-gradient(transparent 60%, rgba(255, 75, 15, .38) 60%); color: var(--st-color-text); }

.st-content ul, .st-content ol { list-style: none; display: grid; gap: 8px; }
.st-content ul > li { position: relative; padding-left: 24px; }
.st-content ul > li::before { content: ""; position: absolute; left: 6px; top: 12px; width: 6px; height: 6px; border-radius: 1px; background: var(--st-color-brand); }
.st-content ol { counter-reset: st-ol; }
.st-content ol > li { position: relative; padding-left: 36px; counter-increment: st-ol; }
.st-content ol > li::before {
	content: counter(st-ol, decimal-leading-zero); position: absolute; left: 0; top: 1px;
	font-size: 14px; font-weight: 800; color: var(--st-color-brand); font-variant-numeric: tabular-nums;
}

.st-content figure { margin-top: 32px; margin-bottom: 0; }
.st-content figure img, .st-content > p > img { display: block; width: 100%; height: auto; border-radius: var(--st-radius-md); background: #f5f5f5; }
.st-content .wp-block-image.aligncenter img, .st-content figure.aligncenter img { margin-inline: auto; width: auto; max-width: 100%; }
.st-content figcaption { margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--st-color-text-muted); text-align: left; }

.st-content blockquote {
	margin-left: 0; margin-right: 0; padding: 24px 28px;
	background: var(--st-color-surface); border-left: 3px solid var(--st-color-brand); border-radius: 0 var(--st-radius-md) var(--st-radius-md) 0;
	font-size: 20px; line-height: 32px;
}
.st-content blockquote p { margin: 0; }
.st-content hr { border: 0; border-top: 1px solid var(--st-color-border-decorative); margin: 48px 0; }

.st-content table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 24px; }
.st-content th, .st-content td { padding: 14px 16px; border-bottom: 1px solid var(--st-color-border-decorative); text-align: left; vertical-align: top; }
.st-content th { color: var(--st-color-text-muted); font-weight: 600; font-size: 13px; }
.st-content tbody tr:nth-child(even) { background: var(--st-color-surface); }
.st-content .wp-block-table { overflow-x: auto; }

.st-content iframe, .st-content .wp-block-embed { max-width: 100%; border-radius: var(--st-radius-md); }
.st-content .wp-block-embed__wrapper iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }

/* 구매 버튼 (판매처 링크, 새 탭) */
.st-content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.st-content .wp-block-button__link {
	display: inline-flex; align-items: center; gap: 10px;
	min-height: 48px; padding: 12px 24px;
	border-radius: var(--st-radius-md);
	background: var(--st-color-brand); color: var(--st-color-on-brand);
	font-size: 15px; line-height: 22px; font-weight: 700; text-decoration: none;
	transition: background-color .15s ease;
}
.st-content .wp-block-button__link::before {
	content: ""; flex: none; width: 20px; height: 20px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6'/%3E%3Cpath d='M20 4l-9 9'/%3E%3Cpath d='M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6'/%3E%3Cpath d='M20 4l-9 9'/%3E%3Cpath d='M18 14v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4'/%3E%3C/svg%3E") center / contain no-repeat;
}
.st-content .wp-block-button__link:hover { background: #e64000; }

/* 상품 카드 (이미지 + 구매 버튼 + 스펙) */
.st-content .st-product {
	display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 48px; align-items: start;
	margin-top: 24px;
}
.st-product__media { padding: 24px; border-radius: var(--st-radius-md); background: #f5f5f5; }
.st-content .st-product__media figure { margin: 0; }
.st-content .st-product__media img { aspect-ratio: 1; object-fit: contain; width: 100%; border-radius: 4px; background: #f5f5f5; }
.st-product__info { display: flex; flex-direction: column; padding-top: 12px; }
.st-product__label { font-size: 11px; line-height: 14px; font-weight: 700; color: var(--st-color-text-secondary); letter-spacing: .01em; }
.st-content .st-product__name { margin-top: 12px; font-size: 28px; line-height: 36px; font-weight: 800; color: var(--st-color-text); }
.st-content .st-product__price { margin-top: 8px; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--st-color-text); }
.st-product__specs { margin-top: 20px; padding: 16px 0; border-top: 1px solid var(--st-color-border-decorative); border-bottom: 1px solid var(--st-color-border-decorative); display: grid; gap: 8px; }
.st-product__row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; font-size: 14px; line-height: 22px; }
.st-product__row dt { color: var(--st-color-text-muted); }
.st-product__row dd { color: var(--st-color-text); font-weight: 500; }
.st-content .st-product .wp-block-buttons { margin-top: 20px; }

/* 본문 목차 (모바일·태블릿) */
.st-content #ez-toc-container {
	width: 100% !important; margin-top: 32px; padding: 18px 20px !important;
	background: var(--st-color-surface) !important; border: 1px solid var(--st-color-border-decorative) !important;
	border-radius: var(--st-radius-md); box-shadow: none !important;
}
.st-content #ez-toc-container .ez-toc-title-container { display: flex; align-items: center; justify-content: space-between; }
.st-content #ez-toc-container .ez-toc-title { font-size: 15px !important; font-weight: 700 !important; color: var(--st-color-text) !important; margin: 0; }
.st-content #ez-toc-container .ez-toc-btn { background: none !important; border: 0 !important; box-shadow: none !important; }
.st-content #ez-toc-container svg { fill: var(--st-color-brand) !important; color: var(--st-color-brand) !important; }
.st-content #ez-toc-container nav { margin-top: 12px; }
.st-content #ez-toc-container ul { gap: 0; }
.st-content #ez-toc-container ul li { padding-left: 0; }
.st-content #ez-toc-container ul li::before { display: none; }
.st-content #ez-toc-container a { display: block; padding: 8px 0; text-decoration: none; color: var(--st-color-text-secondary) !important; font-size: 15px; line-height: 22px; }
.st-content #ez-toc-container a:hover { color: var(--st-color-text) !important; }
@media (min-width: 1200px) {
	.st-content #ez-toc-container { display: none !important; } /* 데스크톱은 사이드바 목차 사용 */
}

/* FAQ (Rank Math) */
.st-content .st-faq-title { margin-top: 56px; }
.st-content #rank-math-faq { margin-top: 16px; }
.st-content .rank-math-list-item { border-top: 1px solid var(--st-color-border-decorative); margin: 0 !important; }
.st-content .rank-math-list-item:last-child { border-bottom: 1px solid var(--st-color-border-decorative); }
.st-content .rank-math-question {
	position: relative; margin: 0 !important; padding: 20px 48px 20px 0; cursor: pointer;
	font-size: 17px !important; line-height: 26px !important; font-weight: 600 !important;
}
.st-content .rank-math-question::after {
	content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
	font-size: 28px; font-weight: 300; line-height: 1; color: var(--st-color-brand);
}
.st-content .rank-math-list-item.is-open .rank-math-question::after { content: "×"; color: var(--st-color-text); }
.st-content .rank-math-answer { display: none; padding: 0 48px 22px 0; font-size: 17px; line-height: 28px; color: var(--st-color-text-secondary); }
.st-content .rank-math-answer p { margin: 0; }
.st-content .rank-math-list-item.is-open .rank-math-answer { display: block; }
.st-content.no-js-faq .rank-math-answer { display: block; }

@media (max-width: 767px) {
	.st-content { margin-top: 28px; font-size: 17px; line-height: 28px; }
	.st-content > p:not(h2 ~ p):not(h3 ~ p) { font-size: 18px; line-height: 28px; }
	.st-content h2 { margin-top: 44px; font-size: 26px; line-height: 34px; }
	.st-content h3 { margin-top: 32px; font-size: 22px; line-height: 30px; }
	.st-content .st-product { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--st-color-border-decorative); border-radius: var(--st-radius-md); background: var(--st-color-surface); overflow: hidden; }
	.st-product__media { border-radius: 0; padding: 20px; }
	.st-product__info { padding: 20px 16px; }
	.st-content .st-product__name { font-size: 22px; line-height: 30px; }
	.st-content .wp-block-buttons, .st-content .wp-block-button { width: 100%; }
	.st-content .wp-block-button__link { width: 100%; justify-content: flex-start; }
	.st-content .rank-math-question { font-size: 16px !important; line-height: 24px !important; }
	.st-content .rank-math-answer { font-size: 15px; line-height: 24px; padding-right: 0; }
}

/* ============================================================
 * Footer
 * ============================================================ */
.st-footer { margin-top: 0; border-top: 1px solid var(--st-color-border-decorative); padding: 40px 0 40px; }
.st-footer__inner { display: flex; gap: 120px; align-items: flex-start; }
.st-footer__logo { display: block; height: 46px; width: auto; }
.st-footer__tagline { margin-top: 16px; font-size: 13px; color: var(--st-color-text-secondary); }
.st-footer__links { display: grid; grid-template-columns: repeat(2, minmax(120px, auto)); column-gap: 80px; row-gap: 4px; }
.st-footer__links a, .st-footer__links button {
	display: inline-flex; align-items: center; min-height: 40px;
	background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
	font-size: 14px; font-weight: 600; color: var(--st-color-text-secondary);
}
.st-footer__links a:hover, .st-footer__links button:hover { color: var(--st-color-text); }
.st-footer__bottom { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--st-color-border-decorative); }
.st-footer__bottom p { font-size: 13px; color: var(--st-color-text-muted); }

@media (max-width: 767px) {
	.st-footer { padding: 32px 0; }
	.st-footer__inner { flex-direction: column; gap: 24px; }
	.st-footer__logo { height: 30px; }
	.st-footer__tagline { margin-top: 12px; }
	.st-footer__links { width: 100%; grid-template-columns: 1fr 1fr; column-gap: 16px; }
}

/* ============================================================
 * Toast
 * ============================================================ */
.st-toast {
	position: fixed; left: 50%; bottom: 24px; z-index: 1000; transform: translateX(-50%);
	display: flex; align-items: center; gap: 12px;
	min-width: min(432px, 100vw - 40px); padding: 18px 20px 18px 24px;
	background: var(--st-color-surface); border: 1px solid var(--st-color-border-decorative);
	border-radius: var(--st-radius-md); box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
	font-size: 15px; font-weight: 600;
}
.st-toast::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; background: var(--st-color-brand); }
.st-toast .st-icon { color: var(--st-color-brand); }
.st-toast[hidden] { display: none; }

/* ============================================================
 * Legacy plugin output inside new layout
 * ============================================================ */
.st-content .wp-block-separator { border: 0; border-top: 1px solid var(--st-color-border-decorative); }
.st-content .has-text-align-center { text-align: center; }

/* ============================================================
 * Home order (모바일: 프로그램 칩 줄을 헤더 바로 아래로)
 * ============================================================ */
.st-home { display: flex; flex-direction: column; }
.st-home > .st-section--programs { margin-top: 80px; }
@media (max-width: 767px) {
	.st-home > .st-section--programs { order: -1; margin-top: 16px; }
	.st-home > .st-section--programs .st-section__head { display: none; }
	.st-home > .st-section--programs .st-chips { margin-inline: calc(-1 * var(--st-page-padding)); padding-inline: var(--st-page-padding); }
	.st-home > .st-hero { margin-top: 24px; }
}

/* 가로 스크롤 영역: 첫 항목이 화면 여백에 맞춰 멈추도록 */
.st-chips--scroll, .st-grid--carousel { scroll-padding-inline: var(--st-page-padding); }

.st-article-layout { padding-bottom: 96px; }
@media (max-width: 767px) { .st-article-layout { padding-bottom: 56px; } }

/* 본문 목차 접기 (태블릿·모바일) */
.st-content #ez-toc-container .ez-toc-title-toggle { display: none !important; }
.st-content #ez-toc-container.st-toc-inline .ez-toc-title-container { cursor: pointer; gap: 12px; }
.st-content #ez-toc-container.st-toc-inline .ez-toc-title { flex: 1; }
.st-toc-inline__count { font-size: 13px; font-weight: 700; color: var(--st-color-text-muted); }
.st-toc-inline__icon { font-size: 26px; font-weight: 300; line-height: 1; color: var(--st-color-brand); width: 20px; text-align: center; }
.st-content #ez-toc-container.st-toc-inline:not(.is-open) nav { display: none !important; }
.st-content #ez-toc-container.st-toc-inline.is-open nav { display: block !important; }
.st-content #ez-toc-container.st-toc-inline.is-open .st-toc-inline__icon { color: var(--st-color-text); }

.st-content .wp-block-button__link { overflow-wrap: normal; word-break: keep-all; text-wrap: balance; }

.st-content .wp-block-button__link { text-align: left; text-wrap: pretty; }


/* 고정 페이지(소개·문의·개인정보 처리방침) */
.st-article-layout--page { grid-template-columns: minmax(0, 808px); justify-content: center; }
.st-content--page > p:not(h2 ~ p):not(h3 ~ p) { font-size: 18px; line-height: 30px; color: var(--st-color-text); }
.st-content--page h2 { margin-top: 48px; font-size: 24px; line-height: 32px; }
.st-content--page h3 { margin-top: 32px; font-size: 19px; line-height: 28px; }
.st-content--page table { font-size: 14px; }
@media (max-width: 767px) {
	.st-content--page > p:not(h2 ~ p):not(h3 ~ p) { font-size: 17px; line-height: 28px; }
	.st-content--page h2 { font-size: 21px; line-height: 30px; }
}

/* 문의 양식 (Jetpack Forms) — 디자인 시스템 입력창·버튼 */
.st-content .wp-block-jetpack-contact-form { margin-top: 32px; display: grid; gap: 20px; }
.st-content .wp-block-jetpack-contact-form .grunion-field-wrap,
.st-content .wp-block-jetpack-contact-form .grunion-field-wrap * { font-family: inherit; }
.st-content .wp-block-jetpack-contact-form label,
.st-content .wp-block-jetpack-contact-form .grunion-field-label {
	display: block; margin-bottom: 8px; font-size: 14px !important; line-height: 20px; font-weight: 600 !important; color: var(--st-color-text) !important;
}
.st-content .wp-block-jetpack-contact-form .grunion-label-required { font-size: 12px; font-weight: 500; color: var(--st-color-text-muted); }
.st-content .wp-block-jetpack-contact-form input[type="text"],
.st-content .wp-block-jetpack-contact-form input[type="email"],
.st-content .wp-block-jetpack-contact-form select,
.st-content .wp-block-jetpack-contact-form textarea {
	width: 100% !important; min-height: 52px; padding: 14px 18px !important;
	border-radius: var(--st-radius-md) !important; border: 1px solid var(--st-color-border-control) !important;
	background: var(--st-color-raised) !important; color: var(--st-color-text) !important;
	font-size: 15px !important; line-height: 22px; box-shadow: none !important;
}
.st-content .wp-block-jetpack-contact-form textarea { min-height: 180px; resize: vertical; }
.st-content .wp-block-jetpack-contact-form input:focus,
.st-content .wp-block-jetpack-contact-form select:focus,
.st-content .wp-block-jetpack-contact-form textarea:focus { outline: none; border: 2px solid var(--st-color-text) !important; padding: 13px 17px !important; }
.st-content .wp-block-jetpack-contact-form .contact-form__select-wrapper::after,
.st-content .wp-block-jetpack-contact-form .jetpack-field-select__chevron { color: var(--st-color-text-secondary); }
.st-content .wp-block-jetpack-contact-form input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 10px 0 0; accent-color: var(--st-color-brand); flex: none; }
.st-content .wp-block-jetpack-contact-form .grunion-field-consent-wrap label,
.st-content .wp-block-jetpack-contact-form .grunion-field-consent-wrap .grunion-field-label { display: flex; align-items: flex-start; font-size: 14px !important; font-weight: 500 !important; color: var(--st-color-text-secondary) !important; line-height: 22px; }
.st-content .wp-block-jetpack-contact-form .wp-block-button__link,
.st-content .wp-block-jetpack-contact-form button[type="submit"] {
	display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
	border: 0 !important; border-radius: var(--st-radius-md) !important;
	background: var(--st-color-brand) !important; color: var(--st-color-on-brand) !important;
	font-size: 15px !important; font-weight: 700 !important; cursor: pointer;
}
.st-content .wp-block-jetpack-contact-form .wp-block-button__link::before,
.st-content .wp-block-jetpack-contact-form button[type="submit"]::before { display: none; }
.st-content .contact-form-submission { padding: 24px; border-radius: var(--st-radius-md); background: var(--st-color-surface); border: 1px solid var(--st-color-border-decorative); }
@media (max-width: 767px) {
	.st-content .wp-block-jetpack-contact-form button[type="submit"] { width: 100%; }
}
