/* 아빠의 도구들 · Apple HIG + Liquid Glass
   원칙
   - 글래스(반투명·블러)는 떠 있는 조작부(탭바·상단 바)에만. 내용 면은 불투명
   - 글자 크기는 iOS 텍스트 스타일 기준: 큰 제목 34 / 제목2 22 / 본문 17 / 보조 15 / 각주 13
   - 터치 영역 44px 이상, 대비 4.5:1 이상
   - 계산기 페이지(layout-raw) 안쪽은 원본 코드 유지, 바깥 틀만 공통 */
:root {
  color-scheme: light dark;
  /* 바탕은 흰색·회색, 브랜드 색은 로고 남색 하나, 포인트는 로고 볼터치 코랄 (아이 관련 강조에만) */
  --bg: #F5F5F7;
  --bg-2: #FAFAFB;
  --surface: #FFFFFF;
  --surface-2: #F2F2F4;
  --pressed: #EBEBEF;
  --label: #1D1D1F;
  --label-2: #424245;
  --label-3: #6E6E73;
  --label-4: #AEAEB2;
  --prose: #2C2C2E;
  --sep: rgba(0, 0, 0, 0.1);
  --fill: rgba(118, 118, 128, 0.12);
  --brand: #0B2C64;
  --on-brand: #FFFFFF;
  --tint: #0B2C64;
  --tint-soft: #EBF0F9;
  --focus: rgba(11, 44, 100, 0.35);
  --accent: #C4402A;
  --accent-soft: #FCEDEA;
  --danger: #D70015;
  --mark: #FFF1B8;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-bar: rgba(250, 250, 252, 0.86);
  --glass-solid: rgba(250, 250, 252, 0.97);
  --glass-hi: rgba(255, 255, 255, 0.9);
  --glass-shine: rgba(255, 255, 255, 0.55);
  --shadow-float: 0 12px 36px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.06);
  --icon-edge: rgba(0, 0, 0, 0.08);
  --r-lg: 22px;
  --r-md: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-2: #0B0B0C;
    --surface: #1C1C1E;
    --surface-2: #2C2C2E;
    --pressed: #2C2C2E;
    --label: #F5F5F7;
    --label-2: #D1D1D6;
    --label-3: #98989D;
    --label-4: #636366;
    --prose: #E5E5EA;
    --sep: rgba(255, 255, 255, 0.12);
    --fill: rgba(118, 118, 128, 0.26);
    --brand: #E3EAF8;
    --on-brand: #0B2C64;
    --tint: #A9C1F5;
    --tint-soft: rgba(169, 193, 245, 0.14);
    --focus: rgba(169, 193, 245, 0.45);
    --accent: #FF8D74;
    --accent-soft: rgba(255, 141, 116, 0.14);
    --danger: #FF453A;
    --mark: rgba(255, 214, 10, 0.3);
    --glass: rgba(36, 36, 38, 0.66);
    --glass-bar: rgba(22, 22, 24, 0.82);
    --glass-solid: rgba(28, 28, 30, 0.97);
    --glass-hi: rgba(255, 255, 255, 0.14);
    --glass-shine: rgba(255, 255, 255, 0.08);
    --shadow-float: 0 12px 36px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-card: none;
    --icon-edge: rgba(255, 255, 255, 0.1);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--label);
  font-family: var(--font); line-height: 1.55; letter-spacing: -0.2px;
  word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--tint); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }

