/* 메뉴 슬라이더 · 입력 폼 · 궁합 · 타로 · 회원 등 확장 컴포넌트 */

/* ───── 상단 링크 · 메뉴 슬라이더 (그룹별 메뉴) ───── */
.top-actions { display: flex; align-items: center; gap: 10px; }
.join-link { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--brand); color: var(--brand); font-weight: 700; font-size: 14px; text-decoration: none; }
.join-link:hover, .join-link.on { background: var(--brand); color: #fff; }
#menu { margin-top: 8px; }
.menu_area { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.menu_track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.menu_track::-webkit-scrollbar { display: none; }
.menu_slide { flex: 0 0 100%; scroll-snap-align: start; padding: 18px 18px 6px; }
.menu_tit { display: flex; align-items: center; gap: 10px; font: 700 18px/1.3 var(--sans); margin-bottom: 12px; }
.menu_ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); font-size: 22px; }
.menu_li { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.menu_li a { display: flex; align-items: center; min-height: 46px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 500; background: var(--surface-2); }
.menu_li a:hover { border-color: var(--brand); }
.menu_li li.on a { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 700; }
.menu_num { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 8px 0 12px; font-size: 14px; color: var(--muted); }
.menu_num button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 16px; }
.menu_num button:hover { border-color: var(--brand); }

/* ───── 페이지 머리 · 개인정보 입력 ───── */
.unse_info { margin: 20px 0 6px; }
.unse_info h2 { font-size: clamp(22px, 5vw, 28px); }
.unse_txt { color: var(--muted); margin: 8px 0 4px; }
.txt_s { font-size: 14px; color: var(--muted); margin: 0; }
.txt_purple { color: var(--brand); font-weight: 700; }
.inp_area h3 { font-size: 19px; margin: 0 0 4px; }
.inp_ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; }
.inp_li > .k { display: block; font-weight: 700; margin-bottom: 6px; }
.inp_row { display: grid; grid-template-columns: 1.15fr 1.1fr 1fr 1fr; gap: 8px; }
.inp_two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inp_area .check { margin-top: 12px; }
.btn_area { margin-top: 22px; display: grid; gap: 10px; }
.hr-gap { margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--line); }
.inline-form { margin-top: 0; }

