/* 파이쿠폰 — 먹색 + 체리 레드, 표와 개수 계산기 중심, 합니다체 */
:root {
  --red: #a8201a;
  --red-dark: #7d1510;
  --red-soft: #fbeeed;
  --ink: #161616;
  --muted: #4d4a49;
  --line: #dcd6d4;
  --bg: #ffffff;
  --bg-alt: #f3f1f0;
  --code-bg: #fbeeed;
  --radius: 8px;
  --wrap: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; font-size: 17px; line-height: 1.75; color: var(--ink); background: var(--bg); word-break: keep-all; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 .6em; }
h1 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 800; }
h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 780px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section { padding: 56px 0; }
.section + .section { border-top: 2px solid var(--bg-alt); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: var(--radius); font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid var(--red); cursor: pointer; white-space: nowrap; }
.btn-main { background: var(--red); color: #fff; }
.btn-main:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-line { background: #fff; color: var(--red); }
.btn-line:hover { background: var(--red-soft); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.kcode { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .95em; font-weight: 700; background: var(--code-bg); color: var(--red-dark); padding: 2px 8px; border-radius: 4px; letter-spacing: .04em; }

/* 머리말 */
.site-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 2px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.logo-mark { width: 34px; height: 34px; fill: var(--red); }
.logo-mark path { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; fill: none; }
.logo-text { font-weight: 800; font-size: 20px; display: flex; flex-direction: column; line-height: 1.15; }
.logo-sub { font-size: 13px; font-weight: 600; color: var(--muted); }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { padding: 8px 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 16px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--red); border-bottom-color: var(--red); }
.main-nav .nav-cta { display: none; }
.menu-toggle { display: none; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 2px solid var(--line); background: #fff; border-radius: var(--radius); font: inherit; font-weight: 700; font-size: 15px; color: var(--ink); cursor: pointer; }
.ico svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; display: block; }

/* 첫 화면 */
.hero { background: var(--red-soft); padding: 44px 0 48px; }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-kicker { font-weight: 700; color: var(--red); margin-bottom: .4em; font-size: 16px; }
.hero h1 { white-space: nowrap; font-size: clamp(26px, 5.4vw, 52px); }
.hero-lead { font-size: 18px; color: var(--ink); max-width: 34em; }
.hero-facts { display: flex; gap: 0; margin: 22px 0 0; border-top: 2px solid var(--red); }
.hero-facts div { flex: 1; padding: 12px 14px 0 0; }
.hero-facts dt { font-size: 15px; color: var(--muted); font-weight: 600; }
.hero-facts dd { margin: 0; font-size: 28px; font-weight: 800; color: var(--red-dark); }
.hero-photo { margin: 0; max-height: 440px; overflow: hidden; border-radius: var(--radius); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

/* 코드 표 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1em; }
.code-table, .info-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.code-table thead th, .info-table thead th { text-align: left; font-size: 15px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--red); white-space: nowrap; }
.code-table td, .code-table tbody th, .info-table td, .info-table tbody th { padding: 14px 12px; border-bottom: 2px solid var(--bg-alt); text-align: left; vertical-align: middle; }
.code-table tbody th a { font-weight: 700; color: var(--ink); text-decoration: none; display: block; }
.code-table tbody th a:hover { color: var(--red); text-decoration: underline; }
.ct-rate { display: block; font-size: 15px; color: var(--red); font-weight: 700; }
.ct-go { text-align: right; }
.info-table tbody th { font-weight: 700; white-space: nowrap; }
.note { color: var(--muted); font-size: 16px; margin-top: 12px; }

.code-rows { list-style: none; margin: 0; padding: 0; }
.code-rows li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 2px solid var(--bg-alt); }
.cr-no { font-weight: 800; font-size: 22px; color: var(--red); width: 28px; }
.cr-body { flex: 1; }
.cr-body h3 { margin: 0; }
.cr-body h3 a { color: var(--ink); text-decoration: none; }
.cr-rate, .cr-brief { margin: 2px 0 0; font-size: 16px; }
.cr-brief { color: var(--muted); }

.split-in { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; }
.split-head p { color: var(--muted); }
.more a { font-weight: 700; }

/* 단계·체크·질문 */
.steps, .checklist { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 16px; padding: 16px 0; border-bottom: 2px solid var(--bg-alt); }
.step-no { flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--radius); background: var(--red); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps h3 { margin: 4px 0 4px; }
.steps p { margin: 0; color: var(--muted); }
.checklist li { padding: 14px 0 14px 18px; border-left: 3px solid var(--red); margin-bottom: 12px; }
.checklist h3 { margin-bottom: 4px; }
.checklist p { margin: 0; color: var(--muted); }
.faq { border-bottom: 2px solid var(--bg-alt); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 18px; }
.faq[open] .ico { transform: rotate(45deg); }
.faq p { padding: 0 0 16px; margin: 0; color: var(--muted); }
.digest-item { padding: 14px 0; border-bottom: 2px solid var(--bg-alt); }
.digest-item h3 { margin: 0 0 4px; }
.digest-item h3 span { color: var(--red); font-size: 16px; margin-left: 6px; }
.digest-item p { margin: 0; color: var(--muted); }
.directory { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; }
.directory li { padding: 14px 0; border-bottom: 2px solid var(--bg-alt); }
.directory a { font-weight: 700; font-size: 18px; text-decoration: none; }
.directory p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }

/* 안쪽 페이지 */
.breadcrumb { font-size: 15px; color: var(--muted); padding: 16px 0 0; }
.breadcrumb a { color: var(--muted); }
.page-head { padding: 28px 0 40px; border-bottom: 2px solid var(--line); }
.page-head-in { display: grid; grid-template-columns: 1fr; gap: 32px; }
.page-head.has-photo .page-head-in { grid-template-columns: 1.2fr .8fr; align-items: center; }
.page-lead { font-size: 18px; color: var(--muted); max-width: 40em; }
.page-head-photo, .detail-photo { margin: 0; border-radius: var(--radius); overflow: hidden; }
.detail-head-in { display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: center; }
.detail-rate { font-size: 22px; font-weight: 800; color: var(--red-dark); }
.page-actions { margin-top: 18px; }
.text-block { margin-bottom: 36px; }
.text-block:last-child { margin-bottom: 0; }
.text-photo { margin: 0 0 18px; border-radius: var(--radius); overflow: hidden; }
.plain-list, .num-list { padding-left: 1.3em; margin: 0 0 1em; }
.plain-list li, .num-list li { margin-bottom: .5em; }
.block-go { margin-top: 12px; }
.spec-table tbody th { width: 9em; color: var(--muted); }
.cta-strip { background: var(--red); color: #fff; }
.cta-strip .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.cta-strip p { margin: 0; font-weight: 700; font-size: 18px; }
.cta-strip .btn-main { background: #fff; color: var(--red-dark); border-color: #fff; }
.more-menu ul, .related-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.more-menu a { font-weight: 600; }
.related-list { flex-direction: column; }
.related-list span { color: var(--muted); font-size: 15px; margin-left: 6px; }
.back-link { margin-top: 20px; font-weight: 700; }
.static-page h1 { margin-top: 12px; }
.notfound { text-align: center; padding: 100px 0; }

/* 꼬리말 */
.site-footer { background: var(--red-dark); color: #dfe9e2; padding: 48px 0 32px; margin-top: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr .8fr; gap: 28px; margin-bottom: 28px; }
.footer-brand .logo-text { color: #fff; }
.footer-brand p { font-size: 15px; margin-top: 10px; }
.footer-nav { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.footer-title { font-weight: 800; color: #fff; margin: 0 0 4px; font-size: 16px; }
.footer-nav .strong { font-weight: 800; }
.disclaimer { font-size: 15px; color: #c3d3c8; margin: 0 0 8px; }
.to-top { display: inline-block; margin-top: 12px; font-weight: 700; }

/* 휴대폰 */
@media (max-width: 960px) {
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 8px 20px 16px; border-bottom: 2px solid var(--line); }
  .nav-open .main-nav { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 2px solid var(--bg-alt); }
  .menu-toggle { display: inline-flex; }
  .header-cta { margin-left: auto; }
  .hero-in, .split-in, .page-head.has-photo .page-head-in, .detail-head-in { grid-template-columns: 1fr; }
  .hero-photo { max-height: 300px; }
  .directory { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .logo-sub { display: none; }
  .section { padding: 40px 0; }
  .hero { padding: 28px 0 32px; }
  .hero h1 { font-size: clamp(22px, 7.4vw, 34px); }
  .hero-facts dd { font-size: 22px; }
  .directory { grid-template-columns: 1fr; }
  .code-table thead { display: none; }
  .code-table tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 2px solid var(--bg-alt); }
  .code-table td, .code-table tbody th { border: 0; padding: 0; }
  .code-table tbody th { grid-column: 1 / -1; }
  .code-table td:nth-child(3) { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }
  .ct-go { grid-column: 1 / -1; text-align: left; }
  .ct-go .btn { width: 100%; }
  .cta-strip .wrap { flex-direction: column; align-items: flex-start; }
  .footer-top { grid-template-columns: 1fr; }
  .code-rows li { flex-wrap: wrap; }
  .code-rows .btn { width: 100%; }
}
@media (max-width: 379px) {
  .header-cta { display: none; }
  .menu-toggle { margin-left: auto; }
  .main-nav .nav-cta { display: block; font-weight: 800; color: var(--red); }
  .logo-text { font-size: 18px; }
}

/* 그리드 칸이 표·버튼 때문에 넘치지 않게 */
.hero-in > *, .split-in > *, .two-col > *, .two > *, .page-head-in > *, .detail-head-in > *, .code-cards > *, .code-card > *, .footer-top > *, .footer-row > *, .footer-grid > *, .footer-cols > * { min-width: 0; }
@media (max-width: 560px) { .btn { white-space: normal; text-align: center; max-width: 100%; } }

/* 휴대폰 표 정리 */
.header-cta { white-space: nowrap; }
@media (max-width: 640px) {
  .summary-table thead, .compare-table thead { display: none; }
  .summary-table, .summary-table tbody, .summary-table tr, .compare-table, .compare-table tbody, .compare-table tr { display: block; width: 100%; }
  .summary-table tr, .compare-table tr { padding: 10px 0 12px; border-bottom: 2px solid var(--bg-alt); }
  .summary-table tbody th, .summary-table td, .compare-table tbody th, .compare-table td { display: flex; gap: 12px; width: 100%; padding: 4px 0; border: 0; background: transparent; white-space: normal; }
  .summary-table tbody th, .compare-table tbody th { font-size: 18px; padding-bottom: 6px; }
  .summary-table td::before, .compare-table td::before { content: attr(data-label); flex: 0 0 5.2em; font-weight: 700; font-family: inherit; }
  .compare-table tbody th { display: block; }
  .compare-table tbody th::after { content: " 담으면"; font-weight: 400; }
  .calc-table td, .calc-table th { white-space: nowrap; padding-left: 10px; padding-right: 10px; }
}

/* ── 파이쿠폰 전용 ── */
.site-header { border-bottom: 2px solid var(--ink); }
.logo-mark { width: 34px; height: 34px; }
.logo-mark rect:first-child { fill: var(--red); }
.logo-mark .cam { fill: #fff; }
.logo-mark .cut { stroke: #fff; stroke-width: 2.6; stroke-linecap: round; fill: none; }
.hero { background: var(--ink); color: #fff; padding: 48px 0 52px; }
.hero-in { grid-template-columns: 1.05fr .95fr; align-items: start; }
.hero h1 { color: #fff; }
.hero-lead { color: #e9e5e4; }
.hero-code { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 22px 0 6px; padding: 14px 16px; border: 2px dashed #8f8a88; border-radius: var(--radius); }
.hc-label { font-size: 15px; font-weight: 700; color: #cfc9c7; width: 100%; }
.hc-code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; letter-spacing: .06em; color: #fff; }
.hero .btn-line { background: transparent; color: #fff; border-color: #fff; }
.hero .btn-line:hover { background: #fff; color: var(--ink); }
.hero-facts { border-top-color: #fff; }
.hero-facts dt { color: #cfc9c7; }
.hero-facts dd { color: #fff; }
.hero-until { margin: 14px 0 0; font-weight: 700; color: #ffd9d6; }
.hero-go { margin: 18px 0 0; }
.hero .btn-main { background: #fff; color: var(--red-dark); border-color: #fff; }
.hero .btn-main:hover { background: var(--red-soft); color: var(--red-dark); }
.hero-calc { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 22px 22px 18px; }
.hero-calc h2 { font-size: 22px; margin-bottom: 12px; }
.bundle-calc fieldset { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.bundle-calc legend { font-weight: 700; font-size: 16px; margin-bottom: 8px; padding: 0; }
.bundle-calc label span { display: block; font-size: 15px; color: var(--muted); font-weight: 600; }
.bundle-calc input[type=text] { width: 100%; height: 46px; padding: 0 12px; font: inherit; font-size: 17px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); }
.bundle-calc input[type=text]:focus { outline: none; border-color: var(--red); }
.calc-check { display: flex; align-items: center; gap: 8px; margin: 14px 0 10px; font-size: 16px; font-weight: 600; }
.calc-check input { width: 20px; height: 20px; accent-color: var(--red); }
.calc-out { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; border-top: 2px solid var(--bg-alt); font-size: 16px; color: var(--muted); min-height: 5.4em; }
.calc-out strong { color: var(--red-dark); font-size: 19px; }
.text-block .bundle-calc { max-width: 560px; padding: 18px 0 0; }
.nocode { font-weight: 700; color: var(--muted); font-size: 15px; }
.cr-photo { display: none; }
.bundle-table td, .bundle-table th { white-space: nowrap; }
.store-table tbody th { white-space: normal; }
.tier-table td { white-space: normal; }
.cta-strip { background: var(--ink); }
.cta-strip .btn-main { color: var(--ink); }
.site-footer { background: var(--ink); color: #dcd7d5; }
.disclaimer { color: #c9c3c1; }
.detail-head.no-photo .detail-head-in { grid-template-columns: 1fr; }
.info-table td, .info-table th { overflow-wrap: normal; }
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-calc { max-width: 560px; }
}
@media (max-width: 560px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hero h1 { font-size: clamp(21px, 7vw, 34px); }
  .bundle-calc fieldset { grid-template-columns: 1fr 1fr; }
  .hero-calc { padding: 18px 16px 14px; }
  .code-table td[data-label="코드"] { grid-column: 1 / -1; }
  .bundle-table th:nth-child(3), .bundle-table td:nth-child(3), .bundle-table th:nth-child(4), .bundle-table td:nth-child(4) { display: none; }
  .bundle-table td, .bundle-table th { padding-left: 8px; padding-right: 8px; font-size: 15px; }
  .stack-sm thead { display: none; }
  .stack-sm, .stack-sm tbody, .stack-sm tr { display: block; width: 100%; }
  .stack-sm tr { padding: 10px 0 12px; border-bottom: 2px solid var(--bg-alt); }
  .stack-sm tbody th, .stack-sm td { display: flex; gap: 12px; width: 100%; padding: 3px 0; border: 0; white-space: normal; }
  .stack-sm tbody th { font-size: 18px; padding-bottom: 6px; }
  .stack-sm td::before { content: attr(data-label); flex: 0 0 6.4em; font-weight: 700; color: var(--muted); }
}