/* ---------- 글래스 재질 ---------- */
.glass, .tabbar, .is-scrolled .topbar, .is-scrolled .navbar {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(190%);
  backdrop-filter: blur(22px) saturate(190%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .tabbar, .is-scrolled .topbar, .is-scrolled .navbar { background: var(--glass-solid); }
}

/* ---------- 하단 탭바 (Liquid Glass) ----------
   아래로 스크롤하면 아이콘만 남기고 작아지고, 위로 올리거나 멈추면 다시 펼쳐짐 */
.tabbar {
  position: fixed; z-index: 50; left: 50%; bottom: calc(14px + var(--safe-b));
  width: min(calc(100% - 32px), 400px); height: var(--tabbar-h); transform: translateX(-50%);
  border-radius: 32px; display: flex; align-items: stretch; gap: 2px; padding: 5px;
  box-shadow: var(--shadow-float), inset 0 0.5px 0 var(--glass-hi), inset 0 0 0 0.5px var(--glass-shine);
  transition: width .45s var(--ease), height .45s var(--ease), bottom .45s var(--ease), box-shadow .3s;
}
.tabbar::before { /* 위쪽 반사광 */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, var(--glass-shine) 0%, transparent 48%);
}
.tabbar a {
  position: relative; flex: 1; min-width: 0; border-radius: 27px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  text-decoration: none; color: var(--label-2); font-size: 11px; font-weight: 600; letter-spacing: -0.1px;
  transition: background .25s, color .25s, transform .2s var(--ease);
}
.tabbar a:active { transform: scale(0.92); }
.tabbar a[aria-current="page"] { color: var(--tint); background: var(--tint-soft); }
.tabbar svg { width: 24px; height: 24px; flex: none; }
.tabbar span { max-height: 16px; overflow: hidden; transition: opacity .25s, max-height .35s var(--ease); }
.tabbar.min { width: min(calc(100% - 32px), 236px); height: 52px; bottom: calc(10px + var(--safe-b)); }
.tabbar.min span { opacity: 0; max-height: 0; }
.tabbar.min svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .tabbar, .tabbar a, .tabbar span { transition: none; } }

/* ---------- 상단 바 ----------
   맨 위에서는 투명, 스크롤하면 글래스 + 가는 선 (iOS scroll edge) */
.topbar {
  position: sticky; top: 0; z-index: 40; height: 60px; padding: 0 max(16px, calc((100% - 760px) / 2 + 20px));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 0.5px solid transparent; transition: background .25s, border-color .25s;
}
.is-scrolled .topbar, .is-scrolled .navbar { background: var(--glass-bar); }
.is-scrolled .topbar { border-bottom-color: var(--sep); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--label); min-height: 44px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 0.5px var(--icon-edge); }
.brand span { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.circle-btn {
  width: 40px; height: 40px; border-radius: 20px; display: flex; align-items: center; justify-content: center; flex: none;
  color: var(--label); background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), inset 0 0 0 0.5px var(--sep);
}
.circle-btn svg { width: 19px; height: 19px; }

.navbar {
  position: sticky; top: 0; z-index: 40; height: 52px; padding: 0 6px;
  display: grid; grid-template-columns: 48px 1fr 48px; align-items: center;
  background: var(--bg); border-bottom: 0.5px solid transparent; transition: background .25s, border-color .25s;
}
.layout-prose .navbar { background: var(--surface); }
.is-scrolled .navbar { border-bottom-color: var(--sep); }
.navbar .nb-btn {
  width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center;
  color: var(--tint); background: transparent; border: 0; padding: 0; cursor: pointer; text-decoration: none;
}
.navbar .nb-btn:active { background: var(--fill); }
.navbar .nb-btn svg { width: 22px; height: 22px; }
.navbar .nb-title { justify-self: center; font-size: 17px; font-weight: 600; color: var(--label); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ---------- 앱 화면 (홈·도구·검색·팁) ---------- */
.screen { max-width: 760px; margin: 0 auto; padding: 8px 20px 32px; display: flex; flex-direction: column; gap: 32px; }
.large-title { margin: 0; font-size: 34px; line-height: 41px; font-weight: 800; letter-spacing: -0.8px; }
.screen > h1 { margin: 0 0 -12px; font-size: 34px; line-height: 41px; font-weight: 800; letter-spacing: -0.8px; }
.subtitle { margin: 6px 0 0; font-size: 15px; color: var(--label-2); line-height: 22px; }
.hero-wash { display: none; }

.sec { display: flex; flex-direction: column; gap: 12px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 4px; }
.sec-head h2 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.4px; }
.sec-head a { font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.sec-meta { font-size: 13px; color: var(--label-3); white-space: nowrap; }
.sec .sub { display: flex; flex-direction: column; gap: 8px; }
.sec .sub + .sub { margin-top: 10px; }
.sec-caption { margin: 0; padding: 0 16px; font-size: 13px; font-weight: 600; color: var(--label-3); }

/* 목록 (inset grouped) */
.group { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 60px;
  text-decoration: none; color: var(--label); position: relative; transition: background .15s;
}
a.row:active { background: var(--pressed); }
@media (hover: hover) { a.row:hover { background: var(--bg-2); } }
.row + .row::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; height: 0.5px; background: var(--sep); }
.row.has-icon + .row.has-icon::before { left: 66px; }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-size: 16.5px; font-weight: 600; line-height: 22px; letter-spacing: -0.3px; }
.row-sub { font-size: 13.5px; color: var(--label-3); line-height: 18px; }
.row-kicker { font-size: 12px; font-weight: 700; color: var(--accent); line-height: 16px; }
.row-chev { width: 15px; height: 15px; color: var(--label-4); flex-shrink: 0; }

