/*
Theme Name: Mirabo
Author: MIRABO
Description: Mirabo WordPress 공통 커스텀 테마.
Version: 0.5.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mirabo
*/

:root {
  --c-bg: #ffffff;
  --c-text: #000000;
  --c-text-muted: rgba(0, 0, 0, 0.5);
  --c-accent: #f67380;
  --c-accent-soft: #f47985;
  --c-accent-deep: #ee4b5b;
  --c-accent-grad: linear-gradient(115.19deg, #f47985 22.5%, #ee4b5b 77.5%);
  --c-mark: #ff0004;
  --c-soft: #f3f3f3;
  --c-placeholder: #d9d9d9;
  --c-border: #d9d9d9;
  --border-width: 1px;
  --c-banner-bg: #ffe3e1;

  --f-sans-fallback: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', sans-serif;
  --f-sans: var(--f-sans-fallback);
  --f-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --type-scale: 1;

  --r-pill: 100px;
  --r-panel: 45px;
  --r-carousel: 40px;
  --r-card: 30px;
  --r-box: 25px;
  --r-thumb-sm: 20px;
  --r-page: 10px;
  --r-tag: 5px;

  --sh-pill: 3px 3px 10px rgba(0, 0, 0, 0.15);
  --sh-panel: 3px 3px 10px rgba(0, 0, 0, 0.1);
  --sh-soft: 3px 3px 5px rgba(0, 0, 0, 0.1);
  --sh-btn: 3px 3px 5px rgba(0, 0, 0, 0.15);
  --sh-inset: inset 5px 5px 10px rgba(0, 0, 0, 0.05);

  --w-content: 1440px;
  --pad-x: clamp(40px, calc((100vw - var(--w-content)) / 2), 240px);
}

/* Pretendard is loaded for the Korean and Chinese translations only. */
html[lang^="ko"],
html[lang^="zh"] {
  --f-sans: 'Pretendard', var(--f-sans-fallback);
  --wp--preset--font-family--sans: 'Pretendard', var(--f-sans-fallback);
}

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

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: 18px;
  line-height: 28px;
  letter-spacing: -0.4px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; }

.sb-container {
  width: 100%;
  max-width: calc(var(--w-content) + var(--pad-x) * 2);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.sb-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.sb-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--c-accent);
  color: #fff;
  font-weight: 700;
  border-radius: 0 0 var(--r-page) 0;
}

.sb-skip:focus { left: 0; }

.sb-rule {
  border: 0;
  border-top: var(--border-width) solid var(--c-border);
  margin: 50px 0;
}

/* ---------- header ---------- */

.sb-header { background: var(--c-bg); }

