/* 워드마크 글꼴: Gowun Batang Bold 에서 "심결운" 네 글자만 잘라 낸 것(SIL OFL 1.1) — 운결 워드마크와 같은 서체 */
@font-face { font-family: 'MG Wordmark'; font-weight: 700; font-display: swap; src: url('../fonts/gowun-batang-simgyeol.woff2') format('woff2'); }
/* 심결(MBTI) — 스타일
 * 모든 규칙은 .mg 아래로 한정한다 → 사주 앱(운결) 안에 끼워 넣어도 서로 스타일이 새지 않는다.
 * 톤: 아이보리 바탕 · 딥 네이비 잉크 · 샴페인 골드. 유형군 색은 채도를 눌러 고급스럽게.
 */
.mg {
  --ink: #1C1B33; --ink2: #2B2A52; --ink3: #45446b;
  --gold: #BF9A55; --gold2: #E3CD9C; --gold3: #F4EAD3;
  --gold-text: #8A6420;   /* 작은 글자용 금색 (흰 바탕 대비 5.4:1) — --gold 는 막대·테두리·점 같은 장식에만 */
  --ivory: #FAF9F6;
  --g1: #FDF4DC; --g2: #F1DEAC; --g3: #E3C57E; --gink: #6B4E16;
  --gface: linear-gradient(135deg, #FDF4DC 0%, #F1DEAC 52%, #E3C57E 100%); --paper: #FFFFFF; --line: #E9E2D5; --line2: #F1ECE2;
  --muted: #46435D; --faint: #625E78;   /* 2026-09-27 선명도: 작은 회색 글씨가 흐리다는 피드백 */
  --rose: #D9607A; --ok: #3F8C6E;
  --NT: #6B5AA6; --NF: #2E7B69; --SJ: #355E92; --SP: #B0693C;
  --r-lg: 26px; --r-md: 18px; --r-sm: 12px;
  --sh-1: 0 1px 2px rgba(28,27,51,.05), 0 4px 14px rgba(28,27,51,.06);
  --sh-2: 0 2px 6px rgba(28,27,51,.06), 0 14px 36px rgba(28,27,51,.12);
  --ease: cubic-bezier(.22,.8,.26,1);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  color: var(--ink); background: var(--ivory);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  line-height: 1.55; letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere;
  position: relative; min-height: 100%;
}
.mg *, .mg *::before, .mg *::after { box-sizing: border-box; }
.mg button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.mg input { font: inherit; color: inherit; }
.mg h1, .mg h2, .mg h3, .mg h4, .mg p { margin: 0; }
/* 호스트(사주 앱) 전역 스타일 차단 — :where 는 명시도 0 이라 .mg 안의 우리 규칙은 그대로 이긴다 */
.mg :where(h1, h2, h3, h4, h5, h6, p, span, b, strong, em, li, a, label, small, summary, details, table, th, td) { color: inherit; font-family: inherit; letter-spacing: inherit; text-transform: none; }
.mg :where(a) { text-decoration: none; }
.mg :focus-visible { outline: 2.5px solid var(--gold); outline-offset: 2px; border-radius: 10px; }

/* ---------- 레이아웃 ---------- */
/* 2026-09-27: 앱 폭 480→520px, 좌우 여백 18→24px ("양쪽 끝단 여백을 조금 더") */
.mg-shell { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; background: var(--ivory); }
.mg[data-embedded] .mg-shell { min-height: 100%; }
.mg-view { padding: 0 24px 120px; animation: mgIn .45s var(--ease) backwards; }
.mg-view.no-nav { padding-bottom: 40px; }
@keyframes mgIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.mg-top { display: flex; align-items: center; gap: 10px; padding: 14px 0 6px; padding-top: max(14px, env(safe-area-inset-top)); }
.mg-top h1 { font-size: 17px; font-weight: 700; flex: 1; }
.mg-icon-btn { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--paper); box-shadow: var(--sh-1); }
.mg-icon-btn svg { width: 20px; height: 20px; }
.mg-brand { display: flex; align-items: center; gap: 8px; flex: 1; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.mg-brand b { color: var(--gold-text); font-weight: 800; }
.mg-brand .dot { width: 26px; height: 26px; border-radius: 9px; background: linear-gradient(145deg, var(--ink2), var(--ink)); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.15); }
.mg-brand .dot svg { width: 16px; height: 16px; }

.mg-sec { margin-top: 26px; }
.mg-sec-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.mg-sec-h h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.mg-sec-h .sub { font-size: 12.5px; color: var(--muted); }
.mg-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; color: var(--gold-text); text-transform: uppercase; }

