:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --ink: #23223a;
  --ink-2: #55536d;
  --ink-3: #8a889e;
  --line: #e6e2d8;
  --brand: #2b2a4c;
  --brand-ink: #ffffff;
  --primary: #2b2a4c;
  --primary-ink: #ffffff;
  --accent: #b8862b;
  --accent-soft: #f6ead0;
  --good: #1f8a5b;
  --good-soft: #e4f4ec;
  --warn: #b4551d;
  --warn-soft: #fbece0;
  --info-soft: #eceaf6;
  --el-0: #2f9e57; --el-0-ink: #fff;
  --el-1: #e5484d; --el-1-ink: #fff;
  --el-2: #f2c230; --el-2-ink: #2a2200;
  --el-3: #e9ecf1; --el-3-ink: #2a2f3a;
  --el-4: #2b303b; --el-4-ink: #fff;
  --shadow: 0 1px 2px rgba(35, 34, 58, .06), 0 6px 20px rgba(35, 34, 58, .06);
  --radius: 16px;
  --gutter: 16px;
}
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14131f; --surface: #1d1c2c; --surface-2: #23223a; --ink: #eceaf5; --ink-2: #b6b4cb; --ink-3: #8583a0;
    --line: #34324d; --brand: #0f0e1a; --primary: #e3b25a; --primary-ink: #1c1608; --accent: #e3b25a; --accent-soft: #3a3020;
    --good: #55d398; --good-soft: #1b3a2c; --warn: #f0a46c; --warn-soft: #3d2a1c; --info-soft: #2a2845;
    --el-3: #cfd4de; --el-4: #4a5163; --el-4-ink: #fff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  --bg: #14131f; --surface: #1d1c2c; --surface-2: #23223a; --ink: #eceaf5; --ink-2: #b6b4cb; --ink-3: #8583a0;
  --line: #34324d; --brand: #0f0e1a; --primary: #e3b25a; --primary-ink: #1c1608; --accent: #e3b25a; --accent-soft: #3a3020;
  --good: #55d398; --good-soft: #1b3a2c; --warn: #f0a46c; --warn-soft: #3d2a1c; --info-soft: #2a2845;
  --el-3: #cfd4de; --el-4: #4a5163; --el-4-ink: #fff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: 16px; line-height: 1.65; letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: break-word;
  padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
a { color: inherit; }