/* 도구 아이콘: 주제 색 그라데이션 면 + 도구별 흰 그림 */
.ticon {
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--label); background: var(--surface-2);
}
.ticon svg { width: 21px; height: 21px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px; white-space: nowrap; }
.badge.now { color: var(--tint); background: var(--tint-soft); }
.badge.hot { color: var(--accent); background: var(--accent-soft); }

/* 타일 */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { background: var(--surface); border-radius: 20px; padding: 14px; min-height: 104px; text-decoration: none; color: var(--label); display: flex; flex-direction: column; justify-content: space-between; gap: 10px; transition: transform .2s var(--ease); }
.tile:active { transform: scale(0.97); }
.tile-title { font-size: 15px; font-weight: 600; line-height: 20px; }
.tile-sub { font-size: 13px; color: var(--label-3); line-height: 18px; }
.tile-kicker { font-size: 12px; font-weight: 600; color: var(--label-3); }

/* 칩 */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 4px; margin: 0 -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; height: 36px; padding: 0 15px; border-radius: 18px; border: 0; cursor: pointer;
  background: var(--surface); color: var(--label); font: inherit; font-size: 15px; font-weight: 500;
  box-shadow: inset 0 0 0 0.5px var(--sep); display: inline-flex; align-items: center; text-decoration: none;
}
.chip[aria-pressed="true"] { background: var(--label); color: var(--bg); box-shadow: none; font-weight: 600; }
.chip.mine[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }

/* 카드 · 폼 */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.field-row.three { grid-template-columns: 1.35fr 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--label-3); padding-left: 4px; }
.field label em { font-style: normal; font-weight: 500; color: var(--label-4); }
.input, select.input {
  height: 50px; border-radius: 14px; border: 0; background: var(--bg); box-shadow: none;
  font: inherit; font-size: 17px; font-weight: 600; padding: 0 30px 0 14px; color: var(--label); width: 100%; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--tint); }

/* 버튼: 채움(주요) · 옅은 채움 · 글자 · 닫기 */
.btn {
  height: 50px; border-radius: 25px; border: 0; cursor: pointer; background: var(--brand); color: var(--on-brand);
  font: inherit; font-size: 17px; font-weight: 600; letter-spacing: -0.3px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; padding: 0 22px; transition: transform .15s var(--ease), opacity .15s;
}
.btn:active { transform: scale(0.97); opacity: 0.88; }
.btn svg { width: 19px; height: 19px; }
.btn.block { width: 100%; }
.btn.tinted { background: var(--tint-soft); color: var(--tint); }
.btn.small { height: 34px; padding: 0 16px; border-radius: 17px; font-size: 15px; flex: none; }
.btn.plain { background: transparent; color: var(--tint); height: 44px; padding: 0 8px; font-size: 15px; font-weight: 500; }
.btn.plain.danger { color: var(--danger); }
.link-btn { border: 0; background: none; padding: 10px 4px; margin: -10px -4px; color: var(--tint); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }
.close-btn { width: 30px; height: 30px; border-radius: 15px; border: 0; padding: 0; display: flex; align-items: center; justify-content: center; background: var(--fill); color: var(--label-3); cursor: pointer; flex: none; }
.close-btn svg { width: 13px; height: 13px; }
.note { display: flex; gap: 6px; margin: 0; font-size: 13px; color: var(--label-3); line-height: 18px; }
.note svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }
.fine { margin: 0; padding: 0 4px; font-size: 12.5px; color: var(--label-3); line-height: 18px; }

