/* =========================================================
 * 사주부검 — 법의학 문서 컨셉
 * ========================================================= */
:root {
  --bg: #0c0c0e;
  --bg-soft: #141417;
  --paper: #f3eee3;
  --paper-dark: #e9e2d2;
  --ink: #1d1a15;
  --ink-soft: #4a443a;
  --red: #b3261e;
  --red-deep: #8c1a14;
  --line: #c9c0ab;
  --mono: "Courier New", ui-monospace, monospace;
  --serif: "Noto Serif KR", serif;
  --sans: "Noto Sans KR", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: #e8e4da;
  font-family: var(--sans);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(179, 38, 30, 0.13), transparent),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(255,255,255,0.006) 2px 4px);
}

.view { display: none; position: relative; z-index: 1; }
.view.active { display: block; }

/* ---------- 신비 연출: 입자 캔버스 / 안개 / 만세력 문양 ---------- */
#mystic-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.fog {
  position: absolute;
  width: 140vw;
  height: 60vh;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}
.fog-1 {
  top: -10vh; left: -30vw;
  background: radial-gradient(ellipse, rgba(179, 38, 30, 0.10), transparent 65%);
  animation: fog-drift 26s ease-in-out infinite alternate;
}
.fog-2 {
  top: 30vh; right: -40vw;
  background: radial-gradient(ellipse, rgba(214, 177, 90, 0.06), transparent 65%);
  animation: fog-drift 34s ease-in-out infinite alternate-reverse;
}
@keyframes fog-drift {
  from { transform: translateX(0) translateY(0); }
  to { transform: translateX(12vw) translateY(6vh); }
}

.manse-wheel {
  position: absolute;
  top: 210px;
  left: 50%;
  width: min(480px, 96vw);
  height: min(480px, 96vw);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.16;
  z-index: 0;
}
.manse-wheel svg { width: 100%; height: 100%; overflow: visible; }
.manse-wheel .ring-outer {
  animation: wheel-spin 90s linear infinite;
  transform-origin: center;
}
.manse-wheel .ring-inner {
  animation: wheel-spin 60s linear infinite reverse;
  transform-origin: center;
}
@keyframes wheel-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.manse-wheel text {
  fill: #d6b15a;
  font-family: var(--serif);
}
.manse-wheel circle { stroke: rgba(214, 177, 90, 0.5); fill: none; }

.autopsy-wheel {
  top: 46%;
  opacity: 0.1;
}
.autopsy-wheel text { fill: var(--red); }
.autopsy-wheel circle { stroke: rgba(179, 38, 30, 0.5); }
.autopsy-wheel .ring-outer { animation-duration: 30s; }
.autopsy-wheel .ring-inner { animation-duration: 20s; }

.hero { position: relative; }
.autopsy-room { position: relative; }
.hero > *:not(.manse-wheel),
.autopsy-room > *:not(.manse-wheel) { position: relative; z-index: 1; }

.logo {
  text-shadow: 0 0 30px rgba(179, 38, 30, 0.0);
  animation: logo-glow 4s ease-in-out infinite alternate;
}
@keyframes logo-glow {
  from { text-shadow: 0 0 14px rgba(179, 38, 30, 0.12); }
  to { text-shadow: 0 0 42px rgba(179, 38, 30, 0.45), 0 0 80px rgba(179, 38, 30, 0.18); }
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ---------- 랜딩 ---------- */
.hero {
  text-align: center;
  padding: 72px 0 40px;
}

.badge-line {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: #8a857a;
  text-transform: uppercase;
}

.logo {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(52px, 13vw, 88px);
  line-height: 1.1;
  margin: 18px 0 8px;
  color: #f3eee3;
  letter-spacing: 6px;
}
.logo .red { color: var(--red); }

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(16px, 4vw, 20px);
  color: #b8b2a4;
  margin-bottom: 6px;
}

.hero-desc {
  font-size: 14px;
  color: #77726a;
  line-height: 1.8;
  margin: 20px auto 36px;
  max-width: 420px;
}

.case-tape {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 4px;
  color: #111;
  background: repeating-linear-gradient(45deg, #d8b93a 0 18px, #171717 18px 36px);
  padding: 0;
  margin: 26px 0 0;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
}
.case-tape span {
  display: inline-block;
  background: #e6c93f;
  color: #171310;
  font-weight: 700;
  padding: 8px 0;
  width: 100%;
  animation: tape-slide 18s linear infinite;
}
@keyframes tape-slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 17px;
  color: #f6f2e8;
  background: var(--red);
  border: none;
  border-radius: 4px;
  padding: 17px 44px;
  cursor: pointer;
  letter-spacing: 2px;
  box-shadow: 0 8px 30px rgba(179, 38, 30, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s;
}
.btn:hover { background: #c9362c; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: transparent;
  border: 1px solid #55504a;
  color: #c9c3b6;
  box-shadow: none;
  font-size: 14px;
  padding: 13px 26px;
}
.btn.secondary:hover { border-color: #8a8478; background: rgba(255,255,255,0.04); }

/* ---------- 랜딩 섹션 공통 ---------- */
.hero-cta { font-size: 18px; padding: 18px 52px; }
.hero-free-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: #8f8a7f;
  letter-spacing: 0.5px;
}
.hero-free-note b { color: #d6b15a; }

.land-section {
  margin: 74px auto 0;
  max-width: 640px;
  text-align: center;
}
.land-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--red);
  margin-bottom: 10px;
}
.land-title {
  font-family: var(--serif);
  font-size: clamp(22px, 5.4vw, 30px);
  font-weight: 900;
  color: #f0ebdd;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.land-sub {
  font-size: 13.5px;
  color: #8f8a7f;
  margin-bottom: 22px;
  line-height: 1.8;
}
.land-note {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 15px;
  color: #b8b2a4;
}
.land-note b { color: var(--red); }
.land-final { padding-bottom: 20px; }
.land-final .land-sub { margin-bottom: 26px; }

/* 고민 카드 */
.pain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
  text-align: left;
}
.pain-card {
  border: 1px solid #2a2a2e;
  border-left: 3px solid var(--red);
  border-radius: 4px;
  background: var(--bg-soft);
  padding: 16px 16px;
  font-family: var(--serif);
  font-size: 14px;
  color: #c9c3b6;
  line-height: 1.7;
  word-break: keep-all;
}
.pain-card b { color: #f0ebdd; }

/* 프로세스 */
.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}
.step-card {
  border: 1px solid #2a2a2e;
  border-radius: 6px;
  background: var(--bg-soft);
  padding: 22px 14px;
}
.step-no {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--red);
  letter-spacing: 2px;
}
.step-name {
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 900;
  color: #f0ebdd;
  margin: 8px 0 10px;
}
.step-card p {
  font-size: 12px;
  color: #8f8a7f;
  line-height: 1.8;
}

