/* shell.css — 모듈(PDF·사진) 페이지용 공통 틀: 원본 style.css 일부 + shell-extra.css + hub.css */
/* 쉬운계산 · EasyCalc - 공통 스타일
   라이트 테마 / 네이비 텍스트 + 틸 강조 / 시스템 폰트 */

:root {
  --navy-900: #0b1f3a;
  --navy-800: #12294a;
  --navy-700: #1d3b63;
  --navy-500: #3d5a80;
  --muted: #5a6a7d;
  --teal-700: #0b6169;
  --teal-600: #0e7d86;
  --teal-500: #12959f;
  --teal-050: #e8f4f4;
  /* 따뜻한 회백색 바탕 — 순백보다 눈이 덜 피로하고 카드가 또렷하게 떠 보입니다. */
  --bg: #f7f6f2;
  --bg-tint: #eef1f0;
  --surface: #ffffff;
  --line: #e3e2dc;
  --line-strong: #cfcec6;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --ok: #1a6b4a;

  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.05), 0 1px 1px rgba(11, 31, 58, 0.03);
  --shadow: 0 10px 28px -12px rgba(11, 31, 58, 0.22), 0 2px 6px rgba(11, 31, 58, 0.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", "맑은 고딕",
    "Apple SD Gothic Neo", "Noto Sans KR", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, "D2Coding", monospace;
  --container: 1080px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  /* 위쪽에만 아주 옅은 틸 기운을 깔아 머리말과 본문을 자연스럽게 나눕니다. */
  background: var(--bg) linear-gradient(180deg, var(--bg-tint) 0%, var(--bg) 420px) no-repeat;
  color: var(--navy-900);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  color: var(--navy-900);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 {
  font-size: 1.9rem;
}
h2 {
  font-size: 1.22rem;
}
h3 {
  font-size: 1.02rem;
}

/* 숫자가 섞인 칸은 자리를 고정해 줄이 흔들리지 않게 합니다. */
.result-value,
.detail-list dd,
td.num,
th.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--teal-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--teal-600);
}

:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-900);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}

.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* ---------------- 헤더 / 내비게이션 ---------------- */

.site-header {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  font-weight: 700;
  font-size: 1.14rem;
  letter-spacing: -0.02em;
  color: var(--navy-900);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.brand-mark {
  display: block;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(14, 125, 134, 0.3);
}

.brand-name {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.brand-separator {
  color: var(--teal-700);
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--navy-700);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  transition: background 0.14s ease, color 0.14s ease;
}

.site-nav a:hover {
  background: var(--teal-050);
  color: var(--teal-700);
}

.site-nav a[aria-current="page"] {
  background: var(--navy-900);
  color: #fff;
  font-weight: 600;
}

.site-nav a[aria-current="page"]:hover {
  background: var(--navy-800);
  color: #fff;
}


/* ---------------- 푸터 ---------------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 26px 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  align-items: center;
}

.site-footer ul {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--navy-700);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--teal-700);
  text-decoration: underline;
}

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


/* ================================================================
   모듈 페이지(PDF·사진)용 틀 보충. shell.css 에만 들어간다.
   shell.css = 원본 style.css 의 기본·머리말·바닥글 부분 + 이 파일 + hub.css
   (계산기 컴포넌트 규칙 .card/.btn/.field 등은 넣지 않아 모듈 화면과 섞이지 않는다.)
   ================================================================ */

main {
  display: block;
  padding: 20px 0 48px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 6px;
  color: var(--line-strong);
}

@media (max-width: 640px) {
  .container {
    padding: 0 14px;
  }

  main {
    padding: 12px 0 36px;
  }

  .site-header .container {
    min-height: 54px;
    gap: 10px;
  }

  .brand {
    font-size: 1.05rem;
  }
}

@media (max-width: 400px) {
  .container {
    padding: 0 12px;
  }
}

/* ================================================================
   GlyPop 도구 / GlyPop Tools — 공통 사이트 층
   빌드 때 vendor/life-calculators/assets/css/style.css 뒤에 이어 붙습니다.
   원본의 입력·버튼·결과·탭 컴포넌트는 그대로 쓰고, 여기서는
   흰 바탕 기준, 사이트 머리말(영역 메뉴·언어 전환), 홈, 상태 표시만 더합니다.
   ================================================================ */

:root {
  --bg: #ffffff;
  --bg-tint: #ffffff;
  --planned: #6b5a1e;
  --planned-bg: #fbf5e1;
  --planned-line: #e8dcae;
}

body {
  background: #ffffff;
}

/* ---------------- 머리말 ---------------- */

.brand-mark {
  box-shadow: none;
}

.site-nav .nav-note {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--planned);
  margin-left: 4px;
}