/* ---------- 홈 ---------- */
.hero-card {
  margin: 0; background: var(--surface); border-radius: 28px; padding: 24px 20px 20px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--shadow-card);
}
.hero-kicker { margin: 0 0 -8px; font-size: 13px; font-weight: 700; color: var(--tint); }
.hero-title { margin: 0; font-size: 26px; line-height: 34px; font-weight: 800; letter-spacing: -0.7px; }
.hero-sub { margin: -6px 0 2px; font-size: 15px; line-height: 22px; color: var(--label-2); }
@media (max-width: 360px) { .hero-title { font-size: 23px; line-height: 30px; } .hero-title br { display: none; } }

.child-head { padding: 4px 4px 0; }
.child-meta { display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: var(--label-2); font-weight: 500; }
.child-head .large-title { margin-top: 2px; }
.day-nudge {
  margin-top: 14px; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 10px 14px 10px 16px;
  border: 0; border-radius: 16px; background: var(--surface); color: var(--tint); font: inherit; font-size: 14.5px; font-weight: 600; line-height: 20px; cursor: pointer; text-align: left;
}
.day-nudge svg { width: 15px; height: 15px; flex: none; }

.week-card { display: flex; flex-direction: column; gap: 16px; }
.week-cap { margin: 0 0 8px; padding: 0 16px; font-size: 13px; font-weight: 600; color: var(--label-3); }
.week-empty { margin: 0; padding: 16px; background: var(--surface); border-radius: var(--r-lg); font-size: 15px; color: var(--label-2); }
.row.ev { align-items: center; }
.ev-tag { flex: none; width: 50px; height: 26px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.ev-tag { background: var(--surface-2); color: var(--label-2); }
.row.ev + .row.ev::before { left: 80px; }
.dday { flex: none; font-size: 15px; font-weight: 700; color: var(--label-2); font-variant-numeric: tabular-nums; }
.dday.soon { color: var(--accent); }
.dday.today { color: var(--accent); }

.install { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: var(--r-lg); padding: 14px 14px 14px 16px; }
.install img { width: 48px; height: 48px; border-radius: 12px; box-shadow: 0 0 0 0.5px var(--icon-edge); flex: none; }
.install-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.install-body strong { font-size: 16px; font-weight: 600; }
.install-body span { font-size: 13.5px; color: var(--label-3); line-height: 18px; }

/* 검색 */
.searchbox { display: flex; align-items: center; gap: 8px; height: 44px; border-radius: 14px; background: var(--fill); padding: 0 12px; color: var(--label-3); text-decoration: none; }
.searchbox svg { width: 17px; height: 17px; flex-shrink: 0; }
.searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: var(--label); }
.searchbox:focus-within { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--tint); }
.empty { padding: 24px 16px; text-align: center; color: var(--label-3); font-size: 15px; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }

/* ---------- 도구 페이지 하단 (다음에 필요한 것) ---------- */
.after-tool { max-width: 760px; margin: 8px auto 0; padding: 0 20px; display: flex; flex-direction: column; gap: 22px; }
.layout-raw .subpage-header { display: none !important; }
#related-tools-root:empty { display: none; }