.sb-header__inner {
  min-height: 103px;
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.sb-header__logo { flex-shrink: 0; }

.sb-header__logo-image {
  display: block;
  width: auto;
  max-width: 220px;
  max-height: 55px;
  object-fit: contain;
}

.sb-header__logo-text {
  display: block;
  max-width: 220px;
  color: var(--c-text);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.6px;
}

/* 카테고리 수와 이름 길이에 따라 네비게이션이 헤더 폭을 넘는 지점이 달라진다.
   특정 px에 미디어쿼리를 거는 대신, 넘칠 때만 스스로 가로 스크롤이 되게 한다.
   min-width:0 이 없으면 flex 항목이 내용 폭 아래로 줄지 않아 옆 요소를 밀어낸다.
   위아래 padding/margin 은 활성 pill 그림자가 스크롤 박스에 잘리지 않게 하는 보정이다. */
.sb-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  overflow-x: auto;
  padding: 8px 0;
  margin: -8px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sb-nav::-webkit-scrollbar { display: none; }

.sb-nav__item {
  flex: 0 0 auto;
  height: 41px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-text-muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-radius 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.sb-nav__item:hover { color: var(--c-accent); }

.sb-nav__item.is-active {
	background: var(--c-accent);
	color: #fff;
	box-shadow: var(--sh-pill);
}

/* Header menu controls only affect the selected item. The default remains
   the original accent-background pill, so sites do not change on upgrade. */
.sb-header--nav-active-text .sb-nav__item.is-active {
  background: transparent;
  color: var(--c-accent);
  box-shadow: none;
}

.sb-header--nav-active-square .sb-nav__item.is-active { border-radius: 0; }

/* 시안에는 없지만 polylang이 ko/zh를 함께 쓰는 동안은 남겨둔다. 언어가 하나면
   mirabo_the_language_switcher()가 아무것도 출력하지 않아 자동으로 사라진다. */
.sb-lang { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.sb-lang__item {
  font-size: 14px;
  line-height: 30px;
  font-weight: 700;
  color: var(--c-text-muted);
  padding: 0 8px;
  border-radius: var(--r-page);
}

.sb-lang__item.is-active { color: #fff; background: var(--c-accent); }

/* ---------- footer ---------- */

.sb-footer { padding-bottom: 150px; }

.sb-footer__rule {
  border: 0;
  border-top: var(--border-width) solid var(--c-border);
  margin: 0 0 30px;
}

.sb-footer__bar {
  background: var(--c-soft);
  border-radius: var(--r-pill);
  min-height: 59px;
  padding: 7px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 16px;
  line-height: 40px;
  letter-spacing: 0;
}

.sb-footer__desc { margin: 0; }

.sb-footer__rss { white-space: nowrap; }

.sb-footer__rss:hover { color: var(--c-accent); }

/* ---------- banner ---------- */

.sb-banner {
	height: 520px;
	background-color: var(--c-banner-bg);
	background-image: linear-gradient(115deg, var(--c-soft) 0%, var(--c-banner-bg) 52%, color-mix(in srgb, var(--c-accent-soft) 45%, #fff) 100%);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
}

.sb-banner--has-image { height: 700px; }

.sb-banner__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.sb-banner__txt { width: 657px; }

.sb-banner__logo {
  display: block;
  width: 396px;
  min-height: 52px;
  margin-bottom: 40px;
}

.sb-banner__logo-image {
  display: block;
  width: auto;
  max-width: 396px;
  max-height: 72px;
  object-fit: contain;
  object-position: left center;
}

.sb-banner__logo-text {
  display: block;
  color: var(--c-text);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -1px;
}

.sb-banner__display {
  margin: 0;
  font-family: var(--f-display);
  font-size: 46px;
  line-height: 60px;
  font-weight: 400;
  color: var(--c-accent);
  letter-spacing: 0;
}

.sb-banner__headline {
  margin: 0;
  font-size: 30px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.7px;
}

.sb-banner__sub {
  margin: 0;
  font-size: 21px;
  line-height: 38px;
  font-weight: 400;
  letter-spacing: -0.5px;
}

/* 시안은 1920 기준이다. 그 아래 데스크톱 구간에서는 배너 전체를 비례 축소해
   사진과 텍스트의 상대 위치를 유지한다. cover 로 잘라내면 모델이 화면에서
   차지하는 비율이 커져 고정 폭 텍스트 블록을 덮어버린다.
   1023px 이하는 아래 구간이 따로 담당하므로 상한/하한을 모두 건다. */
@media (min-width: 1024px) and (max-width: 1919px) {
  .sb-banner { height: 36.4583vw; }
  .sb-banner__inner { padding-left: 12.5vw; padding-right: 12.5vw; }
  .sb-banner__txt { width: 34.2188vw; }
  .sb-banner__logo { width: 20.625vw; min-height: 0; margin-bottom: 2.0833vw; }
  .sb-banner__logo-image { max-width: 100%; height: auto; }
  .sb-banner__display { font-size: 2.8646vw; line-height: 3.6458vw; }
  .sb-banner__headline { font-size: 1.8229vw; line-height: 2.3438vw; }
  .sb-banner__sub { font-size: 1.3021vw; line-height: 2.3438vw; }
}

/* ---------- shared: category pill, meta rows, thumbnails ---------- */

.sb-cat {
  height: 45px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: var(--sh-pill);
}

.sb-cat:hover { background: var(--c-accent-deep); }

.sb-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sb-meta__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sb-meta__date {
  font-size: 12px;
  line-height: 12px;
  letter-spacing: 0;
  color: var(--c-text-muted);
  white-space: nowrap;
}

.sb-meta__author {
  height: 21px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-tag);
  background: var(--c-soft);
  color: var(--c-text-muted);
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.sb-byline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sb-byline__avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sb-byline__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sb-byline__name {
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-byline__date {
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0;
  color: var(--c-text-muted);
  white-space: nowrap;
}

.sb-card { margin: 0; }

.sb-card__thumb {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--c-placeholder);
  border-radius: var(--r-card);
}

.sb-card__thumb img,
.sb-card__thumb-empty {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sb-card__title { margin: 0; }

.sb-card__title a:hover { color: var(--c-accent); }

.sb-card__excerpt {
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.sb-empty {
  font-size: 19px;
  line-height: 30px;
  color: var(--c-text-muted);
}

/* ---------- main layout ---------- */

.sb-main { padding-top: 110px; padding-bottom: 90px; }

/* Home presets own their vertical rhythm. A keeps the legacy spacing inside
   its template; B and C use their conditional stylesheet. */
.sb-main.sb-home { padding: 0; }

/* 카테고리·태그 화면은 위에 핑크 히어로 띠가 이미 여백을 만든다. */
.sb-main--archive { padding-top: 117px; }

.sb-main--post { padding-top: 88px; }

.sb-main--search { padding-top: 90px; }

.sb-intro { margin: 0 0 90px; }

.sb-intro__title {
  margin: 0;
  font-size: 36px;
  line-height: 46px;
  font-weight: 700;
  letter-spacing: -0.9px;
}

.sb-intro__lead {
  margin: 0;
  font-size: 19px;
  line-height: 44px;
  letter-spacing: -0.44px;
}

.sb-intro__body {
  margin: 0;
  font-size: 19px;
  line-height: 28px;
  letter-spacing: -0.44px;
}

/* ---------- home: featured + latest ---------- */

.sb-featured {
  display: grid;
  grid-template-columns: minmax(0, 1000px) 366px;
  column-gap: 74px;
  align-items: start;
}

.sb-card--feature {
  background: var(--c-bg);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
  padding: 24px;
}

.sb-card--feature .sb-card__thumb { height: 497px; }

/* 대표 카드의 카테고리는 썸네일 링크 안에 있어 링크가 아니다 — 중첩 링크를 만들지
   않으려는 것이라, 그대로 라벨로만 얹는다. */
.sb-card__cat {
  position: absolute;
  left: 24px;
  bottom: 24px;
  height: 45px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: var(--sh-pill);
}

.sb-card--feature .sb-card__body { margin-top: 24px; }

.sb-card--feature .sb-card__title {
  font-size: 30px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.7px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.sb-card--feature .sb-card__excerpt {
  margin-top: 10px;
  font-size: 20px;
  line-height: 30px;
  letter-spacing: -0.4px;
  -webkit-line-clamp: 1;
}

.sb-card--feature .sb-meta { margin-top: 20px; }

.sb-featured__side-title {
  margin: 0 0 30px;
  color: var(--c-accent);
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.7px;
}

.sb-featured__side-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.sb-card--mini .sb-card__thumb { height: 191px; }

.sb-card--mini .sb-card__body { margin-top: 15px; }

.sb-card--mini .sb-card__title {
  font-size: 25px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -0.6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.sb-card--mini .sb-card__excerpt {
  font-size: 15px;
  line-height: 30px;
  letter-spacing: -0.3px;
  -webkit-line-clamp: 1;
}

/* ---------- home: search bar ---------- */

.sb-searchbar {
  margin-top: 90px;
  padding-top: 90px;
  border-top: var(--border-width) solid var(--c-border);
  display: flex;
  align-items: center;
  gap: 38px;
}

.sb-searchbar__logo {
  width: 304px;
  min-height: 40px;
  flex-shrink: 0;
}

.sb-searchbar__logo-image {
  display: block;
  width: auto;
  max-width: 304px;
  max-height: 40px;
  object-fit: contain;
  object-position: left center;
}

.sb-searchbar__logo-text {
  display: block;
  color: var(--c-text);
  font-size: 22px;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: -0.5px;
}

.sb-searchbar__form {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.sb-searchbar__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 56px;
  padding: 0 32px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-soft);
  box-shadow: var(--sh-inset);
  font-family: inherit;
  font-size: 18px;
  letter-spacing: -0.4px;
  color: var(--c-text);
  -webkit-appearance: none;
  appearance: none;
}

.sb-searchbar__input::placeholder { color: var(--c-text-muted); }

.sb-searchbar__input:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

.sb-searchbar__submit {
  flex: 0 0 141px;
  height: 56px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
  cursor: pointer;
  filter: drop-shadow(var(--sh-btn));
}

.sb-searchbar__submit:hover { background: var(--c-accent-deep); }

/* The Customizer preview toggles this class when the shared shadow token is
   `none`; drop-shadow(none) itself is not valid CSS. Published settings use
   the equivalent narrow inline rule from inc/dynamic-css.php. */
:root.mirabo-shadow-none .sb-searchbar__submit,
:root.mirabo-shadow-none .sb-row__next { filter: none; }

/* ---------- home: category carousels ---------- */

.sb-rows {
  margin-top: 90px;
  display: flex;
  flex-direction: column;
  gap: 65px;
}

.sb-row__head {
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--c-accent);
}

.sb-row__title {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.8px;
}

.sb-row__more {
  font-size: 17px;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.sb-row__more:hover { color: var(--c-accent-deep); }

.sb-row__viewport {
  position: relative;
  margin-top: 11px;
}

/* 트랙은 컨테이너 오른쪽 여백까지 흘러나가 다음 카드가 걸쳐 보이게 한다 —
   시안에서 4번째 카드가 반쯤 잘려 있는 자리다. */
.sb-row__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  margin-right: calc(var(--pad-x) * -1);
  padding: 6px var(--pad-x) 6px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sb-row__track::-webkit-scrollbar { display: none; }

/* 흘러나간 부분을 흰색으로 흐리게 덮어 "더 있다"만 보이게 한다. */
.sb-row__viewport::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: calc(var(--pad-x) * -1);
  width: var(--pad-x);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--c-bg) 70%);
  pointer-events: none;
}

.sb-card--carousel {
  flex: 0 0 464px;
  scroll-snap-align: start;
  background: var(--c-bg);
  border-radius: var(--r-carousel);
  padding: 20px;
  box-shadow: var(--sh-soft);
}

.sb-card--carousel .sb-card__thumb { height: 236px; }

.sb-card--carousel .sb-card__body { margin-top: 15px; }

.sb-card--carousel .sb-card__title {
  font-size: 25px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -0.6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.sb-card--carousel .sb-card__excerpt {
  margin-top: 5px;
  font-size: 17px;
  line-height: 27px;
  letter-spacing: -0.34px;
  -webkit-line-clamp: 2;
}

.sb-card--carousel .sb-meta { margin-top: 20px; }

.sb-row__next {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(50%, -50%);
  z-index: 2;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--c-accent);
  display: grid;
  place-items: center;
  cursor: pointer;
  filter: drop-shadow(var(--sh-btn));
  transition: opacity 0.15s ease, background 0.15s ease;
}

/* display:grid 가 [hidden]의 UA display:none 을 이겨버리므로 명시적으로 다시 감춘다. */
.sb-row__next[hidden] { display: none; }

.sb-row__next:hover { background: var(--c-accent-deep); }

.sb-row__next img {
  width: 24px;
  height: 24px;
  transform: rotate(90deg);
}

/* 끝까지 밀면 되감기 버튼이 된다 — 방향을 뒤집어 알려준다. */
.sb-row__next.is-end img { transform: rotate(-90deg); }

/* ---------- archive hero band ---------- */

.sb-hero {
  position: relative;
  background: var(--c-bg);
  overflow: hidden;
}

.sb-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/img/category-banner.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.3;
}

.sb-hero__inner {
  position: relative;
  min-height: 295px;
  padding-top: 65px;
  padding-bottom: 65px;
  display: flex;
  flex-direction: column;
}

.sb-hero__count {
  margin: 0;
  text-align: right;
  font-size: 12px;
  line-height: 12px;
  letter-spacing: 0;
  color: var(--c-text-muted);
}

.sb-hero__label {
  margin: 0;
  font-size: 15px;
  line-height: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--c-accent-soft);
}

.sb-hero__body { margin-top: 25px; }

.sb-hero__title {
  margin: 0;
  font-size: 42px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -1px;
}

.sb-hero__desc {
  margin: 18px 0 0;
  font-size: 17px;
  line-height: 24px;
  letter-spacing: -0.4px;
}

.sb-sort {
  align-self: flex-end;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.sb-sort__item {
  padding: 10px 21px;
  border-radius: var(--r-pill);
  background: var(--c-bg);
  color: var(--c-accent-soft);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.sb-sort__item.is-active {
  background: var(--c-accent);
  color: #fff;
}

/* ---------- archive lists ---------- */

.sb-list {
  display: flex;
  flex-direction: column;
}

.sb-card--row {
  display: flex;
  align-items: center;
  gap: 45px;
}

.sb-card--row + .sb-card--row {
  margin-top: 30px;
  padding-top: 30px;
  border-top: var(--border-width) solid var(--c-border);
}

.sb-card--row .sb-card__thumb {
  flex: 0 0 488px;
  height: 256px;
}

.sb-card--row .sb-card__body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 14px 0;
}

.sb-card--row .sb-card__title {
  margin-top: 17px;
  font-size: 25px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -0.6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.sb-card--row .sb-card__excerpt {
  margin-top: 5px;
  font-size: 18px;
  line-height: 25px;
  letter-spacing: -0.36px;
  -webkit-line-clamp: 1;
}

.sb-card--row .sb-byline { margin-top: 38px; }

/* Category archives may use this card grid; tags and other archive types
   deliberately continue to use the row rules above. */
.sb-list--grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 28px;
}

.sb-card--archive-grid {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--r-card);
  background: var(--c-bg);
  box-shadow: var(--sh-soft);
}

.sb-card--archive-grid .sb-card__thumb {
  height: auto;
  aspect-ratio: 424 / 236;
  border-radius: 0;
}

.sb-card--archive-grid .sb-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: 24px 24px 22px;
}

.sb-card--archive-grid .sb-card__title {
  margin-top: 16px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: calc(24px * var(--type-scale));
  line-height: calc(34px * var(--type-scale));
  font-weight: 700;
  letter-spacing: -0.48px;
}

.sb-card--archive-grid .sb-card__excerpt {
  margin-top: 8px;
  -webkit-line-clamp: 2;
  font-size: calc(16px * var(--type-scale));
  line-height: calc(25px * var(--type-scale));
  letter-spacing: -0.32px;
}

.sb-card--archive-grid .sb-meta {
  margin-top: auto;
  padding-top: 22px;
}

/* ---------- search results ---------- */

.sb-searchpage {
  background: var(--c-bg);
  border-radius: var(--r-card);
  padding: 55px;
  /* 시안에서는 어두운 오버레이 위에 뜬 카드라 그림자가 없다. 페이지로 옮기면
     흰 배경 위 흰 카드가 되어 경계가 사라지므로 카드 그림자를 준다. */
  box-shadow: var(--sh-panel);
}

.sb-searchpage__head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sb-searchpage__count {
  margin: 0;
  font-size: 12px;
  line-height: 12px;
  letter-spacing: 0;
  color: var(--c-text-muted);
}

.sb-results {
  margin-top: 35px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sb-result {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 23px;
}

.sb-result__body {
  flex: 1 1 auto;
  min-width: 0;
}

.sb-result__title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.sb-result__title a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-result__title a:hover { color: var(--c-accent); }

.sb-result__icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.sb-result__excerpt {
  margin: 5px 0 0;
  font-size: 15px;
  line-height: 23px;
  letter-spacing: -0.3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.sb-result__thumb {
  flex: 0 0 259px;
  height: 136px;
  display: block;
  overflow: hidden;
  border-radius: var(--r-thumb-sm);
  background: var(--c-placeholder);
}

.sb-result__thumb img,
.sb-result__thumb-empty {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sb-mark {
  background: none;
  color: var(--c-mark);
  font-weight: inherit;
}

/* ---------- post detail ---------- */

.sb-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -0.3px;
  color: var(--c-text-muted);
}

.sb-crumb__item:hover { color: var(--c-accent); }

.sb-crumb__item.is-current {
  color: var(--c-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.sb-crumb__sep { color: var(--c-border); }

.sb-post__title {
  margin: 20px 0 0;
  font-size: 40px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -1px;
}

/* 카테고리가 없는 글은 pill이 통째로 빠지므로 제목이 첫 요소가 된다. */
.sb-post__title:first-child { margin-top: 0; }

.sb-post__head .sb-byline { margin-top: 30px; }

/* 시안의 3열이 아니라 2열이다 — 목차(342) / 본문(976), 간격 122px = 1440px. */
.sb-post {
  display: grid;
  grid-template-columns: 342px minmax(0, 976px);
  column-gap: 122px;
  align-items: start;
}

.sb-post__toc {
  position: sticky;
  top: 60px;
}

.sb-post__main { min-width: 0; }

.sb-post__share {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 25px;
}

.sb-post__thumb { margin: 0 0 43px; }

.sb-post__thumb img {
  width: 100%;
  height: auto;
  border-radius: var(--r-card);
}

.post-content > * { max-width: 100%; }

.post-content p {
  margin: 0 0 43px;
  font-size: 18px;
  line-height: 29px;
  letter-spacing: -0.4px;
}

.post-content h2 {
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.9px;
  margin: 43px 0;
}

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

.post-content h3 { font-size: 24px; line-height: 36px; font-weight: 700; letter-spacing: -0.6px; margin: 40px 0 20px; }
.post-content h4,
.post-content h5,
.post-content h6 { font-size: 20px; line-height: 30px; font-weight: 700; margin: 32px 0 14px; }

.post-content ul,
.post-content ol { margin: 0 0 43px; padding-left: 24px; }

.post-content li { margin-bottom: 8px; }

.post-content img { height: auto; border-radius: var(--r-card); margin: 0 auto; }

.post-content figure { margin: 43px 0; }

.post-content figcaption {
  margin-top: 10px;
  font-size: 15px;
  line-height: 24px;
  color: var(--c-text-muted);
}

.post-content blockquote {
  margin: 43px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--c-accent);
  color: var(--c-text-muted);
}

.post-content blockquote > :last-child { margin-bottom: 0; }


.post-content table { width: 100%; border-collapse: collapse; margin: 0 0 43px; font-size: 17px; }
.post-content th,
.post-content td { border: var(--border-width) solid var(--c-border); padding: 8px 12px; text-align: left; }

.post-content pre {
  overflow-x: auto;
  background: var(--c-soft);
  border-radius: var(--r-box);
  padding: 16px 20px;
  font-size: 15px;
  line-height: 24px;
}

.post-content hr {
  border: 0;
  border-top: var(--border-width) solid var(--c-border);
  margin: 43px 0;
}

.post-content__pages {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text-muted);
}

.post-content__page { color: var(--c-text); }

.sb-backlink { font-size: 18px; }

.sb-backlink a { color: var(--c-accent); font-weight: 700; }

/* ---------- article body: highlight, summary box, FAQ ---------- */

/* marketory.co.kr 본문 스타일을 옮겨온 것. 두 사이트가 같은 마크업 규약을 쓴다 —
   aside.post-summary / .summary-title / .summary-tldr / .summary-bullets /
   .faq-section > details. 색만 이 사이트의 --c-accent(핑크)로 바꿨다. */

/* 굵게 대신 형광펜. 글자 굵기는 오히려 낮춰서(700 -> 500) 밑줄 하이라이트가
   강조를 맡게 한다. 70% 지점부터 칠해 글자 아랫부분에만 색이 깔린다. */
.post-content strong,
.post-content b {
  font-weight: 500;
  background: linear-gradient(
    rgba(255, 255, 255, 0) 70%,
    color-mix(in srgb, var(--c-accent) 30%, transparent) 70%
  );
}

.post-content a {
  color: var(--c-accent);
  text-decoration: underline;
  font-weight: 700;
}

.post-content a:hover { color: var(--c-accent-deep); }

/* 링크 안의 강조는 형광펜을 빼고 링크 색을 그대로 쓴다 — 겹치면 둘 다 안 읽힌다. */
.post-content a strong,
.post-content a b {
  background: none;
  font-weight: 700;
  color: inherit;
}

/* ---- 핵심 요약 박스 ---- */

.post-content aside.post-summary {
  position: relative;
  overflow: hidden;
  margin: 8px 0 36px;
  padding: clamp(24px, 3vw, 32px) clamp(24px, 3vw, 36px);
  border: var(--border-width) solid color-mix(in srgb, var(--c-accent) 18%, transparent);
  border-radius: var(--r-box);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--c-accent) 8%, var(--c-bg)),
    color-mix(in srgb, var(--c-accent) 3%, var(--c-bg))
  );
  box-shadow:
    0 4px 20px color-mix(in srgb, var(--c-accent) 10%, transparent),
    0 1px 4px rgba(0, 0, 0, 0.04);
}

.post-content aside.post-summary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--c-accent) 0%,
    color-mix(in srgb, var(--c-accent) 60%, #fff) 100%
  );
}

