/* vendor/life-calculators/assets/css/style.css (unchanged) */
/* 쉬운계산 · 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;
}

/* ---------------- 본문 레이아웃 ---------------- */

main {
  display: block;
  padding: 28px 0 56px;
}

.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);
}

.page-head {
  margin-bottom: 22px;
}

.page-head p {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 0;
}

.page-head h1 {
  margin-bottom: 8px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.card + .card {
  margin-top: 18px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
  align-items: start;
}

@media (max-width: 820px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------------- 탭 ---------------- */

/* 알약형 탭: 좁은 화면에서 가로로 밀어 볼 수 있고 스크롤바는 감춥니다. */
.tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  background: rgba(11, 31, 58, 0.05);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs button {
  appearance: none;
  background: none;
  border: none;
  padding: 9px 16px;
  font: inherit;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--navy-700);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 999px;
  flex: 0 0 auto;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.tabs button:hover {
  color: var(--navy-900);
  background: rgba(255, 255, 255, 0.7);
}

.tabs button[aria-selected="true"] {
  color: var(--teal-700);
  background: var(--surface);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ---------------- 폼 ---------------- */

.field {
  margin-bottom: 14px;
}

.field label,
.field .field-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: 6px;
}

.hint {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
select {
  width: 100%;
  padding: 11px 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--navy-900);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
  min-height: 44px;
}

input:hover,
select:hover {
  border-color: var(--navy-500);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(18, 149, 159, 0.2);
}

input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.inline-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inline-unit .suffix {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--navy-800);
  cursor: pointer;
  padding: 8px 0;
}

.checkbox input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--teal-600);
  flex: none;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.btn {
  appearance: none;
  font: inherit;
  font-weight: 600;
  padding: 11px 20px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--teal-600);
  color: #fff;
  box-shadow: 0 1px 2px rgba(11, 31, 58, 0.12);
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, transform 0.08s ease;
}

.btn:hover {
  background: var(--teal-700);
  box-shadow: 0 4px 12px -4px rgba(14, 125, 134, 0.5);
}

.btn:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--navy-700);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: #eef3f8;
  color: var(--navy-900);
}

.btn-small {
  padding: 7px 12px;
  min-height: 38px;
  font-size: 0.88rem;
}

/* ---------------- 결과 ---------------- */

/* 결과 카드는 화면에서 가장 먼저 눈에 들어와야 합니다. */
.result {
  position: relative;
  background: linear-gradient(168deg, #f2fafa 0%, #ffffff 62%);
  border: 1px solid #cbe3e5;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.result::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--teal-500), var(--teal-700));
}

.result-label {
  font-size: 0.82rem;
  color: var(--teal-700);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 6px;
}

.result-value {
  font-size: clamp(1.9rem, 5.2vw, 2.6rem);
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin: 0 0 6px;
  word-break: break-all;
}

/* English time results contain words; wrap at spaces before splitting a word. */
html[lang="en"] body[data-tool="time"] .result-value {
  word-break: normal;
}

.result-value .unit {
  font-size: 0.42em;
  font-weight: 600;
  color: var(--navy-500);
  letter-spacing: -0.01em;
  margin-left: 6px;
}

.result-note {
  color: var(--navy-700);
  font-size: 0.95rem;
  margin: 0;
}

.result-placeholder {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.detail-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #cfe5e7;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(207, 229, 231, 0.7);
  font-size: 0.94rem;
}

.detail-list dt {
  color: var(--muted);
  margin: 0;
}

.detail-list dd {
  margin: 0;
  font-weight: 600;
  color: var(--navy-800);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 결과 복사 */

.result-actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #cfe5e7;
}

/* 유효한 결과가 없을 때는 app.js 가 hidden 을 붙여 통째로 감춥니다. */

.copy-status {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--teal-700);
}

.copy-status:empty {
  margin: 0;
}

.copy-fallback {
  margin-top: 10px;
}

.copy-fallback label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: 4px;
}

.copy-fallback textarea {
  width: 100%;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--navy-900);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  resize: vertical;
}

.copy-fallback textarea:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(18, 149, 159, 0.2);
}

.result[tabindex]:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 3px;
}

/* 스크롤 이동 시 고정 헤더에 결과가 가려지지 않도록 */
.result {
  scroll-margin-top: 76px;
}

/* 고급 옵션 (접어 두는 부가 설정) */

details.advanced {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  margin: 0 0 14px;
}