.site-nav a[aria-current="page"] .nav-note {
  color: #f3e7b8;
}

.site-nav .nav-ext-icon svg {
  width: 13px;
  height: 13px;
  margin-left: 4px;
  vertical-align: -1px;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--navy-700);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.lang-toggle:hover {
  border-color: var(--teal-500);
  background: var(--teal-050);
  color: var(--teal-700);
}

.lang-toggle svg {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

/* 머리말은 항상 두 줄: 브랜드 + 언어 전환, 그 아래 영역 메뉴.
   영역 이름이 길어도 언어 전환이 밀려나지 않는다. 좁은 화면에서 메뉴는 가로로 밀어 본다. */
.site-header .brand {
  order: 1;
}

.site-header .lang-toggle {
  order: 2;
  margin-left: auto;
}

.site-header .site-nav {
  order: 3;
  margin-left: 0;
  width: 100%;
}

.site-header .site-nav ul {
  gap: 2px;
}

@media (max-width: 900px) {
  .site-header .site-nav {
    overflow-x: auto;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
  }

  .site-header .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-header .site-nav ul {
    flex-wrap: nowrap;
  }

  .site-header .site-nav a {
    white-space: nowrap;
  }
}

/* ---------------- 상태 표시 ---------------- */

.status-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.status-badge--live {
  background: var(--teal-050);
  color: var(--teal-700);
}

.status-badge--planned {
  background: var(--planned-bg);
  color: var(--planned);
  border: 1px solid var(--planned-line);
}

.hub-notice {
  border: 1px solid var(--planned-line);
  background: var(--planned-bg);
  color: var(--navy-900);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 18px;
}

.hub-notice p {
  margin: 0;
}

.hub-notice p + p {
  margin-top: 6px;
}

/* ---------------- 생활계산 도구 사이 이동 ---------------- */

.tool-subnav {
  margin: 0 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tool-subnav::-webkit-scrollbar {
  display: none;
}

.tool-subnav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0 0 2px;
}

.tool-subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy-700);
  text-decoration: none;
  font-size: 0.88rem;
  white-space: nowrap;
}

.tool-subnav a:hover {
  border-color: var(--teal-500);
  color: var(--teal-700);
}

.tool-subnav a[aria-current="page"] {
  background: var(--teal-700);
  border-color: var(--teal-700);
  color: #fff;
  font-weight: 600;
}

/* ---------------- 홈 ---------------- */

.home-head {
  margin: 4px 0 18px;
}

.home-head h1 {
  font-size: clamp(1.45rem, 4.2vw, 2rem);
  margin-bottom: 6px;
}

.home-head p {
  color: var(--muted);
  margin: 0;
  max-width: 64ch;
}

.search {
  margin: 0 0 26px;
}

.search label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.search input[type="search"] {
  width: 100%;
  max-width: 560px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--navy-900);
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.search input[type="search"]:focus {
  outline: 3px solid var(--teal-500);
  outline-offset: 1px;
  border-color: var(--teal-600);
}

