/* ==========================================================================
   올점 — 공통 스타일

   종전 alljum.css 는 선택자 261개 가운데 175개가 어느 쪽에서도 쓰이지 않았다.
   예전 화면의 잔재(.hero-content·.fortune-card·.result-box 따위)가 쌓인 위에
   색을 덧칠해 온 탓에, 같은 이름을 다시 쓰다 충돌이 나기도 했다(.chip).
   그래서 쓰는 것만 남겨 처음부터 다시 적는다.

   짜임새: 글꼴 → 값 → 기본 요소 → 뼈대 → 머리말·꼬리말 → 입력 → 버튼 → 판
   ========================================================================== */

/* ── 글꼴 ───────────────────────────────────────────────────────────────
   종전에는 CDN 에서 woff 를 받아 썼는데, 정작 같은 글꼴의 woff2 가
   assets/fonts 에 들어 있었다. 더 작고(약 30%) 같은 서버라 빠르다.        */
@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/Pretendard-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/Pretendard-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/Pretendard-SemiBold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/Pretendard-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Pretendard";
  src: url("/assets/fonts/Pretendard-ExtraBold.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}

/* ── 값 ─────────────────────────────────────────────────────────────────
   색은 한지(바탕)·먹(글씨)·인장 진홍(누르는 것)·금(강조) 넷.
   크기와 간격은 seeplore 시리즈 규격을 따른다.                            */
:root {
  color-scheme: light;

  --paper:    #f5efe3;   /* 바탕 */
  --paper-2:  #faf4e9;   /* 한 단계 밝은 바탕 */
  --card:     #fffdf9;   /* 판 */
  --ink:      #211b14;   /* 글씨 */
  --ink-2:    #5c4f3f;
  --ink-3:    #7a6a55;   /* 흐린 글씨 */
  --line:     #e8ddcb;   /* 테두리 */
  --line-2:   rgba(60, 47, 32, 0.16);
  --seal:     #8b2635;   /* 인장 진홍 */
  --seal-2:   #a63d4b;
  --gold:     #b8860b;
  --gold-2:   #9a7209;

  --shadow:   0 2px 10px rgba(80, 60, 35, 0.07);
  --shadow-2: 0 6px 18px rgba(80, 60, 35, 0.12);

  --r-card:  14px;
  --r-inner: 10px;
  --r-pill:  999px;

  --fs-title: 16px;
  --fs-body:  13.5px;
  --fs-small: 11px;
  --lh:       1.6;

  --gap: 10px;

  /* 옛 이름 — 결과·꿈해몽 쪽에 아직 남아 있어 함께 받아 둔다 */
  --text: #211b14;
  --muted: #7a6a55;
  --border: rgba(60, 47, 32, 0.16);
  --primary: #8b2635;
}

/* ── 기본 요소 ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont,
               "Apple SD Gothic Neo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
  word-break: keep-all;        /* 한국어는 낱말 단위로 줄을 바꾼다 */
}

h1, h2, h3 { margin: 0; letter-spacing: -0.3px; color: var(--ink); }

/* 묶음에는 기본 테두리가 붙는다 — 화면에는 드러나지 않게 */
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
p { margin: 0; }

a {
  color: var(--seal);
  text-decoration-color: rgba(139, 38, 53, 0.35);
  text-underline-offset: 2px;
}
a:hover { color: var(--seal-2); }

/* 글씨를 지우지 않으면서 소리 읽기 기기에만 남긴다 */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── 뼈대 ───────────────────────────────────────────────────────────── */
#page {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;   /* 머리말 · 본문 · 꼬리말 */
}

.wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;                     /* 좁은 화면에서도 가장자리 여백 */
}

.stack > * + * { margin-top: 16px; }

/* ── 머리말 · 꼬리말 ─────────────────────────────────────────────────── */
.site-head {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 52px;
}
.site-logo {
  font-size: 16px; font-weight: 800; color: var(--ink); text-decoration: none;
}
.site-logo:hover { color: var(--ink); text-decoration: none; }
.site-mark { font-size: 12px; color: var(--ink-3); }

