/* 음력노트 — Line 킷 변형: 한지 바탕 · 먹색 · 남색 단색 액센트 · 괘선 · 그림자·그라디언트·블러 없음 */
/* 달력 콘셉트(2026-10-10 개편): 흰 종이 · 먹색 · 주홍(달력의 빨간 날) 단색 액센트 · Pretendard 굵은 고딕
   그림자·그라디언트·블러·다색 없음 */
:root {
  --bg: #ffffff; --paper: #f6f5f2; --ink: #111318; --ink2: #4a4e57; --mute: #8a8d95;
  --line: #e5e3de; --line2: #cfccc5; --accent: #d1401b; --accent-ink: #ffffff; --accent-soft: #fdf0eb;
  --hl: #fff4d9; --warn: #b4321a; --night: #13151c; --night2: #1d2029; --night-ink: #f3f1ec; --night-mute: #9aa0ad;
  --serif: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
[data-theme="dark"] {
  --bg: #111318; --paper: #181b22; --ink: #eceae5; --ink2: #b6b8bf; --mute: #868a94;
  --line: #2a2d36; --line2: #3b3f4a; --accent: #ff7a52; --accent-ink: #111318; --accent-soft: #2a1d19;
  --hl: #2e2715; --warn: #ff9a7a; --night: #0b0c10; --night2: #171a21; --night-ink: #f3f1ec; --night-mute: #9aa0ad;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.7 var(--sans); word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: 3px; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
button, input, select { font: inherit; color: inherit; }

/* 머리 */
.masthead { border-bottom: 1px solid var(--line); background: var(--bg); }
.masthead .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); margin-right: auto; padding: 8px 0; }
.brand svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.brand-name { font-family: var(--serif); font-weight: 800; font-size: 19px; letter-spacing: -0.03em; }
.brand-sub { font-size: 12.5px; color: var(--mute); }
.nav { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.nav::-webkit-scrollbar { display: none; }
.nav a { white-space: nowrap; color: var(--ink2); text-decoration: none; font-size: 14.5px; padding: 6px 10px; border-radius: 6px; }
.nav a:hover { color: var(--ink); background: var(--accent-soft); }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.theme-btn { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer; display: grid; place-items: center; flex: none; margin-left: 4px; }
.theme-btn svg { width: 17px; height: 17px; }
@media (max-width: 720px) {
  .masthead .wrap { gap: 0; }
  .brand-sub { display: none; }
  .nav { order: 3; width: 100%; padding-bottom: 8px; margin: 0 -10px; width: calc(100% + 20px); }
}

/* 도구 */
.tool { padding: 26px 16px 8px; }
.tool-head h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(26px, 4.8vw, 36px); line-height: 1.25; margin: 0 0 8px; letter-spacing: -0.035em; }
.tool-head p { margin: 0 0 22px; color: var(--ink2); }
.card { background: var(--bg); border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: 4px; padding: 20px; margin-bottom: 16px; }
.card h2 { font-size: 16px; margin: 0 0 14px; font-weight: 700; }
.step { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 2px; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 700; margin-right: 8px; vertical-align: 1px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.field label, .field .lab { display: block; font-size: 13.5px; color: var(--ink2); margin-bottom: 6px; font-weight: 600; }
.field input[type=text], .field input[type=number], .field input[type=date], .field select {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 8px; background: var(--bg); }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline select { width: auto; min-width: 84px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.help { font-size: 13px; color: var(--mute); margin: 6px 0 0; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 9px 14px; cursor: pointer; font-size: 14px; color: var(--ink2); }
.seg button + button { border-left: 1px solid var(--line2); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.opts { display: grid; gap: 12px; }
.opt { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; }
.opt > span { font-size: 14.5px; font-weight: 600; }
details.more { margin-top: 14px; }
details.more summary { cursor: pointer; font-size: 14.5px; color: var(--accent); font-weight: 600; }
details.more[open] summary { margin-bottom: 12px; }
.conv-out { margin-top: 10px; padding: 10px 12px; background: var(--accent-soft); border-radius: 8px; font-size: 14.5px; min-height: 22px; }
.conv-out:empty { display: none; }
.err { color: var(--warn); }

/* 결과 */
.result { scroll-margin-top: 10px; }
.next { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; padding: 16px 18px; border: 0; border-left: 4px solid var(--accent); border-radius: 0; margin-bottom: 14px; background: var(--paper); }
.next .k { font-size: 13px; color: var(--ink2); width: 100%; }
.next .v { font-family: var(--serif); font-size: clamp(22px, 4vw, 28px); font-weight: 800; letter-spacing: -0.02em; }
.next .d { font-weight: 700; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 16px; border-radius: 4px; border: 1px solid var(--line2); background: var(--paper); cursor: pointer; font-size: 14.5px; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.small { height: 34px; padding: 0 10px; font-size: 13.5px; }
.btn svg { width: 16px; height: 16px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 18px; background: var(--paper); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th, .tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.tbl td.wrap-ok, .prose .tbl td { white-space: normal; }
.tbl td.wrap-ok { min-width: 210px; }
.tbl thead th { background: var(--bg); font-size: 13px; color: var(--ink2); font-weight: 600; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.past td { color: var(--mute); }
.tbl tr.now td { background: var(--hl); }
.tbl .num { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 13.5px; }
.tbl .sun { color: #b42318; } .tbl .sat { color: #1d4ed8; }
[data-theme="dark"] .tbl .sun { color: #ff8f86; } [data-theme="dark"] .tbl .sat { color: #8fb4ff; }
.tag { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 99px; border: 1px solid var(--line2); color: var(--ink2); margin-left: 4px; }
.tag.leap { border-color: var(--accent); color: var(--accent); }
.tag.calc { border-style: dashed; color: var(--mute); }
.tag.warn { border-color: var(--warn); color: var(--warn); }
.note-s { font-size: 12.5px; color: var(--warn); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; }
.toast.on { opacity: 1; }

/* 기념일 행 */
.rows { display: grid; gap: 10px; }
.row { display: grid; gap: 8px; grid-template-columns: 120px 1fr auto auto auto auto; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.row select, .row input[type=text] { height: 40px; padding: 0 10px; border: 1px solid var(--line2); border-radius: 8px; background: var(--paper); width: 100%; }
.row .md { display: flex; gap: 6px; }
.row .md select { width: 74px; }
.row .del { border: 0; background: transparent; cursor: pointer; color: var(--mute); font-size: 20px; width: 34px; height: 34px; border-radius: 8px; }
.row .del:hover { color: var(--warn); background: var(--paper); }
@media (max-width: 720px) {
  .row { grid-template-columns: 1fr 1fr; }
  .row .t-title { grid-column: 1 / -1; order: -1; }
  .row .md { grid-column: 1 / -1; }
}
.holis { display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* 문서 */
.doc { padding: 22px 16px 10px; }
.crumbs { font-size: 13px; color: var(--mute); margin-bottom: 10px; }
.crumbs a { color: var(--mute); }
.doc-head { border-bottom: 3px solid var(--ink); padding-bottom: 14px; margin-bottom: 22px; }
.kicker { font-size: 12px; letter-spacing: .14em; color: var(--accent); font-weight: 700; }
.doc-head h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(26px, 5vw, 36px); line-height: 1.28; margin: 6px 0 6px; letter-spacing: -0.035em; }
.doc-head .meta { font-size: 13px; color: var(--mute); }
.prose { max-width: 760px; }
.prose .lead { font-size: 17.5px; color: var(--ink2); }
.prose h2 { font-family: var(--serif); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; margin: 38px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); letter-spacing: -0.01em; }
.prose h3 { font-size: 17px; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 4px 0; }
.prose .tbl-wrap { margin: 16px 0 20px; }
.prose .note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; margin: 18px 0; border-radius: 0 8px 8px 0; }
.prose .note p { margin: 4px 0; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--accent-soft); padding: 1px 5px; border-radius: 4px; }
.faq h3 { font-size: 16px; }
.sources { margin-top: 36px; font-size: 14px; color: var(--ink2); }
.sources h2 { font-size: 16px; }
.cta { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 10px 18px; border-radius: 8px; font-weight: 600; margin: 6px 0; }
.cards { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.cards li { border-bottom: 1px solid var(--line); padding: 14px 0 14px 42px; position: relative; }
.cards .no { position: absolute; left: 0; top: 15px; font-family: var(--mono); font-size: 13px; color: var(--accent); }
.cards a { font-weight: 700; font-size: 16.5px; text-decoration: none; color: var(--ink); }
.cards a:hover { color: var(--accent); }
.cards p { margin: 3px 0 0; font-size: 14px; color: var(--ink2); }
.tools-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 0 0 20px; padding: 0; list-style: none; }
.tools-list a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--paper); height: 100%; }
.tools-list a:hover { border-color: var(--accent); }
.tools-list b { display: block; margin-bottom: 2px; }
.tools-list span { font-size: 13.5px; color: var(--ink2); }
.info { margin-top: 30px; }

/* 광고 — 래퍼에 border-radius·overflow 금지(애드핏 규정) */
.ad-wrap { margin: 26px auto 8px; }
.ad-grid { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 672px; margin-left: auto; margin-right: auto; }
.ad-grid[data-ad-layout="mixed"] { max-width: 760px; }
.ad-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; }
.ad-cell { min-height: 50px; }

/* 꼬리 */
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 22px 0 34px; font-size: 13px; color: var(--mute); }
.foot .links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }
.foot a { color: var(--ink2); text-decoration: none; }
.foot a:hover { color: var(--accent); }

@media print {
  .masthead, .foot, .ad-wrap, .actions, .no-print, form .card, .tool-head p { display: none !important; }
  body { background: #fff; color: #000; }
  .tbl-wrap { border: 0; overflow: visible; }
}

/* 첫 페이지 — 달력 콘셉트 */
.land .hero { background: var(--night); color: var(--night-ink); padding: 64px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 34px; } .land .hero { padding: 44px 0 40px; } }
.eyebrow { font-size: 13px; letter-spacing: .16em; color: var(--accent); font-weight: 700; margin: 0 0 16px; }
.land .hero h1 { font-size: clamp(36px, 7vw, 64px); line-height: 1.12; letter-spacing: -0.045em; font-weight: 800; margin: 0 0 18px; }
.land .hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { font-size: clamp(16px, 2.2vw, 19px); color: var(--night-mute); margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.big { height: 52px; padding: 0 24px; font-size: 16px; font-weight: 700; }
.btn.ghost { background: transparent; border-color: currentColor; color: inherit; }
.land .hero .btn.ghost { color: var(--night-ink); border-color: #4a4f5c; }
.land .hero .btn.ghost:hover { border-color: var(--night-ink); }
.hero-note { margin: 18px 0 0; font-size: 13.5px; color: var(--night-mute); }
/* 일력 카드 */
.cal-page { background: #fbfaf7; color: #111318; border-radius: 6px; overflow: hidden; max-width: 340px; width: 100%; justify-self: end; border-top: 14px solid var(--accent); }
@media (max-width: 860px) { .cal-page { justify-self: start; } }
.cal-top { display: flex; justify-content: space-between; padding: 12px 18px 0; font-size: 13px; font-weight: 700; color: #6b6f78; letter-spacing: .04em; }
.cal-day { font-size: 112px; font-weight: 800; line-height: 1; text-align: center; letter-spacing: -0.05em; padding: 8px 0 0; font-variant-numeric: tabular-nums; }
.cal-day.sun { color: var(--accent); }
.cal-w { text-align: center; font-weight: 700; font-size: 15px; margin-top: 4px; }
.cal-lunar { margin: 14px 18px 0; padding: 12px 0; border-top: 1px dashed #cfccc5; border-bottom: 1px dashed #cfccc5; text-align: center; }
.cal-lunar b { display: block; font-size: 18px; }
.cal-lunar span { font-size: 13px; color: #6b6f78; }
.cal-next { list-style: none; margin: 0; padding: 10px 18px 16px; font-size: 13.5px; }
.cal-next li { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; padding: 5px 0; }
.cal-next li span:first-child { color: #6b6f78; }
.cal-next b { color: var(--accent); }
/* 섹션 */
.land .sec { padding: 64px 0; }
.land .ad-wrap { margin: 0 auto 56px; }
.land .sec + .sec { padding-top: 0; }
.sec-head { display: flex; align-items: baseline; gap: 14px; border-top: 3px solid var(--ink); padding-top: 14px; margin-bottom: 22px; }
.sec-no { font-size: 13px; font-weight: 800; color: var(--accent); letter-spacing: .06em; }
.sec-title { font-size: clamp(24px, 3.8vw, 34px); font-weight: 800; letter-spacing: -0.04em; margin: 0; line-height: 1.25; }
/* 불편 — 달력 칸 격자 */
.cal-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (max-width: 760px) { .cal-grid { grid-template-columns: repeat(2, 1fr); } }
.cell { position: relative; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 46px 18px 22px; min-height: 170px; display: flex; flex-direction: column; gap: 4px; }
.cell .d { position: absolute; left: 18px; top: 14px; font-size: 15px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.cell:nth-child(3n+1) .d { color: var(--accent); }
@media (max-width: 760px) { .cell:nth-child(3n+1) .d { color: var(--ink); } .cell:nth-child(2n+1) .d { color: var(--accent); } .cell { padding: 42px 14px 18px; min-height: 0; } }
.cell .mi { position: absolute; right: 14px; top: 12px; color: var(--mute); }
.cell b { font-size: 17px; line-height: 1.35; letter-spacing: -0.02em; }
.cell p { margin: 0; font-size: 14px; color: var(--ink2); }
.ic { width: 22px; height: 22px; }
.mi { display: inline-grid; place-items: center; }
/* 3단계 — 가로 흐름 */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.flow li { position: relative; padding: 0 22px 0 0; display: flex; flex-direction: column; gap: 4px; }
.flow .n { font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -0.05em; color: var(--ink); margin-bottom: 10px; }
.flow li:last-child .n { color: var(--accent); }
.flow li:not(:last-child)::after { content: ''; position: absolute; left: 62px; right: 22px; top: 32px; border-top: 2px dashed var(--line2); }
.flow .mi { display: none; }
.flow b { font-size: 18px; letter-spacing: -0.02em; }
.flow p { margin: 0; color: var(--ink2); font-size: 14.5px; }
@media (max-width: 640px) {
  .flow { grid-template-columns: 1fr; gap: 18px; }
  .flow li { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 0; }
  .flow .n { font-size: 40px; margin: 0; width: 34px; }
  .flow li::after { display: none; }
  .flow b { flex: 1; } .flow p { width: 100%; padding-left: 48px; }
}
/* 마지막 */
.land .final { background: var(--accent); color: #fff; text-align: center; padding: 56px 0; }
.land .final h2 { font-size: clamp(24px, 4.4vw, 36px); font-weight: 800; letter-spacing: -0.04em; margin: 0 0 22px; }
.land .final .hero-cta { justify-content: center; }
.land .final .btn.primary { background: #111318; border-color: #111318; color: #fff; }
.land .final .btn.ghost { color: #fff; border-color: rgba(255,255,255,.7); }
