:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --ink: #1c1a17;
  --ink-2: #3d3934;
  --muted: #857e73;
  --line: #e7e1d7;
  --accent: #a63d2a;
  --accent-soft: #f6e9e5;

  --wood: #3d8b5a;
  --fire: #d1503c;
  --earth: #b5862a;
  --metal: #7b828c;
  --water: #2f6ea8;
  --wood-soft: #e8f3ec;
  --fire-soft: #fbeae6;
  --earth-soft: #f7efdc;
  --metal-soft: #eef0f2;
  --water-soft: #e7f0f8;

  --radius: 18px;
  --shadow: 0 1px 2px rgba(28, 26, 23, 0.04), 0 8px 24px rgba(28, 26, 23, 0.05);
  --sans: Pretendard, "Noto Sans KR", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --serif: "Noto Serif KR", "Nanum Myeongjo", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

.hz {
  font-family: var(--serif);
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.container {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

/* ---------- 상단 바 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 244, 239, 0.88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  letter-spacing: -0.04em;
}

.section-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.section-nav::-webkit-scrollbar {
  display: none;
}

.section-nav a {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.section-nav a:hover {
  color: var(--ink);
}

.section-nav a.is-active {
  background: var(--ink);
  color: #fff;
}

/* ---------- 입력 영역 ---------- */
.intro {
  display: grid;
  grid-template-columns: 1fr minmax(0, 440px);
  gap: 56px;
  align-items: center;
  padding: 72px 0 88px;
}

.intro h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.lede {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 520px;
  margin-bottom: 28px;
}

.intro-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.intro-points li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-2);
}

.intro-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 4px var(--accent);
}

.form-card {
  padding: 30px 28px 28px;
}

.form-card h2 {
  font-size: 20px;
  margin-bottom: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  padding: 0;
}

.label small {
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}

input[type="text"],
input[type="date"],
input[type="time"],
textarea,
select {
  width: 100%;
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(28, 26, 23, 0.08);
}

input:disabled {
  opacity: 0.45;
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.seg label {
  cursor: pointer;
}

.seg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg span {
  display: block;
  text-align: center;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-weight: 500;
  transition: all 0.15s;
}

.seg input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.seg input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(28, 26, 23, 0.15);
}

.check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: var(--ink-2);
  margin: -4px 0 16px;
  cursor: pointer;
}

.check input {
  width: 17px;
  height: 17px;
  accent-color: var(--ink);
}

.advanced {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-bottom: 18px;
}

.advanced summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  list-style: none;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.advanced summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  font-weight: 600;
}

.advanced[open] summary::before {
  content: "−";
}

.advanced[open] summary {
  margin-bottom: 14px;
}