/* 상단 바 */
.top { position: sticky; top: 0; z-index: 20; background: var(--brand); color: var(--brand-ink); padding-top: env(safe-area-inset-top); }
.top-inner { max-width: 640px; margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
/* 두 줄 로고: 위에서 아래로 읽으면 왼쪽 열은 '운명', 오른쪽 열은 '73' (한글 금색, 숫자 민트색) */
.logo2 { display: inline-grid; grid-template-columns: 1em 1em; column-gap: .1em; justify-items: center; align-items: center; font-size: 17px; line-height: 1.04; font-weight: 800; letter-spacing: 0; font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
.logo2 b { font-weight: inherit; }
.logo2 .h { color: #f5d58a; }
.logo2 .n { color: #7fe3cf; }
.logo2.xl { font-size: 46px; }
.brand-sub { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .72); letter-spacing: -0.01em; }
.tabs { display: flex; gap: 4px; background: rgba(255, 255, 255, .1); padding: 3px; border-radius: 999px; }
.tab { border: 0; background: transparent; color: rgba(255, 255, 255, .8); padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; min-height: 36px; }
.tab[aria-selected="true"] { background: #fff; color: var(--brand); }

main { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter) 24px; }
.view { padding-top: 18px; }
.stack { display: grid; gap: 14px; }
.hero { padding: 10px 2px 18px; }
.hero h1 { font-size: 24px; line-height: 1.35; letter-spacing: -0.03em; }
.hero p { margin-top: 8px; color: var(--ink-2); font-size: 15px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 14px; }
.card-title { font-size: 17px; margin-bottom: 14px; }
.muted { color: var(--ink-3); font-size: 13px; }

/* 폼 */
.field { margin-bottom: 16px; }
.field > label, .field > .label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; }
.field .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.5; }
input[type="text"], input[type="number"], input[type="time"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); font-size: 16px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
.row { display: grid; gap: 8px; }
.row.three { grid-template-columns: 1.5fr 1fr 1fr; }
.row.two { grid-template-columns: 1fr 1fr; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--surface-2); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { text-align: center; padding: 10px 6px; border-radius: 9px; font-size: 15px; font-weight: 600; color: var(--ink-2); cursor: pointer; min-height: 44px; display: grid; place-items: center; }
.seg input:checked + label { background: var(--primary); color: var(--primary-ink); }
.seg input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.adv { margin: 4px 0 16px; border-top: 1px dashed var(--line); padding-top: 12px; }
.adv summary { cursor: pointer; font-size: 14px; color: var(--ink-2); font-weight: 600; min-height: 36px; display: flex; align-items: center; }
.adv .adv-body { padding-top: 12px; }
.form-error { color: var(--warn); background: var(--warn-soft); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 12px; }
.btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 14px; padding: 12px 18px; font-weight: 700; min-height: 48px; font-size: 16px; }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.accent { background: var(--accent); color: #1c1608; border-color: var(--accent); }
.btn.block { display: block; width: 100%; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 14px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.linkbtn { background: none; border: 0; color: var(--ink-3); text-decoration: underline; font-size: 13px; padding: 8px 0; min-height: 36px; }

/* 결과: 요약 */
.today { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 14px; }
.today .kicker { font-size: 12.5px; font-weight: 800; color: var(--accent); }
.today-line { margin-top: 6px; font-size: 18px; line-height: 1.55; font-weight: 800; letter-spacing: -0.02em; }
.today-rel, .today-tip { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.today-tip b { color: var(--accent); margin-right: 4px; }
.today-meta { margin-top: 10px; display: flex; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.today-meta .streak { font-weight: 800; color: var(--good); }
.today-save { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: grid; gap: 8px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.home-today { margin: 4px 0 18px; }
.summary { background: linear-gradient(160deg, var(--brand), #4a3f7a); color: #fff; border-radius: var(--radius); padding: 22px 20px; box-shadow: var(--shadow); }
.summary .kicker { font-size: 13px; opacity: .8; }
.summary h2 { font-size: 24px; line-height: 1.35; margin: 6px 0 12px; letter-spacing: -0.03em; }
.summary p { font-size: 15px; opacity: .92; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); }
.chip.dark { background: var(--info-soft); color: var(--ink); }
.subnav { position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 10; margin: 12px calc(var(--gutter) * -1) 0; padding: 8px var(--gutter); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { white-space: nowrap; text-decoration: none; font-size: 14px; font-weight: 600; padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); min-height: 36px; display: inline-flex; align-items: center; }
.sec { scroll-margin-top: 112px; padding-top: 18px; }
.sec > h2 { font-size: 19px; margin-bottom: 10px; letter-spacing: -0.02em; }
.sec > .sub { color: var(--ink-3); font-size: 13.5px; margin: -4px 0 12px; }

/* 만세력 표 */
.chart { display: grid; grid-template-columns: 52px repeat(4, 1fr); gap: 6px 6px; align-items: center; }
.chart .h { text-align: center; font-size: 13px; font-weight: 700; color: var(--ink-2); padding-bottom: 2px; }
.chart .l { font-size: 12px; color: var(--ink-3); }
.chart .c { text-align: center; font-size: 14px; font-weight: 600; }
.chart .c.me { color: var(--good); font-weight: 800; }
.chart .c small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.glyph { display: grid; place-items: center; border-radius: 12px; padding: 8px 0 6px; line-height: 1.1; border: 1px solid transparent; position: relative; }
.glyph b { font-family: "Noto Serif KR", "Batang", "SimSun", serif; font-size: 34px; font-weight: 700; }
.glyph span { font-size: 12px; opacity: .85; margin-top: 2px; }
.glyph.el0 { background: var(--el-0); color: var(--el-0-ink); }
.glyph.el1 { background: var(--el-1); color: var(--el-1-ink); }
.glyph.el2 { background: var(--el-2); color: var(--el-2-ink); }
.glyph.el3 { background: var(--el-3); color: var(--el-3-ink); border-color: var(--line); }
.glyph.el4 { background: var(--el-4); color: var(--el-4-ink); }
.glyph.unknown { background: var(--surface-2); color: var(--ink-3); border: 1px dashed var(--line); }
.glyph.me::after { content: "나"; position: absolute; top: -7px; left: -5px; background: var(--good); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 999px; }
.hidden-stems { display: grid; gap: 2px; justify-items: center; font-size: 12.5px; }
.hidden-stems i { font-style: normal; display: inline-flex; gap: 4px; align-items: baseline; }
.hidden-stems i b { font-family: serif; font-size: 15px; }
.hidden-stems i.e0 b { color: var(--el-0); } .hidden-stems i.e1 b { color: var(--el-1); }
.hidden-stems i.e2 b { color: #b78a00; } .hidden-stems i.e3 b { color: var(--ink-2); } .hidden-stems i.e4 b { color: #3b6fd1; }
.meta { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); display: grid; gap: 4px; }

/* 오행 막대 */
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 52px 1fr 28px; gap: 8px; align-items: center; font-size: 14px; }
.bar .track { height: 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.bar .fill { height: 100%; border-radius: 999px; min-width: 2px; }
.bar .n { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* 구조 카드 */
.gauge { margin: 6px 0 4px; }
.gauge .track { position: relative; height: 12px; border-radius: 999px; background: linear-gradient(90deg, #6aa5e8, #c9c4de 50%, #e8905f); }
.gauge .pin { position: absolute; top: -5px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); box-shadow: var(--shadow); }
.gauge .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.kv { display: grid; gap: 10px; margin-top: 12px; }
.kv .it { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.kv .it b { display: block; font-size: 13px; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; margin: 2px 4px 2px 0; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--info-soft); color: var(--ink); }
.pat { padding: 12px 14px; border-radius: 12px; border-left: 4px solid var(--good); background: var(--good-soft); margin-top: 8px; font-size: 15px; }
.pat.warn { border-left-color: var(--warn); background: var(--warn-soft); }
.pat b { display: block; margin-bottom: 2px; }

/* 풀이 아코디언 */
details.read { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 12px; overflow: hidden; }
details.read > summary { list-style: none; cursor: pointer; padding: 16px 18px; display: grid; gap: 2px; min-height: 56px; }
details.read > summary::-webkit-details-marker { display: none; }
details.read > summary .t { font-weight: 800; font-size: 17px; display: flex; justify-content: space-between; align-items: center; }
details.read > summary .t::after { content: "＋"; color: var(--ink-3); font-weight: 400; }
details.read[open] > summary .t::after { content: "－"; }
details.read > summary .lead { color: var(--ink-2); font-size: 14.5px; }
.read-body { padding: 0 18px 18px; display: grid; gap: 12px; }
.read-body p { font-size: 15.5px; color: var(--ink); }
.tip { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.tip b { display: block; margin-bottom: 4px; }
.tip ul { margin: 0; padding-left: 18px; }
details.basis { font-size: 13px; color: var(--ink-3); }
details.basis summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
details.basis ul { margin: 4px 0 0; padding-left: 18px; }

/* 운의 흐름 */
.scroller { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin: 0 -2px; scroll-snap-type: x proximity; }
.cyc { flex: 0 0 74px; scroll-snap-align: center; background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 4px 10px; text-align: center; min-height: 44px; }
.cyc .age { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.cyc .sip { font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.5; }
.sipline { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 12px; }
.sipbox { padding: 10px 10px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); text-align: center; }
.sipbox .sl { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.sipbox .sl b { margin-left: 2px; font-family: "Noto Serif KR", "Batang", "SimSun", serif; font-size: 15px; }
.sipbox .sv { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.sipbox .sw { font-size: 12.5px; color: var(--ink-2); margin: 1px 0 6px; line-height: 1.4; }
.sipbox .pill { margin: 0; font-size: 12px; padding: 2px 8px; }
.cyc .glyph { margin: 5px 6px; padding: 5px 0 3px; border-radius: 9px; }
.cyc .glyph b { font-size: 22px; }
.cyc[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary) inset; }
.cyc.now::before { content: "지금"; display: block; font-size: 11px; font-weight: 800; color: var(--primary-ink); background: var(--primary); border-radius: 999px; margin: 0 14px 4px; }
.detail { margin-top: 6px; }
.detail h3 { font-size: 17px; margin-bottom: 8px; }
.detail p + p { margin-top: 8px; }
.rel { padding: 10px 12px; border-radius: 10px; font-size: 14.5px; margin-top: 8px; background: var(--good-soft); }
.rel.warn { background: var(--warn-soft); }
.rel.info { background: var(--info-soft); }
.sub-h { font-size: 15px; font-weight: 800; margin: 18px 0 8px; }

/* 확인 사항 */
.notice { background: var(--info-soft); border-radius: 14px; padding: 14px 16px; font-size: 14px; color: var(--ink); }
.notice > b { display: block; margin-bottom: 4px; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.notice li + li { margin-top: 4px; }

/* 궁합 */
.score-ring { display: grid; place-items: center; }
.score-ring svg { width: 150px; height: 150px; }
.score-ring text { font-weight: 800; }
.compat-top { text-align: center; padding: 22px 16px; }
.compat-top h2 { font-size: 20px; margin-top: 8px; }
.compat-top p { color: var(--ink-2); margin-top: 6px; font-size: 14.5px; }
.cp { padding: 14px 16px; border-radius: 14px; margin-top: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.cp.good { background: var(--good-soft); border-color: transparent; }
.cp.warn { background: var(--warn-soft); border-color: transparent; }
.cp h3 { font-size: 15.5px; margin-bottom: 4px; }
.cp p { font-size: 14.5px; color: var(--ink); }

.actions { display: grid; gap: 10px; margin-top: 18px; }
.canvas-wrap { margin-top: 14px; }
.canvas-wrap canvas { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); display: block; }

.foot { max-width: 640px; margin: 8px auto 0; padding: 20px var(--gutter) 40px; color: var(--ink-3); font-size: 12.5px; line-height: 1.65; display: grid; gap: 8px; }
.foot strong { color: var(--ink-2); margin-right: 4px; }
/* 태어난 곳 찾기(가나다·초성) */
.ca-sum { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 14.5px; line-height: 1.5; }
.ca-sum[hidden] { display: none; }
.ca-sum b { display: block; font-size: 15.5px; }
.ca-sum span { color: var(--ink-2); font-size: 13.5px; }
.combo { position: relative; scroll-margin-top: 72px; }
.combo::after { content: "▾"; position: absolute; right: 14px; top: 13px; color: var(--ink-3); pointer-events: none; }
.combo input[type="text"] { padding-right: 34px; }
.combo-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 15; margin: 0; padding: 4px; list-style: none; max-height: 248px; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.combo-list li { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: 8px; font-size: 16px; cursor: pointer; }
.combo-list li.on { background: var(--accent-soft); font-weight: 700; }
.combo-list li.cur::after { content: "✓"; margin-left: auto; color: var(--ink-2); }
.combo-list li.combo-empty { min-height: 0; padding: 10px 12px 6px; font-size: 13.5px; color: var(--ink-3); cursor: default; }
/* 사진 공유가 안 되는 브라우저용 이미지 시트 */
.sheet { position: fixed; inset: 0; z-index: 45; display: flex; align-items: flex-end; justify-content: center; background: rgba(10, 9, 20, .6); }
.sheet-body { width: 100%; max-width: 480px; max-height: 94vh; overflow-y: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.sheet-body h3 { font-size: 17px; margin-bottom: 8px; }
.sheet-img { display: block; width: auto; max-width: 100%; max-height: 46vh; margin: 0 auto 10px; border-radius: 12px; -webkit-touch-callout: default; user-select: auto; }
.sheet-hint { font-size: 13px; line-height: 1.5; color: var(--ink-3); margin-bottom: 12px; }
@media (min-width: 640px) { .sheet { align-items: center; } .sheet-body { border-radius: 20px; } }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 50; box-shadow: var(--shadow); max-width: 90vw; }

/* 앱으로 설치하기 */
.install { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin-top: 16px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--accent-soft); }
.install-tx { flex: 1 1 160px; min-width: 0; }
.install-tx b { display: block; font-size: 15px; }
.install-tx span { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.install-hint { flex: 1 1 100%; margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }

/* 태어난 시각 입력 */
.timebox { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 8px; }
.timebox .seg { grid-column: 1 / -1; }
.timebox input[type="text"] { text-align: center; }
.tsep { font-weight: 700; color: var(--ink-2); padding-right: 4px; }
.timebox input:disabled, .seg input:disabled + label { opacity: .45; cursor: not-allowed; }

/* 의견 보내기 */
textarea { resize: vertical; line-height: 1.55; min-height: 120px; font-family: inherit; }
button, input, select, textarea { font: inherit; }
.seg.two { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
.fb-pre { margin: 0; white-space: pre-wrap; word-break: break-all; font-family: inherit; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); max-height: 240px; overflow: auto; }
.fb-card { margin-top: 18px; text-align: center; }
.fb-card p { margin: 4px 0 12px; font-size: 14px; color: var(--ink-2); }
.home-fb { display: block; width: 100%; margin-top: 6px; padding: 10px; border: 0; background: none; color: var(--ink-2); font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }

/* 궁금한 점 물어보기 */
.qa-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.qa-cat { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 2px; min-height: 40px; font-size: 13px; white-space: nowrap; text-align: center; font-weight: 700; color: var(--ink-2); }
.qa-cat[aria-selected="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.qa-list { display: grid; gap: 8px; margin-top: 12px; }
.qa-q { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-align: left; font-size: 15px; font-weight: 600; }
.qa-q i { font-style: normal; font-size: 22px; line-height: 1; color: var(--ink-3); }
.qa-q[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.qa-ans { margin-top: 14px; scroll-margin-top: 112px; }
.ans-q { font-size: 13px; font-weight: 800; color: var(--accent); margin-bottom: 8px; }
.ans h3 { font-size: 18px; line-height: 1.4; letter-spacing: -0.02em; }
.ans .lead { margin-top: 6px; font-weight: 600; }
.ans .pts { margin: 10px 0; padding-left: 18px; display: grid; gap: 8px; font-size: 15px; }
.ans .tip { margin-top: 12px; }
.ypills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; margin-bottom: 4px; }
.ypills::-webkit-scrollbar { display: none; }
.yp { flex: 0 0 auto; display: grid; place-items: center; min-width: 56px; min-height: 46px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; font-weight: 700; line-height: 1.2; }
.yp small { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.yp[aria-pressed="true"] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.yp[aria-pressed="true"] small { color: inherit; opacity: .8; }
.yrows { display: grid; gap: 10px; margin: 10px 0; }
.yrow { display: flex; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.yr { flex: 0 0 66px; text-align: center; }
.yr b { display: block; font-size: 18px; letter-spacing: -0.02em; }
.yr span { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.yb { min-width: 0; }
.yb p { margin: 4px 0 0; font-size: 14.5px; }
.ans-foot { display: grid; gap: 10px; justify-items: start; margin-top: 14px; }
.linkbtn.qa-back { padding: 2px 0 8px; font-weight: 700; }

/* 첫 화면 */
.home-hero { border-radius: 24px; padding: 14px 18px 24px; color: #fff; text-align: center; box-shadow: var(--shadow);
  background: radial-gradient(120% 80% at 80% 0%, #6a4a86 0%, rgba(106, 74, 134, 0) 60%), linear-gradient(165deg, #2b2a4c 0%, #3b3470 100%); }
.home-logo { padding-top: 8px; text-align: center; }
.home-slogan { margin-top: 8px; color: rgba(255, 255, 255, .85); font-size: 14px; font-weight: 600; }
.home-slogan b { color: #7fe3cf; font-weight: 800; }
.home-art { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto; }
.home-kicker { margin-top: 6px; color: #f5d58a; font-weight: 700; font-size: 13.5px; letter-spacing: .02em; }
.home-hero h1 { margin-top: 6px; font-size: 27px; line-height: 1.32; letter-spacing: -0.035em; }
.home-sub { margin: 10px auto 0; max-width: 28em; color: rgba(255, 255, 255, .8); font-size: 14.5px; line-height: 1.6; }
.home-q { margin: 22px 2px 10px; font-size: 17px; letter-spacing: -0.02em; }
.choices { display: grid; gap: 12px; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 96px; padding: 16px; border: 0; border-radius: 20px; color: #fff; text-align: left; box-shadow: var(--shadow); transition: transform .12s ease; }
.choice:active { transform: scale(.98); }
.choice:focus-visible, .back:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice.self { background: linear-gradient(135deg, #2b2a4c 0%, #4d4390 100%); }
.choice.compat { background: linear-gradient(135deg, #7a2f55 0%, #c2577f 100%); }
.choice .ic { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 16px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; }
.choice .tx { flex: 1; min-width: 0; }
.choice b { display: block; font-size: 20px; letter-spacing: -0.02em; line-height: 1.3; }
.choice .d { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.5; opacity: .88; }
.choice .go { font-size: 28px; line-height: 1; opacity: .85; }
.perks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.perks li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 2px 9px; text-align: center; }
.perks i { display: block; font-style: normal; font-family: "Noto Serif KR", "Batang", "SimSun", serif; font-size: 22px; line-height: 1.25; color: var(--accent); font-weight: 700; }
.perks span { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.home-note a { color: inherit; text-decoration: underline; }
.home-note { margin-top: 14px; text-align: center; color: var(--ink-3); font-size: 12.5px; }
.back { border: 0; background: none; padding: 2px 2px 6px; min-height: 36px; font-size: 14px; font-weight: 600; color: var(--ink-2); }

@media (min-width: 560px) {
  .choices { grid-template-columns: 1fr 1fr; }
  .choice { flex-wrap: wrap; align-content: flex-start; min-height: 150px; }
  .choice .go { display: none; }
  .home-hero h1 { font-size: 31px; }
  .hero h1 { font-size: 28px; }
  .glyph b { font-size: 40px; }
  .cyc { flex-basis: 84px; }
}
@media (prefers-reduced-motion: no-preference) {
  .view { animation: fade .25s ease; }
  @keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .fl { animation: floaty 4.5s ease-in-out infinite; }
  .tw { animation: twinkle 3.2s ease-in-out infinite; }
  @keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
  @keyframes twinkle { 0%, 100% { opacity: .95; } 50% { opacity: .25; } }
}
@media print {
  .top, .subnav, .actions, .foot, .tabs { display: none !important; }
  details.read:not([open]) .read-body { display: block; }
}
