/* 한눈사주 2판 — 쪽빛 머리띠(60갑자 무늬) + 백자 바탕 + 명식판 · 오방색은 오행에만 · 주홍 도장 하나
   층: 머리띠(전체 폭) → 입력 카드가 띠에 걸침 → 명식판 → 01~11 풀이 장 → 광고 칸(표시 분명) */
:root {
  --bg: #f3f4f7;
  --paper: #ffffff;
  --ink: #14171f;
  --ink-2: #5a6172;
  --ink-3: #8a90a0;
  --line: #e2e5ec;
  --band: #1e2a66;
  --band-ink: #ffffff;
  --band-2: rgba(255, 255, 255, .72);
  --accent: #2f4196;
  --accent-ink: #ffffff;
  --accent-soft: #e9ecf8;
  --seal: #c2412d;
  --warn: #8a5300; --warn-bg: #fcf1dd;
  --wood: #2f7d4f; --wood-bg: #e4f2e9;
  --fire: #c43d2c; --fire-bg: #fbe6e2;
  --earth: #a3720b; --earth-bg: #f7efd8;
  --metal: #5f6875; --metal-bg: #eceef2;
  --water: #24335c; --water-bg: #e2e7f3;
  --font-display: "Noto Serif KR", "Nanum Myeongjo", "Batang", serif;
  --font-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --r: 18px;
  --shadow: 0 1px 2px rgba(20, 23, 31, .04), 0 8px 24px rgba(20, 23, 31, .06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1117; --paper: #181b24; --ink: #eceef4; --ink-2: #a5acbb; --ink-3: #7c8496; --line: #2a2e3a;
    --band: #121a45; --band-ink: #ffffff; --band-2: rgba(255,255,255,.7);
    --accent: #a9b8f2; --accent-ink: #10142a; --accent-soft: #222a48; --seal: #e3584c;
    --warn: #f0c070; --warn-bg: #3a2e17;
    --wood: #72d29d; --wood-bg: #1b3126; --fire: #ff8b79; --fire-bg: #39201c;
    --earth: #e8bd57; --earth-bg: #362d17; --metal: #d2d7df; --metal-bg: #292d36;
    --water: #97aeee; --water-bg: #1d253f; --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1117; --paper: #181b24; --ink: #eceef4; --ink-2: #a5acbb; --ink-3: #7c8496; --line: #2a2e3a;
  --band: #121a45; --band-ink: #ffffff; --band-2: rgba(255,255,255,.7);
  --accent: #a9b8f2; --accent-ink: #10142a; --accent-soft: #222a48; --seal: #e3584c;
  --warn: #f0c070; --warn-bg: #3a2e17;
  --wood: #72d29d; --wood-bg: #1b3126; --fire: #ff8b79; --fire-bg: #39201c;
  --earth: #e8bd57; --earth-bg: #362d17; --metal: #d2d7df; --metal-bg: #292d36;
  --water: #97aeee; --water-bg: #1d253f; --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.wrap {
  max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main.wrap { padding-block: 0 56px; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.35; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--accent); }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ── 머리띠 ── */
.band { position: relative; overflow: hidden; background: var(--band); color: var(--band-ink); }
.band .pattern {
  position: absolute; inset: -20px -40px auto -40px; pointer-events: none; user-select: none;
  font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.55; letter-spacing: .35em;
  color: #fff; opacity: .07; transform: rotate(-6deg); word-break: break-all;
}
.band .wrap { position: relative; padding-block: 14px 64px; gap: 14px; }
.topbar { display: flex; align-items: center; gap: 10px; }
.home { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.seal {
  width: 36px; height: 36px; border-radius: 7px; background: var(--seal); color: #fff; flex: none;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 13px; line-height: 1.05; text-align: center;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.brand { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: .02em; }
.topbar small { margin-left: auto; color: var(--band-2); font-size: 13px; }
.nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  flex: none; text-decoration: none; color: var(--band-ink); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px; padding: 7px 14px; font-size: 15px; font-weight: 500; white-space: nowrap;
}
.nav a[aria-current="page"] { background: #fff; color: var(--band); border-color: #fff; }
/* 입력 카드 맨 위 메뉴 탭 */
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--bg); padding: 4px; border-radius: 14px; margin-bottom: 4px; }
.tabs a { text-align: center; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 14px; letter-spacing: -.02em; white-space: nowrap; padding: 11px 2px; border-radius: 10px; line-height: 1.3; }
.tabs a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 6px rgba(47, 65, 150, .25); }
.hero-title { font-size: 30px; font-weight: 700; margin-top: 10px; }
.hero-title em { font-style: normal; color: #ffd9a8; }
.hero-sub { color: var(--band-2); font-size: 16px; }
/* 11-03 오픈 기념 무료 띠 — 머리띠 안 · 빨간 도장색으로 눈에 띄게 */
.open-free { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 2px 0 0; background: var(--seal); color: #fff; border-radius: 12px; padding: 9px 12px; font-weight: 700; font-size: 15px; text-align: center; }
.open-free em { font-style: normal; border: 1.5px solid currentColor; border-radius: 6px; padding: 0 6px; font-size: 13px; }

/* ── 카드 ── */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; box-shadow: var(--shadow); }
.card h2 { font-size: 22px; }
.sub { color: var(--ink-2); font-size: 15px; }
.note { color: var(--ink-3); font-size: 13px; }
.lift { margin-top: -48px; position: relative; z-index: 1; }

/* ── 입력 ── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > .lab { font-weight: 600; font-size: 15px; color: var(--ink-2); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--bg); padding: 4px; border-radius: 14px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { border-radius: 10px; padding: 10px 8px; text-align: center; font-weight: 600; cursor: pointer; min-height: 46px; display: grid; place-items: center; color: var(--ink-2); }
.seg input:checked + label { background: var(--paper); color: var(--accent); box-shadow: 0 1px 3px rgba(20,23,31,.12); }
.seg input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: 2px; }
.row3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.row2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }
select {
  width: 100%; min-width: 0; min-height: 52px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
  padding: 0 12px; font-size: 17px; appearance: auto;
}
select:disabled { opacity: .45; }
.leap { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-2); }
.leap input { width: 20px; height: 20px; accent-color: var(--accent); }
.go {
  min-height: 58px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink);
  font-size: 18px; font-weight: 600; cursor: pointer; text-decoration: none; display: grid; place-items: center; letter-spacing: .01em;
}
.go:active { transform: translateY(1px); }
.go.ghost { background: var(--accent-soft); color: var(--accent); min-height: 52px; font-size: 16px; }
.trust { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--ink-3); font-size: 13px; }
.trust span::before { content: "✓ "; color: var(--wood); font-weight: 700; }
.msg { color: var(--fire); font-size: 15px; font-weight: 500; }
.go small { display: block; font-size: 12.5px; font-weight: 500; opacity: .85; margin-top: 1px; }
.go { line-height: 1.3; }
/* 11-03 풀이권 — 표 그림 + 남은 장수 · 다 쓰면 친구 부르기 · «?» 설명 창 · 친구 덕분 알림 */
.tk { display: flex; flex-direction: column; gap: 10px; }
.tk-ic { width: 28px; height: 28px; flex: none; }
.tk-pass { display: flex; align-items: center; gap: 10px; background: var(--earth-bg); color: var(--ink); border-radius: 14px; padding: 10px 12px; }
.tk-pass .tk-ic { color: var(--earth); }
.tk-pass .lab { font-size: 15px; color: var(--ink-2); font-weight: 500; }
.tk-pass .tk-n { margin-left: auto; font-size: 22px; font-weight: 700; color: var(--earth); font-variant-numeric: tabular-nums; }
.tk-pass.zero .tk-n, .tk-pass.zero .tk-ic { color: var(--ink-3); }
.tk-pass .tag { font-size: 11.5px; font-weight: 600; color: var(--wood); background: var(--wood-bg); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.tk-pass .q { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--earth); background: transparent; color: var(--earth); font-weight: 700; font-size: 14px; cursor: pointer; }
.tk-free { margin: 0; text-align: center; font-size: 14px; font-weight: 600; color: var(--wood); }
.tk-invite { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; }
.tk-invite h4 { margin: 0; font-size: 18px; }
.tk-invite p { margin: 0; font-size: 15px; }
.tk-invite p b { color: var(--accent); }
.tk-invite .eq { display: flex; align-items: center; justify-content: center; gap: 8px; }
.tk-invite .pp { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed var(--ink-3); color: var(--ink-3); }
.tk-invite .pp svg { width: 24px; height: 24px; }
.tk-invite .pp.on { border: 2px solid var(--wood); background: var(--wood-bg); color: var(--wood); }
.tk-invite .is { font-size: 22px; font-weight: 700; color: var(--ink-2); }
.tk-invite .gift { display: flex; align-items: center; gap: 4px; color: var(--earth); font-weight: 700; font-size: 17px; background: var(--earth-bg); border-radius: 12px; padding: 6px 10px; }
.tk-invite .gift .tk-ic { width: 22px; height: 22px; }
.tk-invite .prog { font-weight: 600; color: var(--wood); }
.tk-msg { font-size: 14px; color: var(--wood); word-break: break-all; }
.tk-toast { display: flex; align-items: center; gap: 10px; background: var(--wood-bg); color: var(--ink); border: 1.5px solid var(--wood); border-radius: 14px; padding: 10px 12px; font-size: 15px; position: relative; z-index: 2; margin-top: -48px; }
.tk-toast + .lift, .tk-toast + .col-in > .lift { margin-top: 0; }   /* 알림이 머리띠 쪽으로 올라가고 입력 칸은 그 아래로 */
/* 11-03 광고 막기 — 같은 기기에서 광고를 3번 누르면 그날 밤 12시까지 광고 칸을 숨김(build.py AD_GUARD) */
.no-ads .ad, .no-ads .adsbygoogle { display: none !important; }
.tk-toast .tk-ic { color: var(--earth); }
.tk-toast b { color: var(--wood); }
.tk-sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.tk-dim { position: absolute; inset: 0; background: rgba(20, 23, 31, .45); }
.tk-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: 560px; margin: 0 auto; background: var(--paper); color: var(--ink); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; gap: 14px;
  padding: 20px max(18px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); }
