/* ===== v3: 캐릭터 카탈로그 (포스터·넷플릭스형 줄·상품 화면·대화형 풀이) ===== */
:root { --brush: 'Nanum Brush Script', 'Gowun Batang', cursive; --night: #0F0E13; }
.brush { font-family: var(--brush); font-weight: 400; letter-spacing: 0; line-height: .9; word-break: keep-all; }

/* 포스터 카드 */
.poster { position: relative; display: block; aspect-ratio: 2/3; border-radius: 16px; overflow: hidden; background: var(--night); color: #fff; text-decoration: none; box-shadow: 0 18px 40px -22px rgba(0,0,0,.6); transition: transform .25s; isolation: isolate; }
.poster:hover { transform: translateY(-4px); }
.poster > img, .poster > svg, .poster > .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.poster::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 42%, rgba(10,9,14,.55) 66%, rgba(10,9,14,.94) 100%); }
.poster .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 14px 16px; }
.poster .kot { display: block; font-family: var(--brush); font-size: clamp(36px, 3.4vw, 48px); line-height: 1.05; padding-bottom: 2px; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.poster .en { display: block; font: 400 19px/1.15 var(--serif); margin-top: 8px; }
.poster .host { display: block; font: 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; opacity: .75; margin-top: 6px; }
.poster .badge { position: absolute; top: 12px; left: 12px; font: 700 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 99px; background: rgba(255,255,255,.92); color: var(--ink); }
.poster .badge.free { background: var(--earth); }
.poster .rank { position: absolute; top: 8px; right: 12px; font: 400 46px/1 var(--serif); color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5); }

/* 가로 줄 */
.row { margin: 46px 0 0; }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.row-head h3 { font-size: 30px; margin: 0; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 230px); gap: 14px; overflow-x: auto; padding: 4px 4px 16px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
@media (max-width: 600px) { .rail { grid-auto-columns: 60%; } }