/* ---------- 글 페이지 ---------- */
.page-prose { max-width: 720px; margin: 0 auto; padding: 20px 20px 24px; background: transparent; }
.layout-prose { background: var(--surface); }
.layout-prose .after-tool .group, .layout-prose .after-tool .tile { background: var(--bg); }
.page-prose a { color: var(--tint); }
.page-prose h1 { font-size: 28px; line-height: 36px; font-weight: 800; letter-spacing: -0.6px; margin: 10px 0 8px; }
.page-prose h2 { font-size: 21px; line-height: 29px; font-weight: 800; margin: 34px 0 10px; }
.page-prose h3 { font-size: 17px; line-height: 24px; font-weight: 700; margin: 24px 0 6px; }
.page-prose p, .page-prose li { font-size: 16.5px; line-height: 1.75; color: var(--prose); }
.page-prose img { height: auto; border-radius: 14px; }
.page-prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; display: block; overflow-x: auto; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--sep); }
.page-prose th, .page-prose td { padding: 10px 12px; border-bottom: 0.5px solid var(--sep); text-align: left; vertical-align: top; }
.page-prose th { background: var(--bg-2); font-weight: 700; color: var(--label-2); }
.page-prose blockquote { margin: 18px 0; padding: 14px 16px; background: var(--surface-2); border-radius: 14px; }
.page-prose pre { white-space: pre-wrap; background: var(--bg); padding: 14px; border-radius: 14px; font-family: inherit; }
.eyebrow { font-size: 13px; font-weight: 700; margin: 6px 0 0; color: var(--tint); }
.eyebrow a { text-decoration: none; }
.post-meta { color: var(--label-3); font-size: 13px; margin: 0 0 18px; }
.sq-image { margin: 20px 0; }
.sq-image figcaption { color: var(--label-3); font-size: 13px; margin-top: 6px; }
.sq-button .btn { color: var(--on-brand) !important; }
.post-tool { background: var(--brand) !important; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0; padding: 14px 16px; border-radius: 18px; background: var(--label); text-decoration: none; color: #fff !important; }
.post-tool span { font-size: 12px; color: var(--on-brand); opacity: .7; }
.post-tool strong { color: var(--on-brand); font-size: 16px; }
.post-body h2 { border-top: 0; }
.post-correction { margin: 34px 0 8px; padding: 16px; border-radius: 18px; background: var(--bg); }
.post-correction p { margin: 6px 0 10px; color: var(--label-2); font-size: 14px; line-height: 21px; }
.post-correction a { font-weight: 700; text-decoration: none; }

/* 팁 목록 */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-top: 16px; }
.post-card { display: flex; flex-direction: column; text-decoration: none; color: var(--label) !important; background: var(--surface); border-radius: 18px; overflow: hidden; }
.layout-prose .post-card { background: var(--bg); }
.post-card img, .post-thumb-fallback { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-radius: 0; }
.post-thumb-fallback { display: flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--tint); font-weight: 800; font-size: 1.05rem; }
.post-card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.post-card-body strong { font-size: 16px; line-height: 22px; }
.post-date { font-size: 12px; color: var(--label-3); }
.post-excerpt { font-size: 14px; color: var(--label-3); line-height: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 푸터 ----------
   브랜드 / 많이 쓰는 도구 / 읽을거리 / 소통 / 안내 — 휴대폰 2열, 넓은 화면 4열 */
.site-footer { background: var(--surface); border-top: 0.5px solid var(--sep); margin-top: 16px; }
.layout-prose .site-footer { background: var(--bg-2); }
.ft-inner { max-width: 760px; margin: 0 auto; padding: 32px 20px calc(var(--tabbar-h) + 48px + var(--safe-b)); display: flex; flex-direction: column; gap: 28px; }
.ft-brand p { margin: 10px 0 0; font-size: 14px; line-height: 21px; color: var(--label-3); max-width: 420px; }
.ft-brand .brand img { width: 30px; height: 30px; border-radius: 8px; }
.ft-brand .brand span { font-size: 18px; }
.ft-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
@media (min-width: 700px) { .ft-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.ft-h { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--label); letter-spacing: -0.1px; }
.ft-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ft-col a { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; font-size: 14px; color: var(--label-2); text-decoration: none; }
@media (hover: hover) { .ft-col a:hover { color: var(--tint); } }
.ft-col svg { width: 16px; height: 16px; color: var(--label-3); flex: none; }
.ft-bottom { border-top: 0.5px solid var(--sep); padding-top: 18px; display: flex; flex-direction: column; gap: 6px; }
.ft-bottom p { margin: 0; font-size: 12px; line-height: 18px; color: var(--label-3); }

.screen .post-list { margin-top: 0; }

/* ---------- 계산기 안쪽 공통 다듬기 (layout-raw) ----------
   색·모서리는 빌드 때 theme.mjs가 바꾸고, 여기서는 터치 영역·입력칸·포커스만 HIG에 맞춘다 */
.layout-raw .journey-container { font-family: var(--font); }
.layout-raw .journey-container input[type="text"],
.layout-raw .journey-container input[type="number"],
.layout-raw .journey-container input[type="date"],
.layout-raw .journey-container input[type="month"],
.layout-raw .journey-container select { min-height: 48px; font-size: 17px; }
.layout-raw .journey-container button { min-height: 44px; }
.layout-raw .journey-container input:focus-visible,
.layout-raw .journey-container select:focus-visible,
.layout-raw .journey-container button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.layout-raw .page-raw { padding-top: 12px; }

/* ---------- 계산기: 답 먼저 ----------
   입력칸과 결과를 제목 바로 아래로, 긴 설명 박스(answer-box)는 결과 아래로. 순서만 바꾸고 글은 그대로 */
.layout-raw .page-header { text-align: left !important; padding: 8px 4px 4px !important; margin-bottom: 8px !important; }
.layout-raw .page-header .badge { display: none !important; }
.layout-raw .page-header h1 { font-size: 26px !important; line-height: 1.25 !important; letter-spacing: -0.02em; margin: 0 0 6px !important; text-align: left !important; }
.layout-raw .page-header p { font-size: 15px !important; line-height: 1.5 !important; color: var(--label-2) !important; text-align: left !important; margin: 0 !important; }
.layout-raw .tool-hero, .layout-raw .tool-hero .tab-panel.active { display: flex !important; flex-direction: column; }
.layout-raw .tool-hero > *, .layout-raw .tool-hero .tab-panel > * { order: 2; }
.layout-raw .tool-hero > .tab-nav { order: 0; }
.layout-raw .tool-hero .tool-title, .layout-raw .tool-hero .tool-desc { order: 1; }
.layout-raw .tool-hero .answer-box { order: 9; margin-top: 16px; }
.layout-raw .result-slot { scroll-margin-top: 80px; }

/* 계산기 자동 채움 안내 */
.fill-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 0; font-size: 13px; color: var(--tint); font-weight: 600; }
.fill-note button { border: 0; background: none; padding: 4px 0; color: var(--label-3); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.save-child { margin: 10px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--tint-soft); display: flex; gap: 10px; align-items: center; font-size: 14px; line-height: 20px; color: var(--label-2); }
.save-child span { flex: 1; }
.layout-raw .link-pending { display: none; }
/* 추가 블록 표의 작은 보조 글자 (tb-sub) — 블록을 붙인 계산기 페이지 공통 */
.layout-raw .tb-sub { display: block; font-size: 11px; font-weight: 400; color: var(--label-3); margin-top: 1px; }

