/*
  계절 우체국 화면. 읽기 쉬운 본문이 첫 목표다.
  글꼴은 시스템에 있는 것만 쓴다 — 외부 글꼴을 받아오지 않는다.
  홈에만 편지와 우표의 분위기를 두고, 입력·결과 화면은 담백하게 유지한다.
*/

:root {
  --paper: #fdf8f3;
  --surface: #ffffff;
  --surface-soft: #fbf3ee;
  --ink: #33302e;
  --ink-soft: #5d5551;
  --muted: #6f6764;
  --line: #e7ddd5;
  --line-strong: #d6c8be;
  --accent: #98556a;
  --accent-soft: #f7ebee;
  --accent-ink: #7c4256;
  --warn: #8a5a1f;
  --warn-soft: #fdf3e3;
  --good: #4f6b4a;
  --good-soft: #eef2ea;
  --radius: 12px;
  --shell: 1240px;
  --measure: 46rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

h1,
h2,
h3,
h4,
h5 {
  line-height: 1.4;
  margin: 0 0 0.5rem;
  font-weight: 700;
}

h1 {
  font-size: clamp(1.75rem, 1.35rem + 1.1vw, 2.25rem);
  letter-spacing: -0.04em;
}
h2 {
  font-size: clamp(1.3rem, 1.18rem + 0.45vw, 1.5rem);
  letter-spacing: -0.03em;
}
h3 {
  font-size: 1.12rem;
}
h4 {
  font-size: 1rem;
}
h5 {
  font-size: 0.98rem;
}

p,
ul,
ol,
dl,
table {
  margin: 0 0 0.9rem;
}

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.6;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

code {
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  font-size: 0.85em;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

/* ── 골격 ────────────────────────────────────────────────────────────── */

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 20px;
}

/*
  본문은 어느 화면에서나 같은 폭의 한 칼럼으로 가운데 선다.
  칼럼만 가운데 두고, 글·표·입력칸의 정렬은 왼쪽 그대로 둔다.
*/
.site-main > .shell {
  max-width: calc(var(--measure) + 40px);
}

/* 홈만 편지와 우표 그림을 놓을 자리가 필요해 껍데기 전체 폭을 쓴다. */
body:has(.post-office-home) .site-main > .shell {
  max-width: var(--shell);
}

/* 화면 최상위 묶음 사이의 리듬. 페이지마다 따로 정하지 않는다. */
.site-main > .shell > * + * {
  margin-top: 2.2rem;
}

.site-main > .shell > .page-heading + * {
  margin-top: 2.6rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fffaf7;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
  color: #fffaf7;
}

.site-header {
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-block: 0.2rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  color: var(--accent-ink);
}

.site-nav a[aria-current="page"] {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

/* 계정 입구. 넓은 화면은 로고 · 메뉴 · 계정 한 줄, 좁은 화면은 로고와 계정이 첫 줄에 서고 메뉴가 둘째 줄로 간다. */
.site-account {
  flex-shrink: 0;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.site-account:hover,
.site-account[aria-current="page"] {
  border-color: var(--accent);
  color: var(--accent-ink);
}

@media (min-width: 761px) {
  .site-header .shell:has(.site-account) .site-nav {
    margin-left: auto;
  }
}

@media (max-width: 760px) {
  .site-account {
    order: 1;
  }

  .site-header .shell:has(.site-account) .site-nav {
    order: 2;
    flex-basis: 100%;
  }
}

.site-main {
  display: block;
  flex-grow: 1;
  padding-block: 2.5rem 4rem;
}

/* ── 바닥: 우체국 창구 ───────────────────────────────────────────────── */

.site-footer {
  position: relative;
  flex-shrink: 0;
  padding-block: 3rem 1.4rem;
  background: linear-gradient(180deg, #f8eee7 0%, #f3e7de 100%);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* 우표 톱니처럼 오려낸 윗변. 본문 종이색 원을 겹쳐 찍어 만든다. */
.site-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 8px;
  background-image: radial-gradient(circle 9px at 9px -3px, var(--paper) 8.1px, #e3d4c9 9px, transparent 9.2px);
  background-size: 18px 8px;
  background-repeat: repeat-x;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--ink-soft);
}

.site-footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.75fr) minmax(17rem, 21rem);
  align-items: center;
  gap: 2.4rem 0;
}

.site-footer-brand {
  display: flex;
  align-items: center;
  gap: 1.05rem;
  min-width: 0;
}

/* 고양이 우체부를 소인처럼 둥근 액자에 담는다. 얼굴만 오려 쓰던 예전 원화와 달리 전신이 다 들어간다. */
.site-footer-seal {
  position: relative;
  flex: none;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 1px solid #e4d7d0;
  border-radius: 50%;
  outline: 1px dashed #cbbb9e;
  outline-offset: -5px;
  background: #fff8e8;
  box-shadow: 0 2px 10px #785e490f;
}

.site-footer-seal img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-footer-name {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.site-footer-tagline {
  margin-top: 0.2rem;
  font-size: 0.9rem;
  line-height: 1.75;
}

.site-footer-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.site-footer-label::after {
  content: "";
  flex: none;
  width: 1.7rem;
  border-top: 1px dashed var(--line-strong);
}

/* 창구를 셋으로 나누는 점선. 우편 서식의 접는 선처럼 옅게 둔다. */
.site-footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  align-self: stretch;
  min-width: 0;
  margin-left: 3.2rem;
  padding-left: 3.2rem;
  border-left: 1px dashed #e2d3c9;
}

.site-footer-links a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  padding-block: 0.3rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer-links a span {
  display: inline-block;
  color: var(--line-strong);
  font-size: 0.85em;
  transition: transform 0.15s ease, color 0.15s ease;
}

.site-footer-links a:hover {
  color: var(--accent-ink);
}

.site-footer-links a:hover span {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.site-footer-links a[aria-current="page"] {
  color: var(--accent-ink);
}

/* 문의는 창구에 놓인 답장 카드처럼 보이게 둔다. */
.site-footer-contact {
  margin-left: 3.4rem;
  padding: 1.15rem 1.35rem 1.25rem;
  border: 1px solid #e4d7d0;
  border-radius: 12px 12px 12px 3px;
  background: #fffdf9;
  box-shadow: 0 4px 16px #785e490d;
  transform: rotate(-0.8deg);
}

.site-footer-contact .site-footer-label {
  margin-bottom: 0.5rem;
}

.site-footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--accent-ink);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  min-width: 0;
}

.site-footer-mail svg {
  flex: none;
  width: 21px;
  stroke: currentColor;
  stroke-width: 1.6;
  opacity: 0.7;
}

.site-footer-mail span {
  border-bottom: 1px solid #e0c9d2;
  padding-bottom: 0.12rem;
  overflow-wrap: anywhere;
}

.site-footer-mail:hover {
  color: var(--accent);
}

.site-footer-mail:hover span {
  border-bottom-color: var(--accent);
}

.site-footer-thanks {
  margin-top: 0.65rem;
  font-size: 0.85rem;
  line-height: 1.7;
}

.site-footer-note {
  margin-top: 2.4rem;
  padding-top: 0.9rem;
  border-top: 1px dashed #e0d2c8;
  color: #8d8480;
  font-size: 0.78rem;
  line-height: 1.6;
}

@media (max-width: 1000px) {
  .site-footer-main {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem);
    gap: 2.2rem 0;
  }

  .site-footer-brand {
    grid-column: 1 / -1;
  }

  .site-footer-links {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    border-top: 1px dashed #e2d3c9;
    padding-top: 1.6rem;
    align-self: start;
  }

  .site-footer-contact {
    margin-left: 2.6rem;
  }
}

