/* Lens Studio — 애딧 디자인 시스템(adit-ui DESIGN.md)을 따른다.
   흰 면 · Lens 쿨그레이 · 주 행동은 먹(검정) · 정보는 파랑 · 모서리 8px(칩 4px) · 붙어 있는 것엔 그림자 없음(뜨는 것만) */
:root {
  --g50: #f7f8f9; --g100: #f2f4f6; --g200: #e5e8eb; --g300: #d1d6db; --g400: #b0b8bf;
  --g500: #8b95a1; --g600: #6b7684; --g700: #59636f; --g800: #4e5968; --g900: #333d4b; --g950: #191f28;
  --ink: var(--g950);
  --blue: #167cff; --blue-50: #eef5ff; --blue-600: #0f63d6;
  --red: #e5484d; --red-50: #fdf1f1; --green: #1f9d63; --green-50: #edf8f2; --amber: #b7791f; --amber-50: #fdf6e7;
  --r: 8px; --r-chip: 4px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--g50); color: var(--ink); font: 14px/1.55 "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif; letter-spacing: -0.01em; }
a { color: inherit; }
h2, h3, h4, h5 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
.muted { color: var(--g600); }
s { color: var(--g400); text-decoration-thickness: 1px; }

/* 컨트롤 */
.btn { font: inherit; font-size: 14px; font-weight: 600; height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid transparent; background: var(--g100); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--g200); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--g900); }
.btn.outline { background: #fff; border-color: var(--g200); }
.btn.outline:hover { border-color: var(--g400); background: #fff; }
.btn.ghost { background: transparent; color: var(--g700); }
.btn.ghost:hover { background: var(--g100); color: var(--ink); }
.btn.sm { height: 32px; font-size: 13px; padding: 0 12px; }
.btn.xs { height: 28px; font-size: 12px; padding: 0 10px; }
.btn.block { width: 100%; }
.input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--g200); border-radius: var(--r); }
.input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 1px solid var(--ink); border-color: var(--ink); }
select { height: 32px; padding: 0 28px 0 10px; font-size: 13px; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b7684' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 10px center; max-width: 360px; }
.chip { font-size: 11px; font-weight: 500; padding: 1px 6px; border-radius: var(--r-chip); background: var(--g100); color: var(--g700); white-space: nowrap; }

/* 머리 */
.top { position: sticky; top: 0; z-index: 30; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 20px; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--g200); }
.brand { font-weight: 800; font-size: 15px; letter-spacing: -0.03em; margin-right: 6px; }
.top-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.status { font-size: 12px; color: var(--g600); display: inline-flex; align-items: center; gap: 6px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--g400); }
.status.ok::before { background: var(--green); }
.status.warn::before { background: var(--amber); }
main { max-width: 1320px; margin: 0 auto; padding: 20px; }