/* 예시 진단서 */
.sample-cert-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: center;
  text-align: left;
  margin-top: 24px;
}
.sample-cert {
  margin-top: 0;
  padding: 24px 20px 30px;
  transform: rotate(-1.6deg);
  position: relative;
}
.sample-cert::before { display: none; }
.sample-watermark {
  position: absolute;
  top: 10px; right: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: #8d8571;
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 2px;
  z-index: 2;
}
.sample-cert .cert-title { border-bottom: 2px double var(--ink); padding-bottom: 10px; }
.sample-cert .cert-table th { width: 74px; padding: 9px 8px; font-size: 12px; }
.sample-cert .cert-table td { padding: 9px 10px; }
.sample-cert .cause-title { font-size: 14.5px; }
.sample-cert .cause-detail { font-size: 12px; }
.sample-stamp {
  position: absolute;
  right: 18px; bottom: 14px;
  width: 74px; height: 74px;
  border: 3px solid var(--red);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--red);
  font-family: var(--serif);
  font-weight: 900;
  font-size: 19px;
  transform: rotate(-14deg);
  opacity: 0.85;
}
.sample-points {
  list-style: none;
}
.sample-points li {
  font-size: 13.5px;
  color: #b8b2a4;
  line-height: 1.75;
  padding: 10px 0 10px 26px;
  position: relative;
  border-bottom: 1px solid #222226;
  word-break: keep-all;
}
.sample-points li::before {
  content: "✦";
  position: absolute;
  left: 4px;
  color: #d6b15a;
}
.sample-points li b { color: #f0ebdd; }

/* FAQ */
.faq {
  text-align: left;
  border: 1px solid #2a2a2e;
  border-radius: 5px;
  background: var(--bg-soft);
  margin-top: 10px;
  padding: 0 18px;
}
.faq summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 14.5px;
  font-weight: 700;
  color: #d8d2c2;
  padding: 15px 0;
  list-style: none;
  position: relative;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  color: var(--red);
  font-family: var(--mono);
}
.faq[open] summary::after { content: "−"; }
.faq p {
  font-size: 13px;
  color: #8f8a7f;
  line-height: 1.85;
  padding-bottom: 16px;
  word-break: keep-all;
}

/* 상품 카드 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 10px auto 0;
  text-align: left;
}
.product-card {
  border: 1px solid #2e2e33;
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 20px 18px 16px;
  cursor: pointer;
  position: relative;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.product-badge {
  position: absolute;
  top: 14px; right: 14px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 9px;
  border-radius: 2px;
}
.product-badge.best { background: var(--red); color: #fff; }
.product-badge.new { background: #3f8f5b; color: #fff; }
.product-badge.premium { background: #d6b15a; color: #171310; }
.product-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px dashed #333;
}
.product-price .p-was {
  font-size: 11.5px;
  color: #63605a;
  text-decoration: line-through;
}
.product-price .p-off {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
}
.product-price .p-now {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 900;
  color: #f0ebdd;
  margin-left: auto;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--red);
  box-shadow: 0 14px 40px rgba(179, 38, 30, 0.22);
}
.product-card.year:hover {
  border-color: #3f8f5b;
  box-shadow: 0 14px 40px rgba(63, 143, 91, 0.2);
}
.product-icon { font-size: 26px; margin-bottom: 10px; }
.product-name {
  font-family: var(--serif);
  font-size: 17.5px;
  font-weight: 900;
  color: #f0ebdd;
}
.product-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1px;
  color: var(--red);
  margin: 5px 0 10px;
}
.product-card.year .product-tag { color: #4fa370; }
.product-desc {
  font-size: 12.5px;
  color: #8f8a7f;
  line-height: 1.7;
}
.product-cta {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: #d8d2c2;
}

/* 등급표 (신년 검진) */
.grade-row { display: flex; align-items: center; gap: 12px; margin-top: 13px; }
.grade-row .gname { font-family: var(--serif); font-weight: 900; font-size: 14px; width: 96px; }
.grade-row .gbar {
  flex: 1; height: 14px;
  background: rgba(29,26,21,0.07);
  border: 1px solid var(--ink-soft);
  border-radius: 2px;
  overflow: hidden;
}
.grade-row .gfill { height: 100%; }
.grade-row .gletter {
  font-family: var(--mono);
  font-size: 17px; font-weight: 700;
  width: 24px; text-align: center;
}
.gfill.g-A, .gletter.g-A { background-color: #3d7a3f; color: #2f6331; }
.gfill.g-B, .gletter.g-B { background-color: #a5812e; color: #7d6122; }
.gfill.g-C, .gletter.g-C { background-color: #7a7f88; color: #5c616a; }
.gfill.g-D, .gletter.g-D { background-color: var(--red); color: var(--red-deep); }
.gletter { background: none !important; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 44px;
  font-family: var(--mono);
}
.hero-stats .stat { text-align: center; }
.hero-stats .num { font-size: 22px; color: #e8e2d2; font-weight: 700; }
.hero-stats .lab { font-size: 11px; color: #6e6960; letter-spacing: 2px; margin-top: 4px; }

/* ---------- 접수(폼): 서류 양식 ---------- */
.paper {
  background: var(--paper);
  color: var(--ink);
  border-radius: 3px;
  padding: 34px 30px 38px;
  margin-top: 30px;
  position: relative;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(88,70,40,0.05) 27px 28px);
}
.paper::before {
  content: "";
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 130px; height: 26px;
  background: rgba(214, 205, 180, 0.85);
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

.doc-head {
  text-align: center;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 14px;
  margin-bottom: 24px;
}
.doc-head .doc-no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 2px;
}
.doc-head h2 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 10px;
  margin: 8px 0 4px;
}
.doc-head .doc-sub { font-size: 12.5px; color: var(--ink-soft); }

.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.form-row input[type="text"],
.form-row input[type="date"],
.form-row select {
  width: 100%;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--ink-soft);
  padding: 8px 2px;
  border-radius: 0;
  outline: none;
}
.form-row input:focus, .form-row select:focus { border-bottom-color: var(--red); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }

.seg {
  display: flex; gap: 8px;
}
.seg button {
  flex: 1;
  font-family: var(--sans);
  font-size: 14.5px;
  padding: 11px 0;
  background: transparent;
  color: var(--ink-soft);
  border: 1.5px solid var(--ink-soft);
  border-radius: 3px;
  cursor: pointer;
}
.seg button.on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  font-weight: 700;
}

.check-row {
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; color: var(--ink-soft);
  margin-top: 8px;
  cursor: pointer;
  user-select: none;
}
.check-row input { width: 16px; height: 16px; accent-color: var(--red); cursor: pointer; }

.form-note {
  font-size: 11.5px; color: #8d8571;
  line-height: 1.7; margin-top: 18px;
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.submit-wrap { text-align: center; margin-top: 26px; }
.submit-wrap .btn { width: 100%; font-size: 16.5px; }

/* ---------- 부검 진행 ---------- */
.autopsy-room {
  max-width: 520px;
  margin: 70px auto 0;
  font-family: var(--mono);
}
.autopsy-title {
  text-align: center;
  color: #b8b2a4;
  letter-spacing: 4px;
  font-size: 13px;
  margin-bottom: 8px;
}
.autopsy-subject {
  text-align: center;
  font-family: var(--serif);
  font-size: 26px;
  color: #f0ebdd;
  margin-bottom: 34px;
  letter-spacing: 2px;
}
.scan-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  animation: scan 1.6s ease-in-out infinite;
  margin-bottom: 30px;
}
@keyframes scan { 0%,100% { opacity: 0.2; } 50% { opacity: 1; } }

.autopsy-steps { list-style: none; }
.autopsy-steps li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 6px;
  border-bottom: 1px solid #232326;
  font-size: 14px;
  color: #55524b;
  transition: color 0.3s;
}
.autopsy-steps li.doing { color: #d8d2c2; }
.autopsy-steps li.done { color: #8f897c; }
.autopsy-steps li .st { font-size: 12px; letter-spacing: 1px; }
.autopsy-steps li.doing .st { color: var(--red); animation: blink 0.9s step-end infinite; }
.autopsy-steps li.done .st { color: #4f7d51; }
@keyframes blink { 50% { opacity: 0.15; } }

/* ---------- 리포트 공통 ---------- */
.report-top {
  text-align: center;
  padding: 46px 0 6px;
}
.report-top .badge-line { margin-bottom: 10px; }
.report-top h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 8vw, 44px);
  letter-spacing: 8px;
  color: #f3eee3;
}

/* 사망진단서 */
.death-cert { margin-top: 26px; }
.death-cert .cert-title {
  font-family: var(--serif);
  text-align: center;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 14px;
  border-bottom: 2.5px double var(--ink);
  padding-bottom: 14px;
  margin-bottom: 4px;
}
.cert-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 1px;
  padding: 8px 2px 16px;
}

