/* DearEpoch — 다크 아카이브 · 고전 세리프 · 따뜻한 아이보리 (기획 "디자인 방향") */
:root {
  --bg: #100f0e; --bg2: #161412; --card: #1d1a17; --card2: #25211d; --line: #302b25; --line2: #403830;
  --ink: #efe7d6; --ink2: #cfc5b2; --muted: #a0968a; --dim: #776e63;
  --cream: #efe2c4; --cream-ink: #1b1712; --gold: #c8a46b; --gold2: #e2c28d;
  --expert: #3a2f22; --expert-line: #5c4a33;
  --danger: #e0786a;
  --serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --tab: 64px; --w: 520px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.serif { font-family: var(--serif); }
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }
.link { color: var(--gold2); }
.link:hover { text-decoration: underline; }

.stage { position: relative; max-width: var(--w); margin: 0 auto; min-height: 100vh; background: var(--bg); }
@media (min-width: 560px) { body { background: #0a0908; } .stage { box-shadow: 0 0 0 1px #1d1a17, 0 30px 80px rgba(0,0,0,.6); } }
.app { padding-bottom: calc(var(--tab) + var(--safe-b) + 24px); min-height: 100vh; }
body.notab .app { padding-bottom: 0; }
body.notab .tabbar { display: none; }

/* 탭 */
.tabbar { position: fixed; z-index: 30; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--w); height: calc(var(--tab) + var(--safe-b)); padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(16,15,14,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: var(--dim); }
.tabbar a.on { color: var(--ink); }
.tabbar a.on svg { stroke-width: 2; }
.tab-face { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; background: var(--card2); display: grid; place-items: center; font-size: 12px; }
.tab-face img { width: 100%; height: 100%; object-fit: cover; }
.tab-nick { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 머리 */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(var(--safe-t) + 18px) 20px 6px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand .glass { width: 38px; height: 38px; flex: none; color: var(--ink); }
.brand .glass svg { width: 38px; height: 38px; stroke-width: 1.5; }
.brand b { display: block; font: 400 30px/1 var(--serif); letter-spacing: -.01em; }
.brand small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 5px; font-size: 14px; color: var(--muted); }
.brand small .sub { white-space: nowrap; }
.top-acts { display: flex; gap: 4px; }
.ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); }
.ic:hover { background: rgba(255,255,255,.05); }
.soft { font-family: var(--sans); font-size: 9.5px; font-weight: 600; letter-spacing: .08em; padding: 2px 7px; border-radius: 99px; border: 1px solid rgba(200,164,107,.55); color: var(--gold); white-space: nowrap; line-height: 1.3; }

.chips { display: flex; gap: 8px; padding: 12px 20px 4px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 38px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line2); color: var(--ink2); font-size: 15px; white-space: nowrap; }
.chip.on { background: var(--cream); color: var(--cream-ink); border-color: var(--cream); font-weight: 500; }
.chip.sm { height: 32px; padding: 0 13px; font-size: 13.5px; }