.search-status {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.search-results {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  max-width: 560px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.search-results li + li {
  border-top: 1px solid var(--line);
}

.search-results a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  color: var(--navy-900);
  text-decoration: none;
}

.search-results a:hover {
  background: var(--teal-050);
}

.search-results .result-cat {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.category-grid {
  display: grid;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.category-grid--minor .tool-card {
  padding: 16px 18px;
}

.tool-card--planned {
  background: #fcfcfb;
  border-style: dashed;
}

.tool-card--planned .tool-card__icon {
  background: #f1f1ee;
  color: var(--muted);
}

.tool-card--planned:hover .tool-card__icon {
  background: #e6e5df;
  color: var(--navy-700);
}

.tool-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.feature-list {
  margin: 8px 0 0;
  padding-left: 1.2em;
}

.feature-list li {
  margin: 4px 0;
}

.home-jump {
  margin: 0 0 24px;
}

.home-jump h2 {
  font-size: 1.05rem;
  margin: 0 0 10px;
}

.home-jump h3 {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 14px 0 8px;
}

@media (max-width: 640px) {
  /* 아직 쓸 수 없는 영역 카드는 좁은 화면에서 설명을 줄여 스크롤을 줄인다. */
  .tool-card--planned p {
    display: none;
  }

  .home-jump {
    margin-bottom: 18px;
  }

  /* 좁은 화면에서는 입력을 먼저 보이도록 도구 사이 이동 줄을 숨긴다.
     같은 이동은 위치 표시(생활계산)와 아래 "다른 생활계산 도구" 카드가 맡는다. */
  .tool-subnav:not(.tool-subnav--module) {
    display: none;
  }

  .home-head {
    margin: 0 0 12px;
  }

  .search {
    margin-bottom: 18px;
  }

  .category-grid {
    gap: 10px;
  }
}

@media print {
  .lang-toggle,
  .tool-subnav {
    display: none;
  }
}

.search-empty {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

/* 추첨·모임: 도구 자체 머리말·도구 막대가 화면 위에 붙어 있도록 설계되어 있어,
   이 페이지에서는 공통 머리말이 함께 붙지 않고 스크롤되게 한다(겹침 방지). */
body[data-tool="random"] > .site-header {
  position: static;
}

/* ================================================================
   시각 정리 (2026-09-30): 공통 토큰 · 영역 강조색 · 카드 · 움직임
   - 흰/아주 옅은 아이보리 바탕, 진한 잉크 제목, 청록 주색
   - 영역 강조색은 아이콘·작은 표시에만 절제해서 쓴다
   - 움직임: 150~220ms, 2~4px 이하. prefers-reduced-motion 에서는 끈다
   ================================================================ */
:root {
  --ivory: #fcfbf8;
  --ink: #0b1f3a;
  --ease: 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --lift: translateY(-3px);
  --card-radius: 16px;
  --card-border: #e6e4dd;
  --card-shadow: 0 1px 2px rgba(11, 31, 58, 0.05);
  --card-shadow-hover: 0 12px 26px -14px rgba(11, 31, 58, 0.28), 0 2px 6px rgba(11, 31, 58, 0.06);
  --area: #0e7d86;
  --area-tint: #e8f4f4;
}
.area--pdf { --area: #c8503a; --area-tint: #fcebe6; }
.area--image { --area: #2d68c4; --area-tint: #e8f0fb; }
.area--calculators { --area: #b07a0c; --area-tint: #fbf1dc; }
.area--text { --area: #6f4bc4; --area-tint: #f0eafb; }
.area--random { --area: #c23f7c; --area-tint: #fbe8f1; }
.area--focus { --area: #23866a; --area-tint: #e3f4ee; }

body { background: #ffffff; }

/* 영역 메뉴의 작은 색 표시 */
.nav-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--area);
  vertical-align: 1px;
}

/* ---------------- 홈 ---------------- */
.home-head h1 { letter-spacing: -0.025em; }

.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.trust-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--ivory);
  border: 1px solid var(--card-border);
  font-size: 0.86rem;
  color: var(--navy-700);
}
.trust-list svg { width: 15px; height: 15px; color: var(--teal-700); flex: none; }

.area-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
}
@media (max-width: 960px) { .area-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .area-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

.area-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  padding: 20px 20px 18px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.area-card:hover,
.area-card:focus-within {
  transform: var(--lift);
  border-color: color-mix(in srgb, var(--area) 45%, var(--card-border));
  box-shadow: var(--card-shadow-hover);
}
.area-card__top { display: flex; align-items: center; gap: 12px; }
.area-card__icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: var(--area-tint);
  color: var(--area);
}
.area-card__icon svg { width: 24px; height: 24px; }
.area-card h2 { margin: 0; font-size: 1.12rem; }
.area-card__link { color: var(--ink); text-decoration: none; }
/* 카드 전체가 눌리도록 (안의 작은 링크는 위에 올린다) */
.area-card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--card-radius); }
.area-card__link:focus-visible { outline: none; }
.area-card:has(.area-card__link:focus-visible) { outline: 3px solid var(--teal-500); outline-offset: 2px; }
.area-card__desc { margin: 0; color: var(--muted); font-size: 0.93rem; line-height: 1.55; }
.area-card__chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 2px 0 0; padding: 0; }
.area-card__chips a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--area-tint);
  color: color-mix(in srgb, var(--area) 80%, #000);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--ease), color var(--ease);
}
.area-card__chips a:hover,
.area-card__chips a:focus-visible { background: var(--area); color: #fff; }
.area-card__cta {
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--teal-700);
}
.area-card__cta span { display: inline-block; transition: transform var(--ease); }
.area-card:hover .area-card__cta span,
.area-card:focus-within .area-card__cta span { transform: translateX(3px); }

/* 빠른 도구 선택: 영역별 대표 도구 몇 개만 */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
}
@media (max-width: 960px) { .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quick-grid a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.quick-grid a:hover,
.quick-grid a:focus-visible { transform: translateY(-2px); border-color: color-mix(in srgb, var(--area) 45%, var(--card-border)); box-shadow: var(--card-shadow-hover); }
.quick-grid__icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  background: var(--area-tint);
  color: var(--area);
}
.quick-grid__icon svg { width: 18px; height: 18px; }
.quick-grid__text { display: flex; flex-direction: column; min-width: 0; }
.quick-grid__name { font-weight: 700; font-size: 0.93rem; line-height: 1.3; }
.quick-grid__area { font-size: 0.78rem; color: var(--muted); }

/* 공통 카드(계산기 목록 등)도 같은 규칙으로 */
.tool-card { border-radius: var(--card-radius); border-color: var(--card-border); transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease); }
.tool-card:focus-visible { transform: var(--lift); box-shadow: var(--card-shadow-hover); }
.btn, .lang-toggle, .tool-subnav a, .related a { transition: background var(--ease), color var(--ease), border-color var(--ease), transform var(--ease); }
.btn:active { transform: translateY(1px); }