/* h2지만 제목이 아니라 라벨이다. 위의 .post-content h2 규칙(34px, 큰 margin)을 되돌린다. */
.post-content aside.post-summary .summary-title,
.post-content h2.summary-title {
  margin: 0 0 12px;
  padding-bottom: 0;
  border-bottom: 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.post-content aside.post-summary .summary-tldr {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.75;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--c-text);
  word-break: keep-all;
}

.post-content aside.post-summary .summary-tldr:last-child { margin-bottom: 0; }

.post-content aside.post-summary .summary-bullets {
  list-style: none;
  margin: 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-content aside.post-summary .summary-bullets li {
  position: relative;
  margin-bottom: 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-text-muted);
  word-break: keep-all;
}

.post-content aside.post-summary .summary-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-accent);
  opacity: 0.6;
}

/* ---- 자주 묻는 질문 ---- */

.post-content .faq-section { margin: 8px 0; }

.post-content .faq-section details {
  margin-bottom: 8px;
  border: var(--border-width) solid var(--c-border);
  border-radius: var(--r-thumb-sm);
  overflow: hidden;
  background: var(--c-bg);
  transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-content .faq-section details[open] { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }

.post-content .faq-section summary {
  margin: 0;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 17px;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  word-break: keep-all;
  transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 기본 삼각형 마커를 브라우저별로 모두 지운다 — 아래 "+" 표시로 대체한다. */
.post-content .faq-section summary::-webkit-details-marker { display: none; }
.post-content .faq-section summary::marker { content: ""; }

.post-content .faq-section summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  color: var(--c-text-muted);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-content .faq-section details[open] > summary::after {
  transform: rotate(45deg);
  color: var(--c-accent);
}

.post-content .faq-section summary:hover {
  background: var(--c-soft);
  color: var(--c-accent);
}

.post-content .faq-section details[open] > summary {
  border-bottom: var(--border-width) solid var(--c-border);
  background: var(--c-soft);
  color: var(--c-accent);
}

.post-content .faq-section details > p {
  margin: 0;
  padding: 18px 22px 20px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-text-muted);
  word-break: keep-all;
}

/* ---------- table of contents ---------- */

/* 플러그인의 toc.css 가 테마 스타일 뒤에 로드되므로(우선순위 20) 같은 특정도로는
   덮이지 않는다. 컨테이너를 앞에 붙여 한 단계 더 구체적으로 쓴다. */
.sb-post__toc .sb-toc {
  background: var(--c-bg);
  border-radius: var(--r-box);
  box-shadow: var(--sh-pill);
  padding: 45px 38px;
}

.sb-post__toc .sb-toc__title {
  margin: 0 0 38px;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 3.5px;
  color: var(--c-text);
}

.sb-post__toc .sb-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sb-toc;
}

