/* 디자인 기준: 부적(괴황지 + 경면주사 붉은 먹). frontend-design 스킬 적용 (2026-12-01)
   팔레트: 괴황지 #EBCB6B / 바랜 종이 #F6E7B4 / 주사 #A8231B / 먹 #2E2111 / 흐린 먹 #6B5634 */
:root {
  --paper: #EBCB6B; --paper-soft: #F6E7B4; --ju: #A8231B; --ink: #2E2111; --ink-soft: #6B5634;
  --wood: #4E7D3A; --fire: #A8231B; --earth: #B07A1E; --metal: #8A8578; --water: #284B73;
  --display: 'Song Myung', 'Nanum Myeongjo', serif;
  --body: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.7; word-break: keep-all;
  background: var(--paper) radial-gradient(circle at 20% 10%, rgba(255,255,255,.25), transparent 60%); }
.wrap { max-width: 460px; margin: 0 auto; padding: 28px 20px 56px; }
a { color: var(--ink-soft); }
:focus-visible { outline: 3px solid var(--ju); outline-offset: 2px; }

/* 히어로: 세로 부적 */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; margin-bottom: 28px; }
.talisman-mini { writing-mode: vertical-rl; font-family: var(--display); color: var(--ju); font-size: 44px; line-height: 1;
  border: 3px double var(--ju); padding: 14px 10px; background: var(--paper-soft); letter-spacing: 6px; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1.25; margin: 0 0 8px; }
.hero p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* 입력 */
form { background: var(--paper-soft); padding: 22px 20px; border-radius: 4px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-weight: 700; margin-bottom: 6px; }
.field small, .check small { color: var(--ink-soft); font-weight: 400; }
input[type=date], input[type=time], input[type=text] { width: 100%; padding: 12px; border: 1.5px solid var(--ink-soft);
  border-radius: 2px; font: inherit; background: #fffbea; color: var(--ink); }
.check { display: flex; gap: 10px; font-size: 14px; color: var(--ink-soft); margin: 4px 0 16px; line-height: 1.6; }
.check input { margin-top: 5px; accent-color: var(--ju); }
.btn { display: block; width: 100%; padding: 15px; border-radius: 2px; border: 1.5px solid var(--ink); background: transparent;
  font: inherit; font-weight: 700; cursor: pointer; color: var(--ink); margin-top: 10px; }
.btn.primary { background: var(--ju); border-color: var(--ju); color: #fff6dc; font-size: 18px; }
.btn.ghost { border: none; text-decoration: underline; color: var(--ink-soft); }
.error { color: var(--ju); font-weight: 700; font-size: 15px; }

/* 결과: 일간 인장 */
.who { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; margin: 8px 0 22px; }
.seal { width: 96px; height: 96px; border: 4px solid var(--ju); color: var(--ju); font-family: var(--display); font-size: 58px;
  display: grid; place-items: center; border-radius: 6px; transform: rotate(-4deg); background: rgba(255,246,220,.5); }
.who h2 { font-family: var(--display); font-weight: 400; font-size: 30px; margin: 0; line-height: 1.2; }
.who .trait { margin: 4px 0 0; color: var(--ju); font-weight: 700; }
.lead { margin: 0 0 28px; }

section.block { margin: 30px 0; }
section.block h3 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 0 0 12px; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.pillar { border: 1.5px solid var(--ink-soft); padding: 8px 2px; background: rgba(255,246,220,.45); }
.pillar .lab { font-size: 12px; color: var(--ink-soft); }
.pillar .hj { font-family: var(--display); font-size: 26px; line-height: 1.3; }
.pillar .ko { font-size: 13px; }
.pillar.me { border: 2.5px solid var(--ju); color: var(--ju); }
.note { font-size: 13px; color: var(--ink-soft); margin: 10px 0 0; }

/* 단 하나의 주인공: 2027 부적 */
.charm { background: var(--paper-soft); border: 3px double var(--ju); padding: 26px 22px 24px; position: relative; margin: 34px 0; }
.charm::before { content: '丁未'; position: absolute; right: 14px; top: 10px; writing-mode: vertical-rl; font-family: var(--display);
  color: var(--ju); opacity: .18; font-size: 64px; line-height: 1; }
.charm .year { font-size: 14px; color: var(--ju); font-weight: 700; margin: 0; }
.charm h2 { font-family: var(--display); font-weight: 400; color: var(--ju); font-size: 38px; line-height: 1.2; margin: 6px 0 14px; max-width: 80%; }
.charm p { margin: 0; }

.elements { display: grid; gap: 8px; }
.el-row { display: grid; grid-template-columns: 30px 1fr 22px; align-items: center; gap: 10px; font-size: 15px; }
.el-row span:first-child { font-family: var(--display); font-size: 18px; }
.el-bar { height: 8px; background: rgba(46,33,17,.12); }
.el-bar i { display: block; height: 100%; }
.tip { margin: 14px 0 0; font-size: 15px; }

.share { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share .btn { margin: 0; font-size: 15px; }

/* 유료 리포트 */
.paid h3 { margin-bottom: 4px; }
.product { border-top: 1.5px solid var(--ink-soft); padding: 16px 0 6px; margin-top: 14px; }
.product h4 { font-size: 18px; margin: 0 0 6px; }
.preview { margin: 0 0 6px; }
.blur { filter: blur(4px); user-select: none; font-size: 14px; color: var(--ink-soft); margin: 0; }

.modal { position: fixed; inset: 0; background: rgba(46,33,17,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.modal-body { background: var(--paper-soft); width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; padding: 28px 22px 36px;
  position: relative; border-top: 4px double var(--ju); }
.modal-body h2 { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.25; margin: 4px 0 12px; }
.report-for { color: var(--ju); font-weight: 700; margin: 0; font-size: 14px; }
.close { position: absolute; right: 10px; top: 6px; border: none; background: none; font-size: 30px; cursor: pointer; color: var(--ink); }
.highlights { margin: 18px 0; }
.highlights p { margin: 0 0 8px; }
.month { border-top: 1px solid rgba(107,86,52,.4); padding: 14px 0 4px; }
.month h5 { font-family: var(--display); font-weight: 400; font-size: 21px; margin: 0; color: var(--ju); display: flex; justify-content: space-between; align-items: baseline; }
.month h5 small { font-family: var(--body); font-size: 13px; color: var(--ink-soft); }
.month p { margin: 6px 0 8px; }
.stars { color: var(--ju); letter-spacing: 1px; }

.foot { font-size: 13px; color: var(--ink-soft); margin-top: 40px; line-height: 1.6; }
.seller { font-size: 12px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--paper-soft);
  padding: 10px 18px; font-size: 15px; z-index: 20; }

@media (prefers-reduced-motion: no-preference) {
  .charm { animation: stamp .5s ease-out both; }
  @keyframes stamp { from { transform: scale(1.04); opacity: 0; } to { transform: none; opacity: 1; } }
}

