/* ==========================================================================
   오라클마크 (OracleMark) — 고판화 변란 카드 · 전각 버튼 · 권수제 히어로 · 원국표
   (Glassmorphism / 둥근 SaaS 카드 / 보라 별빛 클리셰 완전 배제)
   ========================================================================== */

/* ── 고판화 쌍선 변란(雙線邊欄) 카드 ── */
.card {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  border-radius: 0;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 6px 6px 0 var(--ink-shadow);
}

/* 안쪽 가는 변란선 (고서 판각 테두리) */
.card::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid var(--border-fine);
  pointer-events: none;
}

/* 카드 상단 판심·아카이브 분류 바 */
.folio-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  border-bottom: 1px solid var(--border-fine);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.folio-bar span:last-child {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
}

/* ── 버튼 (전각 인장 · 목판 활자 블록) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 0;
  border: 1px solid var(--border-strong);
  background: var(--surface-raised);
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  box-shadow: 3px 3px 0 var(--ink-shadow);
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.12s ease;
}

.btn:hover {
  background: var(--surface-inset);
  border-color: var(--accent);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink-shadow);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink-shadow);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: progress;
}

.btn-primary {
  background: var(--seal-ink);
  color: var(--seal-text);
  border: 2px solid var(--accent);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--seal-ink) 88%, #000);
  color: var(--seal-text);
  border-color: var(--seal-text);
}

.btn-seal-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 0.78rem;
  line-height: 1;
}

.btn-ghost {
  background: var(--surface-inset);
  border-style: dashed;
  box-shadow: none;
}

.btn-ghost:hover {
  border-style: solid;
}

.btn-lg {
  width: 100%;
  padding: 15px 20px;
  font-size: 1.05rem;
  margin-top: 10px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── 히어로 (권수제 卷首題 + 오방 부적 표본가) ── */
.hero {
  display: grid;
  gap: 24px;
  align-items: stretch;
  padding-block: clamp(24px, 4.5vw, 48px) 20px;
}

@media (min-width: 940px) {
  .hero {
    grid-template-columns: 1.12fr 0.88fr;
  }
}

.hero-folio {
  display: grid;
  grid-template-columns: 46px 1fr;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  box-shadow: 6px 6px 0 var(--ink-shadow);
  position: relative;
}

.hero-folio::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid var(--border-fine);
  pointer-events: none;
}

/* 고서 세로 판심(版心) 및 어미(魚尾) 기둥 */
.hero-marginalia {
  border-right: 1px solid var(--border-strong);
  background: var(--surface-inset);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6px;
  font-family: var(--serif);
  user-select: none;
}

.m-fish {
  color: var(--accent);
  font-size: 1.1rem;
}

.m-vert {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--muted);
  font-weight: 700;
}

.m-seal {
  writing-mode: vertical-rl;
  text-orientation: upright;
  background: var(--seal-ink);
  color: var(--seal-text);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  padding: 6px 3px;
  border: 1px solid var(--seal-text);
  outline: 1px solid var(--seal-ink);
}

.hero-text {
  padding: clamp(20px, 3.5vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.archive-stamp-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.eyebrow {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  font-weight: 600;
  margin: 0;
}

.stamp-pill {
  font-family: var(--serif);
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--seal-ink);
  border: 1.5px solid var(--seal-ink);
  padding: 1px 8px;
  letter-spacing: 0.08em;
  transform: rotate(-1deg);
}

.hero h1 {
  font-size: clamp(1.95rem, 4.8vw, 3.1rem);
  font-weight: 900;
  line-height: 1.22;
  margin-bottom: 0.45em;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
  border-bottom: 2px solid var(--seal-ink);
  padding-bottom: 2px;
}

.lead {
  color: var(--muted);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  max-width: 560px;
  margin-bottom: 1.5em;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.hero-specs {
  display: grid;
  gap: 3px;
  border-left: 2px solid var(--border-strong);
  padding-left: 12px;
  font-size: 0.76rem;
  color: var(--muted);
}

.hero-specs b {
  font-family: var(--serif);
  color: var(--text);
  margin-right: 6px;
}

/* 우측 오방 부적 표본가 프레임 */
.hero-fan-frame {
  background: var(--surface-inset);
  border: 2px solid var(--border-strong);
  box-shadow: 6px 6px 0 var(--ink-shadow);
  padding: 14px 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.hero-fan-frame::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid var(--border-fine);
  pointer-events: none;
}

.fan-frame-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  border-bottom: 1px solid var(--border-fine);
  padding-bottom: 8px;
}

.hero-fan {
  position: relative;
  height: clamp(270px, 40vw, 360px);
  margin-top: 8px;
}

.fan-card {
  position: absolute;
  left: 50%;
  top: 52%;
  width: clamp(92px, 13.5vw, 138px);
  aspect-ratio: 3 / 5;
  border-radius: 0;
  overflow: hidden;
  border: 2px solid var(--accent);
  background: #140d07;
  box-shadow: 4px 8px 0 rgba(0, 0, 0, 0.72);
  transform: translate(-50%, -50%) translateX(var(--x)) rotate(var(--r));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), z-index 0s;
}