/* 대화 */
.talk { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; height: calc(100vh - 92px); min-height: 520px; }
.chat { display: flex; flex-direction: column; min-height: 0; background: #fff; border: 1px solid var(--g200); border-radius: var(--r); }
.thread { flex: 1; overflow: auto; padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.empty-chat { margin: auto; text-align: center; color: var(--g600); font-size: 14px; line-height: 1.7; }
.empty-chat b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.msg { max-width: 78%; white-space: pre-wrap; font-size: 14px; line-height: 1.65; }
.msg .who { font-size: 11px; font-weight: 600; color: var(--g500); margin-bottom: 4px; }
.msg.user { align-self: flex-end; background: var(--g100); padding: 10px 14px; border-radius: 12px 12px 4px 12px; }
.msg.user .who { display: none; }
.msg.director { align-self: flex-start; }
.msg.typing { color: var(--g500); }
.asks { margin-top: 12px; display: grid; gap: 10px; white-space: normal; }
.ask .t { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--g200); background: #fff; cursor: pointer; transition: border-color .15s; }
.opt:hover { border-color: var(--g500); }
.opt.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.opt.sent { pointer-events: none; opacity: .7; }
.msg.user.pick { display: flex; align-items: center; gap: 8px; }
.pick-mark { font-size: 11px; font-weight: 600; color: var(--g500); }
.composer { border-top: 1px solid var(--g200); padding: 12px; }
.composer textarea { width: 100%; border: 0; resize: none; padding: 6px 8px; font-size: 14px; outline: none; }
.composer-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.kbd { font-size: 11px; color: var(--g500); }
.dots { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 4px; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .25; animation: dot 1.1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 40% { opacity: 1; } }

/* 캠페인 칸 */
.brief { overflow: auto; background: #fff; border: 1px solid var(--g200); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.brief-head { display: flex; align-items: center; justify-content: space-between; }
.brief-head h2 { font-size: 15px; }
.ready { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--g600); }
.ready-bar { width: 72px; height: 4px; background: var(--g100); border-radius: 2px; overflow: hidden; }
.ready-bar i { display: block; height: 100%; background: var(--ink); transition: width .3s; }
.ov .title { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; }
.ov .one { color: var(--g700); margin-top: 4px; font-size: 13px; }
.ov dl { display: grid; grid-template-columns: 64px 1fr; gap: 6px 10px; margin: 14px 0 0; font-size: 13px; }
.ov dt { color: var(--g500); }
.ov dd { margin: 0; }
.ov .lanes, .ov .open { display: flex; flex-direction: column; gap: 3px; }
.ov .open span { color: var(--amber); }
.sec { border-top: 1px solid var(--g100); padding-top: 12px; }
.sec > summary { cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.sec > summary::after { content: "+"; color: var(--g500); font-weight: 400; }
.sec[open] > summary::after { content: "–"; }
.sec > summary::-webkit-details-marker { display: none; }
.sec > div { margin-top: 10px; }
.pk { display: grid; grid-template-columns: 84px 1fr; gap: 6px 10px; font-size: 12px; }
.pk .d { color: var(--g500); padding-top: 2px; }
.tag { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; padding: 1px 7px; margin: 0 4px 4px 0; border-radius: var(--r-chip); background: var(--g100); color: var(--ink); }
.tag.inferred { background: #fff; box-shadow: inset 0 0 0 1px var(--g300); color: var(--g700); }
.tag.implied, .tag.recipe { background: #fff; box-shadow: inset 0 0 0 1px var(--g200); color: var(--g500); }
.tag.override { background: var(--ink); color: #fff; cursor: pointer; }
.tag .rej { font-style: normal; color: var(--g400); margin-left: 3px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.tag:hover .rej { opacity: 1; }
.tag.override .rej { color: var(--g400); }
.tag.rejected { background: transparent; color: var(--g500); text-decoration: line-through; box-shadow: inset 0 0 0 1px var(--g200); cursor: pointer; }
.rejl { margin-top: 8px; font-size: 12px; color: var(--g500); }
#rereadBtn { margin-top: 8px; }
.qrow { padding: 10px 0; border-bottom: 1px solid var(--g100); font-size: 13px; }
.qrow:last-child { border-bottom: 0; }
.qrow .w { color: var(--g500); font-size: 12px; margin: 2px 0 8px; }
.bar { display: grid; grid-template-columns: 88px 1fr 44px; gap: 8px; align-items: center; font-size: 12px; margin: 5px 0; }
.bar .track { position: relative; height: 4px; background: var(--g100); border-radius: 2px; }
.bar .track i { position: absolute; top: 0; bottom: 0; background: var(--g800); border-radius: 2px; }
.bar .track i.neg { background: var(--g400); }
.bar .track .mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--g300); }
.bar .num { text-align: right; color: var(--g600); font-variant-numeric: tabular-nums; }
.run { display: grid; gap: 8px; border-top: 1px solid var(--g100); padding-top: 14px; margin-top: auto; }
.run .input { height: 36px; padding: 0 10px; }
.chk { font-size: 13px; color: var(--g700); display: flex; align-items: center; gap: 6px; }
.chk input { accent-color: var(--ink); }
.notes { font-size: 12px; color: var(--g600); display: grid; gap: 3px; }
.runline { color: var(--ink); font-weight: 500; }
.err { color: var(--red); font-size: 12px; }

/* 추천 */
.stage { margin-top: 32px; }
.stage-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; }
.stage-head h2 { font-size: 20px; }
.stage-sub { font-size: 13px; color: var(--g600); margin-top: 2px; }
.line { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--g200); border-radius: var(--r); padding: 12px 16px; margin-bottom: 12px; }
.line-row { flex: 1; min-width: 0; }
.line-count { font-size: 13px; margin-bottom: 8px; }
.line-count b { font-weight: 700; }
.line-chips { display: flex; gap: 3px; }
.lc { flex: 1; height: 6px; border-radius: 3px; background: var(--g200); position: relative; cursor: default; }
.lc.s-up.rd { background: var(--g300); }
.lc.s-table { background: var(--ink); }
.lc.s-confirmed { background: var(--blue); }
.lc.s-feedback { background: var(--g500); }
.lc.s-passed, .lc.s-skipped { background: var(--g100); }
.lc:hover::after { content: attr(data-h); position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 4px; white-space: nowrap; z-index: 5; }
.pend { display: flex; align-items: center; gap: 12px; font-size: 13px; padding-left: 16px; border-left: 1px solid var(--g200); }
.pend .muted { font-size: 12px; }
.desire { margin-bottom: 12px; }
.desire details { background: #fff; border: 1px solid var(--g200); border-radius: var(--r); padding: 12px 16px; }
.desire summary { cursor: pointer; font-size: 13px; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.desire summary::-webkit-details-marker { display: none; }
.desire summary b { font-weight: 700; }
.dgrid { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 28px; margin-top: 14px; }
.dgrid h5 { font-size: 12px; color: var(--g600); font-weight: 600; margin-bottom: 8px; }
.drow { display: grid; grid-template-columns: 110px 1fr 54px auto; gap: 8px; align-items: center; margin: 4px 0; font-size: 12px; }
.drow.moved .vl { color: var(--blue-600); font-weight: 600; }
.hrow { font-size: 12px; padding: 6px 0; border-top: 1px solid var(--g100); }
.hrow:first-of-type { border-top: 0; }
.hrow .src { display: inline-block; font-size: 11px; font-weight: 600; color: var(--g600); margin-right: 4px; }
.wbar { position: absolute; left: 0; top: 4px; bottom: 4px; background: var(--g800); border-radius: 2px; }
.wghost { position: absolute; left: 0; top: 2px; bottom: 2px; border-right: 2px solid var(--g400); }
.up { color: var(--green); } .down { color: var(--red); }

/* 카드 */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; perspective: 1600px; }
@media (max-width: 1080px) { .cards { grid-template-columns: 1fr; } .talk { grid-template-columns: 1fr; height: auto; } .dgrid { grid-template-columns: 1fr; } }
.slot { min-width: 0; }
/* 🚨 preserve-3d·backface-visibility 를 쓰지 않는다 — 크롬에서 그 3D 공간 안의 스크롤 영역에 휠이 안 먹는다(2026-10-21 실측: 휠 400 → scrollTop 0).
   뒤집기는 앞·뒤 면을 바꿔 끼우고 들어오는 면만 회전시킨다. */
.card { position: relative; height: 820px; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
/* 카드가 들어오고 나가는 움직임 — 석 장이 차례로 깔리고, 넘긴 카드는 그 카드만 날아간다 */
.card.deal { animation: deal .55s cubic-bezier(.2,.7,.2,1) backwards; }
.slot:nth-child(2) .card.deal { animation-delay: .08s; } .slot:nth-child(3) .card.deal { animation-delay: .16s; }
@keyframes deal { from { opacity: 0; transform: translateY(40px) rotateX(18deg) scale(.96); } }
.card.fly { animation: fly .32s cubic-bezier(.5,0,.9,.4) forwards; pointer-events: none; }
@keyframes fly { to { opacity: 0; transform: translate(60px, -90px) rotate(9deg) scale(.9); } }
.card:hover:not(.flipped):not(.fly) { transform: translateY(-6px); }
.card .face.back { display: none; }
.card.flipped .face.front { display: none; }
.card.flipped .face.back { display: flex; animation: flipin .38s cubic-bezier(.2,.7,.2,1); }
.card.unflip .face.front { animation: flipin .38s cubic-bezier(.2,.7,.2,1); }
@keyframes flipin { from { transform: perspective(1600px) rotateY(-80deg); opacity: .3; } }
.face { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--g200); border-radius: var(--r); padding: 16px; overflow: hidden; transition: border-color .15s; }
/* 등급 테두리 — 지금까지 잰 곳 중 상위 10% 프리즘 · 30% 골드 · 그 밖 실버 */
.card.t-silver .face { border-color: var(--g300); }
.card.t-gold .face { border: 1.5px solid #e0a82e; box-shadow: 0 0 0 3px rgba(224,168,46,.10), 0 10px 30px rgba(224,168,46,.14); }
.card.t-prism .face { border: 1.5px solid transparent; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(135deg, #8b5cf6, #ec4899, #f59e0b, #06b6d4, #8b5cf6) border-box; box-shadow: 0 10px 34px rgba(139,92,246,.18); }
.card.t-prism .face.back, .card.t-gold .face.back { box-shadow: none; }
.tier { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 700; color: var(--g500); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.card.t-gold .tier { color: #b7791f; }
.card.t-prism .tier { background: linear-gradient(90deg, #8b5cf6, #ec4899, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card.confirmed .face.front { box-shadow: 0 0 0 2px var(--ink), 0 12px 32px rgba(25,31,40,.16); }
.stamp { position: absolute; top: 40px; right: 10px; transform: rotate(10deg); background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .2em; padding: 3px 12px; border-radius: 4px; z-index: 3; pointer-events: none; box-shadow: 0 4px 12px rgba(25,31,40,.25); }
.who2 { padding-right: 56px; }
.who2 .h { font-weight: 700; font-size: 15px; text-decoration: none; letter-spacing: -0.02em; }
.who2 .h:hover { text-decoration: underline; }
.who2 .n { font-size: 12px; color: var(--g500); margin-top: 1px; }
.chips2 { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 0; }
.chips2 span { font-size: 11px; font-weight: 500; padding: 1px 6px; border-radius: var(--r-chip); background: var(--g100); color: var(--g700); }
.chips2 .partner { background: var(--blue-50); color: var(--blue-600); }
.lane { font-size: 12px; color: var(--g600); margin: 10px 0 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pbody { flex: 1; min-height: 0; overflow: auto; margin: 12px -4px 0 0; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--g200) transparent; }
.ptitle { font-size: 17px; font-weight: 700; line-height: 1.4; letter-spacing: -0.025em; }
.phook { font-size: 13px; color: var(--g700); margin: 6px 0 12px; line-height: 1.6; }
.prepping { font-size: 12px; color: var(--g500); margin: 4px 0 10px; }
.skel { height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--g100), var(--g50), var(--g100)); background-size: 200% 100%; animation: sh 1.4s infinite; margin: 8px 0; }
@keyframes sh { to { background-position: -200% 0; } }
.sample { margin: 0 0 14px; }
.sample-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--g600); margin-bottom: 8px; }
.sample-head a { margin-left: auto; color: var(--g600); text-decoration: none; }
.sample-head a:hover { color: var(--ink); }
.kind { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: var(--r-chip); background: var(--g100); color: var(--g700); }
.kind.ad { background: var(--blue-50); color: var(--blue-600); }
.viewer { position: relative; aspect-ratio: 1 / 1; background: var(--g100); border-radius: var(--r); overflow: hidden; }
.viewer img { width: 100%; height: 100%; object-fit: contain; display: block; cursor: zoom-in; }
.viewer .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); font-size: 16px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.viewer:hover .nav { opacity: 1; }
.viewer .prev { left: 8px; } .viewer .next { right: 8px; }
.viewer .count { position: absolute; top: 8px; right: 8px; font-size: 11px; background: rgba(25,31,40,.6); color: #fff; padding: 1px 7px; border-radius: 10px; }
.strip { display: flex; gap: 4px; margin-top: 6px; overflow-x: auto; scrollbar-width: none; }
.strip img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; opacity: .45; cursor: pointer; flex: none; transition: opacity .15s; }
.strip img.on, .strip img:hover { opacity: 1; }
.sample-why { font-size: 12px; color: var(--g600); margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pvote { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.pvote button { font: inherit; font-size: 12px; height: 30px; border-radius: var(--r); border: 1px solid var(--g200); background: #fff; color: var(--g700); cursor: pointer; transition: all .15s; }
.pvote button:hover { border-color: var(--g400); color: var(--ink); }
.pvote button.on.more { background: var(--ink); border-color: var(--ink); color: #fff; }
.pvote button.on.less { background: var(--g100); border-color: var(--g300); color: var(--ink); }
.cap { margin-top: 8px; font-size: 12px; }
.cap summary { cursor: pointer; color: var(--g600); list-style: none; }
.cap summary::-webkit-details-marker { display: none; }
.cap div { white-space: pre-wrap; color: var(--g700); margin-top: 6px; max-height: 160px; overflow: auto; }
.alts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.alts .muted { grid-column: 1 / -1; font-size: 11px; }
.alt { padding: 0; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; gap: 3px; font: inherit; font-size: 11px; color: var(--g600); text-align: left; }
.alt img, .alt .noimg { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; display: block; background: var(--g100); transition: opacity .15s; }
.alt:hover img { opacity: .8; }
.alt .noimg { display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--g500); }
.pfmt { font-size: 12px; color: var(--g600); margin: 4px 0 8px; }
.pflow { margin: 0 0 12px; padding-left: 18px; font-size: 13px; color: var(--g800); line-height: 1.6; }
.pflow li { margin: 3px 0; }
.voice { font-size: 12px; color: var(--g700); background: var(--g50); border-radius: var(--r); padding: 10px 12px; margin-bottom: 10px; line-height: 1.6; }
.voice q { color: var(--ink); quotes: "“" "”"; }
.voice .g { font-size: 11px; margin-left: 6px; color: var(--g500); }
.voice .g.no { color: var(--amber); }
.judge { font-size: 12px; border-radius: var(--r); padding: 10px 12px; margin-bottom: 10px; background: var(--g50); line-height: 1.55; }
.judge b { font-weight: 600; }
.judge span { color: var(--red); font-weight: 600; margin-left: 4px; }
.judge div { color: var(--g700); margin-top: 3px; }
.judge.j-맞음 b { color: var(--green); }
.judge.j-애매 b { color: var(--amber); }
.judge.j-어긋남 b { color: var(--red); }
.caution { font-size: 12px; color: var(--amber); margin-bottom: 10px; }
.fbnote { font-size: 12px; background: var(--g50); border-radius: var(--r); padding: 8px 10px; margin-top: 8px; color: var(--g700); }
.foot { flex: none; border-top: 1px solid var(--g100); padding-top: 12px; margin-top: 10px; }
.axes { cursor: help; }
.axes .bar { grid-template-columns: 56px 1fr 52px; margin: 4px 0; }
.bar.gate .gates { display: flex; gap: 4px; flex-wrap: wrap; }
.gates span { font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: var(--r-chip); }
.gates .ok { background: var(--green-50); color: var(--green); } .gates .no { background: var(--red-50); color: var(--red); }
.axes .track { overflow: hidden; }
.axes .track i { background: var(--g800); }
.axes .track i.was { background: var(--g200); }
.axes .track i.cut { background: var(--red); }
.axes .track i.up { background: var(--green); }
.axes .num { color: var(--ink); }
.amt { font-weight: 700; margin-left: 4px; }
.price { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; margin-top: 8px; color: var(--g600); }
.price .fit { font-size: 13px; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.mline { font-size: 11px; color: var(--g500); margin-top: 4px; line-height: 1.5; }
.why { font-size: 11px; color: var(--g500); min-height: 0; }
.acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 12px; }
.acts .btn { height: 36px; font-size: 13px; }
.back h3 { font-size: 15px; }
.back .hint { font-size: 12px; color: var(--g600); margin: 6px 0 12px; }
.stance { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; background: var(--g100); border-radius: var(--r); gap: 3px; }
.stance button { font: inherit; font-size: 13px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--g700); cursor: pointer; }
.stance button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.back textarea { flex: 1; margin: 12px 0; padding: 10px 12px; resize: none; font-size: 13px; line-height: 1.6; }

/* 담은 지면 */
.basket { margin-top: 20px; background: #fff; border: 1px solid var(--g200); border-radius: var(--r); padding: 16px; }
.basket-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.basket-head h3 { font-size: 15px; }
#basketSum { font-size: 13px; color: var(--g600); }
#basketSum .over { color: var(--red); font-weight: 600; }
.basket-list { display: flex; flex-wrap: wrap; gap: 8px; }
.bitem { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px 0 4px; border: 1px solid var(--g200); border-radius: var(--r); font-size: 13px; font-weight: 600; }
.bitem img { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; }
.bitem .muted { font-weight: 400; font-size: 12px; }
.bitem button { font: inherit; font-size: 12px; border: 0; background: none; color: var(--g500); cursor: pointer; padding: 4px; }
.bitem button:hover { color: var(--red); }
.log { margin-top: 14px; }
.log .fb { font-size: 12px; padding: 8px 0; border-top: 1px solid var(--g100); color: var(--g700); }

/* 설명 — 화면 위에 뜬다(그림자 있음) */
.explain { position: fixed; z-index: 60; width: 540px; max-height: calc(100vh - 80px); overflow: auto; background: #fff; border: 1px solid var(--g200); border-radius: 12px; box-shadow: 0 16px 48px rgba(25,31,40,.16); padding: 18px 20px; font-size: 12px; color: var(--g800); }
.explain h4 { font-size: 15px; color: var(--ink); }
.explain h5 { font-size: 13px; color: var(--ink); margin: 20px 0 8px; padding-top: 14px; border-top: 1px solid var(--g100); display: flex; align-items: center; gap: 6px; }
.explain h5 .muted { font-weight: 400; font-size: 12px; }
.xsum { margin: 4px 0; line-height: 1.6; }
.xsum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.vpair { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: center; }
.vhead { display: grid; grid-template-columns: 120px 1fr 44px 44px; gap: 8px; font-size: 11px; color: var(--g500); margin: 10px 0 2px; }
.vrow { display: grid; grid-template-columns: 120px 1fr 44px 44px; gap: 8px; align-items: center; margin: 4px 0; font-size: 12px; }
.vl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--g800); }
.vl .muted { font-size: 11px; color: var(--g500); }
.vtrack { position: relative; height: 14px; }
.vtrack::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--g100); border-radius: 1px; }
.vtrack.mid::after { content: ""; position: absolute; left: 50%; top: 2px; bottom: 2px; width: 1px; background: var(--g300); }
.vtrack .gapbar { position: absolute; top: 5px; height: 4px; border-radius: 2px; }
.gapbar.under { background: rgba(229,72,77,.35); } .gapbar.over { background: rgba(31,157,99,.35); }
.vtrack .tgt { position: absolute; top: 50%; width: 8px; height: 8px; background: var(--ink); transform: translate(-50%, -50%) rotate(45deg); border-radius: 1px; }
.vtrack .tgt.ghost { background: var(--g300); }
.vtrack .val { position: absolute; top: 50%; width: 8px; height: 8px; background: var(--blue); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px #fff; }
.vtrack .mv { position: absolute; top: 5px; height: 4px; background: rgba(22,124,255,.25); }
.vn { text-align: right; font-variant-numeric: tabular-nums; color: var(--g700); }
.vn.far { color: var(--red); font-weight: 600; }
.vc { text-align: right; font-variant-numeric: tabular-nums; color: var(--g500); }
.arrows .ar { stroke-width: 2; stroke-linecap: round; }
.arrows .ar.des { stroke: var(--ink); } .arrows .ar.con { stroke: var(--blue); } .arrows .ar.ghost { stroke: var(--g300); stroke-dasharray: 3 3; stroke-width: 1.5; }
.arrows .arc { fill: none; stroke: var(--g300); stroke-width: 1; }
.arrows .arl { font-size: 10px; fill: var(--g600); font-family: inherit; }
.arrows .arl.des { fill: var(--ink); font-weight: 600; } .arrows .arl.con { fill: var(--blue-600); font-weight: 600; } .arrows .arl.ghost { fill: var(--g400); }

/* 크게 보기 · 알림 */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(25,31,40,.92); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 86vw; max-height: 88vh; object-fit: contain; border-radius: 4px; }
.lbnav, .lbx { position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 22px; cursor: pointer; }
.lbnav:hover, .lbx:hover { background: rgba(255,255,255,.22); }
.lbnav.prev { left: 24px; } .lbnav.next { right: 24px; } .lbx { top: 20px; right: 24px; font-size: 20px; }
.lbcount { position: absolute; bottom: 20px; color: rgba(255,255,255,.7); font-size: 12px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; font-size: 13px; padding: 10px 16px; border-radius: var(--r); box-shadow: 0 8px 24px rgba(25,31,40,.2); }

.face.waiting { align-items: center; justify-content: center; color: var(--g500); font-size: 13px; background: linear-gradient(90deg, #fff, var(--g50), #fff); background-size: 200% 100%; animation: sh 1.6s infinite; }

.run-hint { font-size: 11px; color: var(--g500); line-height: 1.4; }

/* 방향 */
.dirbar { background: #fff; border: 1px solid var(--g200); border-radius: var(--r); padding: 12px 14px; margin-bottom: 16px; }
.dhead { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.dhead h4 { font-size: 14px; }
.dhead .muted { font-size: 12px; }
.dtabs { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.dtab { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 2px; min-width: 180px; max-width: 320px; padding: 8px 12px; border-radius: var(--r); border: 1px solid var(--g200); background: var(--g50); cursor: pointer; }
.dtab b { font-size: 13px; }
.dtab span { font-size: 12px; color: var(--g700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dtab em { font-style: normal; font-size: 11px; color: var(--g500); }
.dtab:hover { border-color: var(--g400); }
.dtab.on { background: #fff; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.dtab.add { align-items: center; justify-content: center; min-width: 120px; color: var(--g700); border-style: dashed; background: #fff; font-weight: 600; font-size: 13px; }
.dform { display: grid; grid-template-columns: 220px 1fr auto auto auto; gap: 8px; margin-top: 10px; }
.dform .input { height: 36px; padding: 0 10px; }
.btn.danger { color: var(--red); }
.dread { font-size: 12px; margin-top: 8px; }
.dircmp details { background: #fff; border: 1px solid var(--g200); border-radius: var(--r); padding: 10px 14px; margin: 12px 0; }
.dircmp summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.dircmp summary .muted { font-size: 12px; }
.clegend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; margin: 8px 0 6px; color: var(--g700); }
.clegend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 1px; }
.crow { display: grid; grid-template-columns: 140px 1fr 44px; align-items: center; gap: 10px; height: 26px; font-size: 12px; }
.crow .vtrack { position: relative; height: 4px; background: var(--g100); border-radius: 2px; }
.crow .tgt { position: absolute; top: -4px; width: 10px; height: 10px; margin-left: -5px; transform: rotate(45deg); border-radius: 1px; }
.crow .vn { text-align: right; color: var(--g600); font-variant-numeric: tabular-nums; }
.drow .nudge { display: inline-flex; gap: 2px; margin-left: 6px; }
.drow .nudge button { font: inherit; font-size: 12px; width: 20px; height: 20px; line-height: 18px; padding: 0; border: 1px solid var(--g200); background: #fff; border-radius: var(--r-chip); cursor: pointer; color: var(--g700); }
.drow .nudge button:hover { border-color: var(--g500); color: var(--ink); }

.dirbar.single { padding: 8px 14px; }
.dsingle { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.dsingle h4 { font-size: 13px; }
.dsingle .btn { margin-left: auto; }

/* ctxgit 가져오기 */
.idlg { border: 1px solid var(--g200); border-radius: var(--r); padding: 20px; width: min(720px, 92vw); box-shadow: 0 20px 60px rgba(25,31,40,.2); }
.idlg::backdrop { background: rgba(25,31,40,.3); }
.idlg h3 { font-size: 16px; margin-bottom: 6px; }
.idlg p { font-size: 12px; margin: 0 0 12px; }
.idlg .input { width: 100%; height: 36px; padding: 0 10px; margin-bottom: 10px; }
.imags { max-height: 46vh; overflow: auto; border: 1px solid var(--g100); border-radius: var(--r); padding: 6px 10px; margin-bottom: 10px; }
.imag { display: block; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--g100); cursor: pointer; }
.imag input { margin-right: 6px; }
.imag .muted { font-size: 12px; }
.ifoot { display: flex; justify-content: flex-end; gap: 8px; }
.msg.imported { max-width: 100%; }
.msg.imported summary { cursor: pointer; font-size: 13px; color: var(--g700); }
.msg.imported .imptext { white-space: pre-wrap; font-size: 12px; color: var(--g700); max-height: 360px; overflow: auto; margin-top: 8px; }

/* 방향마다 대화를 따로 — 공통 말 표식 · 공통 ↔ 이 방향 옮기기 · 새 방향 폼 */
.cmark { display: inline-block; font-size: 11px; font-weight: 500; padding: 1px 6px; border-radius: var(--r-chip, 4px); background: var(--blue-50, #eff6ff); color: var(--blue-600, #1d6fe0); margin: 0 6px 0 0; vertical-align: 1px; }
.pk .d .cmark { margin: 0 0 0 6px; }
.msg.user.common { background: #f3f8ff; }
.msg .scope { display: none; font: inherit; font-size: 11px; color: var(--g500); background: none; border: 0; padding: 0 0 0 8px; cursor: pointer; text-decoration: underline; }
.msg:hover .scope { display: inline; }
.msg .scope:hover { color: var(--g900); }
.tocommon { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--g700); margin-right: auto; cursor: pointer; }
.dform.new { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.dform.new textarea.input { height: auto; padding: 8px 10px; resize: vertical; font: inherit; font-size: 13px; line-height: 1.55; }
.dnew-l { display: flex; flex-direction: column; gap: 8px; }
.dmode { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.dmode .muted { font-size: 12px; }
.dform-foot { display: flex; gap: 8px; }
.dnew-r h5 { font-size: 13px; margin: 0 0 4px; }
.dnew-r p { font-size: 12px; margin: 0 0 8px; }
.dpromote { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; border: 1px solid var(--g200); border-radius: var(--r); padding: 8px; }
.dpromote label { display: flex; gap: 8px; font-size: 12px; line-height: 1.5; color: var(--g700); align-items: flex-start; }
@media (max-width: 900px) { .dform.new { grid-template-columns: 1fr; } }

/* 방향 띠는 따라다닌다 — 위 머리띠(52px) 바로 밑에 붙고, 붙으면 한 줄짜리(이름만)로 접힌다. 어디서든 방향을 바꾸고 더한다 */
#dirSentinel { height: 1px; margin-bottom: -1px; }
.dirbar { position: sticky; top: 52px; z-index: 25; transition: padding .12s; }
.dirbar.stuck { border-radius: 0 0 var(--r) var(--r); border-top-color: transparent; box-shadow: 0 6px 16px rgba(16,24,40,.08); padding: 6px 14px; max-height: calc(100vh - 64px); overflow: auto; }
.dirbar.stuck .dhead { display: none; }
.dirbar.stuck .dtabs { flex-wrap: nowrap; overflow-x: auto; gap: 6px; scrollbar-width: none; }
.dirbar.stuck .dtab { flex-direction: row; align-items: center; min-width: 0; max-width: none; padding: 5px 10px; white-space: nowrap; }
.dirbar.stuck .dtab span, .dirbar.stuck .dtab em { display: none; }
.dirbar.stuck .dtab.add { min-width: 0; font-size: 12px; }
.dirbar.stuck .dtab .live { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--blue, #167cff); margin-left: 6px; }
.dirbar.stuck .dsingle .muted { display: none; }
.dtab .live { display: none; }
.dirbar .dstuck-label { display: none; font-size: 12px; font-weight: 600; color: var(--g500); margin-right: 4px; align-self: center; white-space: nowrap; }
.dirbar.stuck .dstuck-label { display: inline; }

/* 답 모으기 — 고른 답이 보내지기 전까지 남는다 */
.opt.staged { box-shadow: 0 0 0 2px var(--blue-50, #eff6ff); }
.answerbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; padding: 8px 10px; border-radius: var(--r); background: var(--blue-50, #eff6ff); font-size: 12px; white-space: normal; }
.answerbar b { font-weight: 600; color: var(--g900); }
.answerbar .muted { font-size: 12px; margin-right: auto; }
/* 조건 — 이 방향 / 공통 */
.pkh { font-size: 12px; font-weight: 600; color: var(--g700); margin: 12px 0 6px; }
.pkh:first-child { margin-top: 0; }
.pkh .muted { font-weight: 400; font-size: 11px; }
.pk.common { opacity: .85; }
.dmark { display: inline-block; font-size: 10px; font-weight: 500; padding: 0 5px; border-radius: 4px; background: #fff7e6; color: #b45309; margin-left: 6px; vertical-align: 1px; }

/* Lens 에게 묻기 */
.asklens { background: #fff; border: 1px solid var(--g200); border-radius: var(--r); padding: 14px 16px; margin: 16px 0; }
.ask-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.ask-head h3 { font-size: 14px; font-weight: 600; }
.ask-head .muted { font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-thread { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow: auto; padding: 2px; }
.ask-empty { font-size: 13px; }
.amsg { max-width: 82%; white-space: pre-wrap; font-size: 14px; line-height: 1.65; }
.amsg .who { font-size: 11px; font-weight: 600; color: var(--g500); margin-bottom: 4px; }
.amsg.user { align-self: flex-end; background: var(--g100); padding: 10px 14px; border-radius: 12px 12px 4px 12px; }
.amsg .actx { font-size: 11px; color: var(--g500); margin-top: 4px; }
.ask-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.ask-form textarea { flex: 1; font: inherit; font-size: 14px; border: 1px solid var(--g200); border-radius: var(--r); padding: 10px 12px; resize: vertical; }

.aprop { margin-top: 10px; border: 1px solid var(--g200); border-radius: var(--r); padding: 10px 12px; background: #fff; white-space: normal; }
.aprop-h { font-size: 12px; font-weight: 600; color: var(--g700); margin-bottom: 4px; }
.aprop-t { font-size: 13px; color: var(--g900); white-space: pre-wrap; line-height: 1.6; }
.aprop-f { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.aprop-f .muted { font-size: 12px; }
.aprop-done { font-size: 12px; color: var(--g500); margin-top: 6px; }

/* 디렉터 대화 — Lens 에게 묻기에서 반영한 말 */
.msg.user.fromask { background: #f3f8ff; border: 1px solid #d6e6ff; max-width: 86%; }
.fa-h { font-size: 11px; font-weight: 600; color: var(--blue-600, #1d6fe0); margin-bottom: 4px; }
.fa-t { white-space: pre-wrap; }
.fa-log { margin-top: 8px; font-size: 12px; color: var(--g700); }
.fa-log summary { cursor: pointer; color: var(--g500); }
.fa-line { margin-top: 6px; white-space: pre-wrap; line-height: 1.55; }
.fa-line b { font-weight: 600; margin-right: 4px; color: var(--g900); }
#who { cursor: pointer; }
#login { text-decoration: none; }

/* 지면 관측 신뢰도 — 점수와 무관한 「Lens 가 얼마나 읽었나」 표식 */
.rel { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: var(--r-chip); text-decoration: none; }
.rel.r-low { background: var(--red-50); color: var(--red); }
.rel.r-mid { background: var(--amber-50); color: var(--amber); }
.rel.r-high { background: var(--g100); color: var(--g700); }
.explore { margin: 18px 0 8px; padding: 16px; border: 1px dashed var(--g300); border-radius: var(--r); background: #fff; }
.ex-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 12px; }
.ex-head h3 { margin: 0; font-size: 15px; }
.ex-head .muted { font-size: 12px; }
.ex-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.excard { border: 1px solid var(--g200); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.ex-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ex-top .h { font-weight: 700; color: var(--ink); text-decoration: none; }
.ex-why { margin: 2px 0 0; padding-left: 16px; font-size: 12px; color: var(--g700); }
.ex-why li { margin: 2px 0; }
.excard .acts { margin-top: auto; display: grid; gap: 6px; }