details.advanced > summary {
  cursor: pointer;
  padding: 11px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-800);
  border-radius: var(--radius-sm);
  min-height: 44px;
  display: flex;
  align-items: center;
}

details.advanced > summary:hover {
  color: var(--teal-700);
}

details.advanced[open] > summary {
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

details.advanced > div {
  padding: 14px 14px 2px;
}

details.advanced .field:last-child {
  margin-bottom: 12px;
}

.error-box {
  background: var(--danger-bg);
  border: 1px solid #f3c9c5;
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.93rem;
  margin: 0 0 14px;
}

.error-box:empty {
  display: none;
}

/* 표 */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

th,
td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tbody tr:last-child td {
  border-bottom: none;
}

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

/* 히어로는 일부러 낮게 유지합니다 — 도구 카드가 첫 화면에서 밀려나지 않도록.
   넓은 화면에서는 글과 일러스트를 나란히 둡니다. */
.hero {
  padding: 22px 0 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 28px;
  align-items: center;
}

.hero__text {
  min-width: 0;
}

.hero__art {
  min-width: 0;
  justify-self: end;
}

.hero__art picture,
.hero__art img {
  display: block;
}

/* width/height 속성과 같은 3:2 비율을 유지해 이미지가 늦게 떠도 화면이 밀리지 않습니다. */
.hero__art img {
  width: 100%;
  height: auto;
  max-width: 420px;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg);
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    justify-items: start;
  }

  /* 좁은 화면에서는 첫 계산기까지 가는 길을 막지 않도록 작게 둡니다. */
  .hero__art {
    justify-self: center;
  }

  .hero__art img {
    max-width: 260px;
  }
}

.hero h1 {
  font-size: clamp(1.75rem, 4.2vw, 2.3rem);
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}

.hero p {
  color: var(--muted);
  max-width: 56ch;
  font-size: 1.01rem;
  margin-bottom: 0;
}

.hero .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--teal-700);
  background: var(--teal-050);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 14px;
}

/* 언어 전환 링크 */

.lang-switch {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.lang-switch a {
  font-weight: 600;
}

/* 링크가 가리키는 페이지의 언어를 솔직하게 표시합니다. */
.lang-tag {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.88em;
  white-space: nowrap;
}

.site-nav .lang-tag,
.site-footer .lang-tag {
  font-size: 0.85em;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.section-head .section-note {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

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

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.tool-card:hover {
  border-color: #9fd0d3;
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  color: inherit;
}

/* 도구 성격을 한눈에 알려 주는 코드로 그린 아이콘 (장식이라 스크린리더에서는 감춥니다) */
.tool-card__icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--teal-050);
  color: var(--teal-700);
  margin-bottom: 4px;
  transition: background 0.14s ease, color 0.14s ease;
}

.tool-card__icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.tool-card:hover .tool-card__icon {
  background: var(--teal-600);
  color: #fff;
}

.tool-card h2 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--navy-900);
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.tool-card .tag {
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.8rem;
  color: var(--teal-700);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-grid h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.feature-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------------- 설명 / 예시 ---------------- */

/* 카드는 폭을 채우되, 읽는 줄 길이만 제한합니다.
   (카드 자체에 max-width 를 걸면 넓은 화면에서 카드가 혼자 좁아 보입니다.) */
.prose > p,
.prose > ul,
.prose > ol,
.prose > .formula,
.prose > .example {
  max-width: 72ch;
}

.prose h2 {
  margin-top: 1.6em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
  margin: 0 0 1em;
}

.prose li {
  margin-bottom: 0.4em;
}

.formula {
  font-family: var(--mono);
  font-size: 0.92rem;
  background: #f1f5f9;
  border-left: 3px solid var(--teal-500);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 0 0 14px;
  overflow-x: auto;
}

.example {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fbfcfe;
}

.example h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  color: var(--teal-700);
}

.example p:last-child {
  margin-bottom: 0;
}

.note {
  font-size: 0.9rem;
  color: var(--muted);
}

.related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.related a {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  color: var(--navy-700);
  font-size: 0.9rem;
}

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

/* ---------------- 광고 예약 영역 ----------------
   현재는 비어 있는 자리 표시자입니다. 실제 광고 스크립트는 넣지 않았습니다. */

.ad-slot {
  margin: 26px 0;
  min-height: 0;
}

.ad-slot:empty {
  margin: 0;
}

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

