/* 양육비 계산기 (2026-10 새 디자인) */
.ys-hero { padding: 56px 0 28px; }
.ys-hero .h2-crumb { margin-bottom: 28px; }
.ys-h1 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.2; font-weight: 700; letter-spacing: -.035em; margin: 0; }
.ys-lead { font-size: 17px; line-height: 1.7; color: var(--h2-sub); margin: 16px 0 0; max-width: 720px; }
.ys-ver { display: inline-block; margin: 16px 0 0; padding: 6px 14px; border-radius: 999px; background: var(--h2-tint); font-size: 13px; color: var(--h2-sub); line-height: 1.5; }

.ys-tool { padding: 12px 0 72px; }
.ys-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }

/* 입력 */
.ys-panel { background: #fff; border: 1px solid var(--h2-line); border-radius: 22px; padding: 26px 26px 22px; }
.ys-label { display: block; font-size: 14px; font-weight: 700; color: var(--h2-ink); margin: 22px 0 8px; }
.ys-panel > .ys-label:first-child { margin-top: 0; }
.ys-label span { font-weight: 600; color: var(--h2-accent); margin-left: 6px; }
.ys-input { width: 100%; box-sizing: border-box; height: 54px; border: 1.5px solid var(--h2-line); border-radius: 14px; padding: 0 16px;
  font: inherit; font-size: 18px; color: var(--h2-ink); background: #fbf9f4; transition: border-color .2s, background .2s; }
.ys-input:focus { outline: none; border-color: var(--h2-navy); background: #fff; }
.ys-input::placeholder { color: #a9a59d; }
.ys-inc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ys-unit { position: relative; }
.ys-unit .ys-input { padding-right: 58px; -moz-appearance: textfield; }
.ys-unit .ys-input::-webkit-outer-spin-button, .ys-unit .ys-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ys-unit i { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 15px; color: var(--h2-sub); pointer-events: none; }
.ys-hint { margin: 8px 2px 0; font-size: 13px; line-height: 1.6; color: var(--h2-sub); }

.ys-seg { display: flex; gap: 6px; background: var(--h2-tint); border-radius: 999px; padding: 4px; }
.ys-seg button { flex: 1; height: 44px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--h2-sub); cursor: pointer; transition: background .2s, color .2s; }
.ys-seg button[aria-pressed="true"] { background: var(--h2-navy); color: #fff; }

.ys-kids { display: grid; gap: 8px; }
.ys-kid { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; }
.ys-kid-no { font-size: 15px; font-weight: 700; color: var(--h2-navy); }
.ys-age { height: 50px; font-size: 16px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--h2-sub) 50%), linear-gradient(135deg, var(--h2-sub) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.ys-kid-del { height: 40px; padding: 0 14px; border: 1px solid var(--h2-line); border-radius: 999px; background: #fff; font: inherit; font-size: 14px; color: var(--h2-sub); cursor: pointer; }
.ys-kid-del:hover:not(:disabled) { border-color: var(--h2-accent); color: var(--h2-accent); }
.ys-kid-del:disabled { visibility: hidden; }
.ys-add { margin-top: 10px; width: 100%; height: 46px; border: 1.5px dashed var(--h2-line); border-radius: 14px; background: none;
  font: inherit; font-size: 15px; font-weight: 700; color: var(--h2-navy); cursor: pointer; }
.ys-add:hover:not(:disabled) { border-color: var(--h2-navy); }
.ys-add:disabled { opacity: .45; cursor: default; }
.ys-clear { display: block; margin: 22px auto 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--h2-sub); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* 결과 */
.ys-result { position: sticky; top: 92px; }
.ys-sum { background: var(--h2-navy); color: #fff; border-radius: 22px; padding: 28px 28px 24px; }
.ys-sum-h { margin: 0; font-size: 16px; font-weight: 600; opacity: .85; }
.ys-sum-v { margin: 6px 0 0; font-size: 22px; font-weight: 700; }
.ys-sum-v b { font-size: clamp(40px, 5vw, 54px); letter-spacing: -.03em; margin-right: 4px; font-variant-numeric: tabular-nums; }
.ys-sum-s { margin: 4px 0 0; font-size: 14px; opacity: .75; }
.ys-result[data-empty="true"] .ys-sum-v { opacity: .35; }
.ys-per { list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(255,255,255,.18); display: grid; gap: 6px; }
.ys-per:empty { display: none; }
.ys-per li { display: flex; justify-content: space-between; font-size: 15px; }
.ys-per em { font-style: normal; opacity: .7; margin-left: 4px; }
.ys-per b { font-variant-numeric: tabular-nums; }

.ys-steps { width: 100%; border-collapse: collapse; margin-top: 14px; background: #fff; border: 1px solid var(--h2-line); border-radius: 18px; overflow: hidden; }
.ys-steps:has(tbody:empty) { display: none; }
.ys-steps th, .ys-steps td { padding: 14px 18px; border-bottom: 1px solid #eee8de; vertical-align: top; }
.ys-steps tr:last-child th, .ys-steps tr:last-child td { border-bottom: 0; }
.ys-steps th { text-align: left; font-size: 15px; font-weight: 600; color: var(--h2-ink); }
.ys-steps th small { display: block; margin-top: 3px; font-size: 13px; font-weight: 400; color: var(--h2-sub); line-height: 1.5; }
.ys-steps td { text-align: right; white-space: nowrap; font-size: 15px; font-variant-numeric: tabular-nums; }
.ys-steps .ys-strong th, .ys-steps .ys-strong td { font-weight: 700; color: var(--h2-navy); }
.ys-steps tr:last-child { background: #fbf6ee; }
.ys-notes p { margin: 12px 0 0; padding: 12px 16px; border-radius: 14px; background: #fdf0ea; color: #8a3a1f; font-size: 14px; line-height: 1.6; }
.ys-warn { margin: 14px 4px 0; font-size: 13px; line-height: 1.65; color: var(--h2-sub); }

/* 설명 */
.ys-info { padding: 40px 0 120px; border-top: 1px solid var(--h2-line); }
.ys-info h2 { font-size: 20px; letter-spacing: -.02em; margin: 0 0 10px; }
.ys-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 32px; }
.ys-how b { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--h2-navy); color: #fff; font-size: 15px; margin-bottom: 14px; }
.ys-how p { font-size: 16px; line-height: 1.75; color: var(--h2-sub); margin: 0; }

.ys-table { margin-top: 64px; border: 1px solid var(--h2-line); border-radius: 18px; background: #fff; }
.ys-table summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; padding: 20px 24px; font-size: 17px; font-weight: 700; }
.ys-table summary::-webkit-details-marker { display: none; }
.ys-table summary::after { content: '+'; color: var(--h2-accent); font-size: 22px; line-height: 1; }
.ys-table[open] summary::after { content: '−'; }
.ys-grid-wrap { overflow-x: auto; padding: 0 24px; -webkit-overflow-scrolling: touch; }
.ys-grid { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; font-variant-numeric: tabular-nums; }
.ys-grid caption { caption-side: top; text-align: left; font-size: 13px; color: var(--h2-sub); padding-bottom: 8px; }
.ys-grid th, .ys-grid td { padding: 9px 10px; border-bottom: 1px solid #eee8de; text-align: right; white-space: nowrap; }
.ys-grid thead th { background: var(--h2-tint); font-weight: 700; text-align: center; line-height: 1.35; }
.ys-grid tbody th { text-align: left; font-weight: 600; }
.ys-src { margin: 12px 24px 20px; font-size: 13px; line-height: 1.65; color: var(--h2-sub); }

.ys-faq { margin-top: 64px; }
.ys-faq summary { font-size: 17px; padding: 22px 4px; }
.ys-faq .h2-faq-a p { font-size: 16px; line-height: 1.8; color: var(--h2-sub); margin: 0 4px 22px; }
.ys-related { margin-top: 64px; }
.ys-rel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.ys-rel-grid a { display: block; text-decoration: none; padding: 18px; border: 1px solid var(--h2-line); border-radius: 16px; background: #fff; transition: border-color .2s, transform .2s; }
.ys-rel-grid a:hover { border-color: var(--h2-accent); transform: translateY(-2px); }
.ys-rel-grid b { display: block; font-size: 15px; color: var(--h2-ink); }
.ys-rel-grid span { display: block; font-size: 13px; color: var(--h2-sub); margin-top: 4px; }

@media (max-width: 900px) {
  .ys-app { grid-template-columns: 1fr; gap: 16px; }
  .ys-result { position: static; }
  .ys-how { grid-template-columns: 1fr; gap: 22px; }
  .ys-rel-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .h2-wrap { padding: 0 16px; }
  .ys-hero { padding: 28px 0 16px; }
  .ys-hero .h2-crumb { margin-bottom: 18px; }
  .ys-lead { font-size: 15px; }
  .ys-panel { padding: 20px 16px 18px; border-radius: 18px; }
  .ys-inc { grid-template-columns: 1fr; gap: 0; }
  .ys-sum { padding: 22px 20px 20px; border-radius: 18px; }
  .ys-steps th, .ys-steps td { padding: 12px 14px; }
  .ys-seg button { font-size: 14px; }
  .ys-grid-wrap { padding: 0 12px; }
  .ys-table summary { padding: 18px 16px; }
  .ys-src { margin: 12px 16px 18px; }
}
.ys-grid tbody th, .ys-grid thead th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; }
.ys-grid thead th:first-child { background: var(--h2-tint); }