.cert-table { width: 100%; border-collapse: collapse; }
.cert-table th, .cert-table td {
  border: 1px solid var(--ink-soft);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}
.cert-table th {
  width: 92px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  background: rgba(29,26,21,0.06);
  white-space: nowrap;
}
.cert-table td .cause-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 16.5px;
  color: var(--red-deep);
  line-height: 1.5;
}
.cert-table td .cause-detail {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 5px;
  line-height: 1.65;
}
.cert-table td.plain { font-size: 15px; font-weight: 700; }

/* 위험도 게이지 */
.risk-wrap { margin-top: 22px; }
.risk-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--serif); font-weight: 700; font-size: 14px;
  letter-spacing: 2px; margin-bottom: 8px;
}
.risk-head .pct { font-size: 30px; color: var(--red-deep); font-family: var(--mono); font-weight: 700; }
.risk-bar {
  height: 14px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  overflow: hidden;
  background: rgba(29,26,21,0.05);
}
.risk-bar .fill {
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(45deg, var(--red) 0 10px, var(--red-deep) 10px 20px);
  transition: width 1.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.risk-note { font-size: 11.5px; color: #8d8571; margin-top: 6px; }

/* 도장 */
.stamp {
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 108px; height: 108px;
  border: 4px solid var(--red);
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--red);
  font-family: var(--serif);
  font-weight: 900;
  transform: rotate(-14deg) scale(3);
  opacity: 0;
  pointer-events: none;
}
.stamp .big { font-size: 26px; letter-spacing: 4px; }
.stamp .small { font-size: 10px; letter-spacing: 2px; margin-top: 2px; }
.stamp.stamped {
  animation: stamp-in 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) forwards;
}
@keyframes stamp-in {
  0% { transform: rotate(-14deg) scale(3); opacity: 0; }
  60% { transform: rotate(-14deg) scale(0.92); opacity: 1; }
  100% { transform: rotate(-14deg) scale(1); opacity: 0.88; }
}

/* 원국 표 */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.pillar-cell {
  border: 1.5px solid var(--ink-soft);
  border-radius: 3px;
  text-align: center;
  padding: 12px 4px 14px;
  background: rgba(255,255,255,0.35);
}
.pillar-cell.day-cell { border-color: var(--red-deep); border-width: 2px; background: rgba(179,38,30,0.06); }
.pillar-cell .pos {
  font-size: 10.5px; letter-spacing: 2px; color: var(--ink-soft);
  font-family: var(--mono);
}
.pillar-cell .gj {
  font-family: var(--serif);
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 900;
  margin-top: 6px;
  letter-spacing: 2px;
}
.pillar-cell .gj small { display: block; font-size: 11px; color: var(--ink-soft); font-weight: 400; margin-top: 2px; }
.pillar-cell.empty .gj { color: #b1a98f; font-size: 16px; padding: 8px 0; }

/* 섹션 카드(소견) */
.section-card { margin-top: 26px; }
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--red-deep);
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--serif);
  font-size: 18.5px;
  font-weight: 900;
  line-height: 1.5;
}
.section-sub {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--red-deep);
  margin-top: 3px;
}
.section-text {
  font-size: 14.5px;
  line-height: 2.0;
  color: #33302a;
  margin-top: 12px;
  font-family: var(--serif);
  word-break: keep-all;
}