.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;
}

/* ---------------- 좁은 화면 (390x844, 360px 대응) ----------------
   목표: 제목과 폼을 압축해 "계산 결과"에 빨리 닿게 하고,
   어떤 칸도 잘리거나 가로 스크롤을 만들지 않게 합니다. */

@media (max-width: 640px) {
  /* Keep long English unit names intact beneath the number on narrow screens. */
  html[lang="en"] body[data-tool="unit"] .result-value {
    word-break: normal;
  }

  html[lang="en"] body[data-tool="unit"] .result-value .unit {
    display: block;
    margin: 4px 0 0;
    font-size: 0.52em;
    line-height: 1.35;
    overflow-wrap: break-word;
  }

  .container {
    padding: 0 14px;
  }

  main {
    padding: 14px 0 36px;
  }

  /* 제목 영역 압축 */
  .page-head {
    margin-bottom: 14px;
  }

  .page-head h1 {
    font-size: 1.45rem;
    margin-bottom: 4px;
  }

  .page-head p {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .breadcrumb {
    margin-bottom: 6px;
  }

  .card {
    padding: 15px;
  }

  .card + .card {
    margin-top: 12px;
  }

  .layout {
    gap: 12px;
  }

  h2 {
    font-size: 1.1rem;
  }

  /* 결과 카드를 먼저 읽히도록 살짝 키우고 여백을 줄입니다. */
  .result-value {
    font-size: clamp(1.8rem, 9vw, 2.2rem);
  }

  .result-note {
    font-size: 0.92rem;
  }

  .detail-list div {
    padding: 8px 0;
    font-size: 0.9rem;
  }

  .field {
    margin-bottom: 11px;
  }

  .hero {
    padding: 14px 0 4px;
  }

  .tool-grid {
    gap: 12px;
  }

  .tool-card {
    padding: 16px;
  }

  /* 좁은 화면에서는 작은 버튼도 손가락으로 누를 수 있어야 합니다. */
  .btn-small {
    min-height: 44px;
    padding: 9px 14px;
  }

  /* 탭도 같은 기준을 맞춥니다(기본 높이는 44px 에 살짝 못 미칩니다). */
  .tabs button {
    min-height: 44px;
  }

  .actions .btn[type="submit"],
  .actions .btn[type="reset"] {
    flex: 1 1 140px;
  }

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

  .brand {
    font-size: 1.05rem;
  }

  /* 메뉴가 여러 줄로 접히면 첫 화면을 다 잡아먹습니다.
     한 줄로 두고 가로로 밀어 보게 합니다. */
  .site-nav {
    margin-left: 0;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* 오른쪽 끝을 흐리게 해서 더 밀 수 있다는 걸 알립니다. */
    mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
  }

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

  .site-nav ul {
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

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

  .result {
    scroll-margin-top: 64px;
  }

  /* 제목과 설명이 한 줄에서 서로 밀지 않도록 위아래로 둡니다. */
  .section-head {
    display: block;
    margin-bottom: 12px;
  }

  .section-head .section-note {
    margin-top: 2px;
  }

  .hero {
    padding: 16px 0 14px;
  }

  /* 폭이 더 좁아지면 일러스트를 한 번 더 줄여 첫 계산기를 위로 끌어올립니다. */
  .hero__art img {
    max-width: 220px;
  }
}

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

  .card {
    padding: 13px;
  }

  .page-head h1 {
    font-size: 1.32rem;
  }

  /* 시간·분·초처럼 한 줄에 세 칸이 들어가는 영역을 좁은 폭에 맞춥니다. */
  .field-row {
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
    gap: 8px;
  }

  input[type="text"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  select {
    padding: 10px;
    font-size: 16px; /* iOS 확대 방지 */
  }

  .tabs button {
    padding: 9px 9px;
    font-size: 0.9rem;
  }

  .detail-list dd {
    font-size: 0.9rem;
  }
}

/* 입력칸 옆 단위/버튼이 좁은 폭에서 넘치지 않도록 */
.inline-unit {
  flex-wrap: wrap;
}

.inline-unit input,
.inline-unit select {
  flex: 1 1 120px;
  min-width: 0;
}

.detail-list div {
  flex-wrap: wrap;
}

.detail-list dd {
  min-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  .tool-card:hover {
    transform: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .actions,
  .ad-slot,
  .tabs {
    display: none;
  }
}


/* ================================================================
   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; }
}