.form-error {
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 12px;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 15px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.btn:hover {
  background: #8f3323;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ---------- 결과 머리 ---------- */
.result[hidden] {
  display: none !important;
}

.result-hero {
  background: var(--surface);
  border-block: 1px solid var(--line);
  padding: 48px 0 36px;
}

.result-hero h2 {
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 800;
  margin-bottom: 8px;
}

.result-meta {
  font-size: 17px;
  color: var(--ink-2);
  margin-bottom: 20px;
}

.result-notes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.result-notes li {
  font-size: 13.5px;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}

.result-notes b {
  color: var(--ink);
}

/* ---------- 섹션 공통 ---------- */
.result-section {
  padding: 64px 0 8px;
}

.section-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.section-num {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 4px 8px;
  margin-top: 4px;
}

.section-head h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}

.section-head p {
  color: var(--muted);
  max-width: 720px;
}

.bar {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: #efebe4;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
}

.grade {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.g-high { background: #e7f3ea; color: #2f7a4b; }
.g-mid { background: #f1eee8; color: #6b655c; }
.g-low { background: var(--accent-soft); color: var(--accent); }

.el-chip {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  margin: 2px 0;
}

.el-chip.el-wood { background: var(--wood-soft); color: var(--wood); }
.el-chip.el-fire { background: var(--fire-soft); color: var(--fire); }
.el-chip.el-earth { background: var(--earth-soft); color: var(--earth); }
.el-chip.el-metal { background: var(--metal-soft); color: var(--metal); }
.el-chip.el-water { background: var(--water-soft); color: var(--water); }

.c-wood { color: var(--wood); }
.c-fire { color: var(--fire); }
.c-earth { color: var(--earth); }
.c-metal { color: var(--metal); }
.c-water { color: var(--water); }

.bg-wood { background: var(--wood) !important; }
.bg-fire { background: var(--fire) !important; }
.bg-earth { background: var(--earth) !important; }
.bg-metal { background: var(--metal) !important; }
.bg-water { background: var(--water) !important; }

/* ---------- 01 요약 ---------- */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.key-facts {
  margin: 0;
  padding: 8px 22px;
}

.key-facts > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.key-facts > div:last-child {
  border-bottom: 0;
}

.key-facts dt {
  font-size: 14px;
  color: var(--muted);
}

.key-facts dd {
  margin: 0;
  font-size: 15px;
}

.key-facts dd .hz {
  font-size: 17px;
}

.score-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 12px 16px;
  align-content: center;
}

.score-row {
  display: grid;
  grid-template-columns: 34px 1fr 132px;
  gap: 12px;
  align-items: center;
  padding: 10px 6px;
  border-radius: 12px;
  transition: background 0.15s;
}

.score-row:hover {
  background: var(--surface-2);
}

.sr-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 15px;
}

.sr-label {
  font-weight: 600;
  font-size: 15px;
}

.score-row .grade {
  justify-self: end;
}

.sr-meter {
  display: block;
  height: 7px;
  border-radius: 99px;
  background: #efeae3;
  overflow: hidden;
}

.sr-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #b7ad9f;
}

.g-great {
  background: #dceee3;
  color: #1f6b40;
}

.sr-num {
  text-align: right;
  font-size: 17px;
}

/* ---------- 02 원국 풀이 ---------- */
.note-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.note-main {
  grid-column: 1 / -1;
  background: var(--ink);
  border-color: var(--ink);
  color: #f4efe6;
}

.note-main .note-role,
.note-main .note-label {
  color: rgba(244, 239, 230, 0.6);
}

.note-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.note-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.note-head .hz {
  font-size: 22px;
}

.note-role {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}

.note p {
  color: inherit;
  opacity: 0.92;
}

/* ---------- 03 오행 ---------- */
.split-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  align-items: start;
}

.element-list,
.god-list {
  list-style: none;
  margin: 0;
  padding: 6px 22px;
}

.el-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.el-item:last-child {
  border-bottom: 0;
}

.el-row {
  display: grid;
  grid-template-columns: 40px 150px 1fr 42px 48px;
  gap: 12px;
  align-items: center;
}

.el-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.el-badge.el-wood { background: var(--wood); }
.el-badge.el-fire { background: var(--fire); }
.el-badge.el-earth { background: var(--earth); }
.el-badge.el-metal { background: var(--metal); }
.el-badge.el-water { background: var(--water); }

.el-title {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.el-title b {
  font-size: 16px;
}

.el-title small {
  font-size: 12.5px;
  color: var(--muted);
}

.el-num {
  text-align: right;
  font-weight: 700;
  font-size: 15px;
}

.verdict {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 0;
  border-radius: 999px;
}

.v-over { background: var(--fire-soft); color: var(--fire); }
.v-under { background: var(--water-soft); color: var(--water); }
.v-ok { background: var(--wood-soft); color: var(--wood); }

.el-item p {
  margin: 8px 0 0 52px;
  font-size: 14.5px;
  color: var(--ink-2);
}

.strength-card {
  padding: 26px 24px;
  position: sticky;
  top: 84px;
}

.strength-card h3 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 18px;
}

.gauge {
  position: relative;
  height: 10px;
  border-radius: 99px;
  background: #efebe4;
  overflow: hidden;
}

.gauge i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--water), var(--accent));
  border-radius: inherit;
}

.gauge-mid {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--surface);
}

.gauge-legend {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 14px;
}

.gauge-note {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px !important;
}

.strength-card > p {
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 16px;
}

.mini-facts {
  margin: 0;
  border-top: 1px solid var(--line);
}

.mini-facts > div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  align-items: center;
  padding: 11px 0 0;
}

