/* 오방운세. 썸네일처럼 강한 표지: 검은 바탕, 오행색 빛살, 노란 강조. 풀이 본문만 차분하게 읽히도록 둔다. */
:root {
  --bg: #0b0b14;
  --bg-2: #14141f;
  --paper: #191926;
  --ink: #f6f2e8;
  --muted: #b5b3c4;
  --line: #34344a;
  --accent: #ffe11a;
  --accent-ink: #111111;
  --gold: #ffe11a;
  --night: #0b0b14;
  --cream: #fbf1d8;
  --wood: #2c7d5f; --wood-ink: #ffffff;
  --fire: #c93d2b; --fire-ink: #ffffff;
  --earth: #e0ab2a; --earth-ink: #1d1a0d;
  --metal: #ebe8dc; --metal-ink: #1d1f24;
  --water: #36467d; --water-ink: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --display: "Noto Serif KR", "Nanum Myeongjo", "Batang", serif;
  --punch: "Black Han Sans", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.75 var(--body); word-break: keep-all; overflow-wrap: anywhere; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); line-height: 1.3; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(32px, 5.2vw, 56px); font-weight: 900; letter-spacing: -0.02em; }
h2 { font-size: clamp(23px, 3vw, 30px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.prose { max-width: 66ch; }
.wrap.prose { max-width: 1080px; }
.wrap.prose > * { max-width: 66ch; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 12px; z-index: 30; }
.skip:focus { left: 8px; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .04em; color: var(--gold); margin-bottom: 8px; }
.eyebrow.dark { color: var(--accent); }

/* 머리글 */
.top { background: var(--night); color: var(--cream); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 20px; padding-top: 12px; padding-bottom: 12px; }
.logo { font: 800 21px/1 var(--display); color: var(--cream); text-decoration: none; display: inline-flex; align-items: center; gap: 9px; }
.logo i { display: grid; grid-template-columns: repeat(2, 9px); gap: 1px; transform: rotate(45deg); }
.logo i b { width: 9px; height: 9px; display: block; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.nav a { color: var(--cream); text-decoration: none; font-size: 15px; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-color: var(--gold); }

/* 조각보 띠 */
.jogak { display: grid; grid-template-columns: repeat(5, 1fr); height: 8px; }
.jogak i { display: block; }

/* 첫 화면 */
.hero { position: relative; overflow: hidden; color: var(--cream); background: var(--night); padding: 44px 0 56px; isolation: isolate; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
.hero h1 { color: #fff; text-shadow: 0 2px 18px rgba(13, 18, 51, .55); }
.hero .lead, .page-hero .lead { color: rgba(251, 241, 216, .92); }
.lead { font-size: 17px; margin-top: 14px; max-width: 50ch; }
.fan { position: relative; height: 330px; margin-top: 30px; max-width: 480px; }
.fan img { position: absolute; top: 0; left: 50%; width: 222px; margin-left: -111px; border-radius: 16px; box-shadow: 0 18px 40px rgba(5, 8, 30, .55); transform-origin: 50% 100%; transition: transform .3s ease; }
.fan img:nth-child(1) { transform: translateX(-112px) rotate(-11deg) scale(.92); }
.fan img:nth-child(3) { transform: translateX(112px) rotate(11deg) scale(.92); }
.fan img:nth-child(2) { z-index: 1; }
.hero-compact { padding: 38px 0 44px; }
.hero-compact h1 { font-size: clamp(30px, 4.6vw, 46px); }
.privacy.on-night { color: rgba(251, 241, 216, .9); }
.privacy.on-night .linkish { color: var(--gold); }
#gunghap-form .err { color: #ffc2b3; }

/* 카드, 입력 폼 */
.card { background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.form-card h2 { font-size: 22px; margin-bottom: 14px; }
form .row { display: grid; gap: 10px; margin-bottom: 14px; }
.row-3 { grid-template-columns: 1.3fr 1fr 1fr; }
.row-2 { grid-template-columns: 1fr 1fr; }
label, legend { font-size: 14px; font-weight: 600; display: block; margin-bottom: 4px; padding: 0; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
input[type="number"], select { width: 100%; height: 46px; padding: 0 12px; font: 400 16px var(--body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; padding: 3px; border-radius: 12px; background: var(--bg-2); }
.seg label { margin: 0; font-weight: 500; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 8px 2px; font-size: 15px; cursor: pointer; line-height: 1.4; border-radius: 9px; }
.seg input:checked + span { background: var(--ink); color: var(--paper); font-weight: 600; }
.seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 1px; }
.btn { display: inline-block; font: 700 17px var(--body); padding: 13px 24px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; cursor: pointer; text-decoration: none; text-align: center; transition: transform .15s ease, filter .15s ease; }
.btn.full { width: 100%; }
.btn.ghost { background: transparent; color: inherit; border: 1px solid currentColor; font-weight: 500; font-size: 15px; padding: 9px 16px; }
.btn.gold { background: var(--gold); color: #231a05; font-size: 15px; padding: 10px 18px; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.err { color: var(--fire); font-size: 14px; font-weight: 600; margin-bottom: 10px; }
details.opts { margin-bottom: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.opts summary { cursor: pointer; font-size: 14px; font-weight: 600; }
details.opts .inner { margin-top: 12px; }
.help { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.privacy { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.5; }

/* 조각보 사주표: 전통 표기대로 오른쪽이 연주, 왼쪽이 시주 */
.pillars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.pillar { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; min-width: 0; }
.pillar .cap, .pillar .god { text-align: center; font-size: 13px; line-height: 1.35; padding: 4px 2px; }
.pillar .cap { font-weight: 600; border-radius: 8px; background: var(--bg-2); }
.pillar .god { color: var(--muted); }
.pillar .god:empty { display: none; }
.patch { position: relative; width: 100%; aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; padding: 2px; border-radius: 12px; overflow: hidden; }
.patch b { font: 900 clamp(32px, 7vw, 58px)/1 var(--display); position: relative; }
.patch span { font-size: clamp(11px, 1.7vw, 13px); margin-top: 6px; opacity: .9; position: relative; }
.patch .pa { position: absolute; right: -7%; bottom: -7%; width: 46%; opacity: .95; }
.patch.unknown { background: var(--bg-2); color: var(--muted); }
.patch.unknown b { font-weight: 400; }
.el-0 { background: var(--wood); color: var(--wood-ink); }
.el-1 { background: var(--fire); color: var(--fire-ink); }
.el-2 { background: var(--earth); color: var(--earth-ink); }
.el-3 { background: var(--metal); color: var(--metal-ink); }
.el-4 { background: var(--water); color: var(--water-ink); }
.pillar.me .cap { background: var(--accent); color: var(--accent-ink); }
.pillars.small-chart .patch { aspect-ratio: 5 / 4; border-radius: 9px; }
.pillars.small-chart .patch b { font-size: clamp(24px, 4.6vw, 38px); }
.pillars.small-chart .patch span { font-size: 11px; margin-top: 3px; }
.pillars.small-chart .patch .pa { width: 36%; }
.pillars.result-chart { max-width: 640px; }
.chart-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; margin: 18px 0 8px; font-size: 14px; color: var(--muted); }
.chart-caption strong { color: var(--ink); font-weight: 600; }

/* 결과 첫 장면 */
.tone-0 { --ray-a: #12a06c; --ray-b: #07573b; }
.tone-1 { --ray-a: #ee2a2a; --ray-b: #8f0f14; }
.tone-2 { --ray-a: #f59e0b; --ray-b: #a85a00; }
.tone-3 { --ray-a: #8b78d8; --ray-b: #3f2f8c; }
.tone-4 { --ray-a: #1f62e8; --ray-b: #0b2a86; }
.result-hero, .page-hero { color: var(--cream); padding: 40px 0 44px; }
.page-hero h1 { color: #fff; }
.page-hero a:not(.btn), .result-hero a:not(.btn) { color: var(--gold); }
.result-in { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 36px; align-items: center; }
.my-card { width: 100%; max-width: 320px; margin: 0 auto; border-radius: 22px; box-shadow: 0 20px 50px rgba(5, 8, 30, .5); }
.result-hero h2 { font-size: clamp(30px, 5vw, 46px); font-weight: 900; color: #fff; }
.result-tag { font: 700 clamp(17px, 2.2vw, 21px)/1.45 var(--display); margin-top: 8px; color: var(--gold); }
.result-desc { margin-top: 12px; max-width: 54ch; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.share-msg { font-size: 13px; margin-top: 8px; min-height: 1.5em; }

/* 결과 안 이동 메뉴 */
.jump { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.jump .wrap { display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; scrollbar-width: none; }
.jump a { flex: none; color: var(--ink); text-decoration: none; font-size: 14px; padding: 5px 13px; border-radius: 999px; background: var(--bg-2); }
.jump a:hover { background: var(--ink); color: var(--paper); }

/* 결과 본문 */
.section { padding: 44px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.tinted { background: var(--bg-2); }
.section-head { margin-bottom: 16px; }
.notes { margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); display: grid; gap: 4px; }
.notice { border-left: 4px solid var(--earth); border-radius: 0 10px 10px 0; padding: 10px 14px; background: var(--paper); font-size: 15px; margin-top: 12px; }
.me-grid { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 26px; align-items: center; }
.me-grid img { border-radius: 16px; box-shadow: var(--shadow); }
.me-grid h3 { margin-bottom: 6px; font-size: 21px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 54px minmax(0, 1fr) 26px; gap: 10px; align-items: center; font-size: 15px; }
.bar .track { height: 14px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; display: block; min-width: 0; border-radius: 0 4px 4px 0; background: var(--accent); }
.bar .num { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.ohaeng { display: block; width: 100%; max-width: 400px; margin: 0 auto; }
.ohaeng text { fill: var(--ink); font-family: var(--body); }
.ohaeng .ring { fill: none; stroke: var(--line); stroke-width: 2; }
.ohaeng .node { stroke: var(--paper); stroke-width: 2; }
.ohaeng .empty { fill: none; stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 2; }
.ohaeng .n0 { fill: var(--wood); } .ohaeng .n1 { fill: var(--fire); } .ohaeng .n2 { fill: var(--earth); } .ohaeng .n3 { fill: var(--metal); stroke: var(--muted); } .ohaeng .n4 { fill: var(--water); }
.ohaeng .glyph { font: 900 22px var(--display); }
.ohaeng .t0, .ohaeng .t1, .ohaeng .t4 { fill: #fff; }
.ohaeng .t2, .ohaeng .t3 { fill: #1d1a0d; }
.ohaeng .lb { font-size: 15px; font-weight: 600; }
.chip { display: inline-block; font-size: 13px; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); margin-right: 4px; white-space: nowrap; }
.stack { display: grid; gap: 18px; }
.rel-list { display: grid; gap: 10px; max-width: 760px; }
.rel-list p { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.facets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.facet { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 14px; padding: 16px 18px; }
.facet:nth-child(2) { border-top-color: var(--wood); }
.facet:nth-child(3) { border-top-color: var(--earth); }
.facet h2, .facet h3 { font: 700 16px/1.4 var(--body); margin-bottom: 6px; }
.facet p { font-size: 15px; }
.tl-scroll { overflow-x: auto; padding-bottom: 4px; }
.tl { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(88px, 1fr); gap: 6px; min-width: 780px; }
.tl > div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; text-align: center; padding: 8px 2px; font-size: 13px; line-height: 1.4; }
.tl .han { display: flex; justify-content: center; gap: 2px; margin: 6px 0; }
.tl .han b { font: 800 22px/1 var(--display); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; }
.tl .now { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.tl .now .age { color: var(--accent); font-weight: 700; }
.flows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.flow { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px; align-content: start; }
.flow img { border-radius: 9px; }
.flow h3 { font: 600 14px/1.4 var(--body); color: var(--muted); }
.flow .gz { font: 800 21px/1.25 var(--display); margin: 2px 0 2px; }
.flow .an { font-size: 14px; font-weight: 600; }
.flow p { grid-column: 1 / -1; font-size: 15px; }

/* 오늘의 기운 */
.today { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: center; }
.today-art { border-radius: 18px; box-shadow: var(--shadow); }
.today-text { margin-top: 8px; }
.today .pillars { max-width: 520px; }
.today .patch { aspect-ratio: 5 / 4; }
.today .patch b { font-size: clamp(26px, 5vw, 38px); }

/* 카드 진열 */
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-bottom: 18px; }
.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 168px; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; }
.deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 14px; margin-top: 18px; }
.deck-card { display: block; color: var(--ink); text-decoration: none; scroll-snap-align: start; min-width: 0; }
.deck-card img { border-radius: 14px; box-shadow: 0 6px 16px rgba(27, 29, 51, .16); transition: transform .2s ease, box-shadow .2s ease; }
.deck-card:hover img { transform: translateY(-5px) rotate(-1.2deg); box-shadow: 0 14px 28px rgba(27, 29, 51, .26); }
.deck-card strong { display: block; font-size: 15px; margin-top: 8px; line-height: 1.4; }
.deck-card small { display: block; font-size: 13px; line-height: 1.4; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter { font: 500 14px var(--body); color: var(--ink); background: var(--bg-2); border: 0; border-radius: 999px; padding: 7px 15px; cursor: pointer; }
.filter.on { background: var(--ink); color: var(--paper); font-weight: 600; }

/* 궁합 안내 띠 */
.band { background: linear-gradient(120deg, #2a1544, #8a2c4a); color: var(--cream); padding: 44px 0; }
.band h2 { color: #fff; margin-bottom: 8px; }
.band .btn { margin-top: 16px; }
.band-in { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 36px; align-items: center; }
.band-pair { position: relative; height: 240px; }
.band-pair img { position: absolute; width: 150px; top: 8px; border-radius: 12px; box-shadow: 0 12px 28px rgba(5, 8, 30, .5); }
.band-pair img:nth-child(1) { left: 12px; transform: rotate(-8deg); }
.band-pair img:nth-child(2) { left: 128px; transform: rotate(8deg); }

/* 궁합 */
.people { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 24px; }
.people h2 { margin-bottom: 14px; font-size: 20px; }
.match { display: grid; grid-template-columns: minmax(0, 220px) 200px minmax(0, 220px); justify-content: center; align-items: center; gap: 20px; }
.match figure { margin: 0; text-align: center; }
.match figure img { border-radius: 16px; box-shadow: 0 16px 36px rgba(5, 8, 30, .45); }
.match figcaption { margin-top: 8px; font-weight: 600; }
.gauge { position: relative; width: 200px; margin: 0 auto; }
.gauge svg { display: block; width: 100%; transform: rotate(-90deg); }
.gauge .bgc { fill: none; stroke: rgba(251, 241, 216, .22); stroke-width: 14; }
.gauge .val { fill: none; stroke: var(--gold); stroke-width: 14; stroke-linecap: round; }
.gauge .num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font: 900 58px/1 var(--display); color: #fff; font-variant-numeric: tabular-nums; }
.gauge .num small { display: block; font: 500 13px var(--body); margin-top: 4px; color: var(--cream); }
.match-label { text-align: center; font: 800 clamp(21px, 3vw, 28px)/1.35 var(--display); margin-top: 22px; color: #fff; }
.match-sub { text-align: center; font-size: 14px; margin-top: 4px; }
table.break { border-collapse: collapse; width: 100%; font-size: 15px; }
table.break td { border-bottom: 1px solid var(--line); padding: 8px 0; }
table.break tr:last-child td { border-bottom: 0; }
table.break td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* 60일주 상세 */
.ilju-head { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; align-items: center; }
.ilju-art { border-radius: 20px; box-shadow: 0 20px 48px rgba(5, 8, 30, .5); }
.ilju-head .btn { margin-top: 20px; }
.crumb { font-size: 14px; margin-bottom: 14px; }
.intro p + p { margin-top: 10px; }
dl.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 22px 0 0; }
dl.facts div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
dl.facts dt { font-size: 13px; color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.pager a { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 600; }
.pager img { border-radius: 7px; }
.pager small { display: block; font-weight: 400; color: var(--muted); }
.cta { margin-top: 28px; padding: 20px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }

/* 바닥글 */
.disclaimer { padding: 26px 0 44px; font-size: 13px; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 8px; }

@media (max-width: 820px) {
  .hero { padding: 28px 0 36px; }
  .hero-grid, .two, .people, .result-in, .band-in { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 22px; }
  .fan { height: 214px; margin: 20px auto 0; max-width: 340px; }
  .fan img { width: 142px; margin-left: -71px; border-radius: 11px; }
  .fan img:nth-child(1) { transform: translateX(-76px) rotate(-11deg) scale(.92); }
  .fan img:nth-child(3) { transform: translateX(76px) rotate(11deg) scale(.92); }
  .facets, .flows { grid-template-columns: minmax(0, 1fr); }
  .result-hero { text-align: center; }
  .result-desc { margin-left: auto; margin-right: auto; }
  .actions { justify-content: center; }
  .my-card { max-width: 250px; }
  .me-grid { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: start; }
  .me-grid h3 { font-size: 18px; }
  .today { grid-template-columns: 110px minmax(0, 1fr); gap: 16px; align-items: start; }
  .today > div { display: contents; }
  .today .eyebrow, .today h2, .today-text { grid-column: 2; }
  .today-art { grid-row: 1 / span 3; }
  .today .chart-caption, .today #now-chart, .today .help { grid-column: 1 / -1; }
  .today .chart-caption { margin-top: 4px; margin-bottom: -8px; }
  .today .eyebrow { margin-bottom: -10px; }
  .today h2 { font-size: 21px; margin-bottom: -10px; }
  .today-text { margin-top: 0; font-size: 15px; }
  .band-pair { width: 280px; margin: 0 auto; }
  .ilju-head { grid-template-columns: 124px minmax(0, 1fr); gap: 18px; align-items: start; }
  .ilju-head h1 { font-size: 30px; }
  .ilju-head .lead { font-size: 15px; margin-top: 6px; }
  .ilju-head .btn { font-size: 15px; padding: 9px 16px; margin-top: 12px; }
  .match { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .match .gauge-cell { grid-column: 1 / -1; grid-row: 1; }
  .gauge { width: 170px; }
  .gauge .num { font-size: 50px; }
  .match figure img { max-width: 150px; margin: 0 auto; }
}
@media (prefers-reduced-motion: no-preference) {
  .reveal .patch { animation: stitch .42s ease-out backwards; }
  .reveal .pillar:nth-child(1) .patch { animation-delay: .18s; }
  .reveal .pillar:nth-child(2) .patch { animation-delay: .12s; }
  .reveal .pillar:nth-child(3) .patch { animation-delay: .06s; }
  @keyframes stitch { from { opacity: .25; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .flip-in { animation: flip .8s cubic-bezier(.2, .8, .25, 1.1) backwards; }
  @keyframes flip { from { opacity: 0; transform: perspective(900px) rotateY(100deg) scale(.86); } to { opacity: 1; transform: none; } }
  .gauge .val { transition: stroke-dashoffset 1.1s cubic-bezier(.2, .8, .25, 1); }
  .fan img { animation: rise .7s ease-out backwards; }
  .fan img:nth-child(2) { animation-delay: .1s; }
  .fan img:nth-child(3) { animation-delay: .2s; }
  @keyframes rise { from { opacity: 0; translate: 0 26px; } }
  .fan:hover img:nth-child(1) { transform: translateX(-132px) rotate(-14deg) scale(.92); }
  .fan:hover img:nth-child(3) { transform: translateX(132px) rotate(14deg) scale(.92); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 820px) and (prefers-reduced-motion: no-preference) {
  .fan:hover img:nth-child(1) { transform: translateX(-76px) rotate(-11deg) scale(.92); }
  .fan:hover img:nth-child(3) { transform: translateX(76px) rotate(11deg) scale(.92); }
}

/* 강한 표지: 빛살 배경, 굵은 제목, 노란 강조 */
.hero, .page-hero, .result-hero, .band {
  --ray-a: #ee2a2a; --ray-b: #8f0f14;
  background: linear-gradient(90deg, rgba(6, 6, 16, .9), rgba(6, 6, 16, .6)), repeating-conic-gradient(from 0deg at 72% 45%, var(--ray-a) 0 9deg, var(--ray-b) 9deg 18deg);
}
.page-hero.tone-0, .result-hero.tone-0 { --ray-a: #12a06c; --ray-b: #07573b; }
.page-hero.tone-1, .result-hero.tone-1 { --ray-a: #ee2a2a; --ray-b: #8f0f14; }
.page-hero.tone-2, .result-hero.tone-2 { --ray-a: #f59e0b; --ray-b: #a85a00; }
.page-hero.tone-3, .result-hero.tone-3 { --ray-a: #8b78d8; --ray-b: #3f2f8c; }
.page-hero.tone-4, .result-hero.tone-4 { --ray-a: #1f62e8; --ray-b: #0b2a86; }
h1, h2, h3, .logo, .match-label, .gauge .num { font-family: var(--punch); font-weight: 400; letter-spacing: -.005em; }
h1 em, h2 em, .punch em { font-style: normal; color: #ffe11a; }
.hero h1, .page-hero h1, .result-hero h2, .band h2 { text-shadow: 0 3px 0 #000, 0 0 18px rgba(0, 0, 0, .6); }
.result-hero h2 { font-size: clamp(40px, 6vw, 62px); line-height: 1.18; }
.punch { font: 400 clamp(34px, 5.4vw, 60px)/1.18 var(--punch); color: #fff; margin: 10px 0 8px; text-shadow: 0 3px 0 #000; }
.eyebrow, .eyebrow.dark { display: inline-block; font: 400 15px/1.3 var(--punch); letter-spacing: .01em; background: #ffe11a; color: #111; padding: 6px 12px; border-radius: 6px; transform: rotate(-1.2deg); }
.btn { font-family: var(--punch); font-weight: 400; font-size: 19px; background: #ffe11a; color: #111; border: 3px solid #000; border-radius: 12px; box-shadow: 4px 4px 0 #000; }
.btn:hover { box-shadow: 6px 6px 0 #000; transform: translate(-2px, -2px); }
.btn.ghost { font-family: var(--body); box-shadow: none; border-width: 1px; border-radius: 999px; }
.btn.gold { font-size: 17px; background: #ffe11a; }
.deck-card img { box-shadow: 0 6px 16px rgba(0, 0, 0, .55); }
.deck-card:hover img { transform: translateY(-6px) rotate(-2deg) scale(1.03); box-shadow: 0 0 0 3px #ffe11a, 0 14px 28px rgba(0, 0, 0, .6); }
.deck-card strong { font: 400 18px/1.3 var(--punch); }
@media (max-width: 820px) {
  .hero, .page-hero, .result-hero, .band {
    background: linear-gradient(rgba(6, 6, 16, .78), rgba(6, 6, 16, .78)), repeating-conic-gradient(from 0deg at 50% 30%, var(--ray-a) 0 9deg, var(--ray-b) 9deg 18deg);
  }
}
/* 휴대폰: 누르기 쉬운 크기, 작은 글자 키우기 */
@media (max-width: 600px) {
  .nav a { padding: 12px 2px; }
  .patch span, .pillars.small-chart .patch span { font-size: 12px; }
  .facet h2, .facet h3 { font-size: 18px; }
  input[type=radio], input[type=checkbox] { width: 18px; height: 18px; }
}

/* 운세 페이지 (오늘의 운세, 띠별, 신년운세) ------------------------------ */
.narrow { max-width: 820px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 12px 0 4px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: #ffe11a; }
.fout { margin-top: 8px; }
.fhead { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 18px; align-items: center; }
.fhead img { border-radius: 14px; box-shadow: var(--shadow); }
.fhook { font-family: var(--punch); font-weight: 400; font-size: clamp(26px, 5vw, 38px); line-height: 1.2; color: #fff; margin: 4px 0 8px; }
.fsub { color: var(--muted); font-size: 14px; }
.fbars { display: grid; gap: 10px; margin: 22px 0 6px; }
.fbar { display: grid; grid-template-columns: 64px minmax(0, 1fr) 36px; gap: 10px; align-items: center; font-size: 14px; }
.fbar i { height: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.fbar b { display: block; height: 100%; background: linear-gradient(90deg, #ff7a1a, #ffe11a); border-radius: 99px; }
.fbar strong { text-align: right; font-family: var(--punch); font-weight: 400; font-size: 18px; color: var(--gold); }
.lucky .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(255, 255, 255, .4); }
.tomorrow { margin-top: 18px; text-align: center; font-family: var(--punch); color: var(--gold); font-size: 18px; }
.tti-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.tti-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.tti-grid a:hover, .tti-grid a[aria-current] { border-color: var(--gold); }
.tti-grid img { width: 48px; height: 48px; }
.ilgan-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.el-chip { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font: 700 22px/1 var(--display); }
.el-chip.el-0 { background: var(--wood); color: var(--wood-ink); }
.el-chip.el-1 { background: var(--fire); color: var(--fire-ink); }
.el-chip.el-2 { background: var(--earth); color: var(--earth-ink); }
.el-chip.el-3 { background: var(--metal); color: var(--metal-ink); }
.el-chip.el-4 { background: var(--water); color: var(--water-ink); }
.tti-head { display: flex; gap: 16px; align-items: center; margin: 8px 0 16px; }
.tti-head img { width: 88px; height: 88px; }
.tti-today { margin: 6px 0 18px; color: var(--ink); }
.tti-today p { margin-top: 8px; }
.facets.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.note-box { margin: 18px 0; padding: 14px 16px; background: rgba(255, 225, 26, .08); border: 1px solid rgba(255, 225, 26, .4); border-radius: 12px; font-size: 15px; }
.home-today { background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 22px 0 24px; }
.home-today .btn { margin-top: 12px; }
@media (max-width: 640px) {
  .fhead { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; }
  .tti-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ilgan-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .ilgan-grid a { font-size: 12px; padding: 10px 2px; }
  .el-chip { width: 36px; height: 36px; font-size: 18px; }
  .facets.two-col { grid-template-columns: minmax(0, 1fr); }
}

/* 손 없는 날 이사 달력 ------------------------------------------------- */
.move-today { margin-top: 14px; padding: 12px 14px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 225, 26, .45); border-radius: 12px; color: var(--cream); font-size: 15px; }
.move-today:empty { display: none; }
.move-today b { color: #ffe11a; }
.move-opts { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.move-opts label { font-weight: 600; }
.move-opts select { width: auto; min-width: 140px; }
.move-cal { padding: 16px; }
.mhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mhead h2 { font-size: 22px; margin: 0; }
.mnav { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mw { text-align: center; font-size: 13px; color: var(--muted); padding: 4px 0; }
.mw.sun, .mc.sun b { color: #ff6b5e; }
.mw.sat, .mc.sat b { color: #7aa2ff; }
.mc { position: relative; min-height: 64px; padding: 5px 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.mc.empty { background: none; border: 0; }
.mc b { font-size: 16px; }
.mc small { font-size: 11px; color: var(--muted); }
.mc em { font-style: normal; font-size: 11px; font-weight: 700; color: #111; background: #ffe11a; border-radius: 6px; padding: 0 4px; margin-top: 2px; }
.mc.son { background: rgba(255, 225, 26, .14); border-color: rgba(255, 225, 26, .6); }
.mc.clash { box-shadow: inset 0 0 0 2px #ff5b4a; }
.mc i { font-style: normal; font-size: 10px; color: #ff8a7d; }
.mc.today { outline: 2px solid #fff; outline-offset: 1px; }
.mlist-title { margin: 20px 0 8px; font-size: 18px; }
.mlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.mlist li { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; font-size: 15px; }
.mlist li.wk { border-color: rgba(255, 225, 26, .6); }
.mlist li span { color: var(--muted); }
.mlist b { color: #ffe11a; }
.mlist b.bad { color: #ff8a7d; }
.month-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.month-links a { padding: 8px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 99px; color: var(--ink); text-decoration: none; font-size: 14px; }
.month-links a:hover { border-color: var(--gold); }
.table-wrap { overflow-x: auto; }
.son-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.son-table th, .son-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.son-table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.son-table tr.wk td { background: rgba(255, 225, 26, .1); }
.son-table tr.wk td:first-child { color: #ffe11a; font-weight: 700; }
.pager-text { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.pager-text a { color: var(--gold); }
@media (max-width: 640px) {
  .mc { min-height: 56px; padding: 4px 1px; }
  .mc b { font-size: 14px; }
  .mc small, .mc em { font-size: 10px; }
  .move-cal { padding: 10px; }
  .son-table { font-size: 13px; }
}
@media (max-width: 640px) { .nav { flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 100%; } .nav::-webkit-scrollbar { display: none; } .nav a { font-size: 14px; white-space: nowrap; flex: 0 0 auto; } }

/* ---- 타로 ---- */
.tmodes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tmodes a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 15px; background: var(--bg-2); }
.tmodes a[aria-current] { background: #ffe11a; color: #111; border-color: #000; font-weight: 700; }
.tarot-app { min-height: 260px; scroll-margin-top: 16px; }
.tfan-hint { text-align: center; font: 400 20px/1.4 var(--punch); color: #ffe11a; margin: 6px 0 14px; }
.tfan { display: flex; justify-content: center; padding: 22px 0 34px; overflow: hidden; }
.tback { --k: 0; flex: 0 0 auto; width: 60px; margin: 0 -13px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 9px;
  transform: rotate(calc(var(--k) * 5deg)) translateY(calc(var(--k) * var(--k) * 2px)); transition: transform .2s ease, opacity .3s ease; }
.tback img { display: block; width: 100%; height: auto; border-radius: 9px; box-shadow: 0 6px 14px rgba(0, 0, 0, .6); }
.tback:hover, .tback:focus-visible { transform: rotate(calc(var(--k) * 5deg)) translateY(-18px); z-index: 2; outline: none; }
.tback:focus-visible img { box-shadow: 0 0 0 3px #ffe11a; }
.tback.gone { opacity: 0; pointer-events: none; transform: translateY(-60px); }
@media (min-width: 700px) { .tback { width: 110px; margin: 0 -18px; } }
.tface { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 10px 26px rgba(0, 0, 0, .55); }
.tface.rev { transform: rotate(180deg); }
.tres { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 26px; align-items: start; }
.tres-body h2 { font-size: 28px; margin: 4px 0 6px; }
.tres-body h2 small, .t3 h3 small { font: 500 15px var(--body); color: var(--muted); }
.tres-body h3 { font-size: 17px; margin: 18px 0 4px; color: #ffe11a; }
.tpos { display: inline-block; font: 400 15px var(--punch); background: #ffe11a; color: #111; padding: 4px 10px; border-radius: 6px; }
.thook { font: 400 22px/1.4 var(--punch); color: #fff; margin: 6px 0 10px; }
.tkw { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.tkw b { font-size: 14px; color: var(--muted); margin-right: 4px; }
.tkw span { font-size: 14px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 225, 26, .14); border: 1px solid rgba(255, 225, 26, .5); color: #ffe11a; }
.tkw.rev span { background: rgba(181, 179, 196, .12); border-color: var(--line); color: var(--ink); }
.tadvice { padding: 12px 14px; border-left: 4px solid #ffe11a; background: var(--bg-2); border-radius: 0 10px 10px 0; }
.tdone { text-align: center; color: var(--muted); margin-bottom: 14px; }
.tagain { text-align: center; margin-top: 20px; }
.tq-in { display: block; max-width: 460px; margin: 0 auto 8px; }
.tq-in span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.tq-in input { width: 100%; font: 16px var(--body); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); }
.tq { color: var(--muted); font-size: 15px; }
.tyn { font: 400 64px/1 var(--punch); margin: 6px 0 4px; }
.tyn.yes { color: #ffe11a; } .tyn.no { color: #ff6b5a; } .tyn.maybe { color: #b9a8ff; }
.tyn-say { font-weight: 600; margin-bottom: 10px; }
.t3-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 96px)); justify-content: center; gap: 12px; margin-bottom: 8px; }
.t3-slot { aspect-ratio: 2 / 3; border: 2px dashed var(--line); border-radius: 10px; display: grid; place-items: center; position: relative; overflow: hidden; }
.t3-slot span { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font: 400 15px var(--punch); color: var(--muted); z-index: 1; }
.t3-slot.on { border: 2px solid #ffe11a; }
.t3-slot.on span { color: #111; background: #ffe11a; bottom: 0; padding: 2px 0; }
.t3-slot img { width: 100%; height: 100%; object-fit: cover; }
.t3-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.t3 { padding: 16px; }
.t3 .tface { margin: 10px 0; }
.t3 h3 { font-size: 19px; margin-bottom: 4px; }
.t3 p { font-size: 15px; }
.tflow { font-size: 17px; margin-bottom: 6px; }
.tflow b { color: #ffe11a; }
.flip-in { animation: tflip .6s ease both; }
.flip-in.rev { animation-name: tflip-rev; }
@keyframes tflip { from { transform: perspective(800px) rotateY(90deg); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes tflip-rev { from { transform: perspective(800px) rotateY(90deg) rotate(180deg); opacity: .2; } to { transform: rotate(180deg); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .flip-in { animation: none; } .tback { transition: none; } }
.tdeck { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; }
.tdeck-card { color: var(--ink); text-decoration: none; min-width: 0; }
.tdeck-card img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 6px 14px rgba(0, 0, 0, .5); transition: transform .2s ease; }
.tdeck-card:hover img { transform: translateY(-4px); }
.tdeck-card[aria-current] img { outline: 3px solid #ffe11a; }
.tdeck-card strong { display: block; font-size: 15px; margin-top: 6px; }
.tdeck-card small { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; }
.tcard-hero { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 28px; align-items: center; }
.tcard-hero-art img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .6); }
@media (max-width: 640px) {
  .tres { grid-template-columns: 1fr; }
  .tres-art { max-width: 220px; margin: 0 auto; }
  .t3-grid { grid-template-columns: 1fr; }
  .t3 { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 0 14px; }
  .t3 .tpos { grid-column: 1 / -1; justify-self: start; margin-bottom: 8px; }
  .t3 .tface { grid-row: span 4; margin: 0; }
  .tcard-hero { grid-template-columns: 1fr; }
  .tcard-hero-art { max-width: 200px; }
  .tdeck { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .tyn { font-size: 54px; }
}
