/* V29 — 기존 V25/V28 시각 언어를 보존한 가독성·반응형·해독 대기 연출 보정. */
:root{
  --v29-obsidian:#050706;
  --v29-night:#0b0e0c;
  --v29-old-gold:#d7b966;
  --v29-cinnabar:#8f2b24;
  --v29-violet:#71539c;
  --v29-hanji:#f4eddf;
}

/* 천기해독은 계산 요청과 동시에 시작하되, 네 단계를 모두 보여준 뒤 결과로 이동한다. */
.saju-reading-overlay{
  position:fixed;z-index:240;inset:0;display:grid;place-items:center;padding:24px;
  background:
    radial-gradient(circle at 50% 34%,rgba(113,83,156,.2),transparent 34%),
    radial-gradient(circle at 50% 72%,rgba(143,43,36,.12),transparent 31%),
    rgba(3,5,4,.985);
}
.saju-reading-overlay[hidden]{display:none!important}
body.is-reading-saju{overflow:hidden}
.saju-reading-ritual{width:min(430px,100%);text-align:center;color:#eae1d0}
.saju-reading-kicker{margin:0 0 22px;color:#bba36e;font:700 11px/1.4 "Noto Sans KR",sans-serif;letter-spacing:.2em}
.saju-reading-seals{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:0 auto 24px}
.saju-reading-seals span{
  display:grid;place-items:center;aspect-ratio:1;border:1px solid rgba(215,185,102,.2);color:#615b50;
  background:rgba(255,255,255,.018);font:400 clamp(25px,8vw,36px)/1 "Song Myung",serif;
  transition:border-color .45s ease,color .45s ease,background-color .45s ease,box-shadow .45s ease;
}
.saju-reading-overlay[data-stage="1"] .saju-reading-seals span:nth-child(-n+1),
.saju-reading-overlay[data-stage="2"] .saju-reading-seals span:nth-child(-n+2),
.saju-reading-overlay[data-stage="3"] .saju-reading-seals span:nth-child(-n+3),
.saju-reading-overlay[data-stage="4"] .saju-reading-seals span:nth-child(-n+4){
  border-color:rgba(215,185,102,.72);color:#f3d98e;background:rgba(143,43,36,.13);
  box-shadow:inset 0 0 22px rgba(215,185,102,.08),0 0 24px rgba(113,83,156,.13);
}
.saju-reading-ritual h2{margin:0;color:#f5ead3;font:400 clamp(24px,7vw,34px)/1.38 "Song Myung",serif;text-wrap:balance;word-break:keep-all}
.saju-reading-ritual>p:not(.saju-reading-kicker){max-width:330px;margin:10px auto 0;color:#aaa397;font-size:13px;line-height:1.75;word-break:keep-all}
.saju-reading-line{height:2px;margin:24px 0 11px;overflow:hidden;background:rgba(255,255,255,.08)}
.saju-reading-line i{display:block;width:var(--reading-progress,8%);height:100%;background:linear-gradient(90deg,#8f2b24,#d7b966,#9c82bd);transition:width .8s ease}
.saju-reading-status{display:block;color:#8e887d;font-size:11px;line-height:1.55}

/* 입력 하단 고정 바: 동의 문장이 잘리지 않게 두 줄을 허용한다. */
.manse-submit-dock .baegun-consent-check{display:grid!important;grid-template-columns:20px minmax(0,1fr);align-items:start;gap:7px}
.manse-submit-dock .baegun-consent-check input{width:18px!important;height:18px!important;margin:1px 0 0!important}
.manse-submit-dock .baegun-consent-check label{display:block!important;min-width:0;line-height:1.5!important;word-break:keep-all}
.manse-submit-dock .baegun-consent-check a{white-space:nowrap}

/* 결과 상단의 붉은 말풍선 충돌 제거 — 같은 문구를 조용한 금박 인용문으로 보인다. */
body.page-result-v27 header .bub{
  display:block!important;width:max-content!important;max-width:100%!important;margin:0 0 20px!important;padding:0 0 0 13px!important;
  border:0!important;border-left:2px solid var(--v29-old-gold)!important;border-radius:0!important;
  background:transparent!important;color:#d9c89e!important;box-shadow:none!important;
  font:400 clamp(15px,3.2vw,18px)/1.55 "Gowun Batang",serif!important;letter-spacing:.01em!important;text-align:left!important;
}
body.page-result-v27 header h1{font-size:clamp(27px,5vw,38px)!important;line-height:1.25!important;text-wrap:balance;word-break:keep-all}
body.page-result-v27 header p{max-width:590px;font-size:clamp(13px,2vw,15px)!important;line-height:1.8!important;word-break:keep-all}
body.page-result-v27 .wrap{padding-bottom:132px!important}

/* 유형 카드의 어두운 본문과 수치를 밝히되 기존 이미지·오행 구조는 유지한다. */
body.page-result-v27 .cheon-gi-share__copy h2{color:#f3ead8!important;font-size:clamp(23px,4vw,34px)!important;line-height:1.35!important;text-wrap:balance;word-break:keep-all}
body.page-result-v27 .cheon-gi-share__copy>p:last-child{color:#c5beb0!important;font-size:14px!important;line-height:1.8!important;word-break:keep-all}
body.page-result-v27 .cheon-gi-share__element{color:#d8cfbd!important}
body.page-result-v27 .cheon-gi-share__privacy{color:#8f8a80!important;line-height:1.6!important}
body.page-result-v27 #cheonGiVisual[hidden]{display:none!important}

/* 다섯 장 메뉴: 제목을 말줄임으로 숨기지 않고 가로로 넘겨 읽는다. */
.v27-card-nav button span{white-space:normal!important;text-overflow:clip!important;word-break:keep-all!important}
.v27-card-panel h3{font-size:clamp(21px,4.2vw,28px)!important;line-height:1.42!important;text-wrap:balance;word-break:keep-all}
.v27-card-panel .sec-headline{font-size:clamp(19px,3.8vw,25px)!important;line-height:1.48!important;text-wrap:balance;word-break:keep-all}
.v27-card-panel .sec-easy,.v27-card-panel .sec-action,.v27-card-panel .sec-points p{font-size:15px!important;line-height:1.85!important;word-break:keep-all}
.v27-card-panel .sec-easy b,.v27-card-panel .sec-action b,.v27-card-panel .sec-points b{display:block!important;margin:0 0 5px!important;font-size:12px!important}
.v27-card-panel .interpret-visual figcaption{gap:12px!important}
.v27-card-panel .interpret-visual figcaption small{max-width:62%;font-size:clamp(11px,2.4vw,14px)!important;line-height:1.5!important;text-wrap:balance;word-break:keep-all}

/* 리포트 도구와 카드: 모바일 겹침·외톨이 한 글자·이미지 위 제목 충돌을 보정한다. */
body.page-report .toolbar{align-items:stretch!important}
body.page-report .toolbar button{min-height:40px!important;line-height:1.35!important;white-space:nowrap}
body.page-report .page{overflow:clip!important}
body.page-report .page h3{font-size:clamp(20px,4vw,25px)!important;line-height:1.45!important;text-wrap:balance;word-break:keep-all;overflow-wrap:normal}
body.page-report .report-visual{aspect-ratio:2/1!important}
body.page-report .report-visual::after{background:linear-gradient(180deg,rgba(2,1,4,.05) 24%,rgba(2,1,4,.92) 100%)!important}
body.page-report .report-visual figcaption{inset:auto 16px 14px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:end!important}
body.page-report .report-visual figcaption span:last-child{min-width:0;text-align:right!important}
body.page-report .report-visual small{font-size:10px!important;line-height:1.45!important;letter-spacing:.04em!important}
body.page-report .report-visual b{max-width:none!important;font-size:clamp(13px,2.6vw,16px)!important;line-height:1.42!important;text-wrap:balance;word-break:keep-all}
body.page-report .report-summary,body.page-report .advice,body.page-report .caution,body.page-report .personal-lens{padding:15px 16px!important;font-size:15px!important;line-height:1.82!important;word-break:keep-all}
body.page-report .report-summary b,body.page-report .advice b,body.page-report .caution b,body.page-report .personal-lens b{display:block!important;margin:0 0 6px!important;font-size:12px!important;line-height:1.4!important}
body.page-report .report-summary p,body.page-report .advice p,body.page-report .caution p,body.page-report .personal-lens p{margin:0!important;color:inherit!important;font:inherit!important}
body.page-report .report-summary p br,body.page-report .advice p br,body.page-report .caution p br,body.page-report .personal-lens p br{content:"";display:block;margin-top:5px}
body.page-report .report-deep summary{min-height:42px;padding:12px 0!important;font-size:12px!important}
body.page-report .report-deep p{font-size:13px!important;line-height:1.82!important;word-break:keep-all}
body.page-report .locked-title{font-size:12px!important;line-height:1.6!important;word-break:keep-all}

/* 리포트 자체 로더도 같은 네 인장 문법을 사용한다. */
body.page-report .report-reading-loader{padding:72px 18px!important}
.report-reading-seals{display:grid;grid-template-columns:repeat(4,48px);justify-content:center;gap:8px;margin:22px auto 18px}
.report-reading-seals span{display:grid;place-items:center;aspect-ratio:1;border:1px solid rgba(215,185,102,.22);color:#6e685d;background:#090b0a;font:400 24px/1 "Song Myung",serif}
.report-reading-loader[data-stage="1"] .report-reading-seals span:nth-child(-n+1),
.report-reading-loader[data-stage="2"] .report-reading-seals span:nth-child(-n+2),
.report-reading-loader[data-stage="3"] .report-reading-seals span:nth-child(-n+3),
.report-reading-loader[data-stage="4"] .report-reading-seals span:nth-child(-n+4){border-color:#b89a55;color:#ebd28f;background:rgba(113,83,156,.09)}
.report-reading-loader .brushload{font-size:clamp(25px,6vw,34px)!important;line-height:1.45!important;text-wrap:balance;word-break:keep-all}
.report-reading-loader p{margin:9px 0 0;color:#8f8a81;font-size:12px;line-height:1.7}

@media(max-width:640px){
  .saju-reading-overlay{padding:18px}
  .v27-card-nav{display:flex!important;gap:7px!important;margin-inline:-14px!important;padding:0 14px 8px!important;overflow-x:auto!important;scroll-snap-type:x proximity;scrollbar-width:none}
  .v27-card-nav::-webkit-scrollbar{display:none}
  .v27-card-nav button{flex:0 0 126px;min-height:64px!important;padding:9px 8px!important;scroll-snap-align:start}
  .v27-card-nav button span{font-size:10px!important;line-height:1.35!important}
  .v27-card-panel .interpret-visual{aspect-ratio:1.78/1!important}
  .v27-card-panel .interpret-visual figcaption span:first-child{font-size:40px!important}
  body.page-report .toolbar{position:relative!important;top:auto!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px!important;padding:10px!important}
  body.page-report .toolbar button{width:100%;padding:8px 5px!important;font-size:11px!important}
  body.page-report .toolbar .prog{grid-column:1/-1;width:100%!important;margin:2px 0 0!important;text-align:center!important;line-height:1.5}
  body.page-report .report-visual{aspect-ratio:1.72/1!important}
  body.page-report .report-visual .image-hanja{font-size:42px!important}
  body.page-report .page> :not(.report-visual){margin-left:15px!important;margin-right:15px!important}
}

@media(max-width:390px){
  body.page-result-v27 header{min-height:245px!important;padding:26px 20px!important}
  body.page-result-v27 .sitebar .brand-name{font-size:14px!important}
  .manse-submit-dock{padding-top:9px!important}
  .manse-submit-dock .go{min-height:56px!important}
  .manse-submit-dock .go span{font-size:18px!important}
  body.page-report .report-visual figcaption{inset:auto 12px 11px!important;gap:9px!important}
  body.page-report .report-visual small{font-size:9px!important}
  body.page-report .report-visual b{font-size:12.5px!important;line-height:1.38!important}
}

@media(prefers-reduced-motion:reduce){
  .saju-reading-seals span,.saju-reading-line i{transition:none!important}
}

@media print{
  .saju-reading-overlay{display:none!important}
  body.page-report .toolbar{display:none!important}
}