/* 오늘의 논쟁 */
.hero { position: relative; margin: 14px 16px 0; border-radius: 22px; overflow: hidden; background: var(--card); min-height: 420px; display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid var(--line); }
.hero .img { position: absolute; inset: 0; background-size: cover; background-position: center 25%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,15,14,0) 20%, rgba(16,15,14,.55) 52%, rgba(16,15,14,.96) 88%); }
.hero .body { position: relative; z-index: 1; padding: 22px 18px 18px; }
.kicker { display: inline-block; padding: 4px 11px; border-radius: 999px; border: 1px solid rgba(200,164,107,.6); background: rgba(16,15,14,.55); color: var(--cream); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hero h1 { margin: 12px 0 8px; font: 400 33px/1.13 var(--serif); letter-spacing: -.01em; }
.hero p { margin: 0 0 6px; color: var(--ink2); font-size: 16px; }
.hero .meta { font-size: 13px; color: var(--muted); margin: 6px 0 16px; }
.btn { height: 52px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px; font-weight: 600; font-size: 16.5px; }
.btn svg { width: 22px; height: 22px; }
.btn-cream { background: var(--cream); color: var(--cream-ink); }
.btn-cream:hover { background: #f6ead1; }
.btn-dark { background: var(--ink); color: var(--cream-ink); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--ink); border: 1px solid var(--line2); }
.btn-danger { background: #b84a3c; color: #fff; }
.btn-block { width: 100%; }
.btn-sm { height: 40px; font-size: 14px; padding: 0 16px; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* 목록 */
.sec { padding: 26px 0 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 20px 10px; }
.sec-head h2 { margin: 0; font: 400 23px/1.2 var(--serif); }
.sec-head a { font-size: 14px; color: var(--muted); }
.row { display: grid; grid-template-columns: 112px 1fr 34px; gap: 14px; align-items: center; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .thumb { width: 112px; height: 80px; border-radius: 12px; background: var(--card2) center/cover; }
.row h3 { margin: 0 0 6px; font: 400 18px/1.25 var(--serif); }
.row .sub { font-size: 13.5px; color: var(--muted); }
.mark { width: 34px; height: 34px; display: grid; place-items: center; color: var(--ink2); }
.mark.on svg { fill: var(--cream); stroke: var(--cream); }

.rail { display: flex; gap: 12px; padding: 0 20px 4px; overflow-x: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.hcard { flex: none; width: 138px; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.hcard .pic { aspect-ratio: 4/5; background: var(--card2) center/cover; }
.hcard b { display: block; padding: 9px 10px 2px; font: 400 14.5px/1.25 var(--serif); }
.hcard span { display: block; padding: 0 10px 10px; font-size: 12px; color: var(--muted); }

/* 논쟁 화면 */
.dtop { position: relative; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; }
.dtop .img { position: absolute; inset: 0; background-size: cover; background-position: center 25%; }
.dtop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,15,14,.55) 0%, rgba(16,15,14,.15) 30%, rgba(16,15,14,.75) 70%, var(--bg) 100%); }
.dtop .bar { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: calc(var(--safe-t) + 10px) 10px 0; }
.dtop .bar .r { display: flex; }
.dtop .t { position: relative; z-index: 1; padding: 70px 20px 4px; }
.dtop .cat { font-size: 15px; color: var(--ink2); }
.dtop h1 { margin: 6px 0 0; font: 400 31px/1.15 var(--serif); }
.dtop .ai { margin-top: 8px; font-size: 11.5px; color: var(--dim); }
.tabs { display: flex; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; background: rgba(16,15,14,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.tabs button { flex: 1; padding: 15px 2px 13px; color: var(--muted); font-size: 15.5px; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--ink); border-color: var(--cream); font-weight: 500; }

.thread { padding: 6px 0; border-bottom: 1px solid var(--line); }
.thread:last-child { border-bottom: 0; }
.cmt { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 12px 18px 4px 16px; }
.cmt.reply { padding-left: 40px; }
.cmt .who { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: 14.5px; margin-bottom: 5px; }
.cmt .who b { font-weight: 600; }
.cmt .who .at { color: var(--dim); font-size: 13px; }
.face { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; background: var(--card2); display: grid; place-items: center; font-weight: 600; color: var(--ink2); flex: none; }
.face img { width: 100%; height: 100%; object-fit: cover; }
.face.sm { width: 34px; height: 34px; font-size: 13px; }
.face.lg { width: 88px; height: 88px; font-size: 28px; }
.face.xp { box-shadow: 0 0 0 2px var(--gold); }
.cmt.reply .face { width: 38px; height: 38px; }
.cmt.reply { grid-template-columns: 40px 1fr; }
.bubble { padding: 11px 15px; border-radius: 4px 18px 18px 18px; background: var(--card2); font-size: 16px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.gone { color: var(--dim); font-style: italic; background: transparent; border: 1px dashed var(--line2); }
.cmt.xp .bubble { background: var(--expert); border: 1px solid var(--expert-line); border-radius: 4px 18px 18px 18px; }
.cmt.xp .who b { font-family: var(--serif); font-weight: 400; font-size: 16px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: rgba(200,164,107,.18); color: var(--gold2); font-size: 11.5px; font-weight: 500; }
.fict { font-size: 11px; color: var(--dim); }
.acts { display: flex; align-items: center; gap: 18px; padding: 6px 2px 4px; font-size: 14px; color: var(--ink2); }
.acts button { display: inline-flex; align-items: center; gap: 6px; }
.acts svg { width: 19px; height: 19px; }
.acts .liked svg { fill: var(--danger); stroke: var(--danger); }
.acts .more { margin-left: auto; color: var(--dim); }
.cite { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 3px; padding: 0 4px; border-radius: 9px; background: rgba(200,164,107,.28); color: var(--gold2); font: 600 10.5px/17px var(--sans); vertical-align: 2px; }
.srcline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(200,164,107,.18); white-space: normal; }
.srcline button { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 3px 9px 3px 4px; border-radius: 99px; background: rgba(0,0,0,.22); color: var(--ink2); font-size: 12.5px; text-align: left; }
.srcline i { display: inline-grid; place-items: center; flex: none; min-width: 17px; height: 17px; border-radius: 9px; background: rgba(200,164,107,.28); color: var(--gold2); font: normal 600 10.5px/17px var(--sans); }
.tagline { margin-top: 8px; font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.further { margin-top: 8px; font-size: 13px; color: var(--ink2); }
.further a { color: var(--gold2); }
.pending { display: flex; align-items: center; gap: 10px; padding: 8px 18px 10px 56px; color: var(--muted); font-size: 14px; }
.pending .face { width: 30px; height: 30px; }
.dots i { display: inline-block; width: 5px; height: 5px; margin: 0 1.5px; border-radius: 50%; background: var(--gold); animation: blink 1.2s infinite both; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.failed { padding: 4px 18px 10px 76px; font-size: 14px; color: var(--muted); }
.failed button { color: var(--gold2); text-decoration: underline; }
.sortbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px 4px; font-size: 13.5px; color: var(--muted); }
.sortbar .seg button { padding: 4px 10px; border-radius: 99px; color: var(--muted); }
.sortbar .seg button.on { background: var(--card2); color: var(--ink); }
.opener { margin: 12px 14px 4px; padding: 6px 0 2px; border-radius: 18px; background: linear-gradient(180deg, rgba(58,47,34,.5), rgba(58,47,34,.12)); border: 1px solid var(--expert-line); }
.opener .cmt { padding-right: 14px; }
.opener .cmt.xp .bubble { background: transparent; border: 0; padding: 0; }
.opener .pinned { padding: 2px 16px 10px 76px; font-size: 12px; color: var(--muted); }

/* 입력창 */
.composer { position: fixed; z-index: 31; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--w); padding: 10px 12px calc(10px + var(--safe-b)); background: rgba(16,15,14,.97); border-top: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.composer .replying { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px 8px; font-size: 13px; color: var(--muted); }
.composer .replying b { color: var(--ink2); font-weight: 500; }
.composer .line { display: flex; align-items: flex-end; gap: 8px; }
.composer .plus { width: 44px; height: 44px; margin-bottom: 2px; flex: none; border-radius: 50%; border: 1px solid var(--line2); display: grid; place-items: center; color: var(--ink2); }
.composer .box { flex: 1; min-width: 0; display: flex; align-items: flex-end; min-height: 48px; border-radius: 26px; border: 1px solid var(--line2); background: var(--card); padding: 4px 5px 4px 16px; }
.composer textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; padding: 10px 0; max-height: 140px; font-size: 16px; line-height: 1.4; }
.composer textarea:placeholder-shown { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer textarea::placeholder { color: var(--dim); font-size: 15px; }
.composer .send { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--card2); display: grid; place-items: center; color: var(--ink); }
.composer .send.go { background: var(--cream); color: var(--cream-ink); }
.composer .send svg { width: 20px; height: 20px; }
.composer .count { text-align: right; font-size: 11.5px; color: var(--dim); padding: 4px 8px 0; }
body[data-view="debate"] .app { padding-bottom: calc(96px + var(--safe-b)); }

/* 전문가 견해 · 자료 */
.pane { padding: 6px 20px 30px; }
.who-card { display: flex; gap: 14px; align-items: center; padding: 16px; margin: 14px 0 6px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.who-card .face { width: 64px; height: 64px; }
.who-card b { display: block; font: 400 18px/1.25 var(--serif); }
.who-card span { display: block; font-size: 13.5px; color: var(--muted); }
.who-card p { margin: 6px 0 0; font-size: 14px; color: var(--ink2); }
.pane h2 { margin: 26px 0 4px; font: 400 21px/1.25 var(--serif); }
.pane h2 small { display: block; margin-top: 2px; font: 500 12px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.facts { margin: 10px 0 0; padding: 0; list-style: none; }
.facts li { position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); color: var(--ink2); }
.facts li::before { content: ''; position: absolute; left: 2px; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.reading { margin-top: 10px; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.reading b { display: block; font: 400 17px/1.3 var(--serif); margin-bottom: 4px; color: var(--cream); }
.reading p { margin: 0; color: var(--ink2); font-size: 15px; }
.whatif { margin-top: 12px; padding: 16px; border-radius: 14px; border: 1px dashed var(--expert-line); background: rgba(58,47,34,.25); font: italic 400 17px/1.45 var(--serif); color: var(--cream); }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.side { padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.side b { display: block; font: 400 17px/1.25 var(--serif); margin-bottom: 8px; color: var(--cream); }
.side ul { margin: 0; padding-left: 16px; font-size: 14px; color: var(--ink2); }
.side li { margin-bottom: 6px; }
@media (max-width: 380px) { .sides { grid-template-columns: 1fr; } }
.cta-line { margin-top: 22px; }
.src { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 70px; }
.src.hl { animation: hl 2.2s ease; border-radius: 10px; }
@keyframes hl { 0%, 40% { background: rgba(200,164,107,.18); } 100% { background: transparent; } }
.src .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); color: var(--gold2); }
.src .typ { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.src .typ .cite { margin: 0 7px 0 0; vertical-align: 1px; font-style: normal; letter-spacing: 0; }
.src b { display: block; margin: 2px 0; font: 400 17px/1.3 var(--serif); }
.src .by { font-size: 13.5px; color: var(--muted); }
.src p { margin: 4px 0 6px; font-size: 14.5px; color: var(--ink2); }
.src a { font-size: 14px; color: var(--gold2); }
.note { margin-top: 18px; font-size: 12.5px; color: var(--dim); }

/* 탐색 */
.page-head { padding: calc(var(--safe-t) + 22px) 20px 4px; }
.page-head .wordmark { font: 400 28px/1 var(--serif); color: var(--cream); }
.page-head h1 { margin: 18px 0 0; font: 400 30px/1.2 var(--serif); }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.search { margin: 16px 20px 4px; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.search input { flex: 1; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--ink); }
.search input::placeholder { color: var(--dim); }
.filters { padding: 6px 0 0; }
.filters .lab { padding: 10px 20px 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.filters .chips { padding-top: 8px; }
.ecard { display: block; margin: 12px 20px 0; padding: 18px 18px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.ecard .k { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold2); }
.ecard h3 { margin: 8px 0 10px; font: 400 21px/1.25 var(--serif); }
.ecard .s { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--muted); }
.ecard .s .today { color: var(--gold2); }
.empty { padding: 50px 30px; text-align: center; color: var(--muted); }
.empty h3 { margin: 0 0 6px; font: 400 22px/1.3 var(--serif); color: var(--ink); }
.empty .btn { margin-top: 14px; }

/* 역사학자 */
.hist-head { position: relative; padding: calc(var(--safe-t) + 26px) 20px 18px; background: linear-gradient(180deg, rgba(16,15,14,.2), var(--bg)), url('/img/library.webp') center/cover; }
.hist-head h1 { margin: 0; font: 400 34px/1.15 var(--serif); }
.hist-head p { margin: 10px 0 0; max-width: 340px; color: var(--ink2); }
.hgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 16px 10px; }
.hg { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 4/5; background: var(--card2) center/cover; border: 1px solid var(--line2); }
.hg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(16,15,14,.92)); }
.hg .n { display: block; position: absolute; z-index: 1; left: 12px; right: 10px; bottom: 11px; }
.hg b { display: block; font: 400 16.5px/1.2 var(--serif); }
.hg .n span { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; color: var(--ink2); }
.hg .n span svg { width: 16px; height: 16px; color: var(--gold); flex: none; }
.hprof { text-align: center; padding: calc(var(--safe-t) + 8px) 24px 6px; }
.hprof .portrait { width: 170px; height: 212px; margin: 6px auto 14px; border-radius: 20px; background: var(--card2) center/cover; border: 1px solid var(--line2); }
.hprof h1 { margin: 0; font: 400 28px/1.2 var(--serif); }
.hprof .f { margin-top: 4px; color: var(--gold2); }
.hprof p { color: var(--ink2); }
.hprof .fict { display: inline-block; margin-top: 2px; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line2); }

/* 프로필 */
.bar { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-t) + 8px) 8px 0; min-height: 52px; }
.bar h1 { margin: 0; font: 400 18px var(--serif); }
.ptop { text-align: center; padding: 8px 20px 10px; }
.ptop .face { margin: 0 auto 10px; }
.ptop h1 { margin: 0; font: 400 26px/1.2 var(--serif); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 12px 20px 4px; padding: 14px 0; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.stats b { display: block; font: 400 22px/1.2 var(--serif); }
.stats span { font-size: 12.5px; color: var(--muted); }
.take { display: block; margin: 10px 20px 0; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.take .t { font: 400 15px/1.3 var(--serif); color: var(--gold2); }
.take p { margin: 6px 0 6px; color: var(--ink2); font-size: 15px; overflow-wrap: anywhere; }
.take .s { font-size: 12.5px; color: var(--dim); }
.signin-card { margin: 20px; padding: 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.signin-card h2 { margin: 0 0 6px; font: 400 23px/1.25 var(--serif); }
.signin-card p { margin: 0 0 16px; color: var(--muted); }
.foot { margin: 28px 20px 10px; text-align: center; font-size: 12.5px; color: var(--dim); }
.foot button { color: var(--muted); text-decoration: underline; }
.soft-note { margin: 0 24px 28px; font-size: 12.5px; line-height: 1.5; text-align: center; color: var(--dim); }
.soft-note b { font-weight: 600; color: var(--muted); }
.about { padding: 4px 22px 40px; }
.about h2 { margin: 26px 0 4px; font: 400 20px/1.3 var(--serif); color: var(--cream); }
.about p { margin: 6px 0; color: var(--ink2); }

/* 시트 · 입장 · 알림 */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(5,4,3,.65); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet { position: relative; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; padding: 26px 20px calc(22px + var(--safe-b)); border-radius: 24px 24px 0 0; background: #1b1916; border: 1px solid var(--line2); border-bottom: 0; color: var(--ink); }
.sheet h2 { margin: 0 0 6px; padding-right: 34px; font: 400 23px/1.3 var(--serif); }
.sheet p { margin: 0 0 14px; }
.sheet .muted { color: var(--muted); }
.sheet .btn { width: 100%; margin-top: 10px; }
.sheet-x { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; font-size: 26px; line-height: 1; color: var(--muted); }
.sheet .warn, .sheet .err { color: var(--danger); font-size: 14px; }
.sheet .err { margin-top: 8px; }
.field { width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line2); background: var(--card); color: var(--ink); font-size: 16px; outline: none; }
textarea.field { resize: vertical; min-height: 90px; }
.nickrow { display: flex; gap: 8px; }
.avgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 10px 0 12px; }
.avgrid button { border-radius: 50%; overflow: hidden; aspect-ratio: 1; border: 2px solid transparent; background: var(--card2); }
.avgrid button.on { border-color: var(--cream); }
.radio { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; margin-bottom: 8px; border-radius: 14px; border: 1px solid var(--line2); }
.radio i { width: 18px; height: 18px; margin-top: 2px; flex: none; border-radius: 50%; border: 2px solid var(--line2); }
.radio.on { border-color: var(--cream); }
.radio.on i { border: 5px solid var(--cream); }
.radio span span { display: block; font-size: 13.5px; color: var(--muted); }
.starter { display: block; width: 100%; text-align: left; padding: 12px 14px; margin-bottom: 8px; border-radius: 14px; border: 1px solid var(--line2); font-size: 15px; color: var(--ink2); }
.starter b { display: block; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--gold); margin-bottom: 2px; font-weight: 600; }
.fb-stars { display: flex; gap: 6px; margin: 4px 0 10px; }
.fb-stars button { font-size: 30px; color: var(--line2); }
.fb-stars button.on { color: var(--gold); }

.dw-gate { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: radial-gradient(120% 80% at 50% 15%, #2a231b, #0b0a09); color: var(--ink); }
.gate-card { width: 100%; max-width: 360px; text-align: center; }
.gate-card .logo { font: 400 40px/1 var(--serif); margin-bottom: 8px; }
.gate-card .slogan { font: italic 18px var(--serif); color: var(--gold2); margin: 6px 0 22px; }
.gate-card p { color: var(--muted); }
.gate-card input { width: 100%; height: 52px; margin: 12px 0 8px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line2); background: rgba(255,255,255,.05); color: var(--ink); font-size: 16px; outline: none; text-align: center; }
.gate-card .btn { width: 100%; margin-top: 8px; }
.gate-card .err { color: #ffb3a6; font-size: 14px; }
.gate-card .soft { display: inline-block; margin: 2px 0 6px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tab) + var(--safe-b) + 16px); transform: translate(-50%, 20px); max-width: min(440px, 92vw); padding: 12px 18px; border-radius: 14px; background: #2b2620; border: 1px solid var(--line2); color: var(--ink); font-size: 14.5px; box-shadow: 0 8px 30px rgba(0,0,0,.5); opacity: 0; pointer-events: none; transition: all .25s; z-index: 70; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body[data-view="debate"] .toast { bottom: calc(110px + var(--safe-b)); }
.spinner { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.15); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; min-height: 60vh; }

/* 자매품 (시리즈 공통) */
.sister { padding: 30px 20px 0; }
.sister-title { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.sister-home { text-decoration: underline; }
.sister-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.sister-row::-webkit-scrollbar { display: none; }
.sister-card { flex: none; width: 124px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.sister-icon { width: 40px; height: 40px; border-radius: 10px; margin-bottom: 8px; }
.sister-name { display: block; font-weight: 600; font-size: 14px; }
.sister-tag { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }

/* PC 가로 줄 넘기기 (시리즈 sister/phase1.md 9절) */
.pcrail { position: relative; }
.pcnav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 34px; height: 34px; border-radius: 50%; background: rgba(16,15,14,.85); border: 1px solid var(--line2); color: var(--ink); font-size: 12px; }
.pcnav.l { left: 4px; } .pcnav.r { right: 4px; }
.pcnav[hidden] { display: none; }
.dragging { cursor: grabbing; user-select: none; }

/* 앱 설치 팝업 (시리즈 공통 install.js) */
.dwi { position: fixed; left: 0; right: 0; bottom: calc(var(--tab) + env(safe-area-inset-bottom)); z-index: 70; display: flex; justify-content: center; padding: 0 12px 12px; pointer-events: none; }
body[data-view="debate"] .dwi { display: none; }
.dwi-card { pointer-events: auto; width: min(440px, 100%); background: #1f1c18; color: var(--ink); border: 1px solid var(--line2); border-radius: 18px; padding: 16px 16px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.5); display: flex; flex-direction: column; gap: 12px; }
.dwi-head { display: flex; gap: 12px; align-items: flex-start; }
.dwi-head img { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.dwi-head b { display: block; font-weight: 600; }
.dwi-head p { margin: 3px 0 0; font-size: .85em; line-height: 1.5; color: var(--ink2); }
.dwi-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.dwi-btn { padding: 10px 14px; border-radius: 999px; font-size: .85em; border: 0; cursor: pointer; background: none; }
.dwi-main { background: var(--cream); color: var(--cream-ink); font-weight: 600; }
.dwi-ghost { border: 1px solid var(--line2); color: var(--ink2); }
.dwi-more { font-size: .9em; }
.dwi-steps { margin: 0; padding-left: 20px; line-height: 1.9; }
.dwi-ico { display: inline-flex; vertical-align: -4px; padding: 2px 4px; border-radius: 6px; background: var(--card2); }
.dwi-ico svg { width: 18px; height: 18px; }
.dwi-guide { margin: 0 0 8px; line-height: 1.6; }

@media (max-width: 360px) { .brand b { font-size: 26px; } .hero h1 { font-size: 29px; } .row { grid-template-columns: 92px 1fr 30px; } .row .thumb { width: 92px; height: 70px; } }