/* ---------- 로봇 도안 (/print 페이지 + 계산기 하단 카드: scripts/print.mjs) ---------- */
.pp-card { max-width: 760px; margin: 24px auto 8px; padding: 20px; box-sizing: border-box; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-card); font-family: var(--font); }
.layout-raw .pp-card { width: calc(100% - 40px); }
.pp-head h2 { margin: 0; font-size: 19px; line-height: 26px; font-weight: 700; color: var(--label); letter-spacing: -0.01em; }
.pp-head p { margin: 6px 0 0; font-size: 15px; line-height: 22px; color: var(--label-3); }
.pp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
@media (min-width: 640px) { .pp-level .pp-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.pp-tile { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
.pp-tile img { display: block; width: 100%; height: auto; aspect-ratio: 210 / 297; object-fit: cover; background: #fff; border-radius: 10px; border: 1px solid var(--sep); }
.pp-tile:active img { transform: scale(0.98); }
.pp-t { margin-top: 4px; font-size: 14px; line-height: 19px; font-weight: 600; color: var(--label); }
.pp-m { font-size: 12px; line-height: 16px; color: var(--label-3); }
.pp-dl { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--tint); }
.pp-more { display: block; margin-top: 16px; padding: 13px 16px; text-align: center; font-size: 15px; font-weight: 600; color: var(--tint); background: var(--fill); border-radius: 12px; text-decoration: none; }
.pp-interest { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--sep); }
.pp-interest p { margin: 0 0 10px; font-size: 14px; line-height: 20px; color: var(--label-2); }
.pp-interest .pp-thanks { margin: 10px 0 0; color: var(--tint); font-weight: 600; }
.pp-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; font: 600 15px/1 var(--font); color: var(--on-brand); background: var(--brand); border: 0; border-radius: 12px; cursor: pointer; text-decoration: none; }
.pp-btn[disabled] { opacity: 0.5; cursor: default; }
.pp-btn-ghost { color: var(--tint); background: var(--fill); }
.pp-level { margin-top: 32px; }
.pp-level-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pp-level-h h2 { margin: 0; }
.pp-level-h h2 span { display: block; margin-top: 2px; font-size: 14px; font-weight: 500; color: var(--label-3); }
.page-prose > .pp-interest { margin-top: 32px; }
.pp-crumbs { font-size: 13px; line-height: 18px; color: var(--label-3); margin-bottom: 8px; }
.pp-crumbs a { color: var(--label-3); text-decoration: none; }
.pp-note { font-size: 14px; color: var(--label-3); }
.pp-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 20px 0; }
.pp-pack { display: flex; flex-direction: column; gap: 4px; padding: 14px; background: var(--bg); border-radius: var(--r-md); text-decoration: none; color: inherit; }
.pp-pack-imgs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 6px; }
.pp-pack-imgs img { width: 100%; height: auto; aspect-ratio: 210 / 297; background: #fff; border-radius: 8px; border: 1px solid var(--sep); }
.pp-pack .pp-t { font-size: 16px; }
.pp-sheet { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 20px 0 8px; }
@media (min-width: 640px) { .pp-sheet { grid-template-columns: 300px 1fr; align-items: start; } }
.pp-preview img { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; aspect-ratio: 210 / 297; background: #fff; border: 1px solid var(--sep); border-radius: 12px; box-shadow: var(--shadow-card); }
.pp-info > .pp-btn { width: 100%; min-height: 50px; font-size: 16px; }
.pp-dl-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 18px 0 12px; font-size: 15px; line-height: 22px; }
.pp-dl-list dt { color: var(--label-3); white-space: nowrap; }
.pp-dl-list dd { margin: 0; color: var(--label); }
.pp-dl-list dd span { font-size: 13px; color: var(--label-3); }
.pp-table-wrap { overflow-x: auto; margin: 12px 0; }
.pp-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.pp-table th, .pp-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--sep); }
.pp-table th { font-size: 13px; font-weight: 600; color: var(--label-3); }
.pp-level .pp-tile .pp-t { font-size: 13px; }

