/* ==========================================================================
   결과 화면 전용

   종전 alljum.css(36,981자)에서 결과 화면이 실제로 쓰는 것만 남겼다.
   여러 화면이 함께 쓰는 값·기본 요소·버튼은 app.css 에 있다.
   오행 색(.elem-*·.text-금·.bg-금-subtle)과 태그(.pill)는 뜻이 있는 색이라
   한지 팔레트로 바꾸지 않고 그대로 둔다.
   ========================================================================== */

/* Pretendard 는 app.css 가 /assets/fonts 의 woff2 로 불러온다.
   여기 있던 jsdelivr woff 4벌은 같은 글꼴을 외부에서 또 받던 것이라 지웠다. */

html, body {
  height: 100%;
}
p, li { font-size: inherit; }

@media (min-width: 768px) {
  body { font-size: 17px; }
}
@media (max-width: 768px) {
  .hero-title {
    font-size: clamp(16px, 4.5vw, 24px);
  }
}
/* 넓은 화면에서는 h1 기본값(40px)이라 좁은 가운데 단에서 "~" 한 글자가
   다음 줄로 떨어졌다. 단 너비에 맞춰 줄인다. */
@media (min-width: 769px) {
  .hero-title {
    font-size: clamp(24px, 2.4vw, 32px);
  }
}
@media (max-width: 480px) {
  .fortune-card p,
  .fortune-card .content,
  .fortune-card .desc,
  .fortune-card .text {
    font-size: 17px;
    line-height: 1.85;
  }
}