.mini-facts dt {
  font-size: 13.5px;
  color: var(--muted);
}

.mini-facts dd {
  margin: 0;
}

/* ---------- 04 십성 ---------- */
.god-group {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.god-group:last-child {
  border-bottom: 0;
}

.god-group-head {
  display: grid;
  grid-template-columns: 110px 150px 1fr 44px;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.god-group-name b {
  font-size: 17px;
  margin-right: 6px;
}

.god-group-name .hz {
  font-size: 13px;
  color: var(--muted);
}

.god-group-role {
  font-size: 13.5px;
  color: var(--muted);
}

.god-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.god {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}

.god.is-empty {
  opacity: 0.5;
}

.god-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.god-head b {
  font-size: 15px;
}

.god-head .hz {
  font-size: 12px;
  color: var(--muted);
}

.god-state {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.god p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- 05 분야별 운세 ---------- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.topic {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 24px 22px;
}

.topic header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.topic-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
}

.topic header .grade {
  margin-left: auto;
}

.topic h3 {
  font-size: 19px;
  font-weight: 700;
}

.topic-soft {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f4ee;
  color: var(--ink);
}

.sr-quiet {
  font-size: 12px;
  color: var(--muted);
}

.topic-score {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.topic-score b {
  font-size: 24px;
  font-weight: 800;
}

.topic-bar {
  margin-bottom: 16px;
}

.topic-bar i {
  background: var(--accent);
}

.topic p {
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.topic p:last-child {
  margin-bottom: 0;
}

.topic .lead {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14.5px;
}

/* ---------- 06 대운·그래프 ---------- */
.daeun-note {
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 16px !important;
  max-width: 860px;
}

.chart-card {
  padding: 20px 20px 10px;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.chart-head h3 {
  font-size: 17px;
}

.chart-legend {
  list-style: none;
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}

.dot-high { background: var(--accent); }
.dot-low { background: var(--water); }
.dot-now { background: var(--ink); }

.chart-wrap {
  position: relative;
}

#luck-chart {
  display: block;
  width: 100%;
  height: 320px;
  touch-action: pan-y;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.55;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.peak-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.peak {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  border-top: 4px solid var(--accent);
}

.peak-low {
  border-top-color: var(--water);
}

.peak-tag {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
}

.peak-low .peak-tag {
  color: var(--water);
}

.peak h4 {
  font-size: 19px;
  margin: 4px 0 8px;
}

.peak h4 small {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 6px;
}

.peak p {
  font-size: 15px;
  color: var(--ink-2);
}

/* ---------- 푸터 ---------- */
.foot {
  margin-top: 88px;
  padding: 32px 0 44px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.report-close {
  margin-top: 64px;
  padding: 8px 4px 4px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: -0.01em;
}

.report-close p + p {
  margin-top: 14px;
}

.report-close .report-note {
  margin-top: 22px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

.copy {
  font-size: 13px;
  color: var(--muted);
}


/* ---------- 결과 머리 버튼 ---------- */
.hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.btn-ghost {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.btn-ghost:hover {
  border-color: var(--ink);
}

/* ---------- 공통 블록 ---------- */
.sub-block {
  margin-top: 28px;
}

.sub-block.first {
  margin-top: 0;
}

.sub-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.sub-title .hz {
  font-size: 15px;
  color: var(--muted);
}

.sub-block > p,
.sub-lead {
  color: var(--ink-2);
  margin-bottom: 10px;
}

.sub-lead {
  color: var(--muted);
  font-size: 15px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
}

.mini-card > b {
  display: block;
  font-size: 18px;
  margin: 2px 0 6px;
}

.mini-card p {
  font-size: 14.5px;
  color: var(--ink-2);
}

.mini-card p + p {
  margin-top: 8px;
}

.nat-k {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.callout {
  background: var(--accent-soft);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 18px;
}

.callout p + p {
  margin-top: 6px;
  font-size: 14px;
}

.is-dim {
  opacity: 0.4;
}

/* ---------- 01 명식 카드 ---------- */
.ms {
  padding: 22px 22px 16px;
}

.ms-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ms-title {
  font-size: 20px;
  font-weight: 800;
}

.ms-title span {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.ms-date {
  font-size: 14px;
  color: var(--muted);
}

.ms-count {
  list-style: none;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.ms-count li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 14px;
}

.ms-count span {
  font-family: var(--serif);
  font-weight: 700;
}

.bx-wood { background: var(--wood); color: #fff; }
.bx-fire { background: var(--fire); color: #fff; }
.bx-earth { background: var(--earth); color: #fff; }
.bx-metal { background: #f1f2f4; color: #4b525b; box-shadow: inset 0 0 0 1.5px #c9cdd3; }
.bx-water { background: #24405f; color: #fff; }

.ms-scroll {
  overflow-x: auto;
}

.ms-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: center;
}

.ms-table th,
.ms-table td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.45;
  vertical-align: middle;
}

.ms-table thead th {
  font-size: 14px;
  font-weight: 700;
  border-bottom: 0;
  padding-bottom: 4px;
}

.ms-table tbody th {
  width: 62px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
}

.ms-table td small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.ms-r-god td {
  font-weight: 600;
  color: var(--ink-2);
}

.ms-r-god .me {
  color: var(--accent);
}

.ms-r-box td,
.ms-r-box th {
  border-bottom: 0;
  padding: 3px 4px;
}

.ms-box {
  display: inline-grid;
  place-items: center;
  width: min(84px, 100%);
  aspect-ratio: 1;
  border-radius: 14px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1;
}

.ms-box.sm {
  width: 40px;
  border-radius: 9px;
  font-size: 22px;
}

.ms-r-hidden td span {
  display: block;
  font-size: 12.5px;
  color: var(--ink-2);
}

.ms-r-hidden td span b {
  font-size: 14px;
  margin-right: 2px;
}

.ms-r-star td {
  vertical-align: top;
}

.star {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  margin: 2px 1px;
  white-space: nowrap;
}

.star-good { background: #e7f3ea; color: #2f7a4b; }
.star-neutral { background: #eef1f6; color: #3f5a7e; }
.star-care { background: var(--accent-soft); color: var(--accent); }

.ms-foot {
  display: grid;
  gap: 10px;
  padding: 14px 0 4px;
  font-size: 14px;
}

.ms-foot > div {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 8px;
  align-items: baseline;
}

.ms-k {
  font-size: 12px;
  color: var(--muted);
}

.ms-rel {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
}

.ms-rel li b {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.ms-rel em {
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  margin-left: 4px;
  color: var(--ink-2);
}

.ms-strip {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 12px;
}

.ms-strip-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ms-strip-title span {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 6px;
}

.ms-cells {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0 0 6px;
  overflow-x: auto;
}

.ms-cell {
  flex: 1 0 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 12px;
  border: 1.5px solid transparent;
}

.ms-cell.is-now {
  border-color: var(--ink);
  background: var(--surface-2);
}

.ms-lab {
  font-size: 13px;
  font-weight: 700;
}

.ms-god {
  font-size: 11.5px;
  color: var(--ink-2);
}

.ms-us,
.ms-sub {
  font-size: 11px;
  color: var(--muted);
}

.ms-legend {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- 02 총평 ---------- */
.overview {
  padding: 26px 26px 22px;
  margin-bottom: 16px;
}

.ov-quote {
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 14px;
}

.ov-text {
  color: var(--ink-2);
  margin-bottom: 18px;
}

.ov-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ov-col {
  border-radius: 14px;
  padding: 16px 18px;
}

.ov-good { background: #eef6f0; }
.ov-care { background: #fbf1ee; }

.ov-col h4 {
  font-size: 15px;
  margin-bottom: 8px;
}

.ov-col ul,
.life-cols ul,
.advice-card ol {
  margin: 0;
  padding-left: 18px;
}

.ov-col li,
.life-cols li {
  font-size: 14.5px;
  color: var(--ink-2);
  margin-bottom: 4px;
}

/* ---------- 03 성향 ---------- */
.nat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.nat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 20px;
}

.nat-card p {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 15px;
}

.nat-wide {
  grid-column: 1 / -1;
  background: var(--ink);
  border-color: var(--ink);
}

.nat-wide p {
  color: #f4efe6;
  font-size: 16.5px;
}

.nat-wide .nat-k {
  color: #e8a594;
}

/* ---------- 05 개운법 ---------- */
.rem-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  align-items: start;
}

.rem-side {
  display: grid;
  gap: 16px;
}

.rem-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}

.rem-card header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.rem-card h3 {
  font-size: 18px;
}

.rem-main {
  border-top: 4px solid var(--accent);
}

.rem-avoid {
  background: var(--surface-2);
  box-shadow: none;
}

.rem-table {
  margin: 0;
}

.rem-table > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}

.rem-table dt {
  color: var(--muted);
  font-size: 13.5px;
}

.rem-table dd {
  margin: 0;
  color: var(--ink-2);
}

.rem-note {
  font-size: 14.5px;
  color: var(--ink-2);
}

.name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 6px 0 12px;
}

.name-ch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 64px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.name-ch b {
  font-size: 24px;
}

.name-ch small {
  font-size: 12px;
  color: var(--muted);
}

.name-flow {
  width: 14px;
  height: 1.5px;
  background: var(--line);
}

/* ---------- 07 신살 ---------- */
.us-flow {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
}

.us-flow li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 8px;
}

.uf-k {
  font-size: 12.5px;
  color: var(--muted);
}

.us-flow b {
  font-size: 18px;
}

.uf-bar {
  display: flex;
  align-items: flex-end;
  width: 18px;
  height: 64px;
  border-radius: 6px;
  background: #efebe4;
  overflow: hidden;
}

.uf-bar i {
  display: block;
  width: 100%;
  background: var(--accent);
  border-radius: 6px;
}

.us-flow small {
  font-size: 12px;
  color: var(--muted);
}

.star-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.star-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid #3f5a7e;
  border-radius: 14px;
  padding: 16px 18px;
}

.star-card.star-good { border-left-color: #2f7a4b; background: var(--surface); color: inherit; }
.star-card.star-care { border-left-color: var(--accent); background: var(--surface); color: inherit; }
.star-card.star-neutral { background: var(--surface); color: inherit; }

.star-card header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.star-card header b {
  font-size: 16px;
}

.star-card header .hz {
  font-size: 12px;
  color: var(--muted);
}

.star-pos {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}

.star-card p {
  font-size: 14.5px;
  color: var(--ink-2);
}

.star-use {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface-2);
}

.star-card .muted {
  margin-top: 6px;
  font-size: 12.5px;
}

.rel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.rel-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.rel-list p {
  font-size: 14.5px;
  color: var(--ink-2);
  margin-top: 2px;
}

.rel-tag {
  display: inline-block;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 0;
  border-radius: 8px;
  background: #eef1f6;
  color: #3f5a7e;
}

.rel-tag.rel-육합,
.rel-tag.rel-삼합,
.rel-tag.rel-반합,
.rel-tag.rel-방합,
.rel-tag.rel-천간합 { background: #e7f3ea; color: #2f7a4b; }

.rel-tag.rel-충,
.rel-tag.rel-천간충,
.rel-tag.rel-형,
.rel-tag.rel-삼형,
.rel-tag.rel-자형 { background: var(--accent-soft); color: var(--accent); }

/* ---------- 09 인생 시기별 ---------- */
.life-list {
  display: grid;
  gap: 14px;
}

.life-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.life-card.is-now {
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}

.life-card.is-past {
  opacity: 0.62;
}

.life-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.life-age {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.life-card h3 {
  font-size: 19px;
}

.life-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.life-meta .hz {
  font-size: 18px;
  color: var(--ink);
}

.now-pill {
  background: var(--ink);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.life-flow {
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 12px;
}

.life-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.life-cols > div {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 14px;
}

.life-cols h4 {
  font-size: 13.5px;
  margin-bottom: 6px;
  color: var(--ink);
}

.life-flags {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.life-flags li {
  font-size: 14px;
  color: var(--ink-2);
}

.flag {
  display: inline-block;
  min-width: 38px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  margin-right: 8px;
  background: #eef1f6;
  color: #3f5a7e;
}

.flag-인연 { background: #fbeaf0; color: #b03a64; }
.flag-고점 { background: #e7f3ea; color: #2f7a4b; }
.flag-준비 { background: #eef3f8; color: #35597a; }
.flag-변동 { background: #f7f1e6; color: #8a6232; }

.life-hope {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f4f8f4;
  color: var(--ink);
}

.consult-form {
  margin-bottom: 8px;
}

.consult-form textarea {
  resize: vertical;
  min-height: 72px;
}

.q-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 8px;
}

.q-row .field {
  margin: 0;
}

.q-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 12px 4px;
  cursor: pointer;
}

.q-remove:hover {
  color: var(--ink);
}

.q-add {
  align-self: flex-start;
  margin: 0 0 16px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 0 8px;
  cursor: pointer;
}

.q-ask {
  margin: 0;
  color: var(--ink-2);
  font-weight: 650;
}

.consult-result {
  margin-top: 16px;
}

.consult-open,
.consult-close,
.consult-empty {
  margin: 0;
  line-height: 1.75;
}

.consult-card {
  margin-top: 12px;
  padding: 18px 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}

.consult-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.consult-card p,
.consult-close {
  margin: 8px 0 0;
  line-height: 1.75;
}

.consult-close {
  padding: 4px 2px 0;
  font-weight: 600;
}

/* ---------- 등급 표시 ---------- */
.rate {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.rate-5, .rate-4 { background: #e7f3ea; color: #2f7a4b; }
.rate-3 { background: #f1eee8; color: #6b655c; }
.rate-2, .rate-1 { background: var(--accent-soft); color: var(--accent); }

.dots {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
  white-space: nowrap;
}

.dots i {
  font-style: normal;
  color: #e3ddd3;
}

/* ---------- 10 인연·연표 ---------- */
.verdict-card {
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.verdict-card h4 {
  font-size: 20px;
  margin: 4px 0 6px;
}

.verdict-card p,
.verdict-card li {
  font-size: 14.5px;
  color: var(--ink-2);
}

.verdict-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.v-late { border-left: 4px solid #3f5a7e; }
.v-mid { border-left: 4px solid var(--earth); }
.v-early { border-left: 4px solid #2f7a4b; }

.year-chips {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin: 0 0 12px;
  padding: 0;
}

.year-chips li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fdf3f6;
  border: 1px solid #f3d6e0;
  border-radius: 14px;
  padding: 12px 14px;
}

.year-chips li.is-past {
  opacity: 0.5;
}

.year-chips b {
  font-size: 20px;
}

.year-chips span {
  font-size: 13.5px;
  color: var(--ink-2);
}

.year-chips small {
  font-size: 12px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.year-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.year-table th,
.year-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
}

.year-table thead th {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface-2);
}

.year-table tbody tr:last-child td {
  border-bottom: 0;
}

.year-table tr.is-now td {
  background: #fbf7f0;
}

.year-table td small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.year-table td .hz {
  font-size: 17px;
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  margin: 2px 3px 2px 0;
  border-radius: 999px;
  background: #eef1f6;
  color: #3f5a7e;
}

.tag-care {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- 11 올해 ---------- */
.year-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.year-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
}

.year-card header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.year-card header .rate {
  margin-left: auto;
}

.yc-gz {
  display: flex;
  gap: 4px;
}

.year-card h3 {
  font-size: 19px;
}

.year-card p {
  font-size: 14.5px;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.month-list {
  list-style: none;
  margin: 0;
  padding: 6px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.month-list li {
  display: grid;
  grid-template-columns: 112px 48px 52px 1fr 80px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}

.month-list li:last-child {
  border-bottom: 0;
}

.month-list li.is-now {
  background: #fbf7f0;
  margin: 0 -18px;
  padding: 10px 18px;
}

.mo-m {
  font-weight: 700;
}

.mo-m small {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
}

.mo-gz {
  font-size: 17px;
}

.mo-god {
  font-weight: 600;
  color: var(--ink-2);
}

.mo-line {
  color: var(--ink-2);
}

/* ---------- 13 실천 노트 ---------- */
.advice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.advice-card {
  border-radius: var(--radius);
  padding: 22px 24px;
}

.advice-do { background: #eef6f0; }
.advice-dont { background: #fbf1ee; }

.advice-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.advice-card li {
  font-size: 15px;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.lucky {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.lucky > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.lucky span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}

.lucky b {
  font-size: 15.5px;
}

.glossary {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.glossary summary {
  cursor: pointer;
  font-weight: 600;
}

.glossary dl {
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.glossary dt {
  font-weight: 700;
  font-size: 14px;
}

.glossary dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

/* ---------- 반응형 ---------- */
@media (max-width: 960px) {
  .intro,
  .summary-grid,
  .split-grid,
  .rem-grid {
    grid-template-columns: 1fr;
  }

  .intro {
    gap: 32px;
    padding: 40px 0 56px;
  }

  .strength-card {
    position: static;
  }

  .topic-grid,
  .peak-grid,
  .year-grid,
  .star-grid {
    grid-template-columns: 1fr;
  }

  .lucky {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .container {
    width: calc(100% - 28px);
  }

  .topbar-inner {
    gap: 14px;
  }

  .brand > span:last-child {
    display: none;
  }

  .hero-inner {
    flex-direction: column;
  }

  .field-row,
  .note-grid,
  .god-pair,
  .two-col,
  .ov-cols,
  .nat-grid,
  .life-cols,
  .advice-grid,
  .glossary dl {
    grid-template-columns: 1fr;
  }

  .note-main {
    grid-column: auto;
  }

  .form-card {
    padding: 22px 18px;
  }

  .ms {
    padding: 16px 12px 12px;
  }

  .ms-table {
    min-width: 0;
  }

  .ms-table tbody th {
    width: 40px;
    font-size: 11px;
    padding-left: 0;
  }

  .ms-table td {
    font-size: 11.5px;
    padding: 6px 2px;
  }

  .ms-r-hidden td span {
    font-size: 11px;
  }

  .star {
    font-size: 10.5px;
    padding: 1px 5px;
  }

  .ms-box {
    border-radius: 10px;
  }

  .ms-foot > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .us-flow {
    grid-template-columns: repeat(2, 1fr);
  }

  .rem-table > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .month-list li {
    grid-template-columns: 74px 44px 1fr 64px;
  }

  .mo-line {
    grid-column: 1 / -1;
    font-size: 13.5px;
    margin-top: -6px;
  }

  .key-facts > div {
    grid-template-columns: 104px 1fr;
  }

  .score-row {
    grid-template-columns: 30px 78px 1fr 28px 42px;
    gap: 8px;
  }

  .el-row {
    grid-template-columns: 36px 1fr 60px 36px 42px;
  }

  .el-title small {
    display: none;
  }

  .el-item p {
    margin-left: 0;
  }

  .god-group-head {
    grid-template-columns: 90px 1fr 40px;
  }

  .god-group-role {
    display: none;
  }

  .section-head h2 {
    font-size: 22px;
  }

  .life-card header {
    flex-direction: column;
  }

  #luck-chart {
    height: 260px;
  }
}

/* ---------- 인쇄 · PDF 저장 ---------- */
@media print {
  @page {
    size: A4;
    margin: 14mm 12mm;
  }

  body {
    background: #fff;
    font-size: 12.5px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .topbar,
  .intro,
  .btn-ghost,
  .foot .copy,
  .chart-tooltip {
    display: none !important;
  }

  .container {
    width: 100%;
  }

  .result-hero {
    border: 0;
    padding: 0 0 12px;
  }

  .result-section {
    padding: 0;
    break-before: page;
  }

  #sec-chart {
    break-before: avoid;
  }

  .card,
  .topic,
  .rem-card,
  .year-card {
    box-shadow: none;
  }

  .note,
  .topic,
  .life-card,
  .star-card,
  .rem-card,
  .year-card,
  .mini-card,
  .nat-card,
  .rel-list li,
  .month-list li,
  .advice-card {
    break-inside: avoid;
  }

  .ms-cells,
  .ms-scroll,
  .table-wrap {
    overflow: visible;
  }

  .strength-card {
    position: static;
  }

  .glossary {
    display: block;
  }

  .glossary dl {
    display: grid !important;
  }

  .foot {
    margin-top: 24px;
    border: 0;
  }
}