@media (max-width: 700px) {
  .site-footer {
    padding-block: 2.5rem 1.3rem;
  }

  .site-footer-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.7rem 0;
  }

  .site-footer-contact {
    margin-left: 0;
    transform: none;
  }

  .site-footer-note {
    margin-top: 1.8rem;
  }
}

/* ── 공용 본문 ───────────────────────────────────────────────────────── */

.page-heading {
  margin-bottom: 0;
}

.page-heading > :last-child {
  margin-bottom: 0;
}

.lede {
  font-size: 1.06rem;
  color: var(--ink-soft);
}

.prose h2 {
  margin-top: 2.6rem;
}

.prose h3 {
  margin-top: 1.6rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.3rem;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.breadcrumb a {
  color: var(--ink-soft);
}

.faq-list dt {
  font-weight: 700;
  margin-top: 1.2rem;
}

.faq-list dd {
  margin: 0.3rem 0 0;
}

.page-note,
.privacy {
  font-size: 0.92rem;
  color: var(--muted);
}

/* ── 단추 ────────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 46px;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fffaf7;
  font-size: 0.98rem;
  font-weight: 500;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-ink);
  color: #fffaf7;
}

.button-ghost {
  background: var(--surface);
  color: var(--accent-ink);
}

.button-ghost:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.text-button {
  border: 0;
  background: none;
  padding: 0.4rem 0.2rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button:hover {
  color: var(--accent-ink);
}

/* ── 홈 ──────────────────────────────────────────────────────────────── */

.post-office-home .hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3rem;
  align-items: center;
  min-height: 580px;
  padding-block: 2.5rem 4rem;
}

.post-office-home .home-eyebrow {
  color: var(--accent-ink);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.post-office-home .hero-copy > .home-eyebrow {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  background: var(--accent-soft);
  border-radius: 24px;
  margin-bottom: 1.5rem;
}

.post-office-home .hero h1 {
  font-size: clamp(2rem, 1rem + 2.8vw, 3.2rem);
  line-height: 1.45;
  letter-spacing: -0.055em;
  margin-bottom: 1.5rem;
}

.post-office-home .hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.post-office-home .hero .lede {
  font-size: 1.05rem;
  line-height: 1.95;
}

.post-office-home .hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem;
  margin: 2rem 0 1.2rem;
}

.post-office-home .button {
  gap: 1.5rem;
  padding: 0.9rem 1.4rem;
  box-shadow: 0 3px 0 #98556a18;
}

.post-office-home .hero-example {
  padding-block: 0.45rem;
  color: var(--ink-soft);
  text-decoration-style: dotted;
  text-underline-offset: 0.5rem;
}

.post-office-home .hero-example span {
  margin-left: 0.6rem;
}

.post-office-home .hero-note {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--muted);
}

.post-office-home .hero-art {
  position: relative;
  margin: 1.5rem 1.25rem 2rem;
}

.post-office-home .postcard-portrait {
  position: relative;
  aspect-ratio: 1;
  max-width: 440px;
  margin-inline: auto;
  overflow: hidden;
  border: 9px solid #fffdf9;
  border-radius: 48% 48% 45% 45%;
  background: #f2e9e4;
  box-shadow: 0 0 0 1px #e4d7d0;
}

/*
  새 원화는 정사각형을 거의 꽉 채운 그림이다. 예전 원화처럼 확대해 밀어 넣으면 모자와 귀가 잘린다 —
  액자를 그대로 채우고 비율만 지킨다. 그림에서 가장 먼 점도 액자 반지름의 90% 안에 있어서
  둥근 액자가 귀·꼬리·발을 자르지 않는다.
*/
.post-office-home .postcard-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.post-office-home .postage-stamp {
  position: absolute;
  top: -1rem;
  left: -0.25rem;
  width: 90px;
  padding: 0.65rem 0.35rem;
  border: 3px dotted #cbbb9e;
  background: #fff8e8;
  color: #806a47;
  text-align: center;
  font-size: 0.7rem;
  line-height: 1.6;
  transform: rotate(-12deg);
}

.post-office-home .postage-stamp svg {
  display: block;
  width: 40px;
  margin: 0.15rem auto;
  stroke: currentColor;
  stroke-width: 1.5;
}

.post-office-home .hero-art figcaption {
  position: absolute;
  left: 0;
  bottom: -1.5rem;
  padding: 0.9rem 1.15rem;
  border: 1px solid #e4d7d0;
  border-radius: 10px 10px 10px 3px;
  background: #fffdf9;
  box-shadow: 0 4px 12px #785e4908;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.8;
  transform: rotate(-3deg);
}

.post-office-home .hero-art figcaption span {
  display: block;
}

.post-office-home .postal-note {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  padding: 1.2rem 1.5rem;
  margin-bottom: 4.5rem;
  border-block: 1px solid var(--line);
  background: #f3eeea;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.post-office-home .postal-note p {
  margin: 0;
}

.post-office-home h2 {
  font-size: clamp(1.5rem, 1.1rem + 0.7vw, 1.85rem);
  letter-spacing: -0.035em;
}

.post-office-home .topics,
.post-office-home .principles,
.post-office-home .read-more {
  margin-bottom: 4.5rem;
}

.post-office-home .topics-lead {
  color: var(--muted);
}

.post-office-home .principle-list,
.post-office-home .link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-office-home .principle-list {
  counter-reset: principle;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 1.75rem;
}

.post-office-home .principle-list li {
  counter-increment: principle;
  border-top: 1px solid var(--line-strong);
  padding-top: 1.1rem;
}

.post-office-home .principle-list li::before {
  content: "0" counter(principle);
  display: block;
  margin-bottom: 0.7rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.post-office-home .principle-list p,
.post-office-home .read-more p {
  color: var(--ink-soft);
}

.post-office-home .read-more {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding-top: 2rem;
}

.post-office-home .link-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  text-decoration: none;
}

.post-office-home .link-list a:hover {
  color: var(--accent-ink);
}

.post-office-home .closing {
  padding: 3rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line-strong);
  outline: 1px dashed var(--line-strong);
  outline-offset: -9px;
  border-radius: 8px;
  background: #f6ede7;
  text-align: center;
}

.post-office-home .closing > p:not(.home-eyebrow) {
  margin-bottom: 1.5rem;
  color: var(--ink-soft);
}

/* ── 입력 폼 ─────────────────────────────────────────────────────────── */

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.form-card-again {
  margin-top: 2rem;
  padding: 0;
}

.form-card-again > summary {
  padding: 1rem 1.4rem;
  font-weight: 500;
  cursor: pointer;
}

.form-card-again[open] > summary {
  border-bottom: 1px solid var(--line);
}

.form-card-again .reading-form {
  padding: 1.2rem 1.4rem 1.4rem;
}

.reading-form {
  display: grid;
  gap: 1.1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  border: 0;
  padding: 0;
  min-width: 0;
}

.field > label,
.field > legend {
  font-weight: 500;
  padding: 0;
}

.optional {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.9rem;
}

.hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input:not([type]),
select {
  width: 100%;
  min-height: 46px;
  padding: 0.5rem 0.7rem;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

input:disabled,
select:disabled {
  background: var(--surface-soft);
  color: var(--muted);
}

.date-row {
  display: grid;
  grid-template-columns: minmax(6rem, 1.2fr) repeat(2, minmax(4.5rem, 0.8fr));
  gap: 0.6rem;
}

.date-cell {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.date-cell > label {
  font-size: 0.88rem;
  color: var(--muted);
}

.date-cell-wide {
  grid-column: 1 / -1;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
}

.choice input {
  width: 20px;
  height: 20px;
  min-height: 0;
  accent-color: var(--accent);
}

.time-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.2rem;
}

.time-row input[type="time"] {
  width: auto;
  min-width: 9rem;
}


.form-alert {
  margin: 0 0 0.6rem;
  padding: 0.7rem 0.9rem;
  background: var(--accent-soft);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  color: var(--accent-ink);
}

.form-alert a {
  margin-left: 0.4rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
}

.form-status {
  margin: 0;
  min-height: 1.4rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* htmx가 요청 중인 폼에만 「계산 중」과 취소를 보여준다. 표시용 CSS는 우리가 들고 있다. */
.button-busy,
.form-cancel {
  display: none;
  font-size: 0.9rem;
}

.reading-form.htmx-request .button-busy,
.reading-form.htmx-request .form-cancel {
  display: inline;
}

/* ── 결과 ────────────────────────────────────────────────────────────── */

.workspace {
  display: block;
}

/* 편지 카드는 안쪽을 넉넉히 둔다 — 1.4rem에서는 20px 장 제목과 본문이 카드 테두리에 바짝 붙어 좁아 보였다(2026-09-25). */
.reading-result {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.2rem 2.5rem;
}

.reading-result:focus {
  outline: none;
}

.result-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 1.2rem;
}

.result-kind {
  margin: 0 0 0.2rem;
  font-size: 0.88rem;
  color: var(--accent-ink);
  font-weight: 500;
}

.result-note {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.result-note-stored {
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
}

.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.2rem;
}

.notice h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.notice p {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.notice ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.95rem;
}

.notice-warning {
  background: var(--warn-soft);
  border-color: #ecd9b6;
}

.notice-warning h3 {
  color: var(--warn);
}

.notice-uncertain {
  background: var(--accent-soft);
  border-color: #edd3da;
}

.notice-uncertain h3 {
  color: var(--accent-ink);
}

.notice-figures {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.candidate-group {
  margin-bottom: 0.8rem;
}

.candidate-group h4 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.candidate-group ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.92rem;
}

.pillars {
  margin-bottom: 1.6rem;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}

.pillar-cell {
  display: grid;
  gap: 0.15rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem;
}

.pillar-cell-empty {
  background: var(--surface);
  border-style: dashed;
}

.pillar-pos {
  font-size: 0.85rem;
  color: var(--muted);
}

.pillar-hangul {
  font-size: 1.3rem;
}

.pillar-hanja {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.pillar-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.pillar-badge {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  justify-self: start;
}

.pillar-meta {
  font-size: 0.9rem;
  color: var(--muted);
}

.chapters-hint {
  color: var(--muted);
  font-size: 0.92rem;
}

.letter-body .chapter {
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  margin-bottom: 0;
  background: transparent;
}

.letter-body .chapter-primary {
  border-color: var(--line);
}

.letter-body .chapter-body {
  border-top: none;
  padding: 0.25rem 0 2.2rem;
}

/*
  장 제목 줄(2026-09-25): 기본 ▶/▼ 표시는 글줄 밖 카드 여백에 매달리고 장 번호와 붙어 「▼1」로 보였다.
  기본 표시를 끄고, 번호는 동그란 표로, 펼침 표시는 줄 끝의 꺾쇠로 따로 그린다.
*/
.letter-body .chapter > summary {
  list-style: none;
  padding: 1.3rem 0;
}

.letter-body .chapter > summary::-webkit-details-marker {
  display: none;
}

.letter-body .chapter-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.letter-body .chapter-heading::after {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  margin: 0 0.35rem 0.3rem auto;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

.letter-body .chapter[open] > summary .chapter-heading::after {
  margin-bottom: -0.2rem;
  transform: rotate(-135deg);
}

.letter-body .chapter-no {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  margin: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0;
}

/* 접힌 장의 미리보기와 펼친 본문은 제목 글자 줄에 맞춘다 — 번호 칸만큼 들여 써서 장의 구조가 보이게 한다. */
.letter-body .chapter-heading:has(.chapter-no) + .chapter-teaser {
  padding-left: 2.65rem;
}

@media (min-width: 761px) {
  .letter-body .chapter:has(.chapter-no) > .chapter-body {
    padding-left: 2.65rem;
  }
}

/*
  편지 글자 위계(2026-09-25 UX 검토): 장 제목 16.8px·본문 16.3px·항목 제목 12.8px로 크기 차이가 없어
  무엇이 중요한지 한눈에 들어오지 않았다. 장 제목 → 장의 핵심 한 줄 → 항목 제목 → 본문 → 풀이 조건 순으로
  크기와 진하기를 나눈다. 글은 그대로 두고 보이는 모양만 바꾼다.
*/
.letter-body .chapter-heading {
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

/* 장마다 한 줄만 크게 세운다 — 장 첫 문단의 첫 문장이 그 장의 결론이다. 항목의 굵은 첫 문장은 본문 크기 그대로 둔다.
   한 해 편지는 장 전체가 요약 한 흐름이라(2026-09-25) 요약 문단은 본문과 같은 크기로 둔다. */
.letter-body .chapter-lead .key-sentence {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.14rem;
  line-height: 1.6;
}

/* 열두 구간 장의 첫 문장은 날짜를 줄줄이 잇는 긴 문장이라, 크게 세우면 오히려 읽기 어렵다 — 본문 크기의 굵은 글씨로 둔다. */
.letter-body .chapter[id$="-months"] .chapter-lead .key-sentence {
  display: inline;
  margin-bottom: 0;
  font-size: inherit;
  line-height: inherit;
}

/* 항목 사이를 벌리고, 항목 제목은 본문보다 조금 큰 소제목으로 세운다 — 12.8px 작은 글씨가 앞 문단에 붙어 있었다. */
.letter-body .chapter-body > .item,
.letter-body .chapter-body > .item-now {
  margin-top: 2.1rem;
}

/* 편지 본문은 줄 사이와 문단 사이를 조금 더 벌린다 — 문단이 붙어 한 덩어리로 보였다(2026-09-25). */
.letter-body .item p {
  margin-bottom: 0.85rem;
  line-height: 1.85;
}

.letter-body .item p:last-child {
  margin-bottom: 0;
}

.letter-body .chapter-body > .item {
  margin-bottom: 0;
}

.letter-body .chapter-body > .item-now {
  margin-bottom: 0.4rem;
}

.chapter {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 0.6rem;
  background: var(--surface);
}

.chapter-primary {
  border-color: var(--line-strong);
}

.chapter > summary {
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  list-style-position: outside;
}

.chapter > summary::marker {
  color: var(--accent);
}

/* summary 안의 제목은 인라인이어야 마커와 같은 줄에 선다. */
.chapter-heading {
  display: inline;
  font-size: 1.05rem;
}

.chapter-no {
  color: var(--accent-ink);
  font-size: 0.82rem;
  font-weight: 600;
  margin-right: 0.45rem;
}

.chapter-body {
  padding: 0 0.9rem 1rem;
  border-top: 1px solid var(--line);
}

.chapter-lead {
  padding: 0.15rem 0 0.2rem;
  margin: 0;
}

/* 이전 상품(저장본)의 풀이 조건 칸. 본문과 같은 크기·진하기로 서 있어 본 내용만큼 눈에 걸렸다 — 작고 옅게 둔다. */
.chapter-caveats {
  margin-top: 2.1rem;
  padding: 1rem 1.2rem 1.1rem;
  border-radius: 10px;
  background: var(--surface-soft);
}

.chapter-caveats > h5,
.caveats-label {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.chapter-caveats .item {
  margin-bottom: 0.7rem;
}

.chapter-caveats .item p,
.chapter-caveats .item-list {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.7;
}

.letter-body .chapter-caveats h5.item-title {
  color: var(--ink-soft);
  font-size: 0.86rem;
  margin: 0 0 0.1rem;
}

.item {
  margin: 0 0 1.05rem;
}

.item:last-child {
  margin-bottom: 0;
}

.item-title {
  margin: 0 0 0.25rem;
}

.letter-body h5.item-title {
  color: var(--accent-ink);
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

.item p {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.item p:last-child {
  margin-bottom: 0;
}

.item-list {
  margin: 0 0 0.6rem;
  padding-left: 1.1rem;
  font-size: 0.98rem;
}

.evidence,
.calc-evidence {
  border-top: 1px solid var(--line);
  margin-top: 0.5rem;
}

.evidence > summary,
.calc-evidence > summary {
  padding: 0.4rem 0;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
}

.calc-evidence {
  margin: 1.4rem 0;
}

.calc-evidence > summary {
  font-size: 0.95rem;
}

.calc-body {
  font-size: 0.93rem;
  color: var(--ink-soft);
  overflow-x: auto;
}

.calc-body h4 {
  margin-top: 1rem;
}

.calc-body ul {
  padding-left: 1.1rem;
}

.calc-line {
  color: var(--muted);
}

.calc-table {
  border-collapse: collapse;
  min-width: 34rem;
  font-size: 0.9rem;
}

.calc-table th,
.calc-table td {
  border: 1px solid var(--line);
  padding: 0.35rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.calc-table thead th {
  background: var(--surface-soft);
}

.calc-cycles {
  columns: 2 12rem;
  list-style: none;
  padding-left: 0;
}

.result-meta {
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

/* 편지의 마지막 장 밑줄이 편지 끝을 가른다 — 여기서 선을 또 그으면 가로줄이 두 겹으로 섰다. */
.save-box {
  margin-top: 1.8rem;
}

.save-status {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--accent-ink);
}

/* 공유 단추. 보관 다음에 두고, 안내에서는 「이어서 읽기」 앞에 둔다. */
.share-box {
  margin-top: 1.2rem;
}

.share-status {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--accent-ink);
}

.share-status:empty {
  display: none;
}

/* 결과 카드. 미리보기는 좁은 화면에서도 한눈에 보이게 폭을 줄여 둔다. */
.card-box {
  margin-top: 1.2rem;
}

.card-preview {
  margin-top: 1rem;
}

.card-image {
  display: block;
  width: 100%;
  max-width: 22rem;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.card-preview .hint {
  margin-top: 0.6rem;
}

.card-status {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--accent-ink);
}

.card-status:empty {
  display: none;
}

/* ── 보관함 ──────────────────────────────────────────────────────────── */

.archive-count {
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.4rem;
  margin-bottom: 0.4rem;
}

.archive-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.archive-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}

.archive-item-head {
  display: grid;
  gap: 0.1rem;
  min-width: 12rem;
}

.archive-item-head small {
  color: var(--muted);
  font-size: 0.87rem;
}

.archive-item-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.archive-empty {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── 예시 편지 ───────────────────────────────────────────────────────── */

.sample-letter {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.sample-badge {
  margin: 0 0 0.3rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-ink);
}

.sample-letter h2 {
  margin-top: 0;
}

/* ── 좁은 화면 ───────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .post-office-home .hero-art {
    margin-top: 3.5rem;
    margin-bottom: 3.5rem;
  }

  .post-office-home .postage-stamp {
    top: -4rem;
    width: 72px;
    padding: 0.45rem 0.25rem;
    font-size: 0.65rem;
  }

  .post-office-home .postage-stamp svg {
    width: 32px;
  }

  .post-office-home .hero-art figcaption {
    bottom: -3rem;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .site-main {
    padding-block: 1.4rem 2.4rem;
  }

  .site-main > .shell > * + * {
    margin-top: 1.6rem;
  }

  .site-main > .shell > .page-heading + * {
    margin-top: 2rem;
  }

  .post-office-home .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: 0;
    padding-block: 0.5rem 2.5rem;
  }

  .post-office-home .hero-art {
    width: min(100%, 340px);
    margin-inline: auto;
  }

  .post-office-home .postage-stamp {
    left: 0.4rem;
  }

  .post-office-home .hero-art figcaption {
    left: 0.5rem;
    font-size: 0.9rem;
  }

  .post-office-home .hero-actions {
    gap: 1rem;
  }

  .post-office-home .principle-list,
  .post-office-home .read-more {
    grid-template-columns: 1fr;
  }

  .post-office-home .read-more {
    gap: 1rem;
  }

  .post-office-home .postal-note {
    padding-inline: 1rem;
  }

  .post-office-home .postal-note,
  .post-office-home .topics,
  .post-office-home .principles,
  .post-office-home .read-more {
    margin-bottom: 3rem;
  }

  .form-card,
  .reading-result,
  .sample-letter {
    padding: 1.1rem;
    border-radius: 10px;
  }

  .reading-result {
    padding: 1.5rem 1.3rem;
  }

  .form-card-again .reading-form,
  .form-card-again > summary {
    padding-inline: 1.1rem;
  }

  .date-row {
    grid-template-columns: 1fr 1fr;
  }

  .date-cell:first-child {
    grid-column: 1 / -1;
  }


  .chapter-body {
    padding-inline: 0.8rem;
  }

  .calc-cycles {
    columns: 1;
  }

  .archive-item {
    flex-direction: column;
    align-items: stretch;
  }

  .archive-item-actions {
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* ── 상품 카탈로그 ─────────────────────────────────────────────────── */

.product-sale-note {
  margin-bottom: 1.6rem;
}

.product-catalog {
  display: grid;
  gap: 2.6rem;
}

.product-group-title {
  margin-bottom: 0.35rem;
}

.product-group-lead {
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.product-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.product-group-pair .product-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* 매일 무료 칸은 한 장뿐이라 한 줄을 다 쓴다 — 세 칸 격자에 넣으면 넓은 카드 틀이 좁은 칸에 눌린다. */
.product-group-free .product-list {
  grid-template-columns: minmax(0, 1fr);
}

.product-card {
  --letter-color: var(--accent);
  --letter-paper: var(--accent-soft);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px 14px 5px 5px;
  background: var(--surface);
}

.product-group-love .product-card,
.product-group-marriage .product-card,
.product-group-pair .product-card {
  --letter-color: #98556a;
  --letter-paper: #f6e8eb;
}

.product-group-wealth .product-card {
  --letter-color: #876c40;
  --letter-paper: #f7edd9;
}

.product-group-work .product-card {
  --letter-color: #5d6b7a;
  --letter-paper: #eef1f4;
}

.product-group-general .product-card,
.product-group-free .product-card {
  --letter-color: #637661;
  --letter-paper: #edf0e6;
}

/*
  편지 꾸러미: 메뉴의 대표 자리. 같은 카드 틀에 테두리만 한 단 짙게 두어 먼저 눈에 들게 하고,
  색은 사이트 대표색을 쓴다 — 새 장식을 더하지 않는다.
*/
.product-group-bundle .product-card {
  --letter-color: var(--accent-ink);
  --letter-paper: var(--accent-soft);
  border: 1.5px solid var(--line-strong);
  box-shadow: 0 1px 0 var(--line);
}

.product-group-bundle .product-name {
  font-size: 1.24rem;
}

.product-link {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem 1.4rem;
  text-decoration: none;
  color: var(--ink);
}

.product-link:hover {
  background: var(--letter-paper);
}

.product-link:focus-visible {
  outline-offset: -4px;
}

.product-badge {
  align-self: flex-start;
  justify-self: start;
  width: max-content;
  margin: 0 0 0.75rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--letter-paper);
  color: var(--letter-color);
  font-size: 0.78rem;
  font-weight: 600;
}

.product-number {
  position: absolute;
  top: 1.3rem;
  right: 1.4rem;
  color: var(--letter-color);
  font-size: 0.8rem;
  font-weight: 600;
}

.product-name {
  margin-bottom: 0.45rem;
  padding-right: 2.2rem;
  font-size: 1.15rem;
}

.product-lead {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.product-contents {
  flex: 1 1 auto;
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.product-contents li + li {
  margin-top: 0.28rem;
}

/* 정식 가격. 베타 기간에는 무료라는 표시(배지)와 함께 읽힌다 — 긋거나 할인처럼 보이게 쓰지 않는다. */
.product-price {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

/*
  고르는 카드(올해 취직·이직운): 카드 전체가 한 링크가 아니라, 상황마다 그 편지로 가는 버튼 두 개가 선다.
  버튼은 다른 카드의 「이 편지 펼치기」 줄과 같은 선·색을 쓴다.
*/
.product-card-choice .product-link:hover {
  background: none;
}

.product-choices {
  display: grid;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.product-choice {
  display: grid;
  gap: 0.1rem;
  padding: 0.7rem 0.2rem;
  color: var(--ink);
  text-decoration: none;
}

.product-choice + .product-choice {
  border-top: 1px dashed var(--line);
}

.product-choice:hover {
  background: var(--letter-paper);
}

.product-choice-target {
  color: var(--letter-color);
  font-size: 0.9rem;
  font-weight: 600;
}

/* 꾸러미만: 한 통씩 따로 살 때의 합계. 실제로 파는 값의 합일 때만 선다. */
.product-price-separate {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 400;
}

.product-open {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
  color: var(--letter-color);
  font-size: 0.9rem;
  font-weight: 600;
}

.product-group-free .product-link {
  padding: 1.5rem 1.6rem 1.35rem;
}

.product-group-free .product-name {
  font-size: 1.28rem;
}

@media (min-width: 761px) {
  /*
    늘 무료 칸의 카드만 넓게 선다: 왼쪽에 이름과 소개, 가운데에 담기는 것, 오른쪽에 식구 그림.
    줄을 못 박아 둔다 — 이름과 소개는 2·3줄에 붙어 서고, 그림이 남기는 높이는 4줄이 받는다.
    이 줄이 없으면 그림 높이가 이름과 소개 사이를 벌려 카드 가운데가 텅 빈다.
  */
  .product-group-free .product-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) auto;
    grid-template-rows: auto auto auto 1fr auto;
    column-gap: 2rem;
    align-items: start;
  }

  /* 배지는 글 쪽 두 칸만 쓴다 — 그림 칸까지 걸치면 그림과 같은 줄을 다투게 된다. */
  .product-group-free .product-badge {
    grid-area: 1 / 1 / 2 / 3;
  }

  .product-group-free .product-number {
    justify-self: end;
  }

  .product-group-free .product-name {
    grid-area: 2 / 1 / 3 / 2;
  }

  .product-group-free .product-lead {
    grid-area: 3 / 1 / 4 / 2;
  }

  .product-group-free .product-contents {
    grid-area: 2 / 2 / 5 / 3;
    margin-bottom: 0;
    align-self: center;
  }

  /*
    그림은 카드 맨 위부터 접는 선까지 한 칸을 통째로 쓴다. 두세 줄만 잡으면 그림 높이가
    그 줄에만 쌓여 카드가 훌쩍 높아진다 — 여러 줄에 걸쳐 두면 남는 높이를 나눠 받는다.
  */
  .product-group-free .product-link > .mascot {
    grid-area: 1 / 3 / 5 / 4;
    align-self: center;
  }

  .product-group-free .product-open {
    grid-area: 5 / 1 / 6 / -1;
    margin-top: 0.75rem;
  }
}

@media (max-width: 960px) {
  .product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-group-pair .product-list {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 꾸러미 세 장은 좁아지면 한 줄에 하나씩 — 둘·하나로 갈라 서면 셋째 장만 따로 떨어져 보인다. */
  .product-group-bundle .product-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .product-catalog {
    gap: 2rem;
  }

  .product-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-link,
  .product-group-free .product-link {
    padding: 1.1rem;
  }

  .product-name {
    font-size: 1.08rem;
  }
}

/*
  한 통씩 고르기: 평소에는 접어 두고, 연 줄에 무엇이 들었는지 한 줄로 알린다.
  열면 예전처럼 연애·결혼·궁합·재물·일·종합 칸이 차례로 선다.
*/
.product-singles {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.product-singles-summary {
  display: grid;
  gap: 0.2rem;
  padding: 1.1rem 3rem 1.1rem 1.4rem;
  position: relative;
  cursor: pointer;
  list-style: none;
}

.product-singles-summary::-webkit-details-marker {
  display: none;
}

.product-singles-summary::after {
  content: "+";
  position: absolute;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-ink);
  font-size: 1.35rem;
  font-weight: 500;
}

.product-singles[open] > .product-singles-summary::after {
  content: "−";
}

.product-singles[open] > .product-singles-summary {
  border-bottom: 1px solid var(--line);
}

.product-singles-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
}

.product-singles-lead {
  color: var(--muted);
  font-size: 0.93rem;
}

.product-singles-body {
  display: grid;
  gap: 2.4rem;
  padding: 1.6rem 1.4rem 1.6rem;
}

@media (max-width: 760px) {
  .product-singles-summary {
    padding: 1rem 2.6rem 1rem 1.1rem;
  }

  .product-singles-summary::after {
    right: 1.1rem;
  }

  .product-singles-body {
    gap: 2rem;
    padding: 1.2rem 1.1rem;
  }
}

/*
  꾸러미 결과 맨 위의 「한눈에 보기」: 편지마다 이름(바로가기)과 첫 문장 한 줄, 지금 구간으로 가는 길.
  이것만 읽어도 흐름이 잡히게 한다 — 아래 편지는 첫 장만 펼쳐 둔다.
*/
.bundle-glance {
  margin: 0 0 1.8rem;
  padding: 1.1rem 1.3rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.bundle-glance-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 0.8rem;
  font-size: 1.05rem;
}

.bundle-glance-title span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.bundle-glance-when {
  margin: -0.3rem 0 0.9rem;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.bundle-glance-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bundle-glance-name {
  font-weight: 700;
  color: var(--accent-ink);
}

.bundle-glance-line {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.bundle-glance-now {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--accent-ink);
  font-size: 0.88rem;
}

.bundle-part + .bundle-part {
  margin-top: 2.2rem;
}

.bundle-part-title {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 0.8rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line-strong);
  /* 편지 한 통의 제목이라 그 안의 장 제목(1.28rem)보다 한 단 크게 둔다. */
  font-size: 1.45rem;
}

.bundle-part-no {
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 600;
}

.sale-price {
  color: var(--ink-soft);
  font-weight: 600;
}

/*
  접힌 장: 제목 아래 첫 문장 한 줄로 무엇이 들었는지 알린다. 펼치면 본문이 같은 문장으로 시작하므로 숨긴다.
*/
.chapter-teaser {
  display: block;
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.55;
}

.chapter[open] > summary .chapter-teaser {
  display: none;
}

/* 항목의 결론 문장(첫 문단의 첫 문장). 훑어 내려갈 때 눈이 걸리는 자리다. */
.key-sentence {
  color: var(--ink);
  font-weight: 700;
}

/* 열두 구간 가운데 지금이 든 계절 묶음. */
.item-now {
  margin: 0.4rem 0;
  padding: 1rem 1.2rem 1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--accent-soft);
  scroll-margin-top: 5rem;
}

.item-now-badge {
  display: inline-block;
  margin: 0 0 0.35rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

/* 이번 달 운세 끝: 열두 달을 한 번에 보는 길. */
.monthly-next-step {
  margin: 1.4rem 0 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink-soft);
}

.monthly-next-step a {
  color: var(--accent-ink);
  font-weight: 600;
}

/* 결과 아래: 같은 편지를 다른 사람의 생일로 여는 길. */
.other-person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin: 1.4rem 0 0;
}

.other-person .hint {
  margin: 0;
}

.other-person-hint {
  margin: 0 0 0.4rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: var(--surface-soft);
}

/* 입력 화면: 보관함에 같은 해의 같은 계열 편지가 이미 있을 때의 안내. */
.overlap-notice {
  margin: 0 0 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 0.92rem;
}

/* 한 통짜리 편지 맨 위: 지금 구간으로 바로 가는 한 줄. */
.now-line {
  margin: 0 0 1.2rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.now-line a {
  margin-left: 0.3rem;
  color: var(--accent-ink);
  font-weight: 600;
}

/* 낱장 편지·긴 안내의 차례: 장 이름만 걸고, 누르면 그 장을 펼쳐 그 자리로 간다. */
.letter-toc {
  margin: 0 0 1.4rem;
  padding: 0.9rem 1.2rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.letter-toc-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 0.98rem;
}

/* 번호를 항목 안에 둔다 — 목록 마커는 항목 밖에 서서, 한 줄에 여럿이 놓이면 「타고난 결2. 저절로…」처럼 앞 항목에 붙었다. */
.letter-toc-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

/* 번호와 링크를 한 줄로 묶는다 — 긴 장 이름이 번호만 남기고 다음 줄로 넘어가지 않게, 링크 안에서 줄을 바꾼다. */
.letter-toc-list li {
  display: flex;
  gap: 0.3rem;
  counter-increment: toc;
}

.letter-toc-list li::before {
  content: counter(toc) ".";
  flex: none;
  padding-block: 0.3rem;
  color: var(--muted);
}

/* 줄 사이 틈 대신 링크 안쪽 여백으로 벌린다 — 보이는 간격은 비슷하고 누르는 칸이 28px에서 38px 남짓으로 커진다. */
.letter-toc-list a {
  min-width: 0;
  padding-block: 0.3rem;
  color: var(--accent-ink);
}

/* 첫 화면의 세 갈래: 목록을 다 훑기 전에 어떻게 읽을지 고른다. */
.catalog-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0 0 1.8rem;
}

.catalog-path {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}

.catalog-path strong {
  color: var(--accent-ink);
  font-size: 1.02rem;
}

.catalog-path span {
  color: var(--muted);
  font-size: 0.9rem;
}

.catalog-path:hover,
.catalog-path:focus-visible {
  border-color: var(--accent);
}

@media (max-width: 760px) {
  .catalog-paths {
    grid-template-columns: 1fr;
  }
}

/* 궁합 폼 단계: 지금 누구 칸인지와 다 채웠는지. */
.form-step-state {
  margin-left: 0.5rem;
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 600;
}

.form-progress {
  margin: 0.8rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* 운세 고르기 화면도 홈 목록처럼 넓은 폭을 쓴다. */
body:has(.catalog-page) .site-main > .shell {
  max-width: var(--shell);
}

/* 오류 안내의 「해당 칸으로 이동」이 두 줄로 갈리지 않게 한다. */
.form-alert a {
  white-space: nowrap;
}

/* 다시 계산하기도 다른 접는 칸처럼 오른쪽 ＋/− 표시를 쓴다. */
.form-card-again > summary {
  position: relative;
  padding-right: 3rem;
  list-style: none;
}

.form-card-again > summary::-webkit-details-marker {
  display: none;
}

.form-card-again > summary::after {
  content: "+";
  position: absolute;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-ink);
  font-size: 1.3rem;
  font-weight: 500;
}

.form-card-again[open] > summary::after {
  content: "−";
}

/* 계산 근거 표를 옆으로 밀 수 있다는 안내는 표가 화면보다 넓어지는 폭에서만 보인다. */
.table-hint {
  display: none;
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .table-hint {
    display: block;
  }
}

.guide-return {
  margin: 0 0 1rem;
  font-size: 0.93rem;
}

/* 안내의 갱신일·운영 주체. 구조화 데이터의 dateModified와 같은 날짜를 보인다. */
.page-updated {
  margin: 0.7rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* 안내 본문의 비교 표. 질문에 바로 답하는 표라 옆으로 밀지 않고 폭 안에서 줄을 바꾼다.
   칸 안의 낱말이 화면보다 길 때만 표를 옆으로 민다. */
.guide-table-wrap {
  overflow-x: auto;
  margin: 0 0 0.9rem;
}

.guide-table {
  border-collapse: collapse;
  width: 100%;
  margin: 0;
  font-size: 0.95rem;
}

.guide-table th,
.guide-table td {
  border: 1px solid var(--line);
  padding: 0.45rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

.guide-table thead th {
  background: var(--surface-soft);
}

@media (max-width: 640px) {
  .guide-table {
    font-size: 0.88rem;
  }

  .guide-table th,
  .guide-table td {
    padding: 0.4rem 0.45rem;
  }
}

/* 안내 끝에서 바로 편지로 가는 자리. 가격 표시는 메뉴 카드와 같은 문구를 쓴다. */
.guide-cta {
  margin: 1.6rem 0;
}

.guide-cta + .guide-cta {
  margin-top: -0.6rem;
}

.guide-cta-note {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.archive-start {
  margin-top: 0.8rem;
}

.bundle-part {
  scroll-margin-top: 4.5rem;
}

/* ── 상품 폼·결과 보조 ─────────────────────────────────────────────── */

.sale-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.sale-badge {
  display: inline-block;
  width: max-content;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 600;
}

.form-contents {
  margin: 0.6rem 0 1rem;
}

.form-section {
  margin: 1.4rem 0 0.6rem;
  font-size: 1.05rem;
}

.chapters-subhead {
  margin: 1.2rem 0 0.4rem;
  font-size: 1rem;
  color: var(--ink-soft);
}

.pair-score {
  margin-bottom: 1.4rem;
}

.pair-score-value {
  margin: 0.4rem 0 0;
  font-size: 1.8rem;
  color: var(--accent-ink);
}

/* ── 식구 그림 ─────────────────────────────────────────────────────── */

/*
  승인 원화는 모두 정사각형이다. 자리도 정사각형으로 잡고 contain으로 넣어 귀가 잘리거나
  그림이 늘어나지 않게 한다. 자리 크기가 고정이라 그림이 늦게 도착해도 글이 밀리지 않는다.
*/
.mascot {
  display: block;
  flex: none;
  width: var(--mascot-size, 150px);
  height: var(--mascot-size, 150px);
  max-width: 100%;
  object-fit: contain;
}

/*
  카드: 베타 표시 아래에 그림 한 장. 카드마다 한 장까지만 놓고, 자리 크기는 스물두 장이 모두 같다 —
  한 장만 그림을 키우면 원화의 빈 여백까지 늘어나 카드가 높아지고 글 사이가 벌어진다.
*/
.product-link > .mascot {
  --mascot-size: 168px;
  margin: 0.1rem auto 0.9rem;
}

/* 입력 카드: 어느 식구의 편지를 여는지 그림으로 먼저 알린다. */
.form-card-invite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1.8rem;
}

.form-card-invite > * {
  grid-column: 1;
}

.form-card-invite > .mascot {
  --mascot-size: 156px;
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
}

/* 입력 폼은 그림 아래 칸까지 다 쓴다. */
.form-card-invite > .reading-form {
  grid-column: 1 / -1;
}

/* 결제 전이라 폼 대신 서는 안내. 무료 편지로 가는 단추가 좁은 화면에서 줄을 바꿔 선다. */
.closed-free-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.8rem 0 1rem;
}

/* 세 구간이 모두 부담인 계절 아래의 한 줄(그 석 달을 넘기는 방법). 줄 글보다 한 단계 부드럽게 둔다. */
.year-month-after {
  justify-self: stretch;
  margin: 0.45rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 0.92em;
  line-height: 1.6;
}

/* ── 결제 ─────────────────────────────────────────────────────────────── */

/*
  결제 전 미리보기(_CheckoutPreview). 넣은 정보 → 편지 앞부분 → 잠긴 장 제목 → 결제 칸 순서로 한 카드에 세운다.
  편지 앞부분은 편지 본문과 같은 글꼴·간격으로, 잠긴 장은 흐린 글씨로 둔다.
*/
.checkout-preview {
  display: grid;
  gap: 1.3rem;
}

.checkout-preview h2 {
  margin: 0;
}

.preview-kind {
  margin: 0 0 -0.9rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.preview-lede {
  margin: 0;
  color: var(--ink-soft);
}

.preview-input {
  display: grid;
  gap: 0.6rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.preview-input h3 {
  margin: 0;
  font-size: 1rem;
}

.preview-input-list {
  display: grid;
  gap: 0.25rem;
  margin: 0;
}

.preview-input-list div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 0.6rem;
}

.preview-input-list dt {
  color: var(--muted);
}

.preview-input-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.preview-edit > summary {
  cursor: pointer;
  color: var(--accent-ink);
  font-weight: 600;
}

.preview-edit .reading-form {
  margin-top: 1rem;
}

.preview-letter {
  display: grid;
  gap: 0.9rem;
}

.preview-chapter {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0.4rem 0 0;
}

.preview-cut {
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-weight: 600;
}

.preview-locked {
  color: var(--muted);
}

.preview-locked-title,
.preview-locked-letter {
  margin: 0.4rem 0 0.2rem;
  font-weight: 600;
}

.preview-locked ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.preview-locked li + li {
  margin-top: 0.15rem;
}

.checkout-form,
.checkout-login {
  display: grid;
  gap: 0.9rem;
}

@media (max-width: 480px) {
  .preview-input-list div {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* 입력 폼 끝의 결제 칸. 동의 두 줄은 긴 문장이라 체크 칸을 첫 줄에 붙이고 글이 그 옆에서 접힌다. */
.purchase-box {
  display: grid;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-soft);
}

.purchase-box legend {
  padding: 0 0.3rem;
  font-weight: 700;
}

.purchase-summary {
  margin: 0;
  font-size: 1.02rem;
}

.purchase-box .choice {
  display: flex;
  align-items: flex-start;
}

.purchase-box .choice input {
  flex: none;
  margin-top: 0.35rem;
}

.pay-status h1 {
  margin-top: 0;
  font-size: 1.5rem;
}

.pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}

.pay-order {
  display: grid;
  gap: 0.2rem;
  margin: 1.2rem 0 0.6rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--line-strong);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.pay-order div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pay-order dt {
  min-width: 4.5rem;
  color: var(--muted);
}

.pay-order dd {
  margin: 0;
}

.pay-order code {
  overflow-wrap: anywhere;
}

.account-orders small {
  color: var(--muted);
}

/*
  판매자 정보(전자상거래법 제10조). 모든 항목을 펼쳐 둔다 — 초기 화면 표시(시행규칙 제7조). 바닥글에서는 운세 참고 문구와 같은
  작은 글씨로 한 줄씩 이어 두고(좁은 화면은 한 줄에 하나), 이용약관 제3조에서는 본문 글씨 크기의 표로 쓴다.
*/
.seller-info {
  margin-top: 1.6rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.6;
}

.seller-info-title {
  margin: 0 0 0.3rem;
  font-weight: 600;
  font-size: 0.82rem;
}

.seller-info-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.1rem;
  margin: 0;
}

.seller-info-list div {
  display: flex;
  gap: 0.4rem;
}

.seller-info-list dt {
  color: var(--muted);
}

.seller-info-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.prose .seller-info {
  font-size: 0.95rem;
}

.prose .seller-info-list {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.prose .seller-info-list div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.6rem;
}

@media (max-width: 480px) {
  .seller-info-list {
    flex-direction: column;
  }

  .prose .seller-info-list div {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/*
  결과 머리글: 편지가 도착한 자리에 강아지 한 명. 본문은 그림 없이 글이 먼저다.
  그림이 커서 제목 옆에 190px 빈자리가 생기고 편지 첫 줄이 한참 아래로 밀렸다(2026-09-25 UX 검토) —
  그림을 줄이고 제목을 그림 가운데 높이에 맞춘다.
*/
.result-head-arrival {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1.6rem;
}

.result-head-arrival > * {
  grid-column: 1;
}

.result-head-arrival > .mascot {
  --mascot-size: 112px;
  grid-column: 2;
  grid-row: 1;
}

.result-head-text > :last-child {
  margin-bottom: 0;
}

/* 보관함 인사. 저장된 사본을 펼친 화면에서는 서버가 이 그림을 아예 내지 않는다. */
.page-heading-greet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1.6rem;
  align-items: center;
}

.page-heading-greet > * {
  grid-column: 1;
}

.page-heading-greet > .mascot {
  grid-column: 2;
  grid-row: 1 / span 2;
}

@media (max-width: 760px) {
  /*
    좁은 화면에서는 그림을 글 위로 올리고, 어느 자리에서나 같은 크기로 둔다.
    한 칸으로 접혀도 그림은 히어로 그림(위 .hero-art)과 같이 칸 가운데 선다 —
    글은 왼쪽 정렬 그대로 두고, 폭이 고정인 그림만 가운데로 맞춘다.
  */
  .product-link > .mascot,
  .product-group-free .product-link > .mascot {
    --mascot-size: 136px;
    margin-inline: auto;
  }

  .form-card-invite,
  .result-head-arrival,
  .page-heading-greet {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-card-invite > .mascot,
  .result-head-arrival > .mascot,
  .page-heading-greet > .mascot {
    --mascot-size: 128px;
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
    margin-bottom: 0.7rem;
  }

  .result-head-arrival > .mascot {
    --mascot-size: 96px;
    margin-bottom: 0.4rem;
  }
}

/* ── 오늘 운세 새 형식 (다른 상품에 영향 없음) ───────────────────────── */

.daily-story-result .result-head-daily {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.45rem;
}

.daily-story {
  max-width: 100%;
}

.daily-story-date {
  margin: 0 0 0.45rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.daily-story-condition {
  margin: 0 0 0.45rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* 조건 안내가 제목 아래로 내려오면서 분야 탭에 붙었다 — 탭과 한 칸 띄운다. */
.daily-story-condition + .daily-story-fortunes {
  margin-top: 0.9rem;
}

.daily-story-kicker {
  margin: 0 0 0.35rem;
  color: var(--accent-ink);
  font-size: 1rem;
  font-weight: 600;
}

.daily-story-headline {
  margin: 0 0 0.6rem;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.daily-story-overview {
  margin: 0 0 1rem;
}

.daily-story-overview p,
.daily-story-action p,
.daily-story-aside-body p {
  margin: 0 0 0.7rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.daily-story-overview p:last-child,
.daily-story-action p:last-child,
.daily-story-aside-body p:last-child {
  margin-bottom: 0;
}

.daily-story-aside {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  margin: 0;
  padding: 0;
}

.daily-story-aside > summary {
  cursor: pointer;
  list-style-position: inside;
  padding: 0.75rem 0;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.daily-story-aside > summary::-webkit-details-marker {
  color: var(--accent);
}

.daily-story-aside-body {
  padding: 0 0 1rem;
}

/* 총운은 하루의 결론이라 한 칸 크게 둔다. */
/* 탭이 있는 화면에서는 제목 한 줄이 총운 상자를 대신한다. */
.daily-story-title {
  margin: 0.1rem 0 0.9rem;
  font-size: 1.45rem;
}

/* 총운 문단은 「오늘 운세」 칸을 여는 줄이라 본문보다 조금 크게 둔다. */
.daily-story-details .daily-story-overview {
  margin-top: 0.15rem !important;
  font-size: 1.02rem;
  line-height: 1.8;
}

.daily-story-hero {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem 1.2rem;
  margin-bottom: 1.1rem;
}

.daily-story-hero .daily-story-headline {
  font-size: 1.35rem;
  margin-bottom: 0.55rem;
}

.daily-story-hero p:not(.daily-story-headline) {
  font-size: 1.02rem;
  line-height: 1.85;
}

/* 분야 칸은 훑어보는 자리라 카드로 나눈다. 넓은 화면에서는 두 줄로 접는다. */
.daily-story-fortunes {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.1rem;
}

/* 탭이 켜지면 한 번에 한 칸만 보이므로 두 줄 배치를 쓰지 않는다. */
.daily-story-fortunes.is-tabbed {
  display: block;
}

.fortune-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
}

.fortune-tab {
  flex: 0 0 auto;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.fortune-tab:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.fortune-tab[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}

.fortune-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.daily-story-fortune {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem 0.95rem;
}

.daily-story-tag[hidden] {
  display: none;
}

.daily-story-tag {
  display: inline-block;
  margin: 0 0 0.35rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 600;
}

.daily-story-fortune p {
  margin: 0;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

@media (min-width: 760px) {
  .daily-story-fortunes {
    grid-template-columns: 1fr 1fr;
  }

  /* 칸이 홀수면 마지막 하나가 빈칸과 나란히 서지 않도록 한 줄을 쓴다. */
  .daily-story-fortune:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.daily-story-details {
  margin: 0 0 0.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

/* 탭 안으로 들어오면 다른 칸과 같은 카드라 윗줄을 긋지 않는다. 탭이 꺼진 화면에서는 한 줄을 다 쓴다. */
.daily-story-fortune.daily-story-details {
  margin: 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
  grid-column: 1 / -1;
}

/* 대목을 칸으로 쪼개지 않고 한 덩어리로 읽히게 둔다 — 문단 사이만 벌린다. */
.daily-story-details p {
  margin: 0.75rem 0 0;
  line-height: 1.7;
  max-width: var(--measure);
  overflow-wrap: anywhere;
}

/* 칸마다 시키는 말은 마지막 한 줄뿐이다. 읽고 난 뒤 무엇을 할지 눈에 바로 들어오게 세운다. */
.daily-story-step {
  margin-top: 0.85rem !important;
  padding-left: 0.7rem;
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-weight: 500;
}

/* 오늘의 한 가지는 실제로 할 일이라 눈에 먼저 들어오게 둔다. */
.daily-story-action {
  margin: 1.15rem 0 0.4rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
}

.daily-story-action .daily-story-kicker {
  color: var(--accent-ink);
}

.daily-story-aside {
  margin-top: 0.4rem;
}

@media (max-width: 760px) {
  .daily-story-result {
    padding: 1.5rem 1.3rem;
  }
}

/* 입력 기억 칸은 폼 맨 아래에서 조용히 서 있는다. */
.remember-field {
  border-top: 1px dashed var(--line);
  padding-top: 0.8rem;
}

.remember-field .hint {
  margin-top: 0.25rem;
}

/* 글 안에 놓이는 단추. 링크처럼 보이되 실제로는 단추다(주소를 바꾸지 않는다). */
.link-button {
  border: none;
  background: none;
  padding: 0;
  color: var(--accent-ink);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.link-button:hover {
  color: var(--accent);
}

/*
  누르는 칸 넓히기(2026-09-25 UX 검토): 글 안의 작은 단추와 바로가기가 25px 높이라 손가락으로 누르기 어려웠다.
  안쪽 여백만큼 바깥 여백을 거둬, 글 모양과 줄 간격은 그대로 두고 누르는 칸만 44px 가까이 키운다.
*/
.link-button {
  padding-block: 0.55rem;
  margin-block: -0.55rem;
}

.bundle-glance-now {
  padding-block: 0.55rem;
  margin-block: -0.3rem -0.55rem;
}

.now-line a {
  padding-block: 0.55rem;
}

@media (max-width: 760px) {
  .site-nav a {
    padding-block: 0.55rem;
  }
}

/* 긴 편지에서 맨 위(차례)로 돌아가는 단추. 한 화면 반 넘게 내려왔을 때만 site.js가 보인다. */
.to-top {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgb(51 48 46 / 0.14);
  color: var(--accent-ink);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.to-top[hidden] {
  display: none;
}

/*
  한 해 편지(2026-09-25 사용자 결정): 장 제목·차례·번호·펼치기 없이 한 통으로 읽는다. 문단 사이만 벌리고,
  날짜는 맨 끝 「달마다 보면」 목록에 모아 손볼 때·큰 결정 두기 좋은 때를 날짜 옆에 표시한다.
*/
.year-letter-story {
  display: grid;
  gap: 1rem;
}

.year-letter-story .item {
  margin: 0;
}

.year-letter-story .item p {
  margin-bottom: 1rem;
  line-height: 1.9;
}

.year-letter-story .item p:last-child {
  margin-bottom: 0;
}

.year-letter-story > .item:first-child .key-sentence {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.18rem;
  line-height: 1.6;
}

.year-months {
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.year-months-title {
  margin: 0 0 0.5rem;
  font-size: 1.08rem;
}

.year-months-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.year-months-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.year-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
}

.year-dot-fix {
  background: var(--accent);
}

.year-dot-good {
  background: var(--good);
}

.year-months-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.year-month {
  display: grid;
  grid-template-columns: 8.6rem minmax(0, 1fr);
  column-gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--line);
  scroll-margin-top: 5rem;
}

.year-month:last-child {
  border-bottom: none;
}

.year-month.is-now {
  margin-inline: -0.8rem;
  padding-inline: 0.8rem;
  border-radius: 10px;
  border-bottom-color: transparent;
  background: var(--accent-soft);
}

.year-month-date {
  color: var(--accent-ink);
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.year-month-what {
  display: grid;
  gap: 0.3rem;
  justify-items: start;
}

.year-month-now {
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.year-mark {
  padding: 0.05rem 0.6rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.7;
}

.year-mark-fix {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.year-mark-good {
  background: var(--good-soft);
  color: var(--good);
}

/* 지금 든 구간 줄은 바탕이 표시와 같은 색이라, 그 줄의 표시만 흰 바탕으로 띄운다. */
.year-month.is-now .year-mark {
  background: var(--surface);
}

.year-months-note {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

@media (max-width: 520px) {
  .year-month {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.15rem;
  }
}