.sb-post__toc .sb-toc__item + .sb-toc__item { margin-top: 26px; }

.sb-post__toc .sb-toc__link {
  display: block;
  padding: 0;
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--c-text);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.sb-post__toc .sb-toc__link::before {
  counter-increment: sb-toc;
  content: counter(sb-toc) ". ";
}

.sb-post__toc .sb-toc__link:hover,
.sb-post__toc .sb-toc__link:focus-visible,
.sb-post__toc .sb-toc__link.is-active { color: var(--c-accent-deep); }

.post-content h2[id] { scroll-margin-top: 80px; }

/* ---------- post tags ---------- */

.sb-tags {
  margin-top: 45px;
  display: flex;
  align-items: center;
  gap: 23px;
}

.sb-tags__label {
  flex-shrink: 0;
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--c-text-muted);
}

.sb-tags__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.sb-tags__item {
  padding: 10px 21px;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.sb-tags__item:hover { background: var(--c-accent-deep); }

/* ---------- author card ---------- */

.sb-author {
  margin-top: 85px;
  padding: 30px 212px 30px 26px;
  background: var(--c-bg);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-soft);
  display: flex;
  /* 소개글·SNS가 비어 있으면 본문이 이름 한 줄로 줄어든다. 위 정렬이면 120px 아바타
     옆에 덩그러니 붙으므로 가운데로 맞춘다 — 다 채워진 시안에서도 같은 위치다. */
  align-items: center;
  gap: 45px;
}