.mg-card { background: var(--paper); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-1); position: relative; }
.mg-card + .mg-card { margin-top: 12px; }
.mg-card.line { box-shadow: none; border: 1px solid var(--line); }
.mg-card h3 { font-size: 15.5px; font-weight: 750; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.mg-card p { font-size: 14.5px; color: #3b3a55; }
.mg-muted { color: var(--muted); font-size: 13px; }
.mg-small { font-size: 12.5px; color: var(--faint); }

.mg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 24px; border-radius: 18px; font-weight: 700; font-size: 16px; transition: transform .15s var(--ease), box-shadow .2s; width: 100%; }
.mg-btn:active { transform: scale(.98); }
/* 2026-09-27: `.mg button { font: inherit }` 리셋(명시도 0,1,1)이 굵기·크기를 덮어써서 모든 버튼이 400 으로 보였음 → 명시도 올림 */
.mg .mg-btn { font-size: 16px; font-weight: 700; }
.mg-btn svg, .mg-member .x svg { width: 20px; height: 20px; flex: none; }
.mg-heart svg { width: 100%; height: auto; display: block; }
.mg-btn.primary { background: linear-gradient(160deg, var(--ink2), var(--ink)); color: #fff; box-shadow: 0 10px 24px rgba(28,27,51,.28), inset 0 1px 0 rgba(255,255,255,.12); }
.mg-btn.primary .spark { color: var(--gold2); }
.mg-btn.gold { background: linear-gradient(160deg, #D8B878, var(--gold)); color: #2a1f08; box-shadow: 0 10px 22px rgba(191,154,85,.35), inset 0 1px 0 rgba(255,255,255,.4); }
.mg-btn.ghost { background: var(--paper); border: 1px solid var(--line); height: 48px; font-size: 15px; }
.mg-btn.sm { height: 40px; font-size: 14px; padding: 0 16px; border-radius: 13px; width: auto; }
.mg-row { display: flex; gap: 10px; }
.mg-row > * { flex: 1; }

.mg-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 99px; background: var(--gold3); color: #6d5424; font-size: 13px; font-weight: 600; }
.mg-chip.ink { background: #ECEBF4; color: var(--ink2); }
.mg-chip.out { background: transparent; border: 1px solid var(--line); color: var(--ink3); }
.mg-chips { display: flex; flex-wrap: wrap; gap: 7px; }

/* ---------- 캐릭터 ---------- */
.mg-char { width: 100%; height: auto; display: block; overflow: visible; }
.mg-float { animation: mgFloat 4.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes mgFloat { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-1.2deg); } }
.mg-tilt { transform-style: preserve-3d; transition: transform .25s var(--ease); will-change: transform; }
.mg-pop { animation: mgPop .5s var(--ease); }
@keyframes mgPop { 0% { transform: scale(.94); } 55% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* ---------- 홈 ---------- */
.mg-hero { margin-top: 10px; border-radius: 30px; padding: 26px 22px 22px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 85% 10%, #3b3973 0%, transparent 55%), linear-gradient(160deg, #2B2A52 0%, #1C1B33 70%); box-shadow: var(--sh-2); }
.mg-hero .weave { position: absolute; inset: 0; opacity: .5; pointer-events: none; }
.mg-hero h2 { font-size: 26px; line-height: 1.28; font-weight: 800; letter-spacing: -0.03em; position: relative; }
.mg-hero h2 em { font-style: normal; color: var(--gold2); }
.mg-hero p { color: rgba(255,255,255,.86); font-size: 14px; margin-top: 8px; position: relative; }
.mg-hero .art { width: 150px; position: absolute; right: 6px; top: 24px; }
.mg-hero .body { max-width: 62%; position: relative; }
.mg-hero .facts { display: flex; gap: 14px; margin: 18px 0 18px; position: relative; }
.mg-hero .facts div { font-size: 12.5px; color: rgba(255,255,255,.82); }
.mg-hero .facts b { display: block; font-size: 17px; color: #fff; font-weight: 750; }
.mg-hero .mg-btn { position: relative; }

.mg-me { display: flex; gap: 14px; align-items: center; }
.mg-me .art { width: 86px; flex: none; }
.mg-me .code { font-size: 26px; font-weight: 850; letter-spacing: .05em; }
.mg-me .name { font-size: 14px; color: var(--muted); }

.mg-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mg-quick button { background: var(--paper); border-radius: 22px; padding: 16px 14px 14px; text-align: left; box-shadow: var(--sh-1); display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; min-height: 132px; transition: transform .15s var(--ease); }
.mg-quick button:active { transform: scale(.98); }
.mg-quick .art { width: 70px; position: absolute; right: -4px; bottom: -8px; }
.mg-quick b { font-size: 15.5px; font-weight: 750; }
.mg-quick span { font-size: 12.5px; color: var(--muted); max-width: 70%; line-height: 1.4; }

.mg-daily { display: flex; gap: 12px; align-items: flex-start; background: linear-gradient(135deg, var(--gold3), #FBF6EA); border: 1px solid #EEDFBE; border-radius: 22px; padding: 16px; }
.mg-daily .q { font-size: 15px; font-weight: 650; color: #4a3a17; }
.mg-daily .art { width: 54px; flex: none; }

.mg-trust { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 20px; border: 1px dashed #D9C9A5; background: rgba(255,255,255,.6); }
.mg-trust svg { width: 26px; height: 26px; flex: none; }
.mg-trust b { font-size: 14px; }
.mg-trust p { font-size: 12.5px; color: var(--muted); }

/* ---------- 하단 탭 ---------- */
/* (하단 탭은 아래 "홈 v2" 블록 — 운결 스타일) */

/* ---------- 검사 ---------- */
.mg-intro-art { width: 170px; margin: 12px auto 4px; }
.mg-intro h2 { font-size: 24px; font-weight: 800; text-align: center; letter-spacing: -0.03em; }
.mg-intro .lead { text-align: center; color: var(--muted); font-size: 14.5px; font-weight: 500; margin-top: 6px; }
.mg-steps { counter-reset: s; display: grid; gap: 10px; margin-top: 22px; }
.mg-steps li { list-style: none; display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border-radius: 18px; padding: 14px 16px; box-shadow: var(--sh-1); font-size: 14px; font-weight: 500; }
.mg-steps li::before { counter-increment: s; content: counter(s); flex: none; width: 24px; height: 24px; border-radius: 8px; background: var(--ink); color: var(--gold2); font-size: 12.5px; font-weight: 800; display: grid; place-items: center; }
.mg-steps { padding: 0; margin-left: 0; }

.mg-test { display: flex; flex-direction: column; min-height: calc(100dvh - 20px); }
.mg-progress { display: flex; align-items: center; gap: 12px; }
.mg-thread { flex: 1; height: 8px; border-radius: 99px; background: #E9E4F0; position: relative; overflow: hidden; }
.mg-thread i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--gold2), var(--gold)); transition: width .45s var(--ease); }
.mg-thread i::after { content: ''; position: absolute; right: 0; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--gold); }
.mg-count { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; }
.mg-q-wrap { margin: auto 0; padding: 10px 0 0; }
.mg-q-art { width: 138px; margin: 0 auto 6px; }
.mg-q { background: var(--paper); border-radius: 28px; padding: 26px 22px 24px; box-shadow: var(--sh-2); margin-top: 10px; position: relative; }
.mg-q .tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); }
.mg-q .text { font-size: 20px; font-weight: 700; line-height: 1.45; text-align: center; letter-spacing: -0.025em; min-height: 88px; display: grid; place-items: center; }
.mg-scale { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding: 0 2px; }
.mg-scale button { border-radius: 50%; display: grid; place-items: center; transition: transform .18s var(--ease), background .2s, box-shadow .2s; position: relative; }
.mg-scale button::after { content: ''; width: 36%; height: 36%; border-radius: 50%; background: currentColor; transform: scale(0); transition: transform .2s var(--ease); }
.mg-scale button[aria-pressed="true"]::after { transform: scale(1); }
.mg-scale button:active { transform: scale(.9); }
.mg-scale .s5, .mg-scale .s1 { width: 56px; height: 56px; }
.mg-scale .s4, .mg-scale .s2 { width: 44px; height: 44px; }
.mg-scale .s3 { width: 34px; height: 34px; }
.mg-scale .s5, .mg-scale .s4 { border: 2.5px solid var(--gold); color: var(--gold); background: #FBF6EA; }
.mg-scale .s2, .mg-scale .s1 { border: 2.5px solid var(--ink3); color: var(--ink3); background: #F2F1F7; }
.mg-scale .s3 { border: 2.5px solid #C9C6D3; color: #9C98AB; background: #fff; }
.mg-scale button[aria-pressed="true"].s5, .mg-scale button[aria-pressed="true"].s4 { background: var(--gold); color: #fff; box-shadow: 0 6px 16px rgba(191,154,85,.4); }
.mg-scale button[aria-pressed="true"].s1, .mg-scale button[aria-pressed="true"].s2 { background: var(--ink3); color: #fff; box-shadow: 0 6px 16px rgba(69,68,107,.35); }
.mg-scale button[aria-pressed="true"].s3 { background: #9C98AB; color: #fff; }
.mg-scale-l { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12.5px; font-weight: 700; }
.mg-scale-l span:first-child { color: var(--gold-text); }
.mg-scale-l span:last-child { color: var(--ink3); }
.mg-test-foot { margin-top: auto; padding: 22px 0 10px; display: flex; justify-content: space-between; align-items: center; }
.mg-test-foot .mg-small { max-width: 60%; }
@media (hover: none) { .mg-kbd { display: none; } }

.mg-analyze { min-height: 90dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; }
.mg-analyze .art { width: 150px; animation: mgBounce 1s ease-in-out infinite; }
@keyframes mgBounce { 0%,100% { transform: translateY(0) scale(1, 1); } 45% { transform: translateY(-14px) scale(.98, 1.02); } 55% { transform: translateY(-14px); } 90% { transform: translateY(0) scale(1.04, .96); } }
.mg-analyze h2 { font-size: 20px; font-weight: 800; margin-top: 14px; }
.mg-analyze .step { font-size: 14px; font-weight: 500; color: var(--muted); min-height: 22px; }

/* ---------- 결과 ---------- */
.mg-res-hero { margin-top: 8px; border-radius: 32px; padding: 22px 20px 20px; color: #fff; position: relative; overflow: hidden; box-shadow: var(--sh-2); isolation: isolate; }
.mg-res-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 70% at 50% 30%, rgba(255,255,255,.22), transparent 60%), linear-gradient(165deg, var(--gc) 0%, var(--gd) 100%); }
.mg-res-hero .weave { position: absolute; inset: 0; opacity: .35; z-index: -1; }
.mg-res-hero .who { font-size: 12.5px; font-weight: 600; opacity: .8; text-align: center; }
.mg-res-hero .art { width: 190px; margin: 4px auto -4px; perspective: 600px; }
.mg-res-hero .code { font-size: 46px; font-weight: 850; letter-spacing: .12em; text-align: center; line-height: 1; text-shadow: 0 2px 12px rgba(0,0,0,.18); }
.mg-res-hero .name { text-align: center; font-size: 18px; font-weight: 750; margin-top: 8px; }
.mg-res-hero .nick { text-align: center; font-size: 14px; font-weight: 500; opacity: .85; margin-top: 2px; }
.mg-res-hero .badges { display: flex; justify-content: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.mg-res-hero .badges span { font-size: 12.5px; font-weight: 650; padding: 5px 10px; border-radius: 99px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); }

.mg-axes { display: grid; gap: 16px; }
.mg-axis .top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.mg-axis .top .on { color: var(--ink); }
.mg-axis .top .off { color: var(--faint); font-weight: 600; }
.mg-axis .bar { height: 12px; border-radius: 99px; background: #EEEAF3; margin-top: 7px; position: relative; overflow: visible; }
.mg-axis .bar i { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.mg-axis .bar .mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: #fff; border-radius: 2px; }
.mg-axis .meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.mg-axis .meta b { font-variant-numeric: tabular-nums; color: var(--ink); }
.mg-clar { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #EFEDF5; color: var(--ink3); }
.mg-clar.b { background: #FCEBDD; color: #8A4520; }

.mg-rel { display: flex; gap: 12px; align-items: center; }
.mg-rel .ring { width: 58px; height: 58px; flex: none; }
.mg-rel b { font-size: 15px; }
.mg-neighbor { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px; border-radius: 16px; background: var(--ivory); }
.mg-neighbor .art { width: 42px; flex: none; }
.mg-neighbor div { flex: 1; font-size: 13.5px; font-weight: 500; }

/* (결과 탭 스타일은 아래 "결과 v2" 블록) */

.mg-list { display: grid; gap: 10px; }
.mg-item { display: flex; gap: 12px; align-items: flex-start; }
.mg-item .ic { width: 32px; height: 32px; border-radius: 11px; flex: none; display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.mg-item .ic.plus { background: #E3F1EA; color: var(--ok); }
.mg-item .ic.minus { background: #FBE6EA; color: var(--rose); }
.mg-item b { display: block; font-size: 15px; font-weight: 720; }
.mg-item p { font-size: 13.5px; color: #4b4a63; margin-top: 2px; }
.mg-tip { margin-top: 9px; font-size: 13px; background: linear-gradient(90deg, #FBF5E8, rgba(251,245,232,0)); border-left: 2px solid var(--gold); border-radius: 0 12px 12px 0; padding: 8px 12px; color: #5a4a2a; }
.mg-tip::before { content: '보완 팁 · '; font-weight: 750; color: var(--gold-text); }

.mg-fn { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mg-fn div { background: var(--ivory); border-radius: 14px; padding: 10px 6px; text-align: center; }
.mg-fn b { display: block; font-size: 17px; font-weight: 800; }
.mg-fn span { font-size: 12px; color: var(--muted); display: block; line-height: 1.3; }
.mg-fn small { display: block; font-size: 12px; color: var(--gold-text); font-weight: 700; margin-bottom: 2px; }
.mg-fn div:first-child { background: var(--ink); color: #fff; }
.mg-fn div:first-child span { color: rgba(255,255,255,.86); }

.mg-radar { width: 100%; max-width: 300px; margin: 4px auto 0; display: block; }
.mg-kv { display: grid; gap: 12px; }
.mg-kv > div { display: flex; gap: 12px; }
.mg-kv .k { flex: none; width: 74px; font-size: 12.5px; font-weight: 750; color: var(--gold-text); padding-top: 2px; }
.mg-kv .v { font-size: 14px; color: #3b3a55; }

.mg-match { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--paper); box-shadow: var(--sh-1); width: 100%; text-align: left; }
.mg-match + .mg-match { margin-top: 8px; }
.mg-match .art { width: 44px; flex: none; }
.mg-match .t { flex: 1; min-width: 0; }
.mg-match .t b { font-size: 15px; font-weight: 750; }
.mg-match .t span { font-size: 12.5px; color: var(--muted); display: block; }
.mg-match .sc { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mg-match .mini { height: 5px; background: #EEEAF3; border-radius: 9px; margin-top: 6px; overflow: hidden; }
.mg-match .mini i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--gold2), var(--gold)); }

.mg-seg { display: flex; background: #ECE8F1; border-radius: 14px; padding: 4px; gap: 4px; }
.mg-seg button { flex: 1; height: 36px; border-radius: 11px; font-size: 14px; font-weight: 650; color: var(--muted); }
.mg-seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--sh-1); }

.mg-share-bar { position: sticky; bottom: calc(max(8px, env(safe-area-inset-bottom)) + 74px); margin: 26px 0 0; display: flex; gap: 10px; z-index: 15; }
.mg-share-bar .mg-btn.ghost { box-shadow: var(--sh-2); }
.mg[data-embedded] .mg-share-bar { bottom: 90px; }

/* ---------- 궁합 ---------- */
.mg-pair { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; }
.mg-slot { flex: 1; background: var(--paper); border-radius: 24px; padding: 12px 10px 14px; text-align: center; box-shadow: var(--sh-1); border: 2px solid transparent; transition: border-color .2s; }
.mg-slot.active { border-color: var(--gold); }
.mg-slot .art { width: 92px; margin: 0 auto; }
.mg-slot b { display: block; font-size: 18px; font-weight: 850; letter-spacing: .08em; }
.mg-slot span { font-size: 12.5px; color: var(--muted); }
.mg-slot .empty { width: 92px; height: 100px; margin: 0 auto; border-radius: 30px; border: 2px dashed #D6CFC0; display: grid; place-items: center; color: var(--faint); font-size: 30px; }
.mg-heart { width: 36px; flex: none; color: var(--rose); animation: mgBeat 1.6s ease-in-out infinite; }
@keyframes mgBeat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }

.mg-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mg-picker button { background: var(--paper); border-radius: 16px; padding: 6px 2px 8px; box-shadow: var(--sh-1); border: 2px solid transparent; }
.mg-picker button[aria-pressed="true"] { border-color: var(--gold); background: #FFFBF2; }
.mg-picker .art { width: 48px; margin: 0 auto; }
.mg-picker b { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; display: block; }
.mg-picker span { font-size: 12px; color: var(--muted); display: block; }

.mg-score { display: flex; align-items: center; gap: 18px; }
.mg-score .ring { width: 118px; height: 118px; flex: none; position: relative; }
.mg-score .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mg-score .ring .n { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.mg-score .ring .n b { font-size: 34px; font-weight: 850; line-height: 1; font-variant-numeric: tabular-nums; }
.mg-score .ring .n span { font-size: 12.5px; font-weight: 600; color: var(--muted); display: block; margin-top: 2px; }
.mg-score h3 { font-size: 21px; font-weight: 800; }
.mg-dim + .mg-dim { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line2); }
.mg-dim .h { display: flex; justify-content: space-between; font-size: 14px; font-weight: 720; }
.mg-dim .h b { font-variant-numeric: tabular-nums; }
.mg-dim .bar { height: 8px; border-radius: 9px; background: #EEEAF3; margin: 8px 0; overflow: hidden; }
.mg-dim .bar i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--ink3), var(--ink)); transition: width .8s var(--ease); }
.mg-dim p { font-size: 13.5px; color: #4b4a63; }

/* 궁합 v2: 부딪히기 쉬운 순간 · 속마음 번역기 */
.mg-clash .scene { font-size: 15px; font-weight: 650; color: var(--ink); padding: 12px 14px; border-radius: 14px; background: #F3F1F6; }
.mg-clash .fix { margin-top: 8px; padding: 12px 14px; border-radius: 14px; background: var(--g1); }
.mg-clash .fix small { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--gink); }
.mg .mg-clash .fix p { color: #3a2d10; font-weight: 600; margin-top: 2px; }
.mg-trans .tr { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.mg-trans .who { flex: none; width: 54px; border-radius: 12px; color: #fff; text-align: center; font-size: 12.5px; font-weight: 850; letter-spacing: .04em; padding: 6px 0 5px; }
.mg-trans .who small { display: block; font-size: 12px; font-weight: 700; opacity: .9; letter-spacing: 0; }
.mg .mg-trans .says { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.mg .mg-trans .means { font-size: 13.5px; color: var(--muted); margin-top: 1px; }
.mg .mg-trans .means b { color: #7E5B1C; font-weight: 700; }
.mg-trans hr { border: 0; border-top: 1px dashed var(--line); margin: 6px 0; }

/* ---------- 편먹기 ---------- */
.mg-member { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--paper); border-radius: 18px; box-shadow: var(--sh-1); }
.mg-member + .mg-member { margin-top: 8px; }
.mg-member .art { width: 40px; flex: none; }
.mg-member .t { flex: 1; }
.mg-member .t b { font-size: 15px; }
.mg-member .t span { font-size: 12.5px; color: var(--muted); display: block; }
.mg-member .x { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--faint); }
.mg-add { display: flex; gap: 8px; }
.mg-add input { flex: 1; height: 48px; border-radius: 15px; border: 1px solid var(--line); background: var(--paper); padding: 0 14px; font-size: 15px; min-width: 0; }
.mg-add input:focus { outline: none; border-color: var(--gold); }
.mg-bal { display: grid; gap: 12px; }
.mg-bal .row { display: grid; grid-template-columns: 58px 1fr 58px; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; }
.mg-bal .row span:last-child { text-align: right; }
.mg-bal .dual { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: #EEEAF3; }
.mg-bal .dual i:first-child { background: var(--gold); }
.mg-bal .dual i:last-child { background: var(--ink3); }
.mg-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mg-team { background: var(--paper); border-radius: 20px; padding: 14px; box-shadow: var(--sh-1); }
.mg-team h4 { font-size: 14px; font-weight: 800; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.mg-team h4 i { width: 10px; height: 10px; border-radius: 50%; }
.mg-team > div { font-size: 13.5px; font-weight: 600; padding: 5px 0; border-top: 1px solid var(--line2); display: flex; justify-content: space-between; gap: 6px; }
.mg-team > div span { color: var(--muted); font-weight: 700; font-size: 12.5px; }

/* ---------- 알파벳 한눈에 (2026-09-27) ---------- */
.mg-abc .ax + .ax { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line2); }
.mg-abc .q { font-size: 13.5px; font-weight: 750; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.mg-abc .q span { font-size: 12px; font-weight: 800; color: var(--gink); background: var(--g1); border-radius: 99px; padding: 2px 8px; letter-spacing: .04em; }
.mg-abc .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mg-abc .lc { border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 11px; background: #fff; }
.mg-abc .lc.on { border-color: var(--lc); background: linear-gradient(180deg, color-mix(in srgb, var(--lc) 10%, #fff), #fff 70%); box-shadow: inset 0 0 0 1px var(--lc); }
.mg-abc .lc .top { display: flex; align-items: baseline; gap: 6px; }
.mg-abc .lc .top b { font-size: 20px; font-weight: 850; line-height: 1; }
.mg-abc .lc.on .top b { color: var(--lc); }
.mg .mg-abc .lc .top span { font-size: 13px; font-weight: 750; }
.mg .mg-abc .lc .top em { margin-left: auto; font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.mg-abc .lc strong { display: block; font-size: 12.5px; font-weight: 750; margin-top: 6px; color: var(--ink); }
.mg .mg-abc .lc p { font-size: 12.5px; color: #3b3a55; margin-top: 3px; line-height: 1.5; }
.mg .mg-abc .lc small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.45; font-weight: 500; }
.mg-abc .lc small::before { content: '예) '; font-weight: 750; color: var(--gold-text); }
.mg .mg-abc .note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.mg .mg-rc-code { width: 100%; }
.mg-abc-fold { margin: 12px 0 4px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; }
.mg-abc-fold summary { cursor: pointer; list-style: none; font-size: 14.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.mg-abc-fold summary::-webkit-details-marker { display: none; }
.mg-abc-fold summary span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.mg-abc-fold summary::after { content: '+'; margin-left: auto; color: var(--gold-text); font-weight: 800; font-size: 18px; }
.mg-abc-fold[open] summary::after { content: '−'; }
.mg-abc-fold[open] summary { margin-bottom: 12px; }

/* ---------- 궁합 슬롯 넘기기 (2026-09-27) ---------- */
.mg .mg-slot .pick { display: block; width: 100%; }
.mg-slot .flip { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 2px; }
.mg .mg-slot .flip button { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: var(--ivory); border: 1px solid var(--line); }
.mg-slot .flip button svg { width: 14px; height: 14px; }
.mg-slot .flip button.r svg { transform: rotate(180deg); }
.mg .mg-slot .flip b { min-width: 58px; }

/* ---------- 타입 카드 한 단계 작게 (2026-09-27, 전체 비율에 맞게) ---------- */
.mg .mg-rc { border-radius: 28px; padding: 7px; }
.mg .mg-rc-in { border-radius: 22px; padding: 12px 12px 14px; }
.mg .mg-rc-stage { height: 166px; }
.mg .mg-rc-stage .beam { width: 180px; height: 180px; top: -10px; }
.mg .mg-rc-stage .pedestal { width: 150px; height: 32px; bottom: 4px; }
.mg .mg-rc-stage .art { width: 128px; left: calc(50% - 64px); bottom: 8px; }
.mg .mg-rc-code { gap: 12px; margin-top: 6px; }
.mg .mg-rc-code span { min-width: 28px; }
.mg .mg-rc-code b { font-size: 36px; }
.mg .mg-rc-code small { font-size: 11px; margin-top: 5px; }
.mg .mg-rc-rule { margin: 12px 40px 8px; }
.mg .mg-rc-name { font-size: 20px; }
.mg .mg-rc-nick { font-size: 13px; margin-top: 2px; }
.mg .mg-rc-meta { margin-top: 12px; padding-top: 10px; }
.mg .mg-rc-meta b { font-size: 12.5px; }
/* 한 번 더 낮게(2026-09-27 "세로 크기를 조금만 더") */
.mg .mg-rc-in { padding: 10px 12px 12px; }
.mg .mg-rc-stage { height: 138px; }
.mg .mg-rc-stage .beam { width: 150px; height: 150px; top: -8px; }
.mg .mg-rc-stage .pedestal { width: 128px; height: 26px; bottom: 3px; }
.mg .mg-rc-stage .art { width: 108px; left: calc(50% - 54px); bottom: 6px; }
.mg .mg-rc-code { margin-top: 4px; }
.mg .mg-rc-code b { font-size: 33px; }
.mg .mg-rc-rule { margin: 9px 44px 6px; }
.mg .mg-rc-name { font-size: 19px; }
.mg .mg-rc-meta { margin-top: 10px; padding-top: 8px; }
/* 한 번 더 낮게(2026-09-27 "조금만 더 줄여줘") */
.mg .mg-rc-in { padding: 9px 12px 10px; }
.mg .mg-rc-stage { height: 118px; }
.mg .mg-rc-stage .beam { width: 130px; height: 130px; top: -6px; }
.mg .mg-rc-stage .pedestal { width: 110px; height: 22px; bottom: 2px; }
.mg .mg-rc-stage .art { width: 92px; left: calc(50% - 46px); bottom: 5px; }
.mg .mg-rc-code { margin-top: 2px; gap: 11px; }
.mg .mg-rc-code b { font-size: 30px; }
.mg .mg-rc-code small { margin-top: 4px; font-size: 12.5px; font-weight: 650; letter-spacing: .04em; }   /* 2026-09-27: 글자 뜻 10→12px */
.mg .mg-rc .mg-rc-code small { font-weight: 650; }
.mg .mg-rc-rule { margin: 7px 48px 4px; }
.mg .mg-rc-name { font-size: 18px; }
.mg .mg-rc-nick { font-size: 12.5px; margin-top: 1px; }
.mg .mg-rc-meta { margin-top: 8px; padding-top: 7px; }

/* ---------- 도감 유형 화면: 이전·다음 (2026-09-27) ---------- */
.mg .mg-rc-nav { position: absolute; top: 84px; width: 30px; height: 30px;   /* 캐릭터 몸 가운데 높이 */ border-radius: 50%; display: grid; place-items: center; z-index: 3;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mg-rc-nav svg { width: 17px; height: 17px; }
.mg-rc-nav.l { left: 14px; } .mg-rc-nav.r { right: 14px; } .mg-rc-nav.r svg { transform: rotate(180deg); }
.mg-rc-nav:active { background: rgba(255,255,255,.3); }
.mg-typenav { display: grid; grid-template-columns: 1fr 64px 1fr; gap: 8px; align-items: stretch; }
.mg .mg-typenav > button { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 8px 6px 10px; text-align: center; }
.mg-typenav > button::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 44px; background: linear-gradient(180deg, var(--gl), rgba(255,255,255,0)); }
.mg-typenav > button > * { position: relative; }
.mg .mg-typenav small { display: block; font-size: 12px; font-weight: 800; color: var(--gold-text); text-align: left; }
.mg-typenav > button.n small { text-align: right; }
.mg-typenav .art { width: 40px; margin: 0 auto 2px; }
.mg-typenav b { display: block; font-size: 13.5px; font-weight: 850; letter-spacing: .05em; }
.mg .mg-typenav > button span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.mg-typenav .pos { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.mg-typenav .pos b { font-size: 20px; font-variant-numeric: tabular-nums; }
.mg .mg-typenav .pos span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.mg .mg-typenav .pos button { margin-top: 4px; font-size: 12.5px; font-weight: 750; color: var(--gink); background: var(--g1); border-radius: 99px; padding: 3px 10px; }

/* ---------- 도감 ---------- */
.mg .mg-lead { font-size: 14px; color: var(--muted); margin: 4px 2px 0; font-weight: 500; }
.mg-team .mix { font-size: 12.5px; color: var(--muted); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-weight: 600; font-variant-numeric: tabular-nums; }
.mg-dex-group h3 { font-size: 15px; font-weight: 800; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.mg-dex-group h3 .dots { display: inline-flex; flex: none; }
.mg-dex-group h3 .dots i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--ivory); margin-left: -5px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.mg-dex-group h3 .dots i:first-child { margin-left: 0; }
.mg-dex { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mg-dex button { background: var(--paper); border-radius: 22px; padding: 12px 12px 14px; text-align: left; box-shadow: var(--sh-1); position: relative; overflow: hidden; }
.mg-dex button::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 92px; background: linear-gradient(180deg, var(--gl), transparent); }
.mg-dex .art { width: 92px; margin: 0 auto; position: relative; }
.mg-dex b { display: block; font-size: 16px; font-weight: 850; letter-spacing: .06em; margin-top: 4px; }
.mg-dex span { font-size: 12.5px; color: var(--muted); display: block; line-height: 1.4; }
.mg-dex .mine { position: absolute; top: 10px; right: 10px; font-size: 10.5px; font-weight: 800; background: var(--gface); color: var(--gink); box-shadow: inset 0 0 0 1px rgba(224,200,138,.7); padding: 3px 7px; border-radius: 99px; z-index: 1; }

/* ---------- 기록 · 안내 ---------- */
.mg-hist { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 12px 14px; border-radius: 18px; background: var(--paper); box-shadow: var(--sh-1); }
.mg-hist + .mg-hist { margin-top: 8px; }
.mg-hist .art { width: 44px; flex: none; }
.mg-hist .t { flex: 1; }
.mg-hist b { font-size: 16px; font-weight: 800; letter-spacing: .06em; }
.mg-hist span { display: block; font-size: 12.5px; color: var(--muted); }
.mg-empty { text-align: center; padding: 30px 10px; }
.mg-empty .art { width: 120px; margin: 0 auto 10px; }
.mg-empty p { color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 16px; }

.mg-table { width: 100%; border-collapse: collapse; font-size: 13px; font-weight: 500; margin-top: 8px; }
.mg-table th, .mg-table td { padding: 8px 6px; border-bottom: 1px solid var(--line2); text-align: center; }
.mg-table th { font-weight: 700; color: var(--muted); font-size: 12.5px; }
.mg-table td:first-child, .mg-table th:first-child { text-align: left; }
.mg-faq details { background: var(--paper); border-radius: 18px; padding: 14px 16px; box-shadow: var(--sh-1); }
.mg-faq details + details { margin-top: 8px; }
.mg-faq summary { font-weight: 700; font-size: 14.5px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.mg-faq summary::after { content: '+'; color: var(--gold-text); font-weight: 800; }
.mg-faq details[open] summary::after { content: '−'; }
.mg-faq p { font-size: 13.5px; font-weight: 500; color: #4b4a63; margin-top: 8px; }

/* ---------- 시트 · 토스트 ---------- */
.mg-sheet-bg { position: fixed; inset: 0; background: rgba(20,18,40,.45); z-index: 60; animation: mgFade .2s both; }
@keyframes mgFade { from { opacity: 0; } }
.mg-sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(520px, 100%); z-index: 61; background: var(--ivory); border-radius: 28px 28px 0 0; padding: 10px 18px max(20px, env(safe-area-inset-bottom)); animation: mgUp .35s var(--ease) both; max-height: 90dvh; overflow-y: auto; }
@keyframes mgUp { from { transform: translate(-50%, 100%); } }
.mg-sheet .grab { width: 40px; height: 5px; border-radius: 9px; background: #D6D0C4; margin: 0 auto 14px; }
.mg-sheet h3 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.mg-sheet .preview { border-radius: 18px; overflow: hidden; box-shadow: var(--sh-2); margin: 0 auto 16px; width: 56%; max-width: 240px; }
.mg-sheet .preview img { width: 100%; display: block; }
.mg-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border-radius: 18px; background: var(--paper); box-shadow: var(--sh-1); }
.mg-opt + .mg-opt { margin-top: 8px; }
/* 카카오톡 버튼 — 카카오 디자인 가이드의 노란색·검정 글씨·말풍선 */
.mg .mg-kakao { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; margin-bottom: 10px; border-radius: 14px; background: #FEE500; color: rgba(0,0,0,.85); font-size: 15.5px; font-weight: 750; }
.mg-kakao svg { width: 22px; height: 22px; }
.mg-sns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mg .mg-sns a { flex: 1 0 auto; text-align: center; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--ink); }
.mg-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--g1); color: var(--gink); }
.mg-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.mg .mg-note p { font-size: 12.5px; line-height: 1.55; color: var(--gink); }
.mg-opt .ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--gold3); color: #7a5c22; flex: none; }
.mg-opt .ic svg { width: 20px; height: 20px; }
.mg-opt b { display: block; font-size: 15px; }
.mg-opt span { font-size: 12.5px; color: var(--muted); }
.mg-toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); z-index: 80; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: var(--sh-2); animation: mgToast 2.2s both; white-space: nowrap; }
@keyframes mgToast { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

.mg-foot { text-align: center; font-size: 12.5px; color: var(--faint); font-weight: 500; margin-top: 30px; line-height: 1.6; }
/* 같은 집 앱 링크 (config.js siblings) */
.mg-sib { display: flex; justify-content: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mg-sib a { display: inline-flex; align-items: baseline; gap: 5px; padding: 7px 13px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none;
  font-size: 12.5px; font-weight: 700; }
.mg-sib a small { font-size: 12px; font-weight: 500; color: var(--muted); }

/* ---------- 나만의 결 · 오해와 진실 · 자주 하는 말 ---------- */
.mg-mine-read .hl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.mg-mine-read .hl div { background: var(--ivory); border-radius: 14px; padding: 10px 12px; }
.mg-mine-read .hl small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.mg-mine-read .hl b { font-size: 15px; font-weight: 800; }
.mg-mine-read .it { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line2); }
.mg-mine-read .it:first-of-type { border-top: 0; }
.mg-mine-read .lt { flex: none; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-weight: 850; font-size: 13px; color: var(--gink); background: var(--gface); }
.mg-mine-read .it b { font-size: 13px; color: var(--gold-text); font-weight: 750; }
.mg .mg-mine-read .it p { font-size: 14px; color: #3b3a55; margin-top: 2px; }
.mg-myth { display: grid; gap: 8px; }
.mg-myth > div { border-radius: 14px; padding: 12px 14px; }
.mg-myth .m { background: #F3F1F6; }
.mg-myth .r { background: var(--g1); }
.mg-myth small { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.mg-myth .r small { color: var(--gink); }
.mg .mg-myth .m p { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(111,108,130,.4); }
.mg .mg-myth .r p { color: #3a2d10; font-weight: 600; }
.mg-says { display: grid; gap: 8px; }
.mg-says span { position: relative; align-self: start; justify-self: start; background: var(--ink); color: #fff; font-size: 14px; font-weight: 650; padding: 9px 14px; border-radius: 16px 16px 16px 4px; }
.mg-says span:nth-child(2) { justify-self: end; background: var(--gface); color: var(--gink); border-radius: 16px 16px 4px 16px; }

/* ---------- 시험 참여 카드 ---------- */
.mg-pilot { border: 1.5px dashed #0E9A8E; }
.mg-fit { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 12px 0 14px; }
.mg .mg-fit button { border: 1px solid var(--line); border-radius: 14px; padding: 8px 2px; background: #fff; }
.mg-fit b { display: block; font-size: 17px; font-weight: 800; }
.mg-fit span { display: block; font-size: 12px; color: var(--muted); }
.mg .mg-fit button[aria-pressed="true"] { background: #0A6F66; border-color: #0A6F66; color: #fff; }
.mg .mg-fit button[aria-pressed="true"] span { color: #fff; }
.mg-known { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 650; }
.mg-known select { height: 40px; border-radius: 12px; border: 1px solid var(--line); padding: 0 10px; font: inherit; background: #fff; }
.mg-code { margin: 14px 0 10px; padding: 12px; border-radius: 12px; background: var(--ivory); border: 1px solid var(--line); overflow-x: auto; }
.mg-code code { font-family: 'IBM Plex Mono', Consolas, monospace; font-size: 12.5px; font-weight: 500; white-space: nowrap; user-select: all; }
.mg-btn[disabled] { opacity: .45; }

/* ---------- 결과 v2 (고급 타입 카드) ---------- */
.mg-rc { margin-top: 8px; border-radius: 32px; padding: 8px; position: relative; overflow: hidden; color: #fff; isolation: isolate;
  box-shadow: 0 2px 6px rgba(28,27,51,.10), 0 26px 50px -14px rgba(28,27,51,.45); }
.mg-rc::before { content: ''; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(75% 50% at 50% 26%, rgba(255,255,255,.22) 0%, transparent 70%), linear-gradient(172deg, var(--gc) 0%, var(--gd) 80%); }
.mg-rc::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 28%, rgba(255,255,255,.09) 42%, transparent 56%); }
.mg-rc .weave { position: absolute; inset: 0; z-index: -1; }
.mg-rc-in { border: 1px solid rgba(227,205,156,.45); border-radius: 25px; padding: 14px 14px 16px; position: relative; }
.mg-rc-in::before, .mg-rc-in::after { content: '✦'; position: absolute; top: 50%; font-size: 9px; color: rgba(227,205,156,.75); transform: translateY(-50%); }
.mg-rc-in::before { left: -5px; }
.mg-rc-in::after { right: -5px; }
.mg-rc-top { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; letter-spacing: .16em; color: rgba(243,227,190,.92); text-transform: uppercase; padding: 0 4px; }
.mg-rc-top i { font-style: normal; font-weight: 500; }   /* 2026-09-27: 투명도 .55 는 대비 2.5:1 → 불투명 + 가는 굵기로 구분 */
.mg-rc-stage { position: relative; height: 214px; perspective: 600px; }
.mg-rc-stage .beam { position: absolute; width: 230px; height: 230px; border-radius: 50%; left: 50%; top: -14px; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,244,214,.42), rgba(255,244,214,0) 64%); }
.mg-rc-stage .pedestal { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 196px; height: 42px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.30), rgba(255,255,255,.06) 62%, rgba(255,255,255,0) 72%);
  border-top: 1.5px solid rgba(227,205,156,.75); box-shadow: 0 16px 26px -10px rgba(0,0,0,.45), inset 0 -8px 16px rgba(0,0,0,.18); }
.mg-rc-stage .art { width: 172px; position: absolute; left: calc(50% - 86px); bottom: 10px; z-index: 1; }
.mg-rc-code { display: flex; justify-content: center; gap: 16px; margin-top: 10px; }
.mg-rc-code span { display: flex; flex-direction: column; align-items: center; min-width: 34px; }
.mg-rc-code b { font-size: 46px; font-weight: 850; line-height: 1; background: linear-gradient(180deg, #fff 35%, #F0DDB2 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mg-rc-code small { font-size: 12px; font-weight: 600; letter-spacing: .1em; color: rgba(255,255,255,.82); margin-top: 7px; }
.mg-rc-rule { display: flex; align-items: center; gap: 10px; margin: 16px 34px 12px; color: #E3CD9C; }
.mg-rc-rule i { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(227,205,156,0), rgba(227,205,156,.75)); }
.mg-rc-rule i:last-child { background: linear-gradient(270deg, rgba(227,205,156,0), rgba(227,205,156,.75)); }
.mg-rc-rule em { font-style: normal; font-size: 11px; }
.mg .mg-rc-name { text-align: center; font-size: 23px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.mg .mg-rc-nick { text-align: center; font-size: 14px; color: rgba(255,255,255,.9); margin-top: 4px; }
.mg-rc-meta { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.14); }
.mg-rc-meta div { text-align: center; padding: 0 4px; }
.mg-rc-meta div + div { border-left: 1px solid rgba(255,255,255,.12); }
.mg-rc-meta small { display: block; font-size: 12px; letter-spacing: .12em; color: rgba(243,227,190,.82); font-weight: 700; }
.mg-rc-meta b { display: block; font-size: 13.5px; font-weight: 700; margin-top: 3px; }

.mg-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.mg-h .no { font-size: 12.5px; font-weight: 800; color: var(--gold-text); letter-spacing: .06em; font-variant-numeric: tabular-nums; position: relative; padding-right: 12px; }
.mg-h .no::after { content: ''; position: absolute; right: 0; top: 50%; width: 6px; height: 1px; background: var(--gold-text); }
.mg-h h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.mg-h .sub { margin-left: auto; font-size: 12.5px; color: var(--muted); }

.mg-spec { padding: 8px 16px; }
.mg-sp { padding: 14px 0; }
.mg-sp + .mg-sp { border-top: 1px solid var(--line2); }
.mg-sp .row { display: grid; grid-template-columns: 58px 1fr 58px; align-items: center; gap: 10px; }
.mg-sp .lt { font-size: 12.5px; color: var(--faint); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.mg-sp .lt.r { justify-content: flex-end; }
.mg-sp .lt b { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: #F1EFF5; color: var(--faint); flex: none; }
.mg-sp .lt.on { color: var(--ink); }
.mg-sp .lt.on b { background: var(--gc); color: #fff; box-shadow: 0 5px 12px -3px var(--gc); }
.mg-sp .track { position: relative; height: 6px; border-radius: 9px; background: #EEEBF2; margin-top: 16px; }
.mg-sp .track i { position: absolute; top: 0; bottom: 0; border-radius: 9px; background: var(--gc); opacity: .85; }
.mg-sp .mid { position: absolute; left: 50%; top: -4px; width: 1.5px; height: 14px; background: #D4CFDC; transform: translateX(-50%); }
.mg-sp .knob { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 30%, #FFF6DD, #D8B470 55%, #A57D35); box-shadow: 0 2px 6px rgba(0,0,0,.25), 0 0 0 3px #fff; }
.mg-sp .knob em { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); font-style: normal; font-size: 12.5px; font-weight: 800; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mg-sp .cap { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding: 0 68px; font-size: 12.5px; color: var(--muted); }

.mg-cert { display: grid; grid-template-columns: 60px 1fr; gap: 4px 14px; align-items: center; }
.mg-cert .seal { width: 60px; color: var(--sc); filter: drop-shadow(0 6px 10px rgba(191,154,85,.3)); }
.mg-cert .seal svg { display: block; width: 100%; }
.mg-cert .body b { font-size: 16.5px; font-weight: 800; }
.mg-cert .body p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.mg-cert .stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 14px; background: var(--ivory); border-radius: 16px; padding: 12px 4px; }
.mg-cert .stats div { text-align: center; }
.mg-cert .stats div + div { border-left: 1px solid var(--line); }
.mg-cert .stats b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mg-cert .stats b small { font-size: 12.5px; font-weight: 700; margin-left: 1px; }
.mg-cert .stats span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.mg-cert .mg-neighbor { grid-column: 1 / -1; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); margin-top: 10px; }
.mg-cert .mg-neighbor + .mg-neighbor { margin-top: 8px; }
.mg-neighbor span { display: block; font-size: 12.5px; color: var(--muted); }
.mg-neighbor .chev { width: 16px; height: 16px; transform: rotate(180deg); color: var(--faint); flex: none; }

.mg-tabs { position: sticky; top: 0; z-index: 20; margin: 24px -24px 0; padding: 10px 24px 12px; background: linear-gradient(var(--ivory) 78%, rgba(250,249,246,0)); }
.mg-tabs .rail { display: flex; gap: 2px; padding: 4px; background: var(--paper); border-radius: 16px; box-shadow: var(--sh-1); overflow-x: auto; scrollbar-width: none; }
.mg-tabs .rail::-webkit-scrollbar { display: none; }
.mg-tabs button { flex: none; height: 36px; padding: 0 13px; border-radius: 12px; font-size: 13.5px; font-weight: 650; color: var(--muted); transition: background .2s, color .2s; }
.mg-tabs button[aria-selected="true"] { background: linear-gradient(160deg, var(--ink2), var(--ink)); color: var(--gold2); box-shadow: 0 4px 10px -3px rgba(28,27,51,.4); }

#mg-tabbody .mg-card > h3::before { content: ''; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); border-radius: 1.5px; flex: none; }
#mg-tabbody .mg-card > h3 { font-size: 16px; margin-bottom: 12px; }
.mg-list.num { gap: 0; }
.mg-list.num .mg-item { padding: 12px 0; }
.mg-list.num .mg-item:first-child { padding-top: 2px; }
.mg-list.num .mg-item + .mg-item { border-top: 1px solid var(--line2); }
.mg-item .ic.n { background: none; width: 24px; height: auto; display: block; padding-top: 1px; color: var(--gold-text); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mg-item .ic.n.w { color: #9B4F66; }   /* 흰 바탕 5.6:1 */

.mg-cta { border-radius: 26px; padding: 18px; color: #fff; position: relative; overflow: hidden; display: grid; grid-template-columns: 64px 1fr; gap: 4px 12px; align-items: center;
  background: radial-gradient(90% 80% at 90% 0%, rgba(227,205,156,.18), transparent 60%), linear-gradient(160deg, var(--ink2), var(--ink)); box-shadow: var(--sh-2); }
.mg-cta .art { width: 64px; }
.mg-cta b { font-size: 16px; font-weight: 800; }
.mg .mg-cta p { font-size: 13px; color: rgba(255,255,255,.86); }
.mg-cta .mg-row { grid-column: 1 / -1; }
.mg-cta .mg-btn { height: 48px; font-size: 15px; }
.mg-btn.glass { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff; }

.mg .mg-fab { position: fixed; right: max(24px, calc(50% - 236px)); bottom: calc(max(8px, env(safe-area-inset-bottom)) + 76px); z-index: 30;
  width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; color: var(--gold2);
  background: linear-gradient(160deg, var(--ink2), var(--ink)); box-shadow: 0 12px 26px rgba(28,27,51,.38), inset 0 1px 0 rgba(255,255,255,.12); }
.mg-fab svg { width: 22px; height: 22px; }
.mg .mg-fab { transition: opacity .25s, transform .25s var(--ease); }
.mg .mg-fab.off { opacity: 0; transform: scale(.8) translateY(8px); pointer-events: none; }
.mg[data-embedded] .mg-fab { position: sticky; bottom: 96px; margin-left: auto; }

/* ---------- 홈 v2 · 운결과 한 식구 ---------- */
.mg-wmbar { padding-top: max(18px, env(safe-area-inset-top)); }
/* 워드마크는 버튼이다(누르면 첫 화면). 버튼 티는 내지 않는다 — 명시도를 올려 공용 버튼 리셋을 이긴다. */
.mg .mg-wm { flex: 1; display: flex; align-items: flex-end; gap: 4px;
  background: none; border: 0; padding: 0; margin: 0; font: inherit; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; }
.mg .mg-wm:active { opacity: .7; }
.mg .mg-wm:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
.mg .mg-wm b { font-family: 'MG Wordmark', 'Gowun Batang', serif; font-size: 34px; font-weight: 700; letter-spacing: -.055em; line-height: 1; color: var(--ink); }
.mg .mg-wm i { font-family: 'IBM Plex Mono', Consolas, monospace; font-style: normal; font-size: 16px; font-weight: 600; letter-spacing: .06em; padding-bottom: 6px;
  background: linear-gradient(100deg, #8A6420 0%, #C79B4E 45%, #8A6420 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }  /* 로고의 금빛 물결과 같은 금색 */
.mg-wm .sg-logo { height: 60px; width: auto; color: var(--ink); display: block; margin: -4px 0 -8px -4px; }

.mg-hm { padding-top: 6px; }   /* 2026-09-27: 작은 인사 문구는 로고 바로 밑으로, 여백은 헤드라인 위로 옮김 */
.mg .mg-hm .mg-display { margin-top: 40px; }   /* 2026-09-27: 헤드라인만 조금 더 아래로 26→40px */
.mg .mg-kicker { font-size: 15px; color: var(--muted); }
.mg .mg-display { font-size: 31px; line-height: 1.28; font-weight: 850; letter-spacing: -0.045em; margin-top: 10px; color: var(--ink); }
.mg .mg-display.sm { font-size: 24px; line-height: 1.32; letter-spacing: -0.035em; }   /* 결과가 있을 때 인사 헤드라인 (2026-09-27: 31→24px) */
.mg .mg-display em { font-style: normal; background: linear-gradient(100deg, #8A6420 0%, #B8893A 45%, #7A561A 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

.mg-cast { position: relative; display: flex; justify-content: center; align-items: flex-end; height: 128px; margin: 18px -6px 4px; }
.mg-cast .line { position: absolute; left: 8%; right: 8%; bottom: 10px; height: 20px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 30%, rgba(227,197,126,.35), rgba(227,197,126,0) 70%); border-top: 1px solid rgba(224,200,138,.7); }
.mg-cast .c { width: 64px; margin: 0 -5px; position: relative; }
.mg-cast .c.m { width: 96px; z-index: 2; margin: 0 -2px; }
.mg-cast .c0, .mg-cast .c4 { width: 56px; transform: translateY(-6px); opacity: .95; }
.mg-cast .c1, .mg-cast .c3 { z-index: 1; }
/* 춤추는 캐릭터: 통통 튀며 좌우로 흔들 — 한 명씩 박자를 어긋나게, 가운데 결이는 더 높이 */
.mg-dance { transform-origin: 50% 92%; animation: mgDance 1.8s cubic-bezier(.45,.05,.55,.95) infinite; }
.mg-cast .c.m .mg-dance { animation-name: mgDanceBig; animation-duration: 2.2s; }
@keyframes mgDance {
  0%, 100% { transform: translateY(0) rotate(0) scale(1, 1); }
  15% { transform: translateY(0) rotate(0) scale(1.06, .94); }
  35% { transform: translateY(-12px) rotate(-6deg) scale(.97, 1.04); }
  55% { transform: translateY(0) rotate(0) scale(1.04, .96); }
  75% { transform: translateY(-7px) rotate(6deg) scale(.98, 1.02); }
}
@keyframes mgDanceBig {
  0%, 100% { transform: translateY(0) rotate(0) scale(1, 1); }
  20% { transform: translateY(0) scale(1.07, .93); }
  45% { transform: translateY(-20px) rotate(-3deg) scale(.96, 1.05); }
  65% { transform: translateY(0) rotate(0) scale(1.05, .95); }
  82% { transform: translateY(-6px) rotate(3deg); }
}
.mg-hm .mg-cast { margin-top: 0; margin-bottom: 0; height: 112px; }   /* 2026-09-27: 위로 당기기 */
/* 홈 결과 카드 — 한 단계 작게(2026-09-27 사용자 요청) */
.mg .mg-mine { margin-top: 4px; border-radius: 24px; padding: 6px; }
.mg .mg-mine .in { border-radius: 19px; padding: 10px 12px 12px; }
.mg .mg-mine .row { gap: 10px; }
.mg .mg-mine .stage { width: 92px; height: 98px; }
.mg .mg-mine .ped { height: 20px; }
.mg .mg-mine .code { font-size: 29px; }
.mg .mg-mine .txt b { font-size: 14.5px; }
.mg .mg-mine .txt p { font-size: 12.5px; }
.mg .mg-mine small { font-size: 12px; }
.mg .mg-best { margin-top: 8px; padding: 8px 11px; border-radius: 12px; }
.mg .mg-best b { font-size: 13px; }
.mg .mg-best em { font-size: 12.5px; }
.mg .mg-mine .btns { margin-top: 8px; }
.mg .mg-mine .btns .mg-btn { height: 40px; font-size: 14px; border-radius: 13px; }
.mg .mg-mine .btns .mg-btn svg { width: 17px; height: 17px; }

.mg-claims { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 4px; }
.mg-claims li { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.mg-claims li + li { border-top: 1px solid var(--line2); }
.mg-claims .ic { width: 38px; height: 38px; border-radius: 13px; flex: none; display: grid; place-items: center; color: var(--gink);
  background: var(--gface); box-shadow: inset 0 0 0 1px rgba(224,200,138,.6); }
.mg-claims .ic svg { width: 19px; height: 19px; }
.mg-claims li > div { flex: 1; min-width: 0; }
.mg-claims b { color: var(--ink); font-weight: 750; }
.mg .mg-claims .pill { flex: none; height: 34px; padding: 0 13px; border-radius: 11px; font-size: 13px; font-weight: 750; color: var(--gink); background: var(--g1); }

.mg-start { display: flex; align-items: center; gap: 14px; margin-top: 18px; }
.mg-start .mg-btn { width: auto; padding: 0 28px; }
.mg-start span { font-size: 13px; color: var(--muted); font-weight: 600; }
.mg .mg-fine { font-size: 13px; color: var(--faint); margin-top: 12px; }

.mg-mine { margin-top: 14px; border-radius: 28px; padding: 7px; position: relative; overflow: hidden; color: #fff; isolation: isolate;
  box-shadow: 0 2px 6px rgba(28,27,51,.08), 0 22px 40px -16px rgba(28,27,51,.45); }
.mg-mine::before { content: ''; position: absolute; inset: 0; z-index: -2; background: radial-gradient(70% 70% at 22% 30%, rgba(255,255,255,.2), transparent 70%), linear-gradient(165deg, var(--gc), var(--gd) 85%); }
.mg-mine .weave { position: absolute; inset: 0; z-index: -1; }
.mg-mine .in { border: 1px solid rgba(227,205,156,.45); border-radius: 22px; padding: 14px 14px 14px; }
.mg-mine .row { display: flex; align-items: center; gap: 12px; }
.mg-mine .stage { position: relative; width: 116px; height: 124px; flex: none; }
.mg-mine .glow { position: absolute; inset: -6px; border-radius: 50%; background: radial-gradient(circle, rgba(255,244,214,.38), transparent 64%); }
.mg-mine .ped { position: absolute; left: 6px; right: 6px; bottom: 2px; height: 24px; border-radius: 50%; border-top: 1px solid rgba(227,205,156,.75);
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.25), rgba(255,255,255,0) 70%); box-shadow: 0 10px 16px -8px rgba(0,0,0,.4); }
.mg-mine .art { position: absolute; left: 8px; right: 8px; bottom: 6px; z-index: 1; }
.mg-mine .txt { min-width: 0; }
.mg .mg-mine small { font-size: 12px; letter-spacing: .08em; color: rgba(243,227,190,.9); font-weight: 700; }
.mg-mine .code { font-size: 36px; font-weight: 850; letter-spacing: .08em; line-height: 1.1; margin-top: 2px; background: linear-gradient(180deg, #fff 35%, #F0DDB2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mg-mine .txt b { display: block; font-size: 16px; font-weight: 800; }
.mg .mg-mine .txt p { font-size: 13px; color: rgba(255,255,255,.88); margin-top: 2px; line-height: 1.45; }
.mg-mine .btns { margin-top: 12px; }
.mg .mg-best { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2); color: #fff; text-align: left; }
.mg-best span { flex: none; font-size: 12px; font-weight: 800; color: #FFF6E3; letter-spacing: .04em; }
.mg-best b { flex: 1; font-size: 14px; font-weight: 750; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.mg-best em { font-style: normal; font-size: 12.5px; font-weight: 700; color: #FFF6E3; }
.mg-mine .btns .mg-btn { height: 46px; font-size: 15px; }
.mg-mine .btns .mg-btn.glass { flex: 0 0 auto; width: auto; padding: 0 18px; }

.mg-quote { display: flex; align-items: center; gap: 10px; position: relative; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 16px 12px 16px 18px; }
.mg-quote .qm { position: absolute; top: -6px; left: 14px; font-family: 'MG Wordmark', 'Gowun Batang', Georgia, serif; font-size: 52px; line-height: 1; color: var(--g3); }
.mg-quote .body { flex: 1; padding-top: 8px; }
.mg .mg-quote small { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--gink); }
.mg .mg-quote p { font-size: 16px; font-weight: 700; color: var(--ink); margin-top: 3px; }
.mg-quote .art { width: 58px; flex: none; }

.mg-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }   /* 2026-09-27 배치 v2: 2열 가로형 */
.mg .mg-tiles button { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 10px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 18px; transition: transform .15s var(--ease), border-color .2s; }
.mg-tiles button:active { transform: scale(.97); border-color: var(--g3); }
.mg-tiles .badge { flex: none; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #fff 0%, color-mix(in srgb, var(--tc) 16%, #fff) 70%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 22%, #fff); }
.mg-tiles .badge .art { width: 38px; margin-top: 3px; }
.mg-tiles .tx { min-width: 0; }
.mg-tiles .tx b { display: block; font-size: 14.5px; font-weight: 800; }
.mg .mg-tiles .tx span { display: block; font-size: 12.5px; color: #4A4760; margin-top: 1px; line-height: 1.35; }

.mg .mg-more { font-size: 13px; font-weight: 650; color: var(--gink); }
.mg-shelf { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -24px; padding: 2px 24px 8px; scrollbar-width: none; }
.mg-shelf::-webkit-scrollbar { display: none; }
.mg-shelf button { flex: none; width: 88px; scroll-snap-align: start; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 8px 6px 12px; text-align: center; position: relative; overflow: hidden; }
.mg-shelf button::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 52px; background: linear-gradient(180deg, var(--gl), rgba(255,255,255,0)); }
.mg-shelf .art { width: 36px; margin: 0 auto 4px; position: relative; }   /* 2026-09-27: 74→54→44→36px */
.mg .mg-shelf { scroll-padding-inline: 24px; gap: 8px; }   /* 스냅 스크롤이 좌우 여백을 무시해 첫 카드가 화면 끝에 붙던 문제 */
/* 2026-09-27: 5개 한 줄(가로 스크롤 없음) — 나머지는 도감 */
.mg .mg-shelf.five { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0; padding: 2px 0 4px; overflow: visible; }
.mg .mg-shelf.five button { width: auto; min-width: 0; }
.mg .mg-shelf button { width: 80px; padding: 10px 4px 10px; border-radius: 18px; }
.mg .mg-shelf button::before { height: 34px; }
.mg .mg-shelf b { font-size: 12.5px; margin-top: 0; }
.mg .mg-shelf span { font-size: 12px; line-height: 1.3; }
.mg .mg-shelf .mine { top: 5px; right: 5px; font-size: 10px; padding: 1px 6px; }
.mg-shelf b { display: block; font-size: 13px; font-weight: 850; letter-spacing: .06em; margin-top: 2px; }
.mg-shelf span { display: block; font-size: 12.5px; color: var(--muted); }
.mg-shelf .mine { position: absolute; top: 8px; right: 8px; z-index: 1; font-size: 10.5px; font-weight: 800; color: var(--gink); background: var(--gface); padding: 2px 7px; border-radius: 99px; }

.mg-nots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mg-nots div { border: 1px solid var(--line); border-radius: 20px; padding: 14px 14px 16px; background: #fff; }
.mg-nots b { display: block; font-size: 14.5px; font-weight: 750; line-height: 1.4; }
.mg-nots em { font-style: normal; color: #7E5B1C; }
.mg .mg-nots p { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.55; }

/* 하단 탭 — 운결과 같은 흰 바 + 금빛 알약 */
.mg .mg-nav[hidden] { display: none; }   /* 검사·분석 화면에서는 숨김 (v2 교체 때 빠졌던 규칙 복구) */
.mg-nav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(520px, 100%); z-index: 40; display: flex; justify-content: space-around;
  padding: 7px 6px max(8px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.mg[data-embedded] .mg-nav { position: sticky; transform: none; left: auto; bottom: 0; margin: 0 auto; }
.mg-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }
.mg-nav .pill { width: 48px; height: 30px; border-radius: 15px; display: grid; place-items: center; background: #F1F2F7; transition: background .2s; }
.mg-nav .pill svg { width: 20px; height: 20px; }
.mg-nav button[aria-current="page"] { color: var(--ink); font-weight: 800; }
.mg-nav button[aria-current="page"] .pill { background: var(--gface); color: var(--gink); box-shadow: inset 0 0 0 1px rgba(224,200,138,.7); }


/* ---------- 선명도 (2026-09-27): 큰 글자 밑 작은 설명 글씨 ---------- */
/* 2차(같은 날): 작은 글씨 전체 한 단계 크게(10.5→12, 11→12, 11.5→12.5, 12→12.5) · 회색 더 진하게 · 이름표 600 */
.mg.mg .mg-picker span, .mg.mg .mg-shelf span, .mg.mg .mg-typenav > button span, .mg.mg .mg-slot span, .mg.mg .mg-fit span,
.mg.mg .mg-tiles .tx span, .mg.mg .mg-dex span, .mg.mg .mg-match .t span, .mg.mg .mg-member .t span, .mg.mg .mg-hist span { font-weight: 600; color: #3F3C55; }
.mg .mg-rc-top, .mg .mg-rc-code small, .mg .mg-rc-nick, .mg .mg-rc-meta small, .mg .mg-rc-meta b, .mg .mg-rc-name,
.mg .mg-mine small, .mg .mg-mine .txt p, .mg .mg-mine .txt b, .mg .mg-res-hero .who, .mg .mg-res-hero .nick, .mg .mg-res-hero .name,
.mg .mg-trans .who { text-shadow: 0 1px 2px rgba(0,0,0,.28); }
.mg .mg-rc-top, .mg .mg-rc-meta small, .mg .mg-mine small { color: #FBF1DA; }
.mg .mg-res-hero .who, .mg .mg-res-hero .nick { opacity: 1; color: #fff; }
.mg .mg-rc-code small { color: #fff; }
.mg .mg-fn div:first-child small { color: var(--gold2); }   /* 짙은 주기능 칸 위 금색은 밝게 */
.mg .mg-muted, .mg .mg-small, .mg .mg-fine, .mg .mg-kicker,
.mg .mg-tiles span, .mg .mg-nots p, .mg .mg-quick span, .mg .mg-shelf span, .mg .mg-dex span,
.mg .mg-claims li, .mg .mg-hist span, .mg .mg-match .t span, .mg .mg-member .t span,
.mg .mg-sec-h .sub, .mg .mg-h .sub, .mg .mg-fit span, .mg .mg-picker span, .mg .mg-slot span,
.mg .mg-opt span, .mg .mg-axis .meta, .mg .mg-sp .cap, .mg .mg-cert .body p, .mg .mg-cert .stats span,
.mg .mg-neighbor span, .mg .mg-trans .means, .mg .mg-mine-read .hl small, .mg .mg-trust p,
.mg .mg-card p, .mg .mg-item p, .mg .mg-kv .v, .mg .mg-dim p, .mg .mg-rc-code small, .mg .mg-rc-nick,
.mg .mg-mine .txt p, .mg .mg-cta p, .mg .mg-nav button { font-weight: 500; }
.mg .mg-nots p, .mg .mg-tiles span, .mg .mg-quick span { color: #4A4760; }


/* 결과 화면 점검(2026-09-27): 얇게(400) 남아 있던 작은 글씨 → 500, 인지 기능 설명 한 단계 크게 */
.mg.mg .mg-fn span { font-size: 12.5px; font-weight: 500; line-height: 1.35; }
.mg.mg .mg-tip, .mg.mg .mg-abc .lc p, .mg.mg .mg-abc .note, .mg.mg .mg-note p { font-weight: 500; }

/* ---------- 홈 친구 초대 (2026-09-27) ---------- */
.mg-invite { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; background: linear-gradient(135deg, #FFFFFF, #F7F1E4); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.mg-invite .duo { position: relative; flex: none; width: 88px; height: 76px; }
.mg-invite .duo .art { position: absolute; left: 0; bottom: 0; width: 60px; }
.mg-invite .duo .q { position: absolute; right: 0; top: 6px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 800; color: var(--gold-text);
  background: #fff; border: 1.5px dashed var(--gold); box-shadow: 0 4px 12px rgba(191,154,85,.18); }
.mg-invite .tx { flex: 1; min-width: 0; }
.mg .mg-invite b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -.02em; }
.mg .mg-invite p { margin: 4px 0 10px; font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1.5; }
.mg .mg-invite small { display: block; margin-top: 6px; font-size: 12px; font-weight: 500; color: var(--faint); }

/* ---------- 첫 화면 (2026-09-27) — 밤하늘 네이비 · 먹처럼 번지는 로고 · 16유형 궤도 ---------- */
.mg .mg-view.full { padding: 0; }
.mg .mg-wel { position: relative; overflow: hidden; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: calc(26px + env(safe-area-inset-top)) 24px calc(16px + env(safe-area-inset-bottom)); color: #F4EEDF;
  background: radial-gradient(90% 48% at 50% 46%, #332D5E 0%, rgba(51,45,94,0) 70%), linear-gradient(180deg, #121126 0%, #1C1B33 48%, #131228 100%); }
.mg .mg-wel > * { position: relative; z-index: 1; }
.mg-wel .sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.mg-wel .sky .weave { position: absolute; left: 0; right: 0; top: 30%; height: 44%; width: 100%; -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }
.mg-wel .dust i { position: absolute; border-radius: 50%; background: #F3D899; box-shadow: 0 0 6px 1px rgba(243,216,153,.7); opacity: 0; animation: wTw 4.2s ease-in-out infinite; }
.mg-wel .halo { position: absolute; left: 50%; top: 4%; width: 340px; height: 220px; margin-left: -170px; border-radius: 50%; background: radial-gradient(closest-side, rgba(227,197,126,.16), transparent); }
@keyframes wTw { 0%, 100% { opacity: 0; transform: scale(.5); } 50% { opacity: .85; transform: scale(1); } }

.mg .mg-wel .mono { margin: 0; font-family: 'IBM Plex Mono', Consolas, monospace; font-size: 12px; font-weight: 600; letter-spacing: .3em; color: #D6BC83; }
.mg .mg-wel .logo { margin: 12px 0 0; color: #FBF6EA; font-size: 0; line-height: 0; animation: wInk 1.4s cubic-bezier(.65,.05,.25,1) .2s backwards; }
.mg-wel .logo .sg-logo { height: 112px; width: auto; display: block; filter: drop-shadow(0 8px 26px rgba(227,197,126,.22)); }
.mg-wel .logo .sg-logo g { transform-box: fill-box; transform-origin: center; animation: wSeal .55s cubic-bezier(.3,1.5,.5,1) 1.35s backwards; }
@keyframes wInk { from { clip-path: inset(-30% 105% -30% -10%); opacity: .3; filter: blur(3px); } to { clip-path: inset(-30% -10% -30% -10%); opacity: 1; filter: none; } }
@keyframes wSeal { from { opacity: 0; transform: rotate(-24deg) scale(2.4); } 70% { opacity: 1; } to { opacity: 1; transform: rotate(-6deg) scale(1); } }
.mg .mg-wel .mbti { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-family: 'IBM Plex Mono', Consolas, monospace; font-size: 16px; font-weight: 600; letter-spacing: .44em; padding-left: .44em;
  background: linear-gradient(90deg, #F6E3B0, #D4AE63 55%, #F1D89C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mg-wel .mbti i { width: 30px; height: 1px; background: linear-gradient(90deg, transparent, #D4AE63); }
.mg-wel .mbti i:last-child { transform: scaleX(-1); }
.mg .mg-wel .kicker { margin: 8px 0 0; font-size: 14.5px; font-weight: 500; color: #DCD5E8; letter-spacing: .04em; }

/* 궤도 */
.mg-wel .stage { width: 100%; height: 200px; margin-top: 8px; position: relative; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; animation: wStage 1s var(--ease) .9s backwards; }
.mg-wel .stage:active { cursor: grabbing; }
@keyframes wStage { from { opacity: 0; transform: scale(.85); } }
.mg-wel .stage .ring { position: absolute; left: 50%; top: 66%; width: 86%; height: 44%; transform: translate(-50%, -50%); border-radius: 50%;
  border: 1px solid rgba(227,197,126,.38); box-shadow: 0 0 26px rgba(227,197,126,.14), inset 0 0 26px rgba(227,197,126,.1); }
.mg-wel .stage .beam { position: absolute; left: 50%; top: 2%; width: 200px; height: 200px; margin-left: -100px; border-radius: 50%; background: radial-gradient(closest-side, rgba(246,227,176,.28), rgba(246,227,176,0)); }
.mg .mg-wel .stage .o { position: absolute; left: 50%; top: 66%; width: 58px; margin: -60px 0 0 -29px; will-change: transform, opacity; transform-origin: 50% 95%; }
.mg-wel .stage .o .art { width: 58px; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); transition: filter .3s; }
.mg-wel .stage .o.on .art { filter: drop-shadow(0 0 12px rgba(246,227,176,.55)) drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.mg-wel .stage .o svg, .mg-wel .stage .hero svg { width: 100%; height: auto; display: block; pointer-events: none; }
.mg-wel .stage .hero { position: absolute; left: 50%; top: 66%; width: 96px; margin: -118px 0 0 -48px; z-index: 15; pointer-events: none; }
.mg-wel .stage .hero .ped { position: absolute; left: 50%; bottom: -6px; width: 104px; height: 22px; margin-left: -52px; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, #F6E3B0, #C79B4E 70%, rgba(199,155,78,0)); opacity: .55; }
.mg .mg-wel .now { margin: 2px 0 0; min-height: 21px; font-size: 13.5px; font-weight: 600; color: #E4DDF0; }
.mg-wel .now b { color: var(--c, #F1D89C); letter-spacing: .08em; font-weight: 800; margin-right: 2px; }
.mg .mg-wel .now span { color: #B9B2CC; font-weight: 500; }

.mg .mg-wel .head { margin: 12px 0 0; font-size: 25px; line-height: 1.38; font-weight: 800; letter-spacing: -.035em; color: #fff; }
.mg .mg-wel .head em { font-style: normal; background: linear-gradient(90deg, #F6E3B0, #D4AE63 60%, #F1D89C); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mg-wel .stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; margin-top: 13px; padding: 12px 0; border-top: 1px solid rgba(227,197,126,.22); border-bottom: 1px solid rgba(227,197,126,.22); }
.mg-wel .stats div + div { border-left: 1px solid rgba(227,197,126,.16); }
.mg .mg-wel .stats b { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; color: #F1D89C; font-variant-numeric: tabular-nums; }
.mg .mg-wel .stats b small { font-size: 14px; font-weight: 700; margin-left: 1px; }
.mg .mg-wel .stats span { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 500; color: #CFC8DD; }
.mg-wel .grow { flex: 1 1 0; min-height: 4px; max-height: 44px; }
@media (min-height: 860px) { .mg .mg-wel { justify-content: center; } .mg-wel .stage { height: 236px; } .mg-wel .logo .sg-logo { height: 124px; } }

.mg .mg-wel .cta { position: relative; overflow: hidden; width: 100%; height: 60px; border-radius: 20px; display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 17.5px; font-weight: 800; letter-spacing: -.01em; color: #2A1F08;
  background: linear-gradient(160deg, #F6E3B0 0%, #DDBA70 45%, #BF914A 100%); box-shadow: 0 16px 36px rgba(212,174,99,.32), inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 0 rgba(120,80,20,.25); transition: transform .15s var(--ease); }
.mg .mg-wel .cta:active { transform: scale(.98); }
.mg-wel .cta svg { width: 20px; height: 20px; }
.mg-wel .cta .spark { font-size: 15px; color: #7A5418; }
.mg-wel .cta::after { content: ''; position: absolute; top: -10%; bottom: -10%; width: 36%; left: -50%; transform: skewX(-20deg);
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.55), rgba(255,255,255,0)); animation: wShine 4s ease-in-out 3s infinite; }
@keyframes wShine { 0% { left: -50%; } 30%, 100% { left: 130%; } }
.mg .mg-wel .skip { margin-top: 10px; padding: 9px 14px; font-size: 14px; font-weight: 600; color: #E4DDF0; }
.mg .mg-wel .skip b { color: #F1D89C; font-weight: 750; }
.mg .mg-wel .fine { margin: 4px 0 0; font-size: 12px; font-weight: 500; color: #ABA5BF; }
/* 방문자 수 — 밤하늘 위라 밝은 회색, 숫자만 금빛으로 살짝 띄운다 */
.mg .mg-wel .visits { margin: 5px 0 0; font-size: 12.5px; font-weight: 500; color: #B9B3CC; }
.mg .mg-wel .visits b { font-weight: 800; color: var(--g2); font-variant-numeric: tabular-nums; }
.mg .mg-wel .visits[hidden] { display: none; }
.mg-wel .rise { animation: wRise .8s var(--ease) var(--d, 0s) backwards; }
@keyframes wRise { from { opacity: 0; transform: translateY(14px); } }
@media (max-height: 700px) { .mg-wel .stage { height: 176px; } .mg-wel .logo .sg-logo { height: 92px; } .mg .mg-wel .head { font-size: 22px; margin-top: 12px; } }

@media (prefers-reduced-motion: reduce) {
  .mg *, .mg *::before, .mg *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