.fan-card:hover {
  transform: translate(-50%, -56%) translateX(var(--x)) rotate(0deg) scale(1.06);
  z-index: 10 !important;
}

.fan-card svg {
  display: block;
  width: 100%;
  height: 100%;
}

.fan-0 { --x: -108%; --r: -11deg; z-index: 1; }
.fan-1 { --x: -54%; --r: -5.5deg; z-index: 2; }
.fan-2 { --x: 0%; --r: 0deg; z-index: 5; }
.fan-3 { --x: 54%; --r: 5.5deg; z-index: 2; }
.fan-4 { --x: 108%; --r: 11deg; z-index: 1; }

/* ── 생년월일시 명단 기록 폼 ── */
.form {
  display: grid;
  gap: 16px;
}

/* 전각 인장형 단계 번호 (壹 · 貳) */
.step {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 0;
  background: var(--seal-ink);
  color: var(--seal-text);
  border: 1px solid var(--seal-text);
  outline: 1.5px solid var(--seal-ink);
  font: 900 0.88rem var(--serif);
  flex-shrink: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.row.dates label {
  flex: 1 1 96px;
}

.form label {
  display: block;
  font-size: 0.84rem;
  color: var(--muted);
}

.lbl-meta {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--text);
  font-size: 0.83rem;
  margin-bottom: 4px;
}

.lbl-meta small {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--muted);
}

select,
input[type='text'],
input[type='time'] {
  width: 100%;
  margin-top: 2px;
  padding: 10px 12px;
  border-radius: 0;
  border: 1px solid var(--border-strong);
  background: var(--surface-inset);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.96rem;
  min-height: 44px;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.25);
}

input[type='text'] {
  font-family: var(--serif);
}

select option {
  background: var(--surface);
  color: var(--text);
}

.row.time label:first-child {
  flex: 1 1 150px;
}

.check {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.88rem !important;
  color: var(--text) !important;
  padding: 8px 0;
}

.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--seal-ink);
}

.check small {
  color: var(--muted);
}

.field-name {
  margin-top: 2px;
}

/* 양력/음력 스탬프 탭 */
.seg {
  gap: 0;
  border: 1px solid var(--border-strong);
  background: var(--surface-inset);
  padding: 3px;
  width: fit-content;
}

.seg label {
  cursor: pointer;
  margin: 0;
}

.seg input[type='radio'] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg input[type='radio'] + span {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--muted);
  background: transparent;
  transition: background 0.15s, color 0.15s;
}

.seg input[type='radio']:checked + span {
  background: var(--seal-ink);
  color: var(--seal-text);
}

.seg input[type='radio']:focus-visible + span {
  outline: 2px solid var(--accent);
}

.seg .leap-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  padding: 0 12px;
  font-family: var(--serif);
  font-weight: 700;
}

.seg .leap-wrap[hidden] {
  display: none !important;
}

.seg .leap-wrap input {
  position: static;
  opacity: 1;
  pointer-events: auto;
  accent-color: var(--seal-ink);
}

.form-error {
  color: #e05246;
  min-height: 1.3em;
  margin: 4px 0 0;
  font-weight: 700;
  font-size: 0.88rem;
}

/* ── 부적 배접 액자 (Talisman Mount) ── */
.talisman-frame {
  margin: 0;
}

.talisman-mount {
  padding: 12px;
  background: var(--surface-inset);
  border: 2px solid var(--border-strong);
  box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 5px var(--border-fine);
}

.talisman {
  aspect-ratio: 3 / 5;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--accent);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.65);
  background: #1a1206;
}

.talisman svg {
  display: block;
  width: 100%;
  height: 100%;
}

.talisman.reveal {
  animation: woodblockPrint 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes woodblockPrint {
  from {
    clip-path: inset(0 0 100% 0);
    filter: sepia(0.5) contrast(1.3);
  }
  to {
    clip-path: inset(0 0 0 0);
    filter: sepia(0) contrast(1);
  }
}

.talisman-frame figcaption {
  text-align: center;
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-fine);
  letter-spacing: 0.06em;
}

/* ── 사주 명조 감정서 (원국표 · 오행 분포 · 해단서) ── */
.read-title {
  font-size: 1.42rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.phrase-line {
  padding: 12px 14px;
  border-left: 4px solid var(--seal-ink);
  border-top: 1px solid var(--border-fine);
  border-right: 1px solid var(--border-fine);
  border-bottom: 1px solid var(--border-fine);
  background: var(--surface-inset);
  color: var(--muted);
}

.phrase-line b {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--text);
  margin-right: 8px;
}

.phrase-line span {
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.92rem;
}

/* 사주팔자 4기둥 세로 원국표 */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--border-strong);
  background: var(--surface-inset);
  margin: 18px 0;
}

.pil {
  text-align: center;
  display: grid;
  border-right: 1px solid var(--border-strong);
}

.pil:last-child {
  border-right: 0;
}

.pil-h {
  font-family: var(--serif);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  padding: 7px 4px;
  border-bottom: 1px solid var(--border-strong);
  background: var(--surface);
}