/* ───── 궁합 · 링 · 연간 차트 ───── */
.pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; text-align: center; }
.pair .who { padding: 12px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.pair .who b { display: block; font-size: 17px; }
.pair .who .pn { font: 700 22px/1.3 var(--serif); }
.pair .heart { font-size: 26px; color: var(--seal); }
.ring { --p: 70; width: 140px; height: 140px; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; margin: 4px auto; }
.ring::before { content: ""; width: 112px; height: 112px; border-radius: 50%; background: var(--surface); grid-area: 1 / 1; }
.ring b { grid-area: 1 / 1; font-size: 34px; line-height: 1; }
.ring b small { font-size: 14px; font-weight: 500; }
.center { text-align: center; }
.cat-list { display: grid; gap: 12px; margin-top: 14px; }
.cat-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 6px 10px; align-items: center; }
.cat-row .cd { font-size: 12.5px; color: var(--muted); grid-column: 1 / -1; margin-top: -2px; }
.cat-row .track { height: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.cat-row .fill { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.points li { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--line); font-size: 15px; }
.points li.good { border-left-color: var(--brand); }
.points li.care { border-left-color: var(--seal); }
.week-chart.y12 { grid-template-columns: repeat(12, 1fr); gap: 3px; }
.y12 .wcol { cursor: default; padding: 4px 0; }
.y12 .wcol:hover { background: none; }
.y12 .bar { width: min(22px, 80%); }
.y12 .dw { font-size: 12.5px; }
.y12 .wcol.now { background: var(--accent-soft); }
.organ { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); display: grid; gap: 6px; }
.organ h3 { font: 700 16px/1.4 var(--sans); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.organ p { margin: 0; font-size: 15px; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: var(--el1-bg); color: var(--el1); }
.stack { display: grid; gap: 12px; }
.year-list { display: grid; gap: 8px; }
.year-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px; align-items: center; font-size: 15px; }
.year-row.best { font-weight: 700; }
.year-row .track { height: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.year-row .fill { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.animals { display: flex; flex-wrap: wrap; gap: 8px; }
.animal { padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 14.5px; }
.animal b { display: block; font-size: 15.5px; }
.animal.bad { border-color: var(--seal); }

/* ───── 타로 ───── */
.tarot-row { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin: 18px 0 8px; }
.tslot { display: grid; gap: 8px; justify-items: center; }
.tslot .pos { font-size: 13px; font-weight: 700; color: var(--muted); }
.tcard { display: block; width: 150px; height: 261px; perspective: 900px; cursor: pointer; background: none; border: 0; padding: 0; }
.tcard-in { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s; }
.tcard.flipped .tcard-in { transform: rotateY(180deg); }
.tface { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px; display: grid; place-items: center; padding: 10px; text-align: center; border: 2px solid var(--brand); box-shadow: var(--shadow); }
.tback { background: repeating-linear-gradient(45deg, var(--brand) 0 9px, #5238b8 9px 18px); color: #fff; font-size: 46px; }
.tfront { background: #f3ead2; transform: rotateY(180deg); padding: 0; overflow: hidden; }
.tfront img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tfront.rev img { transform: rotate(180deg); }
.tcap { font-size: 14px; font-weight: 700; text-align: center; visibility: hidden; }
.tcap em { font-style: normal; color: var(--seal); font-size: 12.5px; }
.tcard.flipped + .tcap { visibility: visible; }
.tmsg { padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.tmsg h3 { font: 700 17px/1.4 var(--sans); margin-bottom: 4px; }
.tmsg .kw { font-size: 13.5px; color: var(--brand); font-weight: 700; margin-bottom: 6px; }
.tmsg .timg { font-size: 14px; margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px dashed var(--line); }
/* 단계 표시 · 질문 */
.tsteps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: none; }
.tsteps li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); text-align: center; }
.tsteps li span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); font-weight: 700; background: var(--surface); }
.tsteps li.done span { border-color: var(--accent); color: var(--accent); }
.tsteps li.on { color: var(--ink); font-weight: 700; }
.tsteps li.on span { background: var(--brand); border-color: var(--brand); color: #fff; }
/* 질문 입력칸: 카드 안에서 바로 눈에 띄도록 강조 상자 + 굵은 테두리 */
.tq-field { margin-top: 16px; padding: 14px; border-radius: 16px; background: var(--accent-soft); border: 2px solid var(--brand); }
.tq-label { display: block; font: 700 18px/1.3 var(--sans); margin: 0 0 8px; color: var(--ink); }
#tQ { width: 100%; min-height: 56px; padding: 12px 16px; font-size: 17px; font-weight: 500; color: var(--ink); background: var(--surface); border: 2px solid var(--brand); border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
#tQ::placeholder { color: var(--muted); opacity: 1; font-weight: 400; }
#tQ:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 2px 8px rgba(0, 0, 0, .08); }
.tq-help { margin: 6px 2px 0; font-size: 13.5px; color: var(--muted); }
/* 카드 장수 4가지 */
.tcounts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tcounts span { text-align: center; justify-items: center; padding: 12px 6px; }
.tcnt-n { font-size: 22px; line-height: 1.1; color: var(--brand); }
.tcounts input:checked + span .tcnt-n { color: var(--ink); }
.tvars { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.thints p { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; }
.ttips { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.tq { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.tq-q { font-weight: 700; font-size: 16px; flex: 1 1 220px; }
/* 스프레드 선택 */
.tspreads { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.tspreads label { position: relative; cursor: pointer; }
.tspreads input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tspreads span { display: grid; gap: 2px; height: 100%; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); }
.tspreads b em { font-style: normal; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.tspreads small { color: var(--muted); font-size: 13px; }
.tspreads input:checked + span { border-color: var(--brand); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.tspreads input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
/* 섞기 */
.tdeck { position: relative; width: 110px; height: 172px; margin: 30px auto 22px; }
.tdeck span { position: absolute; inset: 0; border-radius: 12px; border: 2px solid var(--brand); background: repeating-linear-gradient(45deg, var(--brand) 0 8px, #5238b8 8px 16px); box-shadow: var(--shadow); }
.tdeck span:nth-child(1) { transform: translate(-6px, 6px) rotate(-4deg); }
.tdeck span:nth-child(2) { transform: translate(-2px, 2px) rotate(-1deg); }
.tdeck span:nth-child(3) { transform: translate(3px, -2px) rotate(2deg); }
.tdeck.shuffling span:nth-child(1) { animation: tshufL .9s ease-in-out infinite; }
.tdeck.shuffling span:nth-child(2) { animation: tshufR .9s ease-in-out .45s infinite; }
.tdeck.shuffling span:nth-child(3) { animation: tshufR .9s ease-in-out infinite; }
.tdeck.shuffling span:nth-child(4) { animation: tshufU .9s ease-in-out .2s infinite; }
.tshuf-msg { text-align: center; font-weight: 700; font-size: 17px; margin: 0; }
.tdots::after { content: ''; display: inline-block; width: 1.5em; text-align: left; animation: tdots 1.2s steps(4) infinite; }
@keyframes tdots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.tprog { height: 6px; max-width: 240px; margin: 14px auto 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.tprog span { display: block; height: 100%; width: 0; background: var(--brand); animation: tprog linear forwards; }
@keyframes tprog { to { width: 100%; } }
@keyframes tshufL { 0%, 100% { transform: translate(-6px, 6px) rotate(-4deg); } 40% { transform: translate(-70px, 0) rotate(-14deg); } }
@keyframes tshufR { 0%, 100% { transform: translate(3px, -2px) rotate(2deg); } 40% { transform: translate(70px, 4px) rotate(12deg); } }
@keyframes tshufU { 0%, 100% { transform: none; } 55% { transform: translateY(-40px) rotate(6deg); } }
/* 펼친 78장 — 겹쳐 놓고 왼쪽 가장자리를 눌러 고른다 */
.tfan { display: flex; flex-wrap: wrap; justify-content: center; padding: 18px 0 4px 22px; }
.tfan .tb { position: relative; width: 46px; height: 76px; margin: 0 0 10px -22px; padding: 0; border-radius: 7px; border: 1.5px solid var(--brand); background: repeating-linear-gradient(45deg, var(--brand) 0 5px, #5238b8 5px 10px); box-shadow: -2px 1px 4px rgba(0, 0, 0, .25); cursor: pointer; transition: transform .15s, opacity .15s; }
.tfan .tb:hover, .tfan .tb:focus-visible { transform: translateY(-6px); z-index: 1; }
.tfan .tb:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.tfan .tb[aria-pressed="true"] { transform: translateY(-14px); z-index: 2; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
.tfan .tb[data-n]::after { content: attr(data-n); position: absolute; top: -8px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 2px 6px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 11px/1.3 var(--sans); }
/* 마음 상담: AI 상담 */
.chat-mode { display: grid; gap: 6px; margin-bottom: 12px; }
.chat-mode p { margin: 0; }
.ai-consent { margin-bottom: 14px; padding: 14px 16px; border-radius: 14px; background: var(--accent-soft); border: 2px solid var(--brand); font-size: 14.5px; }
.ai-consent ul { margin: 8px 0 12px; padding-left: 18px; display: grid; gap: 6px; }
.ai-consent-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-consent.nudge { animation: nudge .45s ease-in-out; }
@keyframes nudge { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.ai-badge { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: var(--brand); color: #fff; font-size: 11px; line-height: 1.6; vertical-align: 1px; }
.msg .ai-body p { margin: 0 0 8px; }
.msg .ai-body ul { margin: 4px 0 8px; padding-left: 20px; display: grid; gap: 4px; }
.msg .ai-wait { color: var(--muted); margin: 0; }
.msg .ai-note { margin: 8px 0 0; padding: 6px 10px; border-radius: 8px; background: var(--accent-soft); font-size: 13.5px; }
.msg .ai-foot { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.chat-form button:disabled { opacity: .55; cursor: wait; }
@media (prefers-reduced-motion: reduce) { .ai-consent.nudge { animation: none; } }
/* 카드 크게 보기: 마우스 미리보기(.tpeek) · 누르면 여는 창(.tzoom) */
.tarot-row .tcard.flipped, .tlay .tcard.flipped { cursor: zoom-in; }
.tpeek { position: fixed; z-index: 60; display: grid; gap: 6px; justify-items: center; padding: 8px; border-radius: 14px; background: var(--surface); border: 2px solid var(--brand); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); pointer-events: none; opacity: 0; transform: scale(.96); transition: opacity .15s, transform .15s; }
.tpeek.on { opacity: 1; transform: none; }
.tpeek img, .tzoom img { display: block; width: auto; max-width: 100%; aspect-ratio: 300 / 522; border-radius: 8px; background: #f3ead2; }
.tpeek img.rev, .tzoom img.rev { transform: rotate(180deg); }
.tzoom-cap { font-weight: 700; font-size: 15px; text-align: center; }
.tzoom { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .72); cursor: zoom-out; }
.tzoom-in { display: grid; gap: 10px; justify-items: center; padding: 12px; border-radius: 16px; background: var(--surface); max-height: 100%; }
.tzoom img { height: min(522px, calc(100vh - 150px)); max-width: calc(100vw - 56px); object-fit: contain; }
.tzoom-close { min-width: 120px; }
@media (prefers-reduced-motion: reduce) { .tpeek { transition: none; } }
/* 타로 탭 (타로 보기 / 카드 도감 / 내 기록) */
.ttabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.ttabs button { min-height: 44px; border: 0; border-radius: 10px; background: none; cursor: pointer; font-weight: 500; color: var(--ink); }
.ttabs button:hover { background: var(--surface-2); }
.ttabs button[aria-selected="true"] { background: var(--brand); color: #fff; font-weight: 700; }
/* 질문 모음 · 이용 안내 */
.tqs { margin-top: 12px; display: grid; gap: 6px; }
.tqs .topic-chips button { min-height: 40px; padding: 6px 12px; font-size: 14px; text-align: left; }
.tqs .topic-chips em { font-style: normal; font-size: 12px; color: var(--brand); font-weight: 700; margin-left: 2px; }
.tabout { margin-top: 18px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14.5px; }
.tabout summary { cursor: pointer; font-weight: 700; min-height: 32px; display: list-item; }
.tabout ul { margin: 8px 0 2px; padding-left: 18px; display: grid; gap: 6px; }
/* 해석 · 메모 · 복사 */
.ttopic { margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); font-size: 14.5px; }
.tmemo { margin-top: 16px; display: grid; gap: 6px; }
.tmemo label { font-weight: 700; }
.tmemo textarea { width: 100%; font: inherit; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); resize: vertical; }
.tread-btns { grid-template-columns: 1fr 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
/* 카드 도감 */
.tsuits { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 4px; }
.tdict-filter { margin-bottom: 4px; }
.tdict { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; margin-top: 14px; }
.tdict button { display: grid; gap: 4px; justify-items: center; padding: 6px 4px 8px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; font-size: 12.5px; line-height: 1.3; color: var(--ink); }
.tdict button:hover { border-color: var(--brand); }
.tdict button[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--accent-soft); font-weight: 700; }
.tdict img { width: 100%; aspect-ratio: 300 / 522; object-fit: cover; border-radius: 5px; background: #f3ead2; }
.tdetail { display: grid; grid-template-columns: 170px 1fr; gap: 16px; margin-top: 14px; padding: 14px; border-radius: 14px; border: 1.5px solid var(--brand); background: var(--surface-2); scroll-margin-top: 12px; }
.tdetail:focus { outline: none; }
.tdetail img { width: 100%; border-radius: 8px; box-shadow: var(--shadow); }
.tdetail h3 { font: 700 19px/1.35 var(--sans); margin: 0 0 4px; }
.tdetail h3 small { font-size: 13px; font-weight: 500; color: var(--muted); }
.tdetail h4 { font: 700 15px/1.4 var(--sans); margin: 12px 0 2px; }
.tdetail p { margin: 0; }
.tdetail .kw { color: var(--brand); font-weight: 700; margin-bottom: 8px; }
.ttopics { margin: 4px 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
/* 내 기록 */
.tlog { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tlog-item { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); display: grid; gap: 8px; }
.tlog-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tlog-q { margin: 0; font-weight: 700; }
.tlog-cards { display: flex; flex-wrap: wrap; gap: 4px; }
.tlog-cards img { width: 38px; aspect-ratio: 300 / 522; object-fit: cover; border-radius: 4px; background: #f3ead2; }
.tlog-cards img.rev { transform: rotate(180deg); }
.tlog-memo { margin: 0; font-size: 14.5px; white-space: pre-wrap; }
.tlog-memo.muted { color: var(--muted); }
.tlog-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tlog-btns .btn { min-height: 40px; padding: 6px 14px; font-size: 14px; }
@media (max-width: 620px) {
  .tdetail { grid-template-columns: 1fr; }
  .tdetail img { max-width: 170px; justify-self: center; }
  .tdict { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .tdict button { font-size: 11.5px; padding: 4px 2px 6px; }
  .ttabs button { font-size: 14px; padding: 0 4px; }
}
/* 스프레드 안내 · 양자택일 선택지 */
.tsp-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 14px; }
.topts { margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1.5px dashed var(--brand); }
.topt span { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.topt input { width: 100%; }
/* 배열 모양 (양자택일 V자 · 켈틱 크로스) — 카드 크기는 칸 너비에 맞춤 */
.tlay { margin: 18px auto 8px; }
.tlay .tslot { min-width: 0; gap: 4px; }
.tlay .tcard { width: 100%; height: auto; aspect-ratio: 300 / 522; }
.tlay .tface { border-radius: 8px; }
.tlay .pos { font-size: 12px; line-height: 1.25; text-align: center; min-height: 2.5em; display: flex; align-items: flex-end; justify-content: center; }
.tlay .tcap { font-size: 12px; line-height: 1.3; }
.tchoice { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; max-width: 480px; align-items: start; }
.tchoice .p2 { grid-area: 1 / 1; }
.tchoice .p4 { grid-area: 1 / 4; }
.tchoice .p3 { grid-area: 2 / 2; }
.tchoice .p5 { grid-area: 2 / 3; }
.tchoice .p1 { grid-area: 3 / 2 / 4 / 4; justify-self: center; width: calc(50% - 6px); }
.tceltic { display: flex; gap: 14px; justify-content: center; align-items: center; max-width: 440px; }
.tcross { flex: 3 1 0; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: ". c3 ." "c5 c1 c6" ". c4 ."; gap: 8px; align-items: center; }
.tcross .p1, .tcross .p2 { grid-area: c1; }
.tcross .p3 { grid-area: c3; }
.tcross .p4 { grid-area: c4; }
.tcross .p5 { grid-area: c5; }
.tcross .p6 { grid-area: c6; }
/* 2번 카드는 1번 위에 가로로 겹쳐 놓는다 (이름표는 자리만 차지해 두 카드의 중심을 맞춤) */
.tcross .p2 { z-index: 2; transform: rotate(90deg) scale(.7); }
.tcross .p2 .pos, .tcross .p2 .tcap { visibility: hidden !important; }
.tstaff { flex: 1 1 0; min-width: 0; display: grid; gap: 8px; }
/* 양자택일 비교 */
.tcmp { display: grid; gap: 8px; }
.tcmp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); }
.tcmp-row small { color: var(--muted); font-weight: 700; font-size: 13px; }
.tcmp-bar { grid-column: 1 / -1; height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.tcmp-bar i { display: block; height: 100%; background: var(--h2); }
.tcmp-row.best { border-color: var(--h5); }
.tcmp-row.best .tcmp-bar i { background: var(--h5); }
.tcmp-row.best small { color: var(--seal); }
.tfan .tb.dim { opacity: .45; cursor: default; }
.tfan .tb.dim:hover { transform: none; }
.tpickcnt { margin: 6px 0 0; font-weight: 700; color: var(--brand); }
/* 해석 */
.tstory { margin-top: 16px; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--brand); display: grid; gap: 8px; }
.tstory h3 { font: 700 18px/1.4 var(--sans); margin: 0; }
.tstory p { margin: 0; }
.tyn { padding: 12px 14px; border-radius: 12px; border-left: 6px solid var(--h3); background: var(--surface); }
.tyn b { font-size: 17px; }
.tyn p { margin: 4px 0 0; }
.tyn.good { border-left-color: var(--h5); }
.tyn.care { border-left-color: var(--h1); }
@media (prefers-reduced-motion: reduce) {
  .tdeck.shuffling span, .tdots::after { animation: none !important; }
  .tcard-in, .tfan .tb { transition: none; }
}

/* ───── 회원 ───── */
.notice { padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); font-size: 14.5px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.people li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.people .del { border: 0; background: none; color: var(--seal); cursor: pointer; font-weight: 700; min-height: 40px; padding: 0 8px; }

@media (max-width: 620px) {
  .inp_row { grid-template-columns: 1fr 1fr; }
  .pair { grid-template-columns: 1fr; }
  .pair .heart { transform: rotate(90deg); }
  .cat-row { grid-template-columns: 84px 1fr auto; }
  .week-chart.y12 { gap: 1px; }
  .y12 .dw { font-size: 11px; }
  .tcard { width: 128px; height: 223px; }
  .tarot-row { gap: 10px; }
  .tarot-row.n3 .tcard { width: 92px; height: 160px; }
  .tarot-row.n3 .tcap { font-size: 12.5px; max-width: 92px; }
  .tfan { padding-left: 14px; }
  .tfan .tb { width: 38px; height: 62px; margin-left: -14px; }
  .tsteps li { font-size: 12px; }
  .tcounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ───── 행운 번호 ───── */
.lotto { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.lotto li { display: grid; grid-template-columns: 22px repeat(6, minmax(0, 1fr)); align-items: center; gap: 6px; } /* 한 세트(6개)는 늘 한 줄 */
.lotto .lab { width: 22px; font-weight: 700; color: var(--muted); }
.lotto .ball { width: 100%; max-width: 44px; height: auto; aspect-ratio: 1; font-size: 16px; justify-self: center; }
.ball.lk { background: var(--surface); color: var(--brand); box-shadow: inset 0 0 0 3px var(--brand); }
@media (max-width: 620px) { .lotto .ball { font-size: 14px; } .lotto li { gap: 4px; } }

/* ───── 로고 이미지 ───── */
.brand-logo { width: 48px; height: 48px; border-radius: 50%; flex: none; object-fit: cover; box-shadow: 0 0 0 1px var(--line), 0 2px 8px rgba(20, 20, 50, .12); background: #fff; }

/* ───── 브랜드 이름: 붓글씨체 ───── */
.brand-text strong { font-family: "Nanum Brush Script", "Noto Serif KR", serif; font-weight: 400; font-size: 42px; line-height: 1; letter-spacing: .02em; }
.brand-text small { margin-top: 2px; }
@media (max-width: 620px) { .brand-text strong { font-size: 35px; } .top-inner { gap: 8px; } .join-link { padding: 6px 12px; } }

/* ───── 배경: 오래된 한지 위의 붓글씨 한자 ───── */
:root {
  --paper: #e8d8b4; --paper-hi: #f2e7ca; --paper-lo: #c9b083;
  --ink-hj: 36, 25, 16; --hj-alpha: .14; --hj-blend: multiply;
  --surface: #fbf6e8; --surface-2: #f4ecd7; --line: #d8c8a2; --muted: #6a604f;
  --shadow: 0 1px 2px rgba(80, 55, 20, .10), 0 8px 24px rgba(80, 55, 20, .10);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #241d14; --paper-hi: #31281b; --paper-lo: #140e08;
    --ink-hj: 236, 216, 170; --hj-alpha: .11; --hj-blend: screen;
    --surface: #2a231b; --surface-2: #322a20; --line: #4a3e2d; --ink: #f0e7d3; --muted: #b9ad95; --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .3);
  }
}
:root[data-theme="dark"] {
  --paper: #241d14; --paper-hi: #31281b; --paper-lo: #140e08;
  --ink-hj: 236, 216, 170; --hj-alpha: .11; --hj-blend: screen;
  --surface: #2a231b; --surface-2: #322a20; --line: #4a3e2d; --ink: #f0e7d3; --muted: #b9ad95; --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .3);
}
body { background: radial-gradient(ellipse 90% 70% at 50% 30%, var(--paper-hi) 0%, var(--paper) 58%, var(--paper-lo) 100%) fixed; }
.bg-hanja { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; user-select: none; -webkit-user-select: none;
  box-shadow: inset 0 0 120px 10px rgba(96, 62, 22, .38), inset 0 0 300px rgba(96, 62, 22, .16);
  background:
    radial-gradient(260px 200px at 18% 34%, rgba(120, 78, 30, .13), transparent 70%),
    radial-gradient(340px 260px at 82% 66%, rgba(120, 78, 30, .11), transparent 70%),
    radial-gradient(180px 150px at 62% 10%, rgba(120, 78, 30, .10), transparent 70%),
    radial-gradient(220px 180px at 10% 88%, rgba(120, 78, 30, .10), transparent 70%); }
.bg-hanja::before { content: ""; position: absolute; inset: 0; mix-blend-mode: multiply; opacity: .75;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='b' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.004 .006' numOctaves='3' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55  0 0 0 0 .38  0 0 0 0 .16  0 0 0 1.1 -.42'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3C/svg%3E"), url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.008 .45' numOctaves='2' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45  0 0 0 0 .32  0 0 0 0 .17  1.5 0 0 0 -.62'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"), url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36  0 0 0 0 .25  0 0 0 0 .12  0 0 0 .6 -.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 900px 900px, 600px 600px, 320px 320px; }
:root[data-theme="dark"] .bg-hanja::before { opacity: .35; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bg-hanja::before { opacity: .35; } }
.hj { position: absolute; font-family: "Ma Shan Zheng", "Noto Serif KR", serif; color: rgba(var(--ink-hj), var(--hj-alpha)); mix-blend-mode: var(--hj-blend); line-height: 1.05; white-space: nowrap; animation: ink 2.4s ease-out both; }
.col-a, .col-b, .col-c, .col-d { writing-mode: vertical-rl; text-orientation: upright; letter-spacing: .08em; }
.col-a { left: 1.5vw; top: 4vh; font-size: clamp(64px, 10vw, 150px); }
.col-b { right: 1.5vw; top: 6vh; font-size: clamp(56px, 8.5vw, 130px); animation-delay: .25s; }
.col-c { left: 14vw; top: 46vh; font-size: clamp(30px, 3.6vw, 54px); animation-delay: .5s; }
.col-d { right: 14vw; top: 42vh; font-size: clamp(28px, 3.2vw, 48px); animation-delay: .7s; }
.big-1 { left: 8vw; bottom: -6vh; font-size: clamp(200px, 30vw, 420px); transform: rotate(-6deg); animation-delay: .3s; }
.big-2 { right: 6vw; top: 30vh; font-size: clamp(120px, 16vw, 240px); transform: rotate(5deg); animation-delay: .6s; }
.big-3 { left: 30vw; top: 62vh; font-size: clamp(110px, 14vw, 210px); transform: rotate(-3deg); animation-delay: .9s; }
.big-4 { right: 26vw; bottom: 2vh; font-size: clamp(100px, 12vw, 180px); transform: rotate(4deg); animation-delay: 1.1s; }
@keyframes ink { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }
.top, #menu, main, .foot { position: relative; z-index: 1; }
#menu { z-index: 2; } /* 하위 메뉴 팝업(#menuPop)이 들어 있어 본문(main)보다 위에 있어야 글자 · 카드에 가려지지 않는다 */
.card, .menu_area { background-color: color-mix(in srgb, var(--surface) 93%, transparent); }
.menu_li a, .tmsg, .organ, .animal, .mini, .pair .who { border-color: var(--line); }
@media (max-width: 760px) {
  .hj { --hj-alpha: .12; }
  :root[data-theme="dark"] .hj { --hj-alpha: .13; }
  .col-c, .col-d { display: none; }
  .col-a { left: -2vw; font-size: 26vw; top: 2vh; }
  .col-b { right: -2vw; font-size: 22vw; top: 10vh; }
  .big-1 { left: -8vw; font-size: 78vw; bottom: -4vh; }
  .big-2 { right: -6vw; font-size: 42vw; top: 44vh; }
  .big-3, .big-4 { display: none; }
}
@media print { .bg-hanja { display: none; } }

/* 한자 위에 놓인 본문 글씨 가독성 */
.unse_info h1, .unse_txt, .unse_info .txt_s, .foot p { text-shadow: 0 0 8px var(--paper-hi), 0 0 2px var(--paper-hi); }
:root[data-theme="dark"] .unse_info h1, :root[data-theme="dark"] .unse_txt, :root[data-theme="dark"] .unse_info .txt_s, :root[data-theme="dark"] .foot p { text-shadow: none; }


/* ───── 가독성 보정: 밝은 화면(특히 스마트폰)에서 글씨가 또렷하도록 ───── */
:root { --paper: #efe4c8; --paper-hi: #f8f1dd; --paper-lo: #dac89c; --hj-alpha: .1; --ink: #1f1810; --muted: #4a4030; }
:root[data-theme="light"] { --paper: #efe4c8; --paper-hi: #f8f1dd; --paper-lo: #dac89c; --hj-alpha: .1; --ink: #1f1810; --muted: #4a4030; }
.bg-hanja { box-shadow: inset 0 0 90px 6px rgba(96, 62, 22, .24), inset 0 0 220px rgba(96, 62, 22, .1); }
.bg-hanja::before { opacity: .42; }
/* 제목·설명 글씨 밑에 종이색 받침을 깔아 배경 한자와 겹쳐도 읽히게 */
.unse_info { background: color-mix(in srgb, var(--paper-hi) 86%, transparent); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent); border-radius: 14px; padding: 16px 18px; }
.unse_info h1 { color: var(--ink); }
.unse_txt, .unse_info .txt_s { color: var(--muted); text-shadow: none; }
.unse_info h1, .foot p { text-shadow: none; }
.foot p { color: var(--muted); }
.foot { background: color-mix(in srgb, var(--paper-hi) 80%, transparent); border-radius: 14px; padding: 14px 18px; margin-bottom: 40px; }
.txt_purple { color: #5a3bc4; }
@media (max-width: 760px) { :root { --hj-alpha: .09; } :root[data-theme="light"] .hj { --hj-alpha: .09; } }

/* 어두운 화면은 기존 대비 유지 */
:root[data-theme="dark"] { --ink: #f0e7d3; --muted: #cbbfa6; --hj-alpha: .11; }
:root[data-theme="dark"] .unse_info { background: color-mix(in srgb, var(--paper-hi) 70%, transparent); }
:root[data-theme="dark"] .foot { background: color-mix(in srgb, var(--paper-hi) 60%, transparent); }
:root[data-theme="dark"] .txt_purple { color: #c9b8ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink: #f0e7d3; --muted: #cbbfa6; --hj-alpha: .11; }
  :root:not([data-theme="light"]) .unse_info { background: color-mix(in srgb, var(--paper-hi) 70%, transparent); }
  :root:not([data-theme="light"]) .foot { background: color-mix(in srgb, var(--paper-hi) 60%, transparent); }
  :root:not([data-theme="light"]) .txt_purple { color: #c9b8ff; }
}


/* ───── 달력: 음력 · 손 없는 날 · 절기 ───── */
.cell { position: relative; aspect-ratio: auto; min-height: 68px; gap: 1px; padding: 6px 2px; }
.cell .n { line-height: 1.1; }
.cell .lu { font-size: 10.5px; line-height: 1.1; opacity: .92; font-weight: 500; }
.cell .jg { font-size: 10px; font-weight: 700; line-height: 1.25; padding: 0 5px; border-radius: 6px; background: rgba(255, 255, 255, .68); color: #222; max-width: 100%; white-space: nowrap; }
.cell .jg.ev { color: #8a1010; }
/* 외국어로 번역되면 절기·명절 이름이 길어져(예: Chuseok (harvest festival)) 칸이 넓어지고 휴대폰에서 달력이 화면 밖으로 넘쳤다
   → 칸 너비를 7등분으로 고정(minmax(0,1fr))하고, 이름표는 칸 안에서 줄바꿈하되 두 줄까지만 보인다(전체 이름은 아래 상세의 칩에 나옴) */
.cal { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cell { min-width: 0; overflow: hidden; }
.cell .jg { white-space: normal; overflow-wrap: anywhere; word-break: keep-all; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; text-align: center; }
.cal .dow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.son { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #1f9d55; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.son.inline { position: static; display: inline-block; vertical-align: middle; margin-right: 2px; }
.son-chip { background: #dff3e6; color: #12703b; }
:root[data-theme="dark"] .son-chip { background: #183524; color: #7fe0a5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .son-chip { background: #183524; color: #7fe0a5; } }
@media (max-width: 620px) {
  .cell { min-height: 62px; padding: 5px 1px; }
  .cell .n { font-size: 15px; }
  .cell .lu { font-size: 10px; }
  .cell .jg { font-size: 9.5px; padding: 0 3px; }
  .son { top: 3px; right: 3px; width: 8px; height: 8px; }
}

.detail .chips { margin-bottom: 12px; }
#todayDetail .chips { margin-bottom: 4px; }

/* ───── 만세력 명식표 (평생운세 첫 카드) ───── */
.ms .ms-name { text-align: center; font-size: 26px; margin: 2px 0 12px; }
.ms .ms-name small { font-size: 18px; color: var(--muted); font-weight: 700; }
.ms-info { display: grid; grid-template-columns: auto 1fr auto; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--el1-bg); margin-bottom: 12px; }
.ms-info > div { padding: 8px 12px; display: grid; align-content: center; gap: 2px; }
.ms-g { font-weight: 700; border-right: 1px solid var(--line); }
.ms-d { font-size: 15px; font-weight: 500; }
.ms-jl { color: var(--el4); font-weight: 700; font-size: 14px; }
.ms-h { text-align: center; border-left: 1px solid var(--line); }
.ms-h b { font: 700 20px/1.2 var(--serif); }
.ms-h span { font-size: 13px; color: var(--muted); }
.ms-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ms-col { display: grid; justify-items: center; gap: 6px; padding: 8px 4px 0; border-left: 1px solid var(--line); background: var(--surface-2); }
.ms-col:first-child { border-left: 0; }
.ms-tg { font-weight: 700; font-size: 16px; }
.ms-t { display: grid; place-items: center; width: 100%; max-width: 76px; aspect-ratio: 1; border-radius: 10px; font: 700 clamp(30px, 8.5vw, 46px)/1 var(--serif); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 2px 3px rgba(60, 40, 10, .15); }
.ms-t.el0 { background: var(--el0-bg); } .ms-t.el1 { background: var(--el1-bg); } .ms-t.el2 { background: var(--el2-bg); } .ms-t.el3 { background: var(--el3-bg); } .ms-t.el4 { background: var(--el4-bg); }
.ms-t.me { box-shadow: 0 0 0 3px var(--accent), 0 2px 3px rgba(60, 40, 10, .15); }
.ms-t.q { background: var(--surface); color: var(--muted); border: 1.5px dashed var(--line); box-shadow: none; }
.ms-hid { width: 100%; text-align: center; font: 500 17px/1.6 var(--serif); letter-spacing: .12em; border-top: 1px solid var(--line); padding: 2px 0; color: var(--ink); }
.ms-lbl { width: 100%; text-align: center; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); padding: 3px 0; }
.ms-cnt { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 10px 0 4px; }
.ms-cnt span { text-align: center; padding: 6px 2px; font: 700 18px/1.3 var(--serif); color: var(--ink); border-left: 1px solid var(--line); }
.ms-cnt span:first-child { border-left: 0; }
.ms-cnt .el0 { background: var(--el0-bg); } .ms-cnt .el1 { background: var(--el1-bg); } .ms-cnt .el2 { background: var(--el2-bg); } .ms-cnt .el3 { background: var(--el3-bg); } .ms-cnt .el4 { background: var(--el4-bg); }
.ms-strip-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; font-size: 15px; }
.ms-strip-h span { font-size: 13px; color: var(--muted); }
.ms-strip { display: flex; flex-direction: row-reverse; gap: 3px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.ms-strip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ms-cell { flex: 0 0 56px; display: grid; justify-items: center; gap: 3px; padding: 3px 2px; border-radius: 10px; }
.ms-cell .ms-t { font-size: 27px; max-width: 50px; border-radius: 8px; }
.ms-ct, .ms-cb { font-size: 14px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.ms-cell.on.cur { background: #c2570c; }
.ms-cell.on.cur .ms-ct, .ms-cell.on.cur .ms-cb { color: #fff; }
.ms-cell.on.mon { box-shadow: inset 0 0 0 2.5px #2456d6; }
.ms-cell.on.mon .ms-ct { color: #fff; background: #2456d6; border-radius: 6px; padding: 0 6px; }
/* 대운 · 접목운 · 세운 칸 누르기 → 그해 세운 · 월운(보라 테두리 = 고른 해 · 그해의 대운) */
.ms-cell.pick { cursor: pointer; }
.ms-cell.pick:not(.on):hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.ms-cell.pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ms-cell.sel { box-shadow: inset 0 0 0 3px #7c3aed; }
.ms-cell.on.cur.sel { box-shadow: inset 0 0 0 3px #7c3aed, inset 0 0 0 5px #fff; }
.ms-selnote { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; border: 1.5px solid #7c3aed; background: color-mix(in srgb, #7c3aed 8%, transparent); font-size: 14px; line-height: 1.6; }
.ms-selnote .btn { margin-left: 6px; }
.ms-strip-h .ms-nav { margin-left: auto; display: inline-flex; gap: 4px; }
.ms-nb { min-width: 34px; min-height: 30px; border: 1px solid var(--field-border); border-radius: 8px; background: var(--field-bg); color: var(--ink); font-size: 13px; cursor: pointer; }
.ms-nb:hover { border-color: var(--accent); }

/* ───── 오행 상생·상극 그림 ───── */
.oh-wrap { display: grid; justify-items: center; }
.oh-svg { width: 100%; max-width: 420px; height: auto; }
.oh-c { stroke-width: 3; }
.oh-n.el0 .oh-c { fill: var(--el0-bg); stroke: var(--el0); } .oh-n.el1 .oh-c { fill: var(--el1-bg); stroke: var(--el1); } .oh-n.el2 .oh-c { fill: var(--el2-bg); stroke: var(--el2); } .oh-n.el3 .oh-c { fill: var(--el3-bg); stroke: var(--el3); } .oh-n.el4 .oh-c { fill: var(--el4-bg); stroke: var(--el4); }
.oh-n.zero .oh-c { stroke-dasharray: 6 5; }
.oh-me { fill: none; stroke: var(--accent); stroke-width: 3; }
.oh-t1 { font: 700 19px var(--sans); fill: var(--ink); text-anchor: middle; }
.oh-t2 { font: 500 14px var(--sans); fill: var(--ink); text-anchor: middle; }
.oh-yong, .oh-mel { font: 700 12.5px var(--sans); text-anchor: middle; }
.oh-yong { fill: var(--el1); } .oh-mel { fill: var(--accent); }
/* 오행 원 = 오방색(청 · 적 · 황 · 백 · 흑)으로 채우고 글자는 각 색 위에서 가장 잘 읽히는 색(--obN-t)으로 */
.oh-n.el0 .oh-c { fill: var(--ob0, #145a74); stroke: #0a3a4d; } .oh-n.el1 .oh-c { fill: var(--ob1, #a52a1d); stroke: #6e1810; }
.oh-n.el2 .oh-c { fill: var(--ob2, #f2c230); stroke: #b8901a; } .oh-n.el3 .oh-c { fill: var(--ob3, #fff); stroke: #9c927e; } .oh-n.el4 .oh-c { fill: var(--ob4, #1b1b1f); stroke: #8a8272; }
.oh-n.el0 :is(.oh-t1, .oh-t2, .oh-yong, .oh-mel) { fill: var(--ob0-t, #fff); } .oh-n.el1 :is(.oh-t1, .oh-t2, .oh-yong, .oh-mel) { fill: var(--ob1-t, #fff); }
.oh-n.el2 :is(.oh-t1, .oh-t2, .oh-yong, .oh-mel) { fill: var(--ob2-t, #2a2008); } .oh-n.el3 :is(.oh-t1, .oh-t2, .oh-yong, .oh-mel) { fill: var(--ob3-t, #1d1a15); } .oh-n.el4 :is(.oh-t1, .oh-t2, .oh-yong, .oh-mel) { fill: var(--ob4-t, #fff); }
.oh-n .oh-t2 { font-weight: 700; }
.oh-n .oh-yong, .oh-n .oh-mel { paint-order: normal; }
/* 없는(0개) 오행은 연하게 + 점선 — 글자는 바탕 위에서 읽히게 본문색 */
.oh-n.zero .oh-c { fill-opacity: .28; stroke-width: 3; }
.oh-n.zero :is(.oh-t1, .oh-t2, .oh-yong, .oh-mel) { fill: var(--ink); }
.oh-sg { stroke: #4a72c4; stroke-width: 3; marker-end: url(#ohA1); }
.oh-gk { stroke: #d2544a; stroke-width: 2; marker-end: url(#ohA2); opacity: .85; }
.oh-sg-h { fill: #4a72c4; } .oh-gk-h { fill: #d2544a; }
.oh-legend { display: flex; gap: 6px 16px; flex-wrap: wrap; justify-content: center; font-size: 14px; margin: 2px 0 10px; }
.oh-legend span::before { content: ''; display: inline-block; width: 22px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.oh-legend .sg::before { background: #4a72c4; } .oh-legend .gk::before { background: #d2544a; }
@media (max-width: 520px) {
  .ms-info { grid-template-columns: auto 1fr; }
  .ms-h { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); display: flex !important; gap: 8px; justify-content: center; align-items: baseline; }
  .ms-d { font-size: 14px; }
  .ms-tg { font-size: 14px; }
  .ms-hid { font-size: 15px; letter-spacing: .05em; }
  .ms-cnt span { font-size: 15px; }
  .ms-cell { flex-basis: 48px; }
  .ms-cell .ms-t { font-size: 23px; max-width: 44px; }
  .ms-ct, .ms-cb { font-size: 12.5px; }
}

/* ───── 명식표 감정용 표기(2026-10-17): 행 머리 + 4기둥 표, 운 칸의 십성 · 지장간 · 운성 · 신살 · 관계 ───── */
:root { --rel-hap: #1d4f9c; --rel-chung: #b3261e; --rel-etc: #2f6b3a; --star-gui: #9a6a00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rel-hap: #8fb6ff; --rel-chung: #ff9a8f; --rel-etc: #8fd6a0; --star-gui: #f0c45a; } }
:root[data-theme="dark"] { --rel-hap: #8fb6ff; --rel-chung: #ff9a8f; --rel-etc: #8fd6a0; --star-gui: #f0c45a; }
.ms-toggle { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13.5px; margin: -4px 0 10px; cursor: pointer; }
.ms-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.ms-grid { grid-template-columns: 2.9em repeat(4, minmax(0, 1fr)); background: var(--surface-2); }
.ms-rh { display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.15; padding: 4px 2px; border-top: 1px solid var(--line); background: var(--el1-bg); word-break: keep-all; }
.ms-c { display: grid; place-items: center; text-align: center; padding: 4px 3px; border-left: 1px solid var(--line); border-top: 1px solid var(--line); min-width: 0; }
.ms-grid > .ms-rh:first-child, .ms-grid > .ms-rh:first-child ~ .ms-c:nth-child(-n+5) { border-top: 0; }
.ms-c.tg { font-weight: 700; font-size: 16px; }
.ms-c.tile { padding: 5px 4px; }
.ms-c.unk { color: var(--muted); font-size: 13px; }
.ms-c.hid { display: flex; justify-content: center; gap: 2px; flex-wrap: wrap; }
.ms-hs { display: grid; justify-items: center; line-height: 1.15; min-width: 0; }
.ms-hs b { font: 700 17px/1.2 var(--serif); }
.ms-hs i { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; }
.ms-c.sm { font-size: 14px; font-weight: 600; }
.ms-c.chips { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 2px; min-height: 30px; }
.ms-c.lbl { font-size: 12.5px; color: var(--muted); padding: 3px 0; }
.ms-none { color: var(--muted); }
.ms-rel, .ms-star { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.2; padding: 1px 4px; border-radius: 5px; border: 1px solid currentColor; white-space: nowrap; background: var(--surface); }
.ms-rel.hap { color: var(--rel-hap); } .ms-rel.chung { color: var(--rel-chung); } .ms-rel.etc { color: var(--rel-etc); }
.ms-star { color: var(--ink); border-color: var(--line); }
.ms-star.gui { color: var(--star-gui); border-color: var(--star-gui); }
.ms-star.gm { color: var(--muted); border-style: dashed; }
.ms-sum { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 8px 0 6px; font-size: 14px; }
.ms-sum > div { display: grid; grid-template-columns: 5.6em 1fr; border-top: 1px solid var(--line); }
.ms-sum > div:first-child { border-top: 0; }
.ms-sum b { background: var(--el1-bg); padding: 6px 8px; display: grid; align-items: center; font-size: 13px; }
.ms-sum span { padding: 6px 10px; min-width: 0; }
.ms-sum em { font-style: normal; font-weight: 700; color: var(--accent); }
.ms-sum small { color: var(--muted); font-size: 12px; }
.ms-nrel { display: flex; flex-wrap: wrap; gap: 4px; }
.ms-nrel .ms-rel { font-size: 12.5px; padding: 2px 6px; }
.ms-cell { flex-basis: 58px; align-content: start; }
.ms-ctg { font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.ms-chid { font: 600 13px/1.2 var(--serif); letter-spacing: .02em; color: var(--ink); }
.ms-cs { font-size: 11.5px; line-height: 1.2; white-space: nowrap; color: var(--ink); }
.ms-cr { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ms-cr .ms-rel, .ms-cr .ms-star { font-size: 10.5px; padding: 0 3px; }
.ms-badge { font-size: 10.5px; font-weight: 700; line-height: 1.3; padding: 0 4px; border-radius: 5px; background: var(--el1-bg); color: var(--ink); white-space: nowrap; }
.ms-badge.jm { background: #6b3fa0; color: #fff; }
.ms-badge.empty { visibility: hidden; } /* 배지 없는 칸도 같은 높이를 차지해 간지 글자가 가로로 줄 맞춤 */
.ms-cell.on.cur .ms-ctg, .ms-cell.on.cur .ms-chid, .ms-cell.on.cur .ms-cs { color: #fff; }
.ms-key { font-size: 13px; line-height: 1.7; border: 1px dashed var(--line); border-radius: 10px; padding: 8px 10px; margin: 10px 0 4px; }
.ms-key .ms-rel, .ms-key .ms-star { font-size: 11.5px; }
.ms.simple .ms-x, .ms.simple .ms-c.x, .ms.simple .ms-badge { display: none; }
.ms.simple .ms-cell { flex-basis: 56px; }
@media (max-width: 520px) {
  .ms-grid { grid-template-columns: 2.5em repeat(4, minmax(0, 1fr)); }
  .ms-rh { font-size: 10.5px; padding: 3px 1px; }
  .ms-c.tg { font-size: 14px; }
  .ms-c.sm { font-size: 12.5px; }
  .ms-hs b { font-size: 15px; }
  .ms-hs i { font-size: 9.5px; letter-spacing: -.03em; }
  .ms-c.hid { gap: 1px; }
  .ms-rel, .ms-star { font-size: 10px; padding: 0 3px; }
  .ms-cell { flex-basis: 52px; }
  .ms.simple .ms-cell { flex-basis: 48px; }
  .ms-sum > div { grid-template-columns: 4.8em 1fr; }
}

/* ───── 평생운세: 체계적 감정 섹션 ───── */
.dsec { padding-top: 18px; }
.ds-head { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; margin-bottom: 6px; border-bottom: 2px solid var(--ink); }
.ds-n { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--surface); font: 800 20px/1 var(--sans); }
.ds-head h2 { margin: 0; font-size: 20px; line-height: 1.3; }
.ds-head p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.ds-sub { display: flex; align-items: center; gap: 8px; font: 700 17px/1.4 var(--sans); margin: 20px 0 8px; }
.ds-sub span { flex: none; white-space: nowrap; font-size: 12.5px; font-weight: 800; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 7px; }
.lead-line { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.dtbl { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 15px; }
.dtbl th, .dtbl td { border: 1px solid var(--line); padding: 7px 9px; text-align: left; vertical-align: middle; }
.dtbl th { background: var(--surface-2); white-space: nowrap; font-weight: 700; width: 1%; }
.dtbl thead th { width: auto; }
.dtbl.ctr th, .dtbl.ctr td { text-align: center; }
.dtbl tr.hl td, .dtbl td.hl { background: var(--accent-soft); font-weight: 700; }
.ox { font-weight: 600; } .ox.o { color: var(--el0); } .ox.x { color: var(--muted); }
.gy-badge { display: inline-block; font-size: 12.5px; font-weight: 800; color: #fff; background: #7a5200; border-radius: 6px; padding: 2px 8px; vertical-align: 2px; }
.yong4 { grid-template-columns: repeat(4, 1fr); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; box-shadow: 0 0 0 1px var(--line); }
.rel-list { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 8px; }
.rel-list li { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 15px; line-height: 1.6; }
.rtag { display: inline-block; font-size: 12.5px; font-weight: 800; border-radius: 6px; padding: 1px 7px; margin: 0 2px; }
.rtag.t-hap { background: var(--el0-bg); color: var(--el0); } .rtag.t-chung { background: var(--el1-bg); color: var(--el1); }
.yr-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 8px 0; }
.yr-box p { margin: 6px 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
@media (max-width: 520px) {
  .yong4 { grid-template-columns: repeat(2, 1fr); }
  .ds-head h2 { font-size: 18px; }
  .dtbl { font-size: 14px; }
  .dtbl th, .dtbl td { padding: 6px 7px; }
}
/* 휴대폰: 외국어로 번역되면 표 머리칸(th)이 길어져(예: Eokbu (抑扶, strength balance)) 줄바꿈 없이 표를 화면 밖으로 밀어냈다
   → 좁은 화면에서는 머리칸도 줄바꿈, 긴 낱말은 끊어 넣고, 표 안 점수 막대는 줄인다 */
@media (max-width: 620px) {
  /* 머리칸은 낱말 단위로만 줄바꿈(anywhere 는 최소 폭이 한 글자가 되어 첫 열이 세로로 쪼개졌다) */
  .dtbl th { white-space: normal; }
  .dtbl tbody th { width: auto; min-width: 4.8em; max-width: 36vw; word-break: keep-all; overflow-wrap: break-word; }
  /* 내용 칸·머리 줄은 어디서든 줄바꿈 가능(일본어·중국어는 띄어쓰기가 없어 keep-all 이면 넘친다) */
  .dtbl td, .dtbl thead th { overflow-wrap: anywhere; word-break: normal; }
  :root[lang="ko"] .dtbl td { word-break: keep-all; }
  .dtbl.ctr, html:not([lang="ko"]) .dtbl { font-size: 13px; }
  .dtbl.ctr th, .dtbl.ctr td { padding: 5px 3px; }
  .dtbl .sbar, table .sbar { width: 64px; max-width: 64px; }
}
.dsec .scroll-x { overflow-x: auto; }
.nav-links .btn { min-height: 40px; padding: 8px 14px; font-size: 14px; }

/* ───── 메뉴 아이콘 타일 (img/menu/*.webp = tools/make-menu-icons.mjs 가 그림, 예전 그림은 assets-src/menu-old) ───── */
.menu_ico { overflow: hidden; background: transparent; }
.menu_ico img { width: 40px; height: 40px; display: block; border-radius: 12px; }
.menu_li { grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.menu_li a { flex-direction: column; justify-content: flex-start; gap: 6px; min-height: 0; padding: 6px 4px 8px; border: 2px solid transparent; background: transparent; text-align: center; font-weight: 700; font-size: 14.5px; line-height: 1.3; word-break: keep-all; }
.menu_li a img { width: 100%; max-width: 104px; height: auto; aspect-ratio: 1; border-radius: 18px; box-shadow: 0 2px 6px rgba(60, 40, 10, .12); transition: transform .15s; }
.menu_li a:hover { border-color: transparent; }
.menu_li a:hover img { transform: translateY(-2px); }
.menu_li li.on a { background: var(--accent-soft); color: var(--ink); border-color: var(--brand); }
@media (min-width: 720px) { .menu_li { grid-template-columns: repeat(6, 1fr); } }
@media (prefers-reduced-motion: reduce) { .menu_li a img { transition: none; } }

/* ───── 메뉴 이전/다음: 청동 버튼(img/menu/nav-*.webp, assets-src/nav-buttons.jpg 에서 잘라 냄)을 아이콘 좌우에 ───── */
.menu_stage { position: relative; }
.menu_stage .menu_slide { padding-left: 62px; padding-right: 62px; }
.menu_nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; filter: drop-shadow(0 3px 5px rgba(60, 40, 10, .28)); transition: transform .15s, opacity .2s; }
.menu_nav img { width: 100%; height: 100%; display: block; border-radius: 50%; }
.menu_nav.prev { left: 6px; } .menu_nav.next { right: 6px; }
.menu_nav:hover { transform: translateY(-50%) scale(1.07); }
.menu_nav:active { transform: translateY(-50%) scale(.95); }
.menu_nav:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.menu_nav.dim { opacity: .35; }
.menu_num { padding: 0 0 12px; }
@media (max-width: 560px) {
  .menu_stage .menu_slide { padding-left: 44px; padding-right: 44px; }
  .menu_nav { width: 38px; height: 38px; }
  .menu_nav.prev { left: 3px; } .menu_nav.next { right: 3px; }
  .menu_li { gap: 8px 4px; }
  .menu_li a { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { .menu_nav { transition: none; } }

/* ───── 입력칸이 배경과 뚜렷이 구분되도록 (테두리 대비 3:1 이상 · 카드와 다른 바탕) ───── */
:root { --field-border: #8f7b58; --field-bg: #fffdf8; --field-ph: #7a6d58; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --field-border: #9c8b6f; --field-bg: #17120c; --field-ph: #a89a82; } }
:root[data-theme="dark"] { --field-border: #9c8b6f; --field-bg: #17120c; --field-ph: #a89a82; }
input[type="text"], input[type="number"], input[type="time"], input[type="date"], input[type="email"], input[type="tel"], input[type="search"], input:not([type]), select, textarea, .tmemo textarea {
  border: 1.5px solid var(--field-border); background-color: var(--field-bg); color: var(--ink);
}
input::placeholder, textarea::placeholder { color: var(--field-ph); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
/* 설명 글과 입력 칸의 이름표를 조금 더 또렷하게 */
.inp_li > .k, .inp_li > label.k { color: var(--ink); }
/* 어두운 모드의 회원가입 버튼 글자 */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .join-link:not(.on) { color: var(--accent); border-color: var(--accent); } }
:root[data-theme="dark"] .join-link:not(.on) { color: var(--accent); border-color: var(--accent); }
/* 작은 글자 대비 보정(4.5:1 이상) — 밝은 모드의 빨강·초록·인장색을 조금 진하게, 어두운 모드의 보라 글자는 밝게 */
:root { --el0: #2c7043; --el1: #a3321d; --seal: #a3261d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ball.lk { color: var(--accent); box-shadow: inset 0 0 0 3px var(--accent); } }
:root[data-theme="dark"] .ball.lk { color: var(--accent); box-shadow: inset 0 0 0 3px var(--accent); }

/* ───── 세계의 부적 ───── */
.amu-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.amu-img svg { width: 100%; height: auto; display: block; }
.amu-name { margin: 0 0 4px; font-size: 18px; }
.amu-why { margin: 0 0 6px; font-weight: 700; color: var(--accent); }
.amu-txt p { margin: 0 0 6px; }
.amu-how { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 15px; }
.amu-filter { flex-wrap: wrap; margin-bottom: 14px; }
.amu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.amu-item { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: var(--surface-2); }
.amu-item .amu-img { width: 120px; margin: 0 auto 6px; }
.amu-item h3 { margin: 0; font-size: 17px; text-align: center; } .amu-item h3 small { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.amu-en { margin: 0 0 6px; text-align: center; font-size: 13px; color: var(--muted); }
.amu-tags { text-align: center; margin: 0 0 8px; } .amu-item p { font-size: 15px; }
@media (max-width: 520px) { .amu-row { grid-template-columns: 88px 1fr; gap: 10px; } }
.amu a { color: var(--accent); font-weight: 700; }

/* ───── 오방색(五方色): 간지 글자의 배경 = 오행의 전통 색 (목 청 · 화 적 · 토 황 · 금 백 · 수 흑) ───── */
:root { --ob0: #145a74; --ob1: #a52a1d; --ob2: #f2c230; --ob3: #ffffff; --ob4: #1b1b1f; --ob0-t: #fff; --ob1-t: #fff; --ob2-t: #2a2008; --ob3-t: #1d1a15; --ob4-t: #fff; }
.ms-t.el0, .ms-cnt .el0 { background: var(--ob0) !important; color: var(--ob0-t) !important; }
.ms-t.el1, .ms-cnt .el1 { background: var(--ob1) !important; color: var(--ob1-t) !important; }
.ms-t.el2, .ms-cnt .el2 { background: var(--ob2) !important; color: var(--ob2-t) !important; }
.ms-t.el3, .ms-cnt .el3 { background: var(--ob3) !important; color: var(--ob3-t) !important; box-shadow: inset 0 0 0 1.5px #b9b09f, 0 2px 3px rgba(60, 40, 10, .15); }
.ms-t.el4, .ms-cnt .el4 { background: var(--ob4) !important; color: var(--ob4-t) !important; box-shadow: inset 0 0 0 1.5px #5d574c, 0 2px 3px rgba(60, 40, 10, .15); }
.ms-t.me { box-shadow: 0 0 0 3px var(--accent), 0 2px 3px rgba(60, 40, 10, .15) !important; }
.ms-t.gzt { display: inline-grid; width: 1.55em; max-width: none; height: 1.55em; aspect-ratio: auto; border-radius: 5px; font-size: 14px; box-shadow: none; vertical-align: middle; }
.ms-t.gzt.el3 { box-shadow: inset 0 0 0 1px #b9b09f; } .ms-t.gzt.el4 { box-shadow: inset 0 0 0 1px #5d574c; }
.gz { display: inline-flex; gap: 2px; vertical-align: middle; margin-right: 2px; }
.obang { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0 4px; }
.ob-i { display: flex; align-items: center; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 12.5px; line-height: 1.35; }
.ob-i .ms-t.gzt { font-size: 16px; width: 1.7em; height: 1.7em; flex: none; }
.ob-i b { display: block; font-size: 13px; } .ob-i span:not(.ms-t) { color: var(--muted); }
.sixty { margin: 12px 0 0; } .sixty summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.sx-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin: 6px 0; }
.sx { display: grid; justify-items: center; gap: 2px; padding: 4px 1px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 11.5px; }
.sx.mine { outline: 2.5px solid var(--accent); outline-offset: -1px; font-weight: 700; }
.sx.now { box-shadow: 0 0 0 2.5px #e8741e; }
.sx .ms-t.gzt { font-size: 13px; }
@media (max-width: 620px) {
  .obang { grid-template-columns: repeat(2, 1fr); } .obang .ob-i:last-child { grid-column: 1 / -1; }
  .sx-grid { grid-template-columns: repeat(5, 1fr); }
}
/* 오방색 안내·60갑자 표: 휴대폰에서 잘리지 않게 */
.sx-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
.sx { min-width: 0; }
.sx .gz { gap: 1px; }
.sx .ms-t.gzt { font-size: 12px; width: 1.5em; height: 1.5em; }
@media (max-width: 620px) {
  .sx-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .obang { grid-template-columns: 1fr; gap: 4px; }
  .obang .ob-i:last-child { grid-column: auto; }
  .ob-i { padding: 5px 8px; }
  .ob-i > div { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
  .ob-i b { display: inline; }
}

/* ───── 카드 도감: 그림 상징 공부 (팝업 .tstudy · 상세 안 .tst-inline) ───── */
.tstudy { position: fixed; z-index: 70; overflow: auto; padding: 14px 16px; border-radius: 16px; background: var(--surface); color: var(--ink); border: 2px solid var(--brand); box-shadow: 0 14px 44px rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transform: translateY(6px); transition: opacity .15s, transform .15s; }
.tstudy.on { opacity: 1; pointer-events: auto; transform: none; }
.tst-head { margin-bottom: 8px; } .tst-head b { font-size: 18px; } .tst-head .kw { margin: 2px 0 0; color: var(--accent); font-weight: 700; }
.tst-body { display: grid; grid-template-columns: minmax(180px, 250px) 1fr; gap: 14px; align-items: start; }
.tst-pic { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.tst-pic img { display: block; width: 100%; height: auto; }
.tst-mk { position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #e8741e; color: #fff; font: 800 13px/1 var(--sans); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .45); cursor: default; transition: transform .12s; }
.tst-mk.on { transform: translate(-50%, -50%) scale(1.35); background: var(--brand); z-index: 2; }
.tst-text h4 { margin: 0 0 6px; font-size: 15px; } .tst-text h4 + * { margin-top: 0; }
.tst-list { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 5px; font-size: 14.5px; line-height: 1.55; }
.tst-list.minor { list-style: none; padding-left: 0; }
.tst-list li { padding: 3px 6px; border-radius: 8px; }
.tst-list li::marker { font-weight: 800; color: #c2570c; }
.tst-list li.on { background: var(--accent-soft); }
.tst-ud { margin: 0 0 6px; font-size: 14.5px; } .tst-ud span { font-weight: 700; margin-right: 4px; }
.tst-how { margin: 8px 0 0; padding-left: 20px; font-size: 13.5px; color: var(--muted); display: grid; gap: 2px; }
.tst-tip { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); text-align: right; }
.tst-inline { margin: 12px 0 4px; border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; background: var(--surface-2); }
.tst-inline summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.tst-inline .tst { margin-top: 8px; }
@media (max-width: 620px) { .tst-body { grid-template-columns: 1fr; } .tst-pic { max-width: 280px; margin: 0 auto; } .tst-mk { width: 22px; height: 22px; font-size: 12px; } }

/* 펼친 카드의 공부 팝업: 자리 · 뽑힌 방향 */
.tst-pos { display: inline-block; font-size: 13px; font-weight: 800; color: #fff; background: var(--brand); border-radius: 999px; padding: 2px 10px; margin: 0 4px 4px 0; }
.tst-dir { display: inline-block; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 2px 10px; margin: 0 0 4px; background: var(--el0-bg); color: var(--el0); }
.tst-dir.rev { background: var(--el1-bg); color: var(--el1); }
.tst-pic.rev img { transform: rotate(180deg); }
.tst-ud.now { background: var(--accent-soft); border-radius: 8px; padding: 6px 8px; }

/* ───── 타로: 주제 → 질문 유형(전용 스프레드) → 자리에 놓기 → 순서대로 뒤집기 ───── */
.tqtypes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 6px 0 14px; }
.tqtype { display: grid; gap: 3px; text-align: left; padding: 11px 13px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; }
.tqtype:hover { border-color: var(--brand); }
.tqtype[aria-pressed="true"] { border: 2px solid var(--brand); background: var(--accent-soft); }
.tqt-q { font-weight: 700; font-size: 15.5px; }
.tqt-sp { font-size: 13px; font-weight: 700; color: var(--accent); }
.tqt-pos { font-size: 12.5px; color: var(--muted); }
.tsel-sp { border: 1.5px solid var(--brand); border-radius: 14px; padding: 12px 14px; background: var(--surface-2); }
.tsel-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; } .tsel-h b { font-size: 17px; }
.tsel-pos { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 3px; font-size: 14.5px; }
.tsel-pos li::marker { font-weight: 800; color: var(--accent); }
.tsp-more { margin: 10px 0 0; } .tsp-more summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 4px 0; }
.tdedi { margin-top: 10px; }
.tslots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 6px; }
.tsl { display: grid; justify-items: center; gap: 4px; width: 74px; }
.tsl-c { display: grid; place-items: center; width: 52px; height: 80px; border-radius: 8px; border: 2px dashed var(--line); color: var(--muted); font-weight: 800; font-size: 18px; background: var(--surface); }
.tsl.on .tsl-c { border: 2px solid var(--brand); background: linear-gradient(135deg, #4b3a8f, #7d5fd6); color: #fff; font-size: 28px; }
.tsl.next .tsl-c { border-color: var(--brand); box-shadow: 0 0 0 3px var(--accent-soft); color: var(--accent); }
.tsl small { font-size: 12px; text-align: center; line-height: 1.3; color: var(--muted); }
.tsl.on small, .tsl.next small { color: var(--ink); font-weight: 700; }
.tflip-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 0; }
.tmsg-pos { margin: 0 0 6px; font-size: 14px; color: var(--muted); }

/* ───── 행운 아이템: 실제 색 · 나침반 · 시계 ───── */
.lk-colors { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.lk-color { display: inline-grid; place-items: center; min-width: 64px; min-height: 40px; padding: 4px 14px; border-radius: 12px; font-weight: 800; font-size: 16px; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .18), 0 2px 5px rgba(0, 0, 0, .15); }
.lk-wide { grid-column: 1 / -1; }
.lk-vis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.lk-vis figure { margin: 0; display: grid; justify-items: center; gap: 4px; text-align: center; }
.lk-vis figcaption { font-size: 13px; color: var(--muted); font-weight: 700; }
.lk-vis b { font-size: 15px; }
.lk-svg { width: 100%; max-width: 150px; height: auto; }
.cp-ring { fill: #b08d57; } .cp-face { fill: #fbf6ea; stroke: #7a5c30; stroke-width: 1; }
.cp-hl { fill: rgba(211, 47, 47, .22); stroke: #d32f2f; stroke-width: 1; }
.cp-tick { stroke: #7a5c30; stroke-width: 1.2; }
.cp-lab { font: 800 11px var(--sans); fill: #5b4a33; text-anchor: middle; } .cp-lab.on { fill: #c62828; font-size: 13px; }
.cp-needle { fill: #d32f2f; stroke: #7f1d1d; stroke-width: .8; } .cp-hub { fill: #3b2f22; }
.ck-ring { fill: #3b2f22; } .ck-face { fill: #fffdf6; }
.ck-hl { fill: rgba(246, 176, 26, .45); stroke: #e0930a; stroke-width: 1; }
.ck-t { stroke: #8a7a66; stroke-width: .6; } .ck-t5 { stroke: #3b2f22; stroke-width: 1.6; }
.ck-num { font: 700 9.5px var(--sans); fill: #221a12; text-anchor: middle; }
.ck-h { stroke: #221a12; stroke-width: 3.2; stroke-linecap: round; } .ck-m { stroke: #221a12; stroke-width: 1.8; stroke-linecap: round; } .ck-hub { fill: #c62828; }
.dtbl .lk-vis { max-width: 340px; }
.ck-ring { stroke: #b08d57; stroke-width: 2; }
.cp-lab { paint-order: stroke; stroke: #fbf6ea; stroke-width: 3px; }

/* ───── 점수: 별 대신 가로 막대 + 점수 (운세 점수 스펙트럼 색) ───── */
.sbar { position: relative; display: inline-flex; align-items: center; width: 100%; max-width: 240px; height: 26px; border-radius: 999px; overflow: hidden; vertical-align: middle; background: color-mix(in srgb, var(--sb) 24%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sb) 45%, transparent); }
.sbar i { display: flex; align-items: center; justify-content: flex-end; height: 100%; min-width: 2.8em; padding: 0 9px; border-radius: 999px; background: var(--sb); color: var(--sbt); box-sizing: border-box; }
.sbar b { font: 800 14px/1 var(--sans); font-variant-numeric: tabular-nums; }
.sbar em { position: absolute; right: 9px; font: 700 11.5px/1 var(--sans); font-style: normal; color: var(--muted); }
.sbar.b1 { --sb: var(--h1); --sbt: var(--h1-t); } .sbar.b2 { --sb: var(--h2); --sbt: var(--h2-t); } .sbar.b3 { --sb: #d9b43a; --sbt: #2a2108; } .sbar.b4 { --sb: var(--h4); --sbt: var(--h4-t); } .sbar.b5 { --sb: var(--h5); --sbt: var(--h5-t); }
.sbar.sm { max-width: 170px; height: 22px; } .sbar.sm b { font-size: 12.5px; } .sbar.sm em { font-size: 10.5px; right: 7px; }
.dtbl .sbar, .tbl .sbar, table .sbar { width: 120px; max-width: 120px; height: 20px; } table .sbar b { font-size: 12px; } table .sbar em { display: none; }
h3 .sbar { width: 150px; }
.total-row .sbar { max-width: 260px; height: 30px; } .total-row .sbar b { font-size: 16px; }

/* ───── 띠 캐릭터 카드 (잘 맞는 띠 · 부딪히기 쉬운 띠) ───── */
.animals { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.animal { position: relative; display: grid; justify-items: center; text-align: center; gap: 2px; padding: 12px 8px 10px; border: 2px solid var(--line); border-radius: 16px; background: var(--surface-2); font-size: 13.5px; }
.animal.good { border-color: #d9a441; background: linear-gradient(180deg, rgba(255, 214, 102, .22), transparent 60%), var(--surface-2); }
.animal.bad { border-color: var(--seal); border-style: dashed; }
.animal .zd-pic { display: block; width: 84px; height: 84px; transition: transform .25s; }
.animal .zd-pic svg { width: 100%; height: 100%; display: block; }
.animal.good:hover .zd-pic { transform: translateY(-4px) rotate(-4deg); }
.animal.bad:hover .zd-pic { animation: zd-shake .5s; }
@keyframes zd-shake { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .animal .zd-pic { transition: none; } .animal.bad:hover .zd-pic { animation: none; } }
.animal b { display: block; font-size: 16px; margin-top: 2px; }
.animal .zd-nick { font-size: 12.5px; font-weight: 700; color: var(--brand); }
.animal .zd-yr { font-size: 12.5px; color: var(--muted); }
.animal .zd-tag { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: #fff3c4; color: #6b4a00; }
.animal.bad .zd-tag { background: var(--el1-bg); color: var(--el1); }
@media (max-width: 420px) { .animals { grid-template-columns: repeat(2, minmax(0, 1fr)); } .animal .zd-pic { width: 72px; height: 72px; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .animal .zd-nick { color: var(--accent); } :root:not([data-theme="light"]) .animal.good { border-color: #b88a2e; } }
:root[data-theme="dark"] .animal .zd-nick { color: var(--accent); } :root[data-theme="dark"] .animal.good { border-color: #b88a2e; }
.animal { align-content: start; padding-top: 30px; }
.animal .zd-yr span { white-space: nowrap; }

/* 띠 목록 머리: 캐릭터 + 같은 크기의 제목 */
.zd-head { display: flex; align-items: center; gap: 8px; margin: 14px 0 10px; font-size: 18px; font-weight: 800; }
.zd-head.bad { margin-top: 22px; color: var(--el1); }
.zd-head.good { color: #9a3412; }
.zd-hic { width: 40px; height: 40px; flex: none; }
.zd-hic svg { width: 100%; height: 100%; display: block; }
.zd-head.bad .zd-hic { animation: zd-punch 1.6s ease-in-out infinite; }
.zd-head.good .zd-hic { animation: zd-beat 1.6s ease-in-out infinite; }
@keyframes zd-punch { 0%, 70%, 100% { transform: translateX(0) rotate(0); } 80% { transform: translateX(5px) rotate(-8deg); } 90% { transform: translateX(-2px) rotate(3deg); } }
@keyframes zd-beat { 0%, 60%, 100% { transform: scale(1); } 70% { transform: scale(1.12); } 80% { transform: scale(.97); } }
@media (prefers-reduced-motion: reduce) { .zd-head .zd-hic { animation: none !important; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zd-head.good { color: #ffb38a; } }
:root[data-theme="dark"] .zd-head.good { color: #ffb38a; }

/* ───── 부적 이미지 PDF 저장 (한국 부적) ───── */
.amu-pdf { margin-top: 8px; font-size: 14.5px; }
#printAmu { display: none; }
@media print {
  body.print-amu > *:not(#printAmu) { display: none !important; }
  body.print-amu #printAmu { display: block; color: #1d1a15; font-family: 'Noto Sans KR', sans-serif; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pa-page { width: 186mm; }
  .pa-head { display: flex; justify-content: space-between; font-size: 10pt; color: #5b4a33; border-bottom: 1px solid #c8b58a; padding-bottom: 2mm; }
  .pa-head b { font-family: 'Nanum Brush Script', cursive; font-size: 16pt; color: #6a4bd6; }
  #printAmu h1 { font-size: 20pt; margin: 5mm 0 4mm; }
  #printAmu h1 small { font-size: 11pt; color: #5b4a33; font-weight: 500; margin-left: 2mm; }
  .pa-main { display: grid; grid-template-columns: 78mm 1fr; gap: 8mm; align-items: start; }
  .pa-big svg, .pa-big img { width: 78mm; height: 127.5mm; display: block; }
  .pa-txt { font-size: 11pt; line-height: 1.8; }
  .pa-txt p { margin: 0 0 4mm; }
  .pa-note { font-size: 9pt; color: #5b4a33; border-top: 1px dashed #c8b58a; padding-top: 3mm; }
  .pa-cut-title { font-size: 10pt; margin: 7mm 0 3mm; color: #5b4a33; }
  .pa-cuts { display: flex; gap: 6mm; }
  .pa-cut { width: 54mm; height: 86mm; border: 1.2px dashed #8f7b58; box-sizing: border-box; padding: 3mm; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1mm; break-inside: avoid; }
  .pa-cut svg, .pa-cut img { width: 43mm; height: 70mm; display: block; }
  .pa-cut span { font-size: 8pt; color: #5b4a33; }
  .pa-wish { justify-content: flex-start; align-items: stretch; padding: 5mm; }
  .pa-wish b { font-size: 11pt; text-align: center; margin-bottom: 4mm; color: #b3261e; }
  .pa-wish i { display: block; border-bottom: 1px solid #c8b58a; height: 11mm; }
  .pa-wish span { margin-top: auto; text-align: right; }
}

/* ───── 토정비결 ───── */
.tj-pick { display: grid; gap: 6px; }
.tj-pick select { max-width: 320px; font-size: 16px; padding: 10px 12px; border: 1.5px solid var(--field-border); border-radius: 12px; background: var(--field-bg); color: var(--ink); }
.tj-hero { text-align: center; }
.tj-code { display: flex; justify-content: center; gap: 10px; margin: 6px 0 12px; }
.tj-code span { display: grid; justify-items: center; width: 64px; padding: 8px 0 6px; border: 2px solid #a52a1d; border-radius: 10px; background: #fbf1d6; color: #7a1b12; }
.tj-code b { font-size: 30px; line-height: 1.1; font-family: 'Noto Serif KR', serif; }
.tj-code small { font-size: 12px; font-weight: 700; }
.tj-title { font-size: 21px; margin: 0 0 4px; line-height: 1.45; }
.tj-sym { font-size: 26px; color: #a52a1d; vertical-align: -2px; }
.tj-theme { font-size: 18px; font-weight: 800; color: var(--seal); margin: 0 0 12px; }
.tj-verse { display: inline-block; margin: 0 auto 10px; padding: 12px 22px; border-top: 2px solid #a52a1d; border-bottom: 2px solid #a52a1d; }
.tj-verse p { margin: 0; }
.tj-verse p:first-child { font-size: 24px; letter-spacing: .18em; font-weight: 700; color: #7a1b12; }
.tj-how { text-align: left; margin-top: 8px; }
.tj-how summary { cursor: pointer; font-weight: 700; color: var(--brand); min-height: 44px; display: flex; align-items: center; justify-content: center; }
.tj-how th { white-space: nowrap; }
.tj-h { font-size: 16.5px; margin: 14px 0 4px; color: var(--seal); }
.tj-total { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 800; }
.tj-fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tj-field { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); }
.tj-fh { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.tj-field p { margin: 0; }
.tj-months { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tj-m { border: 1px solid var(--line); border-left: 5px solid var(--h3); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.tj-m.hi { border-left-color: var(--h5); } .tj-m.lo { border-left-color: var(--h1); }
.tj-mh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tj-mh b { font-size: 16px; min-width: 52px; }
.tj-mh .sbar { margin-left: auto; }
.tj-m p { margin: 6px 0 0; }
.tj-do { margin: 0; padding-left: 22px; } .tj-do li { margin: 4px 0; font-weight: 700; }
.tj-note { margin: 4px 4px 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tj-code span { background: #3a2a1c; color: #ffd9a0; border-color: #e0795f; } :root:not([data-theme="light"]) .tj-verse p:first-child, :root:not([data-theme="light"]) .tj-sym { color: #ffb38a; } :root:not([data-theme="light"]) .tj-verse { border-color: #e0795f; } }
:root[data-theme="dark"] .tj-code span { background: #3a2a1c; color: #ffd9a0; border-color: #e0795f; } :root[data-theme="dark"] .tj-verse p:first-child, :root[data-theme="dark"] .tj-sym { color: #ffb38a; } :root[data-theme="dark"] .tj-verse { border-color: #e0795f; }

/* 한국 부적 먼저 */
.amu-sub { margin: 14px 0 8px; padding-top: 12px; border-top: 1px dashed var(--line); font-weight: 800; font-size: 15px; }
.amu-item.amu-first { position: relative; border: 2px solid #c89b20; }
.amu-badge { position: absolute; top: 8px; left: 8px; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #fff3c4; color: #6b4a00; }

/* 함께 지니면 좋은 한국 부적 */
.kor-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kor-item { border: 1.5px solid #c89b20; border-radius: 14px; padding: 12px; background: var(--surface-2); display: grid; align-content: start; gap: 4px; }
.kor-item .amu-img { width: 104px; height: 104px; margin: 0 auto 4px; }
.kor-item .amu-img svg { width: 100%; height: 100%; }
.kor-item h3 { font-size: 16.5px; margin: 0; text-align: center; }
.kor-item h3 small { font-size: 13px; color: var(--seal); font-weight: 700; }
.kor-item p { margin: 0; font-size: 14.5px; }
.kor-item .amu-pdf { width: 100%; }

/* ───── 모든 PDF(인쇄) = 전통 한지 배경 (js/hanji.js) ─────
 * 쪽 여백은 0 으로 두고 html 배경에 한지를 깔아(print-color-adjust: exact) 「배경 그래픽」을 꺼도 종이 끝까지 한지가 찍힌다.
 * 여백은 body 안쪽 여백 + box-decoration-break: clone 으로 쪽마다 반복. */
@page { size: A4; margin: 0; }
@media print {
  html { background: #f4ecda var(--hanji, none) repeat !important; background-size: 384px 384px !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: transparent !important; padding: 12mm !important; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
  body::before, body::after { display: none !important; }
}

/* ───── 올해 건강운: 장기 캐릭터 (js/organs.js) ───── */
.organ.og { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; }
.og-char { display: grid; justify-items: center; text-align: center; gap: 2px; }
.og-pic { display: block; width: 104px; height: 104px; }
.og-pic svg { width: 100%; height: 100%; display: block; }
.organ.og .og-pic { animation: og-wobble 2.4s ease-in-out infinite; }
@keyframes og-wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .organ.og .og-pic { animation: none; } }
.og-nick { font-size: 14.5px; color: var(--brand); }
.og-say { position: relative; display: inline-block; margin-top: 4px; padding: 5px 10px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); font-size: 13px; font-weight: 700; line-height: 1.4; }
.og-say::before { content: ''; position: absolute; top: -7px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--line); }
.og-txt h3 { margin-top: 0; }
.og-stable { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.og-mini { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.og-mini .og-pic { width: 56px; height: 56px; flex: none; }
.og-mini b { display: block; font-size: 14.5px; color: var(--brand); }
.og-mini small { display: block; font-size: 12.5px; color: var(--muted); }
.og-mini em { display: block; font-style: normal; font-size: 13px; font-weight: 700; }
@media (max-width: 520px) { .organ.og { grid-template-columns: 1fr; } .og-txt { text-align: left; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .og-nick, :root:not([data-theme="light"]) .og-mini b { color: var(--accent); } }
:root[data-theme="dark"] .og-nick, :root[data-theme="dark"] .og-mini b { color: var(--accent); }

/* ───── 행운 패션 코디 (js/fashion.js) ───── */
.fz-g { margin-bottom: 12px; }
.fz-yy { display: flex; height: 30px; border-radius: 999px; overflow: hidden; font-size: 13.5px; font-weight: 800; margin: 4px 0 10px; border: 1px solid var(--line); }
.fz-yy span { display: grid; place-items: center; min-width: 52px; }
.fz-yy .y { background: #f6d8a8; color: #6b3d00; } .fz-yy .i { background: #33415e; color: #fff; }
.fz-stage.now { border: 2px solid var(--brand); }
.fz-stage .sec-title small { font-size: 14px; font-weight: 600; }
.fz-now { margin-left: auto; font-size: 12.5px; font-weight: 800; color: #fff; background: var(--brand); border-radius: 999px; padding: 3px 10px; }
.fz-src { font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.fz-src span { color: var(--muted); }
.fz-pal { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.fz-pal > div { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--surface-2); }
.fz-pal b { display: block; font-size: 13.5px; margin-bottom: 6px; }
.fz-pal > div > div { display: flex; flex-wrap: wrap; gap: 4px; }
.fz-sw { display: inline-grid; place-items: center; min-height: 34px; padding: 2px 10px; border-radius: 9px; font-size: 13px; font-weight: 800; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .18); }
.fz-info p { margin: 6px 0; }
.fz-looks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.fz-look { margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 10px; background: var(--surface-2); display: grid; align-content: start; gap: 6px; }
.fz-look figcaption { font-weight: 800; text-align: center; }
.fz-fig { display: grid; place-items: center; background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); border-radius: 10px; }
.fz-fig svg { width: 100%; max-width: 150px; height: auto; }
.fz-look ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.5; }
.fz-look li b { margin-right: 2px; }
.fz-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 4px; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, .25); }
@media (max-width: 640px) { .fz-looks { grid-template-columns: 1fr; } .fz-look { grid-template-columns: 110px 1fr; align-items: center; } .fz-look figcaption { grid-column: 1 / -1; text-align: left; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fz-fig { background: rgba(255, 255, 255, .08); } }
:root[data-theme="dark"] .fz-fig { background: rgba(255, 255, 255, .08); }
.fz-now { white-space: nowrap; }
@media (max-width: 640px) { .fz-pal { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fz-stage .sec-title { flex-wrap: wrap; } .fz-stage .sec-title small { flex-basis: 100%; order: 3; } }

/* ───── 운명의 짝 매칭 ───── */
.ds-box { margin: 8px 0 0; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.ds-box summary { cursor: pointer; font-weight: 800; min-height: 40px; display: flex; align-items: center; }
.ds-grp { border: 0; padding: 0; margin: 12px 0 0; }
.ds-grp legend { font-weight: 800; font-size: 14.5px; margin-bottom: 6px; }
.ds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 10px; }
.ds-vals { grid-template-columns: 1fr; }
.ds-f { display: grid; gap: 3px; font-size: 13.5px; }
.ds-vals .ds-f { grid-template-columns: 1fr 150px; align-items: center; }
.ds-f select, .ds-f input { min-height: 40px; padding: 6px 10px; border: 1.5px solid var(--field-border); border-radius: 10px; background: var(--field-bg); color: var(--ink); font-size: 15px; }
.ds-hobs { display: flex; flex-wrap: wrap; gap: 6px; }
.chk-chip { position: relative; }
.chk-chip input { position: absolute; opacity: 0; inset: 0; }
.chk-chip span { display: inline-block; padding: 7px 12px; border: 1.5px solid var(--field-border); border-radius: 999px; font-size: 14px; cursor: pointer; }
.chk-chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
.chk-chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.ds-res { text-align: left; }
.ds-score { --p: 60; width: 150px; height: 150px; margin: 6px auto 4px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--surface) 78%, transparent 79% 100%), conic-gradient(#d6456b calc(var(--p) * 1%), var(--line) 0); }
.ds-score b { font-size: 46px; line-height: 1; } .ds-score small { font-size: 14px; color: var(--muted); }
.ds-tier { text-align: center; font-size: 19px; font-weight: 800; color: var(--seal); margin: 4px 0; }
.ds-rule { text-align: center; }
.ds-notes { border: 1.5px dashed var(--seal); border-radius: 12px; padding: 8px 12px; margin: 10px 0; }
.ds-notes ul { margin: 4px 0 0; padding-left: 20px; }
.ds-res h3 { font-size: 16.5px; margin: 16px 0 4px; }
.ds-res ul { margin: 0; padding-left: 20px; } .ds-res li { margin: 3px 0; }
.ds-ai { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 12px; }
.ds-ai-body h4 { margin: 12px 0 4px; font-size: 15.5px; }
@media (max-width: 520px) { .ds-vals .ds-f { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .ds-grid:not(.ds-vals) { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ds-f select, .ds-f input { font-size: 14.5px; padding: 6px 8px; } }

/* ───── 꿈해몽 ───── */
.dm-search { background: linear-gradient(135deg, rgba(38, 40, 92, .9), rgba(76, 53, 140, .88)), var(--surface); color: #fff; border: 0; }
.dm-search .muted, .dm-search a { color: #e7defc; }
.dm-q-lab { display: block; font-size: 19px; font-weight: 800; margin-bottom: 10px; }
.dm-q-row { display: flex; gap: 8px; }
.dm-q-row input { flex: 1; min-width: 0; min-height: 48px; font-size: 17px; padding: 8px 14px; border-radius: 12px; border: 2px solid #b9a6f5; background: #fffdf8; color: #1d1a15; }
.dm-q-row .btn { white-space: nowrap; }
.dm-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 4px; scrollbar-width: thin; }
.dm-tabs a { flex: none; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 700; text-decoration: none; color: var(--ink); }
.dm-tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
/* 고전으로 읽는 내 사주 — 원국 · 대운 · 세운 · 월운 탭(버튼) */
.dm-tabs button { flex: none; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.dm-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cm-tabs { margin-top: 4px; }
.dm-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.dm-tag { padding: 8px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--brand); font-weight: 800; text-decoration: none; }
.dm-tag.sub { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.dm-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.dm-cat { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface-2); text-decoration: none; color: var(--ink); }
.dm-cat span { font-size: 28px; } .dm-cat small { color: var(--muted); }
.dm-ai-cta { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); border: 2px solid var(--brand); }
.dm-ai-cta > span:first-child { font-size: 30px; } .dm-ai-cta > span:last-child { margin-left: auto; font-size: 26px; color: var(--brand); }
.dm-ai-cta b { display: block; font-size: 17px; } .dm-ai-cta small { color: var(--muted); }
.dm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.dm-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-decoration: none; color: var(--ink); }
.dm-card:hover { border-color: var(--brand); }
.dm-ico { font-size: 24px; line-height: 1; }
.dm-cbody { display: grid; gap: 2px; }
.dm-ch { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .dm-ch b { font-size: 16.5px; }
.dm-csum { font-size: 14px; color: var(--muted); }
.dv { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.dv.big { font-size: 15px; padding: 3px 12px; vertical-align: middle; }
.dv-good { background: #fde2e2; color: #9b1c1c; } .dv-bad { background: #dbe7fb; color: #1d3f7a; } .dv-neutral { background: #ece8df; color: #4a4336; }
.dm-title { font-size: 24px; margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dm-vsub { color: var(--muted); margin: 2px 0 10px; font-size: 14px; }
.dm-detail h3, .dm-reading h3 { font-size: 16.5px; margin: 18px 0 6px; }
.dm-sits { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dm-sits li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.dm-sits p { margin: 2px 0 0; }
.dm-adv { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); }
.dm-adv p { margin: 4px 0; }
.dm-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.dm-note { margin: 4px 4px 0; }
.dm-ai-v { font-weight: 800; }
#dmStory { width: 100%; min-height: 140px; padding: 10px 12px; border: 1.5px solid var(--field-border); border-radius: 12px; background: var(--field-bg); color: var(--ink); font: inherit; resize: vertical; }
#dmCtx { width: 100%; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--field-border); border-radius: 12px; background: var(--field-bg); color: var(--ink); font: inherit; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dv-good { background: #4a1f24; color: #ffc9c9; } :root:not([data-theme="light"]) .dv-bad { background: #1d2e4d; color: #c7dafc; } :root:not([data-theme="light"]) .dv-neutral { background: #3a352c; color: #e9e1d0; } }
:root[data-theme="dark"] .dv-good { background: #4a1f24; color: #ffc9c9; } :root[data-theme="dark"] .dv-bad { background: #1d2e4d; color: #c7dafc; } :root[data-theme="dark"] .dv-neutral { background: #3a352c; color: #e9e1d0; }

/* 세계의 꿈해몽 */
.dm-world { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dm-world li { padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; background: var(--surface-2); }
.dm-world p { margin: 4px 0 0; }
.dm-wc { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; text-decoration: none; color: var(--ink); }
.dm-cultures { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.dm-culture { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); text-decoration: none; color: var(--ink); }
.dm-culture:hover { border-color: var(--brand); }
.dm-cu-ico { font-size: 30px; line-height: 1; }
.dm-culture b { display: block; font-size: 16.5px; } .dm-culture small { display: block; color: var(--brand); font-weight: 700; margin: 2px 0 4px; } .dm-culture em { font-style: normal; font-size: 14px; color: var(--muted); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dm-culture small { color: var(--accent); } }
:root[data-theme="dark"] .dm-culture small { color: var(--accent); }
.dm-search { grid-template-columns: minmax(0, 1fr); } .dm-search > * { min-width: 0; } .dm-q-row input { width: 100%; }

/* ───── 관상 보기 ───── */
.fc-grp { border: 0; padding: 0; margin: 14px 0 0; }
.fc-grp legend { font-weight: 800; margin-bottom: 6px; }
.fc-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-opts .chk-chip span { font-size: 14px; }
.fc-res h3 { font-size: 17px; margin: 18px 0 6px; color: var(--seal); }
.fc-res h4 { font-size: 15.5px; margin: 12px 0 2px; }
.fc-res p { margin: 4px 0; }
.fc-str li { font-weight: 800; margin: 4px 0; }
.fc-ask { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-weight: 700; }
.fc-drop { display: flex; align-items: center; gap: 14px; padding: 14px; border: 2px dashed var(--field-border); border-radius: 14px; background: var(--surface-2); cursor: pointer; }
.fc-drop b { display: block; font-size: 16px; } .fc-drop small { color: var(--muted); }
.fc-prev { width: 96px; height: 96px; flex: none; border-radius: 12px; background: var(--surface); display: grid; place-items: center; font-size: 44px; overflow: hidden; border: 1px solid var(--line); }
.fc-prev img { width: 100%; height: 100%; object-fit: cover; }
#fcPhotoOut:not([hidden]) { margin-top: 12px; }
.fc-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fc-drop:has(+ .fc-file:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
#fcNote { width: 100%; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--field-border); border-radius: 12px; background: var(--field-bg); color: var(--ink); font: inherit; }

/* ───── 주역 점 ───── */
#icQ, #lyQ { width: 100%; min-height: 84px; padding: 10px 12px; border: 1.5px solid var(--field-border); border-radius: 12px; background: var(--field-bg); color: var(--ink); font: inherit; resize: vertical; }
.ic-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ic-nums p { grid-column: 1 / -1; }
.ic-nums input { min-height: 46px; font-size: 18px; text-align: center; border: 1.5px solid var(--field-border); border-radius: 12px; background: var(--field-bg); color: var(--ink); }
.ic-res h3 { font-size: 17px; margin: 18px 0 6px; color: var(--seal); }
.ic-h { margin: 0; font-size: 22px; }
.ic-q { font-weight: 700; color: var(--muted); margin: 4px 0 10px; }
.ic-hexes { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.ic-hexes figure { margin: 0; display: grid; justify-items: center; gap: 2px; text-align: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); min-width: 140px; }
.ic-hexes figcaption { font-size: 13px; font-weight: 800; color: var(--muted); }
.ic-svg { width: 120px; height: auto; color: var(--ink); }
.ic-glyph { font-size: 30px; line-height: 1; font-weight: 400; }
.ic-arrow { font-size: 26px; color: var(--seal); }
.ic-guide { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ic-guide li { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.ic-how summary { cursor: pointer; font-weight: 700; color: var(--brand); min-height: 40px; display: flex; align-items: center; }
.ic-casting { text-align: center; }
.ic-build { display: grid; gap: 8px; width: 160px; margin: 8px auto; }
.ic-build i { display: block; height: 14px; border-radius: 3px; animation: ic-in .25s ease-out; }
.ic-build i.y { background: var(--ink); }
.ic-build i.n { display: flex; justify-content: space-between; } .ic-build i.n span { width: 44%; background: var(--ink); border-radius: 3px; }
@keyframes ic-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* 시초점(18변법) 안내 · 과정 표 */
.ic-guide-box > summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; color: var(--brand); }
.ic-guide-box h3 { font-size: 17px; margin: 16px 0 6px; color: var(--seal); }
.ic-guide-box ul, .ic-guide-box ol { margin: 0 0 8px; padding-left: 22px; } .ic-guide-box li { margin: 4px 0; }
.ic-yt td, .ic-yt th { font-size: 14.5px; } .ic-yt tbody th { white-space: nowrap; }
.ic-cnt { margin: 0 0 8px; font-size: 15px; color: var(--muted); } .ic-cnt b { font-size: 22px; color: var(--seal); }
@media (max-width: 520px) { .ic-hexes { flex-wrap: nowrap; gap: 6px; } .ic-hexes figure { min-width: 0; flex: 1; padding: 8px 6px; } .ic-svg { width: 92px; } .ic-hexes b { font-size: 14px; } .ic-glyph { font-size: 24px !important; } .ic-arrow { font-size: 20px; } }

/* 태어난 시간 「모름」 → 시간 찾기 안내 */
.sj-find { margin-top: 8px; padding: 10px 12px; border: 1.5px dashed var(--brand); border-radius: 12px; background: var(--accent-soft); }
.sj-find p { margin: 0 0 8px; font-size: 14px; }
.sj-back { margin: 6px 0 0; font-size: 13.5px; font-weight: 700; color: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sj-back { color: var(--accent); } }
:root[data-theme="dark"] .sj-back { color: var(--accent); }
/* 다국어: 긴 번역에도 머리글 버튼이 한 줄로 */
.join-link { white-space: nowrap; }
/* 머리글의 「🛒 상점」 — 좁은 화면에서는 아이콘만(회원가입 · 화면 모드 버튼과 한 줄에 들어가게) */
#logoutLink { cursor: pointer; font-family: inherit; line-height: inherit; } /* 크기는 .join-link 가 정함(예전 font: inherit 가 휴대폰에서 로그아웃만 크게 만들고 🌐 를 다음 줄로 밀었음) */
.top-actions > .i18n-ui { order: 99; } /* 언어 선택은 늘 맨 오른쪽 */
#cartN:not(:empty) { font-weight: 800; }
@media (max-width: 620px) { #shopLink .shop-label { display: none; } #shopLink { min-width: 40px; justify-content: center; padding-inline: 10px; } .has-shop .top-inner { flex-wrap: wrap; row-gap: 2px; } .has-shop .top-actions { margin-left: auto; } }
@media (max-width: 420px) { .top-actions { gap: 6px; } .i18n-btn { padding: 4px 8px; } .join-link { font-size: 13px; padding-inline: 10px; } }
/* 다국어 RTL(아랍어·페르시아어·히브리어): 건너뛰기 링크는 오른쪽 밖으로 */
[dir="rtl"] .skip { left: auto; right: -999px; } [dir="rtl"] .skip:focus { right: 8px; }

/* ───── 인생 전략 리포트 · 상담 전 질문 · 피드백 · 메일 질문 (2026-09-28) ───── */
.sdash { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 4px 0 14px; }
@media (max-width: 720px) { .sdash { grid-template-columns: minmax(0, 1fr); } }
.sd-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); text-align: center; min-width: 0; }
.sd-h { font-weight: 700; margin: 0 0 8px; }
.sd-donut, .sd-comp { width: 130px; height: 130px; display: block; margin: 0 auto; }
.sd-dn-k { font-size: 12px; fill: var(--muted); } .sd-dn-v { font-size: 18px; font-weight: 700; fill: var(--ink); }
.sd-leg { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; font-size: 13px; }
.sd-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.sd-chip { margin: 6px 0; padding: 8px 10px; border-radius: 10px; font-size: 14px; text-align: left; overflow-wrap: anywhere; }
.sd-chip.p { background: var(--el4-bg); } .sd-chip.s { background: var(--el3-bg); } .sd-chip.d { background: var(--accent-soft); }
.sd-c-ring { fill: var(--surface); stroke: var(--line); stroke-width: 2; } .sd-c-in { fill: none; stroke: var(--line); stroke-dasharray: 3 3; }
.sd-c-t { font-size: 11px; fill: var(--muted); font-weight: 600; } .sd-c-t.on { fill: var(--seal); font-size: 13px; font-weight: 800; }
.sd-c-nd { fill: var(--seal); } .sd-c-dot { fill: var(--ink); }
.sd-ph { margin: 6px 0 0; font-weight: 700; } .sd-ph.up { color: var(--seal); } .sd-ph.down { color: var(--el4); }
.st-lead { font-size: 16px; }
.st-h { font-size: 16px; margin: 18px 0 6px; }
.sz-list, .cg-list, .pv-list { padding-left: 18px; }
.sz-list li, .pv-list li { margin: 6px 0; }
.sz-o { font-weight: 700; color: var(--seal); margin-right: 4px; }
.cg-list li { margin: 8px 0; } .cg-list p { margin: 2px 0 0; }
.st-ol li { margin: 4px 0; }
.st-micro { border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; margin: 10px 0; }
.st-micro p { margin: 4px 0; }
.jung { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 620px) { .jung { grid-template-columns: minmax(0, 1fr); } }
.jung > div { border-radius: 12px; padding: 10px 12px; border: 1px solid var(--line); }
.jg-p { background: var(--el4-bg); } .jg-s { background: var(--el3-bg); }
.jung p { margin: 6px 0 0; } .jg-w { font-weight: 600; }
.tr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 620px) { .tr-grid { grid-template-columns: minmax(0, 1fr); } }
.tr-h { font-weight: 700; margin: 6px 0; }
ul.chk { list-style: none; padding: 0; margin: 0; } ul.chk li { margin: 4px 0; } ul.chk label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; } ul.chk input { margin-top: 4px; flex: none; width: 18px; height: 18px; }
.pv-c { display: inline-block; font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-right: 4px; color: var(--muted); }
.st-today .st-micro-1 { border-left: 4px solid var(--accent); padding-left: 10px; }
.intake, .st-mini { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 10px 0; background: var(--surface-2); }
.intake > summary, .st-mini > summary, .askmail > summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.ik-row { margin: 10px 0 0; }
.ik-q { display: block; font-weight: 600; margin: 0 0 6px; }
.ik-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ik-chip { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; min-height: 40px; cursor: pointer; color: var(--ink); font: inherit; font-size: 14px; }
.ik-chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 700; }
.ik-row input[type=text], .ik-row input[type=email], .ik-row select, .ik-row textarea, .fb textarea, .fb-nick { width: 100%; box-sizing: border-box; border: 1.5px solid var(--field-border, var(--line)); background: var(--field-bg, var(--surface)); color: var(--ink); border-radius: 10px; padding: 10px 12px; font: inherit; min-width: 0; }
.st-mini-body { margin-top: 8px; }
.five-lens { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line); }
.five-lens p { margin: 6px 0; } .fl-h { font-weight: 700; }
.tjung { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--el3-bg); }
.tjung h3 { margin: 0 0 6px; font-size: 16px; }
.fb h3, .rv h3 { margin: 0 0 6px; }
.fb-stars { display: flex; align-items: center; gap: 2px; margin: 6px 0 8px; flex-wrap: wrap; }
.fb-stars button { font-size: 30px; line-height: 1; background: none; border: 0; color: var(--star-off, #c9bfa9); cursor: pointer; min-width: 44px; min-height: 44px; }
.fb-stars button.on { color: var(--star-on, #d9a300); }
.fb-sv { margin-left: 6px; }
.fb-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; } .fb-nick { flex: 1 1 auto; } .fb-cnt { flex: none; }
.fb-msg:empty, .am-msg:empty { display: none; }
.rv-item { margin: 8px 0; padding: 10px 12px; border-left: 4px solid var(--accent); background: var(--surface-2); border-radius: 8px; }
.rv-item p { margin: 2px 0; } .rv-st { color: var(--star-on, #b37a00); letter-spacing: 1px; } .rv-avg { margin: 0 0 6px; }
.am-privacy { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; background: var(--surface-2); }
.am-privacy ul { margin: 4px 0 0; padding-left: 18px; }

/* ───── 신년운세 (#/newyear) ───── */
.ny-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ny-top select { min-height: 44px; border: 1.5px solid var(--field-border, var(--line)); background: var(--field-bg, var(--surface)); color: var(--ink); border-radius: 10px; padding: 6px 10px; font: inherit; }
.ny-title { font-size: 26px; margin: 4px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ny-title span { font-size: 18px; color: var(--muted); }
.ny-theme { font-weight: 700; margin: 4px 0 10px; }
.ny-months { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.ny-m { padding: 7px 10px; border-radius: 8px; background: var(--surface-2); border-left: 4px solid var(--h3); font-size: 14.5px; }
.ny-m.hi { border-left-color: var(--h5); } .ny-m.lo { border-left-color: var(--h1); }
.ny-lines i, .ny-wish .ny-lines i { display: block; border-bottom: 1px solid var(--line); height: 34px; }
@media print {
  body.print-ny .top, body.print-ny #menu, body.print-ny #pageHead, body.print-ny .foot, body.print-ny .skip, body.print-ny .i18n-help,
  body.print-ny .fb, body.print-ny .ny-top, body.print-ny .btn_area, body.print-ny .amu-pdf, body.print-ny #confirmBox, body.print-ny .bg-hanja { display: none !important; }
  body.print-ny { color: #1d1a15; font-size: 10.5pt; }
  body.print-ny .card { background: rgba(255, 252, 244, .72) !important; box-shadow: none !important; border: 1px solid #c8b58a !important; break-inside: auto; margin-bottom: 5mm; }
  body.print-ny .tj-field, body.print-ny .ny-m, body.print-ny .sz-list li, body.print-ny tr { break-inside: avoid; }
  body.print-ny .ny-hero::before { content: '운명치유연구소 · 신년운세'; display: block; font-family: 'Nanum Brush Script', cursive; font-size: 18pt; color: #6a4bd6; margin-bottom: 2mm; }
  body.print-ny .scroll-x { overflow: visible !important; }
  body.print-ny .ny-lines i { height: 12mm; border-bottom-color: #c8b58a; }
}

/* ───── 맞춤 개운 부적 (js/talisman.js) ───── */
a.tl-entry { display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); border: 2px solid #c89b20; }
.tl-entry-img svg { width: 54px; height: auto; display: block; }
.tl-entry-txt { display: grid; gap: 2px; } .tl-entry-txt b { font-size: 18px; } .tl-entry-txt span { font-size: 14.5px; color: var(--muted); }
.tl-entry-go { font-size: 30px; font-weight: 700; color: var(--accent); }
.tl-res h3, .tl-amu h3 { font-size: 17px; margin: 18px 0 8px; color: var(--seal); }
.tl-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tl-flow li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.tl-flow li > b { flex: 0 0 auto; min-width: 5.6em; }
.tl-flow .sbar { margin-left: auto; }
.tl-row { display: grid; grid-template-columns: minmax(150px, 210px) 1fr; gap: 18px; align-items: start; }
.tl-img svg { width: 100%; height: auto; display: block; border-radius: 6px; box-shadow: 0 6px 18px rgba(60, 40, 10, .28); }
.tl-txt h3 { margin-top: 10px; } .tl-txt p { margin: 0 0 8px; }
.tl-els { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-prompt { margin: 0; padding: 12px 14px; border: 1.5px solid var(--field-border); border-radius: 12px; background: var(--surface-2); color: var(--ink); font: 500 14.5px/1.65 ui-monospace, 'Cascadia Mono', Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.tl-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 0; }
.ds-ai-body .tl-prompt { margin: 8px 0 0; }
@media (max-width: 560px) { .tl-row { grid-template-columns: 1fr; } .tl-img { width: min(62%, 220px); margin: 0 auto; } a.tl-entry { grid-template-columns: 44px 1fr auto; gap: 10px; } .tl-entry-img svg { width: 44px; } .tl-entry-txt b { font-size: 16.5px; } .tl-flow .sbar { margin-left: 0; } }
/* 운세 화면 부적 카드의 맨 앞: 맞춤 부적 */
.amu-mine { padding: 12px; border: 2px solid #c89b20; border-radius: 16px; background: var(--surface-2); }
.amu-mine a.amu-img { display: block; } .amu-mine .amu-img svg { border-radius: 5px; box-shadow: 0 4px 12px rgba(60, 40, 10, .25); }
.amu-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; } .amu-acts .btn { margin-top: 4px; text-decoration: none; display: inline-flex; align-items: center; }
.amu a.btn.primary { color: #fff; }

/* 주역 점: 동전점 — 늘어놓은 동전 여섯 닢(위 효부터) */
.ic-methods { flex-wrap: wrap; }
.ic-coins { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 6px; max-width: 420px; }
.ic-coins li { display: grid; grid-template-columns: 3.2em 34px auto 1fr; align-items: center; gap: 10px; font-size: 14.5px; }
.ic-coins i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #8a6a2a; background: #e8c97a; color: #4a3608; font: 700 15px/1 'Noto Serif KR', serif; font-style: normal; }
.ic-coins li.n i { background: #cdb98f; color: #6b5a36; }
.ic-coins li.mk i { border-color: #c62828; box-shadow: 0 0 0 3px rgba(198, 40, 40, .25); }
.ic-coins em { font-style: normal; font-weight: 700; color: #c62828; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ic-coins em { color: #ff8a80; } }
:root[data-theme="dark"] .ic-coins em { color: #ff8a80; }

/* 주역 점: 체용 · 오행 생극 */
.ic-ty th { white-space: nowrap; }
.ic-grade { display: inline-block; padding: 1px 10px; border-radius: 999px; font-weight: 800; font-size: 14px; background: var(--surface-2); border: 1.5px solid var(--line); }
.ic-grade.g5 { background: #fde0dc; border-color: #cc2f2f; color: #7a1414; } .ic-grade.g4 { background: #fde9dd; border-color: #e0855a; color: #6a2a0c; }
.ic-grade.g3 { background: #fbf0c8; border-color: #c9a227; color: #4d3b05; } .ic-grade.g2 { background: #e3ecfb; border-color: #7f9fdb; color: #1b3568; } .ic-grade.g1 { background: #dbe6fb; border-color: #3f6fd0; color: #12295c; }

/* 손금 보기(관상 보기 안의 탭) */
.fc-kind { margin-bottom: 6px; } .fc-kind a { font-size: 16.5px; }
.pl-fig { margin: 8px 0 4px; display: grid; grid-template-columns: minmax(150px, 210px) 1fr; gap: 14px; align-items: center; }
.pl-svg { width: 100%; height: auto; display: block; }
.pl-fig figcaption { display: grid; gap: 6px; font-size: 15px; }
.pl-fig figcaption span { display: flex; align-items: center; gap: 8px; }
.pl-fig figcaption i { width: 22px; height: 5px; border-radius: 3px; flex: none; }
.pl-tips { margin: 6px 0 12px; padding-left: 20px; font-size: 15px; } .pl-tips li { margin: 2px 0; }
@media (max-width: 480px) { .pl-fig { grid-template-columns: 1fr; } .pl-svg { max-width: 210px; margin: 0 auto; } .pl-fig figcaption { grid-template-columns: 1fr 1fr; } }

/* 전통 부적 54종(맞춤 부적 화면) — 소원별 구성 단추 · 세로 부적 그림 */
.bj-sets button { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; border-radius: 10px; }
.bj-sets button[aria-pressed="true"] span { background: var(--brand); color: #fff; font-weight: 700; }
.bj-sets button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.bj-desc { margin: 0 0 12px; }
.bj-item .amu-img { width: 120px; height: 196px; }
.bj-item .amu-img img { width: 100%; height: 100%; display: block; border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.bj-item .bj-guard { margin: 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--seal); }

/* 달력 일진(60갑자) — 날짜 아래 작은 글자, 천간 오행 색 */
.cell .gz, .wcol .gz { font-size: 10.5px; font-weight: 700; line-height: 1.15; letter-spacing: .02em; white-space: nowrap; }
.wcol .gz { font-size: 12px; }
/* 달력 칸은 점수 색 바탕이라 칸 글자색 그대로(대비 유지), 주간 막대는 종이 바탕이라 천간 오행 색 */
.cell .gz { color: inherit; opacity: .95; }
.wcol .gz.el0 { color: #17694a; } .wcol .gz.el1 { color: #b0281c; } .wcol .gz.el2 { color: #8a5a0c; } .wcol .gz.el3 { color: #4f5864; } .wcol .gz.el4 { color: #1f3f86; }
:root[data-theme="dark"] .wcol .gz.el0 { color: #6fd3a5; } :root[data-theme="dark"] .wcol .gz.el1 { color: #ff8f80; } :root[data-theme="dark"] .wcol .gz.el2 { color: #f0c35a; } :root[data-theme="dark"] .wcol .gz.el3 { color: #c9d0da; } :root[data-theme="dark"] .wcol .gz.el4 { color: #8fb4ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wcol .gz.el0 { color: #6fd3a5; } :root:not([data-theme="light"]) .wcol .gz.el1 { color: #ff8f80; } :root:not([data-theme="light"]) .wcol .gz.el2 { color: #f0c35a; } :root:not([data-theme="light"]) .wcol .gz.el3 { color: #c9d0da; } :root:not([data-theme="light"]) .wcol .gz.el4 { color: #8fb4ff; } }
@media (max-width: 620px) { .cell .gz { font-size: 9.5px; letter-spacing: 0; } .cell { min-height: 72px; } }
.gzd { font-weight: 700; letter-spacing: .03em; }

/* 상단 메뉴 배경 배너(2026-10-04, 사용자가 준 봉황 · 健康長壽 그림 img/menu-banner.webp — 2026-10-31 투명 바탕 1500×500 새 그림으로 교체, 원본 assets-src/menu-banner2-original.webp)
   그림이 화려해 아이콘 · 글자가 묻혔다(사용자 제보) → 메뉴 항목마다 한지색 타일(금테) 위에 아이콘 + 진한 글자, 화살표는 붉은 원 + 흰 꺾쇠 */
.menu_area { background: url("../img/menu-banner.webp") center / cover no-repeat transparent; border: 1.5px solid #c89b20; box-shadow: 0 6px 18px rgba(90, 40, 10, .22); position: relative; }
.menu_area::before { content: ""; position: absolute; inset: 0; background: none; pointer-events: none; }
.menu_area > * { position: relative; }
.menu_tit { width: fit-content; padding: 4px 16px 4px 6px; border-radius: 999px; background: #fff8e6; color: #3a1405; border: 1.5px solid #c89b20; box-shadow: 0 2px 6px rgba(90, 40, 10, .25); font-weight: 800; }
.menu_li a { gap: 5px; padding: 7px 4px 8px; border: 1.5px solid #d6ad4a; border-radius: 16px; background: rgba(255, 250, 236, .94); box-shadow: 0 2px 8px rgba(90, 30, 10, .28); color: #2a1206; font-weight: 800; transition: transform .15s, box-shadow .15s; }
.menu_li a span { padding: 0; background: none; color: #2a1206; text-shadow: none; }
.menu_li a img { max-width: 84px; border-radius: 25%; box-shadow: 0 3px 8px rgba(60, 30, 90, .22); outline: none; } /* 아이콘 = tools/make-menu-icons.mjs (파스텔 스퀴클 + 3D 클레이) */
.menu_li a:hover { border-color: #b3261e; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(120, 30, 10, .32); }
.menu_li a:hover img { transform: none; }
.menu_li li.on a { background: #fff3d6; border: 2.5px solid #b3261e; box-shadow: 0 0 0 3px rgba(179, 38, 30, .22), 0 2px 8px rgba(90, 30, 10, .28); }
.menu_li li.on a span { color: #9b1c12; }
.menu_li a:focus-visible { outline: 3px solid #b3261e; outline-offset: 2px; }
.menu_num { color: #2a1206; }
.menu_num > span { padding: 2px 12px; border-radius: 999px; background: #fff8e6; border: 1px solid #c89b20; font-weight: 700; }
/* 페이지 넘김 화살표: 붉은 원 + 금테 + 흰 꺾쇠(어떤 배경에서도 또렷하게), 처음 ↔ 끝은 이어짐 */
.menu_nav { width: 46px; height: 46px; border-radius: 50%; background: #a8170f; border: 2.5px solid #f3d36b; box-shadow: 0 3px 10px rgba(60, 10, 0, .45); color: #fff; display: grid; place-items: center; }
.menu_nav svg { width: 24px; height: 24px; display: block; }
.menu_nav:hover { background: #c81d12; }
.menu_nav.dim { opacity: 1; }
@media (max-width: 620px) {
  .menu_nav { width: 36px; height: 36px; border-width: 2px; }
  .menu_nav svg { width: 19px; height: 19px; }
  .menu_li a { padding: 6px 2px 7px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) { .menu_li a { transition: none; } .menu_li a:hover { transform: none; } }

/* 신년운세: 월별 상세 · 분야별 상세 · 5년 대운 흐름 */
.ny-mds { display: grid; gap: 8px; margin-top: 12px; }
/* 유료 신년운세의 잠긴 칸 */
.ny-lock { border: 1px dashed var(--line); border-left: 4px solid #a3150c; border-radius: 12px; background: var(--surface-2); padding: 10px 14px; margin-top: 12px; }
.ny-lock p { margin: 4px 0; }
.ny-md { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); padding: 0 12px; }
.ny-md > summary { cursor: pointer; min-height: 46px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 0; }
.ny-md.hi { border-left: 5px solid var(--h5); } .ny-md.lo { border-left: 5px solid var(--h1); } .ny-md.mid { border-left: 5px solid #d9b43a; }
.ny-md[open] { padding-bottom: 10px; }
.ny-mh { font-weight: 700; }
.ny-mf { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 6px; }
.ny-mf li { display: grid; grid-template-columns: 6.2em auto 1fr; gap: 4px 10px; align-items: center; font-size: 15px; }
.ny-days .ny-day { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; }
.ny-note { background: var(--accent-soft); border-radius: 8px; padding: 6px 10px; margin: 6px 0; }
.ny-5c { margin: 6px 0 10px; } .ny-5c svg { width: 100%; max-width: 620px; height: auto; display: block; margin: 0 auto; }
.ny-5c line.g { stroke: var(--line); stroke-width: 1; } .ny-5c line.g.mid { stroke-dasharray: 5 4; }
.ny-5c text { font-size: 15px; fill: var(--muted); text-anchor: middle; } .ny-5c text.yl { text-anchor: end; } .ny-5c text.xl { font-weight: 800; fill: var(--ink); }
.ny-5c polyline { fill: none; stroke-width: 3; stroke-linejoin: round; } .ny-5c polyline.se { stroke: var(--accent); } .ny-5c polyline.du { stroke: var(--seal); stroke-dasharray: 8 5; }
.ny-5c circle.se { fill: var(--accent); } .ny-5c circle.du { fill: var(--seal); }
.ny-5c figcaption { display: flex; gap: 16px; justify-content: center; font-size: 14px; color: var(--muted); }
.ny-5c .lg::before { content: ""; display: inline-block; width: 20px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.ny-5c .lg.se::before { background: var(--accent); } .ny-5c .lg.du::before { background: var(--seal); }
.ny-5ys { display: grid; gap: 10px; margin-top: 12px; }
.ny-5y { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--surface-2); }
.ny-5y.now { border: 2px solid var(--accent); }
.ny-5y p { margin: 6px 0; } .ny-5h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 16.5px; }
@media (max-width: 520px) { .ny-mf li { grid-template-columns: 1fr auto; } .ny-mf li > span:last-child { grid-column: 1 / -1; } }
.ny-5t td, .ny-5t th { white-space: nowrap; } .ny-5t td small { color: var(--muted); }
.ny-5t .sbar { width: 96px; }

/* ───── 메뉴 설명 말풍선 (app.js buildMenu 의 #menuTipBox, 마우스를 올리면) ───── */
.menu_tipbox { position: fixed; z-index: 1000; max-width: min(290px, calc(100vw - 16px)); padding: 9px 13px; border-radius: 12px; background: #2a1206; color: #fff6e0; font-size: 13.5px; line-height: 1.55; font-weight: 500; box-shadow: 0 8px 22px rgba(40, 15, 5, .35); border: 1px solid #d6ad4a; pointer-events: none; word-break: keep-all; overflow-wrap: break-word; animation: mtip .16s ease-out; }
.menu_tipbox[hidden] { display: none; }
.menu_tipbox::before { content: ""; position: absolute; left: var(--ax, 50%); top: -7px; width: 12px; height: 12px; margin-left: -6px; background: #2a1206; border-left: 1px solid #d6ad4a; border-top: 1px solid #d6ad4a; transform: rotate(45deg); }
.menu_tipbox.up::before { top: auto; bottom: -7px; transform: rotate(225deg); }
@keyframes mtip { from { opacity: 0; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .menu_tipbox { animation: none; } }

/* ───── 풍수 인테리어 (app.js renderFengshui) ───── */
.fs-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.fs-chips label { position: relative; }
.fs-chips input { position: absolute; opacity: 0; inset: 0; }
.fs-chips span { display: inline-block; padding: 7px 14px; border: 1.5px solid var(--field-border, var(--line)); border-radius: 999px; background: var(--surface-2); font-weight: 600; cursor: pointer; }
.fs-chips input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.fs-chips input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.fs-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 14px; }
.fs-help { margin: 0 0 14px; } .fs-help summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.fs-grid, .fs-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 6px 0 14px; }
.fs-cell { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.fs-cell.c { background: var(--accent-soft); }
.fs-cell select { width: 100%; min-width: 0; font-size: 14px; padding: 6px 4px; }
.fs-cd { font-weight: 700; font-size: 14px; } .fs-cd small { font-weight: 500; color: var(--muted); }
.fs-pb { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 0 0 8px; background: var(--surface-2); }
.fs-pb summary { cursor: pointer; font-weight: 700; }
.fs-q { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; line-height: 1.5; }
.fs-q input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.fs-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.fs-need { display: grid; gap: 6px; margin: 8px 0; }
.fs-need-row { display: grid; grid-template-columns: 76px 1fr 44px; gap: 8px; align-items: center; }
.fs-need-k { font-weight: 700; background: none !important; }
.fs-need-bar { position: relative; height: 14px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); }
.fs-need-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--muted); opacity: .5; }
.fs-need-bar i { position: absolute; top: 0; bottom: 0; border-radius: 7px; }
.fs-need-bar i.p { background: var(--h5, #d9483b); } .fs-need-bar i.m { background: var(--h1, #3a6fd8); }
.fs-need-v { font-variant-numeric: tabular-nums; text-align: right; font-weight: 700; }
.fs-mc { display: flex; flex-direction: column; gap: 4px; min-height: 96px; padding: 8px; border: 1px solid var(--line); border-top-width: 5px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.fs-mc.e0 { border-top-color: #2e8b57; } .fs-mc.e1 { border-top-color: #d32f2f; } .fs-mc.e2 { border-top-color: #d9a93a; } .fs-mc.e3 { border-top-color: #9aa3ad; } .fs-mc.e4 { border-top-color: #31456e; }
.fs-mc b { font-size: 14.5px; }
.fs-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; }
.fs-t { font-size: 11.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; line-height: 1.5; }
.fs-t.g { background: #fbe7a8; color: #5a3d00; } .fs-t.r { background: var(--surface); color: var(--muted); border: 1px dashed var(--line); }
.fs-t.y { background: #ffd9de; color: #7a1020; } .fs-t.a { background: #dfe7f7; color: #1d3264; }
.fs-rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.fs-room { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface-2); }
.fs-room h3 { margin: 0 0 6px; font-size: 17px; }
.fs-room ul { margin: 0; padding: 0; list-style: none; }
.fs-it { padding: 8px 0; border-top: 1px dashed var(--line); } .fs-it:first-child { border-top: 0; }
.fs-it p { margin: 0; } .fs-it.keep p:first-child { color: var(--ink); }
.fs-why { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px !important; font-size: 12.5px; }
.fs-cost { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); }
.fs-cost.c0 { background: #d8f2e1; color: #11502b; border-color: #9fd8b3; } .fs-cost.c1 { background: #fdf0c8; color: #5a3d00; border-color: #e8cf7d; } .fs-cost.c2 { background: #f7dcd8; color: #6b1a12; border-color: #e0a59c; } .fs-cost.r { background: var(--surface); color: var(--muted); }
.fs-week { list-style: none; margin: 0; padding: 0; }
.fs-week li { padding: 6px 0; } .fs-week label { display: flex; gap: 10px; align-items: flex-start; line-height: 1.55; }
.fs-week input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.fs-week input:checked + span { text-decoration: line-through; color: var(--muted); }
.fs-more summary { cursor: pointer; font-weight: 700; }
@media (max-width: 480px) { .fs-mc { min-height: 84px; padding: 6px; font-size: 12.5px; } .fs-mc b { font-size: 13px; } .fs-cell { padding: 6px; } .fs-cell select { font-size: 13px; } .fs-need-row { grid-template-columns: 64px 1fr 38px; } }
.fs-fam { display: grid; gap: 6px; margin: 4px 0 8px; }
.fs-fam-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; align-items: center; padding: 4px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.fs-fam-row select { min-width: 0; font-size: 14px; padding: 6px; }
.fs-daily { margin: 6px 0 10px; padding-left: 20px; } .fs-daily li { margin: 4px 0; }
.fs-asks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.fs-asks .chip { cursor: pointer; border: 1px solid var(--line); font: inherit; font-size: 13.5px; }
.fs-ai textarea { width: 100%; box-sizing: border-box; }
.fs-aiq { margin: 14px 0 6px; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); font-weight: 600; }
.fs-icsopt { display: grid; gap: 2px; margin: 6px 0; }
@media (max-width: 480px) { .fs-fam-row { grid-template-columns: 1fr; } }
@media print { body.print-ny .fs-ai, body.print-ny .fs-ics { display: none !important; } }

/* ───── 세계 풍수 백과 (app.js renderFsworld) ───── */
.fw-form input#fwT { width: 100%; box-sizing: border-box; }
.fw-form textarea { width: 100%; box-sizing: border-box; }
.fw-ex, .fw-hist .chip { cursor: pointer; border: 1px solid var(--line); font: inherit; font-size: 13px; margin: 2px 0; }
.fw-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fw-schools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 14px; }
.fw-s p { margin: 0 0 8px; line-height: 1.75; }
.fw-s.hy { border-top: 4px solid #2e8b57; } .fw-s.ee { border-top: 4px solid #b3261e; } .fw-s.we { border-top: 4px solid #3f6fd8; }
.fw-grade { display: inline-block; font-weight: 800; font-size: 13.5px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); }
.fw-grade.g5 { background: #fbe7a8; color: #5a3d00; } .fw-grade.g4 { background: #d8f2e1; color: #11502b; } .fw-grade.g3 { background: var(--surface-2); color: var(--ink); } .fw-grade.g2 { background: #dfe7f7; color: #1d3264; } .fw-grade.g0 { background: var(--surface-2); color: var(--muted); }
.fw-remedy { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.fw-remedy b { display: block; margin-bottom: 4px; }
.fw-lit th { min-width: 7em; }
.fw-json summary { cursor: pointer; font-weight: 700; }
.fw-json pre { max-height: 420px; overflow: auto; padding: 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }

/* ───── 건강 · 재물 경고 리포트 (js/guard.js · app.js guardCardHTML) ───── */
.gd-card { border: 2px solid #c62828; }
.gd-lead { font-weight: 600; }
.gd-h { margin: 16px 0 8px; font-size: 16.5px; }
.gd-it { padding: 10px 12px; margin: 0 0 8px; border-radius: 12px; border-left: 6px solid; background: var(--surface-2); }
.gd-it p { margin: 0; line-height: 1.7; }
.gd-it .gd-t { font-weight: 800; margin-bottom: 4px; }
.gd-it.lv-danger { border-left-color: #c62828; background: color-mix(in srgb, #c62828 9%, var(--surface-2)); }
.gd-it.lv-danger .gd-t { color: #b71c1c; }
.gd-it.lv-warn { border-left-color: #e08a00; background: color-mix(in srgb, #e08a00 9%, var(--surface-2)); }
.gd-it.lv-warn .gd-t { color: #8a4b00; }
.gd-it.lv-info { border-left-color: #2e7d32; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gd-it.lv-danger .gd-t { color: #ff8a80; } :root:not([data-theme="light"]) .gd-it.lv-warn .gd-t { color: #ffcc80; } }
:root[data-theme="dark"] .gd-it.lv-danger .gd-t { color: #ff8a80; } :root[data-theme="dark"] .gd-it.lv-warn .gd-t { color: #ffcc80; }
.gd-foot { margin: 12px 0 0; }

/* 주역 공부: 64괘 원문 · 한글음(ruby) · 글자 풀이 */
.ich-search { display: grid; gap: 4px; margin: 14px 0 4px; font-weight: 700; font-size: 14px; }
.ich-search input { min-height: 44px; font-size: 16px; padding: 0 12px; border: 1.5px solid var(--field-border); border-radius: 12px; background: var(--field-bg, var(--surface)); color: var(--ink); }
.ich-part { font-size: 17px; margin: 18px 0 8px; color: var(--seal); } .ich-part span { font-size: 13px; color: var(--muted); font-weight: 600; }
.ich-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ich-cell { display: grid; justify-items: center; gap: 1px; padding: 8px 4px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; text-align: center; }
.ich-cell:hover, .ich-cell:focus-visible { border-color: var(--brand); }
.ich-cell[hidden] { display: none; }
.ich-g { font-size: 30px; line-height: 1.1; font-weight: 400; }
.ich-no { font-size: 12px; color: var(--muted); font-weight: 700; }
.ich-nm { font-size: 14px; font-weight: 700; word-break: keep-all; }
.ich-hz { font-size: 13px; color: var(--muted); }
.ich-head { display: flex; gap: 14px; align-items: center; }
.ich-head figure { margin: 0; flex: none; }
.ich-head .ic-svg { width: 96px; }
.ich-part-tag { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.ich-title { margin: 2px 0 4px; font-size: 22px; } .ich-big { font-size: 30px; font-weight: 400; }
.ich-note { margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.ich-tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 12px 0 6px; }
.ich-tools label { display: flex; gap: 6px; align-items: center; min-height: 40px; font-weight: 700; }
.ich-tools input { width: 20px; height: 20px; }
.ich-wrap h3 { font-size: 17px; margin: 18px 0 6px; color: var(--seal); }
.ich-pass { padding: 10px 12px; margin: 0 0 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.ich-pass.mv { border: 2px solid #c62828; }
.ich-lab { margin: 0; font-size: 14px; color: var(--muted); }
.ich-mv { font-style: normal; font-size: 12.5px; font-weight: 800; color: #fff; background: #b42318; padding: 1px 8px; border-radius: 999px; }
.ich-han { margin: 4px 0 2px; font-size: 26px; line-height: 2.15; letter-spacing: .02em; word-break: break-all; }
.ich-c { cursor: pointer; border-radius: 6px; padding: 0 1px; ruby-position: over; }
.ich-c:hover { background: var(--surface-2); }
.ich-c:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.ich-c rt { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: 0; }
.ich-p { color: var(--muted); }
.ich-read { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--seal); }
.ich-kr { margin: 0; line-height: 1.75; }
.ich-wrap.no-yin .ich-c rt { visibility: hidden; } .ich-wrap.no-yin .ich-read { display: none; }
.ich-wrap.no-kr .ich-kr { display: none; }
.ich-gloss { margin: 16px 0 0; } .ich-gloss summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; gap: 6px; color: var(--brand); }
.ich-glist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ich-glist li { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.ich-glist b { font-size: 22px; font-weight: 500; line-height: 1; }
.ich-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 18px 0 0; }
.ich-nav .btn { min-width: 0; text-align: center; padding-left: 6px; padding-right: 6px; }
.ich-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.ich-tip { position: fixed; z-index: 60; display: flex; gap: 10px; align-items: center; max-width: min(320px, calc(100vw - 16px)); padding: 8px 14px; border-radius: 12px; background: #2a1206; color: #fff8e8; border: 1.5px solid #d6ad4a; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); font-size: 15px; pointer-events: none; }
.ich-tip b { font-size: 28px; font-weight: 500; line-height: 1; }
.ich-tip[hidden] { display: none; }
@media (max-width: 520px) { .ich-han { font-size: 22px; } .ich-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); } .ich-g { font-size: 26px; } .ich-head .ic-svg { width: 76px; } .ich-title { font-size: 19px; } }

/* 육효점: 사주삼전 · 동전 세 닢 · 효 쌓기 · 납갑 괘상 · 해석 탭 */
.ly-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ly-topics label { position: relative; display: grid; gap: 1px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.ly-topics label:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--accent-soft); }
.ly-topics input { position: absolute; opacity: 0; pointer-events: none; }
.ly-topics label:has(input:focus-visible) { outline: 2px solid var(--brand); }
.ly-topics span { font-weight: 700; font-size: 14.5px; } .ly-topics small { font-size: 12px; color: var(--muted); }
.ly-h3 { font-size: 16px; margin: 16px 0 6px; color: var(--seal); }
.ly-when { display: grid; gap: 4px; font-weight: 700; font-size: 14px; }
.ly-when input, .ly-manual select { min-height: 44px; font-size: 16px; padding: 0 10px; border: 1.5px solid var(--field-border); border-radius: 12px; background: var(--field-bg, var(--surface)); color: var(--ink); max-width: 100%; }
.ly-chk { display: flex; gap: 8px; align-items: center; min-height: 40px; margin-top: 6px; font-weight: 700; } .ly-chk input { width: 20px; height: 20px; }
.ly-manual { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0 8px; }
.ly-manual label { display: grid; gap: 2px; font-size: 13px; font-weight: 700; } .ly-manual select { width: 100%; }
.ly-manual[hidden] { display: none; }
.ly-pil { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ly-pil li { display: grid; justify-items: center; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-align: center; }
.ly-pil span { font-size: 12px; color: var(--muted); font-weight: 700; } .ly-pil b { font-size: 22px; line-height: 1.2; } .ly-pil small { font-size: 12px; color: var(--muted); }
.ly-cnt { margin-left: auto; font-size: 15px; color: var(--muted); }
.ly-coins { display: flex; justify-content: center; gap: 18px; margin: 10px 0 4px; perspective: 600px; }
.ly-coin { position: relative; width: 64px; height: 64px; transform-style: preserve-3d; transition: transform .35s; }
.ly-coin span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; backface-visibility: hidden; font-weight: 800; border: 3px solid #8a6a2a; box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .25), 0 3px 8px rgba(0, 0, 0, .25); }
.ly-cf { background: radial-gradient(circle at 35% 30%, #fbe7a1, #d4a83a 60%, #9c7420); color: #4a3208; font-size: 15px; letter-spacing: -.02em; }
.ly-cb { background: radial-gradient(circle at 35% 30%, #e9d6a8, #b58f4a 60%, #7d5f28); color: #4a3208; font-size: 24px; transform: rotateY(180deg); }
.ly-coin.t { transform: rotateY(180deg); }
.ly-coin.spin { animation: ly-flip .9s cubic-bezier(.3, .7, .4, 1); }
@keyframes ly-flip { 0% { transform: translateY(0) rotateY(0); } 45% { transform: translateY(-46px) rotateY(900deg); } 100% { transform: translateY(0) rotateY(1800deg); } }
.ly-last { text-align: center; margin: 6px 0 8px; font-size: 15px; }
.ly-stack { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 7px; max-width: 320px; }
.ly-stack li { display: grid; grid-template-columns: 3.2em 1fr 4.6em; align-items: center; gap: 10px; font-size: 14px; }
.ly-stack li:not(.empty) i { animation: ic-in .3s ease-out; }
.ly-stack i { display: block; height: 14px; border-radius: 3px; }
.ly-stack li.empty i { border: 1.5px dashed var(--line); height: 12px; }
.ly-stack i.y { background: var(--ink); } .ly-stack i.n { display: flex; justify-content: space-between; } .ly-stack i.n b { width: 44%; background: var(--ink); border-radius: 3px; }
.ly-stack li.mv i.y, .ly-stack li.mv i.n b { background: #c62828; }
.ly-stack li.mv em { color: #b42318; font-weight: 800; }
.ly-stack em { font-style: normal; font-size: 13px; }
.ly-pos { font-weight: 700; color: var(--muted); }
.ly-btns { flex-wrap: wrap; gap: 8px; }
.ly-chart .ic-hexes small { font-size: 12.5px; color: var(--muted); max-width: 150px; }
.ly-legend { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) 46px 1.6em 14px 46px minmax(0, 1fr); gap: 6px; margin: 12px 0 4px; padding: 0 8px; font-size: 11.5px; text-align: center; }
.ly-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ly-row { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) 46px 1.6em 14px 46px minmax(0, 1fr); gap: 6px; align-items: center; padding: 7px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 13.5px; }
.ly-rows.nomv .ly-row, .ly-chart:has(.ly-rows.nomv) .ly-legend { grid-template-columns: 2.6em minmax(0, 1fr) 46px 1.6em; }
.ly-row.mv { border-color: #c62828; }
.ly-row.ly-yong { box-shadow: 0 0 0 2px #d4a83a inset; }
.ly-beast { font-size: 12.5px; color: var(--muted); font-weight: 700; text-align: center; cursor: help; }
.ly-gz { display: grid; line-height: 1.25; text-align: center; } .ly-rel { font-size: 12px; color: var(--muted); font-weight: 700; } .ly-gz span[translate] { font-size: 15px; font-weight: 700; }
.ly-bar { display: block; height: 11px; border-radius: 3px; } .ly-bar.y { background: var(--ink); } .ly-bar.n { display: flex; justify-content: space-between; } .ly-bar.n b { width: 42%; background: var(--ink); border-radius: 3px; }
.ly-bar.mv.y, .ly-bar.mv.n b { background: #c62828; }
.ly-sy b { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; font-size: 12px; color: #fff; } .ly-sy .shi { background: #7a2e9e; } .ly-sy .ying { background: #2d6a9f; }
.ly-ar { color: #c62828; font-weight: 800; text-align: center; }
.ly-tags { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; } .ly-tags:empty { display: none; }
.ly-tag { display: inline-flex; align-items: center; height: 21px; box-sizing: border-box; overflow: hidden; font-style: normal; font-size: 11.5px; line-height: 1; white-space: nowrap; font-weight: 800; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); }
.ly-tag.mv { background: #fde0dc; border-color: #cc2f2f; color: #7a1414; } .ly-tag.po { background: #fde9dd; border-color: #e0855a; color: #6e2c0b; } .ly-tag.kong { background: #e3ecfb; border-color: #7f9fdb; color: #1d3a6e; }
.ly-tag.t-yong { background: #fbf0c8; border-color: #c9a227; color: #4d3b05; } .ly-tag.yuan { background: #dff3e4; border-color: #4caf6e; color: #14532d; } .ly-tag.ji { background: #ece4f7; border-color: #8e6cc2; color: #3b1f66; } .ly-tag.good { background: #dff3e4; border-color: #4caf6e; color: #14532d; }
.ly-fu { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--line); }
.ly-tabs button { flex: none; padding: 7px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; min-height: 38px; }
.ly-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ly-interp section[hidden] { display: none; }
.ly-gauge { height: 14px; border-radius: 999px; background: linear-gradient(90deg, #3b6fd1, #d9b43a, #cc2f2f); margin: 6px 0 4px; }
.ly-gauge div { height: 100%; border-right: 4px solid var(--ink); }
.ly-score { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 8px; } .ly-score b { font-size: 30px; } .ly-score > span:not(.ic-grade) { color: var(--muted); }
.ly-sum { margin: 8px 0 0; padding-left: 20px; } .ly-sum li { margin: 4px 0; line-height: 1.7; }
.ly-ytbl td, .ly-ytbl th { font-size: 13.5px; }
.ly-move { padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid #c62828; border-radius: 10px; margin: 0 0 8px; } .ly-move p { margin: 0 0 4px; } .ly-move ul { margin: 4px 0 0; padding-left: 20px; }
.ly-cause { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.ly-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; } .ly-dates li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; } .ly-dates p { margin: 0; }
.ly-dl { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; } .ly-dl b { font-size: 20px; } .ly-when2 { font-weight: 700; color: var(--seal); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ly-stack li.mv em { color: #ff8a80; } }
:root[data-theme="dark"] .ly-stack li.mv em { color: #ff8a80; }
@media (max-width: 520px) {
  .ly-pil b { font-size: 18px; } .ly-coin { width: 56px; height: 56px; }
  .ly-row, .ly-legend { grid-template-columns: 2.3em minmax(0, 1fr) 34px 1.5em 10px 34px minmax(0, 1fr); gap: 4px; padding-left: 5px; padding-right: 5px; }
  .ly-rows.nomv .ly-row, .ly-chart:has(.ly-rows.nomv) .ly-legend { grid-template-columns: 2.3em minmax(0, 1fr) 34px 1.5em; }
  .ly-gz span[translate] { font-size: 13.5px; } .ly-beast { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) { .ly-coin.spin { animation: none; } .ly-stack li:not(.empty) i { animation: none; } }
.ly-tabs { flex-wrap: wrap; overflow: visible; }

/* 육임점: 점친 때 · 장소 · 천지반도 · 사과 · 삼전 · 해석 */
#lrQ { width: 100%; min-height: 84px; padding: 10px 12px; border: 1.5px solid var(--field-border); border-radius: 12px; background: var(--field-bg); color: var(--ink); font: inherit; resize: vertical; }
.lr-sel, .lr-custom input { min-height: 44px; font-size: 16px; padding: 0 10px; border: 1.5px solid var(--field-border); border-radius: 12px; background: var(--field-bg, var(--surface)); color: var(--ink); width: 100%; max-width: 100%; }
.lr-custom { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 0; }
.lr-custom[hidden] { display: none; }
.lr-custom label { display: grid; gap: 2px; font-size: 13px; font-weight: 700; }
.lr-custom p { grid-column: 1 / -1; margin: 0; }
.lr-tinfo { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.lr-tinfo li { display: grid; grid-template-columns: 6.5em 1fr; gap: 2px 10px; align-items: baseline; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.lr-tinfo span { font-size: 12.5px; font-weight: 700; color: var(--muted); grid-row: span 2; }
.lr-tinfo b { font-size: 17px; } .lr-tinfo small { font-size: 12.5px; color: var(--muted); }
.lr-warn { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: #fde9dd; color: #6e2c0b; border: 1px solid #e0855a; font-size: 14px; }
.lr-plate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; max-width: 420px; margin: 8px auto 0; }
.lr-cell { position: relative; display: grid; justify-items: center; align-content: center; gap: 0; min-height: 76px; padding: 4px 2px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.lr-cell b { font-size: 26px; line-height: 1.1; }
.lr-cell small { font-size: 12px; color: var(--muted); font-weight: 700; } .lr-cell small em { font-style: normal; color: var(--seal); }
.lr-cell.ch { border-color: #c62828; box-shadow: 0 0 0 1px #c62828 inset; }
.lr-cell.kong { border-style: dashed; }
.lr-cell u { position: absolute; top: 3px; right: 5px; text-decoration: none; font-size: 11px; font-weight: 800; color: #fff; background: #b42318; border-radius: 6px; padding: 0 4px; }
.lr-gen { font-style: normal; font-size: 12px; font-weight: 800; color: var(--muted); cursor: help; }
.lr-gen.good { color: #1f7a45; }
.lr-mid { grid-column: 2 / span 2; grid-row: 2 / span 2; display: grid; align-content: center; justify-items: center; gap: 2px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-align: center; font-size: 13px; }
.lr-mid b { font-size: 22px; }
.lr-kes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 4px 0 10px; }
.lr-ke { display: grid; justify-items: center; gap: 3px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lr-ke .lr-kn { font-size: 12px; font-weight: 700; color: var(--muted); }
.lr-ke b { font-size: 26px; line-height: 1.1; } .lr-ke .lr-lo { font-size: 17px; border-top: 1.5px solid var(--line); padding-top: 2px; min-width: 2em; text-align: center; }
.lr-class { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin: 0 0 10px; } .lr-class p { margin: 0 0 4px; }
.lr-chuan { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lr-row { display: grid; grid-template-columns: 3em 1.6em 2.2em minmax(0, 1fr); gap: 4px 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.lr-row.ly-yong { box-shadow: 0 0 0 2px #d4a83a inset; }
.lr-cn { font-weight: 800; color: var(--seal); } .lr-dun { font-size: 16px; color: var(--muted); text-align: center; } .lr-dun i { font-style: normal; font-size: 13px; color: #1d3a6e; }
.lr-row b { font-size: 26px; line-height: 1; }
.lr-meta { display: grid; font-size: 13.5px; } .lr-meta i { font-style: normal; color: var(--muted); }
.lr-flow { list-style: none; margin: 0 0 8px; padding: 0; } .lr-flow li { padding: 6px 0; } .lr-flow li.arr { color: var(--muted); font-size: 14px; padding: 0 0 0 10px; }
@media (max-width: 520px) { .lr-cell { min-height: 66px; } .lr-cell b, .lr-ke b, .lr-row b { font-size: 22px; } .lr-custom { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lr-gen.good { color: #6fdc9a; } :root:not([data-theme="light"]) .lr-dun i { color: #9cc0ff; } }
:root[data-theme="dark"] .lr-gen.good { color: #6fdc9a; } :root[data-theme="dark"] .lr-dun i { color: #9cc0ff; }

/* 당사주: 네 별 카드 · 별 풀이 · 12성 모아 보기 */
.dsj-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.dsj-card { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; text-align: center; }
.dsj-card:hover, .dsj-card:focus-visible { border-color: var(--brand); }
.dsj-card.off { opacity: .7; border-style: dashed; }
.dsj-stage { font-size: 12.5px; font-weight: 800; color: var(--seal); } .dsj-stage i { font-style: normal; }
.dsj-emo { font-size: 34px; line-height: 1.2; font-weight: 400; }
.dsj-name { font-size: 16px; } .dsj-h { font-size: 12.5px; color: var(--muted); } .dsj-card small { font-size: 12px; color: var(--muted); }
.dsj-line { font-size: 17px; font-weight: 800; line-height: 1.6; margin: 0 0 8px; }
.dsj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.dsj-tags span { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--brand); }
.dsj-dl { margin: 0; display: grid; gap: 4px; } .dsj-dl dt { font-weight: 800; margin-top: 8px; } .dsj-dl dt small { font-weight: 600; color: var(--muted); } .dsj-dl dd { margin: 0; line-height: 1.75; }
.dsj-all { display: grid; gap: 8px; }
.dsj-item { border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--surface); }
.dsj-item summary { cursor: pointer; display: grid; grid-template-columns: auto auto 1fr; gap: 2px 8px; align-items: baseline; padding: 10px 0; }
.dsj-item summary small { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; }
.dsj-item[open] { padding-bottom: 12px; }
@media (max-width: 520px) { .dsj-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 풀이 기조(2026-10-11): 결과 맨 앞의 「먼저 짚을 약점과 리스크」 */
.rf-card { border-left: 5px solid #b42318; }
.rf-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.rf-list li { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.rf-list li.rf-danger { border-color: #e2a39b; background: #fdf0ee; }
.rf-list li.rf-warn { border-color: #e8c08a; background: #fdf6ea; }
.rf-list li.rf-info { border-color: var(--line); background: var(--surface-2); }
.rf-t { margin: 0 0 4px; line-height: 1.55; } .rf-t b { color: #7a1414; }
.rf-list li.rf-warn .rf-t b { color: #6e3a06; } .rf-list li.rf-info .rf-t b { color: var(--ink); }
.rf-why { margin: 0; font-size: 14.5px; line-height: 1.7; color: #3b2a1a; }
.rf-k { display: inline-block; font-size: 12px; font-weight: 800; color: #fff; background: #8a5a2b; border-radius: 6px; padding: 0 6px; margin-right: 4px; }
.dsj-risk { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: #fdf0ee; border: 1px solid #e2a39b; font-size: 14px; line-height: 1.65; color: #3b2a1a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rf-list li.rf-danger, :root:not([data-theme="light"]) .dsj-risk { background: #3a1d1a; border-color: #8a3a32; } :root:not([data-theme="light"]) .rf-list li.rf-warn { background: #3a2c16; border-color: #8a6a32; } :root:not([data-theme="light"]) .rf-t b { color: #ffb4a8; } :root:not([data-theme="light"]) .rf-list li.rf-warn .rf-t b { color: #ffd59a; } :root:not([data-theme="light"]) .rf-list li.rf-info .rf-t b { color: var(--ink); } :root:not([data-theme="light"]) .rf-why, :root:not([data-theme="light"]) .dsj-risk { color: var(--ink); } }
:root[data-theme="dark"] .rf-list li.rf-danger, :root[data-theme="dark"] .dsj-risk { background: #3a1d1a; border-color: #8a3a32; } :root[data-theme="dark"] .rf-list li.rf-warn { background: #3a2c16; border-color: #8a6a32; } :root[data-theme="dark"] .rf-t b { color: #ffb4a8; } :root[data-theme="dark"] .rf-list li.rf-warn .rf-t b { color: #ffd59a; } :root[data-theme="dark"] .rf-list li.rf-info .rf-t b { color: var(--ink); } :root[data-theme="dark"] .rf-why, :root[data-theme="dark"] .dsj-risk { color: var(--ink); }
@media (max-width: 520px) { .ny-5t th, .ny-5t td { padding-left: 3px; padding-right: 3px; font-size: 12.5px; } .ny-5t .sbar { width: 66px; min-width: 0; } }

/* 명리 고전(#/classics) — 주역공부(.ich-*)와 같은 틀 */
.cl-books { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 12px 0; }
.cl-book { display: grid; gap: 4px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
a.cl-book:hover, a.cl-book:focus-visible { border-color: var(--brand); }
.cl-book.soon { opacity: .72; }
.cl-bhz { font-size: 28px; letter-spacing: .06em; }
.cl-bnm { font-weight: 700; font-size: 17px; }
.cl-bnm em { font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.cl-rd { font-size: .62em; color: var(--seal); font-weight: 700; }
.cl-toc { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cl-toc li[hidden] { display: none; }
.cl-toc a { display: grid; gap: 1px; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
.cl-toc a:hover, .cl-toc a:focus-visible { border-color: var(--brand); }
.cl-toc b { font-size: 18px; }
.cl-toc .cl-rd { font-size: 13px; }
.cl-no { font-size: 12px; color: var(--muted); font-weight: 700; }
.cl-note { margin: 8px 0 0; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); }
.cl-note summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.cl-note .ich-han { font-size: 19px; line-height: 2.05; }
.cl-note .ich-read { font-size: 13.5px; font-weight: 600; }
@media (max-width: 520px) { .cl-note .ich-han { font-size: 17px; } .cl-toc { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }
.cl-soon { font-style: normal; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); vertical-align: middle; }

/* 족상 · 발 MBTI(#/foot) */
.ft-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.ft-tp { cursor: pointer; }
.ft-tp input { position: absolute; opacity: 0; pointer-events: none; }
.ft-tpin { display: grid; justify-items: center; gap: 2px; height: 100%; padding: 8px 6px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); text-align: center; }
.ft-tpin small { font-size: 12px; color: var(--muted); line-height: 1.35; word-break: keep-all; }
.ft-tp input:checked + .ft-tpin { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.ft-tp input:focus-visible + .ft-tpin { outline: 2px solid var(--brand); outline-offset: 2px; }
.ft-svg { width: 64px; height: 80px; }
.ft-scan { margin: 0 0 6px; font: 700 14px/1.6 ui-monospace, Consolas, monospace; color: var(--seal); }
.ft-type { color: var(--seal); }
.ft-rare { margin: 0 0 6px; font-size: 14px; }
.ft-st th { width: 52%; text-align: left; }
.ft-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ft-tags span { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: 14px; }
.ft-star { font-size: 17px; letter-spacing: 1px; white-space: nowrap; }
.ft-star-off { color: var(--muted); opacity: .6; }

/* 골상 · 자세 점검(#/bone) */
.bn-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.bn-fig { margin: 0; text-align: center; }
.bn-svg { width: 100%; max-width: 300px; height: auto; }
.bn-r { cursor: pointer; transition: opacity .15s, filter .15s; }
.bn-r:hover, .bn-r:focus-visible, .bn-r.on { filter: brightness(1.12) drop-shadow(0 0 3px rgba(0, 0, 0, .35)); outline: none; }
.bn-svg:has(.bn-r.on) .bn-r:not(.on) { opacity: .55; }
.bn-lb { font-size: 12px; font-weight: 700; fill: var(--muted); }
.bn-lb.small { font-size: 10px; }
.bn-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.bn-lg { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.bn-lg.on { border-color: var(--brand); font-weight: 700; }
.bn-lg i, .bn-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.bn-info { padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); line-height: 1.7; }
.bn-info ul { margin: 4px 0 8px; padding-left: 20px; }
.bn-red { margin: 14px 0; padding: 10px 14px; border-radius: 12px; border: 1.5px solid #c62828; background: color-mix(in srgb, #c62828 7%, transparent); }
.bn-red ul { margin: 4px 0 0; padding-left: 20px; }
.bn-checks { display: grid; gap: 6px; }
.bn-score { margin: 4px 0 10px; font-size: 15px; }
.bn-score b { font-size: 40px; color: var(--seal); }
.bn-score span { margin-left: 8px; font-weight: 700; }
.bn-bar { display: inline-block; width: 140px; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; vertical-align: middle; }
.bn-bar i { display: block; height: 100%; border-radius: 999px; }
.bn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bn-chips span { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: 14px; }
@media (max-width: 620px) { .bn-wrap { grid-template-columns: 1fr; } .bn-svg { max-width: 240px; } .bn-bar { width: 90px; } }

/* 마의상법 핵심 정리(#/mayi) */
.my-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.my-sec h3 { margin-top: 0; }
.my-rd { margin-left: 3px; color: var(--seal); font-weight: 700; }
.my-tbl th { width: 30%; text-align: left; vertical-align: top; }
.my-svg { width: 100%; max-width: 300px; height: auto; }
.my-pt { cursor: pointer; }
.my-pt circle { fill: #fff; stroke: #6a4bd6; stroke-width: 2; }
.my-pt text { font-size: 11px; font-weight: 800; fill: #6a4bd6; }
.my-pt.on circle, .my-pt:hover circle, .my-pt:focus-visible circle { fill: #6a4bd6; outline: none; }
.my-pt.on text, .my-pt:hover text, .my-pt:focus-visible text { fill: #fff; }
.my-lb { font-size: 11px; font-weight: 700; fill: #c62828; opacity: .7; }
.my-gl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; padding-left: 22px; margin: 10px 0; }
.my-gb { width: 100%; text-align: left; padding: 4px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.my-gb.on { border-color: var(--brand); }
.my-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.my-chips span { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); font-size: 14px; }
.my-good, .my-care { display: inline-block; padding: 0 6px; margin-right: 4px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; }
.my-good { background: #2e8b57; } .my-care { background: #b5483a; }
.my-quote { padding: 10px 14px; border-left: 4px solid var(--seal); background: var(--surface-2); border-radius: 8px; }
/* 명리 고전 — 편 해설(궁통보감) · 한글음 없는 평주 · 명조 예시 */
.cl-sh { margin: 4px 0 14px; padding: 10px 12px; border-left: 4px solid var(--accent, #7a4fb5); border-radius: 8px; background: var(--surface-2); }
.cl-sh b { margin-right: 6px; }
.cl-plain { margin: 6px 0; font-size: 16px; line-height: 1.9; word-break: break-all; }
.cl-cn { margin-top: 14px; }

/* 점성술(#/astro) */
.as-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.as-row input[type="time"]:disabled { opacity: .5; }
.as-note { color: var(--accent); }
.as-slogan { font-size: 20px; font-weight: 800; line-height: 1.5; margin: 4px 0 8px; }
.as-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.as-tags span { padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-weight: 700; font-size: 14px; }
.as-bigs { display: grid; gap: 10px; }
.as-big { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.as-bg { font-size: 34px; line-height: 52px; text-align: center; font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", var(--sans); }
.as-bl { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.as-bs { margin: 2px 0 4px; font-size: 17px; }
.as-bs .as-pct { font-size: 14px; font-weight: 800; margin-left: 4px; }
.as-big p.small { margin: 0; }
.as-figs { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 12px; align-items: center; margin: 14px 0 6px; }
.as-figs figure { margin: 0; text-align: center; }
.as-wheel, .as-radar { width: 100%; max-width: 340px; height: auto; color: var(--ink); }
.as-wg { font-size: 16px; text-anchor: middle; dominant-baseline: central; font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", sans-serif; }
.as-wp { fill: var(--surface); stroke: currentColor; stroke-opacity: .55; }
.as-wpg { font-size: 13px; text-anchor: middle; dominant-baseline: central; fill: currentColor; font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", sans-serif; }
.as-wr { font-size: 8px; fill: #d0343a; font-weight: 700; }
.as-wl { font-size: 10px; font-weight: 800; fill: currentColor; }
.as-rl { font-size: 12px; font-weight: 800; }
.as-r { color: #c62828; font-style: normal; font-weight: 700; }
.as-tbl th { white-space: nowrap; }
.as-asp, .as-sky { margin: 4px 0 0; padding-left: 18px; }
.as-asp li, .as-sky li { margin: 4px 0; }
.as-det summary { cursor: pointer; font-weight: 700; margin-top: 8px; }
.as-gauge { margin: 10px 0 12px; }
.as-gt { margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.as-gv { margin-left: auto; font-size: 20px; }
.as-gauge p.small { margin: 4px 0 0; }
.as-bar { display: block; height: 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.as-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #f6b73c, #e4572e); }
.as-bar.love i { background: linear-gradient(90deg, #ff9fbc, #e0457b); }
.as-bar.mental i { background: linear-gradient(90deg, #8ec5ff, #5b5bd6); }
.as-wkwrap { overflow-x: auto; }
.as-wk td { min-width: 70px; }
.as-wk td .as-bar { height: 8px; }
.as-wk td small { font-weight: 700; }
.as-rx li { margin: 6px 0 12px; }
.as-rx li p { margin: 2px 0 0; }
.as-share { white-space: pre-wrap; word-break: break-word; font-family: var(--sans); font-size: 14px; line-height: 1.7; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
@media (max-width: 620px) { .as-figs { grid-template-columns: minmax(0, 1fr); } .as-slogan { font-size: 18px; } }
:root { --as0: #c23a1f; --as1: #7a5b20; --as2: #23689a; --as3: #17665f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --as0: #ff8a6b; --as1: #e0b866; --as2: #7cc0f0; --as3: #5fd0c2; } }
:root[data-theme="dark"] { --as0: #ff8a6b; --as1: #e0b866; --as2: #7cc0f0; --as3: #5fd0c2; }

/* 명리고전 한자 말풍선 · 삼명통회(#/sammyung) */
.hz { cursor: help; border-radius: 3px; }
.hz:hover, .hz:focus { background: var(--accent-soft); }
.sm-hz { color: var(--muted); font-weight: 600; }
.sm-sec .sec-title { margin-top: 0; }
.sm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 8px; }
.sm-item { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); padding: 8px 12px; }
.sm-item summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.sm-pair { font-size: 13px; color: var(--muted); }
.sm-el { margin-left: auto; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.sm-steps { margin: 8px 0 4px; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.sm-steps li { line-height: 1.65; }
.sm-sl { display: inline-block; font-size: 12px; font-weight: 800; color: var(--brand); margin-right: 4px; }
.sm-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.sm-tags span { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); }
.sm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
#smQ { width: 100%; min-height: 84px; font-size: 16px; padding: 10px 12px; border: 1.5px solid var(--field-border); border-radius: 12px; background: var(--field-bg, var(--surface)); color: var(--ink); }
.sm-q { margin: 14px 0 6px; font-weight: 700; padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); }
.sm-a h4 { margin: 12px 0 4px; }
.sm-tblw { overflow-x: auto; margin: 8px 0; }
.sm-tbl th, .sm-tbl td { vertical-align: top; }
/* 삼명통회 원문(#/sammyung/text) */
.sm-tabs { margin-bottom: 12px; }
.sm-vols { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; margin: 12px 0; }
.sm-vol { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); color: var(--ink); text-decoration: none; }
.sm-vol b { font-size: 17px; }
.sm-vol em { font-style: normal; font-weight: 800; color: var(--brand); }
.sm-vol.off { opacity: .6; }
.sm-vol.off em { color: var(--muted); }
a.sm-vol:hover { border-color: var(--brand); }
.cl-hl { display: inline-block; font-size: 12px; padding: 1px 7px; margin-right: 4px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); }
.cl-3 p { margin: 4px 0; }
.cl-3 p + p { padding-top: 4px; border-top: 1px dashed var(--line); }
.cl-gl { margin-top: 14px; }
.cl-glg { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 10px; margin-top: 8px; font-size: 14px; }
.cl-gli b { display: inline-block; min-width: 1.4em; margin-right: 6px; font-size: 19px; font-weight: 700; }
.cl-dan { margin: 10px 0 0; padding: 8px 10px 6px; border-left: 3px solid var(--accent-soft); border-radius: 0 10px 10px 0; background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.cl-dan + .cl-dan { margin-top: 12px; }
.cl-dn { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5em; height: 1.5em; margin-right: 6px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 13px; font-weight: 700; vertical-align: middle; }
.cl-dan .ich-han { margin-bottom: 4px; }
.cl-pr { margin-top: 12px; }
/* 📖 자세한 풀이 */
.cl-x { margin: 8px 0 2px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); border-radius: 10px; background: var(--surface); font-size: 15px; line-height: 1.8; }
.cl-x p { margin: 0; }
.cl-x p + p { margin-top: 8px; }
.cl-x b { color: var(--accent); }
.cl-xh { font-weight: 700; color: var(--ink); }
.cl-xf summary { cursor: pointer; font-weight: 700; }
.cl-xf[open] summary { margin-bottom: 6px; }
.ich-wrap.no-x .cl-x { display: none; }

/* 고전으로 읽는 내 사주 (정통사주 6번 카드) */
.cm-h { margin: 20px 0 6px; font-size: 17px; }
.cm-item { margin: 10px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.cm-item.risk { border-left: 5px solid #b42318; }
.cm-src { margin: 0 0 6px; line-height: 1.6; }
.cm-hz { color: var(--muted); font-size: 14px; }
.cm-link { margin-left: 4px; font-size: 14px; white-space: nowrap; }
.cm-why { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 4px; font-size: 14.5px; line-height: 1.6; }
.cm-why > b { flex: 1 0 100%; }
.cm-k { font-size: 13px; color: var(--muted); }
.cm-chip { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px; }
.cm-item .ich-han { font-size: 21px; line-height: 2; }
.cm-more { margin-top: 8px; }
.cm-more > summary { cursor: pointer; font-size: 14.5px; color: var(--accent); }
.cm-ai { margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--line); }
@media (max-width: 620px) { .cm-item { padding: 10px 10px; } .cm-item .ich-han { font-size: 19px; } }

/* 생기복덕 표시(2026-10-20) — 달력 칸 바탕은 점수 색이라 이름표는 밝은 바탕 고정(.jg 와 같은 방식) */
/* 이름표 = 해당 색 바탕 + 흰 글자(대비 7:1 이상), 점수 색 칸 위에서도 구분되게 흰 테두리 */
.sgb { display: inline-block; font-size: 9.5px; font-weight: 800; line-height: 1.25; padding: 0 4px; border-radius: 5px; color: #fff; border: 1px solid rgba(255, 255, 255, .9); white-space: nowrap; }
.sgb.sg-good { background: #a3150c; }
.sgb.sg-mid { background: #5b5346; font-weight: 600; }
.sgb.sg-bad { background: #1f3f86; }
.chip.sgc.sg-good { color: #a3150c; } .chip.sgc.sg-bad { color: #1f3f86; }
:root[data-theme="dark"] .chip.sgc.sg-good { color: #ff8f80; } :root[data-theme="dark"] .chip.sgc.sg-bad { color: #8fb4ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.sgc.sg-good { color: #ff8f80; } :root:not([data-theme="light"]) .chip.sgc.sg-bad { color: #8fb4ff; } }
.sg-box { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line, rgba(0,0,0,.2)); }
.sg-h { margin: 0 0 6px; font-size: 16px; }
.sg-tg { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; white-space: nowrap; }
.sg-legend { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 4px 12px; }
@media (max-width: 620px) { .cell .sgb { font-size: 9px; padding: 0 2px; } }

/* 구성방위(2026-10-20) — 길 붉은 · 흉 파랑 · 주의 노랑(사이트 규칙: 신중 = 파랑, 좋음 = 빨강) */
:root { --ks-good: #fbe3df; --ks-good-b: #a3150c; --ks-bad: #e1e7f4; --ks-bad-b: #1f3f86; --ks-warn: #fbf0d0; --ks-warn-b: #8a6200; --ks-plain: #f3ede0; --ks-plain-b: #9a8a6c; }
:root[data-theme="dark"] { --ks-good: #4a1d18; --ks-good-b: #ff8f80; --ks-bad: #1b2742; --ks-bad-b: #8fb4ff; --ks-warn: #3d3015; --ks-warn-b: #f0c35a; --ks-plain: #2c261d; --ks-plain-b: #8f816a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ks-good: #4a1d18; --ks-good-b: #ff8f80; --ks-bad: #1b2742; --ks-bad-b: #8fb4ff; --ks-warn: #3d3015; --ks-warn-b: #f0c35a; --ks-plain: #2c261d; --ks-plain-b: #8f816a; } }
.ks-star { display: inline-block; font-weight: 800; font-size: 12px; line-height: 1.3; padding: 1px 6px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .25); white-space: nowrap; vertical-align: middle; }
.ks-star.big { font-size: 15px; padding: 2px 8px; }
.ks-me-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.ks-big { margin: 4px 0 0; font-size: 17px; }
.ks-modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.ks-modes .chip { cursor: pointer; font-size: 15px; padding: 8px 14px; }
.ks-modes .chip.on { background: var(--ks-good-b); color: #fff; border-color: var(--ks-good-b); }
:root[data-theme="dark"] .ks-modes .chip.on { color: #2a1206; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ks-modes .chip.on { color: #2a1206; } }
.ks-cwrap { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; align-items: center; }
@media (max-width: 620px) { .ks-cwrap { grid-template-columns: minmax(0, 1fr); } }
.ks-compass { width: 100%; max-width: 340px; height: auto; display: block; margin: 0 auto; }
.ks-sec { stroke: var(--paper, #fffaf0); stroke-width: 2; }
.ks-sec.good { fill: var(--ks-good); stroke: var(--ks-good-b); }
.ks-sec.bad { fill: var(--ks-bad); stroke: var(--ks-bad-b); }
.ks-sec.warn { fill: var(--ks-warn); stroke: var(--ks-warn-b); }
.ks-sec.plain { fill: var(--ks-plain); stroke: var(--ks-plain-b); }
.ks-sl { font-size: 14px; font-weight: 700; fill: var(--ink); }
.ks-sl.s { font-size: 15px; font-weight: 800; }
.ks-sl.m { font-size: 16px; font-weight: 900; }
.ks-sl.good { fill: var(--ks-good-b); } .ks-sl.bad { fill: var(--ks-bad-b); } .ks-sl.warn { fill: var(--ks-warn-b); }
.ks-n { font-size: 13px; font-weight: 800; fill: var(--ks-good-b); }
.ks-legend p { margin: 4px 0; }
.ks-sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; border: 2px solid; }
.ks-sw.good { background: var(--ks-good); border-color: var(--ks-good-b); } .ks-sw.bad { background: var(--ks-bad); border-color: var(--ks-bad-b); }
.ks-sw.warn { background: var(--ks-warn); border-color: var(--ks-warn-b); } .ks-sw.plain { background: var(--ks-plain); border-color: var(--ks-plain-b); }
.ks-h { margin: 16px 0 6px; font-size: 16px; }
.ks-goods { margin: 0; padding-left: 18px; } .ks-goods li { margin: 6px 0; }
.ks-boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.ks-board { margin: 0; } .ks-board figcaption { font-size: 14px; margin-bottom: 6px; }
.ks-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.ks-cell { min-width: 0; border-radius: 8px; padding: 6px 2px; text-align: center; background: var(--ks-plain); border: 1.5px solid var(--ks-plain-b); display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 76px; }
.ks-cell.c { border-style: double; border-width: 3px; }
.ks-cell.good { background: var(--ks-good); border-color: var(--ks-good-b); } .ks-cell.bad { background: var(--ks-bad); border-color: var(--ks-bad-b); } .ks-cell.warn { background: var(--ks-warn); border-color: var(--ks-warn-b); }
.ks-dn { font-size: 12px; font-weight: 700; }
.ks-tag { font-style: normal; font-size: 10.5px; font-weight: 700; line-height: 1.2; padding: 0 4px; border-radius: 4px; color: #fff; overflow-wrap: anywhere; }
.ks-tag.bad { background: #1f3f86; } .ks-tag.good { background: #a3150c; } .ks-tag.warn { background: #8a6200; }
.ks-how ul { padding-left: 18px; } .ks-how li { margin: 5px 0; }

/* 자미두수 명반(2026-10-20) — 4×4 판, 가운데 2×2 정보. 사화 색: 祿 초록 · 權 주황 · 科 파랑 · 忌 검정 */
.zw-yrnav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.zw-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(118px, auto)); gap: 4px; }
.zw-cell { min-width: 0; text-align: left; font: inherit; color: var(--ink); background: color-mix(in srgb, var(--paper-hi, #fffaf0) 88%, transparent); border: 1.5px solid #c9b48a; border-radius: 8px; padding: 5px 5px 4px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; position: relative; }
.zw-cell:hover { border-color: #6a4bc4; }
.zw-cell.ming { border-color: #a3150c; border-width: 2.5px; }
.zw-cell.sel { outline: 3px solid #6a4bc4; outline-offset: 1px; background: color-mix(in srgb, #6a4bc4 12%, var(--paper-hi, #fffaf0)); }
.zw-cell.tri { background: color-mix(in srgb, #6a4bc4 7%, var(--paper-hi, #fffaf0)); border-style: dashed; border-color: #8a72d6; }
.zw-cell.opp { background: color-mix(in srgb, #6a4bc4 9%, var(--paper-hi, #fffaf0)); border-color: #8a72d6; }
.zw-mains { display: flex; flex-wrap: wrap; gap: 1px 5px; }
.zw-st { font-size: 14.5px; font-weight: 800; line-height: 1.25; color: #3b1f8a; white-space: nowrap; }
:root[data-theme="dark"] .zw-st { color: #c9b8ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zw-st { color: #c9b8ff; } }
.zw-lv { font-size: 10px; font-weight: 700; margin-left: 1px; color: var(--muted); }
.zw-lv.l6, .zw-lv.l5 { color: #a3150c; } .zw-lv.l1 { color: #1f3f86; }
:root[data-theme="dark"] .zw-lv.l6, :root[data-theme="dark"] .zw-lv.l5 { color: #ff8f80; } :root[data-theme="dark"] .zw-lv.l1 { color: #8fb4ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zw-lv.l6, :root:not([data-theme="light"]) .zw-lv.l5 { color: #ff8f80; } :root:not([data-theme="light"]) .zw-lv.l1 { color: #8fb4ff; } }
.zw-empty { font-size: 11.5px; color: var(--muted); }
.zw-subs { display: flex; flex-wrap: wrap; gap: 0 4px; font-size: 11.5px; line-height: 1.3; }
.zw-sub.lucky { color: #17694a; } .zw-sub.bad { color: #6b5f4d; }
:root[data-theme="dark"] .zw-sub.lucky { color: #6fd3a5; } :root[data-theme="dark"] .zw-sub.bad { color: #cbbfa6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zw-sub.lucky { color: #6fd3a5; } :root:not([data-theme="light"]) .zw-sub.bad { color: #cbbfa6; } }
.zw-hua { display: inline-block; font-style: normal; font-size: 10px; font-weight: 800; line-height: 1.2; padding: 0 3px; margin-left: 2px; border-radius: 4px; color: #fff; vertical-align: 1px; }
.zw-hua.lu { background: #2e7d32; } .zw-hua.quan { background: #c15a00; } .zw-hua.ke { background: #1f5fae; } .zw-hua.ji { background: #1b1b1f; border: 1px solid #fff; }
.zw-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0 5px; align-items: baseline; font-size: 11.5px; border-top: 1px dotted #c9b48a; padding-top: 2px; }
.zw-role { font-weight: 800; color: #a3150c; } .zw-cell:not(.ming) .zw-role { color: var(--ink); }
:root[data-theme="dark"] .zw-cell.ming .zw-role, :root[data-theme="dark"] .zw-yr { color: #ff8f80; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zw-cell.ming .zw-role, :root:not([data-theme="light"]) .zw-yr { color: #ff8f80; } }
.zw-gz { font-weight: 700; } .zw-dx { color: var(--muted); margin-left: auto; }
.zw-mks { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.zw-mk { font-style: normal; font-size: 9.5px; font-weight: 800; line-height: 1.2; padding: 0 3px; border-radius: 4px; color: #fff; }
.zw-mk.shen { background: #6a4bc4; } .zw-mk.dx { background: #a3150c; } .zw-mk.ln { background: #c15a00; } .zw-mk.xx { background: #6b5f4d; }
.zw-center { border: 1.5px dashed #c9b48a; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 2px; min-width: 0; }
.zw-center p { margin: 0; font-size: 13px; line-height: 1.45; }
.zw-cname { font-size: 18px !important; font-weight: 800; }
.zw-yr { font-weight: 700; color: #a3150c; }
.zw-legend { font-size: 11.5px !important; color: var(--muted); }
.zw-pal { margin-top: 12px; padding: 12px 14px; border: 1.5px solid #8a72d6; border-radius: 10px; background: color-mix(in srgb, #6a4bc4 6%, transparent); }
.zw-ph { margin: 12px 0 4px; font-size: 16px; } .zw-pal .zw-ph { margin-top: 0; }
.zw-list { margin: 4px 0; padding-left: 18px; } .zw-list li { margin: 5px 0; }
.zw-risk { color: #1f3f86; }
:root[data-theme="dark"] .zw-risk { color: #8fb4ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zw-risk { color: #8fb4ff; } }
.zw-pat { margin: 6px 0; padding: 6px 10px; border-left: 4px solid #8a72d6; background: color-mix(in srgb, #6a4bc4 6%, transparent); border-radius: 0 8px 8px 0; }
.zw-pat.good { border-color: #a3150c; } .zw-pat.bad { border-color: #1f3f86; }
.zw-hchip { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 7px; border-radius: 10px; font-size: 12.5px; border: 1px solid; }
.zw-hchip.lu { color: #2e7d32; } .zw-hchip.quan { color: #c15a00; } .zw-hchip.ke { color: #1f5fae; } .zw-hchip.ji { color: var(--ink); font-weight: 700; }
.zw-dxt tr.now th, .zw-dxt tr.now td { background: color-mix(in srgb, #a3150c 12%, transparent); font-weight: 700; }
.zw-how ul { padding-left: 18px; } .zw-how li { margin: 5px 0; }
@media (max-width: 620px) {
  .zw-board { grid-template-rows: repeat(4, minmax(104px, auto)); gap: 2px; }
  .zw-cell { padding: 3px 2px 2px; border-radius: 6px; }
  .zw-st { font-size: 12px; } .zw-lv { font-size: 8.5px; }
  .zw-subs { font-size: 9.5px; gap: 0 2px; } .zw-hua { font-size: 8.5px; padding: 0 2px; margin-left: 1px; }
  .zw-foot { font-size: 9.5px; gap: 0 3px; } .zw-dx { margin-left: 0; }
  .zw-mk { font-size: 8px; padding: 0 2px; }
  .zw-center { padding: 4px; } .zw-center p { font-size: 11px; } .zw-cname { font-size: 14px !important; }
}

.ai-hr { border: 0; border-top: 1px dashed var(--muted); opacity: .5; margin: 12px 0; }

/* 기문둔갑 구궁반(2026-10-21) — 3×3, 위가 남쪽. 길 붉은 · 흉 파랑 · 공망 점선 */
.qm-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; max-width: 560px; margin: 8px auto 0; }
.qm-cell { min-width: 0; min-height: 150px; border: 1.5px solid #c9b48a; border-radius: 10px; padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; background: color-mix(in srgb, var(--paper-hi, #fffaf0) 88%, transparent); }
.qm-cell.good { border-color: var(--ks-good-b); background: var(--ks-good); }
.qm-cell.bad { border-color: var(--ks-bad-b); background: var(--ks-bad); }
.qm-cell.kong { border-style: dashed; border-width: 2px; }
.qm-cell.c { justify-content: center; border-style: double; border-width: 3px; }
.qm-god { font-size: 13px; font-weight: 700; color: var(--muted); }
.qm-god.g { color: var(--ks-good-b); }
.qm-heaven { font-size: 22px; line-height: 1.15; }
.qm-heaven small { display: block; font-size: 13px; font-weight: 700; }
.qm-heaven i, .qm-gate i { font-style: normal; }
.qm-gate { font-size: 17px; font-weight: 800; padding: 0 8px; border-radius: 6px; border: 1.5px solid currentColor; }
.qm-gate.g { box-shadow: 0 0 0 2px var(--ks-good-b); }
.qm-earth { font-size: 15px; color: var(--muted); }
.qm-earth b { font-size: 17px; }
.qm-pn { margin-top: auto; font-size: 12px; font-weight: 700; }
.qm-pn em { font-style: normal; font-size: 10.5px; padding: 0 4px; border-radius: 4px; background: #6a4bc4; color: #fff; margin-left: 2px; }
.qm-pn em.k { background: #6b5f4d; }
.qm-flags { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; }
.qm-flags i { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 0 4px; border-radius: 4px; color: #fff; }
.qm-flags i.b { background: #1f3f86; } .qm-flags i.g { background: #a3150c; }
.qm-h { margin: 14px 0 6px; font-size: 16px; }
.qm-goods { margin: 0; padding-left: 18px; } .qm-goods li { margin: 6px 0; }
.qm-k { color: #6b5f4d; } .qm-b { color: var(--ks-bad-b); }
.qm-json pre { max-height: 360px; overflow: auto; font-size: 12px; background: color-mix(in srgb, var(--ink) 6%, transparent); padding: 10px; border-radius: 8px; white-space: pre; }
.qm-how ul { padding-left: 18px; } .qm-how li { margin: 5px 0; }
@media (max-width: 620px) {
  .qm-board { gap: 3px; } .qm-cell { min-height: 132px; padding: 4px 2px; }
  .qm-heaven { font-size: 18px; } .qm-heaven small { font-size: 11px; } .qm-gate { font-size: 14px; padding: 0 4px; }
  .qm-earth, .qm-earth b { font-size: 13px; } .qm-pn { font-size: 10px; } .qm-pn em, .qm-flags i { font-size: 9px; }
}
.qm-heaven i, .qm-gate i { background: none; }
.qm-hong { font-size: 13px; font-weight: 700; padding: 0 6px; border-radius: 6px; border: 1px dashed #8a72d6; }
.qm-hong b { background: none; font-size: 15px; } .qm-hong small { font-size: 10.5px; color: var(--muted); }
.qm-hongt td b { background: none; font-size: 16px; }
@media (max-width: 620px) { .qm-hong { font-size: 11px; padding: 0 3px; } .qm-hong b { font-size: 12px; } .qm-hong small { font-size: 9px; } }

/* 간지로 생년월일시 찾기(2026-10-21) */
.gz-in { border: 1px dashed var(--field-border, #8f7b58); border-radius: 10px; padding: 6px 10px; }
.gz-in summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
.gz-sel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 6px 0 8px; }
.gz-sel label { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; }
.gz-sel select { min-width: 0; width: 100%; }
.gz-picks { display: flex; flex-direction: column; gap: 6px; }
.gz-pick { text-align: left; }
@media (max-width: 620px) { .gz-sel { gap: 4px; } }
.gz-sel .gz-h { grid-column: 1 / -1; }
.cm-theme { margin: 14px 0 6px; font-size: 16px; }

/* 고전으로 읽는 내 사주 — 비춰 볼 고전 고르기 */
.cm-picker { margin: 6px 0 10px; padding: 8px 12px; border: 1px solid var(--line, #c9b98f); border-radius: 12px; background: var(--surface, rgba(255,250,236,.7)); }
.cm-picker > summary { cursor: pointer; font-weight: 700; }
.cm-pk-g { margin: 8px 0 0; padding: 6px 10px 8px; border: 1px dashed var(--line, #c9b98f); border-radius: 10px; }
.cm-pk-g legend { padding: 0 6px; font-size: 13px; font-weight: 700; }
.cm-pk { display: inline-flex; align-items: center; gap: 4px; margin: 4px 12px 4px 0; font-size: 14px; white-space: nowrap; }
.cm-pk input { width: 18px; height: 18px; }
.cm-pk-act { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }

/* 고전 구절 — 「내 명식」 부분을 눈에 띄게 */
.cm-why .cm-k { padding: 2px 9px; border-radius: 6px; background: #5b3fc4; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.cm-why .cm-chip { padding: 2px 10px; border: 1.5px solid #c98a12; background: #fff0b8; color: #4a2800; font-size: 14px; font-weight: 800; box-shadow: 0 1px 0 rgba(120, 80, 0, .25); }
.cm-item.risk .cm-why .cm-chip { border-color: #b3261e; background: #ffe0dc; color: #6a0f0a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cm-why .cm-k { background: #b7a4ff; color: #1b1030; }
  :root:not([data-theme="light"]) .cm-why .cm-chip { border-color: #e0b040; background: #4a3a10; color: #ffe9a8; box-shadow: none; }
  :root:not([data-theme="light"]) .cm-item.risk .cm-why .cm-chip { border-color: #ff7b80; background: #4a1a1c; color: #ffd3d5; }
}
:root[data-theme="dark"] .cm-why .cm-k { background: #b7a4ff; color: #1b1030; }
:root[data-theme="dark"] .cm-why .cm-chip { border-color: #e0b040; background: #4a3a10; color: #ffe9a8; box-shadow: none; }
:root[data-theme="dark"] .cm-item.risk .cm-why .cm-chip { border-color: #ff7b80; background: #4a1a1c; color: #ffd3d5; }
.cm-my { padding: 1px 8px; border-radius: 6px; background: #fff0b8; color: #4a2800; font-weight: 800; border: 1.5px solid #c98a12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cm-my { background: #4a3a10; color: #ffe9a8; border-color: #e0b040; } }
:root[data-theme="dark"] .cm-my { background: #4a3a10; color: #ffe9a8; border-color: #e0b040; }

/* 종합 — 나의 기질과 삶의 태도(핵심 요약 카드) */
.ns-card { border: 2px solid var(--accent); background: linear-gradient(180deg, var(--accent-soft) 0, var(--surface) 130px); }
.ns-card .sec-title { font-size: 21px; }
.ns-lead { margin: 0 0 12px; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.ns-hero { display: flex; gap: 16px; align-items: center; padding: 14px; margin-bottom: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.ns-day { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; }
.ns-day-k { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ns-day .gzt { width: 44px; height: 44px; line-height: 44px; font-size: 26px; }
.ns-day-n { font-size: 14px; font-weight: 800; }
.ns-hero-t { flex: 1 1 auto; min-width: 0; }
.ns-one { margin: 0 0 10px; font-size: 17px; line-height: 1.55; }
.ns-one b { color: var(--accent); }
.ns-gauge { height: 12px; border-radius: 999px; background: linear-gradient(90deg, #2f6fdd 0, #d9b43a 50%, #d9402f 100%); opacity: .28; position: relative; }
.ns-gauge i { position: absolute; top: -4px; bottom: -4px; width: 5px; margin-left: -2px; border-radius: 3px; background: var(--ink); box-shadow: 0 0 0 2px var(--surface); opacity: 1; }
.ns-hero .ns-gauge { opacity: 1; background: linear-gradient(90deg, rgba(47,111,221,.35) 0, rgba(217,180,58,.35) 50%, rgba(217,64,47,.35) 100%); }
.ns-gl { display: flex; justify-content: space-between; gap: 6px; margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.ns-gl b { color: var(--ink); font-size: 14px; text-align: center; }
.ns-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ns-t { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); min-width: 0; }
.ns-k { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ns-v { font-size: 19px; line-height: 1.35; font-weight: 800; overflow-wrap: anywhere; }
.ns-s { font-size: 12.5px; color: var(--muted); }
.ns-t.good { background: #e3f4e8; border-color: #3f9d5b; } .ns-t.good .ns-v { color: #11532a; }
.ns-t.bad { background: #fde6e3; border-color: #cf4a3c; } .ns-t.bad .ns-v { color: #8c1d12; }
.ns-t.warn { background: #fff0cc; border-color: #d29a1a; } .ns-t.warn .ns-v { color: #6b4300; font-size: 16px; }
.ns-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ns-b { padding: 12px 14px; border-radius: 12px; border-left: 6px solid var(--accent); background: var(--surface); line-height: 1.65; font-size: 15px; }
.ns-b p { margin: 0 0 4px; text-align: left; }
.ns-bh { margin: 0 0 6px; font-weight: 800; font-size: 15.5px; }
.ns-b.s { border-left-color: #3f9d5b; } .ns-b.w { border-left-color: #cf4a3c; } .ns-b.a { border-left-color: #2f6fdd; }
.ns-tr { color: var(--muted); font-size: 14px; }
.ns-lucky { font-size: 14px; color: var(--muted); }
.ns-flow { padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--line); margin-bottom: 10px; }
.ns-flow .ns-bh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ns-fl { margin: 4px 0 0; font-size: 15px; }
.ns-fl .up { color: #b42318; } .ns-fl .dn { color: #1f4fb3; }
.ns-more { margin: 4px 0 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.ns-more > summary { cursor: pointer; font-weight: 700; }
@media (max-width: 620px) {
  .ns-hero { flex-direction: column; align-items: stretch; text-align: left; }
  .ns-day { flex-direction: row; justify-content: flex-start; gap: 10px; }
  .ns-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ns-three { grid-template-columns: 1fr; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ns-t.good { background: #12301d; border-color: #5fc17d; } :root:not([data-theme="light"]) .ns-t.good .ns-v { color: #aef0c1; }
  :root:not([data-theme="light"]) .ns-t.bad { background: #3a1613; border-color: #ff7b80; } :root:not([data-theme="light"]) .ns-t.bad .ns-v { color: #ffc9c4; }
  :root:not([data-theme="light"]) .ns-t.warn { background: #3a2c0b; border-color: #e0b040; } :root:not([data-theme="light"]) .ns-t.warn .ns-v { color: #ffe9a8; }
  :root:not([data-theme="light"]) .ns-fl .up { color: #ff9a8f; } :root:not([data-theme="light"]) .ns-fl .dn { color: #8fb4ff; }
}
:root[data-theme="dark"] .ns-t.good { background: #12301d; border-color: #5fc17d; } :root[data-theme="dark"] .ns-t.good .ns-v { color: #aef0c1; }
:root[data-theme="dark"] .ns-t.bad { background: #3a1613; border-color: #ff7b80; } :root[data-theme="dark"] .ns-t.bad .ns-v { color: #ffc9c4; }
:root[data-theme="dark"] .ns-t.warn { background: #3a2c0b; border-color: #e0b040; } :root[data-theme="dark"] .ns-t.warn .ns-v { color: #ffe9a8; }
:root[data-theme="dark"] .ns-fl .up { color: #ff9a8f; } :root[data-theme="dark"] .ns-fl .dn { color: #8fb4ff; }

/* 브랜드 이름 「운명치유연구소」(8글자) — 한 줄로, 좁은 화면에서는 글자를 줄인다 */
.brand-text strong { white-space: nowrap; font-size: 36px; }
.brand-text { min-width: 0; }
@media (max-width: 620px) { .brand-text strong { font-size: 25px; letter-spacing: 0; } .brand { gap: 8px; min-width: 0; } .join-link { padding: 6px 10px; font-size: 13px; } }
@media (max-width: 400px) { .brand-text strong { font-size: 22px; } }
@media (max-width: 620px) { .brand-text strong { white-space: normal; font-size: 27px; line-height: 1.02; max-width: 7.2em; } }
@media (max-width: 400px) { .brand-text strong { font-size: 25px; } }

/* 명식표 · 대운 · 세운 · 월운 칸의 간지 타일: 한자 아래에 한글 음 */
.ms-t.rd { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; line-height: 1; }
.ms-t.rd i { font: 700 .34em/1 var(--sans); font-style: normal; letter-spacing: -.02em; }
.ms-cell .ms-t.rd i { font-size: .36em; }
@media (max-width: 520px) { .ms-cell .ms-t.rd i { font-size: .4em; } }

/* 일진 · 월운 종합 감정(원국과 함께): 12운성 · 신살 · 귀인 · 공망 · 천간 합충 · 원진 */
.lf-box .lf-verdict { margin: 8px 0 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--brand, #6b4bb3) 9%, transparent); border-left: 4px solid var(--brand, #6b4bb3); line-height: 1.7; }
.lf-box .lf-h { margin: 12px 0 4px; font-size: 14px; }
.lf-chips { margin: 4px 0 2px; }
.lf-chips .chip.lf-good { background: #fbe3df; color: #8c1d12; border-color: #e7a79c; }
.lf-chips .chip.lf-bad { background: #dfe7f7; color: #1f3f86; border-color: #9fb4de; }
.lf-chips .chip.lf-mix { background: #f3ecd9; color: #5b4a20; border-color: #d8c79a; }
.lf-box .tag.mix { background: #efe6cc; color: #5b4a20; }
:root[data-theme="dark"] .lf-box .tag.mix { background: #3a3220; color: #f0e2b8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lf-chips .chip.lf-good { background: #4a1f1a; color: #ffd0c8; border-color: #8c3a2e; }
  :root:not([data-theme="light"]) .lf-chips .chip.lf-bad { background: #1c2a4a; color: #cbdaff; border-color: #3d5590; }
  :root:not([data-theme="light"]) .lf-chips .chip.lf-mix { background: #3a3220; color: #f0e2b8; border-color: #6e5f36; }
}
:root[data-theme="dark"] .lf-chips .chip.lf-good { background: #4a1f1a; color: #ffd0c8; border-color: #8c3a2e; }
:root[data-theme="dark"] .lf-chips .chip.lf-bad { background: #1c2a4a; color: #cbdaff; border-color: #3d5590; }
:root[data-theme="dark"] .lf-chips .chip.lf-mix { background: #3a3220; color: #f0e2b8; border-color: #6e5f36; }

/* 지문 · 문형 비율 풀이(#/finger) */
.fp-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 10px 0; }
.fp-t { display: grid; justify-items: center; gap: 2px; padding: 8px 6px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface-2); text-align: center; color: var(--seal); }
.fp-t b { color: var(--text); } .fp-t small { font-size: 12px; color: var(--muted); line-height: 1.35; word-break: keep-all; }
.fp-svg { width: 64px; height: 70px; }
.fp-hand { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fp-f { display: grid; gap: 4px; }
.fp-f select { width: 100%; min-height: 40px; }
.fp-bar { display: inline-block; vertical-align: middle; width: 120px; max-width: 40vw; height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.fp-bar i { display: block; height: 100%; background: var(--seal); }

/* 상단 배너 · 전체 배경(2026-10-31): 사용자가 준 우주 그림. img/header-hero.webp(메달 · 이름 · 문구 띠)를 머리글에, img/bg-cosmos.webp(흐린 전체 그림)를 페이지 배경에 쓴다(tools/make-header.cjs). 링크와 버튼은 진짜 요소를 그림 위에 올린다. */
.top { --th: 190px; position: relative; padding: 0; height: var(--th); background: transparent; overflow: hidden; }
.top::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: calc(var(--th) * 1672 / 385); transform: translateX(-50%); background: url(../img/header-hero.webp) center / 100% 100% no-repeat; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, #000 0, #000 72%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, #000 0, #000 72%, transparent 100%); mask-composite: intersect; }
.top .top-inner { position: relative; z-index: 1; height: 100%; width: min(100%, calc(var(--th) * 1672 / 385)); max-width: none; margin: 0 auto; padding: 10px 14px 0 0; gap: 8px; align-items: flex-start; }
.top .brand { flex: 1; align-self: stretch; min-width: 0; }
.top .brand-logo { display: none; }
.top .brand-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top .brand:focus-visible { outline: 2px solid #f4e3b0; outline-offset: -4px; }
.top .join-link { background: linear-gradient(#6b4bb0, #44307f); color: #f6e7b4 !important; border: 1px solid #c9b0f2 !important; border-radius: 999px; box-shadow: 0 0 0 1px rgba(20, 12, 50, .6), 0 2px 8px rgba(0, 0, 0, .35); font-weight: 500; }
.top .join-link:hover { background: linear-gradient(#7a58c4, #503a92); }
.top .icon-btn, .top .i18n-btn { background: rgba(18, 20, 52, .78); color: #f6e7b4; border: 1px solid rgba(214, 190, 120, .7); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.top .icon-btn:hover, .top .i18n-btn:hover { background: rgba(40, 42, 92, .9); }
@media (max-width: 1099px) { .top { --th: 150px; } }
@media (max-width: 620px) {
  .top { --th: 112px; }
  .top::before { left: 0; transform: none; -webkit-mask-image: linear-gradient(180deg, #000 0, #000 72%, transparent 100%); mask-image: linear-gradient(180deg, #000 0, #000 72%, transparent 100%); -webkit-mask-composite: initial; mask-composite: initial; }
  .top .top-inner { padding: 6px 8px 0 0; }
  .top .join-link { min-height: 28px; padding: 3px 9px; font-size: 12px; }
  .top .icon-btn, .top .i18n-btn { width: 30px; height: 30px; min-width: 30px; min-height: 30px; padding: 0; font-size: 0; justify-content: center; }
  .top .icon-btn { font-size: 15px; }
  .top .i18n-btn span { font-size: 15px; }
  .top .top-actions { gap: 5px; flex-wrap: nowrap; }
  .top .join-link { font-size: 12px; line-height: 1.2; padding: 3px 8px; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
  .top #shopLink { min-width: 30px; padding-inline: 6px; }
  .top .top-actions > .i18n-ui, .top .top-actions > .icon-btn { flex: none; }
}
@media (max-width: 360px) { .top .join-link { font-size: 11px; padding: 3px 6px; } .top .top-actions { gap: 4px; } }
/* 페이지 전체 배경: 우주 그림 + 어두운 막. 한지 질감 · 배경 한자는 숨김. 카드(--surface)는 그대로라 글자 대비는 유지. */
body { background: #0d0f2a; color: #f0e7d3; }
.bg-hanja { background: linear-gradient(rgba(8, 8, 28, .22), rgba(8, 8, 28, .4)), url(../img/bg-cosmos.webp) center / cover no-repeat; box-shadow: none; }
.bg-hanja::before, .bg-hanja .hj { display: none; }
[data-theme-toggle], #themeBtn { display: none !important; }

/* 지문학 — 손가락별 정밀 분류 */
.tbl-wrap { overflow-x: auto; }
.fp-per td, .fp-per th { vertical-align: middle; font-size: 13px; }
.fp-per .fp-svg { width: 28px; height: 30px; vertical-align: middle; margin-right: 4px; }
.fp-fd { margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--surface-2); }
.fp-fd summary { cursor: pointer; }
.fp-hands { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }
.fp-hands figure { margin: 0; text-align: center; }
.fp-handsvg { width: 100%; max-width: 230px; height: auto; }
.fp-hshape rect { fill: var(--surface-2); stroke: var(--line); stroke-width: 2; }
.fp-pt { cursor: pointer; }
.fp-pt circle { fill: var(--seal); stroke: #fff; stroke-width: 2; }
.fp-pt.on circle { fill: #1f6b3a; }
.fp-pt text { font-size: 10px; fill: #fff; font-weight: 700; }
.fp-pt .fp-pn, .fp-pt .fp-pt2 { fill: var(--text); font-size: 8.5px; font-weight: 600; }
.fp-pt:focus circle, .fp-pt:hover circle { stroke: #f2c230; stroke-width: 3; }
.fp-sub .fp-t small { font-size: 11px; }
/* 지문 통합 도감 + 팝업 */
.fp-ct { margin: 14px 0 4px; }
.fp-cat { display: grid; gap: 10px; margin: 10px 0; }
.fp-grp { border: 2px solid var(--line); border-radius: 14px; padding: 8px; background: var(--surface-2); display: grid; grid-template-columns: minmax(120px, 150px) 1fr; gap: 8px; align-items: stretch; }
.fp-grp .fp-top { border-color: var(--seal); background: var(--surface); }
.fp-subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.fp-cat .fp-t { cursor: help; transition: transform .12s; }
.fp-cat .fp-t:hover, .fp-cat .fp-t:focus { transform: translateY(-2px); border-color: var(--seal); outline: none; }
.fp-cat .fp-t small { font-size: 11px; }
@media (max-width: 620px) { .fp-grp { grid-template-columns: 1fr; } }
.fp-pop { position: fixed; z-index: 9999; width: min(340px, calc(100vw - 16px)); max-height: 80vh; overflow: auto; background: #2a1206; color: #fbf3df; border: 2px solid #d6ad4a; border-radius: 12px; padding: 10px 14px; box-shadow: 0 8px 26px rgba(0,0,0,.45); font-size: 13px; line-height: 1.5; }
.fp-pop[hidden] { display: none; }
.fp-pop h4 { margin: 0 0 4px; font-size: 16px; color: #ffd978; } .fp-pop h4 small { font-size: 11px; color: #e8d9b4; font-weight: 400; }
.fp-pop dl { margin: 6px 0 0; display: grid; grid-template-columns: 76px 1fr; gap: 3px 8px; }
.fp-pop dt { color: #ffd978; font-weight: 700; } .fp-pop dd { margin: 0; }
.fp-pop .fp-pw { margin: 4px 0; padding: 5px 8px; background: rgba(255, 120, 90, .18); border-radius: 8px; }
.fp-pop .muted { color: #cdbf9d; }
/* 손가락 무늬 고르기 팝업 */
.fp-pick { margin: 8px 0; padding: 10px; border: 2px solid var(--seal); border-radius: 14px; background: var(--surface); }
.fp-pick[hidden] { display: none; }
.fp-pick-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.fp-pick-h .fp-x { margin-left: auto; min-width: 36px; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); cursor: pointer; }
.fp-pick-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; margin-bottom: 8px; }
.fp-pk { display: grid; justify-items: center; gap: 2px; padding: 6px 4px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--seal); cursor: pointer; font: inherit; }
.fp-pk b { color: var(--text); font-size: 13px; } .fp-pk small { font-size: 10.5px; color: var(--muted); }
.fp-pk:hover, .fp-pk:focus, .fp-pk.cur { border-color: var(--seal); background: var(--surface); outline: none; }
.fp-pk .fp-svg { width: 46px; height: 50px; }
.fp-mini { overflow: visible; pointer-events: none; }

/* ───── 수상 정밀 분류 (손 그림 · 도감) ───── */
.pl-fig { margin: 8px auto; max-width: 420px; text-align: center; }
.pl-handsvg { width: 100%; height: auto; display: block; }
.pl-hshape { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.6; }
.pl-lines path { fill: none; }
.pl-pt { cursor: pointer; } .pl-pt circle { stroke: #fff; stroke-width: 1.5; } .pl-pt text { fill: #fff; font-size: 7.5px; font-weight: 700; pointer-events: none; }
.pl-pt:focus-visible circle, .pl-pt:hover circle { stroke: #ffd978; stroke-width: 2.5; }
.pl-cap { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; font-size: 12px; color: var(--muted); }
.pl-cap i, .pl-lg i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 3px; }
.pl-legend { list-style: none; margin: 8px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px; }
.pl-lg { width: 100%; text-align: left; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 6px 8px; font-size: 13px; cursor: pointer; }
.pl-lg i { width: 20px; height: 20px; line-height: 20px; color: #fff; font-size: 11px; font-style: normal; text-align: center; margin: 0; flex: none; }
.pl-cd { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin: 8px 0; background: var(--surface-2); }
.pl-cd > summary { cursor: pointer; line-height: 1.5; }
.pl-sh { margin: 10px 0 4px; }
.pl-mk-row { display: flex; flex-wrap: wrap; gap: 6px; } .pl-mk-row select { flex: 1 1 140px; min-width: 0; }
.pl-mk-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pl-mk-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.pl-mk-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; }
.pl-res .fp-per td { vertical-align: middle; } .pl-res .fp-svg { width: 28px; height: 30px; vertical-align: middle; margin-right: 4px; color: var(--seal); }
.pl-fig { display: block; } .pl-handsvg { max-height: 560px; }
.menu_tipbox:has(dl) { max-width: min(360px, calc(100vw - 16px)); padding: 11px 15px; }
.menu_tipbox .mt-h { display: block; color: #ffd978; font-size: 15px; margin-bottom: 3px; }
.menu_tipbox .mt-s { margin: 0 0 6px; }
.menu_tipbox dl { margin: 0; display: grid; gap: 4px; border-top: 1px solid rgba(214, 173, 74, .45); padding-top: 7px; }
.menu_tipbox dt { color: #ffd978; font-size: 12px; font-weight: 700; } .menu_tipbox dd { margin: 0 0 3px; font-size: 13px; line-height: 1.5; color: #f3e8cc; }

/* 브랜드 작명 — 분류 고르기 */
.an-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr)); gap: 8px; }
.an-cat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 2px solid var(--field-border); border-radius: 12px; background: var(--field-bg); cursor: pointer; }
.an-cat input { position: absolute; opacity: 0; pointer-events: none; }
.an-cat small { color: var(--muted); }
.an-cat.on, .an-cat:has(input:checked) { border-color: var(--seal); box-shadow: 0 0 0 2px var(--seal) inset; }
.an-cat:has(input:focus-visible) { outline: 3px solid var(--seal); outline-offset: 2px; }

/* ───── 처음 화면: 카테고리 10개 + 하위 메뉴 팝업 ───── */
.menu_area { padding: 16px 12px 14px; }
.cat_grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px 8px; }
.cat_btn { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; padding: 8px 4px 9px; border: 1.5px solid #d6ad4a; border-radius: 16px; background: rgba(255, 250, 236, .94); color: #2a1206; font: inherit; cursor: pointer; box-shadow: 0 1px 4px rgba(60, 30, 10, .18); transition: transform .15s, box-shadow .15s, border-color .15s; }
.cat_btn:hover { border-color: #b3261e; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(120, 30, 10, .32); }
.cat_btn:focus-visible { outline: 3px solid #b3261e; outline-offset: 2px; }
.cat_btn:active { transform: scale(.97); }
.cat_btn.on { background: #fff3d6; border: 2.5px solid #b3261e; box-shadow: 0 0 0 3px rgba(179, 38, 30, .22), 0 3px 8px rgba(120, 30, 10, .3); }
.cat_ico { display: block; width: 100%; max-width: 84px; }
.cat_ico img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 25%; box-shadow: 0 3px 8px rgba(60, 30, 90, .22); }
.cat_name { font-size: 14px; font-weight: 800; line-height: 1.25; text-align: center; word-break: keep-all; overflow-wrap: anywhere; }
.cat_btn.on .cat_name { color: #9b1c12; }
@media (max-width: 719px) {
  .cat_grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 7px; }
  .cat_grid li:last-child:nth-child(3n+1) { grid-column: 2; }
  body.mode-pro .cat_grid li:last-child:nth-child(3n+1) { grid-column: auto; } /* 쉬운 모드 전용 칸(결정 상담)이 숨겨져도 번호에는 세어져 빈칸이 생기던 것 */
  .cat_name { font-size: 13px; }
}
/* 휴대폰: 머리 그림은 화면 폭에 딱 맞게, 버튼은 그림 오른쪽 위에 겹쳐 둠 */
@media (max-width: 620px) {
  .top { --bh: calc(100vw * 385 / 1672); height: var(--bh); padding-top: 0; }
  .top::before { width: 100%; height: var(--bh); bottom: auto; background-size: 100% 100%; }
  .top .top-inner { position: absolute; top: 0; right: 0; left: auto; height: auto; width: auto; max-width: 100%; padding: 4px 6px 0 0; flex-wrap: nowrap; justify-content: flex-end; z-index: 3; }
  .top .brand { position: absolute; top: 0; left: 0; width: 100%; height: var(--bh); flex: none; z-index: 1; }
  .top .top-actions { flex-wrap: nowrap; justify-content: flex-end; margin-left: 0; width: auto; }
}
.menu_pop { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 14px; }
.menu_pop[hidden] { display: none; }
.menu_pop_bg { position: absolute; inset: 0; background: rgba(20, 10, 30, .58); backdrop-filter: blur(2px); }
.menu_pop_box { position: relative; width: min(640px, 100%); max-height: min(86vh, 760px); overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px 18px; border: 2px solid #c89b20; border-radius: 20px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); animation: popIn .18s ease-out; outline: none; }
.menu_pop_box .menu_slide { padding: 4px 6px 2px; }
.menu_pop_box .menu_tit { margin-bottom: 12px; }
.menu_pop .menu_li { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 560px) { .menu_pop .menu_li { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.menu_pop_x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 2px solid #f3d36b; background: #a8170f; color: #fff; cursor: pointer; }
.menu_pop_x svg { width: 20px; height: 20px; display: block; }
.menu_pop_x:hover { background: #c81d12; }
.menu_pop_x:focus-visible { outline: 3px solid #b3261e; outline-offset: 2px; }
body.menu-open { overflow: hidden; }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .menu_pop_box { animation: none; } .cat_btn { transition: none; } .cat_btn:hover { transform: none; } }

/* 카테고리 안에 머무는 메뉴 줄: 처음메뉴 + 고른 카테고리의 하위 메뉴(팝업과 같은 큰 타일) */
.cat_grid[hidden], .cat_bar[hidden], .cat_in[hidden] { display: none; }
.cat_top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 12px; }
.cat_top { position: relative; padding-right: 48px; min-height: 40px; }
.cat_top .menu_tit { margin-bottom: 0; }
.cat_x { top: 0; right: 0; }
.cat_bar .menu_li { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 560px) { .cat_bar .menu_li { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 720px) { .cat_bar .menu_li { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* 카테고리 줄에서 지금 메뉴를 강조해도 테두리 두께가 바뀌지 않게(메뉴를 옮길 때 줄 높이가 1~2px 흔들리던 것) */
.cat_bar .menu_li li.on a { border-width: 1.5px; border-color: #b3261e; box-shadow: 0 0 0 2px #b3261e, 0 0 0 5px rgba(179, 38, 30, .22), 0 2px 8px rgba(90, 30, 10, .28); }

/* 작명 · 감명 / 개명을 같은 화면 안에 띄우는 틀(js/app.js EMBED) */
.embed-frame { display: block; width: 100%; border: 0; background: transparent; color-scheme: normal; }

/* 궁합 카테고리 배경(2026-11-02, 사용자가 준 부부 · 봉황 그림 img/menu-bg-match.webp) — 궁합 메뉴 줄이 보일 때만 */
.menu_area[data-bg="match"] { background: url("../img/menu-bg-match.webp") center / cover no-repeat transparent; }
/* 생활운세 카테고리 배경(2026-11-02, 사용자가 준 봉황 · 平安 그림 img/menu-bg-life.webp) */
.menu_area[data-bg="life"] { background: url("../img/menu-bg-life.webp") center / cover no-repeat transparent; }
/* 점술 카테고리 배경(2026-11-02, 사용자가 준 황금 용 · 運數大通 그림 img/menu-bg-jeomsul.webp) */
.menu_area[data-bg="jeomsul"] { background: url("../img/menu-bg-jeomsul.webp") center / cover no-repeat transparent; }
/* 관상학 카테고리 배경(2026-11-02, 사용자가 준 봉황 · 萬事亨通 그림 img/menu-bg-gwansang.webp) */
.menu_area[data-bg="gwansang"] { background: url("../img/menu-bg-gwansang.webp") center / cover no-repeat transparent; }
/* 네이밍 카테고리 배경(2026-11-02, 사용자가 준 봉황 · 一獲千金 그림 img/menu-bg-naming.webp) */
.menu_area[data-bg="naming"] { background: url("../img/menu-bg-naming.webp") center / cover no-repeat transparent; }
/* 명리고전 카테고리 배경(2026-11-02, 사용자가 준 봉황 · 萬事亨通 그림 img/menu-bg-classics.webp) */
.menu_area[data-bg="classics"] { background: url("../img/menu-bg-classics.webp") center / cover no-repeat transparent; }
/* 기문둔갑 카테고리 배경(2026-11-02) — 명리고전과 같은 그림 */
.menu_area[data-bg="qimen"] { background: url("../img/menu-bg-classics.webp") center / cover no-repeat transparent; }

/* 고전 편 화면의 「구절 목록으로」 돌아가기 단추(2026-11-02) + 돌아왔을 때 방금 보던 구절 강조 */
.cl-back { position: fixed; left: 14px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 16px 0 12px; border-radius: 999px; background: #a8170f; color: #fff; border: 2px solid #d6ad4a; box-shadow: 0 4px 14px rgba(60, 20, 10, .4); font-size: 14px; font-weight: 700; text-decoration: none; }
.cl-back svg { width: 22px; height: 22px; flex: none; }
.cl-back:hover, .cl-back:focus-visible { background: #c4201a; color: #fff; outline: 3px solid #fff3d6; outline-offset: 2px; }
.cl-toc li.cl-last > a { outline: 3px solid #b3261e; outline-offset: -1px; border-radius: 8px; background: rgba(214, 173, 74, .22); }

/* 해결 카드(마음 상담) */
.care-cards { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line, #cdb98f); border-radius: 12px; background: rgba(255, 250, 236, .55); }
.care-cards .cc-card { margin: 8px 0; padding: 8px 10px; border: 1px solid var(--line, #cdb98f); border-radius: 10px; background: var(--surface, #fffaf0); }
.care-cards .cc-card summary { cursor: pointer; }
.care-cards .cc-why { display: block; margin: 6px 0 2px; font-size: 13px; color: var(--muted, #5b5346); }
.care-cards .cc-steps { margin: 6px 0 4px; padding-left: 20px; }
.care-cards .cc-steps li { margin: 3px 0; }
.care-cards .cc-esc { margin: 4px 0 0; }
:root[data-theme="dark"] .care-cards { background: rgba(40, 32, 22, .55); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .care-cards { background: rgba(40, 32, 22, .55); } }

/* 고민 해결 노트 */
.care-note h3 { margin: 18px 0 6px; font-size: 16px; }
.care-note ul { margin: 4px 0 8px; padding-left: 20px; }
.care-note li { margin: 4px 0; }
.care-note .cn-week { margin: 6px 0; padding: 8px 10px; border-left: 3px solid var(--line, #cdb98f); }
.care-note .cn-week p { margin: 0 0 2px; }

/* 단계별 상담(마음 상담) 진행 표시 · 명식 확인 */
.gd-steps { list-style: none; display: flex; gap: 6px; margin: 10px 0; padding: 0; counter-reset: none; }
.gd-steps li { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; font-size: 11.5px; line-height: 1.3; color: var(--muted, #5b4a30); }
.gd-steps li b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; border: 1.5px solid var(--field-border, #8f7b58); background: transparent; }
.gd-steps li.done b { background: #2f6f4e; border-color: #2f6f4e; color: #fff; }
.gd-steps li.now b { background: #6b3fa0; border-color: #6b3fa0; color: #fff; box-shadow: 0 0 0 3px rgba(107, 63, 160, .22); }
.gd-steps li.now span { font-weight: 700; color: var(--ink, #2a1a08); }
.gd-pillars { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0; padding: 0; }
.gd-pillars li { text-align: center; padding: 8px 4px; border: 1px solid var(--field-border, #8f7b58); border-radius: 10px; display: flex; flex-direction: column; font-size: 17px; }

/* 추천 흐름 「지금 앞둔 결정이 있나요?」 */
.decide_cta { display: grid; gap: 2px; margin-top: 12px; padding: 12px 16px; border-radius: 14px; background: #fff8e6; border: 2px solid #d6ad4a; color: #2a1206; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.decide_cta[hidden] { display: none; }
.decide_cta b { font-size: 17px; }
.decide_cta small { font-size: 13px; color: #5a3b1e; }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.dc-opt { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--field-border); background: var(--surface, #fff); color: inherit; cursor: pointer; font: inherit; }
.dc-opt:hover, .dc-opt:focus-visible { border-color: #7a5cf5; box-shadow: 0 0 0 2px rgba(122,92,245,.25); }
.dc-opt span { font-size: 24px; }
.dc-opt small { color: var(--muted, #666); }
.dc-card { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--field-border); margin: 8px 0; }
.dc-card.main { border: 2px solid #7a5cf5; }
.dc-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dc-h em { font-style: normal; font-size: 12px; background: #7a5cf5; color: #fff; padding: 1px 8px; border-radius: 99px; }
.dc-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.dc-bundle { padding: 10px 12px; border-radius: 10px; background: rgba(214,173,74,.18); }

/* 사업자 정보 바닥글 (토스페이먼츠 심사: 홈페이지 하단에 상호 · 대표자 · 사업자등록번호 · 주소 · 전화) */
.biz-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.biz-foot p { margin: 4px 0; }
.biz-foot a { color: var(--muted); text-decoration: underline; }

/* 쇼핑 중 장바구니: 메뉴 타일의 가격 · 담기 단추, 구석의 장바구니 */
.menu_li li { position: relative; }
.menu_li li > .mt-cart { display: block; width: 100%; margin-top: 4px; padding: 3px 4px; font: inherit; font-size: 12px; font-weight: 700; line-height: 1.3; border-radius: 999px; border: 1.5px solid #b3261e; background: #fff; color: #9b1c12; cursor: pointer; min-height: 28px; }
.menu_li li > .mt-cart del { color: #777; font-weight: 400; }
.menu_li li > .mt-cart.in { background: #b3261e; color: #fff; }
.cart-fab { position: fixed; right: 14px; bottom: 14px; z-index: 70; display: inline-flex; gap: 6px; align-items: center; padding: 12px 18px; border-radius: 999px; background: #b3261e; color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; box-shadow: 0 6px 18px rgba(90, 30, 10, .4); border: 2px solid #f1d27a; }
.cart-fab b { background: #fff; color: #b3261e; border-radius: 999px; padding: 0 8px; }
.cart-fab[hidden] { display: none; }
body.has-tabs .cart-fab { bottom: calc(76px + env(safe-area-inset-bottom)); }

/* ───── SNS 로그인 팝업 ───── */
.sns-pop { position: fixed; inset: 0; z-index: 1100; background: rgba(20, 12, 4, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sns-box { position: relative; width: min(380px, 100%); background: var(--surface, #fffaf0); color: var(--ink, #2a1a08); border: 2px solid var(--gold, #c9a24a); border-radius: 18px; padding: 24px 20px 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); text-align: center; }
.sns-box h2 { margin: 0 0 6px; font-size: 20px; }
.sns-x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 18px; cursor: pointer; }
.sns-row { display: flex; justify-content: center; gap: 22px; margin: 18px 0 8px; }
.sns-ic { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: inherit; font-size: 13px; font-weight: 700; min-width: 64px; }
.sns-dot { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(0, 0, 0, .18); box-shadow: 0 3px 8px rgba(0, 0, 0, .25); transition: transform .15s; }
.sns-ic:hover .sns-dot, .sns-ic:focus-visible .sns-dot { transform: translateY(-3px); }
.sns-ic:focus-visible { outline: 3px solid var(--seal, #a8170f); outline-offset: 4px; border-radius: 12px; }
.sns-ic.off { opacity: .55; }
.sns-msg { min-height: 1.4em; color: var(--seal, #a8170f); }

/* ───── 우주 컨셉 통일(2026-11-09): 머리 그림(보랏빛 은하 + 금빛 장식)에 맞춰 메뉴 · 카드 · 글자 영역을 남보라 유리 + 금 테두리로 ───── */
:root[data-theme="dark"], :root:not([data-theme="light"]) {
  --surface: #181640; --surface-2: #221e55; --line: #5a4a9c; --ink: #f4eeff; --muted: #cfc4ee;
  --brand: #9a78ff; --accent: #ffd978; --accent-soft: #2f2878; --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(5, 3, 30, .5), 0 10px 28px rgba(8, 4, 40, .5);
  --field-bg: #12103a; --field-border: #8c78d6; --field-ph: #b3a6dd;
}
.card, .lt-card, .lt-hero { border-color: rgba(176, 150, 255, .42); background: linear-gradient(165deg, rgba(36, 30, 92, .94), rgba(18, 16, 56, .96)); }
.lt-hero { border-color: rgba(214, 173, 74, .55); }
/* 카테고리 · 메뉴 타일 */
.cat_btn, .menu_li a { background: linear-gradient(165deg, rgba(70, 50, 150, .95), rgba(26, 20, 78, .96)); border: 1.5px solid #d6ad4a; color: #f8e9b8; box-shadow: 0 2px 8px rgba(6, 3, 34, .55), inset 0 1px 0 rgba(255, 235, 170, .25); }
.menu_li a span, .cat_name { color: #f8e9b8; }
.cat_btn:hover, .menu_li a:hover { border-color: #ffe08a; box-shadow: 0 6px 16px rgba(120, 90, 255, .45), inset 0 1px 0 rgba(255, 235, 170, .3); }
.cat_btn:focus-visible, .menu_li a:focus-visible { outline-color: #ffe08a; }
.cat_btn.on, .menu_li li.on a { background: linear-gradient(165deg, #6a4be0, #3a2a9c); border: 2.5px solid #ffe08a; box-shadow: 0 0 0 3px rgba(255, 224, 138, .25), 0 0 18px rgba(154, 120, 255, .6); }
.cat_btn.on .cat_name, .menu_li li.on a span { color: #fff6d6; }
.cat_bar .menu_li li.on a { border-color: #ffe08a; box-shadow: 0 0 0 2px #ffe08a, 0 0 18px rgba(154, 120, 255, .6); }
/* 쉬운 모드: 큰 고민 칸 · 세부 고민 · 안내 상자 · 입력칸 */
.lt-groups .lt-pick.lt-grp { background: linear-gradient(165deg, rgba(74, 52, 160, .96), rgba(28, 22, 84, .97)); border: 1.5px solid #d6ad4a; color: #f8e9b8; box-shadow: 0 2px 8px rgba(6, 3, 34, .55), inset 0 1px 0 rgba(255, 235, 170, .25); }
.lt-groups .lt-pick.lt-grp[aria-pressed="true"] { background: linear-gradient(165deg, #6a4be0, #3a2a9c); border-color: #ffe08a; color: #fff6d6; box-shadow: 0 0 0 3px rgba(255, 224, 138, .25), 0 0 18px rgba(154, 120, 255, .6); }
.lt-subpanel { background: rgba(40, 32, 110, .78); border-color: #d6ad4a; }
.lt-subpanel::before { background: #282070; border-color: #d6ad4a; }
.lt-subs .lt-pick { background: rgba(24, 20, 70, .95); border: 1px solid #8c78d6; color: #f4eeff; }
.lt-subs .lt-pick:hover { border-color: #ffe08a; }
.lt-subs .lt-pick[aria-pressed="true"] { background: #ffe9a8; color: #2a1a60; border-color: #ffe9a8; font-weight: 800; }
.lt-freebox { background: rgba(20, 16, 64, .9); border-color: rgba(176, 150, 255, .5); }
.lt-btn { background: linear-gradient(165deg, #8d68ff, #5a3fd0); box-shadow: 0 2px 10px rgba(110, 80, 240, .5); }
.lt-btn.ghost { background: transparent; color: #ffe08a; border-color: #d6ad4a; box-shadow: none; }
.lt-note, .lt-funnel { border-color: #d6ad4a; background: rgba(46, 38, 118, .72); }
.lt-reading { border-left-color: #ffd978; }
/* 아래 탭 바 */
.bnav { background: linear-gradient(180deg, rgba(36, 28, 98, .97), rgba(14, 10, 48, .98)); border-top: 1.5px solid #d6ad4a; box-shadow: 0 -6px 22px rgba(6, 3, 34, .6); }
.tb-tab { color: #cfc4ee; }
.tb-tab.on { color: #ffe08a; background: rgba(154, 120, 255, .28); box-shadow: inset 0 0 0 1px rgba(255, 224, 138, .5); }
.tb-item { background: linear-gradient(165deg, rgba(48, 38, 120, .95), rgba(22, 18, 66, .96)); border-color: rgba(214, 173, 74, .6); }
.tb-ico { background: rgba(154, 120, 255, .25); }
/* 팝업 · 안내 말풍선 */
.sns-box { background: linear-gradient(165deg, #2a2178, #14103e); border-color: #d6ad4a; color: #f4eeff; }
.sns-box h2 { color: #ffe08a; }

/* 한자 위의 한글음(ruby)은 모두 노랑 */
ruby rt, .ich-c rt { color: #ffd84a; font-weight: 700; }
/* 명식표 머리칸 · 라벨칸을 우주 남보라로 통일(오방색 간지 타일은 그대로) */
.ms-info, .ms-rh, .ms-sum b { background: #2a2370; }
.ms-rh, .ms-sum b { color: #e6dcff; }
.ms-badge { background: #3a2f8c; color: #f4eeff; }
.ms-info { border-color: rgba(176, 150, 255, .45); }

/* 쉬운 모드 고민 고르기: 선택한 칸 · 하부 메뉴 = 녹색 바탕 + 노랑 테두리, 직접 적는 칸 = 진한 녹색 */
.lt-groups .lt-pick.lt-grp[aria-pressed="true"] { background: linear-gradient(165deg, #12822a, #0a5a1a); border: 2.5px solid #ffe14a; color: #fff9d0; box-shadow: 0 0 0 3px rgba(255, 225, 74, .25), 0 0 16px rgba(40, 200, 90, .45); }
.lt-subpanel { background: #0b6a1c; border: 2px dashed #ffe14a; }
.lt-subpanel::before { background: #0b6a1c; border-left: 2px dashed #ffe14a; border-top: 2px dashed #ffe14a; }
.lt-freebox textarea { background: #053d10; color: #f4fff0; border: 2px solid #ffe14a; }
.lt-freebox textarea::placeholder { color: #a9d9b2; }
.lt-freebox textarea:focus { outline: 3px solid rgba(255, 225, 74, .5); outline-offset: 1px; }
/* 선택한 세부 고민: 흰 바탕 대신 밝은 녹색 + 노랑 테두리 */
.lt-subs .lt-pick[aria-pressed="true"] { background: #1fa043; color: #fff; border: 2px solid #ffe14a; font-weight: 800; box-shadow: 0 0 10px rgba(255, 225, 74, .45); }
/* 하부 메뉴의 세부 고민 칩: 하부 메뉴 영역과 같은 녹색 바탕(노랑 테두리로 구분) */
.lt-subs .lt-pick { background: #0b6a1c; color: #f4fff0; border: 1.5px solid rgba(255, 225, 74, .7); }
.lt-subs .lt-pick:hover { background: #12822a; border-color: #ffe14a; }
/* 선택 메뉴 · 하부 메뉴 테두리: 또렷한 노랑 실선 */
.lt-groups .lt-pick.lt-grp[aria-pressed="true"] { border: 3px solid #ffe600; box-shadow: 0 0 0 2px rgba(255, 230, 0, .3), 0 0 16px rgba(40, 200, 90, .45); }
.lt-subpanel { border: 3px solid #ffe600; }
.lt-subpanel::before { border-left: 3px solid #ffe600; border-top: 3px solid #ffe600; }

/* 명리고전 · 기문둔갑 구매 패널 + 구매 팝업 */
.buy-panel { border: 2px solid #d6ad4a; background: color-mix(in srgb, var(--surface) 92%, #f2c230); }
.buy-panel.own { border-color: #3b8a4a; }
.buy-panel h3 { margin: 0 0 4px; }
.buy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0 10px; }
.buy-card { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 16px 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); }
.buy-card.best { border-color: #b3261e; box-shadow: 0 0 0 2px rgba(179, 38, 30, .18); }
.buy-tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #b3261e; color: #fff; font-size: 12px; font-weight: 700; padding: 1px 10px; border-radius: 999px; white-space: nowrap; }
.buy-nm { font-weight: 700; }
.buy-pr del { color: var(--muted); font-size: 13px; } .buy-pr b { font-size: 19px; }
.buy-evt { font-size: 12px; color: #b3261e; font-weight: 700; }
.buy-ul { margin: 6px 0 0; padding-left: 18px; }
body.buy-open { overflow: hidden; }
.buy-modal { position: fixed; inset: 0; z-index: 1100; background: rgba(20, 12, 4, .6); display: flex; align-items: center; justify-content: center; padding: 12px; }
.buy-box { position: relative; width: min(560px, 100%); height: min(760px, 94vh); background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }
.buy-frame { width: 100%; height: 100%; border: 0; display: block; background: var(--surface); }
.buy-x { position: absolute; top: 8px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 16px; cursor: pointer; }

.lock-box { height: auto; max-height: 94vh; overflow: auto; }
.lock-box .feat-lock { margin: 0; border: 0; box-shadow: none; padding-top: 44px; }

/* 명리고전 무료/유료 배지 */
.cl-badge, .menu_li li > .mt-badge { display: inline-block; font-size: 11px; font-weight: 800; line-height: 1.3; padding: 1px 8px; border-radius: 999px; vertical-align: middle; border: 1.5px solid; }
.menu_li li > .mt-badge { display: block; width: fit-content; margin: 4px auto 0; }
.cl-badge.free, .mt-badge.free { background: #e3f4e5; color: #14612a; border-color: #2e8b47; }
.cl-badge.pre, .mt-badge.pre { background: #fff3d6; color: #7a4a00; border-color: #c98a12; }
.cl-badge.paid, .mt-badge.paid { background: #f1e6e4; color: #8a1c12; border-color: #b3261e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cl-badge.free, :root:not([data-theme="light"]) .mt-badge.free { background: #123a1d; color: #9be3ae; border-color: #3a9b57; } :root:not([data-theme="light"]) .cl-badge.pre, :root:not([data-theme="light"]) .mt-badge.pre { background: #3d2c08; color: #f3cf7a; border-color: #b8860b; } :root:not([data-theme="light"]) .cl-badge.paid, :root:not([data-theme="light"]) .mt-badge.paid { background: #3a1511; color: #f2a39b; border-color: #c4443a; } }
:root[data-theme="dark"] .cl-badge.free, :root[data-theme="dark"] .mt-badge.free { background: #123a1d; color: #9be3ae; border-color: #3a9b57; }
:root[data-theme="dark"] .cl-badge.pre, :root[data-theme="dark"] .mt-badge.pre { background: #3d2c08; color: #f3cf7a; border-color: #b8860b; }
:root[data-theme="dark"] .cl-badge.paid, :root[data-theme="dark"] .mt-badge.paid { background: #3a1511; color: #f2a39b; border-color: #c4443a; }

/* 고전 책 화면: 카테고리 메뉴를 숨기고 「책 메뉴」 단추로 돌아감 */
body.cl-focus #menu { display: none; }
.cl-menubtn { position: fixed; left: 14px; bottom: 18px; z-index: 61; display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 18px; border-radius: 999px; background: #2a1206; color: #fff3d6; border: 2px solid #d6ad4a; box-shadow: 0 4px 14px rgba(60, 20, 10, .4); font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.cl-menubtn[hidden] { display: none; }
.cl-menubtn:hover, .cl-menubtn:focus-visible { background: #4a2410; outline: 3px solid #fff3d6; outline-offset: 2px; }
body.cl-focus .cl-back { bottom: 74px; }
body.has-tabs .cl-menubtn { bottom: 76px; }
body.has-tabs.cl-focus .cl-back { bottom: 132px; }

/* ===== 로열 블루 메시지 상자 (2026-11-12, 사용자 요청) =====
   기본색 #00289B(로열 블루). 상황별 4가지: 진하게(.rb, 기본) · 아주 진하게(.rb-deep) · 연하게(.rb-soft) · 투명 유리(.rb-glass).
   진한 상자는 안쪽 색 토큰(--ink · --muted · --brand …)을 밝은 쪽으로 덮어써서 안의 글자 · 칩 · 표가 저절로 읽히게 한다. */
:root { --rb: #00289b; --rb-hi: #1544c4; --rb-lo: #001a6e; --rb-ink: #f4f7ff; --rb-gold: #e8c874; }
.msg.bot, .msg.me, .tmsg, .tstory, .rb, .rb-deep, .rb-glass {
  --ink: var(--rb-ink); --muted: #b9c6f5; --brand: #9bb8ff; --accent: #bcd0ff; --accent-soft: rgba(255, 255, 255, .13);
  --surface: rgba(255, 255, 255, .11); --surface-2: rgba(255, 255, 255, .08); --line: rgba(166, 190, 255, .38); --seal: #ffb9b9;
  color: var(--rb-ink); position: relative; isolation: isolate;
  border: 1px solid rgba(166, 190, 255, .42);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, .16) 0, rgba(255, 255, 255, 0) 55%),
    linear-gradient(145deg, var(--rb-hi) 0%, var(--rb) 52%, var(--rb-lo) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 26px rgba(0, 28, 120, .30);
}
.msg.bot, .msg.me, .tmsg, .tstory { border-radius: 16px; }
.msg.me { background: linear-gradient(145deg, #2a5bdd 0%, #123bb3 60%, var(--rb) 100%); border-color: rgba(190, 210, 255, .5); }
.msg.bot .who, .msg .closing { color: var(--rb-gold); }
.tmsg .kw { color: var(--rb-gold); }
.tmsg .timg { background: rgba(255, 255, 255, .10); border-color: rgba(166, 190, 255, .4); }
.msg.bot a, .tmsg a, .tstory a { color: #cfdcff; }
.msg.typing span { background: #b9c6f5; }
/* 아주 진하게(강조 · 총평) */
.rb-deep { background: radial-gradient(110% 80% at 100% 0%, rgba(80, 120, 255, .30) 0, rgba(80, 120, 255, 0) 60%), linear-gradient(160deg, var(--rb) 0%, var(--rb-lo) 70%, #000f45 100%); }
/* 투명 유리 — 배경이 비치는 반투명 */
.rb-glass { background: linear-gradient(145deg, rgba(21, 68, 196, .62), rgba(0, 40, 155, .46)); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 24px rgba(0, 28, 120, .18); }
/* 연하게 — 안내 · 메모 · 알림(글자는 원래 진한 색 그대로) */
.notice, .note-box, .rb-soft {
  background: linear-gradient(135deg, rgba(0, 40, 155, .11) 0%, rgba(0, 40, 155, .045) 60%, rgba(0, 40, 155, .02) 100%);
  border: 1px solid rgba(0, 40, 155, .26); border-left: 4px solid var(--rb);
  box-shadow: 0 2px 10px rgba(0, 40, 155, .07);
}
.notice, .rb-soft { border-style: solid; border-radius: 12px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .notice, :root:not([data-theme="light"]) .note-box, :root:not([data-theme="light"]) .rb-soft { background: linear-gradient(135deg, rgba(60, 100, 235, .30), rgba(0, 40, 155, .16)); border-color: rgba(140, 170, 255, .42); border-left-color: #6f95ff; }
}
:root[data-theme="dark"] .notice, :root[data-theme="dark"] .note-box, :root[data-theme="dark"] .rb-soft { background: linear-gradient(135deg, rgba(60, 100, 235, .30), rgba(0, 40, 155, .16)); border-color: rgba(140, 170, 255, .42); border-left-color: #6f95ff; }
@media print { .msg.bot, .msg.me, .tmsg, .tstory, .rb, .rb-deep, .rb-glass { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* 정통사주 화면 전체(소개 · 모든 카드)도 로열 블루 상자로 (2026-11-12, 사용자 요청) */
body[data-route] #pageHead, body[data-route] :is(#panel, main, #panel > [id]) > .card {
  --paper-hi: #0b2f9a;
  --ink: var(--rb-ink); --muted: #b9c6f5; --brand: #9bb8ff; --accent: #bcd0ff; --accent-soft: rgba(255, 255, 255, .13);
  --surface: rgba(255, 255, 255, .11); --surface-2: rgba(255, 255, 255, .08); --line: rgba(166, 190, 255, .38); --seal: #ffb9b9;
  color: var(--rb-ink); border: 1px solid rgba(166, 190, 255, .42);
  background: radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, .16) 0, rgba(255, 255, 255, 0) 55%), linear-gradient(145deg, var(--rb-hi) 0%, var(--rb) 52%, var(--rb-lo) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 26px rgba(0, 28, 120, .30);
}
body[data-route] :is(#panel, main, #panel > [id]) > .card a { color: #cfdcff; }
body[data-route] :is(#panel, main, #panel > [id]) > .card button { color: var(--rb-ink); }
body[data-route] :is(#panel, main, #panel > [id]) > .card button.btn.primary, body[data-route] :is(#panel, main, #panel > [id]) > .card .btn.primary { background: #fff; color: var(--rb); }
/* 바닥글도 로열 블루 상자 */
html:root footer.foot.wrap {
  --ink: var(--rb-ink); --muted: #b9c6f5; color: var(--rb-ink); border: 1px solid rgba(166, 190, 255, .42); border-radius: 16px; padding: 18px;
  background: radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, .14) 0, rgba(255, 255, 255, 0) 55%), linear-gradient(145deg, var(--rb-hi) 0%, var(--rb) 52%, var(--rb-lo) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 10px 26px rgba(0, 28, 120, .28);
}
html:root footer.foot.wrap p, html:root footer.foot.wrap small, .foot.wrap p { color: var(--rb-ink); text-shadow: none; }
.foot.wrap a { color: #cfdcff; }
/* 파란 상자 안의 위험·경고 칸과 자미두수 명반 칸도 파란 계열로 */
body[data-route] .card .rf-list li.rf-danger, body[data-route] .card .dsj-risk { background: rgba(255, 110, 100, .22) !important; border-color: rgba(255, 170, 160, .65) !important; }
body[data-route] .card .rf-list li.rf-warn { background: rgba(255, 190, 90, .20) !important; border-color: rgba(255, 215, 150, .65) !important; }
body[data-route] .card .rf-list li.rf-info { background: rgba(255, 255, 255, .09) !important; border-color: rgba(166, 190, 255, .4) !important; }
body[data-route] .card .rf-why { color: var(--rb-ink); }
body[data-route] .card .rf-t b, body[data-route] .card .rf-list li.rf-warn .rf-t b { color: #ffe3a8; }
body[data-route] .card .zw-cell { background: rgba(255, 255, 255, .09); border-color: rgba(166, 190, 255, .5); }
body[data-route] .card .zw-cell.sel { background: rgba(255, 255, 255, .22); outline-color: #e8c874; }
body[data-route] .card .zw-cell.tri, body[data-route] .card .zw-cell.opp { background: rgba(255, 255, 255, .15); border-color: rgba(200, 215, 255, .7); }
body[data-route] .card .zw-st { color: #d8e3ff; }

/* 로열 블루: 종합 요약 타일(용신·기신 등)도 파란 바탕에 의미 색은 테두리·글자로 */
body[data-route] .card .ns-t.good,
body[data-route] .card .ns-t.bad,
body[data-route] .card .ns-t.warn {
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
}
body[data-route] .card .ns-t.good { border-color: #7be0a0; }
body[data-route] .card .ns-t.bad { border-color: #ff9a8f; }
body[data-route] .card .ns-t.warn { border-color: #f0cf6a; }

/* 로열 블루: 해결 카드 묶음 */
html:root body[data-route] .care-cards {
  background: radial-gradient(120% 90% at 0% 0%, rgba(255,255,255,.14), transparent 55%), linear-gradient(145deg, #1544c4, #00289b 52%, #001a6e);
  color: #f4f7ff; border-color: rgba(255,255,255,.28);
}
html:root body[data-route] .care-cards .cc-card {
  background: rgba(255,255,255,.12); color: #f4f7ff; border-color: rgba(255,255,255,.28);
}
html:root body[data-route] .care-cards .cc-why { color: #c3cff7; }
html:root body[data-route] .care-cards a { color: #cfdcff; }

/* 로열 블루: 자미두수 사화 칩 글자색을 파란 바탕에서 읽히게 */
html:root body[data-route] .card .zw-hchip.lu { color: #8ff0a4; }
html:root body[data-route] .card .zw-hchip.quan { color: #ffc27a; }
html:root body[data-route] .card .zw-hchip.ke { color: #a9ccff; }

/* 로열 블루: 밝은 화면 모드에서도 파란 카드 안의 의미 색 글자가 읽히게(어두운 모드 색을 그대로 씀) */
html:root[data-theme="light"] body[data-route] .card .ns-t.good .ns-v { color: #aef0c1; }
html:root[data-theme="light"] body[data-route] .card .ns-t.bad .ns-v { color: #ffc9c4; }
html:root[data-theme="light"] body[data-route] .card .ns-t.warn .ns-v { color: #ffe9a8; }
html:root[data-theme="light"] body[data-route] .card .ms-jl { color: #a9ccff; }
html:root[data-theme="light"] body[data-route] .card .ms-rel.hap { color: #8ff0a4; }
html:root[data-theme="light"] body[data-route] .card .ms-rel.chung { color: #ff9a8f; }
html:root[data-theme="light"] body[data-route] .card .ms-rel.etc { color: #c3cff7; }
html:root[data-theme="light"] body[data-route] .card .gd-it.lv-danger .gd-t { color: #ff9a8f; }
html:root[data-theme="light"] body[data-route] .card .gd-it.lv-warn .gd-t { color: #ffcc80; }
html:root[data-theme="light"] body[data-route] .card .zw-sub.lucky { color: #8ff0a4; }
html:root[data-theme="light"] body[data-route] .card .zw-sub.bad { color: #d4dcf5; }
html:root[data-theme="light"] body[data-route] .card .zw-yr { color: #ff9a8f; }
html:root[data-theme="light"] body[data-route] .card .zw-risk { color: #a9ccff; }
html:root[data-theme="light"] body[data-route] .card .muted, html:root[data-theme="light"] body[data-route] .card small { color: #c3cff7; }

/* 로열 블루: 밝은 모드 — 카드 밖·안 어디서든 어두운 글자 보정 */
html:root[data-theme="light"] body[data-route] #panel .muted, html:root[data-theme="light"] body[data-route] #panel small.muted, html:root[data-theme="light"] body[data-route] #panel .dm-note, html:root[data-theme="light"] body[data-route] #panel .tj-note, html:root[data-theme="light"] body[data-route] #panel .ly-cnt, html:root[data-theme="light"] body[data-route] #panel .ly-pos { color: #c3cff7; }
html:root[data-theme="light"] body[data-route] #panel .dsj-risk, html:root[data-theme="light"] body[data-route] #panel .dsj-risk span { color: #ffc9c4; }
html:root[data-theme="light"] body[data-route] #panel .zd-head.good { color: #ffd2a8; } html:root[data-theme="light"] body[data-route] #panel .zd-head.bad { color: #ffb3a8; }
html:root[data-theme="light"] body[data-route] #panel p.P, html:root[data-theme="light"] body[data-route] #panel .P { color: #ffc9c4; }
html:root[data-theme="light"] body[data-route] #panel .up { color: #ff9a8f; } html:root[data-theme="light"] body[data-route] #panel .dn { color: #a9ccff; }
html:root[data-theme="light"] body[data-route] #panel .e0 { color: #8ff0a4; } html:root[data-theme="light"] body[data-route] #panel .e1 { color: #ff9a8f; }
html:root[data-theme="light"] body[data-route] #panel .gz.el1 { color: #ff9a8f; } html:root[data-theme="light"] body[data-route] #panel .gz.el2 { color: #ffd37a; } html:root[data-theme="light"] body[data-route] #panel .gz.el3 { color: #dfe6f5; } html:root[data-theme="light"] body[data-route] #panel .gz.el4 { color: #a9ccff; }
html:root[data-theme="light"] body[data-route] #panel .tj-verse p { color: #ffd9a8; }
html:root[data-theme="light"] body[data-route] #panel .e2 { color: #ffd37a; } html:root[data-theme="light"] body[data-route] #panel .e3 { color: #e6ecfb; } html:root[data-theme="light"] body[data-route] #panel .e4 { color: #a9ccff; }

/* 명식표: 남보라 라벨칸 · 칸 바탕을 로열 블루 카드와 같은 계열로(반투명 흰 막) */
html:root body[data-route] .ms-info, html:root body[data-route] .ms-rh, html:root body[data-route] .ms-sum b { background: rgba(255, 255, 255, .10); color: #e8efff; }
html:root body[data-route] .ms-info { border-color: rgba(255, 255, 255, .28); }
html:root body[data-route] .ms-grid, html:root body[data-route] .ms-col { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .22); }
html:root body[data-route] .ms-rh { border-color: rgba(255, 255, 255, .22); }
html:root body[data-route] .ms-sum, html:root body[data-route] .ms-sum > div { border-color: rgba(255, 255, 255, .22); }
html:root body[data-route] .ms-sum span { background: transparent; }
html:root body[data-route] .ms-badge { background: rgba(255, 255, 255, .16); color: #f4f7ff; }

/* ── 달력 플러스: 길흉 등급 · 궁합 택일 ── */
.cpg { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 3px; border-radius: 9px; font-size: 11px; font-weight: 800; line-height: 1; color: #fff; border: 1.5px solid rgba(255, 255, 255, .85); }
.cpg.gA { background: #b3120a; }
.cpg.gB { background: #e8574a; }
.cpg.gC { background: #7b8494; }
.cpg.gD { background: #2f56b8; }
.cell > .cpg { position: absolute; top: 3px; right: 3px; }
.cpg.lg { height: auto; min-width: 0; padding: 3px 10px; font-size: 14px; border-radius: 999px; vertical-align: middle; }
.cell .cpk { font-size: 9.5px; font-weight: 700; line-height: 1.2; padding: 0 4px; border-radius: 6px; background: rgba(0, 0, 0, .55); color: #fff; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 620px) { .cell .cpk { display: none; } .cell > .cpg { min-width: 14px; height: 14px; font-size: 9.5px; top: 2px; right: 2px; } }
.cp-modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.cp-mode { flex: 1 1 130px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.cp-mode.on { background: #fff !important; color: #00289b !important; border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.cp-mode.on * { color: #00289b !important; opacity: 1 !important; }
.cp-partner { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cp-partner select, .cp-ovsel select { min-height: 38px; padding: 4px 8px; border-radius: 10px; }
.cp-ov { margin-top: 12px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; padding: 8px 12px; }
.cp-ov summary { cursor: pointer; font-weight: 700; }
.cp-ovrow { margin: 8px 0; display: grid; gap: 4px; }
.cp-ovsel { display: flex; flex-wrap: wrap; gap: 10px; }
.cp-top { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.cp-h { margin: 0 0 6px; font-size: 15px; }
.cp-picks { display: grid; gap: 6px; }
.cp-pick { display: grid; grid-template-columns: auto auto auto 1fr; gap: 6px; align-items: center; text-align: left; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: inherit; font: inherit; cursor: pointer; }
.cp-pick:hover { background: rgba(255, 255, 255, .2); }
.cp-pick em { font-style: normal; font-weight: 800; }
.cp-pick small { grid-column: 1 / -1; opacity: .85; }
.cp-pick small:empty { display: none; }
.cp-detail { scroll-margin-top: 12px; }
.cp-sc { font-weight: 800; font-size: 15px; margin-left: 6px; }
.cp-areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.cp-area { padding: 10px 12px; border-radius: 12px; background: rgba(127, 127, 127, .12); border: 1px solid rgba(127, 127, 127, .25); }
.cp-area h4 { margin: 0 0 4px; font-size: 14.5px; }
.cp-area p { margin: 0; font-size: 14px; line-height: 1.65; }
.cp-lucky { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 8px 0; }
.cp-lucky div { padding: 8px 10px; border-radius: 10px; background: rgba(127, 127, 127, .12); display: grid; gap: 2px; font-size: 14px; }
.cp-meter { display: grid; gap: 6px; margin: 8px 0; }
.cp-meter span { position: relative; display: block; padding: 5px 10px; border-radius: 8px; background: rgba(127, 127, 127, .15); overflow: hidden; font-size: 14px; }
.cp-meter i { position: absolute; left: 0; bottom: 0; height: 4px; background: #e9b72f; }
@media (max-width: 620px) { .cp-top, .cp-areas { grid-template-columns: 1fr; } }

.cell .cpd { display: flex; gap: 2px; justify-content: center; font-size: 9.5px; font-weight: 800; line-height: 1.2; }
.cell .cpd b { padding: 0 3px; border-radius: 5px; color: #fff; white-space: nowrap; }
.cell .cpd .g { background: #a3150c; }
.cell .cpd .b { background: #1f3f86; }
@media (max-width: 620px) { .cell .cpd { font-size: 8.5px; gap: 1px; } .cell .cpd b { padding: 0 2px; } }

.cp-doms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 14px; }
.cp-dm { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); }
.cp-dn { font-weight: 800; font-size: 14px; white-space: nowrap; }
.cp-db { height: 8px; border-radius: 5px; background: rgba(255,255,255,.2); overflow: hidden; }
.cp-db i { display: block; height: 100%; border-radius: 5px; background: #8ab4ff; }
.cp-dm.b4 .cp-db i, .cp-dm.b5 .cp-db i { background: #ffb15c; }
.cp-dm b { font-size: 13px; min-width: 24px; text-align: right; }
.cp-dm small { grid-column: 1 / -1; font-size: 12.5px; line-height: 1.45; opacity: .92; }
@media (max-width: 620px) { .cp-doms { grid-template-columns: 1fr; } }

.cpd-leg { padding: 1px 7px; border-radius: 6px; color: #fff; white-space: nowrap; font-weight: 800; }
.cpd-leg.g { background: #a3150c; }
.cpd-leg.b { background: #1f3f86; box-shadow: 0 0 0 1px rgba(255,255,255,.5); }

.cell .cprk { position: absolute; top: 2px; left: 3px; font-size: 11px; line-height: 1; filter: drop-shadow(0 0 2px rgba(255,255,255,.9)); }
.cell .cprk.hit { font-size: 13px; }
.cell.rkf { outline: 3px solid #ff8a00; outline-offset: -2px; }
.cp-rf { margin: 12px 0 4px; }
.cp-rfb { cursor: pointer; border: 1px solid rgba(255,255,255,.35); }
.cp-rfb.on { background: #ff8a00; color: #1a0f00; border-color: #ffb866; font-weight: 800; }
.cp-rks { display: grid; gap: 8px; margin: 8px 0 14px; }
.cp-rk { padding: 10px 12px; border-radius: 10px; background: rgba(255,138,0,.12); border: 1px solid rgba(255,138,0,.5); }
.cp-rk.lv2 { background: rgba(255,80,40,.16); border-color: rgba(255,120,80,.7); }
.cp-rk b { display: block; font-size: 14.5px; }
.cp-rk b span { font-size: 12px; margin-left: 6px; padding: 1px 7px; border-radius: 8px; background: #ff8a00; color: #1a0f00; }
.cp-rk b em { font-style: normal; font-size: 12px; opacity: .85; }
.cp-rk p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; }
.cp-rk p.tip { opacity: .95; }
@media (max-width: 620px) { .cell .cprk { font-size: 10px; top: 1px; left: 2px; } }

.menu_tipbox.ms-tipbox { pointer-events: none; }
.menu_tipbox.ms-tipbox.up::before { top: auto; bottom: -7px; transform: rotate(225deg); }

/* 달력 시트형 보기 */
.cal-view { display: inline-flex; gap: 0; margin: 0 0 10px; border: 1px solid var(--field-border, #8f7b58); border-radius: 10px; overflow: hidden; }
.cal-vb { cursor: pointer; border: 0; padding: 7px 14px; font-size: 14px; background: var(--surface, #fff); color: inherit; font-weight: 600; }
.cal-vb.on { background: #5b3fc4; color: #fff; }
.sheet { display: grid; gap: 0; border: 1px solid var(--field-border, #8f7b58); border-radius: 12px; overflow: hidden; }
.srow-h { display: grid; grid-template-columns: 104px 1fr; padding: 7px 10px; font-size: 12.5px; font-weight: 800; background: rgba(91,63,196,.14); border-bottom: 1px solid var(--field-border, #8f7b58); }
.srow { display: grid; grid-template-columns: 104px 1fr; text-align: left; gap: 0; padding: 0; border: 0; border-bottom: 1px solid rgba(128,110,80,.35); background: var(--surface, #fff); color: inherit; cursor: pointer; font: inherit; border-left: 6px solid var(--h3, #d9b43a); }
.srow { border-bottom: 2px solid rgba(128,110,80,.6); }
.srow:last-child { border-bottom: 0; }
.srow.s1 { border-left-color: var(--h1); } .srow.s2 { border-left-color: var(--h2); } .srow.s3 { border-left-color: var(--h3); } .srow.s4 { border-left-color: var(--h4); } .srow.s5 { border-left-color: var(--h5); }
.srow:hover { background: rgba(91,63,196,.08); }
.srow[aria-pressed="true"] { background: rgba(91,63,196,.16); outline: 3px solid #5b3fc4; outline-offset: -3px; }
.srow.today .sh-n { box-shadow: 0 0 0 2px #5b3fc4; border-radius: 8px; padding: 0 6px; }
.srow.rkf { background: rgba(255,138,0,.14); }
.sh-l { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; padding: 8px 8px 8px 10px; border-right: 1px dashed rgba(128,110,80,.45); align-content: flex-start; }
.sh-n { font-size: 22px; font-weight: 800; line-height: 1.1; }
.sh-w { font-size: 13px; font-weight: 700; }
.srow.sun .sh-w { color: #b3120a; } .srow.sat .sh-w { color: #2f56b8; }
.sh-j { flex-basis: 100%; font-size: 13px; }
.sh-lu { flex-basis: 100%; font-size: 11.5px; opacity: .8; }
.sh-r { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; min-width: 0; }
.sh-top, .sh-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.sh-top .cpg { position: static; }
.sh-sc { font-size: 14px; }
.sh-tg { font-size: 13px; opacity: .9; }
.sh-tag, .sh-bd { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: rgba(91,63,196,.14); }
.sh-tag { background: rgba(217,180,58,.28); }
.sh-one { font-size: 13.5px; line-height: 1.45; }
.sh-rk { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.sh-rk > span { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: rgba(255,138,0,.16); border: 1px solid rgba(255,138,0,.5); }
.sh-rk > span.lv2 { background: rgba(255,80,40,.2); font-weight: 700; }
.sh-rk > span.hit { background: #ff8a00; color: #1a0f00; }
@media (max-width: 620px) { .srow-h, .srow { grid-template-columns: 78px 1fr; } .sh-n { font-size: 19px; } .sh-one { font-size: 13px; } }

/* 달력 일정 메모 · 알림 */
.cmemo { display: inline-block; margin-top: 2px; padding: 0 5px; border-radius: 8px; font-size: 10.5px; font-weight: 800; background: #5b3fc4; color: #fff; line-height: 1.5; }
.sh-top .cmemo { margin: 0; font-size: 12px; padding: 1px 8px; }
.mm-list { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 6px; }
.mm-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.mm-list li label { flex: 1; min-width: 0; display: flex; gap: 6px; align-items: baseline; cursor: pointer; }
.mm-list li label span { overflow-wrap: anywhere; }
.mm-list li.done span { text-decoration: line-through; opacity: .55; }
.mm-r { white-space: nowrap; opacity: .85; }
.mm-x { border: 0; background: transparent; color: inherit; font-size: 16px; cursor: pointer; padding: 4px 8px; opacity: .7; }
.mm-form { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; align-items: center; }
.mm-form input, .mm-form select { min-height: 40px; min-width: 0; }
.mm-up { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; font-size: 13px; }
.mm-up span { padding: 2px 9px; border-radius: 10px; background: rgba(91,63,196,.16); }
.mm-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
#memoToast { position: fixed; right: 12px; bottom: 12px; z-index: 1200; display: grid; gap: 8px; max-width: min(360px, calc(100vw - 24px)); }
.mm-toast { display: flex; gap: 8px; align-items: baseline; padding: 12px 14px; border-radius: 12px; background: #2a1206; color: #f6e7b4; border: 2px solid #d6ad4a; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.mm-toast span { flex: 1; overflow-wrap: anywhere; }
.mm-toast button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 16px; }
@media (max-width: 620px) { .mm-form { grid-template-columns: 1fr 1fr; } .mm-form #mmText { grid-column: 1 / -1; } .mm-form .btn { grid-column: 1 / -1; } }

.mm-tip { position: fixed; z-index: 1100; max-width: min(300px, calc(100vw - 16px)); padding: 10px 12px; border-radius: 10px; background: #2a1206; color: #f6e7b4; border: 1.5px solid #d6ad4a; box-shadow: 0 8px 22px rgba(0,0,0,.45); font-size: 13px; line-height: 1.5; pointer-events: none; }
.mm-tip b { display: block; margin-bottom: 4px; }
.mm-tip em { font-style: normal; font-weight: 800; color: #ffd98a; }
.mm-tip .done { text-decoration: line-through; opacity: .6; }
/* 시트형: 길한 방향(빨강) · 피할 방향(파랑) 구분 */
.srow .cpd { display: inline-flex; gap: 6px; font-size: 12.5px; font-weight: 800; }
.srow .cpd b { padding: 1px 9px; border-radius: 8px; color: #fff; white-space: nowrap; }
.srow .cpd .g { background: #a3150c; }
.srow .cpd .b { background: #1f3f86; }
.srow .cpd .g::before { content: "길 "; font-weight: 600; opacity: .9; }
.srow .cpd .b::before { content: "피 "; font-weight: 600; opacity: .9; }

.cal-tip { max-width: min(320px, calc(100vw - 16px)); }
.cal-tip div { margin-top: 3px; }
.cal-tip em { font-style: normal; font-weight: 800; color: #ffd98a; }
.cal-tip .tg { color: #ff9d92; font-weight: 700; } .cal-tip .tb { color: #9cb8ff; font-weight: 700; }
.cal-tip .tm { padding-top: 3px; border-top: 1px dashed rgba(246,231,180,.4); }

/* 휴대폰 달력: 날짜 숫자가 등급 알약 · ⚠️ 에 가리지 않게 위쪽에 자리를 두고, 길한 방향(빨강)도 보이게(style.css 가 숨기던 .cell .g 를 되살림) */
@media (max-width: 620px) {
  .cell { padding-top: 17px; }
  .cell .cpd .g { display: block; }
  .cell .cprk { top: 1px; left: 2px; }
  .cell .cpd { gap: 2px; }
  .cell .cpd b { padding: 0 3px; }
}
/* 날짜 팝업 */
body.daypop-open { overflow: hidden; }
.day-pop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 12px; }
.day-pop .dp-bg { position: absolute; inset: 0; background: rgba(10, 6, 30, .62); backdrop-filter: blur(2px); }
.day-pop .dp-box { position: relative; width: min(560px, 100%); max-height: 88vh; display: flex; flex-direction: column; border: 2px solid #c89b20; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 18px 50px rgba(0,0,0,.55); overflow: hidden; }
.day-pop .dp-body { overflow-y: auto; overscroll-behavior: contain; padding: 40px 12px 6px; }
.day-pop .dp-body .detail { margin: 0 0 10px; }
.day-pop .dp-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.day-pop .dp-foot .btn { flex: 1; min-width: 140px; }
.day-pop .dp-x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 2px solid #f3d36b; background: #a8170f; color: #fff; font-size: 16px; cursor: pointer; }
.cal-tip-static div { margin-top: 5px; line-height: 1.55; }
.cal-tip-static em { font-style: normal; font-weight: 800; }
.cal-tip-static .tg { color: #b3120a; font-weight: 700; } .cal-tip-static .tb { color: #2f56b8; font-weight: 700; }

/* 첫 화면 달력 위: 내 명식 + 상대 사주 입력 */
.hc-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 16px; }
.hc-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--surface) 70%, transparent); min-width: 0; }
.hc-t { margin: 0 0 10px; font-size: 16px; }
.hc-ms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; text-align: center; }
.hc-col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hc-h { font-size: 12px; color: var(--muted); }
.hc-k { font-size: 12px; color: var(--muted); }
.hc-ms .ms-t { width: 100%; max-width: 54px; }
#hpForm .inp_ul { margin: 0; }
@media (max-width: 720px) { .hc-top { grid-template-columns: minmax(0, 1fr); } }

/* 간단 입력창(첫 화면 상대방 입력) */
.mf { display: grid; gap: 8px; margin-top: 8px; }
.mf input, .mf select { width: 100%; box-sizing: border-box; min-height: 44px; padding: 0 12px; font: inherit; color: var(--ink, inherit); background: var(--field-bg, var(--surface, #fff)); border: 1px solid var(--field-border, #8f7b58); border-radius: 6px; }
.mf input::placeholder { color: var(--field-ph, #7a6c52); }
.mf-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mf-row2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.mf { gap: 6px; } .mf input, .mf select { min-height: 38px; padding: 0 8px; font-size: 14px; }
#homeCal .cp-modes { flex-wrap: nowrap; gap: 6px; margin: 6px 0; }
#homeCal .cp-mode { flex: 1 1 0; min-width: 0; padding: 7px 4px; font-size: 13px; white-space: nowrap; }
#homeCal .cp-mode.on { background: #fff !important; color: #00289b !important; }
#homeCal .cp-mode.on * { color: #00289b !important; opacity: 1 !important; }
.sns-note { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 213, 74, .18); border: 1px solid #d6ad4a; font-size: 14px; }

/* 길흉 표현을 분명하게: 흉 ⛔ 빨강 · 조심 ⚠ 주황 · 길 ◎ 초록 */
.sh-rk > span i, .sh-sub .lvg i { font-style: normal; font-weight: 800; margin-left: 2px; }
.sh-rk > span.lv2 { background: #b3261e; border-color: #ff9a8f; color: #fff; }
.sh-rk > span.lv1 { background: rgba(255,138,0,.22); }
.sh-sub .lvg { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: rgba(46,160,90,.22); border: 1px solid rgba(80,200,120,.6); }
.hc-day { margin-top: 12px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.25); }
.hc-vs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hc-v { font-size: 13px; padding: 3px 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.35); }
.hc-v.lv2 { background: #b3261e; color: #fff; border-color: #ff9a8f; }
.hc-v.lv1 { background: rgba(255,138,0,.28); }
.hc-v.good, .hc-v.ok { background: rgba(46,160,90,.28); border-color: rgba(80,200,120,.7); }
#homeCal #memoCard { margin-top: 12px; }
.hc-pbox { width: min(560px, 100%); max-height: 88vh; overflow-y: auto; text-align: left; }
.hc-pbox .hc-day { margin-top: 18px; }
.hc-pbox #memoCard { margin-top: 12px; box-shadow: none; }

/* 일정(메모) 표시: 달력 칸에서 한눈에 구분되도록 금빛 이름표 + 칸 아래 금줄 (2026-11-13) */
.cmemo { display: inline-flex; align-items: center; gap: 2px; margin-top: 3px; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 900; line-height: 1.4; background: #ffd84a; color: #1d1200; border: 1px solid #fff3b0; box-shadow: 0 1px 3px rgba(0,0,0,.45); white-space: nowrap; }
.cmemo::before { content: "📌"; font-size: 10px; }
.cell:has(.cmemo) { box-shadow: inset 0 -4px 0 #ffd84a; }
.sh-top .cmemo { margin: 0; font-size: 12.5px; padding: 2px 9px; border-radius: 8px; }
.srow:has(.cmemo) { box-shadow: inset 4px 0 0 #ffd84a; }
@media (max-width: 620px) { .cell .cmemo { font-size: 10px; padding: 0 4px; } .cell .cmemo::before { content: ""; } }

/* 회원 정보 입력 · 입력 유도 막대 (2026-11-13) */
.pnudge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid #c9a227; background: #fff3c4; color: #2a1a08; font-size: 14px; line-height: 1.5; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pnudge { border-color: #ffd84a; background: #1b1440; color: #fff6d6; } }
:root[data-theme="dark"] .pnudge { border-color: #ffd84a; background: #1b1440; color: #fff6d6; }
.pnudge .btn.ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.pnudge[hidden] { display: none !important; }
.pnudge span { flex: 1 1 220px; min-width: 0; }
.pf-mk { margin: 10px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 6px; }
.pf-mk label { display: flex; gap: 6px; align-items: center; }
.pf-ref { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); display: grid; gap: 6px; }

/* 달력 위 한 줄: 왼쪽 보기 방식 토글 · 오른쪽(금 · 토 칸 위) 월간운세 자세한 풀이 버튼 */
#homeCal .hc-viewrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
#homeCal .hc-viewrow .cal-view { margin-bottom: 10px; }
#homeCal .hc-viewrow .hc-more { margin-left: auto; margin-bottom: 10px; }
#homeCal .hc-viewrow .hc-more .btn { padding: 8px 12px; font-size: 13px; white-space: nowrap; }

/* 월간운세 · 이날 자세한 풀이 버튼: 입체감 + 바탕색 */
#homeCal .hc-viewrow .hc-more .btn { background: linear-gradient(180deg, #ffd24d 0%, #f5a000 100%) !important; color: #3a2200 !important; font-weight: 800; border: 1px solid #b86e00 !important; border-radius: 12px; box-shadow: 0 4px 0 #9a5a00, 0 7px 14px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .6); text-shadow: 0 1px 0 rgba(255, 255, 255, .45); transition: transform .08s, box-shadow .08s; }
#homeCal .hc-viewrow .hc-more .btn:hover { filter: brightness(1.06); }
#homeCal .hc-viewrow .hc-more .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #9a5a00, 0 3px 8px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .6); }

/* 자세한 풀이 버튼: 사이트 기본색(보라 · 남색)에 흰 글자 */
#homeCal .hc-viewrow .hc-more .btn { background: linear-gradient(180deg, #6a4fd8 0%, #3a2ba8 100%) !important; color: #fff !important; border: 1px solid #b9a8ff !important; box-shadow: 0 4px 0 #1f1670, 0 7px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); text-shadow: 0 1px 2px rgba(0, 0, 0, .5); font-size: 14px; }
#homeCal .hc-viewrow .hc-more .btn:active { box-shadow: 0 1px 0 #1f1670, 0 3px 8px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); }

/* 달력 위 입력 상자 버튼: 입체 디자인 */
#homeCal .hc-box .btn.primary { background: linear-gradient(180deg, #6a4fd8 0%, #3a2ba8 100%) !important; color: #fff !important; border: 1px solid #b9a8ff !important; border-radius: 12px; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); box-shadow: 0 4px 0 #1f1670, 0 7px 14px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .08s, box-shadow .08s; }
#homeCal .hc-box .btn:not(.primary) { background: linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, .12)) !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, .5) !important; border-radius: 12px; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); box-shadow: 0 4px 0 rgba(10, 8, 80, .6), 0 7px 14px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .4); transition: transform .08s, box-shadow .08s; }
#homeCal .hc-box .btn:hover { filter: brightness(1.08); }
#homeCal .hc-box .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(10, 8, 80, .6), inset 0 1px 0 rgba(255, 255, 255, .3); }

/* 노란 입체 버튼(쉬운 모드 「이 고민으로 상담받기」와 같은 디자인) — 달력 위 버튼들 */
#homeCal .hc-viewrow .hc-more .btn, #homeCal .hc-box .btn, #homeCal .hc-box .btn.primary, #homeCal .hc-box .btn:not(.primary) {
  background: linear-gradient(180deg, #ffe14a, #ffb300) !important; color: #2a1600 !important; font-weight: 900; text-shadow: none;
  border: 3px solid #fff3a0 !important; border-radius: 16px; box-shadow: 0 6px 0 #b87400, 0 10px 22px rgba(255, 190, 0, .35); }
#homeCal .hc-viewrow .hc-more .btn { padding: 8px 14px; font-size: 14px; border-width: 2px !important; box-shadow: 0 4px 0 #b87400, 0 8px 16px rgba(255, 190, 0, .35); }
#homeCal .hc-box .btn { width: 100%; min-height: 50px; font-size: 16px; }
#homeCal .hc-viewrow .hc-more .btn:active, #homeCal .hc-box .btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b87400, 0 4px 10px rgba(255, 190, 0, .4); }

/* 달력 위 버튼: 보라 · 남색 그라데이션 + 흰 글자 */
#homeCal .hc-viewrow .hc-more .btn, #homeCal .hc-box .btn, #homeCal .hc-box .btn.primary, #homeCal .hc-box .btn:not(.primary) {
  background: linear-gradient(180deg, #6a4fd8, #3a2ba8) !important; color: #fff !important; text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  border: 2px solid #b9a8ff !important; box-shadow: 0 5px 0 #1f1670, 0 9px 18px rgba(60, 40, 160, .45), inset 0 1px 0 rgba(255, 255, 255, .35); }
#homeCal .hc-viewrow .hc-more .btn:active, #homeCal .hc-box .btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #1f1670, 0 3px 8px rgba(60, 40, 160, .4); }

/* ───── 사이트 전체 버튼 통일: 보라 · 남색 그라데이션 + 흰 글자 + 입체 ───── */
.btn, .btn.primary, .btn.ghost, .lt-btn, .lt-btn.ghost, #lt .lt-btn {
  background: linear-gradient(180deg, #6a4fd8, #3a2ba8) !important; color: #fff !important; text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
  border: 2px solid #b9a8ff !important; border-radius: 14px; font-weight: 800;
  box-shadow: 0 4px 0 #1f1670, 0 8px 16px rgba(60, 40, 160, .4), inset 0 1px 0 rgba(255, 255, 255, .35) !important;
  transition: transform .08s, box-shadow .08s, filter .15s; }
.btn:hover, .lt-btn:hover { filter: brightness(1.1); }
.btn:active, .lt-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #1f1670, 0 3px 8px rgba(60, 40, 160, .4), inset 0 1px 0 rgba(255, 255, 255, .35) !important; }
.btn:disabled, .btn[disabled], .lt-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.on, .btn[aria-pressed="true"] { outline: 3px solid #ffe14a; outline-offset: 2px; }
.btn.tzoom-close { box-shadow: none !important; }

/* ───── 모든 입력창 통일: 사이트 기본색 바탕 + 노란 테두리 + 흰 글자 ───── */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="hidden"]),
textarea, select {
  background: #1b2a9c !important; color: #fff !important; border: 2px solid #ffd84a !important; border-radius: 12px;
  caret-color: #ffe14a; color-scheme: dark; }
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, .6) !important; opacity: 1; }
input:not([type="checkbox"]):not([type="radio"]):focus, textarea:focus, select:focus { outline: 3px solid rgba(255, 216, 74, .45); outline-offset: 1px; border-color: #ffe97a !important; }
select option { background: #1b2a9c; color: #fff; }
input:disabled, textarea:disabled, select:disabled { opacity: .6; }

/* 융 가면 · 그림자 상자: 주변 남색과 어울리는 반투명 바탕 */
.sd-chip.p, .jg-p { background: rgba(255, 255, 255, .13) !important; border: 1px solid rgba(255, 255, 255, .3); }
.sd-chip.s, .jg-s { background: rgba(160, 120, 255, .22) !important; border: 1px solid rgba(190, 160, 255, .45); }
.sd-chip.d { background: rgba(255, 255, 255, .22) !important; border: 1px solid rgba(255, 255, 255, .4); }

/* ───── 모든 체크박스 통일: 흰 바탕 + 노란 테두리, 체크하면 노란 바탕에 짙은 ✓ ───── */
input[type="checkbox"] { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; min-width: 22px; margin: 0 6px 0 0; vertical-align: middle; flex: none;
  background: #fff !important; border: 2.5px solid #ffd84a !important; border-radius: 6px; cursor: pointer; position: relative; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
input[type="checkbox"]:checked { background: #ffd84a !important; border-color: #fff !important; }
input[type="checkbox"]:checked::after { content: ""; position: absolute; left: 6px; top: 1px; width: 6px; height: 12px; border: solid #2a1600; border-width: 0 3px 3px 0; transform: rotate(45deg); }
input[type="checkbox"]:focus-visible { outline: 3px solid rgba(255, 216, 74, .6); outline-offset: 2px; }
input[type="checkbox"]:disabled { opacity: .5; cursor: not-allowed; }

/* 전문가 모드: 주 메뉴 상자의 배경 그림을 없애고 투명하게 */
body:not(.has-tabs) .menu_area, body:not(.has-tabs) .menu_area[data-bg] { background: transparent !important; background-image: none !important; box-shadow: none; border-color: transparent; }

/* 전문가 모드: 카테고리·하위 메뉴 각 버튼의 배경색을 투명하게 (테두리·글자·강조 테두리는 유지) */
body:not(.has-tabs) .cat_btn,
body:not(.has-tabs) .menu_li a,
body:not(.has-tabs) .cat_btn.on,
body:not(.has-tabs) .menu_li li.on a { background: transparent !important; background-image: none !important; box-shadow: none; }
body:not(.has-tabs) .cat_btn.on, body:not(.has-tabs) .menu_li li.on a { box-shadow: 0 0 0 3px rgba(255, 224, 138, .25); }

/* 페이지 머리 카드(.unse_info)·정보 확인 카드(.card.confirm): 배경 투명 + 흰 글자 + 진한 테두리 */
.unse_info, .card.confirm { background: transparent !important; background-image: none !important; box-shadow: none !important; border-color: rgba(255, 255, 255, .28) !important; }
.unse_info *:not(button):not(.btn), .card.confirm *:not(button):not(.btn) {
  color: #fff !important;
  text-shadow: var(--tx-edge) !important;
}
.unse_info .txt_purple { color: #ffe08a !important; }
.unse_info, .card.confirm { border-color: #ffd84a !important; }

/* 첫 화면 달력 카드(#homeCal): 배경 투명 + 안내 글자는 흰색 + 진한 테두리 (칸 · 타일 · 버튼은 그대로) */
#homeCal { background: transparent !important; background-image: none !important; box-shadow: none !important; border-color: #ffd84a !important; }
#homeCal .hc-box { background: transparent !important; border-color: #ffd84a !important; }
#homeCal .hc-t, #homeCal .hc-t *, #homeCal .hc-h, #homeCal .hc-k, #homeCal .hc-box > p, #homeCal .hc-box > p *,
#homeCal .day-head .eyebrow, #homeCal .day-head h2, #homeCal .legend, #homeCal > p.small, #homeCal > p.small * {
  color: #fff !important;
  text-shadow: var(--tx-edge) !important;
}

/* 아래쪽 안내(푸터) 상자: 배경 투명 + 노란 테두리 + 글자 진한 테두리 */
.foot.wrap { background: transparent !important; background-image: none !important; box-shadow: none !important; border: 1.5px solid #ffd84a !important; }
.foot.wrap p, .foot.wrap a, .foot.wrap span {
  color: #fff !important;
  text-shadow: var(--tx-edge) !important;
}

/* 전문가 모드 전체 디자인: 파랑 계열 유지 + 카드 · 칸 배경은 거의 투명(불투명도 10%, 투명도 90%) + 노란 테두리
   글자는 흰색 · 노랑, 모든 글자에 진한 곤청색 테두리. 색 토큰을 바꿔 카드 · 표 · 상자에 한꺼번에 적용한다. */
body:not(.has-tabs) {
  --surface: rgba(36, 30, 92, .10);
  --surface-2: rgba(36, 30, 92, .14);
  --accent-soft: rgba(36, 30, 92, .18);
  --ink: #ffffff;
  --muted: #ffe9a0;
  --accent: #ffe08a;
  --line: rgba(255, 216, 74, .75);
  --shadow: none;
  --field-bg: rgba(18, 16, 56, .6);
  --field-border: #ffd84a;
  --field-ph: #e6dcb0;
  color: #fff;
}
body:not(.has-tabs) main, body:not(.has-tabs) .foot {
  text-shadow: var(--tx-edge);
}
body:not(.has-tabs) main :is(.card, .unse_info, details, .box, .tbl-wrap, .mini, .note) { background-color: rgba(36, 30, 92, .10) !important; background-image: none !important; box-shadow: none !important; border-color: #ffd84a; }
body:not(.has-tabs) main a:not(.btn):not(.join-link) { color: #ffe08a; }
body:not(.has-tabs) main :is(input, select, textarea) { color: #fff; text-shadow: none; }
body:not(.has-tabs) main :is(.ball, .ball *, .cm-k, .cm-k *, .lk-color, .lk-color *, .ms-cnt span, .ms-cnt span *, .ms-t, .ms-t *, .sbar, .sbar *, .gz, .gz *, .cpg, .cell *, svg text, button, .btn, select, input, textarea, option) { text-shadow: none; }
body:not(.has-tabs) main :is(table, th, td) { border-color: rgba(255, 216, 74, .55); }

/* 용신 · 희신 · 기신 · 구신 칸 = 오방색 바탕 + 각 색에서 잘 읽히는 글자색 (unified.css 의 !important 를 이기려고 같은 :not 사슬을 씀) */
html:root body:not(.u0):not(#u0):not(#u1):not(#u2):not(#u3):not(#u4) main .yong4 .mini.ob { border: 2px solid rgba(255, 255, 255, .6) !important; box-shadow: 0 2px 6px rgba(0, 0, 0, .35) !important; }
html:root body:not(.u0):not(#u0):not(#u1):not(#u2):not(#u3):not(#u4) main .yong4 .mini.ob0 { background-color: var(--ob0, #145a74) !important; --obt: var(--ob0-t, #fff); }
html:root body:not(.u0):not(#u0):not(#u1):not(#u2):not(#u3):not(#u4) main .yong4 .mini.ob1 { background-color: var(--ob1, #a52a1d) !important; --obt: var(--ob1-t, #fff); }
html:root body:not(.u0):not(#u0):not(#u1):not(#u2):not(#u3):not(#u4) main .yong4 .mini.ob2 { background-color: var(--ob2, #f2c230) !important; --obt: var(--ob2-t, #2a2008); border-color: #b8901a !important; }
html:root body:not(.u0):not(#u0):not(#u1):not(#u2):not(#u3):not(#u4) main .yong4 .mini.ob3 { background-color: var(--ob3, #fff) !important; --obt: var(--ob3-t, #1d1a15); border-color: #9c927e !important; }
html:root body:not(.u0):not(#u0):not(#u1):not(#u2):not(#u3):not(#u4) main .yong4 .mini.ob4 { background-color: var(--ob4, #1b1b1f) !important; --obt: var(--ob4-t, #fff); border-color: #8a8272 !important; }
html:root body main .yong4 .mini.ob :is(.k, .v) { color: var(--obt) !important; text-shadow: none !important; -webkit-text-stroke: 0 !important; -webkit-text-fill-color: var(--obt) !important; }
html:root body main .yong4 .mini.ob .k { font-weight: 700; opacity: .92; }

/* 메뉴 검색 */
.site-search{position:relative;margin:0 0 12px}
.site-search input{width:100%;box-sizing:border-box;padding:12px 16px;border-radius:999px;font-size:16px;border:1.5px solid var(--field-border,#8f7b58);background:var(--field-bg,#fff);color:inherit}
.ss-list{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:40;margin:0;padding:6px;list-style:none;max-height:60vh;overflow:auto;border-radius:14px;border:1.5px solid var(--field-border,#8f7b58);background:var(--surface,#fffaf0);box-shadow:0 10px 30px rgba(0,0,0,.35)}
.ss-list[hidden]{display:none}
.ss-list a{display:block;padding:9px 12px;border-radius:10px;text-decoration:none;color:inherit}
.ss-list a:hover,.ss-list a:focus{background:rgba(120,120,255,.18)}
.ss-list small{opacity:.7;margin-left:6px}
.ss-list span{display:block;font-size:13px;opacity:.8;margin-top:2px}
.ss-none{padding:12px;opacity:.8}

/* 처음 화면 ↔ 전문가 모드 상주 전환 단추 */
.mode-fab{position:fixed;left:12px;bottom:84px;z-index:850;padding:11px 16px;border-radius:999px;font-size:15px;font-weight:800;cursor:pointer;border:2px solid #ffe14d;background:#2a1a6e;color:#ffe14d;box-shadow:0 6px 18px rgba(0,0,0,.45)}
.mode-fab:hover{filter:brightness(1.15)}
body.buy-open .mode-fab,body.menu-open .mode-fab,body:has(#menu:not([hidden]) #catGrid:not([hidden])) .mode-fab{display:none}
@media (max-width:620px){.mode-fab{padding:9px 13px;font-size:14px;bottom:76px}}
@media print{.mode-fab{display:none}}

.ny-buy{border-color:#ffe14d!important}.ny-buyp{font-size:20px;margin:6px 0}.ny-buyp del{opacity:.6;font-size:15px}
.lock-preview{margin:12px 0;padding:12px 14px;border:1px dashed var(--line,#b9a77a);border-radius:12px;background:var(--surface-2,#fff8);text-align:left}
.lock-preview h3{margin:6px 0;font-size:1rem}.lock-preview ul{margin:4px 0 8px;padding-left:1.2em}
.lock-sample{width:100%;height:340px;border:1px solid var(--line,#ccc);border-radius:10px;background:#fff}
.ny-sample{margin:8px 0 14px;padding:12px 14px;border:1px dashed var(--line,#b9a77a);border-radius:12px;background:var(--surface-2,#fff8)}
.ny-sample ul{padding-left:1.2em;margin:6px 0}
.card[data-gl]{display:none!important}
.card > .cardno{display:inline-block;margin:0 0 6px;padding:2px 10px;border-radius:999px;background:#d32f2f;color:#fff;font-size:.8rem;font-weight:700}

/* 관계·모드 고르기 버튼(연인 · 사업 파트너 · 미팅·기타 …): 좁은 화면 · 큰 글자에서 글자가 버튼 밖으로 넘치지 않게 — 줄바꿈 허용 */
.cp-modes { align-items: stretch; }
.cp-mode, #homeCal .cp-mode { min-width: 0; white-space: normal; overflow-wrap: anywhere; word-break: keep-all; line-height: 1.25; text-align: center; padding-inline: 14px; }
#homeCal .cp-modes { flex-wrap: wrap; }
#homeCal .cp-mode { flex: 1 1 calc(33% - 6px); padding-block: 8px; }
@media (max-width: 480px) { .cp-mode, #homeCal .cp-mode { flex: 1 1 calc(50% - 8px); } }

/* 머리글 장바구니 아이콘: 보라 단추의 보색인 밝은 노랑 선 그림 */
.top #shopLink .cart-ico { color: #ffd23f; width: 20px; height: 20px; flex: none; filter: drop-shadow(0 0 2px rgba(0,0,0,.5)); }
.top #shopLink .cart-n { color: #ffd23f; }
@media (max-width: 620px) { .top #shopLink .cart-ico { width: 18px; height: 18px; } }

/* 확인 배너: 정보 수정 · 지우기 단추를 위아래로 */
.cf-btns { display: flex; flex-direction: column; gap: 8px; align-items: stretch; flex: none; }
.cf-btns .btn { white-space: nowrap; }

/* 로그인 제안 배너(이 기기에만 정보가 있는 비로그인 입력자, 7일에 한 번) */

/* 처음 들어올 때 뜨는 안내 팝업 */
.site-popup { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .55); }
.site-popup .sp-box { width: min(420px, 100%); background: var(--surface, #fff); color: var(--ink, #222); border: 2px solid var(--line, #d6ad4a); border-radius: 16px; padding: 22px 20px 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); text-align: center; }
.site-popup h3 { margin: 0 0 10px; }
.site-popup p { margin: 0 0 16px; white-space: pre-wrap; line-height: 1.6; }
.site-popup .sp-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.site-popup .sp-skip { margin-top: 12px; background: none; border: 0; color: inherit; opacity: .7; text-decoration: underline; cursor: pointer; font-size: 13px; }
.si-box { width: min(440px, 100%); max-height: 92vh; overflow-y: auto; text-align: left; }
.si-box h2 { text-align: center; }

/* 내 회원 정보 팝업(「○○ 님」) */
.mi-list { list-style: none; margin: 8px 0 12px; padding: 0; text-align: left; }
.mi-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line, rgba(128,128,128,.25)); }
.mi-row .k { flex: 0 0 5.5em; color: var(--muted, #777); font-size: 13px; }

/* 머리글 「전문가 모드」 앞: 로그인 전 안내 · 로그인 후 회원 등급 아이콘 */
.grade-chip { display: inline-flex; align-items: center; gap: 6px; }
.grade-chip[hidden] { display: none !important; }
/* 등급 아이콘: 알약 테두리 · 배경 · 최소 높이 없이 그림 자체가 크기를 정한다(관리 화면의 아이콘 크기가 그림과 함께 커지도록) */
/* 등급 아이콘은 알약 단추(join-link)가 아니라 그림 자체가 크기를 정한다 */
.grade-chip.has { padding: 0; line-height: 0; }
.grade-chip.has img { display: block; max-width: none; max-height: none; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.grade-chip .gc-t { white-space: nowrap; }
@media (max-width: 620px) { .grade-chip.hint .gc-t { max-width: 9.5em; overflow: hidden; text-overflow: ellipsis; } }

/* 태어난 장소 · 시각 보정 입력 */
.pl-custom{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:6px}
.pl-custom label,.pl-mode{display:flex;flex-direction:column;gap:3px;font-size:12px}
.pl-mode{margin-top:6px}
.pl-custom[hidden]{display:none}
@media (max-width:620px){.pl-custom{grid-template-columns:1fr}}

.ms-notes{margin:8px 0}.ms-notes p{margin:3px 0}.ms-warn{color:#8a4b00;background:rgba(240,170,40,.14);border-left:3px solid #e0a020;padding:4px 8px;border-radius:4px}
:root[data-theme="dark"] .ms-warn{color:#ffd68a}

/* 고전 중국어 풀이(中文解说) — 중국어 화면에서 원문 아래에 항상 보이는 층 */
.cl-zhx { margin: 4px 0 2px; font-size: 15px; line-height: 1.75; }
.cl-zhx p { margin: 4px 0; }
.cl-zhx p + p { padding-top: 4px; border-top: 1px dashed var(--line); }

/* 고전 책 화면의 왼쪽 아래 단추 세 개(책 메뉴 · 구절 목록 · 처음 화면)가 겹치지 않게 위로 차곡차곡 쌓는다 */
body.cl-focus .cl-back { bottom: 72px; }
body.cl-focus .mode-fab { bottom: 126px; }
@media (max-width: 620px) { body.cl-focus .mode-fab { bottom: 126px; } }


/* 고전 장 제목의 뜻풀이(영어 · 일본어 · 베트남어 화면) */
.cl-tt { display: block; font-size: .78em; font-weight: 600; opacity: .92; margin-top: 2px; font-family: inherit; }
.ich-title .cl-tt { font-size: .62em; }
.ich-nav .cl-tt { font-size: .72em; font-weight: 500; }

/* 고전 차례 카드: 긴 한자 제목 · 병음 · 영어 번역이 칸 밖으로 넘치지 않게 (격자 칸이 내용 때문에 늘어나지 않도록 min-width 0) */
.cl-toc li { min-width: 0; }
.cl-toc a { min-width: 0; overflow: hidden; }
.cl-toc a > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: normal; }
.cl-toc b { word-break: break-all; }

/* 관상 · 수상 · 족상 · 지문 사진: 갤러리 고르기 + 카메라로 바로 찍기 두 길 */
.fc-cam-row { margin-top: 8px; }
.fc-cam-row .btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.fc-sheet { position: fixed; inset: 0; z-index: 1200; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.fc-sheet-box { width: min(480px, 100%); display: grid; gap: 8px; background: var(--u-blue-pop, #00186e); border: 2px solid #ff0; border-radius: 18px; padding: 14px; }
.fc-sheet-box button { font: inherit; font-size: 17px; font-weight: 700; padding: 14px; border-radius: 12px; border: 1.5px solid #ff0; background: rgba(0, 42, 160, .5); color: #fff; cursor: pointer; }
.fc-sheet-box .fc-sheet-x { background: transparent; font-weight: 400; }

/* 행운 번호 공: 노란 바탕 위 흰 글자는 안 보였다 → 밝은 바탕 + 진한 글자(테마와 상관없이). 오늘의 행운 오행 공(.lk)은 파랑 바탕 + 노란 고리 + 밝은 글자 그대로 */
html:root body .ball:not(.lk) { background: #ffe14a !important; color: #1a1230 !important; text-shadow: none !important; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12), 0 1px 3px rgba(0, 0, 0, .4); }

/* ───── 자미두수 명반 상세판(2026-11-27): 별 세로 열 · 사화 칩 · 12신 · 운세반(대한~시운) · 사화표 ───── */
.zw-board { position: relative; grid-template-rows: repeat(4, minmax(178px, auto)); gap: 3px; }
.zw-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.zw-lines polygon, .zw-lines line { fill: none; stroke: #6a4bc4; stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; opacity: .6; }
.zw-cell { z-index: 1; padding: 4px 4px 3px; gap: 3px; }
.zw-center { position: relative; z-index: 1; }
.zw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; min-height: 16px; }
.zw-pn { font-size: 12.5px; font-weight: 800; line-height: 1.2; }
.zw-cell.ming .zw-pn { color: #a3150c; }
.zw-head .zw-mks { margin-top: 0; }
.zw-mk.lv.dx { background: #a3150c; } .zw-mk.lv.ln { background: #c15a00; } .zw-mk.lv.mo { background: #1f7a8c; } .zw-mk.lv.da { background: #4a7c1f; } .zw-mk.lv.si { background: #6a4bc4; }
.zw-mk.mg { outline: 1px solid #fff; }
.zw-body { display: flex; gap: 3px; flex: 1; min-height: 0; }
.zw-rail { display: flex; flex-direction: column; gap: 2px; flex: 0 0 auto; }
.zw-hr { display: flex; flex-direction: column; align-items: center; width: 17px; padding: 1px 0 0; border-radius: 4px; color: #fff; font-style: normal; line-height: 1.05; }
.zw-hr b { font-size: 11px; font-weight: 800; } .zw-hr small { font-size: 7.5px; opacity: .9; padding-bottom: 1px; }
.zw-hr.lu { background: #2e7d32; } .zw-hr.quan { background: #c15a00; } .zw-hr.ke { background: #1f5fae; } .zw-hr.ji { background: #1b1b1f; box-shadow: 0 0 0 1px rgba(255, 255, 255, .8); }
.zw-stars { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 3px 5px; flex: 1; min-width: 0; }
.zv { display: inline-block; line-height: 1.12; white-space: nowrap; }
:lang(ko) .zv:not(.e) { writing-mode: vertical-rl; text-orientation: upright; }
.zv b { font-weight: 800; }
.zv.m b { font-size: 14.5px; color: #3b1f8a; }
.zv.s b { font-size: 11.5px; font-weight: 700; }
.zv.s.lucky b { color: #17694a; } .zv.s.bad b { color: #6b5f4d; }
.zv .zw-lv { margin: 2px 0 0; font-size: 9.5px; }
.zv.n b { font-size: 9.5px; font-weight: 600; }
.zv.n.good b { color: #3f7f66; } .zv.n.bad b { color: #8a6a4a; } .zv.n.mid b { color: #7b7468; }
.zv.e { font-size: 11px; color: var(--muted); }
.zw-bot { display: flex; justify-content: space-between; align-items: flex-end; gap: 4px; border-top: 1px dotted #c9b48a; padding-top: 2px; }
.zw-bl { display: flex; flex-direction: column; font-size: 9.5px; line-height: 1.25; color: var(--muted); min-width: 0; }
.zw-bl b { color: var(--ink); font-size: 10.5px; }
.zw-yl.now { color: #c15a00; font-weight: 800; }
.zw-br { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.zw-gz { display: flex; flex-direction: column; align-items: center; font-weight: 800; font-size: 15px; line-height: 1.05; }
.zw-gz i { font-style: normal; }
.zw-br small { font-size: 10px; font-weight: 700; color: var(--muted); }
.zw-ctrl { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.zw-seg { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.zw-seg button, .zw-chips button.zw-tool { font: inherit; font-size: 14px; font-weight: 700; padding: 6px 18px; border: 1.5px solid #c9b48a; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; }
.zw-seg button.on { background: #6a4bc4; border-color: #6a4bc4; color: #fff; }
.zw-seg .zw-tool, .zw-chips .zw-tool { font-size: 12.5px; padding: 5px 12px; font-weight: 600; }
.zw-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.zw-cl { font-size: 12.5px; color: var(--muted); }
.zw-chip { font: inherit; font-size: 13px; font-weight: 700; padding: 3px 13px; border: 1.5px solid #c9b48a; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.zw-chip.on { background: #1b1b1f; border-color: #1b1b1f; color: #fff; }
.zw-sels { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 440px; }
.zw-selr { display: grid; grid-template-columns: 40px 38px minmax(0, 1fr) 38px; align-items: center; gap: 6px; }
.zw-selr.off { opacity: .55; }
.zw-sl { font-size: 13px; font-weight: 700; color: var(--muted); text-align: right; }
.zw-ar { font: inherit; font-size: 20px; line-height: 1; padding: 5px 0; border: 1.5px solid #c9b48a; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer; }
.zw-sv { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 5px 6px; border: 1.5px solid #c9b48a; border-radius: 8px; min-width: 0; }
.zw-sv b { font-size: 16px; } .zw-sv small { font-size: 12px; color: var(--muted); }
.zw-hua-t { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 560px; margin-top: 2px; }
.zw-hrow { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; justify-content: center; font-size: 13px; }
.zw-hl { flex: 0 0 96px; text-align: right; font-weight: 700; } .zw-hl small { font-weight: 400; color: var(--muted); margin-left: 2px; }
.zw-hc { display: inline-flex; border: 1.5px solid #c9b48a; border-radius: 6px; overflow: hidden; }
.zw-hc b { padding: 1px 7px; font-weight: 700; } .zw-hc i { font-style: normal; font-weight: 800; padding: 1px 6px; color: #fff; }
.zw-hc.lu i { background: #2e7d32; } .zw-hc.quan i { background: #c15a00; } .zw-hc.ke i { background: #1f5fae; } .zw-hc.ji i { background: #1b1b1f; }
@media (max-width: 620px) {
  .zw-board { grid-template-rows: repeat(4, minmax(148px, auto)); gap: 2px; }
  .zw-pn { font-size: 10.5px; } .zw-cell { padding: 3px 2px 2px; }
  .zw-mk.lv:not(.mg) { font-size: 7px; padding: 0 2px; }
  .zw-fl { font-size: 7.5px; }
  .zw-hr { width: 13px; } .zw-hr b { font-size: 9px; } .zw-hr small { font-size: 6.5px; }
  .zv.m b { font-size: 12px; } .zv.s b { font-size: 10px; } .zv.n b { font-size: 8px; } .zv .zw-lv { font-size: 8px; }
  .zw-stars { gap: 2px 3px; }
  .zw-bl { font-size: 8px; } .zw-bl b { font-size: 9px; } .zw-12 { display: none; }
  .zw-gz { font-size: 12px; } .zw-br small { font-size: 8.5px; }
  .zw-c-more { display: none; }
  .zw-hl { flex-basis: 78px; font-size: 12px; } .zw-hrow { font-size: 12px; }
  .zw-selr { grid-template-columns: 34px 34px minmax(0, 1fr) 34px; gap: 4px; } .zw-sv b { font-size: 14.5px; }
}

.zw-fls { display: flex; flex-wrap: wrap; gap: 1px; margin-top: 1px; }
.zw-fl { font-style: normal; font-size: 8.5px; font-weight: 700; padding: 0 3px; border-radius: 6px; background: #efe7ff; color: #4b2d92; border: 1px solid #c9b8ff; }
.zw-fl.qingyang, .zw-fl.tuoluo { background: #ffe9e6; color: #a3150c; border-color: #f2b5ac; }
.zw-fl.lucun { background: #e4f5e6; color: #1f6b2b; border-color: #a8d8ae; }
.zw-run { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(120, 90, 200, .06); }
.zw-ov { margin: 0; padding-left: 0; list-style: none; } .zw-ov li { padding: 6px 8px; margin: 4px 0; border-radius: 8px; border-left: 4px solid #8a7ac0; background: rgba(255, 255, 255, .5); }
.zw-ov li.warn { border-left-color: #1f3f86; } .zw-ov li.good { border-left-color: #a3150c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zw-fl { background: #2d2350; color: #d9ccff; border-color: #5a4a9a; } :root:not([data-theme="light"]) .zw-ov li { background: rgba(255, 255, 255, .06); } }
:root[data-theme="dark"] .zw-fl { background: #2d2350; color: #d9ccff; border-color: #5a4a9a; } :root[data-theme="dark"] .zw-ov li { background: rgba(255, 255, 255, .06); }
.zw-ages { display: flex; flex-direction: column; font-size: 8.5px; line-height: 1.25; color: var(--muted); text-align: center; }
@media (max-width: 620px) { .zw-ages { display: none; } }

/* ───── 명반 호버: 본궁 · 대궁 · 삼합 색 구분 + 입체감 + 지지 오행 바탕(2026-11-27) ───── */
.zw-board { perspective: 1100px; }
.zw-cell { transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease; box-shadow: 0 1px 2px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .25); transform-style: preserve-3d; }
html:root body main .zw-cell.ze0 { background-image: linear-gradient(160deg, rgba(60, 170, 110, .22), rgba(60, 170, 110, 0) 70%) !important; }
html:root body main .zw-cell.ze1 { background-image: linear-gradient(160deg, rgba(225, 80, 60, .22), rgba(225, 80, 60, 0) 70%) !important; }
html:root body main .zw-cell.ze2 { background-image: linear-gradient(160deg, rgba(220, 175, 60, .26), rgba(220, 175, 60, 0) 70%) !important; }
html:root body main .zw-cell.ze3 { background-image: linear-gradient(160deg, rgba(235, 235, 245, .26), rgba(235, 235, 245, 0) 70%) !important; }
html:root body main .zw-cell.ze4 { background-image: linear-gradient(160deg, rgba(70, 110, 220, .26), rgba(70, 110, 220, 0) 70%) !important; }
html:root body main .zw-cell.tri, html:root body main .zw-cell.opp { border-style: solid; }
html:root body main .zw-cell.sel { outline: none; }
html:root body main .zw-cell.f-dim { opacity: .55; }
html:root body main .zw-cell.f-self { transform: translateZ(26px) translateY(-4px) scale(1.04); z-index: 4; border: 2.5px solid #f2c230; box-shadow: 0 10px 22px rgba(0, 0, 0, .5), 0 0 0 3px rgba(242, 194, 48, .35); background-image: linear-gradient(160deg, rgba(242, 194, 48, .38), rgba(242, 194, 48, .06)) !important; }
html:root body main .zw-cell.f-opp { transform: translateZ(14px) translateY(-2px); z-index: 3; border: 2.5px solid #ff5a4a; box-shadow: 0 8px 18px rgba(0, 0, 0, .45), 0 0 0 3px rgba(255, 90, 74, .3); background-image: linear-gradient(160deg, rgba(255, 90, 74, .34), rgba(255, 90, 74, .05)) !important; }
html:root body main .zw-cell.f-tri { transform: translateZ(14px) translateY(-2px); z-index: 3; border: 2.5px solid #4aa8ff; box-shadow: 0 8px 18px rgba(0, 0, 0, .45), 0 0 0 3px rgba(74, 168, 255, .3); background-image: linear-gradient(160deg, rgba(74, 168, 255, .34), rgba(74, 168, 255, .05)) !important; }
.zw-cell.f-self::after, .zw-cell.f-opp::after, .zw-cell.f-tri::after { position: absolute; top: -9px; right: 6px; font-size: 10.5px; font-weight: 800; line-height: 1; padding: 3px 7px; border-radius: 999px; color: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .45); }
.zw-cell.f-self::after { content: '본궁'; background: #b8860b; } .zw-cell.f-opp::after { content: '대궁'; background: #d93a2b; } .zw-cell.f-tri::after { content: '삼합'; background: #1f6fcf; }
.zw-lines polygon { stroke: #4aa8ff; stroke-width: 2; opacity: .85; } .zw-lines line { stroke: #ff5a4a; stroke-width: 2; opacity: .9; }
.zw-hint { margin: 10px 2px 0; font-size: 13px; line-height: 1.7; text-align: center; }
.zw-lg { display: inline-block; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; color: #fff; }
.zw-lg.self { background: #b8860b; } .zw-lg.opp { background: #d93a2b; } .zw-lg.tri { background: #1f6fcf; }
@media (max-width: 620px) { .zw-hint { font-size: 11.5px; } .zw-cell.f-self::after, .zw-cell.f-opp::after, .zw-cell.f-tri::after { font-size: 8.5px; padding: 2px 5px; top: -7px; right: 2px; } html:root body main .zw-cell.f-self { transform: translateY(-2px) scale(1.03); } }

/* 출생지 검색(시 · 군 · 구) */
.pl-search { position: relative; margin: 2px 0 4px; }
.pl-search input[type="search"] { width: 100%; box-sizing: border-box; }
.pl-res { list-style: none; margin: 2px 0 0; padding: 4px; position: absolute; z-index: 30; left: 0; right: 0; max-height: 280px; overflow: auto; border: 1.5px solid #8a72d6; border-radius: 10px; background: var(--paper-hi, #fffaf0); color: var(--ink); box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.pl-res[hidden] { display: none; }
.pl-res button { display: block; width: 100%; text-align: left; font: inherit; padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; color: inherit; cursor: pointer; }
.pl-res button:hover, .pl-res button:focus { background: rgba(106, 75, 196, .16); outline: none; }
.pl-res small { color: var(--muted); margin-left: 4px; }
.pl-res .none { padding: 8px 10px; font-size: 13px; color: var(--muted); }
.pl-picked { margin: 5px 0 0; }

/* 자미두수 쉬운 풀이 */
.zw-snav { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.zw-sn { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border: 1.5px solid #c9b48a; border-radius: 999px; text-decoration: none; color: inherit; }
.zw-sn.alert { border-color: #d93a2b; }
.zw-primer { margin: 8px 0; padding: 8px 12px; border: 1.5px dashed #c9b48a; border-radius: 10px; }
.zw-primer ul { margin: 8px 0 2px; padding-left: 18px; } .zw-primer li { margin: 5px 0; line-height: 1.7; }
.zw-story { margin-top: 16px; padding-top: 4px; border-top: 1px dotted #c9b48a; }
.zw-story p { line-height: 1.85; margin: 8px 0; }
.zw-story.alert { border: 2px solid #d93a2b; border-radius: 12px; padding: 8px 14px 12px; background: rgba(217, 58, 43, .07); }
.zw-cause th, .zw-cause td { font-size: 12.5px; vertical-align: top; text-align: left; }
.zw-cause th { min-width: 96px; }
.zw-notes li { margin: 5px 0; }

/* 건강 문진 · 보장 점검 */
.hc-card { border: 2px solid #1f7a6a; }
.hc-lead { margin: 0 0 10px; }
.hc-det > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.hc-form { display: grid; gap: 10px; margin-top: 6px; }
.hc-q { border: 1px solid var(--line, #cdbf9d); border-radius: 10px; margin: 0; padding: 6px 12px 10px; }
.hc-q legend { font-size: 13.5px; font-weight: 700; padding: 0 6px; }
.hc-o { display: inline-flex; align-items: center; gap: 4px; margin: 4px 14px 0 0; font-size: 14px; }
.hc-cov { display: grid; gap: 8px; }
.hc-c { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line, #cdbf9d); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.hc-c.need { border-color: #c8261b; background: rgba(217, 58, 43, .07); }
.hc-c.own { opacity: .75; }
.hc-c small { display: block; font-size: 12.5px; opacity: .85; margin-top: 2px; }
.hc-tag { font-style: normal; font-size: 11.5px; font-weight: 700; background: #c8261b; color: #fff; border-radius: 6px; padding: 0 6px; margin-left: 4px; }
.hc-tag.o { background: #1f7a6a; }
.hc-scr { margin: 4px 0; padding-left: 18px; font-size: 14px; }
.hm-w em.r { background: #1f7a6a; }

/* 건강 · 보장 점검 메모 PDF / 보험 상담용 보기 */
.hc-ctl { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 4px 0 12px; font-size: 14px; }
.hc-ctl label { display: inline-flex; align-items: center; gap: 4px; }
#printMemo { display: none; }
@media print {
  body.print-memo > *:not(#printMemo) { display: none !important; }
  body.print-memo #printMemo { display: block; color: #1d1a15; background: #fff; font-family: 'Noto Sans KR', sans-serif; font-size: 10.5pt; line-height: 1.6; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pm-page { width: 186mm; }
  .pm-head { display: flex; justify-content: space-between; border-bottom: 1px solid #999; padding-bottom: 2mm; font-size: 10pt; color: #555; }
  .pm-page h1 { font-size: 18pt; margin: 6mm 0 1mm; }
  .pm-page h2 { font-size: 12.5pt; margin: 6mm 0 2mm; }
  .pm-who { margin: 0; color: #555; }
  .pm-page table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  .pm-page th, .pm-page td { border: 1px solid #bbb; padding: 1.5mm 2mm; text-align: left; vertical-align: top; }
  .pm-page th { background: #f1f1f1; }
  .pm-page tr { break-inside: avoid; }
  .pm-foot { margin-top: 8mm; font-size: 9pt; color: #555; border-top: 1px solid #bbb; padding-top: 2mm; }
}
/* 인쇄 창 없이 바로 PDF 로 저장할 때(화면 밖에서 그림으로 찍음) 같은 모양 */
#printMemo.pm-cap { color: #1d1a15 !important; background: #fff !important; font-family: 'Noto Sans KR', sans-serif; font-size: 10.5pt; line-height: 1.6; padding: 6mm 12mm; text-shadow: none !important; }
#printMemo.pm-cap * { color: #1d1a15 !important; text-shadow: none !important; background-color: transparent !important; border-color: #bbb !important; }
#printMemo.pm-cap .pm-page { width: auto; }
#printMemo.pm-cap .pm-head { display: flex; justify-content: space-between; border-bottom: 1px solid #999 !important; padding-bottom: 2mm; font-size: 10pt; }
#printMemo.pm-cap .pm-head span, #printMemo.pm-cap .pm-who, #printMemo.pm-cap .pm-foot { color: #555 !important; }
#printMemo.pm-cap h1 { font-size: 18pt; margin: 6mm 0 1mm; }
#printMemo.pm-cap h2 { font-size: 12.5pt; margin: 6mm 0 2mm; }
#printMemo.pm-cap table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
#printMemo.pm-cap th, #printMemo.pm-cap td { border: 1px solid #bbb; padding: 1.5mm 2mm; text-align: left; vertical-align: top; }
#printMemo.pm-cap th { background-color: #f1f1f1 !important; }
#printMemo.pm-cap .pm-foot { margin-top: 8mm; font-size: 9pt; border-top: 1px solid #bbb; padding-top: 2mm; }

/* 건강운명 · 재물운명 종합 점검 카드 (사주 × 자미두수) */
.hm-card { border: 2px solid #7a4fb3; }
.hm-lead { margin: 0 0 10px; }
.hm-list { display: grid; gap: 10px; margin: 6px 0 12px; }
.hm-it { border: 1.5px solid var(--line, #cdbf9d); border-radius: 12px; padding: 10px 14px 12px; }
.hm-it.hm-both { border-color: #c8261b; background: rgba(217, 58, 43, .07); }
.hm-it.hm-mix { border-color: #c79a12; background: rgba(214, 173, 74, .12); }
.hm-it.hm-one { border-style: dashed; }
.hm-it.hm-good { border-color: #1f7a6a; background: rgba(31, 122, 106, .08); }
.hm-it.hm-good1 { border-color: #2c63b5; border-style: dashed; }
.hm-t { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 10px; margin: 0 0 6px; }
.hm-b { font-style: normal; font-size: 12.5px; font-weight: 700; }
.hm-w { margin: 0 0 6px; padding-left: 0; list-style: none; }
.hm-w li { margin: 4px 0; font-size: 14px; line-height: 1.65; }
.hm-w em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #fff; background: #b8651b; border-radius: 6px; padding: 0 6px; margin-right: 4px; }
.hm-w em.z { background: #7a4fb3; }
.hm-c { margin: 0; font-size: 14px; font-weight: 600; }
.hm-mind { margin: 10px 0; padding: 8px 12px; border: 1.5px dashed #7a4fb3; border-radius: 10px; }
.hm-tl th, .hm-tl td { vertical-align: top; }
.hm-tl tr.hm-now { background: rgba(214, 173, 74, .16); }
.wm-way { margin: 4px 0 10px; }
.wm-way p { margin: 6px 0; line-height: 1.7; }
.wm-way em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #fff; background: #b8651b; border-radius: 6px; padding: 0 6px; margin-right: 4px; }
.wm-way em.z { background: #7a4fb3; }
.wm-note { padding: 8px 12px; border-radius: 10px; background: rgba(199, 154, 18, .13); font-weight: 600; }
.wm-note.ok { background: rgba(31, 122, 106, .12); }
.wm-todo { margin: 6px 0 8px; padding-left: 20px; }
.wm-todo li { margin: 8px 0; line-height: 1.7; }
.wm-fold { margin: 0 0 14px; }
.wm-fold > summary { cursor: pointer; font-weight: 700; padding: 8px 4px; }

/* 자미두수 궁합 리포트(js/ziwei-pair.js) */
.pz-tabs { margin-bottom: 12px; }
.pz-rings { display: flex; justify-content: center; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.pz-ring { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.pz-ring .ring { margin: 0; }
.pz-rel { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 12px 0 0; min-width: 0; }
.pz-rel legend { padding: 0 6px; font-weight: 700; }
.pz-rel .check { display: inline-flex; margin: 4px 14px 4px 0; }
.pz [hidden] { display: none !important; }

/* 신년운세 × 자미두수(js/life-zw.js) */
.nyz-card { border-left: 4px solid #6a4fb0; }
.nyz-pill { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.nyz-pill.same, .nyz-pill.good { background: #e4f2e1; color: #1b5a24; }
.nyz-pill.mix { background: #fff0cf; color: #7a4600; }
.nyz-pill.warn { background: #e1ebfa; color: #1a3f86; }
.nyz-list, .nyz-ov { margin: 6px 0 10px; padding-left: 20px; }
.nyz-list li, .nyz-ov li { margin: 4px 0; line-height: 1.6; }
.nyz-list li.nyz-ji b, .nyz-ov li.bad b { color: #1a3f86; }
.nyz-list li.nyz-ok b, .nyz-ov li.ok b { color: #a3150c; }
.nyz-th { display: inline-block; padding: 1px 8px; border-radius: 8px; background: #efe9fb; color: #3d2a7a; font-size: 12px; white-space: nowrap; }
.nyz-area { margin: 6px 0 0; padding: 6px 10px; border-radius: 8px; background: #f3effa; line-height: 1.6; }
.nyz-area.warn { background: #e8eefb; }
.nyz-area.good { background: #fbeceb; }
:root[data-theme="dark"] .nyz-card { border-left-color: #a58cf0; }
:root[data-theme="dark"] .nyz-pill.same, :root[data-theme="dark"] .nyz-pill.good { background: #1f3a24; color: #b6e6bd; }
:root[data-theme="dark"] .nyz-pill.mix { background: #4a3710; color: #ffd98a; }
:root[data-theme="dark"] .nyz-pill.warn { background: #1d2c4d; color: #a9c4ff; }
:root[data-theme="dark"] .nyz-list li.nyz-ji b, :root[data-theme="dark"] .nyz-ov li.bad b { color: #8fb2ff; }
:root[data-theme="dark"] .nyz-list li.nyz-ok b, :root[data-theme="dark"] .nyz-ov li.ok b { color: #ff9a8f; }
:root[data-theme="dark"] .nyz-th { background: #2e2650; color: #d3c6ff; }
:root[data-theme="dark"] .nyz-area { background: #2a2540; }
:root[data-theme="dark"] .nyz-area.warn { background: #1d2842; }
:root[data-theme="dark"] .nyz-area.good { background: #402524; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nyz-card { border-left-color: #a58cf0; }
  :root:not([data-theme="light"]) .nyz-pill.same, :root:not([data-theme="light"]) .nyz-pill.good { background: #1f3a24; color: #b6e6bd; }
  :root:not([data-theme="light"]) .nyz-pill.mix { background: #4a3710; color: #ffd98a; }
  :root:not([data-theme="light"]) .nyz-pill.warn { background: #1d2c4d; color: #a9c4ff; }
  :root:not([data-theme="light"]) .nyz-list li.nyz-ji b, :root:not([data-theme="light"]) .nyz-ov li.bad b { color: #8fb2ff; }
  :root:not([data-theme="light"]) .nyz-list li.nyz-ok b, :root:not([data-theme="light"]) .nyz-ov li.ok b { color: #ff9a8f; }
  :root:not([data-theme="light"]) .nyz-th { background: #2e2650; color: #d3c6ff; }
  :root:not([data-theme="light"]) .nyz-area { background: #2a2540; }
  :root:not([data-theme="light"]) .nyz-area.warn { background: #1d2842; }
  :root:not([data-theme="light"]) .nyz-area.good { background: #402524; }
}
.nyz-fold > summary { cursor: pointer; line-height: 1.6; }
.nyz-fold[open] > summary { margin-bottom: 8px; }

/* 점술 주제 허브(#/jeom) */
.jeom-page .jm-g { margin-top: 18px; }
.jeom-page .jm-g h3 small { font-weight: 400; font-size: .8em; color: var(--muted); margin-left: 6px; }
.jm-grid, .jm-ms, .jm-qs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.jm-t, .jm-m, .jm-q { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1.5px solid var(--field-border, var(--line)); border-radius: 14px; background: var(--surface); color: var(--ink); text-align: left; text-decoration: none; font: inherit; cursor: pointer; min-width: 0; }
.jm-t:hover, .jm-m:hover, .jm-q:hover, .jm-t:focus-visible, .jm-q:focus-visible { border-color: var(--accent); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.jm-i { font-size: 1.5em; line-height: 1; }
.jm-t small, .jm-m small, .jm-qs2 { color: var(--muted); font-size: .82em; overflow-wrap: anywhere; }
.jm-qt { font-weight: 600; overflow-wrap: anywhere; }
.jm-qs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.jm-note { margin-top: 14px; }

/* 용신 · 희신 · 기신 · 구신 오방색 상자: 사이트 꾸미기(테마)의 글자 외곽선(text-shadow)이 밝은 칸(황 · 백)에서 글자를 흐리게 하던 것을 막음 — 테마 규칙(ID 5개)보다 높은 우선순위 */
html:root body:not(.u0):not(#u0):not(#u1):not(#u2):not(#u3):not(#u4):not(#u5):not(#u6):not(#u7) main .yong4 .mini.ob :is(.k, .v) { text-shadow: none !important; color: var(--obt) !important; -webkit-text-fill-color: var(--obt) !important; filter: none !important; }

/* 건강 문진 — 검진 수치 입력 · 파일 가져오기 */
.hi-box { border: 1px dashed var(--line, #cdbf9d); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.hi-box input[type="file"] { max-width: 100%; margin: 2px 0 8px; }
.hi-box textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--field-border, #8f7b58); border-radius: 8px; background: var(--field-bg, #fff); color: inherit; resize: vertical; }
.hi-dx { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 60%, transparent); border: 1px solid var(--line, #cdbf9d); }
.hl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 10px; margin-top: 6px; }
.hl-f { display: flex; flex-direction: column; gap: 3px; font-size: 13px; min-width: 0; }
.hl-f span i { font-style: normal; color: var(--muted); font-size: 11.5px; }
.hl-f input, .hl-f select { width: 100%; box-sizing: border-box; font: inherit; padding: 6px 8px; border: 1px solid var(--field-border, #8f7b58); border-radius: 8px; background: var(--field-bg, #fff); color: inherit; min-width: 0; }
.hl-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 6px 0 8px; }
.hl-r { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 10px; border: 1px solid var(--line, #cdbf9d); border-left-width: 5px; border-radius: 10px; font-size: 13.5px; align-items: baseline; min-width: 0; }
.hl-r span { grid-column: 1; font-weight: 700; }
.hl-r i { grid-column: 2; grid-row: 1 / span 2; font-style: normal; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 10px; align-self: center; }
.hl-r small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.hl-r.st-ok { border-left-color: #2f8f55; } .hl-r.st-ok i { background: #e1f3e8; color: #1c5b35; }
.hl-r.st-warn, .hl-r.st-low { border-left-color: #c98a00; } .hl-r.st-warn i, .hl-r.st-low i { background: #fbefc7; color: #6b4a00; }
.hl-r.st-high { border-left-color: #b3261e; } .hl-r.st-high i { background: #f8dcd8; color: #8a1a13; }
body[data-route="intro"] .pnudge { display: none !important; } /* 소개 첫 화면의 위쪽 메뉴와 겹치지 않게 */

/* 「처음으로」 떠 있는 단추: 전문가 모드 단추 바로 위 / 상담 화면에서는 머리글의 「상담」 단추를 숨김 */
.first-fab { bottom: 138px; text-decoration: none; display: inline-block; }
@media (max-width: 620px) { .first-fab { bottom: 124px; } }
body.cl-focus .first-fab { bottom: 180px; }
@media (max-width: 620px) { body.cl-focus .first-fab { bottom: 172px; } }
body[data-route="home"] #counselLink, body[data-route="counsel"] #counselLink { display: none !important; }

/* 전체메뉴(프로) 화면에서는 머리글에 「💬 상담」 전환 단추가 이미 있으므로 「상담」 링크는 숨긴다(중복 방지) */
body.mode-pro #counselLink { display: none !important; }

/* 「처음으로」는 늘 떠 있다(메뉴 타일 화면에서도 숨기지 않음) — 소개 화면(body.lp-on)에서만 숨김 */
body:has(#menu:not([hidden]) #catGrid:not([hidden])) .first-fab:not([style*="none"]), body.menu-open .first-fab:not([style*="none"]) { display: inline-block !important; }
body.lp-on .first-fab, body.buy-open .first-fab { display: none !important; }

/* 전체메뉴 화면: 머리글 「💬 상담」 단추는 없앤다(메뉴 타일에 「상담」이 있음) */
body.mode-pro #modeBtn { display: none !important; }

/* 이름 칸 — 저장된 사람 불러오기 */
.name-pick { position: fixed; z-index: 1500; min-width: 240px; max-width: min(360px, calc(100vw - 16px)); max-height: 300px; overflow-y: auto; padding: 6px; border-radius: 12px; background: rgba(12, 20, 52, .98); border: 1px solid #d4af37; box-shadow: 0 12px 28px rgba(0, 0, 0, .5); color: #f3ecd2; }
.name-pick .np-h { margin: 2px 6px 6px; font-size: 12px; opacity: .8; }
.name-pick button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: #fff; font: inherit; cursor: pointer; }
.name-pick button:hover, .name-pick button:focus-visible { background: rgba(255, 215, 106, .18); outline: none; }
.name-pick b { font-size: 15px; }
.name-pick .np-tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(255, 215, 106, .22); color: #ffd76a; margin-left: 4px; }
.name-pick small { display: block; font-size: 12px; opacity: .8; margin-top: 2px; }