/* 오행 그래프 */
.elem-chart { margin-top: 16px; }
.elem-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.elem-row .ename {
  font-family: var(--serif); font-weight: 900; font-size: 14px; width: 52px;
}
.elem-row .ebar {
  flex: 1; height: 15px;
  background: rgba(29,26,21,0.07);
  border: 1px solid var(--ink-soft);
  border-radius: 2px;
  overflow: hidden;
}
.elem-row .efill {
  height: 100%; width: 0;
  transition: width 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.elem-row .ecnt { font-family: var(--mono); font-size: 12.5px; width: 22px; text-align: right; }
.e0 { background: #3d7a3f; } /* 목 */
.e1 { background: #b3261e; } /* 화 */
.e2 { background: #a5812e; } /* 토 */
.e3 { background: #7a7f88; } /* 금 */
.e4 { background: #2d5d8f; } /* 수 */

/* 신살 검사 패널 */
.sinsal-panel { margin-top: 16px; }
.sinsal-item {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px dashed var(--line);
}
.sinsal-item .sname { font-family: var(--serif); font-weight: 900; font-size: 15px; white-space: nowrap; }
.sinsal-item .sname small { font-weight: 400; color: var(--ink-soft); font-size: 11px; margin-left: 5px; }
.sinsal-item .stag { flex: 1; font-size: 12.5px; color: var(--ink-soft); }
.verdict {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 3px 10px;
  border-radius: 2px;
  white-space: nowrap;
}
.verdict.pos { color: #fff; background: var(--red); }
.verdict.neg { color: #777162; border: 1px solid var(--line); }

/* 처방전 + 코멘트 */
.rx-head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-weight: 900; font-size: 19px;
  letter-spacing: 4px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px; margin-bottom: 14px;
}
.rx-head .rx-mark {
  font-size: 26px; color: var(--red-deep); font-style: italic; font-family: Georgia, serif;
}
.coroner-quote {
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.9;
  color: var(--ink);
  border-left: 3px solid var(--red);
  padding: 4px 0 4px 16px;
  margin-top: 14px;
  word-break: keep-all;
}
.coroner-sign {
  text-align: right;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 16px;
}
.coroner-sign .sig { font-size: 19px; font-weight: 900; color: var(--ink); letter-spacing: 3px; }

/* 액션 버튼들 */
.report-actions {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 34px;
  align-items: center;
}
.report-actions .btn { width: 100%; max-width: 420px; }

.footer-note {
  text-align: center;
  font-size: 11px;
  color: #55514a;
  line-height: 1.8;
  margin-top: 46px;
}

/* ---------- 부검의 캐릭터 ---------- */
.coroner-intro {
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 480px;
  margin: 10px auto 60px;
  padding: 22px 24px;
  border: 1px solid #2a2a2e;
  border-radius: 6px;
  background: var(--bg-soft);
}
.coroner-portrait {
  width: 96px; height: 96px;
  flex: none;
  border-radius: 6px;
  overflow: hidden;
  background: #1b1b1f;
  border: 1px solid #333;
}
.coroner-portrait svg { width: 100%; height: 100%; display: block; }
.coroner-portrait.small { width: 72px; height: 72px; }
.coroner-name { font-family: var(--serif); font-size: 17px; color: #e8e2d2; }
.coroner-name b { color: #f3eee3; font-size: 19px; letter-spacing: 2px; }
.coroner-title { font-size: 11.5px; color: #77726a; margin: 3px 0 10px; letter-spacing: 1px; }
.coroner-line {
  font-family: var(--serif);
  font-size: 13.5px;
  color: #b8b2a4;
  line-height: 1.75;
  word-break: keep-all;
}
.coroner-line b { color: var(--red); }

/* ---------- 부검실: 심전도 ---------- */
.ecg-wrap {
  border: 1px solid #223026;
  border-radius: 4px;
  background: #0a120c;
  padding: 8px 10px 6px;
  margin-bottom: 26px;
}
#ecg { width: 100%; height: 64px; display: block; }
#ecg-line {
  stroke-dasharray: 1400;
  animation: ecg-run 2.6s linear infinite;
  filter: drop-shadow(0 0 4px rgba(63,191,107,0.7));
}
@keyframes ecg-run {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -1400; }
}
#ecg.flatline #ecg-line {
  animation: none;
  filter: drop-shadow(0 0 4px rgba(179,38,30,0.8));
  stroke: var(--red);
}
.ecg-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 2px;
  color: #3f7a52;
  padding: 4px 2px 2px;
}
#ecg.flatline + .ecg-label, .ecg-label.dead { color: var(--red); }

/* ---------- 부검실: 대사 ---------- */
.operating-table {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 26px;
}
.dialogue-box {
  flex: 1;
  border: 1px solid #2a2a2e;
  border-radius: 6px;
  background: var(--bg-soft);
  padding: 12px 16px 14px;
  min-height: 74px;
}
.dialogue-name {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 3px;
  margin-bottom: 6px;
}
.dialogue-text {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.8;
  color: #e4dfd2;
  word-break: keep-all;
  min-height: 28px;
}
.dialogue-text .caret {
  display: inline-block;
  width: 8px; height: 17px;
  background: var(--red);
  margin-left: 3px;
  vertical-align: -2px;
  animation: blink 0.8s step-end infinite;
}

/* ---------- 잠금(블러) ---------- */
.locked .lockable { position: relative; }
.locked .lockable > * {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
}
.locked .lockable::after {
  content: "🔒 정밀 부검 보고서에서 공개";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  color: var(--red-deep);
  letter-spacing: 1px;
  cursor: pointer;
}
.locked .cert-table td.lockable > * { filter: blur(6px); }

/* ---------- 페이월 ---------- */
.paywall { margin-top: 30px; border: 2px solid var(--red-deep); }
.paywall-head { text-align: center; margin-bottom: 18px; }
.paywall-title {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 8px;
  margin: 6px 0 10px;
}
.paywall-sub { font-size: 13px; color: var(--ink-soft); line-height: 1.8; }

.toc { list-style: none; border-top: 2px solid var(--ink); }
.toc li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
}
.toc li > div { flex: 1; }
.toc-no {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--red-deep);
}
.toc li b { font-family: var(--serif); font-size: 15px; display: block; }
.toc li small { font-size: 12px; color: var(--ink-soft); display: block; margin-top: 2px; }
.toc-lock { font-size: 14px; }

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
}
.price-was {
  font-size: 14px;
  color: #8d8571;
  text-decoration: line-through;
}
.price-now {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 900;
  color: var(--red-deep);
}
.price-now small { font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.paywall-note {
  text-align: center;
  font-size: 11.5px;
  color: #8d8571;
  margin-top: 14px;
}

/* ---------- 프리미엄 존 ---------- */
.premium-banner {
  margin-top: 34px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  color: #e6c93f;
  border: 1px dashed #6b5d1e;
  border-radius: 4px;
  padding: 12px;
  background: rgba(230, 201, 63, 0.05);
}

.compat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.compat-cell { border: 1.5px solid var(--ink-soft); border-radius: 4px; padding: 16px 14px; }
.compat-cell.good { border-color: #3d7a3f; background: rgba(61,122,63,0.06); }
.compat-cell.bad { border-color: var(--red-deep); background: rgba(179,38,30,0.05); }
.compat-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.compat-cell.good .compat-tag { color: #2f6331; }
.compat-cell.bad .compat-tag { color: var(--red-deep); }
.compat-alias { font-family: var(--serif); font-size: 17px; font-weight: 900; }
.compat-reason { font-size: 13px; line-height: 1.85; color: #33302a; margin-top: 8px; font-family: var(--serif); word-break: keep-all; }

.vuln-item {
  border-left: 3px solid var(--red);
  padding: 8px 0 8px 14px;
  margin-top: 14px;
}
.vuln-item .vt { font-family: var(--serif); font-weight: 900; font-size: 15.5px; color: var(--red-deep); }
.vuln-item .vd { font-size: 13.5px; color: #33302a; margin-top: 4px; line-height: 1.75; font-family: var(--serif); }

/* ---------- 대운 타임라인 ---------- */
.daeun-timeline {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 14px 2px 8px;
}
.daeun-cell {
  flex: 0 0 auto;
  min-width: 68px;
  text-align: center;
  border: 1.5px solid var(--ink-soft);
  border-radius: 3px;
  padding: 10px 6px;
  background: rgba(255,255,255,0.35);
}
.daeun-cell.cur {
  border-color: var(--red-deep);
  border-width: 2px;
  background: rgba(179,38,30,0.07);
}
.daeun-cell .d-age {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-soft);
}
.daeun-cell.cur .d-age { color: var(--red-deep); font-weight: 700; }
.daeun-cell .d-gj {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 900;
  margin: 5px 0 3px;
}
.daeun-cell .d-tg {
  font-size: 11px;
  color: var(--ink-soft);
}

/* ---------- 모달 ---------- */
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(5,5,6,0.78);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card { max-width: 420px; width: 100%; margin-top: 0; }
.modal-text {
  font-size: 13.5px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.9;
  margin: 6px 0 4px;
}

@media (max-width: 480px) {
  .compat-grid { grid-template-columns: 1fr; }
  .coroner-intro { flex-direction: row; gap: 16px; padding: 18px 16px; }
  .product-grid { grid-template-columns: 1fr; }
  .grade-row .gname { width: 84px; font-size: 13px; }
  .pain-grid { grid-template-columns: 1fr; }
  .step-grid { grid-template-columns: 1fr; }
  .sample-cert-wrap { grid-template-columns: 1fr; }

  .paper { padding: 26px 18px 30px; }
  .form-grid { grid-template-columns: 1fr; }
  .cert-table th { width: 68px; padding: 10px 8px; letter-spacing: 1px; }
  .cert-table td { padding: 10px 10px; }
  .death-cert .cert-title { letter-spacing: 8px; font-size: 24px; }
  .stamp { width: 88px; height: 88px; right: 12px; bottom: 12px; }
  .stamp .big { font-size: 20px; }
}

/* =========================================================
 * 트렌디 타이포그래피 오버라이드
 * 다크 UI = Pretendard(모던 산세리프), 종이 문서 안 = 명조 유지
 * ========================================================= */
:root {
  --sans: "Pretendard Variable", Pretendard, "Noto Sans KR", sans-serif;
}

body { font-family: var(--sans); }

/* 히어로 */
.logo {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -2px;
}
.hero-sub {
  font-family: var(--sans);
  font-weight: 600;
  color: #d8d2c5;
  letter-spacing: -0.3px;
}
.hero-desc {
  color: #a8a295;
  font-size: 15px;
  letter-spacing: -0.2px;
}
.hero-stats .num { font-family: var(--sans); font-weight: 800; }

/* 랜딩 섹션 */
.land-title {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.8px;
}
.land-sub { color: #a09a8d; font-size: 14px; letter-spacing: -0.2px; }
.land-note { font-family: var(--sans); color: #c5bfb2; letter-spacing: -0.2px; }
.pain-card {
  font-family: var(--sans);
  color: #d0cabd;
  font-size: 14.5px;
  letter-spacing: -0.2px;
}
.step-name { font-family: var(--sans); font-weight: 800; letter-spacing: -0.4px; }
.step-card p { color: #a29c8f; font-size: 12.5px; }
.sample-points li { color: #c0bab0; font-size: 14px; letter-spacing: -0.2px; }
.faq summary { font-family: var(--sans); font-weight: 700; letter-spacing: -0.3px; }
.faq p { color: #a09a8d; font-size: 13.5px; }
.footer-note { color: #6b665e; }

/* 상품 카드 */
.product-name { font-family: var(--sans); font-weight: 800; letter-spacing: -0.5px; }
.product-desc { color: #a29c8f; font-size: 13px; letter-spacing: -0.2px; }
.product-cta { letter-spacing: -0.2px; }

/* 부검의 / 부검실 */
.coroner-name { font-family: var(--sans); font-weight: 700; }
.coroner-name b { letter-spacing: 0; }
.coroner-line { font-family: var(--sans); color: #c5bfb2; letter-spacing: -0.2px; }
.coroner-title { color: #8a857a; }
.autopsy-subject {
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -0.5px;
}
.dialogue-name { font-family: var(--sans); letter-spacing: 2px; }
.dialogue-text {
  font-family: var(--sans);
  font-size: 15.5px;
  color: #ece7da;
  letter-spacing: -0.2px;
  font-weight: 500;
}
.autopsy-steps li { font-size: 13.5px; }
.autopsy-steps li.doing { color: #e4ded0; }

/* 리포트 상단 */
.report-top h1 { font-family: var(--sans); font-weight: 900; letter-spacing: 2px; }

/* 종이 문서 내부 가독성 상향 (명조 유지하되 본문만 살짝 키움) */
.section-text { font-size: 15px; line-height: 2.05; color: #2e2b25; }
.cause-detail { font-size: 13.5px; }

/* =========================================================
 * 앱 프레임 리디자인 — 모바일 앱 스타일
 * ========================================================= */
:root { --calli: "Nanum Brush Script", cursive; --frame: 430px; }

body {
  background: #050506;
  background-image: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(179,38,30,0.05), transparent);
}

/* 모든 화면을 가운데 앱 컬럼으로 */
.view {
  max-width: var(--frame);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  background-image: radial-gradient(ellipse 90% 40% at 50% -5%, rgba(179,38,30,0.12), transparent);
  box-shadow: 0 0 90px rgba(0,0,0,0.85);
  border-left: 1px solid #1a1a1d;
  border-right: 1px solid #1a1a1d;
  overflow-x: hidden;
}
.container { max-width: 100%; padding: 0 16px 90px; }
.fog { display: none; }

/* ---------- 상단바 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  background: rgba(12,12,14,0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.topbar-logo {
  font-family: var(--sans);
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -1px;
  color: #f3eee3;
}
.topbar-logo span { color: var(--red); }
.topbar-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #a09a8d;
  border: 1px solid #26262a;
  border-radius: 30px;
  padding: 6px 11px;
  background: rgba(255,255,255,0.02);
}
.topbar-live i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #e33;
  animation: blink 1.4s ease infinite;
}

/* ---------- 카테고리 칩 ---------- */
.chips {
  display: flex;
  gap: 7px;
  padding: 12px 16px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  color: #b6b0a3;
  background: #17171a;
  border: 1px solid #232327;
  border-radius: 30px;
  padding: 8px 15px;
  cursor: pointer;
  transition: all 0.15s;
}
.chip.on {
  background: #f3eee3;
  color: #111;
  border-color: #f3eee3;
  font-weight: 800;
}

/* ---------- 포스터 캐러셀 ---------- */
.poster-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2px 24px 6px;
  scrollbar-width: none;
}
.poster-carousel::-webkit-scrollbar { display: none; }
.poster {
  position: relative;
  flex: 0 0 88%;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  scroll-snap-align: center;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.2s ease;
}
.poster:active { transform: scale(0.98); }

.poster-bg {
  position: absolute;
  inset: 0;
}
/* 이미지 교체 지점: .poster-bg 에 background-image 를 넣으면 한자 아트 위에 덮입니다 */
.poster-bg.love {
  background:
    radial-gradient(ellipse 90% 60% at 70% 20%, rgba(179,38,30,0.5), transparent 65%),
    radial-gradient(ellipse 80% 50% at 20% 90%, rgba(90,10,20,0.55), transparent 60%),
    linear-gradient(160deg, #17070a, #0a0507 55%, #12060b);
}
.poster-bg.money {
  background:
    radial-gradient(ellipse 90% 60% at 70% 15%, rgba(214,177,90,0.35), transparent 60%),
    radial-gradient(ellipse 70% 50% at 15% 90%, rgba(120,85,20,0.35), transparent 60%),
    linear-gradient(160deg, #151007, #0b0805 55%, #120d06);
}
.poster-bg.year {
  background:
    radial-gradient(ellipse 90% 60% at 65% 15%, rgba(230,80,40,0.4), transparent 60%),
    radial-gradient(ellipse 70% 50% at 20% 95%, rgba(214,177,90,0.25), transparent 55%),
    linear-gradient(160deg, #170c07, #0c0705 55%, #140a06);
}
.poster-bg.full {
  background:
    radial-gradient(ellipse 90% 60% at 70% 18%, rgba(120,70,180,0.35), transparent 60%),
    radial-gradient(ellipse 70% 50% at 20% 92%, rgba(179,38,30,0.3), transparent 60%),
    linear-gradient(160deg, #100a17, #080609 55%, #0e0812);
}
.poster-bg.gunghap {
  background:
    radial-gradient(ellipse 90% 60% at 68% 15%, rgba(220,60,110,0.4), transparent 62%),
    radial-gradient(ellipse 70% 50% at 18% 92%, rgba(120,20,60,0.4), transparent 60%),
    linear-gradient(160deg, #180712, #0b0509 55%, #120610);
}
.poster-bg.daeun {
  background:
    radial-gradient(ellipse 90% 60% at 68% 15%, rgba(50,110,190,0.38), transparent 62%),
    radial-gradient(ellipse 70% 50% at 18% 92%, rgba(20,50,100,0.4), transparent 60%),
    linear-gradient(160deg, #071018, #05080c 55%, #060d14);
}
.p-hanja, .p-hanja2 {
  position: absolute;
  font-family: var(--serif);
  font-weight: 900;
  color: rgba(243,238,227,0.07);
  line-height: 1;
  user-select: none;
}
.p-hanja { font-size: 230px; top: 4%; right: -6%; }
.p-hanja2 { font-size: 130px; bottom: 16%; left: -4%; color: rgba(243,238,227,0.05); }

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5,5,7,0.55) 72%, rgba(5,5,7,0.92));
  pointer-events: none;
}

.poster-count {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 11px;
  color: #ddd;
  background: rgba(0,0,0,0.45);
  border-radius: 20px;
  padding: 4px 10px;
  backdrop-filter: blur(6px);
}
.poster-text {
  position: absolute;
  left: 0; right: 0;
  bottom: 52px;
  z-index: 2;
  text-align: center;
  padding: 0 18px;
}
.p-pre {
  font-family: var(--calli);
  font-size: 26px;
  color: #d9d2c2;
  opacity: 0.85;
}
.p-main {
  font-family: var(--calli);
  font-size: clamp(50px, 15vw, 64px);
  line-height: 1.04;
  background: linear-gradient(175deg, #f7ead0 20%, #d9b264 60%, #a97f35);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 14px rgba(0,0,0,0.6));
}
.p-sub {
  font-family: var(--calli);
  font-size: 22px;
  color: #cfc8b8;
  margin-top: 8px;
  letter-spacing: 1px;
}
.p-dept {
  position: absolute;
  bottom: 16px; left: 0; right: 0;
  z-index: 2;
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 2px;
  color: rgba(214,177,90,0.75);
}

.free-strip {
  margin: 14px 16px 4px;
  text-align: center;
  font-size: 12.5px;
  color: #a09a8d;
  border: 1px dashed #2b2b30;
  border-radius: 10px;
  padding: 11px;
  background: rgba(255,255,255,0.015);
}
.free-strip b { color: #d6b15a; }

/* ---------- 랭킹 리스트 ---------- */
.rank-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  text-align: left;
  margin-bottom: 14px;
}
.rank-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.5px;
  color: #f0ebdd;
}
.rank-count { font-size: 11.5px; color: #77726a; }
.rank-count b { color: #d6b15a; }
.rank-list { text-align: left; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.rank-item:hover { background: rgba(255,255,255,0.035); }
.rank-no {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: #8f8a7f;
  width: 16px;
  text-align: center;
}
.rank-item:nth-child(1) .rank-no { color: var(--red); }
.rank-thumb {
  width: 52px; height: 52px;
  flex: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 900;
  color: rgba(243,238,227,0.85);
  border: 1px solid rgba(255,255,255,0.07);
}
.rank-thumb.love { background: linear-gradient(150deg, #3d0f14, #1a070a); color: #e88; }
.rank-thumb.money { background: linear-gradient(150deg, #3a2d10, #171107); color: #d6b15a; }
.rank-thumb.year { background: linear-gradient(150deg, #3d1a0d, #170a06); color: #e8956a; }
.rank-thumb.full { background: linear-gradient(150deg, #2a1a3d, #120a18); color: #b28ae0; }
.rank-thumb.gunghap { background: linear-gradient(150deg, #3d0f28, #180612); color: #e87aae; }
.rank-thumb.daeun { background: linear-gradient(150deg, #0f2440, #060d18); color: #6aa4e8; }
.rank-info { flex: 1; min-width: 0; }
.rank-info b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #ece7da;
  letter-spacing: -0.3px;
}
.rank-info small {
  display: block;
  font-size: 12.5px;
  color: #8f8a7f;
  margin-top: 3px;
}
.rank-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  color: #fff;
  background: var(--red);
  border-radius: 4px;
  padding: 2px 6px;
  vertical-align: 2px;
  margin-left: 4px;
  letter-spacing: 0.5px;
}
.rank-badge.pink { background: #d13a78; }
.rank-badge.green { background: #2e7d4f; }
.rank-badge.gold { background: #a8842e; }
.rank-arrow { color: #55504a; font-size: 22px; }

/* ---------- 하단 독 ---------- */
#bottom-dock {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(20,20,23,0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 40px;
  padding: 8px 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
#bottom-dock button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: #b6b0a3;
  font-family: var(--sans);
  font-size: 10px;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 30px;
}
#bottom-dock button:hover { color: #f0ebdd; }
#bottom-dock .d-ico { font-size: 17px; line-height: 1; }
#bottom-dock .dock-main {
  background: var(--red);
  border-radius: 50%;
  width: 46px; height: 46px;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(179,38,30,0.5);
  margin: 0 4px;
}
#bottom-dock .dock-main .d-ico { font-size: 20px; }

/* 프레임 내부 여백 재조정 */
.land-section { margin-top: 56px; max-width: 100%; }
.hero-stats { display: none; }
.manse-wheel { display: none; }
.autopsy-wheel { display: block; }

/* =========================================================
 * 사건 파일(케이스 폴더) UI — 사주부검 고유 레이아웃
 * ========================================================= */
.topbar-case {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1px;
  color: #77726a;
}
.topbar-case b { color: #d6b15a; font-weight: 700; }

/* 컴팩트 히어로 */
.hero-compact {
  padding: 40px 22px 30px;
  text-align: left;
  position: relative;
}
.hero-kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 4px;
  color: var(--red);
  margin-bottom: 14px;
}
.hero-headline {
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(27px, 7.6vw, 34px);
  line-height: 1.32;
  letter-spacing: -1px;
  color: #f3eee3;
}
.hero-headline em {
  font-style: normal;
  color: var(--red);
  text-shadow: 0 0 26px rgba(179,38,30,0.4);
}
.hero-copy {
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.8;
  color: #a29c8f;
  letter-spacing: -0.2px;
}
.hero-copy b { color: #e6e0d2; }
.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 12px;
  color: #6f6a61;
}
.hero-meta i { font-style: normal; color: #3a3a3e; }
.hero-meta span:first-child { color: #d6b15a; font-weight: 600; }

/* 파일 섹션 */
.file-section { text-align: left; }
.file-section-head { margin-bottom: 16px; }
.file-section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--red);
}
.file-section-head h2 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: #f0ebdd;
  margin-top: 5px;
}

/* 파일 카드 */
.file-card {
  margin-bottom: 16px;
  cursor: pointer;
}
.file-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #171310;
  background: linear-gradient(180deg, #d9cba4, #c4b489);
  border-radius: 7px 7px 0 0;
  padding: 6px 14px 5px;
  margin-left: 10px;
  font-weight: 700;
  position: relative;
  top: 1px;
}
.file-tab .file-no { color: #6e5f3d; font-weight: 400; }
.file-body {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(165deg, #1a1a1e, #131316);
  border: 1px solid #26262b;
  border-radius: 12px;
  border-top-left-radius: 4px;
  padding: 16px 14px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.file-card:hover .file-body { border-color: #4a3f35; transform: translateY(-2px); }
.file-card:active .file-body { transform: scale(0.99); }
.file-body::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--red);
  opacity: 0.7;
}
.file-seal {
  width: 58px; height: 58px;
  flex: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,0.08);
}
.file-seal.love { background: radial-gradient(circle at 30% 25%, #46121a, #1c080c); color: #e07a7a; }
.file-seal.money { background: radial-gradient(circle at 30% 25%, #403112, #191207); color: #d6b15a; }
.file-seal.year { background: radial-gradient(circle at 30% 25%, #45200f, #1a0c06); color: #e8956a; }
.file-seal.full { background: radial-gradient(circle at 30% 25%, #2e1d45, #130b1a); color: #b28ae0; }
.file-seal.gunghap { background: radial-gradient(circle at 30% 25%, #45122e, #1a0713); color: #e87aae; }
.file-seal.daeun { background: radial-gradient(circle at 30% 25%, #122a48, #070f1a); color: #6aa4e8; }
.file-info { flex: 1; min-width: 0; }
.file-info b {
  display: block;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #f0ebdd;
}
.file-info small {
  display: block;
  font-size: 13px;
  color: #9a948a;
  margin-top: 4px;
  letter-spacing: -0.2px;
}
.file-info .file-meta {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 1px;
  color: #5f5b53;
  margin-top: 7px;
}
.file-stamp {
  flex: none;
  width: 46px; height: 46px;
  border: 2px solid rgba(179,38,30,0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--serif);
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.25;
  color: rgba(200,60,50,0.95);
  transform: rotate(-12deg);
  margin-right: 4px;
}

/* ---------- 부서 탭: 언더라인 스타일 (차별화) ---------- */
.chips {
  gap: 0;
  padding: 4px 10px 0;
  border-bottom: 1px solid #1d1d21;
}
.chip {
  background: none;
  border: none;
  border-radius: 0;
  padding: 10px 13px 13px;
  font-size: 14px;
  font-weight: 700;
  color: #7d786e;
  position: relative;
  letter-spacing: -0.3px;
}
.chip.on {
  background: none;
  color: #f3eee3;
  border: none;
  font-weight: 800;
}
.chip.on::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: -1px;
  height: 2.5px;
  background: var(--red);
  border-radius: 2px;
}

/* ---------- 공유 유입 배너 ---------- */
.shared-banner {
  margin: 0 16px 18px;
  border: 1px solid rgba(214,177,90,0.35);
  background: rgba(214,177,90,0.07);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
}
.shared-banner p {
  font-size: 13.5px;
  color: #d8d2c2;
  margin-bottom: 10px;
  line-height: 1.6;
}
.shared-banner p b { color: #e6c93f; }
.shared-banner .btn { width: 100%; font-size: 15px; padding: 13px; }

/* 크로스셀 버튼 */
.btn.cross {
  background: transparent;
  border: 1.5px solid rgba(214,177,90,0.5);
  color: #d6b15a;
  box-shadow: none;
}
.btn.cross:hover { background: rgba(214,177,90,0.08); }

/* ---------- 포스터 일러스트 레이어 ---------- */
.poster-bg svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.poster-bg.has-art .p-hanja { display: none; }
.poster-bg.has-art .p-hanja2 { display: none; }
/* 아트 위 텍스트 가독용 하단 그라데이션은 .poster::after 가 담당 */

/* ---------- 사주 감정 등급 카드 ---------- */
.rank-card {
  margin-top: 26px;
  border-radius: 16px;
  padding: 22px 20px 18px;
  background:
    radial-gradient(ellipse 90% 80% at 80% 0%, rgba(214,177,90,0.12), transparent 60%),
    linear-gradient(160deg, #1c1c20, #121215);
  border: 1px solid rgba(214,177,90,0.35);
  position: relative;
  overflow: hidden;
}
.rank-card::before {
  content: "命";
  position: absolute;
  right: -18px; bottom: -34px;
  font-family: var(--serif);
  font-size: 150px;
  font-weight: 900;
  color: rgba(243,238,227,0.04);
  pointer-events: none;
}
.rank-card-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: #d6b15a;
  margin-bottom: 14px;
}
.rank-flex { display: flex; align-items: center; gap: 18px; }
.rank-letter {
  flex: none;
  width: 84px; height: 84px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 900;
  font-size: 42px;
  letter-spacing: -2px;
  color: #171310;
  box-shadow: 0 8px 28px rgba(0,0,0,0.5);
}
.rank-letter.g-SS { background: linear-gradient(150deg, #ffe9a8, #d9a93f 60%, #a97820); font-size: 34px; }
.rank-letter.g-S { background: linear-gradient(150deg, #ff8a7a, #c73a2c 60%, #8c1a14); color: #fff; }
.rank-letter.g-A { background: linear-gradient(150deg, #c8a6f0, #7e4fc9 60%, #55308c); color: #fff; }
.rank-letter.g-B { background: linear-gradient(150deg, #8ec2f0, #3f77c0 60%, #28508c); color: #fff; }
.rank-letter.g-C { background: linear-gradient(150deg, #cfcfd4, #8d8d96 60%, #5c5c66); color: #fff; }
.rank-body { min-width: 0; }
.rank-name {
  font-family: var(--sans);
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -0.5px;
  color: #f3eee3;
}
.rank-pct {
  font-size: 13px;
  color: #a8a295;
  margin-top: 5px;
}
.rank-pct b { color: #e6c93f; font-weight: 800; }
.rank-meta {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1px;
  color: #6f6a61;
  margin-top: 6px;
}
.rank-share {
  margin-top: 16px;
  width: 100%;
  background: rgba(214,177,90,0.12);
  border: 1px solid rgba(214,177,90,0.45);
  color: #e6c93f;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.rank-share:hover { background: rgba(214,177,90,0.2); }

/* =========================================================
 * 캐러셀 컨트롤 (화살표 / 점 / 드래그)
 * ========================================================= */
.carousel-wrap { position: relative; }
.car-btn {
  position: absolute;
  top: 42%;
  z-index: 6;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(12,12,16,0.72);
  border: 1px solid rgba(255,255,255,0.16);
  color: #ece7da;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s, transform 0.15s;
  padding-bottom: 3px;
}
.car-btn:hover { background: rgba(179,38,30,0.85); transform: scale(1.06); }
.car-btn.prev { left: 8px; }
.car-btn.next { right: 8px; }
.poster-carousel.dragging { cursor: grabbing; scroll-snap-type: none; }
.poster-carousel { cursor: grab; }
.car-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
}
.car-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3a3a40;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s;
}
.car-dot.on { width: 22px; border-radius: 4px; background: var(--red); }

/* =========================================================
 * 데스크톱 반응형 — PC에서는 넓은 레이아웃
 * ========================================================= */
@media (min-width: 768px) {
  /* PC: 화면 전체를 채운다 */
  .view {
    max-width: none;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  .topbar { padding: 18px 5vw 16px; }
  .topbar-logo { font-size: 26px; }
  .topbar-live { font-size: 12px; padding: 7px 14px; }
  .chips { justify-content: center; padding: 14px 24px 0; }
  .chip { font-size: 15.5px; padding: 11px 19px 15px; }

  /* 캐러셀: 전체 폭 사용, 여러 장 보이게 */
  .poster-carousel { padding: 14px 6vw 8px; gap: 22px; }
  .poster { flex: 0 0 340px; border-radius: 22px; }
  .p-main { font-size: 56px; }
  .p-hanja { font-size: 260px; }
  .car-btn { width: 52px; height: 52px; font-size: 30px; }
  .car-btn.prev { left: 2.5vw; }
  .car-btn.next { right: 2.5vw; }

  .free-strip { max-width: 720px; margin: 20px auto 4px; }

  .container { max-width: 1160px; margin: 0 auto; padding: 0 40px 120px; }
  .land-section { max-width: 100%; margin-top: 96px; }
  .land-title { font-size: 32px; }
  .land-sub { font-size: 15px; }

  /* 고민 카드 4열 / 프로세스 3열 넓게 */
  .pain-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .pain-card { font-size: 14.5px; padding: 22px 18px; }
  .step-grid { gap: 18px; max-width: 900px; margin-left: auto; margin-right: auto; }
  .step-card { padding: 30px 20px; }
  .step-card p { font-size: 13px; }

  /* 랭킹 2열 */
  .rank-head { max-width: 900px; margin-left: auto; margin-right: auto; }
  .rank-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 34px;
    max-width: 900px;
    margin: 0 auto;
  }

  /* 예시 진단서 나란히 */
  .sample-cert-wrap { max-width: 900px; margin-left: auto; margin-right: auto; gap: 40px; }

  .coroner-intro { max-width: 640px; }
  .faq { max-width: 760px; margin-left: auto; margin-right: auto; margin-top: 10px; }

  /* 검사/리포트 문서는 읽기 좋은 폭으로 중앙 정렬 (배경은 꽉 참) */
  #view-form .container, #view-report .container { max-width: 800px; }
  .paper { padding: 42px 48px 46px; }
  .modal-card { padding: 34px 30px 38px; }
  .autopsy-room { max-width: 600px; }

  .hero-cta { font-size: 19px; }
}

@media (min-width: 1500px) {
  .poster { flex: 0 0 360px; }
}

/* =========================================================
 * PC 개선: 포스터 그리드 / 랭킹 카드 구분 / 독 숨김
 * ========================================================= */

/* 랭킹 아이템을 카드로 (공통) */
.rank-item {
  background: linear-gradient(165deg, #1a1a1e, #141417);
  border: 1px solid #26262b;
  border-radius: 14px;
  padding: 14px 14px;
  margin-bottom: 10px;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.rank-item:hover {
  background: linear-gradient(165deg, #1e1e23, #17171a);
  border-color: #4a3f35;
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  /* 포스터: 캐러셀 대신 6장 전부 그리드 */
  .poster-carousel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    overflow: visible;
    padding: 14px 5vw 8px;
    max-width: 1280px;
    margin: 0 auto;
    cursor: default;
  }
  .poster {
    flex: none;
    width: 100%;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
  }
  .poster:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 50px rgba(0,0,0,0.55);
  }
  .poster-count { display: none; }
  .car-btn { display: none; }
  .car-dots { display: none; }
  .p-main { font-size: clamp(40px, 3.6vw, 54px); }

  /* 하단 독 PC에서는 숨김 */
  #bottom-dock { display: none !important; }

  /* 랭킹 카드 간격 */
  .rank-list { gap: 12px 22px; }
  .rank-item { margin-bottom: 0; }
}

@media (min-width: 1400px) {
  .poster-carousel { grid-template-columns: repeat(3, 1fr); max-width: 1360px; }
}

/* 시/분 입력 나란히 */
.time-row { display: flex; gap: 10px; }
.time-row select { flex: 1; }

/* =========================================================
 * 풀스크린 문진 마법사
 * ========================================================= */
.wizard {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.wiz-bg { position: absolute; inset: 0; z-index: 0; }
.wiz-bg::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 90% 55% at 65% 25%, rgba(179,38,30,0.32), transparent 65%),
    radial-gradient(ellipse 70% 45% at 20% 75%, rgba(90,10,20,0.4), transparent 60%),
    linear-gradient(170deg, #17070a, #0a0507 60%, #0c0508);
}
#wiz-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.wiz-art { position: absolute; inset: 0; z-index: 0; opacity: 0.9; }
.wiz-art svg:first-child {
  position: absolute;
  top: 30%; left: 50%;
  width: 560px; height: 560px;
  transform: translate(-50%, -50%);
  opacity: 0.1;
}
.wiz-art svg:first-child .ring-outer { animation: wheel-spin 40s linear infinite; transform-origin: center; }
.wiz-art svg:first-child .ring-inner { animation: wheel-spin 26s linear infinite reverse; transform-origin: center; }
.wiz-art svg:first-child text { fill: var(--red); }
.wiz-art svg:first-child circle { stroke: rgba(179,38,30,0.5); fill: none; }
.wiz-art svg:last-child {
  position: absolute;
  right: -30px; top: 8%;
  width: 340px; height: 340px;
  opacity: 0.55;
  filter: drop-shadow(0 0 60px rgba(179,38,30,0.35)) saturate(0.8);
}
.wiz-shade {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(8,4,5,0.25) 30%, rgba(8,4,5,0.72) 62%, rgba(8,4,5,0.96) 85%);
}
.wiz-back {
  position: absolute;
  top: 16px; left: 14px;
  z-index: 5;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.14);
  color: #ece7da;
  font-size: 22px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.wiz-progress {
  position: absolute;
  top: 26px; left: 0; right: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.wiz-progress i {
  width: 16px; height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.14);
}
.wiz-progress i.on { background: var(--red); }
.wiz-panel {
  position: relative;
  z-index: 3;
  padding: 0 22px calc(30px + env(safe-area-inset-bottom));
}
.wiz-say {
  font-size: 14px;
  color: #b8a89a;
  margin-bottom: 8px;
  min-height: 18px;
  letter-spacing: -0.2px;
}
.wiz-q {
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(23px, 6vw, 28px);
  letter-spacing: -0.8px;
  color: #f5f0e6;
  margin-bottom: 20px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.6);
}
.wiz-options { display: flex; flex-direction: column; gap: 10px; }
.wiz-row { display: flex; gap: 10px; }
.wiz-row > * { flex: 1; }
.wiz-opt {
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 600;
  text-align: left;
  color: #e8e2d5;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 14px;
  padding: 15px 18px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.14s;
}
.wiz-opt:hover, .wiz-opt.sel {
  background: rgba(179,38,30,0.3);
  border-color: rgba(179,38,30,0.7);
}
.wiz-opt.primary {
  background: var(--red);
  border-color: var(--red);
  text-align: center;
  font-weight: 800;
  box-shadow: 0 8px 26px rgba(179,38,30,0.4);
}
.wiz-opt.ghost {
  background: none;
  border-color: transparent;
  color: #8f887c;
  text-align: center;
  font-size: 13.5px;
  padding: 8px;
}
.wiz-opt.small { font-size: 13.5px; padding: 11px 16px; text-align: center; }
.wiz-input {
  font-family: var(--sans);
  font-size: 17px;
  color: #f5f0e6;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 15px 16px;
  outline: none;
  width: 100%;
  backdrop-filter: blur(8px);
}
.wiz-input:focus { border-color: var(--red); }
.wiz-input.shake { animation: wiz-shake 0.4s; border-color: var(--red); }
@keyframes wiz-shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.wiz-privacy {
  text-align: center;
  font-size: 11.5px;
  color: #7d766b;
  margin-top: 6px;
  line-height: 1.7;
}
.wiz-privacy a { color: #b8a89a; text-decoration: underline; }

@media (min-width: 768px) {
  .wizard { min-height: 92vh; }
  .wiz-panel { max-width: 460px; margin: 0 auto; width: 100%; }
  .wiz-art svg:last-child { right: 8%; width: 420px; height: 420px; }
}

/* =========================================================
 * 원국 컬러 타일 (십성 라벨 포함)
 * ========================================================= */
.pillar-grid { gap: 10px; }
.pcell { text-align: center; }
.pcell .p-pos {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 1px;
  color: #8d8571;
  margin-bottom: 5px;
}
.pcell .p-tg {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 3px 0;
}
.pcell .p-tg.me { color: var(--red-deep); }
.p-tile {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1;
  border-radius: 8px;
  padding: 12px 0 14px;
  margin: 3px 0;
  color: #f6f1e6;
  border: 1px solid rgba(0,0,0,0.25);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.25), 0 2px 6px rgba(0,0,0,0.18);
}
.p-tile.pe0 { background: linear-gradient(160deg, #3f9159, #206038); }
.p-tile.pe1 { background: linear-gradient(160deg, #d04a38, #8c1a14); }
.p-tile.pe2 { background: linear-gradient(160deg, #d9a93f, #8c6a1e); }
.p-tile.pe3 { background: linear-gradient(160deg, #c8c8cc, #85858d); color: #26262b; }
.p-tile.pe4 { background: linear-gradient(160deg, #3a3a44, #131318); }
.pcell.empty-cell .p-tile {
  background: rgba(29,26,21,0.08);
  color: #b1a98f;
  font-size: 13px;
  padding: 20px 0;
}

/* =========================================================
 * 페이월 章 챕터 스타일
 * ========================================================= */
.toc-no.chapter {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 900;
  color: #f3eee3;
  background: var(--red-deep);
  border-radius: 3px;
  padding: 4px 8px;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* 문진 세그 여러 줄 */
.seg.wrap { flex-wrap: wrap; }
.seg.wrap button { flex: 1 1 30%; min-width: 90px; }

/* 포스터 이미지 슬롯 (파일 넣으면 자동 적용) */
.poster-bg .poster-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
}