.tk-sheet h4 { margin: 0; font-family: var(--font-display); font-size: 20px; }
.tk-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tk-rules li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.tk-rules .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--earth-bg); color: var(--earth); font-weight: 700; font-size: 13px; }
.tk-rules .ic svg { width: 22px; height: 22px; }
.tk-rules .ic.g { background: var(--wood-bg); color: var(--wood); }
.tk-rules b { display: block; font-size: 16px; }
.tk-rules span { font-size: 14px; color: var(--ink-2); }
.ts-box:empty { display: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; cursor: pointer; align-self: flex-start; }

/* ── 명식판 ── */
.who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.who h2 { font-size: 17px; font-family: var(--font-body); font-weight: 600; color: var(--ink-2); }
.badge { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.warn { background: var(--warn-bg); color: var(--warn); border-radius: 12px; padding: 10px 12px; font-size: 15px; font-weight: 500; }
.board { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.col { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line); }
.col:first-child { border-left: 0; }
.col-lab { text-align: center; font-size: 12px; color: var(--ink-3); padding: 8px 2px 6px; background: var(--bg); border-bottom: 1px solid var(--line); }
.col-lab b { display: block; font-family: var(--font-display); font-size: 15px; color: var(--ink-2); }
.tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px 12px; position: relative; }
.tile + .tile { border-top: 1px dashed var(--line); }
.tile .hj { font-family: var(--font-display); font-weight: 700; font-size: 36px; line-height: 1.1; }
.tile .ko { font-size: 12px; color: var(--ink-2); }
.tile .god { margin-top: 4px; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.tile.me { background: var(--accent-soft); }
.tile.me .god { background: var(--accent); color: var(--accent-ink); }
.tile.unknown .hj { color: var(--ink-3); }
.el-wood .hj { color: var(--wood); } .el-wood .god { background: var(--wood-bg); color: var(--wood); }
.el-fire .hj { color: var(--fire); } .el-fire .god { background: var(--fire-bg); color: var(--fire); }
.el-earth .hj { color: var(--earth); } .el-earth .god { background: var(--earth-bg); color: var(--earth); }
.el-metal .hj { color: var(--metal); } .el-metal .god { background: var(--metal-bg); color: var(--metal); }
.el-water .hj { color: var(--water); } .el-water .god { background: var(--water-bg); color: var(--water); }
.tile.me .god { background: var(--accent); color: var(--accent-ink); }
.mix { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--bg); }
.mix span { height: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.chip.wood { background: var(--wood-bg); color: var(--wood); } .chip.fire { background: var(--fire-bg); color: var(--fire); }
.chip.earth { background: var(--earth-bg); color: var(--earth); } .chip.metal { background: var(--metal-bg); color: var(--metal); }
.chip.water { background: var(--water-bg); color: var(--water); }
.chip.zero { opacity: .55; text-decoration: line-through; }

/* ── 차례 ── */
.toc { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.toc::-webkit-scrollbar { display: none; }
.toc a { flex: none; font-size: 14px; text-decoration: none; padding: 6px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); }

/* ── 풀이 장 ── */
.sec { scroll-margin-top: 12px; }
.sec-head { display: flex; align-items: baseline; gap: 12px; }
.num { flex: none; white-space: nowrap; font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1; color: var(--accent); opacity: .35; font-variant-numeric: tabular-nums; }
.sec-head .kicker { font-size: 13px; font-weight: 600; color: var(--accent); }
.lead { border: 1px solid var(--accent-soft); background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)); border-radius: 12px; padding: 12px 14px; font-size: 16px; }
.lead small { display: block; font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 2px; letter-spacing: .04em; }
.lead b { color: var(--accent); }
.body { display: flex; flex-direction: column; gap: 12px; }
.body p { color: var(--ink); }
.ai-out b { font-weight: 700; background: linear-gradient(transparent 58%, var(--accent-soft) 58%); padding: 0 1px; }
.ai-out h3 { font-size: 19px; margin-top: 10px; color: var(--accent); }
.timeline { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.timeline > div { flex: none; width: 104px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; background: var(--paper); }
.timeline > div.now { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.timeline .when { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.timeline .gz { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.timeline .what { font-size: 13px; font-weight: 600; color: var(--accent); }
.timeline .now-tag { font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 0 7px; align-self: flex-start; }
.flow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.flow > div { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.flow .when { font-size: 13px; color: var(--ink-3); }
.flow .gz { font-family: var(--font-display); font-weight: 700; font-size: 24px; }
.flow .what { font-weight: 600; color: var(--accent); }

/* ── 광고 칸 ── */
.ad { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 4px 12px; display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ad-frame { display: flex; justify-content: center; overflow: hidden; min-height: 120px; }
.ad-frame iframe { display: block; max-width: none; }
.ad-notice { margin: 2px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--band-ink); opacity: .92; border: 1px solid rgba(255,255,255,.28); border-radius: 10px; padding: 6px 10px; }
.ad-notice b { font-size: 11px; letter-spacing: .06em; border: 1px solid rgba(255,255,255,.5); border-radius: 5px; padding: 0 5px; margin-right: 4px; }
.ad-head { display: flex; align-items: center; gap: 8px; }
.ad-tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.ad-title { font-size: 15px; font-weight: 600; }
.ad-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(132px, 1fr); gap: 10px; overflow-x: auto; scrollbar-width: none; }
.ad-row::-webkit-scrollbar { display: none; }
.ad-item { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); min-width: 0; }
.ad-img { aspect-ratio: 1; max-width: 100%; border-radius: 12px; background: var(--bg); display: grid; place-items: center; font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--ink-3); border: 1px solid var(--line); }
.ad-name { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-price { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ad-disc { font-size: 13px; color: var(--accent); font-weight: 600; line-height: 1.5; padding: 0 10px; }
.ad-disc .ad-tag { margin-right: 4px; }

/* ── 일주 ── */
.ilju-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.ilju-grid a { text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 4px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.ilju-grid a .hj { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.ilju-grid a .ko { font-size: 13px; color: var(--ink-2); }
.article h1 { font-size: 28px; }
.article .image { color: var(--ink-2); font-size: 16px; }
.pager { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 15px; }

/* ── 띠별 운세 · 사주 사전 (7판) ── */
.ddi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ddi-grid a { text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.ddi-grid .nm { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.ddi-grid .rel { font-size: 13px; font-weight: 600; color: var(--accent); }
.ddi-grid .yr { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.years { font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dict-list { display: flex; flex-direction: column; gap: 8px; }
.dict-list a { text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.dict-list .t { font-weight: 700; }
.dict-list .d { font-size: 14px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { text-decoration: none; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; }
.article .sec b { background: linear-gradient(transparent 60%, var(--accent-soft) 60%); }
.article .sec { display: flex; flex-direction: column; gap: 12px; }
.article .sec h2 { margin-top: 8px; }
.todo { color: #c0352b; }
.contact-mail { font-size: 19px; font-weight: 600; }

/* ── 메뉴 격자 · 아래 메뉴바 · 띠 그림 · 자주 묻는 질문 (8판 · 디자인 벤치) ── */
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.menu-grid a { text-decoration: none; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 6px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; box-shadow: var(--shadow); min-width: 0; }
.menu-grid .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.menu-grid svg { width: 24px; height: 24px; }
.menu-grid .t { font-weight: 700; font-size: 14px; letter-spacing: -.02em; line-height: 1.3; }
.menu-grid .d { font-size: 12px; color: var(--ink-3); line-height: 1.3; }
body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--paper); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(20, 23, 31, .06); }
.dock a { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--ink-3); font-size: 11px; font-weight: 600; padding: 4px 0; }
.dock svg { width: 22px; height: 22px; }
.dock a[aria-current="page"] { color: var(--accent); }
@media (min-width: 700px) { .dock { max-width: 640px; margin: 0 auto; border: 1px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; } }
.ani { font-size: 30px; line-height: 1; margin-bottom: 4px; }
.ani-big { font-size: 52px; line-height: 1; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 8px; color: var(--ink-2); font-size: 15px; }

[hidden] { display: none !important; }
/* ── AI 풀이 기다리기·써지기 (11판) ── */
.ai-wait { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0 4px; text-align: center; }
.book { position: relative; width: 150px; height: 100px; perspective: 700px; margin: 6px 0 2px; }
.book .cover { position: absolute; inset: -6px -8px; background: var(--band); border-radius: 10px; box-shadow: 0 6px 16px rgba(20, 23, 31, .18); }
.book .pg { position: absolute; top: 0; width: 50%; height: 100%; background: var(--paper);
  background-image: repeating-linear-gradient(transparent 0 13px, var(--line) 13px 14px); background-position: 0 8px; border: 1px solid var(--line); }
.book .l { left: 0; border-radius: 6px 0 0 6px; }
.book .r, .book .f { right: 0; border-radius: 0 6px 6px 0; }
.book .f { transform-origin: left center; animation: hn-flip 1.6s ease-in-out infinite; backface-visibility: visible; }
.book .f2 { animation-delay: .8s; }
@keyframes hn-flip { 0% { transform: rotateY(0); } 55%, 100% { transform: rotateY(-180deg); } }
.ai-stage { font-weight: 600; color: var(--ink); }
.ai-count { display: block; font-size: 13px; font-weight: 500; color: var(--ink-3); margin-top: 2px; }
.ai-bar { width: 100%; max-width: 320px; height: 6px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.ai-bar span { display: block; height: 100%; width: 6%; background: var(--accent); border-radius: 999px; transition: width .6s ease; }
.caret { display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: var(--accent); animation: hn-blink .8s steps(1) infinite; }
@keyframes hn-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .book .f { animation: none; display: none; } .caret { animation: none; } }
.who-lab { font-family: var(--font-body); font-size: 17px; font-weight: 700; color: var(--accent); margin: 2px 0 -4px; }
.sep { border: 0; border-top: 1px dashed var(--line); margin: 6px 0; width: 100%; }
.gh-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.gh-tag { font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.gh-tag.warn { background: rgba(192, 53, 43, .12); color: #c0352b; }
#read-go { margin-top: 4px; }

/* ── 바닥 ── */
footer { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; color: var(--ink-3); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
footer nav { display: flex; gap: 14px; flex-wrap: wrap; }
footer a { color: var(--ink-2); }
.prose h2 { font-size: 19px; margin-top: 6px; }
.prose ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 4px; }

@media (min-width: 700px) { .hero-title { font-size: 36px; } }
@media (max-width: 380px) { .tile .hj { font-size: 30px; } .flow { grid-template-columns: 1fr; } .hero-title { font-size: 26px; } }
@media (prefers-reduced-motion: no-preference) { .mix span { transition: width .5s ease; } }

/* ── PC 화면 (14판 · 11-03 사장님 «컴터는 컴터에 맞추고 모바일은 모바일에») — 1000px 넘을 때만 · 폰은 위 그대로 ── */
.nav-pc { display: none; }
.card.pc-intro { display: none; }
.col-in, .col-out, .side { display: contents; }
.pc-intro { gap: 10px; border-style: dashed; box-shadow: none; }
.pc-intro .pc-arrow { font-size: 26px; line-height: 1; color: var(--accent); font-weight: 700; }
.pc-intro ul { margin: 0; padding-left: 20px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 1000px) {
  .wrap { max-width: 1120px; }
  main.narrow { max-width: 820px; }
  body { padding-bottom: 0; }
  .dock { display: none; }
  .band .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 24px; row-gap: 14px; }
  .band .wrap > * { grid-column: 1 / -1; }
  .band .wrap > .topbar { grid-column: 1; }
  .band .wrap > .nav { grid-column: 2; justify-self: end; }
  .nav-pc { display: flex; }
  .topbar small { display: none; }
  .hero-title { font-size: 40px; }
  .tabs { display: none; }
  main.app { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 24px; align-items: start; }
  main.app > * { grid-column: 1 / -1; }
  main.app > .col-in { display: block; grid-column: 1; position: sticky; top: 16px; z-index: 1; margin-top: -48px; }
  main.app > .col-in > .lift { margin-top: 0; }   /* 올라붙임은 칸 쪽에서 — 따라 내려올 때 위가 잘리지 않게 */
  main.app > .tk-toast ~ .col-in { margin-top: 0; }
  main.app #out:empty { display: none !important; }   /* #out 은 글자 안에 display:flex 가 박혀 있어 !important */
  main.read > .side > .ad { margin-top: 0; }
  main.app > .col-out { display: flex; flex-direction: column; gap: 16px; grid-column: 2; min-width: 0; margin-top: -48px; position: relative; z-index: 1; }
  main.app > .tk-toast ~ .col-out { margin-top: 0; }
  .card.pc-intro { display: flex; }
  #out:not(:empty) + .card.pc-intro { display: none; }
  main.read { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
  main.read > * { grid-column: 1 / -1; }
  main.read > article { grid-column: 1; min-width: 0; }
  main.read > .side { display: flex; flex-direction: column; gap: 16px; grid-column: 2; position: sticky; top: 16px; margin-top: -48px; z-index: 1; }
  .ddi-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .dict-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-sheet { top: 50%; bottom: auto; transform: translateY(-50%); border-radius: 22px; }
}