.pil.me .pil-h {
  background: var(--seal-ink);
  color: var(--seal-text);
}

.pil-c {
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-fine);
  border-top: 3px solid var(--c, #666);
  background: var(--surface-inset);
}

.pil-c:last-child {
  border-bottom: 0;
}

.pil-c b {
  display: block;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(1.55rem, 4.5vw, 2.05rem);
  color: var(--c, var(--text));
  line-height: 1.15;
}

.pil-c small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-family: var(--serif);
}

.pil.me .pil-c {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface-inset));
}

.pil-c.unknown {
  opacity: 0.45;
  border-top-color: var(--border-fine);
}

/* 오행 기운 막대 도표 */
.elements {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  padding: 14px;
  border: 1px solid var(--border-fine);
  background: var(--surface-inset);
}

.el-row {
  display: grid;
  grid-template-columns: 64px 1fr 24px 48px;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
}

.el-name {
  font-family: var(--serif);
  color: var(--c);
  font-weight: 900;
}

.el-bar {
  height: 12px;
  background: var(--surface);
  border: 1px solid var(--border-fine);
  border-radius: 0;
  overflow: hidden;
}

.el-bar i {
  display: block;
  height: 100%;
  border-radius: 0;
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.el-n {
  text-align: right;
  font-family: var(--mono);
  color: var(--muted);
}

.el-row em {
  font-style: normal;
  font-family: var(--serif);
  font-size: 0.68rem;
  background: var(--seal-ink);
  color: var(--seal-text);
  border-radius: 0;
  padding: 2px 6px;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.reading p {
  color: var(--text);
  line-height: 1.75;
}

.reading .meta {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.82rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-fine);
}

.reading .culture-note {
  color: var(--muted);
  font-size: 0.86rem;
  border-top: 1px dashed var(--border-strong);
  padding-top: 12px;
}

.lucky {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 560px) {
  .lucky {
    grid-template-columns: repeat(4, 1fr);
  }
}

.lucky li {
  background: var(--surface-inset);
  border: 1px solid var(--border-strong);
  border-radius: 0;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
}

.lucky span {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 0.72rem;
}

.lucky strong {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--accent);
}

/* 퍼널 섹션 */
.funnel {
  margin-top: 26px;
}

.funnel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.funnel-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 0;
  border: 1px solid var(--border-strong);
  background: var(--surface-inset);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s;
}

.funnel-card:hover {
  transform: translate(-2px, -2px);
  border-color: var(--accent);
  box-shadow: 4px 4px 0 var(--ink-shadow);
}

.funnel-card strong {
  font-family: var(--serif);
}

.funnel-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.funnel-card em {
  font-style: normal;
  font-family: var(--serif);
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
}

/* 광고 슬롯 */
.ad-slot {
  position: relative;
  width: min(100% - 32px, 970px);
  margin: 18px auto;
  min-height: 110px;
  display: grid;
  place-items: stretch;
}

.ad-slot::before {
  content: attr(data-label);
  position: absolute;
  top: -15px;
  left: 2px;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  opacity: 0.75;
}

.ad-slot .adsbygoogle {
  min-height: 100px;
}

.ad-mid,
.ad-result {
  min-height: 260px;
}

.ad-download {
  min-height: 240px;
  width: 100%;
  margin: 0;
}

.ad-footer {
  min-height: 110px;
}

@media (min-width: 760px) {
  .ad-top {
    min-height: 100px;
  }
  .ad-mid,
  .ad-result {
    min-height: 130px;
  }
}

.house-ad {
  display: grid;
  gap: 4px;
  place-content: center;
  text-align: center;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: 0;
  background: var(--surface-inset);
  color: var(--text);
  text-decoration: none;
}

.house-ad strong {
  font-family: var(--serif);
  font-size: 1.08rem;
}

.house-ad span {
  color: var(--muted);
  font-size: 0.88rem;
}

.house-ad em {
  font-style: normal;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.88rem;
}

/* ── 오방 문화권 문헌록 · FAQ ── */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.about-card h3 {
  font-size: 1.15rem;
  color: var(--accent);
}

.about-card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.93rem;
}

.prose p {
  color: var(--muted);
}

.prose strong {
  color: var(--text);
}

.how {
  margin: 0;
  padding-left: 2.2em;
  display: grid;
  gap: 12px;
  color: var(--muted);
}

.how strong {
  font-family: var(--serif);
  color: var(--text);
}

.faq details {
  margin-bottom: 12px;
  padding: 0;
}

.faq summary {
  cursor: pointer;
  padding: 16px 22px;
  font-family: var(--serif);
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq summary::after {
  content: '印';
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 0.76rem;
  flex-shrink: 0;
}

.faq details[open] summary {
  border-bottom: 1px solid var(--border-fine);
  color: var(--accent);
}

.faq details[open] summary::after {
  background: var(--seal-ink);
  color: var(--seal-text);
  border-color: var(--seal-ink);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details p {
  padding: 16px 22px 18px;
  margin: 0;
  color: var(--muted);
}