.card.border-0.shadow-sm .fw-bold {
  color: var(--ink);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-weight: 850;
  font-size: 0.92rem;
  border: 1px solid #e8ddcb;
  background: #f5efe3;
  color: var(--ink);
}
.chip b {
  color: var(--gold-2);
}
.saju-box.is-active {
  border: none !important;
  outline: 2px solid rgba(212, 175, 55, 0.6);
  outline-offset: -2px;
  background: rgba(212, 175, 55, 0.06) !important;
}
.saju-cell {
  box-sizing: border-box;
}
.saju-cell.is-active {
  outline: 2px solid rgba(212, 175, 55, 0.55);
  outline-offset: -2px;
  background: rgba(212, 175, 55, 0.06) !important;
}
.saju-label {
  color: var(--ink);
  font-weight: 800;
}
.saju-hanja {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 900;
  line-height: 1 !important;
  height: 44px;
  margin-top: 18px;
}
.saju-badge {
  position: absolute;
  top: 12%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-2);
  opacity: 0.95;
  white-space: nowrap;
  display: flex;
  gap: 6px;
  align-items: center;
  line-height: 1;
}
.elem-fire { color: #ff4d4d; text-shadow: none; }
.elem-earth { color: #ffcc66; text-shadow: none; }
.elem-metal { color: #9ca3af; text-shadow: none; }
.elem-water { color: #4da3ff; text-shadow: none; }
.elem-ico.wood {
  --elem-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l4 6h-3v8h-2V8H8l4-6Z'/%3E%3Cpath fill='black' d='M6 20h12v2H6z'/%3E%3C/svg%3E");
}
.elem-ico.fire {
  --elem-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2s4 4 4 9a4 4 0 0 1-8 0c0-2 1-4 2-6-1 7 6 5 2-3Z'/%3E%3Cpath fill='black' d='M12 22a6 6 0 0 0 6-6c0-2-1-4-3-6 0 4-2 5-3 5s-3-1-3-5c-2 2-3 4-3 6a6 6 0 0 0 6 6Z'/%3E%3C/svg%3E");
}
.elem-ico.earth {
  --elem-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 10h16v10H4z'/%3E%3Cpath fill='black' d='M6 4h12v4H6z'/%3E%3C/svg%3E");
}
.elem-ico.metal {
  --elem-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2l7 5-7 15L5 7l7-5Z'/%3E%3C/svg%3E");
}
.elem-ico.water {
  --elem-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2C8 6 6 9 6 12a6 6 0 0 0 12 0c0-3-2-6-6-10Z'/%3E%3C/svg%3E");
}
.elem-ico {
  width: 14px;
  height: 14px;
  display: inline-block;
  border-radius: 4px;
  background: currentColor;
  -webkit-mask: var(--elem-svg) no-repeat center / contain;
  mask: var(--elem-svg) no-repeat center / contain;
}
.elem-ico.wood { color: rgb(46, 191, 121); }
.elem-ico.fire { color: rgb(230, 74, 74); }
.elem-ico.earth { color: rgb(210, 177, 95); }
.elem-ico.metal { color: rgb(156, 163, 175); }
.elem-ico.water { color: rgb(80, 160, 255); }
.elem-bubble-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.elem-bubble-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--gold-2);
}
.elem-bubble-sub {
  font-size: 12px;
  color: #7a6a55;
}
.elem-note {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  text-align: center;
  font-size: 13px;
  color: #7a6a55;
  padding: 10px 12px;
}
.elem-note .sep {
  opacity: 0.35;
  margin: 0 2px;
}
.elem-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.saju-explain-card {
  border: 1px solid #e8ddcb;
  background: #f5efe3;
  border-radius: 18px;
  padding: 14px 14px 16px;
}
.saju-explain-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e8ddcb;
}
.saju-explain-head .left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.saju-explain-head .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold-2);
  flex: 0 0 auto;
  margin-top: 3px;
}
.saju-explain-head .title {
  font-size: 13px;
  font-weight: 900;
  color: var(--gold-2);
}
.saju-explain-head .sub {
  font-size: 12px;
  color: #7a6a55;
}
.saju-explain-head .tag {
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--gold-2);
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(212, 175, 55, 0.08);
  white-space: nowrap;
}
.saju-explain-body {
  display: grid;
  gap: 6px;
  text-align: center;
  padding: 0px 6px 2px;
}
.saju-explain-body .big-hanja {
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
  letter-spacing: 1px;
}
.saju-explain-body .big-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--ink);
}
.saju-explain-body .big-desc {
  text-align: left;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: #5c4f3f;
}
.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  overflow: visible;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 14px;
  border: 1px solid #e8ddcb;
  background: #f5efe3;
  color: #5c4f3f;
}
.pill.core {
  color: var(--gold-2);
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.06);
}
.pill.sinsal {
  color: #9a7209;
  border-color: rgba(184, 134, 11, 0.38);
  background: rgba(184, 134, 11, 0.07);
}
.pill.unseong {
  color: #5c4f3f;
  border-color: rgba(60, 47, 32, 0.3);
  background: rgba(60, 47, 32, 0.05);
}
.fortune-message {
  
  font-size: 16px;
  line-height: 1.7;
  color: #5c4f3f;
  
  height: 100%;
}
.fortune-message-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin-bottom: 10px;
}
.fortune-message-desc {
  font-size: 16px;
}
.fortune-message-desc > div {
  white-space: pre-line;
}
.text-primary {
  color: var(--gold-2) !important;
}
.meta-divider {
  height: 1px;
  margin: 16px 0;
  background-color: #e8ddcb;
}
.pill-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
.pill {
    flex: 0 0 auto;
  }
.saju-hanja,
  .branch-cell .saju-hanja {
    font-size: 28px;
  }
.saju-label, .saju-box {
    padding: 12px 0;
  }