/* 첫 화면 등장: CSS 만 쓰므로 스크립트가 없어도 내용은 보인다 */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: hub-rise 220ms ease-out both; }
  .rise-2 { animation-delay: 40ms; }
  .rise-3 { animation-delay: 80ms; }
  .rise-4 { animation-delay: 120ms; }
}
@keyframes hub-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .area-card, .quick-grid a, .tool-card, .area-card__cta span { transition: none; }
  .area-card:hover, .area-card:focus-within, .quick-grid a:hover, .quick-grid a:focus-visible, .tool-card:hover { transform: none; }
}
.area-card__tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--area-tint);
  color: color-mix(in srgb, var(--area) 80%, #000);
  font-size: 0.84rem;
  font-weight: 600;
}

/* ------------------------------------------------------------------ *
 * 그림 카드 (src/art.mjs 의 코드 SVG) — 색은 영역 색(--area/--area-tint)에서
 * ------------------------------------------------------------------ */
.art { display: block; width: 100%; height: 100%; overflow: visible; }
.art text { font-family: inherit; font-weight: 700; }
.art .art-num { font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.art-paper { fill: color-mix(in srgb, var(--area-tint) 45%, #fff); }
.art-tint { fill: color-mix(in srgb, var(--area) 20%, #fff); }
.art-fill { fill: var(--area); }
.art-fill-text { fill: color-mix(in srgb, var(--area) 82%, #000); font-weight: 800; }
.art-on-fill { fill: #fff; }
.art-ink { fill: var(--ink); }
.art-ink-fill { fill: var(--ink); }
.art-muted { fill: #53627a; }
.art-card { fill: #fff; stroke: color-mix(in srgb, var(--area) 28%, #d6dde6); stroke-width: 1.5; }
.art-chip { fill: #fff; stroke: #d6dde6; stroke-width: 1.5; }
.art-tag { fill: #fff; stroke: var(--area); stroke-width: 2; }
.art-key { fill: #fff; opacity: 0.88; }
.art-dot { fill: #cfd6df; }
.art-ring, .art-hub { fill: var(--ink); }
.art-sun { fill: #f2b84b; }
.art-line, .art-arrow, .art-strike, .art-bracket, .art-dash, .art-flag-pole, .art-tick, .art-hand, .art-sum,
.art-up, .art-crop, .art-check, .art-rim, .art-tint-ring, .art-progress { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.art-line { stroke: #c5ced9; stroke-width: 3; }
.art-arrow, .art-up, .art-check { stroke: var(--area); stroke-width: 3; }
.art-strike { stroke: #b3261e; stroke-width: 2; }
.art-bracket { stroke: #8a97a8; stroke-width: 2; }
.art-dash { stroke: #d6dde6; stroke-width: 2; stroke-dasharray: 4 4; }
.art-flag-pole, .art-sum { stroke: var(--ink); stroke-width: 2.5; }
.art-tick { stroke: #7d8a9c; stroke-width: 1.6; }
.art-hand { stroke: var(--ink); stroke-width: 3.5; }
.art-hand--fill { stroke: var(--area); }
.art-crop { stroke: var(--ink); stroke-width: 3; }
.art-rim { stroke: var(--ink); stroke-width: 3; }
.art-wedge--0 { fill: var(--area); }
.art-wedge--1 { fill: color-mix(in srgb, var(--area) 55%, #fff); }
.art-wedge--2 { fill: color-mix(in srgb, var(--area) 22%, #fff); }
.art-tint-ring { stroke: color-mix(in srgb, var(--area) 18%, #fff); stroke-width: 10; }
.art-progress { stroke: var(--area); stroke-width: 10; }

/* 홈 영역 카드: 위쪽 그림 띠 */
.area-card__art {
  height: 124px;
  margin: -6px -6px 2px;
  padding: 8px 14px 4px;
  border-radius: 12px;
  background: var(--area-tint);
}
.area-card__art .art { transition: transform var(--ease); }
.area-card:hover .area-card__art .art,
.area-card:focus-within .area-card__art .art { transform: translateY(-2px); }

/* 생활계산 목록: 계산기마다 그림 카드 */
.tool-grid .calc-card { display: flex; flex-direction: column; gap: 6px; }
.calc-card__art {
  display: block;
  height: 150px;
  margin: 0 0 8px;
  padding: 6px;
  border-radius: 12px;
  background: var(--area-tint);
}
.calc-card h2 { margin: 0; }
.calc-card p { flex: 1 1 auto; }
.calc-card__cta {
  margin-top: 4px;
  font-weight: 700;
  font-size: 0.92rem;
  color: color-mix(in srgb, var(--area) 78%, #000);
}
.calc-card__cta span { display: inline-block; transition: transform var(--ease); }
.calc-card:hover .calc-card__cta span, .calc-card:focus-visible .calc-card__cta span { transform: translateX(3px); }

/* 계산 화면 머리: 제목·설명 옆 그림(입력을 밀어내지 않는 크기) */
.page-head--calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 208px;
  column-gap: 24px;
  align-items: center;
}
.page-head--calc > :not(.page-head__art) { grid-column: 1; }
.page-head__art {
  grid-column: 2;
  grid-row: 1 / span 3;
  height: 124px;
  padding: 4px;
  border-radius: 14px;
  background: var(--area-tint);
}
@media (max-width: 640px) {
  .page-head--calc { grid-template-columns: minmax(0, 1fr) 96px; column-gap: 12px; }
  .page-head__art { height: 64px; padding: 2px; border-radius: 10px; }
}

/* 계산 결과: 두 칸 배치에서 결과 카드가 아래로 밀려 다음 상자와 겹치던 문제(.card + .card 여백) 수정,
   새 결과가 나올 때 짧게 떠오르며 강조 */
.layout > .card + .card { margin-top: 0; }
.result .result-value { color: var(--teal-700, #0b6169); }
@media (prefers-reduced-motion: no-preference) {
  .result .result-value, .result .detail-list { animation: calc-result-in 200ms ease-out; }
}
@keyframes calc-result-in {
  from { opacity: 0.35; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .area-card__art .art, .calc-card__cta span { transition: none; }
  .area-card:hover .area-card__art .art, .area-card:focus-within .area-card__art .art { transform: none; }
}
/* 탭 패널(입력·결과) 다음 설명 상자와의 간격 — 결과 카드 그림자가 다음 상자에 붙지 않게 */
[role="tabpanel"] + .card, .layout + .card { margin-top: 20px; }

/* 좁은 화면 홈: 영역 카드와 그림 띠를 줄여 스크롤을 줄이고, 카드 안 작은 링크도 손가락으로 누르기 쉽게(44px) */
@media (max-width: 560px) {
  .area-card { gap: 8px; padding: 14px 14px 12px; }
  .area-card__art { height: 76px; margin: -4px -4px 0; padding: 4px 10px 2px; }
  .area-card__desc { font-size: 0.9rem; line-height: 1.5; }
  .area-card__chips a { min-height: 44px; padding: 6px 12px; }
  .area-card__cta { padding-top: 2px; }
  .quick-grid { margin-bottom: 24px; }
}

/* ================================================================
   홈 대시보드 (2026-10-01): 짧은 머리 → 6개 영역 → 최근 줄 → 빠른 선택 → 안심 문구
   ================================================================ */
.area-card__purpose { display: none; }

main .container > .trust-list { margin: 0 0 8px; }

/* 최근 연 영역: 한 줄, 최대 3개. 기록이 없으면 숨김(hidden) */
.home-recent {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -12px 0 24px;
  min-width: 0;
}
.home-recent[hidden],
.home-recent li[hidden] { display: none; }
.home-recent__label {
  flex: none;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}
.home-recent__list {
  display: flex;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.home-recent__list li { min-width: 0; flex: 0 1 auto; }
.home-recent__list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 44px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.home-recent__list a > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.home-recent__list a:hover,
.home-recent__list a:focus-visible { border-color: var(--area); }
.home-recent__icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--area-tint);
  color: var(--area);
}
.home-recent__icon svg { width: 16px; height: 16px; }

/* 좁은 화면: 6개 영역이 첫 화면에 모두 보이도록 2열 × 3행의 작은 카드(아이콘·이름·한 줄 용도).
   큰 그림 띠·대표 도구 칩·"열기" 표시는 좁은 화면에서만 숨긴다(카드 전체가 영역 링크). */
@media (max-width: 560px) {
  .home-head { margin: 0 0 10px; }
  .home-head h1 { font-size: 1.22rem; line-height: 1.3; margin-bottom: 2px; }
  .home-head p { font-size: 0.88rem; }
  .section-head--areas { margin: 0 0 8px; }
  .section-head--areas h2 { font-size: 1rem; }
  .area-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
  .area-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 2px;
    align-items: center;
    min-height: 76px;
    padding: 10px 10px 10px 10px;
  }
  .area-card__art,
  .area-card__chips,
  .area-card__cta,
  .area-card__desc { display: none; }
  .area-card__top { display: contents; }
  .area-card__icon { grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 10px; align-self: center; }
  .area-card__icon svg { width: 20px; height: 20px; }
  .area-card h2 { grid-column: 2; font-size: 0.95rem; line-height: 1.25; }
  .area-card .status-badge { grid-column: 2; justify-self: start; }
  .area-card__purpose {
    display: block;
    grid-column: 2;
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.3;
    color: var(--muted);
  }
  .home-recent { margin: -8px 0 20px; gap: 8px; }
  .home-recent__list { flex: 1 1 auto; gap: 6px; }
  .home-recent__list li { flex: 0 1 auto; }
  .home-recent__list a { gap: 4px; padding: 0 8px 0 5px; font-size: 0.82rem; }
  .home-recent__icon { width: 24px; height: 24px; }
}
/* 아주 좁은 화면: 3개 이름이 잘리지 않도록 아이콘 대신 영역 색 바탕만 */
@media (max-width: 400px) {
  .home-recent__icon { display: none; }
  .home-recent__list a { padding: 0 11px; background: var(--area-tint); border-color: transparent; color: color-mix(in srgb, var(--area) 80%, #000); }
}

/* ================================================================
   집중 보기 (2026-10-01): PDF·사진·생활계산 화면
   사이트 머리말(브랜드·영역 메뉴)·위치 표시·도구 이동 줄 대신 한 줄 머리(.tool-bar, 48px)만 둔다.
   머리는 고정하지 않고 함께 스크롤된다. 작업 영역(입력·선택지)이 화면 위쪽에 오게 한다.
   ================================================================ */
.tool-bar {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.tool-bar .container {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 47px; /* + 1px 밑줄 = 48px */
}
.tool-bar__back {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding: 0 10px 0 4px;
  margin-left: -6px;
  border-radius: 10px;
  color: var(--teal-700);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.tool-bar__back:hover,
.tool-bar__back:focus-visible {
  background: var(--teal-050);
}
.tool-bar__arrow svg {
  display: block;
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}
.tool-bar__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding-left: 8px;
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-bar .lang-toggle {
  flex: none;
  min-height: 44px;
  padding: 0 4px 0 8px;
  margin-right: -4px;
  border: 0;
  border-radius: 10px;
  font-size: 0.85rem;
}
.tool-bar .lang-toggle svg {
  margin-right: 4px;
}

/* 작업 영역을 위로: 머리 아래 여백을 줄인다 */
body.tool-view main {
  padding-top: 12px;
}
/* PDF: 첫 줄 제목 여백, "편집 화면" 제목은 화면에서만 감춘다(화면 읽기 프로그램에는 남김) */
.tool-view .mod-pdf .site-main > :first-child {
  margin-top: 0;
}
.tool-view .mod-pdf #editor-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.tool-view .mod-pdf .editor-section {
  margin-top: 0;
}
/* 사진: 도구 자체의 큰 소개(눈썹 글·큰 제목·도장)는 감추고 한 장/여러 장 선택부터 보인다 */
.tool-view .mod-image .image-app > .intro {
  display: none;
}
.tool-view .mod-image .mode-switch {
  margin-top: 0;
}
/* 계산기·목록 아래로 옮긴 소개 문장 */
.tool-about {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
@media (max-width: 560px) {
  .tool-view .calc-card__art { height: 76px; margin-bottom: 4px; }
  .tool-bar .container { gap: 4px; }
  .tool-bar__title { font-size: 0.98rem; padding-left: 6px; }
}
@media (max-width: 370px) {
  .tool-bar .lang-toggle svg { display: none; }
}
@media print {
  .tool-bar__back,
  .tool-bar .lang-toggle {
    display: none;
  }
  .tool-bar__title { border-left: 0; padding-left: 0; }
}