.site-foot {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 22px 0 28px;
  font-size: var(--fs-small);
  color: var(--ink-3);
}
.site-foot a { color: var(--ink-2); }
.foot-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.foot-nav { display: flex; gap: 10px; margin-top: 10px; }
.foot-more {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line);
  line-height: 1.8;
}

/* ── 판 ─────────────────────────────────────────────────────────────── */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px;
}
.panel-title {
  font-size: var(--fs-title); font-weight: 700;
  margin-bottom: 12px;
}

/* ── 입력 ───────────────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field:last-of-type { margin-bottom: 0; }

.field-label {
  display: block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--ink-3);
  margin-bottom: 7px;
}

/* 고르는 가짓수가 적으면 눌러서 고르는 편이 빠르다.
   드롭다운은 열고·고르고·닫는 세 번이지만 이쪽은 한 번이고,
   무엇을 골랐는지 화면에 그대로 남는다. */
.picks { display: flex; gap: 7px; }
.pick { flex: 1; position: relative; display: block; margin: 0; cursor: pointer; }
.pick input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.pick span {
  display: block; width: 100%; text-align: center;
  padding: 11px 0;
  font-size: 15px; font-weight: 600; color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.pick input:checked + span {
  background: var(--seal); border-color: var(--seal); color: var(--card);
}
.pick input:focus-visible + span {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

select {
  width: 100%;
  min-height: 44px;                    /* 손가락으로 누를 수 있는 최소 크기 */
  padding: 0.6rem 0.85rem;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
}
select:focus { border-color: var(--gold); outline: none; }

/* 생년월일은 세 칸이 한 줄에 — 연도가 네 자리라 조금 넓게 */
.date-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 7px; }

.hint {
  font-size: var(--fs-small); line-height: var(--lh);
  color: var(--ink-3);
  margin: 10px 0 0;
}

.check-line {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px;
  font-size: var(--fs-small); color: var(--ink-3);
  cursor: pointer;
}
.check-line input { width: 16px; height: 16px; accent-color: var(--seal); }

.form-error {
  display: none;
  margin-top: 12px; padding: 10px 12px;
  background: rgba(139, 38, 53, 0.07);
  border: 1px solid rgba(139, 38, 53, 0.25);
  border-radius: var(--r-inner);
  color: var(--seal);
  font-size: 13px; font-weight: 600;
}
.form-error.show { display: block; }

/* ── 버튼 ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; width: auto;
  padding: 14px 20px;
  font-family: inherit; font-size: 16px; font-weight: 700;
  text-align: center; text-decoration: none;
  border: 1px solid transparent; border-radius: var(--r-inner);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, transform 0.14s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-block { display: block; width: 100%; }

.btn-main {
  background: var(--seal); border-color: var(--seal); color: var(--card);
}
.btn-main:hover { background: var(--seal-2); border-color: var(--seal-2); color: var(--card); }

.btn-line {
  background: transparent; border-color: var(--seal); color: var(--seal);
}
.btn-line:hover { background: var(--seal); color: var(--card); }

.btn-quiet {
  background: transparent; border-color: var(--line);
  color: var(--ink-2); font-weight: 600; font-size: 14px;
  padding: 10px 14px;
}
.btn-quiet:hover { background: var(--paper-2); color: var(--ink); }

/* ── 들어가는 길 ────────────────────────────────────────────────────── */
.go-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.go-card {
  display: block; text-align: left; text-decoration: none;
  padding: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.go-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.go-emoji { display: block; font-size: 22px; line-height: 1; margin-bottom: 7px; }
.go-title { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.go-desc  { display: block; font-size: var(--fs-small); color: var(--ink-3); margin-top: 2px; }

/* ── 타일 (꿈해몽 들어가기) ─────────────────────────────────────────── */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 13px 4px; text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.tile-emoji { font-size: 24px; line-height: 1; }
.tile-label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.tile-sub   { font-size: 10.5px; color: var(--ink-3); letter-spacing: -0.2px; }

/* 생일 → 내 별자리 */
.z-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 12px;
}
.z-pick select {
  min-height: 46px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  background: var(--card);
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
}
.z-pick .btn { grid-column: 1 / -1; }
.z-pick-hint {
  margin: -6px 0 12px;
  font-size: 12px;
  color: var(--ink-3);
}

/* 별자리는 열둘이라 한 줄에 셋씩 넣으면 네 줄이 된다. 넷씩 넣어 세 줄로. */
.tiles-zodiac { grid-template-columns: repeat(4, 1fr); }
.tiles-zodiac .tile { padding: 11px 2px; gap: 3px; }
.tiles-zodiac .tile-emoji { font-size: 20px; color: var(--seal); }
.tiles-zodiac .tile-label { font-size: 11.5px; }

/* ── 본문 글 ────────────────────────────────────────────────────────── */
.prose { font-size: var(--fs-body); line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 10px; }

.more-link { font-size: 13px; font-weight: 600; }

/* ── 넓은 화면 ──────────────────────────────────────────────────────── */
@media (min-width: 560px) {
  .tiles { grid-template-columns: repeat(6, 1fr); }
  .tiles-zodiac { grid-template-columns: repeat(6, 1fr); }
  .z-pick { grid-template-columns: 1fr 1fr auto; }
  .z-pick .btn { grid-column: auto; }
}


/* ──────────────────────────────────────────────────────────────
   여러 화면이 함께 쓰는 것 — 결과·꿈해몽 쪽에서 넘어왔다.
   이름은 그대로 둔다. 쓰는 곳이 많아 한꺼번에 바꾸면 놓치는 데가 생긴다.
   ────────────────────────────────────────────────────────────── */

.message-text.left::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -8px;
  border-width: 8px 8px 0 0;
  border-style: solid;
  border-color: #c3b99f transparent transparent transparent;
}
.hero-title {
  margin: 1.2rem 0 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  
   word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.35; /* 지금보다 살짝 여유 */
}
.btn-primary {
  background: var(--seal);
  color: #fffdf9;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(139, 38, 53, 0.18);
  border: none;
}
.btn-primary:hover {
  background: var(--seal-2);
  color: #fffdf9;
}
.inp_area h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
.text-muted {
  color: var(--ink-3) !important;
  font-weight: 400;
}
.inp_area h3 {
    font-size: 1.05rem;
  }
/* 글자 단계 */
.inp_area h2,
.inp_area h3{ font-size: var(--fs-title); letter-spacing: -.2px; }
.btn-primary:hover,
.btn-primary:focus{
  background: var(--seal-2);
  border-color: var(--seal-2);
  color: #fffdf9;
}


/* 쪼개 옮기는 과정에서 빠졌던 것 — 말풍선과 입력 판 */
.message-text.left::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -8px;
  border-width: 8px 8px 0 0;
  border-style: solid;
  border-color: #c3b99f transparent transparent transparent;
}
.message-text .emoji {
  white-space: nowrap;
}


/* 파일을 쪼개 옮기며 빠졌던 것 — 말풍선과 입력 판 */
.message-text {
  display: inline-block;
  position: relative;
  
  background: #e7e3d2;
  border: 1px solid #c3b99f;
  border-radius: 14px;
  
  line-height: 1.4;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  max-width: 260px;
  word-break: keep-all;      
  overflow-wrap: break-word;
  white-space: normal;    
}

.message-text.left::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -8px;
  border-width: 8px 8px 0 0;
  border-style: solid;
  border-color: #c3b99f transparent transparent transparent;
}

.message-text .emoji {
  white-space: nowrap;
}

.inp_area {
  background: #f5efe3 !important;
  border: 1px solid #e8ddcb;
  border-radius: 18px;
  
}

.inp_area{ border-radius: var(--r-card); }

.inp_area h2,
.inp_area h3{ font-size: var(--fs-title); letter-spacing: -.2px; }