/* 출연진 */
.cast { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.cast a { position: relative; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; background: var(--night); display: block; }
.cast a img, .cast a svg, .cast a .ph { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 이름표: 바깥 span 하나만 아래에 붙이고, 안쪽 한글 이름은 그 아래 줄로 (겹침 방지) */
.cast a > span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 7px 7px; font: 600 11px/1.25 var(--sans); color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.82)); word-break: keep-all; }
.cast a > span .ko { display: block; margin-top: 2px; font: 700 13px/1.2 var(--hangul); color: #FFE3DA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .cast { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cast { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .cast a > span { padding: 18px 5px 5px; font-size: 10px; } .cast a > span .ko { font-size: 12px; } }

/* 첫 화면 결과의 포스터 */
.who.poster-who { grid-template-columns: 200px minmax(0, 1fr); }
@media (max-width: 900px) { .who.poster-who { grid-template-columns: 140px minmax(0, 1fr); } }

/* 패스 띠 */
.passband { background: var(--night); color: #F6F1E7; border-radius: 22px; padding: 30px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.passband .mono { color: #B3AA9B; }
.passband h3 { color: #fff; }
@media (max-width: 760px) { .passband { grid-template-columns: 1fr; } }

/* 하단 탭 (모바일) */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 46; background: rgba(246,241,231,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { text-align: center; text-decoration: none; color: var(--ink-2); font: 600 11px var(--sans); display: grid; gap: 2px; }
  .tabbar a b { font-size: 18px; font-weight: 400; }
  .tabbar a.on { color: var(--fire); }
  body.has-tabbar footer { padding-bottom: 120px; }
  body.has-tabbar .stickybar { bottom: 58px; }
}

/* 상품 화면 */
.prod-hero { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 48px; align-items: center; padding: 30px 0 40px; }
.prod-hero .poster .meta { display: none; }
.prod-title .kot { font-family: var(--brush); font-size: clamp(66px, 8vw, 112px); line-height: .9; color: var(--ink); display: block; }
.prod-title h1 { font-size: clamp(36px, 4.4vw, 58px); margin: 6px 0 10px; }
.prod-title .quote { font: italic 400 24px/1.3 var(--serif); color: var(--ink-2); margin: 0 0 16px; }
.prod-title ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.prod-title li::before { content: '✦'; color: var(--fire); margin-right: 10px; }
.hostline { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; }
.prod-hero .poster .ov { display: none; }
@media (max-width: 860px) {
  .prod-hero { grid-template-columns: 1fr; gap: 0; padding-top: 0; }
  .prod-hero .poster { border-radius: 0 0 22px 22px; margin: 0 -20px; aspect-ratio: 3/4; }
  .prod-hero .poster > img { object-position: center 15%; }
  .prod-hero .poster .ov { display: block; position: absolute; left: 0; right: 0; bottom: 0; padding: 0 22px 22px; color: #fff; }
  .prod-hero .poster .ov .kot { display: block; font-family: var(--brush); font-size: 72px; line-height: 1; padding-bottom: 4px; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
  .prod-hero .poster .ov .t { display: block; font: 400 34px/1.05 var(--serif); margin-top: 4px; }
  .prod-hero .poster .ov .q { display: block; font: italic 400 18px/1.3 var(--serif); color: #EFE6D6; margin-top: 8px; }
  .prod-title .t-desk { display: none; }
  .prod-title { padding-top: 20px; }
}

/* 대화형 풀이 */
.chat { max-width: 720px; margin: 0 auto; padding-bottom: 40px; }
.chat-head { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; position: sticky; top: 66px; background: rgba(246,241,231,.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); z-index: 5; }
.ava { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: none; background: var(--night); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--line); position: relative; }
.ava img, .ava svg, .ava .ph { width: 100%; height: 100%; object-fit: cover; object-position: center 10%; display: block; }
.ava.sm { width: 36px; height: 36px; }
.msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; margin: 0 0 12px; align-items: end; animation: rise .45s ease both; }
.bubble { background: var(--card); border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 14px 16px; font-size: 16px; line-height: 1.55; }
.bubble .han { color: var(--fire); font-weight: 700; }
.msg.me { grid-template-columns: minmax(0, 1fr); justify-items: end; }
.msg.me .bubble { background: var(--ink); color: var(--paper); border-color: var(--ink); border-radius: 18px 18px 6px 18px; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.lockcard { background: var(--card); border: 1px dashed var(--line); border-radius: 16px; padding: 16px 18px; margin: 0 0 10px 46px; }
.lockcard h4 { margin: 0 0 6px; font: 600 16px var(--sans); }
.lockcard p { margin: 0; color: var(--ink-2); font-size: 15px; -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent); mask-image: linear-gradient(90deg, #000 55%, transparent); }
.lockcard .skel2 { height: 9px; border-radius: 99px; background: var(--paper-2); margin-top: 8px; width: 80%; }
.chapter-open { margin: 6px 0 18px 46px; }
.chapter-open h4 { font: 400 28px var(--serif); margin: 10px 0 6px; }
.chapter-open p { font-size: 16px; color: #2B2830; }
.offer { background: var(--night); color: #F6F1E7; border-radius: 20px; padding: 22px; margin: 16px 0 0 46px; }
.offer .mono { color: #B3AA9B; }
.offer .btn.ghost { color: #F6F1E7; box-shadow: inset 0 0 0 1.5px #F6F1E7; }
@media (max-width: 600px) { .lockcard, .chapter-open, .offer { margin-left: 0; } }

/* 첫 화면 떠다니는 불티·꽃잎 */
.sparks { position: absolute; inset: -30px 0 0; overflow: hidden; pointer-events: none; z-index: -1; }
.sparks i { position: absolute; display: block; left: var(--x); opacity: 0; will-change: transform, opacity; }
.sparks .spark { bottom: -12px; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); box-shadow: 0 0 10px 3px color-mix(in srgb, var(--c) 55%, transparent); animation: spk-up var(--d) linear var(--dl) infinite; }
.sparks .petal { top: -24px; width: var(--s); height: calc(var(--s) * .72); border-radius: 100% 0 100% 0; background: var(--c); box-shadow: 0 1px 2px rgba(0,0,0,.08); animation: spk-fall var(--d) linear var(--dl) infinite; }
@keyframes spk-up { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: .85; } 70% { opacity: .55; } 100% { transform: translate(var(--dx), -900px); opacity: 0; } }
@keyframes spk-fall { 0% { transform: translate(0, 0) rotate(0deg); opacity: 0; } 10% { opacity: .8; } 85% { opacity: .6; } 100% { transform: translate(var(--dx), 950px) rotate(600deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sparks { display: none; } }

/* 질문 하나: 분야 고르기 */
.askbox { margin: 8px 0 12px 46px; max-width: 560px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.askbox .tchips { display: flex; flex-wrap: wrap; gap: 8px; }
.askbox .tchips button { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 99px; padding: 7px 12px; font: 600 13px var(--sans); cursor: pointer; }
.askbox .tchips button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.askbox textarea { width: 100%; box-sizing: border-box; margin-top: 10px; min-height: 64px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: 400 15px/1.5 var(--sans); resize: vertical; background: #fff; }
.askbox .askfoot { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 10px; }
@media (max-width: 600px) { .askbox { margin-left: 0; } .askbox .askfoot { flex-direction: column; align-items: stretch; } }

/* 나의 궁 지도 */
.court-top { padding-top: 34px; }
.courtmap { position: relative; width: min(560px, 100%); aspect-ratio: 1; margin: 18px auto 10px; }
.courtmap::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; border: 1px dashed var(--line); }
.courtmap svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.courtmap .face, .seatcard .face, .seatreveal .face { display: block; border-radius: 50%; overflow: hidden; border: 3px solid var(--c, var(--ink)); background: #fff; box-shadow: 0 6px 16px rgba(24, 22, 26, .14); }
.face img, .face svg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; display: block; }
.face .ph { width: 100%; height: 100%; }
.courtmap .me { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 27%; text-align: center; }
.courtmap .me .face { width: 100%; aspect-ratio: 1; border-width: 4px; }
.courtmap .mename { font: 700 14px var(--sans); margin-top: 6px; }
.courtmap .seat { position: absolute; transform: translate(-50%, -50%); width: 30%; text-align: center; }
.courtmap .role { display: inline-flex; gap: 5px; align-items: center; font: 700 12px var(--sans); background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 4px 9px; white-space: nowrap; }
.courtmap .role i, .rolepill i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; }
.courtmap .faces { display: flex; justify-content: center; align-items: center; margin-top: 6px; }
.courtmap .faces .face { width: 54px; height: 54px; margin-left: -12px; }
.courtmap .faces .face:first-child { margin-left: 0; }
.courtmap .more { font: 700 12px var(--sans); margin-left: 4px; color: var(--gray); }
.courtmap .names { font: 500 12px var(--sans); color: var(--gray); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.courtmap .emptyseat { width: 50px; height: 50px; border-radius: 50%; border: 2px dashed var(--c); color: var(--c); background: transparent; font: 400 24px var(--sans); cursor: pointer; margin-top: 6px; }
.toast { background: var(--ink); color: var(--paper); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; font: 500 15px var(--sans); animation: rise .5s ease both; }
.courtlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 18px; }
.seatcard { border-top: 4px solid var(--c); }
.seatcard .sc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.seatcard .face { width: 64px; height: 64px; flex: none; }
.rolepill { display: inline-flex; gap: 5px; align-items: center; font: 700 12px var(--sans); margin-top: 4px; }
.rolegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 14px; margin-top: 16px; }
.seatreveal { padding: 24px; border-top: 5px solid var(--c); }
.seatreveal .pair { display: flex; justify-content: center; align-items: center; gap: 10px; }
.seatreveal .pair .face { width: 104px; height: 104px; }
.seatreveal .amp { font: 400 28px var(--serif); color: var(--gray); }
@media (max-width: 600px) {
  .courtmap .faces .face { width: 40px; height: 40px; margin-left: -10px; }
  .courtmap .role { font-size: 10.5px; padding: 3px 7px; }
  .courtmap .role .ko { display: none; }
  .courtmap .emptyseat { width: 40px; height: 40px; }
  .courtmap .mename { font-size: 12px; }
}

/* 입력 단계의 캐릭터 말풍선 */
.qhost { display: flex; gap: 12px; align-items: flex-end; margin: 0 0 14px; }
.qhost .face { width: 58px; height: 58px; flex: none; border-radius: 50%; overflow: hidden; border: 3px solid var(--ink); background: #fff; }
.qhost .qname { font: 700 12px var(--sans); color: var(--gray); margin: 0 0 4px 4px; }
.qhost .bubble { background: #fff; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 10px 14px; font: 500 15px/1.45 var(--sans); }
.field textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: 400 16px/1.5 var(--sans); background: #fff; resize: vertical; }
.asked { border-top: 4px solid var(--fire); }
.asked .q { font: italic 400 26px/1.3 var(--serif); margin: 10px 0; }

/* AI 작가가 쓰는 중 */
.chapter-open .writing { display: flex; align-items: center; gap: 10px; color: var(--gray); font: 500 14px var(--sans); margin: 6px 0 12px; }
.chapter-open .writing .dots { display: inline-flex; gap: 4px; }
.chapter-open .writing .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--gray); animation: wblink 1.2s infinite both; }
.chapter-open .writing .dots i:nth-child(2) { animation-delay: .2s; }
.chapter-open .writing .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes wblink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* 한 줄 결론(쉬운 문체) + 검토용 원문 접기 */
.chapter-open .sum { background: var(--ink); color: var(--paper); border-radius: 12px; padding: 10px 14px; font: 600 15.5px/1.5 var(--sans); }
.chapter-open details.en { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; }
.chapter-open details.en summary { cursor: pointer; color: var(--gray); font: 600 13px var(--sans); }

/* 사장님 시험 모드: 한국어 검토 버튼 */
.kobtn { display: block; margin: 6px 0 14px 46px; background: #2E8B6E; color: #fff; font-size: 15px; }
.kobtn:disabled { background: #DDE9E3; color: #2E5F4C; opacity: 1; cursor: default; }
@media (max-width: 600px) { .kobtn { margin-left: 0; width: 100%; } }

/* 나의 궁 카드: 친구 4명 모음 */
.poster > .collage { position: absolute; inset: 0; z-index: -1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.poster > .collage img, .poster > .collage svg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }

/* 업그레이드: 계산 상자 · 미리보기 · 실천 카드 · 다음 풀이 */
.howcalc { margin: 4px 0 12px 46px; max-width: 620px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.howcalc summary { cursor: pointer; font: 600 14px var(--sans); color: var(--gray); }
.howcalc > div { margin-top: 10px; font-size: 14px; }
.lockcard.peek { border-style: solid; }
.wcd { margin: 18px 0 0 46px; max-width: 620px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--water); border-radius: 14px; padding: 14px 16px; }
.wcd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0; font: 400 14.5px/1.5 var(--sans); }
.wcd-grid b { display: block; font: 700 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--water); margin-bottom: 4px; }
.nextup { margin: 18px 0 0 46px; }
@media (max-width: 600px) { .howcalc, .wcd, .nextup { margin-left: 0; } .wcd-grid { grid-template-columns: 1fr; } }

/* 배우기(검색 유입) 페이지 */
.learn { padding: 26px 0 60px; max-width: 900px; }
.learn .crumbs { margin-bottom: 14px; }
.learn .crumbs a { color: inherit; }
.learn h1 { font-size: clamp(34px, 5vw, 58px); line-height: 1.05; margin: 6px 0 12px; }
.learn-top { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 26px; align-items: center; }
.learn-chars { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.learn-chars img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 14px; box-shadow: 0 14px 30px -18px rgba(0,0,0,.5); }
.learn .facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.learn-sec { margin-top: 34px; }
.learn-sec h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 10px; }
.learn-sec p { font-size: 17.5px; line-height: 1.75; max-width: 70ch; }
.learn-cta { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 30px 0; padding: 20px 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--fire); }
.learn-cta h3 { margin: 4px 0; }
.learn .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.learn .chips .chip { text-decoration: none; color: var(--ink); }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.learn-card { display: grid; gap: 4px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 12px; }
.learn-card img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 12%; border-radius: 10px; }
.learn-card span { font: 500 12.5px var(--sans); color: var(--gray); }
.faq { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 8px 0; }
.faq summary { cursor: pointer; font: 600 16px var(--sans); }
@media (max-width: 700px) { .learn-top { grid-template-columns: 1fr; } .learn-chars { max-width: 260px; } }

/* 접는 용어 사전 */
.term { border: 0; background: none; padding: 0; font: inherit; color: inherit; border-bottom: 1.5px dotted var(--water); cursor: help; }
.term[aria-expanded="true"] { color: var(--water); }
.term-def { display: block; margin: 6px 0 8px; background: #EEF2FA; border-radius: 10px; padding: 8px 12px; font: 400 14.5px/1.5 var(--sans); color: var(--ink); }

.prodfaq { margin: 40px 0 20px; max-width: 760px; }
.prodfaq h3 { margin: 4px 0 10px; }

/* 한 줄 공유 카드 */
.quotebtn { margin-top: 10px; font-size: 14px; }
.quotefig { margin: 0 auto 12px; max-width: 260px; }
.quotefig img { width: 100%; border-radius: 14px; box-shadow: 0 14px 30px -16px rgba(0,0,0,.5); }

/* 한 번 결제 약속 · 궁합 관계 이름 · 이메일 빈도 */
.onetime { text-align: center; font: 600 14px var(--sans); color: var(--wood); margin: 0 0 12px; }
.relname { margin: 8px auto 12px; max-width: 280px; font: 400 15px/1.5 var(--sans); }
.freq { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 0; }
.freq button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 11px; font: 600 12.5px var(--sans); cursor: pointer; }
.freq button.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* 궁 맛보기 · 캘린더 · 오늘 한 줄 */
.twenty { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 120px), 1fr)); gap: 12px; }
.twenty .tw { display: grid; justify-items: center; gap: 4px; text-align: center; font: 500 13px var(--sans); }
.twenty .tw .face { width: 74px; height: 74px; border-radius: 50%; overflow: hidden; border: 3px solid var(--c); display: block; }
.calbtn { margin: 16px 0 0 46px; }
.todayline { margin: 14px 0; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--earth); border-radius: 12px; }
.todayline:empty { display: none; }
.todayline p { margin: 6px 0; font-size: 15.5px; }
@media (max-width: 600px) { .calbtn { margin-left: 0; } }

/* 약관 페이지 */
.legal { max-width: 760px; padding-bottom: 60px; }
.legal h2 { font-size: 38px; margin: 18px 0 6px; }
.legal h3 { font-size: 22px; margin: 26px 0 6px; }
.legal p, .legal li { font-size: 16px; line-height: 1.7; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.legal td { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.legal mark { background: #FFF1B8; padding: 0 3px; border-radius: 4px; }

/* 무료 도구 결과 */
.calc-res { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.calc-res .learn-chars .charimg, .calc-res .learn-chars img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 12px; }
@media (max-width: 700px) { .calc-res { grid-template-columns: 1fr; } .calc-res .learn-chars { max-width: 240px; } }

/* 오늘의 궁 */
.todaycourt { margin: 14px auto 0; max-width: 620px; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 14px; padding: 12px 16px; }
.todaycourt p { margin: 6px 0 0; }

/* 홈: 무료 도구 */
.toolgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; margin-top: 16px; }
.toolcard { display: grid; gap: 4px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); transition: transform .2s; }
.toolcard:hover { transform: translateY(-3px); }
.toolcard b { font: 400 22px var(--serif); }
.toolcard span { font: 400 14px/1.45 var(--sans); color: var(--gray); }

/* 궁합 전체 풀이 */
.matchread { margin: 10px 0 20px; }
.matchread .chapter-open { margin-left: 0; }

/* 나의 이상형: 두 캐릭터 */
.poster > .collage.two { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.typepair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 12px 46px; max-width: 440px; }
.typepair .tp { display: grid; gap: 6px; justify-items: center; text-align: center; font: 500 14px var(--sans); }
.typepair .tpimg { width: 100%; aspect-ratio: 2/3; border-radius: 14px; overflow: hidden; }
.typepair .tpimg img, .typepair .tpimg svg { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { .typepair { margin-left: 0; } }
/* 손님 후기 */
.review-ask { margin: 22px 0 0 46px; max-width: 620px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--earth); border-radius: 14px; padding: 14px 16px; }
.review-ask h3 { margin: 4px 0 8px; font-size: 24px; }
.rv-pick { display: flex; gap: 4px; }
.rv-pick button { font-size: 34px; line-height: 1; background: none; border: 0; color: #D9D4CA; cursor: pointer; padding: 2px 4px; transition: transform .12s, color .12s; }
.rv-pick button:hover { transform: scale(1.12); }
.rv-pick button.on { color: var(--earth); }
.rv-more { margin-top: 10px; }
.rv-more textarea, .rv-more input:not([type]) , .rv-more .rv-row input { width: 100%; font: 400 16px var(--sans); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--paper, #fff); box-sizing: border-box; }
.rv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.rv-consent { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 4px 0 10px; }
.rv-stars { color: var(--earth); letter-spacing: 1px; }
.rv-stars i { color: #D9D4CA; font-style: normal; }
.prodreviews { margin: 40px 0 0; max-width: 760px; }
.prodreviews h3 { margin: 4px 0 12px; }
.rv-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rv-card { margin: 0; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.rv-card blockquote { margin: 6px 0; font-size: 16px; line-height: 1.45; }
.rv-card figcaption { font-size: 13px; color: var(--gray); }
@media (max-width: 600px) { .review-ask { margin-left: 0; } .rv-row { grid-template-columns: 1fr; } }
/* Gumroad 결제 */
.gumnote { background: #EEF5F0; border: 1px solid #BFDCC9; color: #234B33; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.gumwait { text-align: center; padding: 8px 0 4px; }
.gumwait h3 { margin: 0 0 6px; font-size: 22px; }
.gumwait .dots { display: inline-flex; gap: 6px; margin: 10px 0; }
.gumwait .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--fire); animation: gumdot 1.2s infinite ease-in-out; }
.gumwait .dots i:nth-child(2) { animation-delay: .2s; } .gumwait .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes gumdot { 0%, 80%, 100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); } }
.gumwait details { text-align: left; margin-top: 10px; }
.gumwait input { font: 400 15px var(--sans); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
@media (prefers-reduced-motion: reduce) { .gumwait .dots i { animation: none; opacity: .7; } }
/* ===== 새 첫 화면 시안: 영화 포스터형 배너 ===== */
.hx-page { background: var(--night); color: #F4EFE6; }
.hx-page header.top { background: rgba(15,14,19,.86); border-bottom-color: rgba(255,255,255,.08); }
.hx-page header.top .brand, .hx-page header.top nav a { color: #F4EFE6; }
.hx-page .muted, .hx-page .row-head .mono, .hx-page .mono { color: #A9A2B0; }
.hx-page .block { border-color: rgba(255,255,255,.08); }
.hx { padding: 14px 0 6px; overflow: hidden; }
.hx-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px; scrollbar-width: none; }
.hx-rail::-webkit-scrollbar { display: none; }
.hx-card { position: relative; flex: 0 0 calc(100% - 44px); aspect-ratio: 2 / 3; max-height: 78vh; border-radius: 22px; overflow: hidden; scroll-snap-align: center; color: #fff; text-decoration: none; background: #1B1922; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.hx-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; animation: hxzoom 14s ease-in-out infinite alternate; }
@keyframes hxzoom { from { transform: scale(1.02); } to { transform: scale(1.1) translateY(-1.5%); } }
.hx-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,9,14,0) 38%, rgba(10,9,14,.55) 62%, rgba(10,9,14,.94) 100%); }
.hx-tag { position: absolute; z-index: 2; top: 14px; left: 14px; font: 700 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; background: rgba(210,65,43,.92); padding: 6px 11px; border-radius: 999px; }
.hx-ov { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 20px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hx-host { font: 500 13px var(--sans); color: #E9DFCF; letter-spacing: .02em; }
.hx-host .ko { font: 700 15px var(--hangul); color: #FFE3DA; }
.hx-card { container-type: inline-size; }
.hx-kot { font-family: var(--brush); font-size: clamp(56px, calc(84cqw / var(--n, 2)), 116px); white-space: nowrap; line-height: 1.02; margin-top: 4px; padding: 0 6px 2px;
  background: linear-gradient(180deg, #FFFDF6 0%, #FFE8C2 45%, #F2B866 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 14px rgba(232, 120, 60, .55)) drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
.hx-en { font: 400 clamp(26px, 7vw, 34px)/1.05 var(--serif); margin-top: 2px; }
.hx-hook { font: italic 400 17px/1.35 var(--serif); color: #EADFCB; margin-top: 6px; max-width: 22em; }
.hx-cta { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; }
.hx-cta .btn { pointer-events: none; padding: 12px 22px; font-size: 16px; box-shadow: 0 8px 24px rgba(210,65,43,.45); }
.hx-price { font: 500 13px var(--sans); color: #CFC6D4; }
.hx-dots { display: flex; justify-content: center; gap: 6px; margin: 12px 0 2px; }
.hx-dots i { width: 6px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.28); transition: width .3s, background .3s; }
.hx-dots i.on { width: 22px; background: #F2B866; }
.hx-bday { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 18px; border-radius: 18px; background: linear-gradient(120deg, #2A1F33, #1E2638); border: 1px solid rgba(255,255,255,.08); }
.hx-bday h2 { margin: 4px 0; font-size: 28px; color: #fff; }
.hx-bday p { word-break: keep-all; }
.hx-page .row-head h3 { color: #F4EFE6; }
@media (min-width: 900px) {
  .hx-rail { padding: 0 max(16px, calc((100vw - 1180px) / 2)); }
  .hx-card { flex: 0 0 380px; max-height: none; }
}
@media (max-width: 600px) { .hx-bday { flex-direction: column; align-items: stretch; text-align: left; } }
@media (prefers-reduced-motion: reduce) { .hx-card img { animation: none; } }

/* 실제 첫 화면: 밝은 페이지 위쪽에 어두운 배너 띠 */
.hx-band { background: radial-gradient(120% 90% at 50% 0%, #2A2033 0%, var(--night) 62%); padding: 16px 0 12px; position: relative; z-index: 1; }
.hx-band .hx-dots i { background: rgba(255,255,255,.3); }
.hx-band + .hero { min-height: 0; padding-top: 26px; }
@media (max-width: 900px) { .hx-band + .hero .disc-col { display: none; } }
.hx-band .hx-dots i.on { background: #F2B866; }
.hx-en { margin-top: 8px; }

/* 상품 화면 (휴대폰): 청월당처럼 포스터가 화면을 채우고 가운데 큰 붓글씨 제목 + 버튼 */
.prod-hero .poster .ov .host, .prod-hero .poster .ov .ovgo, .prod-hero .poster .ov .ovprice { display: none; }
@media (max-width: 900px) {
  .prod-hero .poster { margin: 0 -20px; border-radius: 0; aspect-ratio: auto; height: min(88vh, 780px); container-type: inline-size; }
  .prod-hero .poster > img { object-position: center 12%; }
  .prod-hero .poster .ov { text-align: center; display: flex; flex-direction: column; align-items: center; padding: 140px 22px 26px; background: linear-gradient(180deg, rgba(10,9,14,0) 0%, rgba(10,9,14,.6) 35%, rgba(10,9,14,.95) 100%); }
  .prod-hero .poster .ov .host { display: block; font: 500 13px var(--sans); color: #E9DFCF; }
  .prod-hero .poster .ov .host .ko { font: 700 16px var(--hangul); color: #FFE3DA; }
  .prod-hero .poster .ov .kot { font-size: clamp(60px, calc(84cqw / var(--n, 2)), 116px); white-space: nowrap; line-height: 1.04; margin-top: 4px; padding: 0 6px 2px; text-shadow: none;
    background: linear-gradient(180deg, #FFFDF6 0%, #FFE8C2 45%, #F2B866 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 3px 14px rgba(232,120,60,.55)) drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
  .prod-hero .poster .ov .t { font-size: 30px; margin-top: 8px; }
  .prod-hero .poster .ov .q { font-size: 17px; max-width: 22em; }
  .prod-hero .poster .ov .ovgo { display: inline-block; margin-top: 16px; padding: 14px 26px; font-size: 17px; box-shadow: 0 8px 24px rgba(210,65,43,.45); }
  .prod-hero .poster .ov .ovprice { display: block; margin-top: 8px; font: 500 13px var(--sans); color: #CFC6D4; }
}
/* 상품 카드 붓글씨 제목: 배너와 같은 금빛 (어두운 아래쪽 위에서) */
.poster .meta .kot { background: linear-gradient(180deg, #FFFDF6 0%, #FFE8C2 50%, #F2B866 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 8px rgba(232,120,60,.45)) drop-shadow(0 1px 1px rgba(0,0,0,.7)); }

/* 궁합 화면 맨 위 포스터 한 장 */
.hx-single .hx-rail { justify-content: center; overflow: visible; }
.hx-single .hx-card { flex: 0 0 min(calc(100% - 0px), 420px); max-height: 80vh; }
/* 동그라미 얼굴: 포스터 전체가 아니라 얼굴이 크게 보이게 확대 */
.ava img.charimg, .ava > img { transform: scale(1.8); transform-origin: 50% 21%; }
.face img.charimg, .face > img { transform: scale(1.55); transform-origin: 50% 21%; }

/* 붓글씨 제목 그림 (흰 글씨, 투명 바탕): 어두운 포스터 위에서는 흰 글씨+빛, 밝은 바탕에서는 먹색 */
img.kot-img { display: block; width: auto; max-width: 92%; background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important; color: inherit; padding: 0; filter: drop-shadow(0 2px 10px rgba(0,0,0,.55)) drop-shadow(0 0 18px rgba(255,236,200,.25)); }
.poster .meta img.kot-img { height: clamp(40px, 3.6vw, 52px); margin-bottom: 2px; }
img.hx-kot.kot-img { height: clamp(72px, 20vw, 104px); margin: 6px auto 2px; }
.prod-hero .poster .ov img.kot-img { height: clamp(78px, 22vw, 112px); margin: 6px auto 2px; }
.prod-title .t-desk img.kot-img { height: clamp(80px, 8vw, 118px); filter: invert(1) brightness(.12); margin-bottom: 4px; }
/* 홈: K-드라마 새 소식 띠 */
.dpromo { display: grid; grid-template-columns: 74px 74px 1fr auto; gap: 12px; align-items: center; margin: 18px auto 0; padding: 12px; border-radius: 18px; background: #0B0A0F; color: #F6F1E7; text-decoration: none; box-shadow: var(--shadow); position: relative; z-index: 1; }
.dpromo img { width: 74px; height: 96px; object-fit: cover; object-position: 50% 18%; border-radius: 10px; }
.dpromo > span:nth-of-type(1) { display: grid; gap: 3px; }
.dpromo .mono { color: #F2B632; }
.dpromo b { font: 400 26px/1.1 var(--serif); color: #fff; }
.dpromo > span > span:last-child { font-size: 14px; color: #CFC8BC; }
@media (max-width: 640px) { .dpromo { grid-template-columns: 64px 1fr; } .dpromo img + img { display: none; } .dpromo img { width: 64px; height: 84px; } .dpromo .btn { grid-column: 1 / -1; } }
