/* ============ 토큰 ============ */
:root {
  --bg: #f4f5f7; --panel: #ffffff; --sunk: #f8f9fb;
  --line: #e4e7ec; --line-2: #d0d5dd;
  --ink: #101828; --ink-2: #344054; --ink-3: #667085; --muted: #98a2b3;
  --brand: #2f5bea; --brand-2: #2449c7; --brand-weak: #eef2fe; --brand-line: #c7d4fb;
  --ok: #067647; --ok-weak: #e7f6ee; --warn: #b54708; --warn-weak: #fef3e6; --danger: #c4320a; --danger-weak: #fef0ec;
  --cond: #6d3fd8; --cond-weak: #f3effd;
  --bar: #2a78d6;
  --r: 10px; --r-lg: 14px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .06);
  --sh-2: 0 6px 18px rgba(16, 24, 40, .08), 0 1px 3px rgba(16, 24, 40, .06);
  --sh-3: 0 18px 48px rgba(16, 24, 40, .18);
  --font: 'Pretendard', 'Pretendard Variable', -apple-system, 'Malgun Gothic', '맑은 고딕', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; word-break: keep-all; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
[v-cloak] { display: none; }
.muted { color: var(--ink-3); font-weight: 400; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.sp-flex { flex: 1; }
.lnk { color: var(--brand); cursor: pointer; font-weight: 600; }
.lnk:hover { text-decoration: underline; }
kbd { font: 600 11px/1 ui-monospace, Consolas, monospace; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; padding: 2px 4px; background: #fff; }

/* ============ 기본 컨트롤 ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; box-shadow: var(--sh-1); }
.btn:hover { background: var(--sunk); border-color: #b9c0cc; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, .ib:focus-visible, .lk:focus-visible, .ch:focus-visible, .slot:focus-visible { outline: 3px solid var(--brand-line); outline-offset: 1px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #a3290a; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn-ghost:hover { background: #eceef2; border-color: transparent; }
.btn-ghost.danger, .ib.danger:hover { color: var(--danger); }
.btn-dashed { border-style: dashed; box-shadow: none; background: transparent; color: var(--ink-3); width: 100%; }
.btn-dashed:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-weak); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.ib { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; border: 0; background: transparent; cursor: pointer; color: var(--ink-3); font-size: 14px; }
.ib:hover:not(:disabled) { background: #eceef2; color: var(--ink); }
.ib:disabled { opacity: .3; cursor: default; }

.inp { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.inp { height: auto; padding: 9px 12px; resize: vertical; line-height: 1.5; }
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
.inp:disabled { background: var(--sunk); }
.inp-sm { height: 32px; font-size: 13px; padding: 0 10px; }
select.inp { cursor: pointer; padding-right: 28px; 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' stroke='%23667085' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center; }

/* 토글 */
.tg { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 13px; user-select: none; }
.tg input { position: absolute; opacity: 0; pointer-events: none; }
.tg > span { position: relative; width: 34px; height: 20px; border-radius: 99px; background: #d0d5dd; transition: background .15s; flex: none; }
.tg > span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.tg input:checked + span { background: var(--brand); }
.tg input:checked + span::after { transform: translateX(14px); }
.tg input:focus-visible + span { outline: 3px solid var(--brand-line); }
.tg input:disabled + span { opacity: .4; }
.tg.sm { font-weight: 500; color: var(--ink-2); }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; background: #f2f4f7; color: var(--ink-2); font-size: 11.5px; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.b-req { background: var(--danger-weak); color: var(--danger); }
.b-cond { background: var(--cond-weak); color: var(--cond); }
.b-ok { background: var(--ok-weak); color: var(--ok); }
.b-warn { background: var(--warn-weak); color: var(--warn); }
.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700; border: 0; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.as-btn { cursor: pointer; height: 30px; }
.st-draft { background: #f2f4f7; color: var(--ink-3); }
.st-open { background: var(--ok-weak); color: var(--ok); }
.st-closed { background: #fdeceb; color: #b42318; }
.chip { height: 28px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--line-2); background: #fff; font-size: 12px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--cond); border-color: var(--cond); color: #fff; }

.seg { display: inline-flex; padding: 3px; background: #eef0f3; border-radius: 9px; gap: 2px; width: 100%; }
.seg button { flex: 1; height: 30px; border: 0; background: transparent; border-radius: 7px; font-weight: 600; font-size: 12.5px; cursor: pointer; color: var(--ink-3); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.seg-mini { display: inline-flex; gap: 2px; padding: 2px; background: #eef0f3; border-radius: 7px; }
.seg-mini button { height: 24px; padding: 0 9px; border: 0; background: transparent; border-radius: 5px; font-size: 12px; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.seg-mini button.on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }

.pop-wrap { position: relative; }
.pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-3); padding: 6px; }
.ed-top .pop { left: 0; right: auto; }
.pop-i { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 9px 12px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; text-align: left; }
.pop-i:hover { background: var(--sunk); }
.pop-i b { font-size: 13.5px; }
.pop-i span { font-size: 12px; color: var(--ink-3); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--sh-1); }
.card + .card { margin-top: 14px; }
.card h3 { font-size: 15px; margin-bottom: 12px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-h h3 { margin: 0; }
.card-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.hint { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.55; }
.hint.warn { color: var(--warn); }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.empty.big { padding: 80px 20px; font-size: 15px; line-height: 2; }

/* ============ 글로벌 네비 ============ */
.gnav { position: sticky; top: 0; z-index: 30; height: 52px; display: flex; align-items: center; gap: 20px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 15px; letter-spacing: -0.02em; }
.brand-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--brand); color: #fff; font-size: 14px; }
.gnav nav a { font-weight: 600; color: var(--ink-3); padding: 6px 10px; border-radius: 7px; }
.gnav nav a.on, .gnav nav a:hover { color: var(--ink); background: var(--sunk); }
.role-pill { font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-weak); padding: 4px 10px; border-radius: 99px; }

/* ============ 랜딩 ============ */
.landing { max-width: 1040px; min-height: calc(100svh - 52px); margin: 0 auto; padding: 40px 24px; display: flex; align-items: center; }
.land-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; width: 100%; }
.land-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; min-height: 340px; padding: 36px; border: 1px solid var(--brand-line); border-radius: 24px; background: var(--brand-weak); color: var(--brand); transition: transform .15s, box-shadow .15s; }
.land-card.user { background: var(--ok-weak); color: var(--ok); border-color: var(--line); }
a.land-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
a.land-card:focus-visible { outline: 3px solid currentColor; outline-offset: 5px; }
.lc-icon { font-size: 42px; line-height: 1; }
.land-card h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 800; letter-spacing: -.04em; }
.lc-arrow { font-size: 28px; }
.land-card.unavailable { opacity: .65; }
@media (max-width: 640px) {
  .landing { padding: 24px 20px; }
  .land-cards { grid-template-columns: 1fr; gap: 20px; }
  .land-card { min-height: 240px; gap: 18px; padding: 28px; }
}

/* ============ 관리자: 목록 ============ */
.ad-page { max-width: 1120px; margin: 0 auto; padding: 32px 20px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head.sm { align-items: flex-start; }
.page-h { font-size: 24px; }
.page-h2 { font-size: 19px; }
.page-sub { margin: 4px 0 0; color: var(--ink-3); }
.page-actions { display: flex; gap: 8px; }
.search { width: 220px; height: 36px; }
.sv-table { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); }
.sv-row { display: grid; grid-template-columns: minmax(220px, 1fr) 90px 60px 60px 80px auto; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); }
.sv-row:first-child { border-top: 0; }
.sv-th { background: var(--sunk); font-size: 12px; font-weight: 700; color: var(--ink-3); padding-top: 10px; padding-bottom: 10px; }
.sv-name { display: flex; flex-direction: column; }
.sv-name b { font-size: 15px; }
.sv-name:hover b { color: var(--brand); }
.sv-name span { font-size: 12px; color: var(--ink-3); }
.row-act { display: flex; gap: 4px; justify-content: flex-end; }