/* ---------- 홈: 빠른 도구 타일 · 도안 띠 · 팁 카드 · 주제별 링크 ---------- */
.qt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .qt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.qt { display: flex; flex-direction: column; gap: 4px; padding: 16px; min-height: 132px; background: var(--surface); border-radius: var(--r-lg); text-decoration: none; color: var(--label); transition: transform .2s var(--ease); }
.qt:active { transform: scale(0.97); }
.qt .ticon { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 8px; color: var(--tint); background: var(--tint-soft); }
.qt-title { font-size: 16px; font-weight: 700; line-height: 21px; letter-spacing: -0.3px; }
.qt-sub { font-size: 13px; line-height: 18px; color: var(--label-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.hp-sub { margin: -6px 0 0; padding: 0 4px; font-size: 15px; color: var(--label-3); }
.hp-strip, .tc-strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 6px; scroll-padding: 0 20px; }
.hp-strip::-webkit-scrollbar, .tc-strip::-webkit-scrollbar { display: none; }
.hp-tile { flex: 0 0 132px; display: flex; flex-direction: column; gap: 3px; scroll-snap-align: start; text-decoration: none; color: var(--label); }
.hp-tile[hidden] { display: none; }
.hp-tile img { width: 132px; height: auto; aspect-ratio: 210 / 297; object-fit: cover; background: #fff; border-radius: 14px; box-shadow: var(--shadow-card); margin-bottom: 6px; transition: transform .2s var(--ease); }
.hp-tile:active img { transform: scale(0.97) rotate(-1deg); }
.hp-age { font-size: 12px; font-weight: 700; color: var(--accent); }
.hp-t { font-size: 14px; font-weight: 600; line-height: 19px; }
.hp-all { justify-content: center; align-items: center; height: calc(132px * 297 / 210); background: var(--tint-soft); border-radius: 14px; color: var(--tint); font-size: 15px; font-weight: 700; line-height: 22px; text-align: center; }

.tc { flex: 0 0 248px; display: flex; flex-direction: column; scroll-snap-align: start; background: var(--surface); border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--label); }
.tc img, .tc-fallback { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.tc-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 16px; }
.tc-title { font-size: 15.5px; font-weight: 600; line-height: 21px; letter-spacing: -0.2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tp-box { background: var(--surface); border-radius: var(--r-lg); padding: 6px 16px; }
.tp-row { padding: 14px 0; }
.tp-row + .tp-row { border-top: 1px solid var(--sep); }
.tp-name { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--label); }
.tp-name svg { width: 18px; height: 18px; color: var(--tint); }
.tp-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-links a { padding: 8px 12px; font-size: 14px; font-weight: 500; line-height: 18px; color: var(--label); background: var(--surface-2); border-radius: 999px; text-decoration: none; }
.tp-links a:active { background: var(--tint-soft); }

/* 계산기·글 본문 어두운 화면 색 (빌드 때 자동 생성: scripts/theme.mjs) */
@media (prefers-color-scheme: dark){:root{--k-w:44,44,46;--k-0284c7:#8bcdee;--k-0369a1:#8bcbee;--k-059669:#8beed0;--k-0a2550:#c3d4f8;--k-0b2c64:#a9c1f5;--k-0f766e:#8beee7;--k-10b981:#8beecd;--k-111111:#ededed;--k-14532d:#94e5b4;--k-15803d:#8decb1;--k-166534:#92e7b2;--k-16a34a:#8beeb0;--k-1c1917:#e8e8e8;--k-1d1d1f:#e5e5e5;--k-1e3a8a:#92a8e7;--k-222222:#e3e3e3;--k-292524:#e0e0e0;--k-2a4f96:#8eaaea;--k-2c3e50:#a9bdd0;--k-333333:#d9d9d9;--k-34495e:#aabdd0;--k-3730a3:#9d99e1;--k-38bdf8:#51bcec;--k-424245:#cfcfcf;--k-431407:#eea18b;--k-44403c:#d1d1d1;--k-444444:#cfcfcf;--k-48484a:#cccccc;--k-555555:#c4c4c4;--k-60a5fa:#2e496b;--k-666666:#bababa;--k-6b7280:#959ba7;--k-6e6e73:#b4b4b4;--k-713f12:#edba8d;--k-78716c:#b3b3b3;--k-854d0e:#eec08b;--k-86198f:#e48eeb;--k-888888:#878787;--k-8e8e93:#808080;--k-92400e:#eeb18b;--k-9333ea:#a251ec;--k-9a3412:#eea48b;--k-9ca3af:#444a55;--k-9f1239:#ee8ba6;--k-a16207:#eec68b;--k-a21caf:#e48ded;--k-a855f7:#4d2e6b;--k-aaaaaa:#696969;--k-b45309:#eeb68b;--k-b91c1c:#ee8c8c;--k-bae6fd:#152c37;--k-bbf7d0:#2e6b43;--k-be123c:#ee8ba3;--k-be185d:#ee8bb4;--k-c026d3:#d35be1;--k-c3d0ea:#2c3e66;--k-c7d2fe:#151c37;--k-cccccc:#4a4a4a;--k-ccfbf1:#153730;--k-d1d1d6:#434343;--k-dc2626:#e45858;--k-dce4f4:#1c2a48;--k-dcfce7:#153721;--k-dddddd:#3b3b3b;--k-e0e7ff:#151d37;--k-e0f2fe:#152a37;--k-e11d48:#e95374;--k-e4e4e7:#333333;--k-e5e5ea:#313131;--k-ea580c:#ec8651;--k-eae4d8:#322a1b;--k-eaeaea:#2f2f2f;--k-eeeeee:#2b2b2b;--k-eef2fa:#16213a;--k-eef2ff:#242424;--k-ef4444:#ec5151;--k-f0eadd:#352c17;--k-f0f9ff:#232323;--k-f0fdf4:#242424;--k-f2f2f2:#282828;--k-f2f2f4:#272727;--k-f3eee6:#2d2d2d;--k-f4f4f5:#252525;--k-f5d0fe:#311537;--k-f7f7f9:#222222;--k-f7f9fa:#222222;--k-f8f9fa:#212121;--k-f97316:#ec9051;--k-f9f9f9:#212121;--k-fae8ff:#301537;--k-fafafa:#212121;--k-fb0000:#ec5151;--k-fce7f3:#371529;--k-fcfdfe:#1e1e1e;--k-fde68a:#6b5f2e;--k-fdf4ff:#212121;--k-fdfbf7:#212121;--k-fecdd3:#371519;--k-fed7aa:#6b4f2e;--k-fee2e2:#371515;--k-fef08a:#6b642e;--k-fef2f2:#222222;--k-fef3c7:#373115;--k-fefce8:#373415;--k-ffe4e6:#371518;--k-ffedd5:#372915;--k-fff1f2:#222222;--k-fff7ed:#372815;--k-fffbeb:#373115;--k-ffffff:#1c1c1e}}