.sb-author__avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sb-author__body {
  flex: 1 1 auto;
  min-width: 0;
}

.sb-author__name {
  margin: 0;
  font-size: 25px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.sb-author__bio {
  margin: 0;
  font-size: 16px;
  line-height: 26px;
  letter-spacing: -0.36px;
}

.sb-author__links {
  margin-top: 13px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.sb-author__sns {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sb-author__sns-item img {
  width: 24px;
  height: 24px;
}

.sb-author__sns-item:hover { opacity: 0.6; }

.sb-author__cta {
  height: 32px;
  padding: 0 21px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  background: var(--c-text);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.sb-author__cta:hover { background: var(--c-accent); }

/* ---------- previous / next post ---------- */

.sb-postnav {
  margin-top: 85px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 49px;
}

.sb-postnav__col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sb-postnav__col--next { text-align: right; }

.sb-postnav__col--next .sb-meta { justify-content: flex-end; }

.sb-postnav__label {
  margin: 0 0 20px;
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--c-text-muted);
}

.sb-postnav__col > .sb-navcard,
.sb-postnav__empty {
  border-top: var(--border-width) solid var(--c-border);
  padding-top: 20px;
  margin: 0;
}

.sb-postnav__empty {
  padding-bottom: 20px;
  font-size: 15px;
  line-height: 25px;
  color: var(--c-text-muted);
}

.sb-navcard__title {
  margin: 0;
  font-size: 25px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -0.6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.sb-navcard__title a:hover { color: var(--c-accent); }

.sb-navcard__excerpt {
  margin: 5px 0 0;
  font-size: 15px;
  line-height: 25px;
  letter-spacing: -0.3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.sb-navcard .sb-meta { margin-top: 15px; }

/* ---------- related posts ---------- */

.sb-more { margin-top: 85px; }

.sb-more__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: var(--border-width) solid var(--c-border);
  color: var(--c-text-muted);
}

.sb-more__title {
  margin: 0;
  font-size: 17px;
  line-height: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.sb-more__link {
  font-size: 12px;
  line-height: 12px;
  white-space: nowrap;
}

.sb-more__link:hover { color: var(--c-accent); }

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

.sb-more__item { margin-top: 35px; }

.sb-rcard {
  display: flex;
  align-items: center;
  gap: 26px;
}

.sb-rcard__thumb {
  flex: 0 0 365px;
  height: 191px;
  display: block;
  overflow: hidden;
  border-radius: var(--r-box);
  background: var(--c-placeholder);
}

.sb-rcard__thumb img,
.sb-rcard__thumb-empty {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sb-rcard__body {
  flex: 1 1 auto;
  min-width: 0;
}

.sb-rcard__title {
  margin: 0;
  font-size: 25px;
  line-height: 36px;
  font-weight: 700;
  letter-spacing: -0.6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.sb-rcard__title a:hover { color: var(--c-accent); }

.sb-rcard__excerpt {
  margin: 5px 0 0;
  font-size: 15px;
  line-height: 25px;
  letter-spacing: -0.3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sb-rcard .sb-meta { margin-top: 15px; }

/* ---------- share row ---------- */

.sb-share-links {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.sb-share-links__item {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.sb-share-links__item:hover,
.sb-share-links__item:focus-visible { opacity: 0.6; }

/* 아이콘 SVG가 preserveAspectRatio="none"이라 상자가 한 번 눌리면 글리프가 그대로
   늘어난다. 전역 img 규칙과 flex 수축을 둘 다 막아 실측 비율을 지킨다. */
.sb-share-links__item img {
  width: auto;
  height: 18px;
  max-width: none;
  flex-shrink: 0;
}

.sb-share-links__copy img { height: 17px; }

/* 복사 성공은 버튼 자신의 상태로만 알린다 — 문구를 끼워 넣으면 번역이 안 된다. */
.sb-share-links__copy.is-copied { opacity: 0.35; }

/* ---------- pagination ---------- */

.sb-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 85px;
}

.sb-pager .page-numbers {
  width: 35px;
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-page);
  font-size: 15px;
  font-weight: 700;
  line-height: 30px;
  color: var(--c-text-muted);
}

.sb-pager .page-numbers.current {
  background: var(--c-accent);
  color: #fff;
}

.sb-pager .page-numbers:not(.current):not(.dots):hover { color: var(--c-accent); }

.sb-pager__chevron { width: 35px; height: 35px; }

.sb-pager__chevron--next { transform: rotate(180deg); }

/* ---------- responsive ---------- */

/* 목차 342 + 122 + 본문 976 이 더는 안 들어간다. 목차를 접고 본문만 남긴다 —
   본문 안 헤딩에는 앵커가 그대로 있어 링크는 살아 있다. */
@media (max-width: 1519px) {
  .sb-post__toc { display: none; }

  .sb-post {
    grid-template-columns: minmax(0, 976px);
    justify-content: center;
  }

  .sb-card--row .sb-card__thumb { flex: 0 0 40%; height: auto; aspect-ratio: 488 / 256; }
}

/* 대표글 1000 + 74 + 최신글 366 이 안 들어가는 구간. 최신글을 아래로 내리고
   두 칸으로 눕힌다 — 세로로 쌓으면 대표 카드 아래가 지나치게 길어진다. */
@media (max-width: 1279px) {
  .sb-featured { grid-template-columns: minmax(0, 1fr); row-gap: 60px; }

  .sb-featured__side-list {
    flex-direction: row;
    gap: 40px;
  }

  .sb-featured__side-list > * { flex: 1 1 0; min-width: 0; }

  .sb-card--feature .sb-card__thumb { height: auto; aspect-ratio: 952 / 497; }
  .sb-card--mini .sb-card__thumb { height: auto; aspect-ratio: 366 / 191; }

  .sb-searchbar__logo { width: 240px; height: auto; }
}

/* 태블릿. */
@media (max-width: 1023px) {
  .sb-header__inner {
    min-height: 0;
    padding-top: 16px;
    padding-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .sb-header__logo-image { max-width: 170px; max-height: 48px; }
  .sb-header__logo-text { max-width: 170px; font-size: 20px; }

  /* 카테고리가 늘어나면 768px부터 이미 헤더 폭을 넘는다. 가로 스크롤 트랙으로
     바꿔 화면 끝까지 흐르게 한다. ≤767px에서도 그대로 이어진다. */
  /* 태블릿부터는 아예 한 줄을 통째로 내준다 — 화면 끝까지 흐르게 해서
     스크롤할 여지가 있다는 걸 보이게 한다. */
  .sb-nav {
    order: 3;
    width: 100%;
    margin: 0 calc(var(--pad-x) * -1);
    padding: 8px var(--pad-x);
  }

  .sb-nav__item { height: 36px; font-size: 16px; }

  .sb-banner { height: 420px; }
  .sb-banner--has-image { height: 520px; }
  .sb-banner__display { font-size: 42px; line-height: 54px; }
  .sb-banner__headline { font-size: 28px; line-height: 38px; }
  .sb-banner__sub { font-size: 20px; line-height: 34px; }
  .sb-banner__logo { width: 300px; min-height: 0; margin-bottom: 28px; }
  .sb-banner__logo-image { max-width: 100%; height: auto; }
  .sb-banner__logo-text { font-size: 28px; }

  /* 657px 고정폭은 768px 뷰포트의 콘텐츠 박스보다 넓어 넘친다. 콘텐츠 박스 폭에
     대한 비율(45.625% = 1920 시안에서 657/1440)로 바꿔 함께 줄어들게 한다. */
  .sb-banner__txt { width: 45.625%; }

  .sb-main { padding-top: 64px; padding-bottom: 64px; }
  .sb-main--archive,
  .sb-main--post,
  .sb-main--search { padding-top: 64px; }

  .sb-intro { margin-bottom: 56px; }
  .sb-intro__title { font-size: 30px; line-height: 40px; }
  .sb-intro__lead,
  .sb-intro__body { font-size: 18px; line-height: 28px; }

  .sb-card--feature { padding: 20px; border-radius: var(--r-card); }
  .sb-card--feature .sb-card__title { font-size: 26px; line-height: 34px; }
  .sb-card--feature .sb-card__excerpt { font-size: 17px; line-height: 26px; }

  .sb-featured__side-title { font-size: 24px; }
  .sb-card--mini .sb-card__title { font-size: 22px; line-height: 32px; }

  .sb-searchbar { margin-top: 56px; padding-top: 56px; gap: 24px; flex-wrap: wrap; }
  .sb-searchbar__logo { width: 200px; }
  .sb-searchbar__form { flex-basis: 100%; }

  .sb-rows { margin-top: 56px; gap: 48px; }
  .sb-row__title { font-size: 28px; }
  .sb-row__more { font-size: 16px; }
  .sb-card--carousel { flex: 0 0 min(380px, 78vw); }
  .sb-card--carousel .sb-card__title { font-size: 22px; line-height: 32px; }
  .sb-card--carousel .sb-card__excerpt { font-size: 15px; line-height: 24px; }

  /* 손가락으로 밀 수 있으니 화살표는 접는다. */
  .sb-row__next { display: none; }

  .sb-hero__inner { min-height: 0; padding-top: 40px; padding-bottom: 40px; }
  .sb-hero__title { font-size: 34px; }
  .sb-hero__desc { font-size: 16px; line-height: 24px; }

  .sb-card--row { gap: 24px; }
  .sb-card--row .sb-card__title { margin-top: 12px; font-size: 22px; line-height: 32px; }
  .sb-card--row .sb-card__excerpt { font-size: 16px; line-height: 24px; -webkit-line-clamp: 2; }
  .sb-card--row .sb-byline { margin-top: 20px; }
  .sb-card--row .sb-card__body { padding: 0; }

  .sb-list--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .sb-card--archive-grid .sb-card__body { padding: 20px 20px 18px; }
  .sb-card--archive-grid .sb-card__title { font-size: calc(22px * var(--type-scale)); line-height: calc(32px * var(--type-scale)); }
  .sb-card--archive-grid .sb-card__excerpt { font-size: calc(15px * var(--type-scale)); line-height: calc(24px * var(--type-scale)); }
  .sb-card--archive-grid .sb-meta { padding-top: 18px; }

  .sb-searchpage { padding: 32px; }
  .sb-result__thumb { flex: 0 0 200px; height: 105px; }

  .sb-post__title { font-size: 32px; line-height: 1.25; letter-spacing: -0.64px; }
  .sb-post__head .sb-byline { margin-top: 20px; }
  .sb-rule { margin: 32px 0; }
  .post-content p { margin-bottom: 32px; font-size: 18px; line-height: 29px; }
  .post-content h2 { font-size: 30px; margin: 32px 0; }
  .post-content h3 { font-size: 22px; line-height: 32px; }

  .sb-author {
    margin-top: 56px;
    padding: 24px;
    border-radius: var(--r-panel);
    gap: 24px;
  }
  .sb-author__avatar { width: 84px; height: 84px; }
  .sb-author__name { font-size: 22px; line-height: 32px; }
  .sb-author__bio { font-size: 16px; line-height: 26px; }

  .sb-postnav { margin-top: 56px; column-gap: 24px; }
  .sb-navcard__title { font-size: 20px; line-height: 30px; }

  .sb-more { margin-top: 56px; }
  .sb-rcard__thumb { flex: 0 0 240px; height: 126px; }
  .sb-rcard__title { font-size: 20px; line-height: 30px; }
}

/* 모바일: 전부 1열. 배너는 이미지 위 / 문구 아래로 분리. */
@media (max-width: 767px) {
  :root { --pad-x: 20px; }

  .sb-header__logo-image { max-width: 150px; max-height: 42px; }
  .sb-header__logo-text { max-width: 150px; font-size: 18px; }
  .sb-nav__item { height: 32px; padding: 0 14px; font-size: 14px; }
  .sb-lang__item { font-size: 13px; padding: 0 6px; }

  .sb-banner { height: auto; min-height: 0; padding-top: 0; }
  .sb-banner--has-image {
    background-size: 100% auto;
    background-position: top center;
    padding-top: 36.4583vw;
  }
  .sb-banner__inner { display: block; padding-top: 24px; padding-bottom: 32px; }
  .sb-banner__txt { width: 100%; }
  .sb-banner__display { font-size: 30px; line-height: 40px; }
  .sb-banner__headline { font-size: 22px; line-height: 32px; }
  .sb-banner__sub { font-size: 16px; line-height: 26px; }
  .sb-banner__logo { width: 220px; min-height: 0; margin-bottom: 20px; }
  .sb-banner__logo-image { max-width: 100%; height: auto; }
  .sb-banner__logo-text { font-size: 24px; }

  .sb-main { padding-top: 48px; padding-bottom: 48px; }
  .sb-main--archive,
  .sb-main--post,
  .sb-main--search { padding-top: 40px; }

  .sb-intro { margin-bottom: 40px; }
  .sb-intro__title { font-size: 26px; line-height: 34px; }
  .sb-intro__lead,
  .sb-intro__body { font-size: 16px; line-height: 26px; }

  .sb-card--feature .sb-card__title { font-size: 20px; line-height: 28px; -webkit-line-clamp: 2; }
  .sb-card--feature .sb-card__excerpt { font-size: 15px; line-height: 24px; -webkit-line-clamp: 2; }
  .sb-card__cat { left: 14px; bottom: 14px; height: 34px; padding: 0 14px; font-size: 14px; }

  .sb-featured { row-gap: 40px; }
  .sb-featured__side-list { flex-direction: column; gap: 32px; }
  .sb-featured__side-title { font-size: 22px; margin-bottom: 20px; }
  .sb-card--mini .sb-card__title { font-size: 18px; line-height: 26px; }
  .sb-card--mini .sb-card__excerpt { font-size: 14px; line-height: 22px; }

  .sb-searchbar { margin-top: 40px; padding-top: 40px; gap: 16px; }
  .sb-searchbar__logo { width: 160px; }
  .sb-searchbar__logo-image { max-width: 160px; }
  .sb-searchbar__logo-text { font-size: 18px; }
  .sb-searchbar__form { flex-wrap: wrap; gap: 10px; }
  .sb-searchbar__input { height: 48px; padding: 0 20px; font-size: 16px; }
  .sb-searchbar__submit { flex: 1 1 100%; height: 48px; font-size: 16px; }

  .sb-rows { margin-top: 40px; gap: 40px; }
  .sb-row__title { font-size: 22px; }
  .sb-row__more { font-size: 14px; }
  .sb-card--carousel { flex: 0 0 84vw; padding: 14px; border-radius: var(--r-card); }
  .sb-card--carousel .sb-card__title { font-size: 18px; line-height: 26px; }

  .sb-hero__title { font-size: 26px; }
  .sb-hero__desc { font-size: 15px; line-height: 22px; margin-top: 12px; }
  .sb-hero__body { margin-top: 16px; }
  .sb-sort { margin-top: 16px; }

  /* 목록 행은 세로로 쌓는다. DOM 순서가 썸네일 → 본문이라 그대로 내려온다. */
  .sb-card--row { flex-direction: column; align-items: stretch; gap: 15px; }
  .sb-card--row .sb-card__thumb { flex: 0 0 auto; width: 100%; }
  .sb-card--row + .sb-card--row { margin-top: 24px; padding-top: 24px; }
  .sb-card--row .sb-card__title { font-size: 18px; line-height: 26px; -webkit-line-clamp: 2; }
  .sb-card--row .sb-card__excerpt { font-size: 15px; line-height: 23px; }

  .sb-list--grid { grid-template-columns: 1fr; gap: 24px; }
  .sb-card--archive-grid .sb-card__body { padding: 18px 18px 16px; }
  .sb-card--archive-grid .sb-card__title { font-size: calc(20px * var(--type-scale)); line-height: calc(29px * var(--type-scale)); }
  .sb-card--archive-grid .sb-card__excerpt { font-size: calc(15px * var(--type-scale)); line-height: calc(23px * var(--type-scale)); }
  .sb-card--archive-grid .sb-meta { padding-top: 16px; }

  .sb-searchpage { padding: 20px; border-radius: var(--r-box); }
  .sb-result { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .sb-result__thumb { flex: 0 0 auto; width: 100%; height: auto; aspect-ratio: 259 / 136; }
  .sb-result__title { font-size: 17px; line-height: 26px; }

  .sb-crumb { font-size: 13px; margin-bottom: 20px; }
  .sb-post__title { font-size: 24px; line-height: 1.3; }
  .sb-cat { height: 34px; padding: 0 14px; font-size: 14px; }
  .post-content { font-size: 16px; line-height: 26px; }
  .post-content p { font-size: 16px; line-height: 26px; margin-bottom: 24px; }
  .post-content h2 { font-size: 22px; line-height: 1.3; margin: 28px 0; }
  .post-content h3 { font-size: 19px; line-height: 28px; margin: 24px 0 10px; }
  .sb-backlink { font-size: 16px; }

  .post-content aside.post-summary { margin-bottom: 28px; }
  .post-content aside.post-summary .summary-tldr { font-size: 16px; }
  .post-content aside.post-summary .summary-bullets li { font-size: 14px; }
  .post-content .faq-section summary { padding: 14px 16px; font-size: 15px; }
  .post-content .faq-section details > p { padding: 14px 16px 16px; font-size: 15px; }

  .sb-tags { flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 32px; }

  .sb-author { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px; }
  .sb-author__avatar { width: 72px; height: 72px; }
  .sb-author__links { flex-wrap: wrap; gap: 14px; }

  /* 좌우 2열은 320px 폭에서 제목이 한 글자씩 끊긴다. 세로로 쌓고 오른쪽 정렬을 푼다. */
  .sb-postnav { grid-template-columns: 1fr; row-gap: 32px; }
  .sb-postnav__col--next { text-align: left; }
  .sb-postnav__col--next .sb-meta { justify-content: flex-start; }

  .sb-rcard { flex-direction: column; align-items: stretch; gap: 15px; }
  .sb-rcard__thumb { flex: 0 0 auto; width: 100%; height: auto; aspect-ratio: 365 / 191; }
  .sb-rcard__title { font-size: 18px; line-height: 26px; -webkit-line-clamp: 2; }
  .sb-rcard__excerpt { -webkit-line-clamp: 2; }

  .sb-pager { margin-top: 48px; gap: 4px; }

  .sb-footer { padding-bottom: 48px; }
  .sb-footer__bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 13px;
    line-height: 22px;
    padding: 12px 20px;
    border-radius: var(--r-box);
  }
}

/* ---------- administrator typography scale ---------- */

/* Only reading and content hierarchy scale. Navigation, form controls, and
   tight utility metadata retain their calibrated size so the layout stays
   stable at the compact and large presets. */
body { font-size: calc(18px * var(--type-scale)); line-height: calc(28px * var(--type-scale)); }
.sb-banner__display { font-size: calc(46px * var(--type-scale)); line-height: calc(60px * var(--type-scale)); }
.sb-banner__headline { font-size: calc(30px * var(--type-scale)); line-height: calc(40px * var(--type-scale)); }
.sb-banner__sub { font-size: calc(21px * var(--type-scale)); line-height: calc(38px * var(--type-scale)); }
.sb-intro__title { font-size: calc(36px * var(--type-scale)); line-height: calc(46px * var(--type-scale)); }
.sb-intro__lead { font-size: calc(19px * var(--type-scale)); line-height: calc(44px * var(--type-scale)); }
.sb-intro__body { font-size: calc(19px * var(--type-scale)); line-height: calc(28px * var(--type-scale)); }
.sb-card--feature .sb-card__title { font-size: calc(30px * var(--type-scale)); line-height: calc(40px * var(--type-scale)); }
.sb-card--feature .sb-card__excerpt { font-size: calc(20px * var(--type-scale)); line-height: calc(30px * var(--type-scale)); }
.sb-featured__side-title { font-size: calc(28px * var(--type-scale)); }
.sb-card--mini .sb-card__title { font-size: calc(25px * var(--type-scale)); line-height: calc(36px * var(--type-scale)); }
.sb-card--mini .sb-card__excerpt { font-size: calc(15px * var(--type-scale)); line-height: calc(30px * var(--type-scale)); }
.sb-row__title { font-size: calc(32px * var(--type-scale)); }
.sb-card--carousel .sb-card__title { font-size: calc(25px * var(--type-scale)); line-height: calc(36px * var(--type-scale)); }
.sb-card--carousel .sb-card__excerpt { font-size: calc(17px * var(--type-scale)); line-height: calc(27px * var(--type-scale)); }
.sb-hero__title { font-size: calc(42px * var(--type-scale)); }
.sb-hero__desc { font-size: calc(17px * var(--type-scale)); line-height: calc(24px * var(--type-scale)); }
.sb-card--row .sb-card__title { font-size: calc(25px * var(--type-scale)); line-height: calc(36px * var(--type-scale)); }
.sb-card--row .sb-card__excerpt { font-size: calc(18px * var(--type-scale)); line-height: calc(27px * var(--type-scale)); }
.sb-post__title { font-size: calc(40px * var(--type-scale)); }
.post-content,
.post-content p { font-size: calc(18px * var(--type-scale)); line-height: calc(30px * var(--type-scale)); }
.post-content h2 { font-size: calc(34px * var(--type-scale)); }
.post-content h3 { font-size: calc(24px * var(--type-scale)); line-height: calc(36px * var(--type-scale)); }
.post-content h6 { font-size: calc(20px * var(--type-scale)); line-height: calc(30px * var(--type-scale)); }
.sb-rcard__title { font-size: calc(25px * var(--type-scale)); line-height: calc(36px * var(--type-scale)); }
.sb-rcard__excerpt { font-size: calc(16px * var(--type-scale)); }

@media (min-width: 1024px) and (max-width: 1919px) {
  .sb-banner__display { font-size: calc(2.8646vw * var(--type-scale)); line-height: calc(3.6458vw * var(--type-scale)); }
  .sb-banner__headline { font-size: calc(1.8229vw * var(--type-scale)); line-height: calc(2.3438vw * var(--type-scale)); }
  .sb-banner__sub { font-size: calc(1.3021vw * var(--type-scale)); line-height: calc(2.3438vw * var(--type-scale)); }
}

@media (max-width: 1023px) {
  .sb-banner__display { font-size: calc(42px * var(--type-scale)); line-height: calc(54px * var(--type-scale)); }
  .sb-banner__headline { font-size: calc(28px * var(--type-scale)); line-height: calc(38px * var(--type-scale)); }
  .sb-banner__sub { font-size: calc(20px * var(--type-scale)); line-height: calc(34px * var(--type-scale)); }
  .sb-intro__title { font-size: calc(30px * var(--type-scale)); line-height: calc(40px * var(--type-scale)); }
  .sb-intro__lead,
  .sb-intro__body { font-size: calc(18px * var(--type-scale)); line-height: calc(28px * var(--type-scale)); }
  .sb-card--feature .sb-card__title { font-size: calc(26px * var(--type-scale)); line-height: calc(34px * var(--type-scale)); }
  .sb-card--feature .sb-card__excerpt { font-size: calc(17px * var(--type-scale)); line-height: calc(26px * var(--type-scale)); }
  .sb-featured__side-title { font-size: calc(24px * var(--type-scale)); }
  .sb-card--mini .sb-card__title { font-size: calc(22px * var(--type-scale)); line-height: calc(32px * var(--type-scale)); }
  .sb-row__title { font-size: calc(28px * var(--type-scale)); }
  .sb-card--carousel .sb-card__title { font-size: calc(22px * var(--type-scale)); line-height: calc(32px * var(--type-scale)); }
  .sb-card--carousel .sb-card__excerpt { font-size: calc(15px * var(--type-scale)); line-height: calc(24px * var(--type-scale)); }
  .sb-hero__title { font-size: calc(34px * var(--type-scale)); }
  .sb-hero__desc { font-size: calc(16px * var(--type-scale)); line-height: calc(24px * var(--type-scale)); }
  .sb-card--row .sb-card__title { font-size: calc(22px * var(--type-scale)); line-height: calc(32px * var(--type-scale)); }
  .sb-card--row .sb-card__excerpt { font-size: calc(16px * var(--type-scale)); line-height: calc(24px * var(--type-scale)); }
  .sb-post__title { font-size: calc(32px * var(--type-scale)); }
  .post-content,
  .post-content p { font-size: calc(18px * var(--type-scale)); line-height: calc(29px * var(--type-scale)); }
  .post-content h2 { font-size: calc(30px * var(--type-scale)); }
  .post-content h3 { font-size: calc(22px * var(--type-scale)); line-height: calc(32px * var(--type-scale)); }
  .sb-rcard__title { font-size: calc(20px * var(--type-scale)); line-height: calc(30px * var(--type-scale)); }
}

@media (max-width: 767px) {
  .sb-banner__display { font-size: calc(30px * var(--type-scale)); line-height: calc(40px * var(--type-scale)); }
  .sb-banner__headline { font-size: calc(22px * var(--type-scale)); line-height: calc(32px * var(--type-scale)); }
  .sb-banner__sub { font-size: calc(16px * var(--type-scale)); line-height: calc(26px * var(--type-scale)); }
  .sb-intro__title { font-size: calc(26px * var(--type-scale)); line-height: calc(34px * var(--type-scale)); }
  .sb-intro__lead,
  .sb-intro__body { font-size: calc(16px * var(--type-scale)); line-height: calc(26px * var(--type-scale)); }
  .sb-card--feature .sb-card__title { font-size: calc(20px * var(--type-scale)); line-height: calc(28px * var(--type-scale)); }
  .sb-card--feature .sb-card__excerpt { font-size: calc(15px * var(--type-scale)); line-height: calc(24px * var(--type-scale)); }
  .sb-featured__side-title { font-size: calc(22px * var(--type-scale)); }
  .sb-card--mini .sb-card__title { font-size: calc(18px * var(--type-scale)); line-height: calc(26px * var(--type-scale)); }
  .sb-card--mini .sb-card__excerpt { font-size: calc(14px * var(--type-scale)); line-height: calc(22px * var(--type-scale)); }
  .sb-row__title { font-size: calc(22px * var(--type-scale)); }
  .sb-card--carousel .sb-card__title { font-size: calc(18px * var(--type-scale)); line-height: calc(26px * var(--type-scale)); }
  .sb-card--carousel .sb-card__excerpt { font-size: calc(15px * var(--type-scale)); line-height: calc(24px * var(--type-scale)); }
  .sb-hero__title { font-size: calc(26px * var(--type-scale)); }
  .sb-hero__desc { font-size: calc(15px * var(--type-scale)); line-height: calc(22px * var(--type-scale)); }
  .sb-card--row .sb-card__title { font-size: calc(18px * var(--type-scale)); line-height: calc(26px * var(--type-scale)); }
  .sb-card--row .sb-card__excerpt { font-size: calc(15px * var(--type-scale)); line-height: calc(23px * var(--type-scale)); }
  .sb-post__title { font-size: calc(24px * var(--type-scale)); }
  .post-content,
  .post-content p { font-size: calc(16px * var(--type-scale)); line-height: calc(26px * var(--type-scale)); }
  .post-content h2 { font-size: calc(22px * var(--type-scale)); }
  .post-content h3 { font-size: calc(19px * var(--type-scale)); line-height: calc(28px * var(--type-scale)); }
  .sb-rcard__title { font-size: calc(18px * var(--type-scale)); line-height: calc(26px * var(--type-scale)); }
}