.character-name {
 
  font-size: 0.85rem;
  font-weight: 600;
  color: #8b2635;
  background: #f7ecea;
  border-radius: 12px;
  display: inline-block;
}
.text {
  word-break: keep-all;
  overflow-wrap: break-word;
  white-space: normal;
}
.text-wood {
  color: #198754 !important;
}
.bg-fire-subtle {
  background-color: #fdecea !important;
}
.text-fire {
  color: #dc3545 !important;
}
.bg-earth-subtle {
  background-color: #f1e6d3 !important;
}
.text-earth {
  color: #c19a6b !important;
}
.bg-metal-subtle {
  background-color: #eef0f2 !important;
}
.text-metal {
  color: #6c757d !important;
}
.bg-water-subtle {
  background-color: #e7f1ff !important;
}
.text-water {
  color: #0d6efd !important;
}
.empty-hint__title {
  font-size: 24px;
  font-weight: 700;
  color: #5c4f3f;
  letter-spacing: -0.2px;
  line-height: 1.4;
}
.empty-hint__sub {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #868e96;
  letter-spacing: -0.1px;
}
.fortune-message-desc > div[data-bind$=".타이틀"] {
  font-size: 17px;
  font-weight: 900;
}
.fortune-message-desc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
/* 요약 / 행동강령 (문단) */
.fortune-message-desc > div[data-bind$=".요약"],
.fortune-message-desc > div[data-bind$=".행동강령"] {
  background: #f7f1e6;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #5c4f3f;
}
.fortune-message-desc > div[data-bind$=".요약"] {
  background: #f7f1e6;
  max-width: 320px;
}
.fortune-message-desc > div[data-bind$=".행동강령"] {
  background: #eaf2ff;
  border: 1px solid #d6e4ff;
  max-width: 320px;
  
}
.fortune-message-desc > div[data-bind$=".행동강령"]::before {
  content: "👉 ";
}
.fortune-message-desc > div[data-bind$=".해시태그"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  white-space: normal;
}
.fortune-message-desc > div[data-bind$=".해시태그"] span {
  font-size: 12px;
  font-weight: 600;
  background: #f0e9dc;
  color: #5c4f3f;
  padding: 5px 10px;
  border-radius: 999px;
}
.btn-review:hover {
  border-color: #8b2635;
  background: #f8f9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}
.btn-review:active {
  transform: translateY(0);
}


/* 파일을 쪼개 옮기며 빠졌던 것 — 결과 화면 조각 */
.character-text-box{
    
    border-radius: 14px;
    line-height: 1.4;
    
    
    word-break: keep-all;
    
    white-space: normal;
    transform: translateY(2px);
    background: #fffffff2;
}

.bg-wood-subtle {
  background-color: #e6f4ea !important;
}

.insight-badge {
  display: inline-block;
  padding: 4px 10px;
  font-weight: 600;
  color: #8b6a3e;
  background-color: #f3eadb;
  border-radius: 999px;
  margin-bottom: 10px;
}

.insight-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.3px;
  margin: 0 0 6px 0;
  color: #212529;
}

.insight-reason {
  font-size: 13px;
  line-height: 1.6;
  color: #868e96;
  margin-bottom: 14px;
}

.insight-divider {
  height: 1px;
  background-color: #f0e9dc;
  margin: 16px 0;
}

.insight-mz {
  line-height: 1.65;
  color: #343a40;
  margin: 16px 0 18px;
  letter-spacing: -0.1px;
  white-space: pre-line;
}

.insight-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; 
  gap: 6px;
}

.empty-hint {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 22px 16px;
  border-radius: 14px;
}

/* 결과 화면 오른쪽 아래 "처음으로" 단추.
   글자를 담은 알약이라 폭이 100px 가까이 됐고, 본문이 가운데 단으로 좁은
   휴대폰에서는 그 위에 얹혀 글자를 가렸다. 뜻은 집 그림 하나로 충분하다. */
.to-home {
  position: fixed;
  right: 12px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 9999;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--seal);
  color: #fffdf9;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(80, 60, 35, 0.28);
}
.to-home:hover,
.to-home:focus-visible {
  background: var(--seal-2);
  color: #fffdf9;
}

/* ── 점수 ──────────────────────────────────────────────────────────────
   엔진이 카테고리마다 0~100 을 내는데 화면에서는 쓰지 않고 있었다.
   같은 "좋음"이라도 52점과 88점은 다른 이야기라 숫자와 막대를 함께 보인다. */
.score {
  margin-left: 7px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
  vertical-align: 1px;
}
.score[data-level="high"] { color: var(--seal); }
.score[data-level="mid"]  { color: var(--gold-2); }
.score[data-level="low"]  { color: var(--ink-3); }

.score-bar {
  width: 100%;
  height: 5px;
  margin: 0 0 4px;
  background: var(--line);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.score-bar i {
  display: block;
  width: 0;                       /* 그려진 뒤 늘어난다 */
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--seal);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.score-bar i[data-level="mid"] { background: var(--gold); }
.score-bar i[data-level="low"] { background: #c3b99f; }

@media (prefers-reduced-motion: reduce) {
  .score-bar i { transition: none; }
}