/* ============ 관리자: 편집기 ============ */
.editor { display: flex; flex-direction: column; height: calc(100vh - 52px); }
.ed-top { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.back { font-size: 18px; }
.title-inp { min-width: 120px; width: 340px; height: 36px; border: 1px solid transparent; border-radius: 8px; padding: 0 10px; font-size: 17px; font-weight: 700; background: transparent; outline: none; letter-spacing: -0.02em; }
.title-inp:hover { border-color: var(--line); }
.title-inp:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-weak); }
.saved { font-size: 12px; color: var(--ok); font-weight: 600; white-space: nowrap; }
.ed-tabs { display: flex; gap: 2px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ed-tabs button { position: relative; height: 44px; padding: 0 14px; border: 0; background: transparent; font-weight: 600; color: var(--ink-3); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.ed-tabs button:hover { color: var(--ink); }
.ed-tabs button.on { color: var(--brand); }
.ed-tabs button.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px; }
.tab-n { font-size: 11px; background: #eef0f3; color: var(--ink-2); padding: 1px 7px; border-radius: 99px; }
.ed-tabs button.on .tab-n { background: var(--brand-weak); color: var(--brand); }
.ed-body { flex: 1; min-height: 0; overflow: auto; }
.ed-body.tab-build { overflow: hidden; }
.ed-body:not(.tab-build) { padding: 24px 20px 60px; }

.build { display: grid; grid-template-columns: 248px minmax(0, 1fr) 340px; height: 100%; }

/* 목차 */
.outline { display: flex; flex-direction: column; min-height: 0; background: #fff; border-right: 1px solid var(--line); }
.ol-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 8px 16px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.ol-list { flex: 1; overflow: auto; padding: 0 8px 12px; }
.ol-sec { position: relative; border-radius: 8px; margin-bottom: 1px; }
.ol-sec.dragging { opacity: .4; }
.ol-sec.drop-before::before, .ol-sec.drop-after::after { content: ''; position: absolute; left: 6px; right: 6px; height: 2px; background: var(--brand); border-radius: 2px; }
.ol-sec.drop-before::before { top: -1px; } .ol-sec.drop-after::after { bottom: -1px; }
.ol-row { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.ol-row:hover { background: var(--sunk); }
.ol-sec.on > .ol-row { background: var(--brand-weak); color: var(--brand-2); }
.ol-grip { color: var(--muted); cursor: grab; font-size: 11px; letter-spacing: -2px; opacity: 0; }
.ol-row:hover .ol-grip { opacity: 1; }
.ol-roman { min-width: 26px; font-size: 11px; font-weight: 800; color: var(--ink-3); }
.ol-sec.on .ol-roman { color: var(--brand); }
.ol-name { flex: 1; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-cnt { font-size: 11px; color: var(--ink-3); background: #f2f4f7; border-radius: 99px; padding: 0 7px; }
.ol-qs { padding: 2px 0 6px 22px; }
.ol-q { display: flex; gap: 6px; width: 100%; border: 0; background: transparent; text-align: left; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--ink-2); }
.ol-q:hover { background: var(--sunk); }
.ol-q.on { background: #fff; color: var(--brand); box-shadow: inset 2px 0 0 var(--brand); }
.ol-qn { min-width: 20px; color: var(--muted); font-weight: 700; font-size: 11.5px; }
.ol-qt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ol-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }

/* 캔버스 */
.canvas { overflow: auto; min-height: 0; background: var(--bg); }
.canvas-in { max-width: 780px; margin: 0 auto; padding: 24px 24px 120px; }
.cv-sec { margin-bottom: 28px; scroll-margin-top: 16px; }
.cv-sec-head { position: relative; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--r-lg); padding: 16px 20px; cursor: pointer; box-shadow: var(--sh-1); }
.cv-sec-head:hover { border-color: var(--line-2); border-left-color: var(--brand); }
.cv-sec-head.on { box-shadow: 0 0 0 2px var(--brand), var(--sh-2); }
.cv-sec-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.cv-sec-head:hover .cv-sec-tools, .cv-sec-head.on .cv-sec-tools { opacity: 1; }
.cv-sec-title { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.cv-sec-desc { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.cv-qs { padding-top: 4px; }
.qcard { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 18px 16px; cursor: pointer; transition: border-color .12s, box-shadow .12s; scroll-margin-top: 80px; }
.qcard:hover { border-color: #b9c0cc; }
.qcard.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak), var(--sh-2); }
.qcard.dragging { opacity: .35; }
.qcard.cond { border-left: 3px solid var(--cond); }
.qcard.drop-before::before, .qcard.drop-after::after, .cv-empty.drop-before::before { content: ''; position: absolute; left: 0; right: 0; height: 3px; background: var(--brand); border-radius: 3px; }
.qcard.drop-before::before { top: -8px; } .qcard.drop-after::after { bottom: -8px; }
.qc-tools { position: absolute; top: 8px; right: 8px; display: flex; align-items: center; gap: 1px; background: #fff; border-radius: 8px; opacity: 0; transition: opacity .12s; z-index: 2; }
.qcard:hover .qc-tools, .qcard.on .qc-tools { opacity: 1; }
.grip { cursor: grab; padding: 4px 6px; color: var(--muted); font-size: 12px; letter-spacing: -2px; user-select: none; }
.grip:active { cursor: grabbing; }
.qc-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; padding-right: 150px; }
.cv-empty { position: relative; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); padding: 24px; text-align: center; color: var(--ink-3); font-size: 13px; margin: 8px 0; }
.ins-line { position: relative; height: 14px; display: flex; align-items: center; justify-content: center; }
.ins-line::before { content: ''; position: absolute; left: 20px; right: 20px; top: 50%; height: 1px; background: var(--brand); opacity: 0; transition: opacity .1s; }
.ins-line > .add-trigger:not(.btn) { position: relative; z-index: 3; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--brand); background: #fff; color: var(--brand); font-weight: 700; cursor: pointer; opacity: 0; transition: opacity .1s, transform .1s; line-height: 1; padding: 0; }
.ins-line:hover::before, .ins-line:hover > .add-trigger { opacity: 1; }
.ins-line > .add-trigger:hover { background: var(--brand); color: #fff; transform: scale(1.1); }
.ins-line.end { height: auto; margin-top: 12px; }
.add-pop { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); z-index: 20; width: 430px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-3); }
.add-pop button { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 8px; text-align: left; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; }
.add-pop button:hover { background: var(--brand-weak); }
.add-pop .ti { grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: #f2f4f7; font-size: 13px; }
.add-pop b { font-size: 13px; }
.add-pop small { font-size: 11.5px; color: var(--ink-3); }
.add-sec { height: 48px; border-radius: var(--r-lg); }

/* 속성 패널 */
.insp { display: flex; flex-direction: column; min-height: 0; background: #fff; border-left: 1px solid var(--line); }
.insp-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.insp-k { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.insp-t { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.insp-body { flex: 1; overflow: auto; padding: 14px 18px 40px; }
.fld { margin-bottom: 16px; }
.fld-l { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.fld-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.fld-row .fld-l { margin: 0; }
.fld-row.tight { margin: 10px 0 8px; }
.fld.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.type-grid button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.type-grid button:hover { border-color: var(--line-2); background: var(--sunk); }
.type-grid button.on { border-color: var(--brand); background: var(--brand-weak); color: var(--brand-2); }
.type-grid .ti { font-size: 15px; }
.scale-peek { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.scale-peek span { font-size: 11.5px; background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; color: var(--ink-2); }
.scale-peek b { margin-right: 4px; color: var(--brand); }
.opt-ed { margin-bottom: 16px; }
.opt-list { display: flex; flex-direction: column; gap: 6px; }
.opt { display: flex; align-items: flex-start; gap: 6px; }
.opt-n { flex: none; width: 20px; padding-top: 7px; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.opt-main { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.opt-desc { height: 28px; font-size: 12px; color: var(--ink-3); }
.opt-act { display: flex; padding-top: 2px; opacity: .35; }
.opt:hover .opt-act, .opt:focus-within .opt-act { opacity: 1; }
.opt-act .ib { width: 22px; height: 28px; font-size: 12.5px; }
.bulk-act { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.bulk-act .muted { flex: 1; font-size: 11.5px; }
.stepper { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 8px; padding: 3px; }
.stepper b { min-width: 36px; text-align: center; }
.cond { padding: 12px; margin: 0 -4px 12px; border-radius: 10px; background: var(--sunk); border: 1px solid var(--line); }
.cond .fld-row { margin-bottom: 0; }
.cond-box { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.cond-line { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.cond-vals { display: flex; flex-wrap: wrap; gap: 5px; }
.insp-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.kv { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.ov-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.ov-grid div { background: var(--sunk); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; }
.ov-grid b { font-size: 19px; letter-spacing: -0.02em; }
.ov-grid span { font-size: 11.5px; color: var(--ink-3); }
.type-bars div { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; border-bottom: 1px dashed var(--line); }
.issues { display: flex; flex-direction: column; gap: 4px; }
.issue { display: flex; gap: 8px; text-align: left; border: 1px solid #f7d7b8; background: var(--warn-weak); color: var(--warn); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; cursor: pointer; }
.issue b { flex: none; }
.tip { background: var(--brand-weak); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: var(--ink-2); }
.tip b { color: var(--brand-2); }
.tip ul { margin: 6px 0 0; padding-left: 16px; line-height: 1.85; }

/* 표지/척도/설정 */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; max-width: 1280px; margin: 0 auto; align-items: start; }
.split-preview { position: sticky; top: 0; }
.pv-label { font-size: 12px; font-weight: 700; color: var(--ink-3); margin-bottom: 8px; }
.pv-frame { background: #e9edf3; border-radius: 16px; padding: 18px; max-height: calc(100vh - 210px); overflow: auto; }
.list-ed { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.li { display: flex; gap: 8px; align-items: flex-start; }
.li-n { flex: none; width: 22px; height: 22px; margin-top: 8px; border-radius: 50%; background: var(--sunk); border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.li-act { display: flex; flex-direction: column; }
.li-act .ib { width: 24px; height: 22px; font-size: 12px; }
.narrow { max-width: 820px; margin: 0 auto; }
.inp-title { font-weight: 700; font-size: 15px; max-width: 320px; }
.scale-ed { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.sp { display: flex; align-items: center; gap: 6px; }
.sp-n { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--brand-weak); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.scale-demo { margin-top: 16px; padding: 14px; background: var(--sunk); border-radius: 12px; border: 1px dashed var(--line-2); }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-cards label { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio-cards label.on { border-color: var(--brand); background: var(--brand-weak); }
.radio-cards input { position: absolute; opacity: 0; }
.radio-cards span { font-size: 12.5px; color: var(--ink-3); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.set-row:first-of-type { border-top: 0; }
.set-row > span:first-child { display: flex; flex-direction: column; }
.set-row small { color: var(--ink-3); font-size: 12.5px; }

/* 결과 */
.results { max-width: 1040px; margin: 0 auto; }
.res-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.res-filter, .res-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.res-filter .fld-l { margin: 0; }
.res-filter select { width: auto; max-width: 260px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; box-shadow: var(--sh-1); }
.kpi > span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.kpi b { font-size: 26px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.kpi small { font-size: 14px; color: var(--ink-3); font-weight: 600; }
.kpi em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.chart-card { margin-bottom: 14px; }
.area-chart { padding: 4px 0; }
.ac-axis, .ac-row { display: grid; grid-template-columns: 190px 1fr 52px; align-items: center; gap: 12px; }
.ac-axis { height: 18px; margin-bottom: 2px; }
.ac-ticks { position: relative; height: 100%; margin-right: 56px; }
.ac-ticks i { position: absolute; transform: translateX(-50%); font-style: normal; font-size: 11px; color: var(--muted); }
.ac-row { height: 34px; border-radius: 6px; }
.ac-row:hover { background: var(--sunk); }
.ac-l { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 6px; }
.ac-l b { display: inline-block; min-width: 34px; color: var(--ink-3); font-size: 11.5px; }
.ac-track { position: relative; height: 18px; margin-right: 56px; }
.ac-grid { position: absolute; top: -8px; bottom: -8px; width: 1px; background: var(--line); }
.ac-bar { position: absolute; top: 2px; left: 0; height: 14px; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 2px; }
.ac-v { position: absolute; top: 0; margin-left: 8px; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 18px; }
.tag-hi, .tag-lo { font-style: normal; font-size: 10.5px; font-weight: 700; margin-left: 5px; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink-2); background: #fff; }
.ac-p { font-size: 12.5px; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; padding-right: 6px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.tbl th { font-size: 12px; color: var(--ink-3); background: var(--sunk); }
.tbl .num { text-align: right; }
.lk-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 14px; position: sticky; top: -24px; z-index: 4; }
.lk-legend .fld-l { margin: 0 6px 0 0; }
.lk-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.lk-key i { width: 12px; height: 12px; border-radius: 3px; }
.res-sec { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 10px; overflow: hidden; }
.res-sec-h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 18px; border: 0; background: transparent; cursor: pointer; text-align: left; font-size: 14.5px; }
.res-sec-h:hover { background: var(--sunk); }
.chev { margin-left: auto; color: var(--ink-3); }
.res-items { border-top: 1px solid var(--line); }
.ri { padding: 14px 18px; border-top: 1px solid var(--line); }
.ri:first-child { border-top: 0; }
.ri-h { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.ri-t { flex: 1; font-size: 13.5px; font-weight: 600; }
.ri-n { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ri-lk { display: grid; grid-template-columns: 1fr 96px; gap: 14px; align-items: center; }
.stack { display: flex; gap: 2px; height: 26px; }
.seg-b { display: grid; place-items: center; min-width: 3px; font-size: 11px; font-weight: 700; color: var(--ink); overflow: hidden; cursor: default; }
.seg-b:first-child { border-radius: 4px 0 0 4px; } .seg-b:last-child { border-radius: 0 4px 4px 0; }
.seg-b span.dark { color: #fff; }
.ri-stat { display: flex; flex-direction: column; align-items: flex-end; }
.ri-stat b { font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ri-stat span { font-size: 11.5px; color: var(--ink-3); }
.ri-bars { display: flex; flex-direction: column; gap: 6px; }
.hb { display: grid; grid-template-columns: minmax(140px, 300px) 1fr 104px; gap: 12px; align-items: center; font-size: 12.5px; }
.hb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.hb-track { height: 14px; }
.hb-bar { height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 2px; }
.hb-v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
.others { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; font-size: 12px; }
.others span { background: var(--sunk); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.ri-texts { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.txt { width: 100%; background: var(--sunk); border-left: 3px solid var(--line-2); border-radius: 0 8px 8px 0; padding: 8px 12px; font-size: 13px; }

/* ============ 공통 문항 (응답자 + 미리보기) ============ */
.qf { position: relative; }
.qf-head { display: flex; gap: 10px; align-items: flex-start; }
.qf-num { flex: none; min-width: 28px; height: 24px; padding: 0 7px; border-radius: 7px; background: var(--brand-weak); color: var(--brand-2); font-size: 12.5px; font-weight: 800; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.qf-title { font-size: 15.5px; font-weight: 600; line-height: 1.55; padding-top: 1px; letter-spacing: -0.01em; }
.qf-req { color: var(--danger); margin-left: 3px; }
.qf-help { margin: 4px 0 0 38px; font-size: 13px; color: var(--ink-3); }
.qf-err { margin-top: 8px; font-size: 12.5px; color: var(--danger); font-weight: 600; }
.qf-err::before { content: '! '; }
.qf > .likert, .qf > .choices, .qf > div > .choices, .qf > .inp, .qf > .ta-wrap, .qf .rank-slots, .qf .pick-meta, .qf > .other-inp { margin-left: 38px; width: calc(100% - 38px); }
.qf-notice { display: flex; gap: 10px; padding: 12px 14px; background: #f6f3ea; border-radius: 10px; border: 1px solid #ebe3cc; }
.qf-notice-mark { color: #9a6b00; font-weight: 800; }
.qf-notice-t { font-weight: 700; }
.qf-notice-h { font-size: 13px; color: #7a5a12; }

.likert { display: grid; grid-template-columns: repeat(var(--k), minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.lk { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 8px; min-height: 62px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; cursor: pointer; transition: background .1s, border-color .1s, transform .08s; }
.lk:hover { border-color: var(--brand); background: var(--brand-weak); }
.lk:active { transform: scale(.97); }
.lk-n { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.lk-l { font-size: 11px; line-height: 1.3; color: var(--ink-3); text-align: center; }
.lk.on { background: var(--brand); border-color: var(--brand); box-shadow: 0 4px 12px rgba(47, 91, 234, .3); }
.lk.on .lk-n, .lk.on .lk-l { color: #fff; }

.lk-ends { display: none; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.legend + .rs-qs { border-top: 0; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 12px; }
.choices.vertical { grid-template-columns: 1fr; }
.ch { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; transition: background .1s, border-color .1s; }
.ch:hover { border-color: var(--brand); }
.ch.on { border-color: var(--brand); background: var(--brand-weak); }
.ch.off { opacity: .45; }
.ch-dot { flex: none; width: 18px; height: 18px; margin-top: 1px; border: 1.5px solid #98a2b3; background: #fff; position: relative; }
.ch-dot.radio { border-radius: 50%; }
.ch-dot.check { border-radius: 5px; }
.ch.on .ch-dot { border-color: var(--brand); background: var(--brand); }
.ch.on .ch-dot.radio::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }
.ch.on .ch-dot.check::after { content: ''; position: absolute; left: 5px; top: 1.5px; width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ch-body { display: flex; flex-direction: column; min-width: 0; }
.ch-l { font-size: 14px; font-weight: 500; }
.ch-d { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.ch-rank { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px dashed #98a2b3; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.ch.on .ch-rank { background: var(--brand); border: 0; color: #fff; }
.pick-meta { margin-top: 10px; font-size: 12px; color: var(--brand-2); font-weight: 700; }
.rank-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; margin-top: 12px; }
.slot { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1.5px dashed var(--line-2); border-radius: 10px; background: var(--sunk); cursor: default; text-align: left; min-width: 0; }
.slot.filled { border-style: solid; border-color: var(--brand); background: #fff; cursor: pointer; }
.slot-n { flex: none; font-size: 11.5px; font-weight: 800; color: var(--brand); }
.slot-v { flex: 1; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot.filled .slot-v { color: var(--ink); font-weight: 600; }
.slot-x { color: var(--muted); }
.qf .inp { margin-top: 12px; }
.ta-wrap { position: relative; }
.ta { min-height: 110px; }
.ta-count { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: var(--muted); }
.other-inp { margin-top: 8px !important; }
.qf.has-error .lk, .qf.has-error .ch, .qf.has-error .slot, .qf.has-error .inp { border-color: #f3a891; }
.qf.is-disabled .likert, .qf.is-disabled .choices, .qf.is-disabled .rank-slots, .qf.is-disabled .inp, .qf.is-disabled .ta-wrap { pointer-events: none; }
.qcard .qf-title { font-size: 14.5px; }
.qcard .lk { min-height: 50px; padding: 6px 4px; }
.qcard .ch { padding: 8px 12px; }

/* ============ 응답자 화면 ============ */
.rs { min-height: 100vh; background: #eef1f6; padding-bottom: 60px; }
.preview-bar { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 7px 12px; background: #1d2939; color: #fff; font-size: 12.5px; }
.preview-bar { height: 40px; flex-wrap: nowrap; white-space: nowrap; }
.preview-bar .btn { height: 26px; color: var(--ink); }
@media (max-width: 640px) { .pv-note { display: none; } .mini-sel { max-width: 150px; } }
.mini-sel { height: 26px; border-radius: 6px; border: 0; padding: 0 6px; font-size: 12px; color: var(--ink); max-width: 220px; }
.rs-top { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.rs.preview .rs-top { top: 40px; }
.rs-top-in { max-width: 760px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.rs-title { font-weight: 800; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-prog { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 120px; }
.rs-prog-bar { flex: 1; height: 6px; border-radius: 99px; background: #e4e7ec; overflow: hidden; }
.rs-prog-bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .3s; }
.rs-prog-t { font-size: 12.5px; font-weight: 700; color: var(--brand-2); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.rs-main { max-width: 760px; margin: 0 auto; padding: 24px 20px 0; }
.rs-step { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 10px; }
.rs-sec { margin-bottom: 26px; }
.sec-head { background: #fff; border-radius: 16px 16px 0 0; border: 1px solid var(--line); border-bottom: 0; padding: 22px 24px 18px; }
.sec-kicker { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.sec-roman { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 800; }
.sec-title { font-size: 22px; margin-top: 6px; letter-spacing: -0.03em; }
.sec-desc { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.legend { position: sticky; top: 52px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 24px; background: #f8f9fc; border: 1px solid var(--line); border-top: 1px dashed var(--line); font-size: 12px; color: var(--ink-2); }
.rs.preview .legend { top: 92px; }
.legend-k { font-weight: 800; color: var(--ink); margin-right: 2px; }
.legend-i b { color: var(--brand); margin-right: 3px; }
.rs-qs { background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; }
.sec-head + .rs-qs { border-top: 1px solid var(--line); }
.rs-qs .qf { padding: 20px 24px; border-top: 1px solid #eef0f3; scroll-margin-top: 140px; }
.rs-qs .qf:first-child { border-top: 0; }
.rs-qs .qf.has-error { background: #fffaf8; box-shadow: inset 3px 0 0 var(--danger); }
.rs-qs .qf-notice { margin: 0; }
.rs-qs .qf.qf-notice, .rs-qs .qf:has(.qf-notice) { padding-top: 14px; padding-bottom: 6px; }
.rs-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.rs-nav .btn { flex: 1; max-width: 220px; }
.rs-nav .btn-primary { margin-left: auto; }
.rs-save { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 14px; }
.qa-enter-active, .qa-leave-active { transition: opacity .25s, transform .25s; }
.qa-enter-from, .qa-leave-to { opacity: 0; transform: translateY(-6px); }
.rs-end { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 56px 24px; text-align: center; margin-top: 40px; }
.end-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-weak); color: var(--ok); font-size: 30px; font-weight: 800; }
.end-icon.muted { background: #f2f4f7; color: var(--ink-3); }
.rs-end h2 { font-size: 21px; }
.rs-end p { color: var(--ink-3); margin: 8px 0 20px; }

/* 표지 */
.cover { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--sh-1); }
.cover-band { padding: 34px 30px 28px; background: linear-gradient(135deg, #2449c7 0%, #2f5bea 55%, #4f7bf3 100%); color: #fff; }
.cover-org { font-size: 13px; font-weight: 700; opacity: .85; }
.cover-h { font-size: 30px; margin-top: 6px; letter-spacing: -0.035em; }
.cover-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.cover-meta span { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.18); }
.cover-body { padding: 26px 30px 30px; }
.cover-sec { font-size: 15px; margin: 0 0 10px; }
.cover-list { margin: 0 0 22px; padding-left: 18px; color: var(--ink-2); line-height: 1.75; font-size: 14px; }
.cover-list li + li { margin-top: 6px; }
.cover-facts { display: grid; gap: 8px; padding: 14px 16px; border-radius: 12px; background: var(--sunk); border: 1px solid var(--line); margin-bottom: 22px; }
.cover-facts div { display: flex; gap: 12px; font-size: 13.5px; }
.cover-facts .k { flex: none; width: 64px; font-weight: 700; color: var(--ink-3); }
.cover-guide { margin: 0; padding: 0; list-style: none; counter-reset: g; }
.cover-guide li { position: relative; padding: 8px 0 8px 34px; color: var(--ink-2); font-size: 14px; line-height: 1.65; border-top: 1px dashed var(--line); }
.cover-guide li:first-child { border-top: 0; }
.cover-guide li::before { counter-increment: g; content: counter(g); position: absolute; left: 0; top: 9px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-weak); color: var(--brand); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.cover-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 26px; flex-wrap: wrap; }
.cover.compact .cover-band { padding: 24px 22px 20px; }
.cover.compact .cover-h { font-size: 24px; }
.cover.compact .cover-body { padding: 20px 22px 22px; }
.cover.compact .cover-actions { pointer-events: none; }

/* 모달 · 토스트 · 툴팁 */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(16, 24, 40, .45); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.dialog { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 22px; box-shadow: var(--sh-3); }
.dialog h3 { font-size: 17px; }
.dialog p { margin: 8px 0 0; color: var(--ink-2); line-height: 1.6; }
.dialog-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.phone { width: 410px; max-width: 100%; height: min(860px, 94vh); background: #101828; border-radius: 34px; padding: 10px; display: flex; flex-direction: column; box-shadow: var(--sh-3); }
.phone-bar { display: flex; align-items: center; justify-content: space-between; color: #fff; font-size: 12px; padding: 2px 10px 8px 16px; }
.phone-bar .ib { color: #fff; }
.phone-bar .ib:hover { background: rgba(255,255,255,.12); color: #fff; }
.phone iframe { flex: 1; width: 100%; border: 0; border-radius: 26px; background: #fff; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1d2939; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 600; box-shadow: var(--sh-3); animation: up .2s; max-width: 90vw; }
.toast.warn { background: #b54708; }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }
.tooltip { position: fixed; z-index: 130; pointer-events: none; background: #1d2939; color: #fff; font-size: 12px; line-height: 1.5; padding: 7px 10px; border-radius: 8px; white-space: pre-line; max-width: 240px; box-shadow: var(--sh-2); }

/* ============ 반응형 ============ */
@media (max-width: 1180px) {
  .build { grid-template-columns: 210px minmax(0, 1fr) 310px; }
  .title-inp { width: 220px; }
}
@media (max-width: 980px) {
  .build { grid-template-columns: minmax(0, 1fr) 300px; }
  .outline { display: none; }
  .split { grid-template-columns: 1fr; }
  .split-preview { position: static; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .ed-top .saved, .ed-top .btn:not(.btn-primary) { display: none; }
  .sv-row { grid-template-columns: 1fr auto; }
  .sv-row > :nth-child(3), .sv-row > :nth-child(4), .sv-row > :nth-child(5) { display: none; }
  .sv-th { display: none; }
  .row-act { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .build { grid-template-columns: 1fr; }
  .insp { display: none; }
  .land-cards { grid-template-columns: 1fr; }
  .ac-axis, .ac-row { grid-template-columns: 110px 1fr 40px; gap: 8px; }
  .hb { grid-template-columns: 110px 1fr 84px; }
  .radio-cards { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rs-main { padding: 14px 12px 0; }
  .rs-top-in { padding: 8px 14px; }
  .rs-title { max-width: 42%; font-size: 13.5px; }
  .sec-head { padding: 18px 16px 14px; }
  .sec-title { font-size: 19px; }
  .legend { padding: 8px 16px; font-size: 11.5px; gap: 2px 10px; top: 46px; }
  .rs-qs .qf { padding: 18px 16px; }
  .qf-title { font-size: 15px; }
  .qf > .likert, .qf > .choices, .qf > div > .choices, .qf > .inp, .qf > .ta-wrap, .qf .rank-slots, .qf .pick-meta, .qf > .other-inp { margin-left: 0; width: 100%; }
  .qf-help { margin-left: 0; margin-top: 6px; }
  .likert { gap: 4px; }
  .lk { min-height: 48px; padding: 8px 2px; justify-content: center; }
  .lk-l { display: none; }
  .lk-ends { display: flex; }
  .choices { grid-template-columns: 1fr; }
  .cover-band { padding: 26px 20px 22px; }
  .cover-h { font-size: 25px; }
  .cover-body { padding: 20px; }
  .cover-actions .btn { flex: 1; }
  .rs-nav .btn { max-width: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
}
