/* HashSites UI — 단일 스타일시트 */
:root {
  color-scheme: dark;
  /* 배경 단계: bg(페이지) < surface(카드) < surface-2(입력·호버) < surface-3(강조) */
  --bg: #0a0d14; --surface: #10141d; --surface-2: #161b26; --surface-3: #1d2331;
  /* 글자: 모두 surface 위 WCAG AA 이상 (ink 15:1, ink-2 9:1, muted 5:1) */
  --ink: #edf0f6; --ink-2: #b3bbcb; --muted: #8189a0; --line: #222938; --line-2: #2d3547;
  --brand: #3d66ff; --brand-600: #5a7dff; --brand-soft: rgba(76, 116, 255, .14); --brand-ink: #fff; --brand-text: #93aaff;
  --ok: #3ddc97; --ok-soft: rgba(61, 220, 151, .12); --warn: #fbbf4d; --warn-soft: rgba(251, 191, 77, .12); --err: #ff6b6b; --err-soft: rgba(255, 107, 107, .12);
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .55);
  --font: "Pretendard Variable", Pretendard, "Pretendard JP Variable", "Hiragino Sans", "Yu Gothic UI", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html:lang(ja) body { word-break: normal; line-break: strict; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: radial-gradient(1100px 520px at 50% -180px, rgba(61, 102, 255, .10), transparent 70%) no-repeat, var(--bg); min-height: 100dvh; font-size: 15px; line-height: 1.55; word-break: keep-all; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.25; }
p { margin: 0; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* ── 버튼 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; background: var(--surface); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset, 0 6px 20px rgba(61, 102, 255, .28); }
.btn-primary:hover { background: var(--brand-600); }
.btn-outline { border-color: var(--line-2); background: var(--surface-2); color: var(--ink); }
.btn-outline:hover { background: var(--surface-3); border-color: #3a4459; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: #e5484d; color: #fff; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 9px; }
.btn-block { width: 100%; }
.btn .ic { width: 18px; height: 18px; }

/* ── 입력 ── */
.field { display: block; }
.field > span, .label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, .textarea, .select { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(61, 102, 255, .2); }
.help { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--err); font-size: 13px; }

/* ── 배지 / 상태 ── */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.live { background: var(--ok-soft); color: var(--ok); }
.pill.draft { background: var(--warn-soft); color: var(--warn); }
.pill.building { background: var(--brand-soft); color: var(--brand-text); }
.pill.building::before { animation: pulse 1.2s infinite; }
.pill.error { background: var(--err-soft); color: var(--err); }
.pill.plain::before { display: none; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--brand-soft); color: var(--brand-text); }
@keyframes pulse { 50% { opacity: .2; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; flex: none; }

/* ── 카드 ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card a[style*="--brand"], a.link { color: var(--brand-text); }
.card-pad { padding: 24px; }
.card h3 { font-size: 16px; }

/* ── 앱 상단바 ── */
.topbar { position: sticky; top: 0; z-index: 30; height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 20px; background: rgba(10, 13, 20, .72); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #2f5bff, #7b61ff); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.topnav { display: flex; gap: 4px; margin-left: 12px; }
.topnav a { padding: 8px 12px; border-radius: 8px; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.topnav a:hover, .topnav a.on { background: var(--surface-2); color: var(--ink); }

.menu { position: relative; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 50; }
.menu.open .menu-panel { display: block; }
.menu-panel a, .menu-panel button { display: flex; width: 100%; padding: 9px 12px; border-radius: 8px; border: 0; background: none; text-align: left; font-size: 14px; cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); }
.menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

.page { max-width: 1160px; margin: 0 auto; padding: 32px 20px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }
.page-head p { color: var(--muted); margin-top: 4px; }

/* 사이트 하위 탭 */
.subnav { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 28px; overflow-x: auto; }
.subnav a { padding: 12px 14px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subnav a.on { color: var(--ink); border-color: var(--brand); }
.subnav .count { margin-left: 4px; background: var(--err); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; }

/* 토스트 / 메시지 */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(92vw, 440px); }
.toast { background: var(--surface-3); color: var(--ink); border: 1px solid var(--line-2); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 14px; animation: toast-in .2s ease-out; }
.toast.error { background: #3a1518; border-color: #6b2227; color: #ffd6d6; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ── 대시보드 ── */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.site-card { overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.site-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--line-2); }
.thumb { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; border-bottom: 1px solid var(--line); }
.thumb iframe { position: absolute; top: 0; left: 0; width: 400%; height: 400%; transform: scale(.25); transform-origin: 0 0; border: 0; pointer-events: none; background: #fff; opacity: 0; transition: opacity .45s ease; }
.thumb iframe.loaded { opacity: 1; }
.thumb { background: linear-gradient(90deg, #131823 0, #1a2030 50%, #131823 100%); background-size: 800px 100%; animation: shimmer 1.6s infinite linear; }
.thumb:has(iframe.loaded) { animation: none; }
.thumb .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.site-card .body { padding: 16px 18px 18px; display: grid; gap: 10px; }
.site-card .meta { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.site-card .meta b { color: var(--ink); font-weight: 700; }
.new-card { border: 1.5px dashed var(--line-2); background: transparent; box-shadow: none; display: grid; place-items: center; min-height: 280px; color: var(--ink-2); font-weight: 600; text-align: center; gap: 8px; }
.new-card:hover { border-color: var(--brand); color: var(--brand-text); background: var(--brand-soft); }
.new-card .plus { width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 24px; margin: 0 auto 8px; }

/* ── 제작 마법사 ── */
.wizard { max-width: 860px; margin: 0 auto; padding: 32px 20px 120px; }
.steps { display: flex; gap: 8px; margin-bottom: 32px; }
.steps .s { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.steps .s.on { background: linear-gradient(90deg, #3d66ff, #7b61ff); }
.wizard h1 { font-size: 28px; margin-bottom: 8px; }
.wizard .lead { color: var(--ink-2); margin-bottom: 28px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.choice-grid.big { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .box { height: 100%; padding: 18px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color .15s, box-shadow .15s, background .15s; }
.choice:hover .box { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.choice input:checked + .box { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(61, 102, 255, .18); }
.choice input:focus-visible + .box { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice .emoji { font-size: 24px; line-height: 1; margin-bottom: 10px; }
.choice .t { font-weight: 700; }
.choice .d { color: var(--muted); font-size: 13px; margin-top: 4px; }
.choice .badge { position: absolute; top: 12px; right: 12px; }
.choice-big .box { padding: 24px; }
.choice-big .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); font-size: 22px; margin-bottom: 14px; }
.swatch { width: 100%; height: 44px; border-radius: 10px; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: 14px; cursor: pointer; transition: all .15s; user-select: none; }
.chip:hover { border-color: #46506a; color: var(--ink); }
.chip input { display: none; }
.chip:has(input:checked) { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.dropzone { display: grid; place-items: center; gap: 6px; padding: 28px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: var(--surface); text-align: center; color: var(--ink-2); cursor: pointer; transition: all .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); }
.dropzone input { display: none; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.thumbs img, .thumbs video { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.wizard-foot { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(10, 13, 20, .82); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 14px 20px; z-index: 20; }
.wizard-foot .inner { max-width: 860px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.step-panel { display: none; animation: fade .25s ease-out; }
.step-panel.on { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
.section-title { font-size: 15px; font-weight: 700; margin: 28px 0 12px; }

/* ── 스튜디오 ── */
.studio { height: 100dvh; display: grid; grid-template-rows: 56px 1fr; background: var(--bg); }
.studio-bar { display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); min-width: 0; }
.studio-bar .title { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.studio-bar .sep { width: 1px; height: 20px; background: var(--line); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 10px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 10px; border-radius: 8px; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.seg button.on { background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow-sm); }
.studio-main { display: grid; grid-template-columns: minmax(0, var(--chat-w, 420px)) auto minmax(0, 1fr); min-height: 0; }
.chat { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); }
.chat-scroll { flex: 1; overflow-y: auto; padding: 20px 18px 8px; scroll-behavior: smooth; }
.msg-user { margin-left: 36px; background: linear-gradient(135deg, #2c4fe0, #3d66ff); color: #fff; box-shadow: 0 6px 18px rgba(61, 102, 255, .22); padding: 12px 14px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; font-size: 14px; }
.msg-user .sel { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12px; background: rgba(255, 255, 255, .14); padding: 3px 8px; border-radius: 6px; }
.msg-meta { font-size: 11.5px; color: var(--muted); text-align: right; margin: 4px 2px 14px; }
.msg-ai { display: grid; grid-template-columns: 28px 1fr; gap: 10px; margin-bottom: 22px; }
.msg-ai .av { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #2f5bff, #7b61ff); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.msg-ai .content { min-width: 0; }
.steps-log { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
.steps-log summary { list-style: none; cursor: pointer; padding: 10px 12px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; background: var(--surface-2); color: var(--ink-2); }
.steps-log summary::-webkit-details-marker { display: none; }
.steps-log summary .chev { margin-left: auto; transition: transform .2s; color: var(--muted); }
.steps-log[open] summary .chev { transform: rotate(180deg); }
.steps-log ol { list-style: none; margin: 0; padding: 8px 12px 10px; display: grid; gap: 6px; max-height: 260px; overflow-y: auto; }
.steps-log li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; font-size: 12.5px; color: var(--ink-2); align-items: start; }
.steps-log li .k { font-size: 12px; text-align: center; opacity: .8; }
.steps-log li.text { color: var(--ink); }
.ai-summary { font-size: 14px; white-space: pre-wrap; line-height: 1.6; }
.ai-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.ai-error { background: var(--err-soft); color: var(--err); padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.working { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--brand-text); font-weight: 600; margin: 4px 0 10px; }
.composer { border-top: 1px solid var(--line); padding: 12px 14px 14px; background: var(--surface); }
.suggest { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.suggest::-webkit-scrollbar { display: none; }
.suggest button { flex: none; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.suggest button:hover { border-color: var(--brand); color: var(--brand-text); }
.compose-box { border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--surface-2); transition: border-color .15s, box-shadow .15s; }
.compose-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(61, 102, 255, .16); }
.compose-box textarea { width: 100%; border: 0; resize: none; padding: 12px 14px 4px; min-height: 52px; max-height: 200px; background: transparent; line-height: 1.5; outline: none; }
.compose-tools { display: flex; align-items: center; gap: 4px; padding: 6px 8px 8px; }
.attach-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; }
.attach { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 28px; padding: 0 6px 0 10px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-text); font-size: 12.5px; font-weight: 600; }
.attach span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.attach button { border: 0; background: none; color: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 5px; }
.attach button:hover { background: rgba(76, 116, 255, .22); }
.quota { font-size: 12px; color: var(--muted); margin-top: 8px; display: flex; justify-content: space-between; }
.quota a { color: var(--brand-text); font-weight: 600; }
.tool-btn.on { background: var(--brand-soft); color: var(--brand-text); }

.stage { display: grid; grid-template-rows: 48px 1fr; min-height: 0; min-width: 0; }
.stage-bar { display: flex; align-items: center; gap: 8px; padding: 0 14px; }
.urlbar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; font-size: 13px; color: var(--ink-2); }
.urlbar select { border: 0; background: transparent; color: var(--ink); font-size: 13px; min-width: 0; flex: 1; cursor: pointer; outline: none; }
.canvas { position: relative; padding: 0 14px 14px; min-height: 0; display: flex; justify-content: center; }
.frame { position: relative; width: 100%; height: 100%; background: #fff; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; transition: width .3s ease, border-radius .3s; border: 1px solid var(--line); }
.frame.tablet { width: 820px; max-width: 100%; }
.frame.mobile { width: 390px; max-width: 100%; border-radius: 30px; border: 8px solid #262d3d; box-shadow: 0 0 0 1px #3a4357, var(--shadow-lg); }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.frame-overlay { position: absolute; inset: 0; background: rgba(10, 13, 20, .78); backdrop-filter: blur(6px); display: grid; place-items: center; text-align: center; padding: 24px; }
.frame-overlay .box { max-width: 360px; }
.frame-overlay h3 { font-size: 18px; margin: 16px 0 6px; }
.frame-overlay .last { font-size: 13px; color: var(--ink-2); min-height: 20px; }
.orb { width: 64px; height: 64px; margin: 0 auto; border-radius: 20px; background: linear-gradient(135deg, #2f5bff, #7b61ff); display: grid; place-items: center; color: #fff; font-size: 28px; font-weight: 800; box-shadow: 0 12px 40px rgba(47, 91, 255, .35); animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.skeleton { position: absolute; inset: 0; padding: 40px; display: grid; gap: 18px; align-content: start; background: var(--surface); }
.skeleton i { display: block; border-radius: 10px; background: linear-gradient(90deg, #161b26 0, #1f2533 50%, #161b26 100%); background-size: 800px 100%; animation: shimmer 1.4s infinite linear; }
.pick-hint { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 13px; box-shadow: var(--shadow-lg); z-index: 5; }
.version-panel { position: absolute; top: 0; right: 14px; width: 340px; max-height: calc(100% - 14px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 6; }
.version-panel header { position: sticky; top: 0; background: var(--surface); padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.v-item { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.v-item.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.v-item .v-sum { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mobile-tabs { display: none; }

/* 모달 */
.modal-bg { position: fixed; inset: 0; background: rgba(14, 19, 33, .45); z-index: 80; display: none; place-items: center; padding: 16px; }
.modal-bg.open { display: grid; }
.modal { width: min(100%, 480px); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 24px; animation: fade .2s; }
.modal h3 { font-size: 18px; margin-bottom: 6px; }

/* ── 통계 ── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { padding: 18px 20px; }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); }
.chart { position: relative; height: 220px; display: flex; align-items: flex-end; gap: 3px; padding-top: 16px; border-bottom: 1px solid var(--line); }
.chart .bar { flex: 1; position: relative; height: 100%; display: flex; align-items: flex-end; cursor: default; }
.chart .bar i { display: block; width: 100%; min-height: 2px; background: var(--brand); border-radius: 4px 4px 0 0; opacity: .85; transition: opacity .15s; }
.chart .bar:hover i { opacity: 1; }
.chart .bar.zero i { background: var(--line-2); }
.chart-grid { position: absolute; inset: 16px 0 0 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; }
.chart-grid span { border-top: 1px dashed var(--line); font-size: 11px; color: var(--muted); padding-left: 2px; }
.chart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.tip { position: fixed; pointer-events: none; background: var(--surface-3); color: var(--ink); border: 1px solid var(--line-2); font-size: 12px; padding: 8px 10px; border-radius: 8px; z-index: 90; display: none; white-space: nowrap; box-shadow: var(--shadow-lg); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.barlist { display: grid; gap: 8px; }
.barlist .it { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; overflow: hidden; }
.barlist .it .fill { position: absolute; inset: 0 auto 0 0; background: rgba(76, 116, 255, .2); z-index: 0; border-radius: 8px; }
.barlist .it > span { position: relative; z-index: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barlist .it b { position: relative; z-index: 1; font-variant-numeric: tabular-nums; }

/* 표 */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr.unread td { background: rgba(76, 116, 255, .05); }
.table tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.table-wrap { overflow-x: auto; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; white-space: pre-wrap; }
.empty-state { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty-state .ico { font-size: 36px; margin-bottom: 8px; }
.empty-state h3 { color: var(--ink); margin-bottom: 6px; }

/* 설정 */
.settings-list { display: grid; gap: 16px; }
.settings-list .card { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.settings-list h3 { margin-bottom: 4px; }
.dns { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.danger-zone { border-color: rgba(255, 107, 107, .3); }

/* 요금제 */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.plan { position: relative; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.plan.popular { border: 1.5px solid var(--brand); background: linear-gradient(180deg, rgba(61, 102, 255, .10), var(--surface) 55%); box-shadow: 0 16px 48px rgba(61, 102, 255, .18); }
.plan .pop { position: absolute; top: -12px; left: 24px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan .price { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; align-content: start; font-size: 14px; color: var(--ink-2); flex: 1; }
.plan li { display: flex; gap: 8px; }
.plan li::before { content: "✓"; color: var(--brand-text); font-weight: 800; }
.plan.current { background: var(--surface-2); }
.usage-bar { height: 8px; background: var(--surface-2); border-radius: 8px; overflow: hidden; margin-top: 10px; }
.usage-bar i { display: block; height: 100%; background: var(--brand); border-radius: 8px; }

/* 인증 */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 500px at 80% -10%, rgba(61, 102, 255, .22) 0, transparent 60%), radial-gradient(700px 400px at 0% 110%, rgba(123, 97, 255, .12) 0, transparent 60%), var(--bg); }
.auth .card { width: min(100%, 420px); padding: 32px; }
.auth h1 { font-size: 24px; margin: 20px 0 6px; }
.auth form { display: grid; gap: 14px; margin-top: 24px; }
.checkbox { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.checkbox input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); }
.auth .card { background: rgba(16, 20, 29, .88); backdrop-filter: blur(12px); box-shadow: var(--shadow-lg); }

/* ── 반응형 ── */
@media (max-width: 1024px) {
  .studio-main { --chat-w: 360px; }
  .studio-bar .hide-md { display: none; }
}
@media (max-width: 760px) {
  .topnav { display: none; }
  .form-grid, .two-col { grid-template-columns: 1fr; }
  .settings-list .card { grid-template-columns: 1fr; gap: 12px; }
  .studio { grid-template-rows: 56px 44px 1fr; }
  .studio-main { grid-template-columns: 1fr; }
  .studio-main > .chat, .studio-main > .stage { display: none; }
  .studio-main > .on { display: flex; }
  .studio-main > .stage.on { display: grid; }
  .mobile-tabs { display: flex; background: var(--surface); border-bottom: 1px solid var(--line); }
  .mobile-tabs button { flex: 1; border: 0; background: none; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
  .mobile-tabs button.on { color: var(--ink); border-color: var(--brand); }
  .studio-bar .hide-sm { display: none; }
  .stage-bar .seg { display: none; }
  .version-panel { left: 14px; width: auto; }
  .page-head h1 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* 사업자 정보 footer */

/* ── 스플래시: 세션 첫 랜딩에서 1회 (hashclips 와 동일한 방식) ──
   페이지를 막는 게이트가 아니라 이미 렌더된 페이지 위의 오버레이.
   <html class="splash"> 는 첫 페인트 전 인라인 스크립트가 붙임 → 재방문자는 깜빡임 없음 */
.hs-splash { display: none; }
html.splash .hs-splash {
  display: grid; position: fixed; inset: 0; z-index: 200; place-items: center; background: #0b0f1c; color: #fff;
  animation: hs-splash-out .55s cubic-bezier(.4, 0, .2, 1) 2.15s forwards;
}
html.splash body { overflow: hidden; }
.hs-splash-glow { position: absolute; width: min(80vw, 460px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 91, 255, .38) 0%, rgba(123, 97, 255, .16) 42%, transparent 70%);
  animation: hs-glow 1.5s cubic-bezier(.16, 1, .3, 1) both; }
.hs-splash-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 0 32px; text-align: center; }
.hs-splash-mark { width: 76px; height: 76px; border-radius: 22px; background: linear-gradient(135deg, #2f5bff, #7b61ff); display: grid; place-items: center;
  font-size: 40px; font-weight: 800; box-shadow: 0 18px 50px rgba(47, 91, 255, .45); animation: hs-mark .6s cubic-bezier(.16, 1, .3, 1) .05s both; }
.hs-splash-word { font-size: clamp(30px, 5vw, 36px); font-weight: 800; letter-spacing: -.03em; animation: hs-rise .55s cubic-bezier(.16, 1, .3, 1) .28s both; }
.hs-splash-tag { max-width: 22rem; font-size: 14px; line-height: 1.6; color: #aab3c8; word-break: keep-all; animation: hs-rise .55s cubic-bezier(.16, 1, .3, 1) .46s both; }
.hs-splash-foot { position: absolute; bottom: max(2rem, env(safe-area-inset-bottom)); max-width: 26rem; padding: 0 32px; text-align: center;
  font-size: 11px; line-height: 1.6; color: #7a8298; word-break: keep-all; animation: hs-fade .6s ease .62s both; }
@keyframes hs-splash-out { to { opacity: 0; transform: scale(1.045); visibility: hidden; } }
@keyframes hs-glow { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes hs-mark { from { opacity: 0; transform: scale(.78) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes hs-rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes hs-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── 다크 테마 보정 ── */
::selection { background: rgba(76, 116, 255, .35); color: #fff; }
select option { background: var(--surface-2); color: var(--ink); }
input::placeholder, textarea::placeholder { color: #626b80; }
* { scrollbar-width: thin; scrollbar-color: #2d3547 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a3142; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #3a4357; }
.chat, .studio-bar, .version-panel, .modal, .menu-panel { background: var(--surface); }
.stage { background: radial-gradient(900px 500px at 70% 0%, rgba(61, 102, 255, .06), transparent 70%); }
.version-panel header { background: var(--surface); }
.modal-bg { background: rgba(3, 5, 10, .7); backdrop-filter: blur(4px); }
.choice input:checked + .box .t { color: var(--ink); }
.kpi .v { background: linear-gradient(180deg, #fff, #c7cfe0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.empty-state .ico { filter: grayscale(.2); }

/* 언어 전환: 국기 토글 */
.lang-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.lang-toggle a { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 700;
  color: var(--muted); letter-spacing: .02em; transition: background .15s, color .15s; }
.lang-toggle a img { width: 20px; height: 14px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); object-fit: cover; opacity: .7; transition: opacity .15s; }
.lang-toggle a:hover { color: var(--ink); background: var(--surface-3); }
.lang-toggle a:hover img, .lang-toggle a.on img { opacity: 1; }
.lang-toggle a.on { background: var(--surface-3); color: var(--ink); box-shadow: var(--shadow-sm); }
.lang-toggle.cf-lang { margin-top: 14px; }
.l-nav .lang-toggle { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
@media (max-width: 760px) { .lang-toggle a span { display: none; } .lang-toggle a { padding: 0 7px; } }

/* 토글 스위치 */
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-ui { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .2s, border-color .2s; }
.toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #8189a0; transition: transform .2s, background .2s; }
.toggle input:checked + .toggle-ui { background: var(--brand); border-color: var(--brand); }
.toggle input:checked + .toggle-ui::after { transform: translateX(18px); background: #fff; }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--brand-text); outline-offset: 2px; }

/* ── 요금·크레딧 ── */
.link { color: var(--brand-text); font-weight: 600; }
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 14px; }
.usage-big { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.usage-big small { font-size: 14px; color: var(--muted); font-weight: 600; }
.how-credits { margin-bottom: 36px; }
.how-credits summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.how-credits summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; }
.how-credits[open] summary::after { content: "–"; }
.how-grid { display: grid; gap: 12px; margin-top: 14px; color: var(--ink-2); font-size: 14px; }
.how-grid ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.how-grid li { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.how-grid li b { color: var(--brand-text); margin-right: 6px; font-variant-numeric: tabular-nums; }
.bill-sec { margin-bottom: 40px; }
.bill-sec > h2, .bill-sec > .row h2 { font-size: 20px; margin-bottom: 6px; }
.bill-sec > p.muted { margin-bottom: 16px; }
.bill-sec .plans { margin-top: 16px; }
.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.pack { position: relative; padding: 22px; display: grid; gap: 6px; }
.pack.popular { border: 1.5px solid var(--brand); background: linear-gradient(180deg, rgba(61, 102, 255, .10), var(--surface) 60%); }
.pack .pop { position: absolute; top: -11px; left: 20px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.pack-n { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.pack-n small { font-size: 14px; color: var(--muted); font-weight: 600; }
.pack-price { font-size: 18px; font-weight: 700; }
.pack .btn { margin-top: 8px; }
.human-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.human { display: flex; flex-direction: column; gap: 8px; }
.human .h-ic { font-size: 24px; }
.human p { flex: 1; }
.h-price { font-size: 18px; font-weight: 800; margin: 4px 0 6px; }
.h-price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.h-feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.h-feat li::before { content: "✓ "; color: var(--brand-text); font-weight: 800; }
.hours-list { display: grid; gap: 8px; flex: 1; align-content: start; }
.hours-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.choice .box.plan { padding: 24px; }
.credit-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-text); font-size: 13px; font-weight: 700; white-space: nowrap; }
.credit-pill:hover { background: rgba(76, 116, 255, .22); }
.addons { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 18px; }
.addon { padding: 20px; }
.addon h4 { font-size: 15px; margin-bottom: 4px; }
.addon .a-price { font-size: 17px; font-weight: 800; margin: 8px 0 4px; }
.addon p { color: var(--ink-2); font-size: 13.5px; }
@media (max-width: 760px) { .credit-pill span { display: none; } }

/* 고정 하단 바(위저드 등)와 상담 버튼이 겹치지 않게 */
body:has(.wizard-foot) .sw { bottom: calc(84px + env(safe-area-inset-bottom)); }
body:has(.wizard-foot) .sw-fab { width: 52px; height: 52px; }

/* ── 고객 상담 위젯 ── */
.sw { position: fixed; right: 20px; bottom: 20px; z-index: 150; font-size: 14px; }
.sw-fab { position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; display: grid; place-items: center;
  background: linear-gradient(135deg, #3d66ff, #7b61ff); box-shadow: 0 10px 30px rgba(61, 102, 255, .45), 0 0 0 4px rgba(61, 102, 255, .12); transition: transform .2s; overflow: visible; }
.sw-fab:hover { transform: translateY(-2px) scale(1.03); }
.sw-fab-x { display: none; }
.sw.is-open .sw-fab .sw-fab-ic { display: none; }
.sw.is-open .sw-fab .sw-fab-x { display: block; }
.sw-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--err); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.sw-panel { position: absolute; right: 0; bottom: 74px; width: 380px; height: min(620px, calc(100dvh - 110px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: fade .2s; }
.sw-panel[hidden] { display: none; }
.sw-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: linear-gradient(135deg, rgba(61, 102, 255, .22), rgba(123, 97, 255, .12)); border-bottom: 1px solid var(--line); }
.sw-av { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #3d66ff, #7b61ff); display: grid; place-items: center; font-weight: 800; color: #fff; overflow: hidden; }
.sw-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; background: #1d2a55; }
.sw-av::after { content: ""; position: absolute; right: 1px; bottom: 1px; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--surface); }
.sw-sub { font-size: 12px; color: var(--ink-2); }
.sw-x { border: 0; background: none; color: var(--ink-2); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; }
.sw-x:hover { background: var(--surface-3); }
.sw-body { flex: 1; overflow-y: auto; padding: 16px 14px; display: grid; gap: 12px; align-content: start; }
.sw-msg { display: grid; gap: 3px; max-width: 86%; }
.sw-msg time { font-size: 11px; color: var(--muted); }
.sw-who { font-size: 11px; color: var(--muted); font-weight: 600; }
.sw-bubble { padding: 10px 13px; border-radius: 14px; line-height: 1.55; word-break: break-word; }
.sw-bubble a { color: var(--brand-text); text-decoration: underline; }
.sw-msg.ai .sw-bubble, .sw-msg.staff .sw-bubble { background: var(--surface-2); border: 1px solid var(--line); border-top-left-radius: 4px; }
.sw-msg.staff .sw-bubble { border-color: rgba(61, 220, 151, .35); }
.sw-msg.user { justify-self: end; justify-items: end; }
.sw-msg.user .sw-bubble { background: linear-gradient(135deg, #2c4fe0, #3d66ff); color: #fff; border-top-right-radius: 4px; }
.sw-msg.user .sw-bubble a { color: #fff; }
.sw-msg.system { max-width: 100%; justify-self: center; text-align: center; font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.sw-dots { display: inline-flex; gap: 4px; padding: 13px 14px; }
.sw-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: swdot 1s infinite; }
.sw-dots i:nth-child(2) { animation-delay: .15s; } .sw-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes swdot { 50% { opacity: .25; transform: translateY(-3px); } }
.sw-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.sw-chips button { border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2); border-radius: 999px; height: 30px; padding: 0 12px; font-size: 12.5px; cursor: pointer; }
.sw-chips button:hover { border-color: var(--brand); color: var(--brand-text); }
.sw-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); }
.sw-form textarea { flex: 1; resize: none; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); border-radius: 12px; padding: 10px 12px; max-height: 120px; line-height: 1.45; outline: none; }
.sw-form textarea:focus { border-color: var(--brand); }
.sw-send { flex: none; width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; }
.sw-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 12px 10px; font-size: 11.5px; color: var(--muted); }
.sw-foot button { border: 0; background: none; color: var(--brand-text); font-weight: 700; cursor: pointer; font-size: 12.5px; padding: 4px 0; }
.sw-email { padding: 12px; border-top: 1px solid var(--line); background: var(--surface-2); display: grid; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.sw-email .input { min-height: 36px; padding: 6px 10px; }
@media (max-width: 520px) {
  .sw { right: 14px; bottom: 14px; }
  .sw-panel { position: fixed; inset: 0; width: auto; height: 100dvh; border-radius: 0; bottom: 0; }
  .sw.is-open .sw-fab { display: none; }
}

/* ── 모바일 최적화 ── */
.lang-toggle, .credit-pill, .topbar .btn, .l-nav .btn, .brand-mark { flex: none; }
/* 대화창 너비는 사용자가 드래그로 조절 (기본 420px, 저장됨) */
.studio-main { grid-template-columns: minmax(0, var(--chat-w, 420px)) auto minmax(0, 1fr); }
.pane-resizer { position: relative; width: 7px; cursor: col-resize; background: var(--surface); border-right: 1px solid var(--line);
  display: grid; place-items: center; touch-action: none; user-select: none; }
.pane-resizer span { width: 3px; height: 34px; border-radius: 3px; background: var(--line-2); transition: background .15s, height .15s; }
.pane-resizer:hover span, .pane-resizer:focus-visible span, .studio-main.resizing .pane-resizer span { background: var(--brand); height: 56px; }
.pane-resizer:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.studio-main.resizing { cursor: col-resize; }
.studio-main.resizing iframe { pointer-events: none; }   /* 드래그 중 미리보기가 마우스를 먹지 않게 */
.chat, .chat-scroll, .composer { min-width: 0; }
@media (max-width: 1024px) { .studio-main { --chat-w: 360px; } }
@media (max-width: 760px) {
  .studio-main { grid-template-columns: minmax(0, 1fr); }
  .pane-resizer { display: none; }
  .topbar { gap: 10px; padding: 0 14px; }
  .an__sep { display: none; }
  body:has(.composer) .sw { bottom: calc(236px + env(safe-area-inset-bottom)); }
  body:has(.composer) .sw-fab { width: 48px; height: 48px; }
  body:has(.composer) .sw-panel { bottom: 62px; }
}
@media (max-width: 520px) {
  .lang-toggle { padding: 2px; }
  .lang-toggle a { height: 26px; padding: 0 5px; }
  .lang-toggle a img { width: 18px; height: 13px; }
  .l-nav .in { gap: 10px; padding: 0 14px; }
  .hide-xs { display: none; }
  .topbar .btn-sm { padding: 0 11px; }
  body:has(.composer) .sw { bottom: calc(236px + env(safe-area-inset-bottom)); }
}
@media (max-width: 440px) {
  .brand-word { display: none; }
}
@media (max-width: 760px) { .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; } .table-wrap .table { min-width: 560px; } }

/* ── 새 사이트 위저드 리디자인 ── */
.wizard { max-width: 1040px; min-height: calc(100dvh - 60px); padding: clamp(28px, 5vh, 56px) 20px 132px; display: grid; align-content: start; }
/* 노트북처럼 화면이 짧을 때만 세로 가운데 정렬 (세로로 긴 창에서 위가 텅 비지 않게) */
@media (min-width: 900px) and (max-height: 1000px) { .wizard { align-content: safe center; } }
.wizard::before { content: ""; position: fixed; inset: 60px 0 auto 0; height: 420px; pointer-events: none; z-index: -1;
  background: radial-gradient(760px 320px at 50% 0%, rgba(61, 102, 255, .16), transparent 70%); }
.wizard h1 { font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -.03em; }
.wizard .lead { font-size: 15.5px; margin-bottom: 30px; }

/* 단계 표시: 번호 + 이름 */
.steps { list-style: none; display: flex; align-items: center; gap: 10px; margin: 0 0 30px; padding: 0; }
.steps .s { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; color: var(--muted); font-size: 13.5px; font-weight: 600;
  padding-bottom: 12px; border-bottom: 2px solid var(--line); transition: color .25s, border-color .25s; }
.steps .s i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  font-size: 12.5px; font-weight: 800; background: var(--surface-3); color: var(--muted); transition: background .25s, color .25s, box-shadow .25s; }
.steps .s span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps .s.on { color: var(--ink); border-color: var(--brand); }
.steps .s.on i { background: linear-gradient(135deg, #3d66ff, #7b61ff); color: #fff; box-shadow: 0 4px 14px -4px rgba(61, 102, 255, .8); }

/* 시작 방식 카드 */
.choice-grid.big { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.choice-big .box { padding: 22px 20px 24px; border-radius: 18px; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 60%), var(--surface); }
.choice-big:hover .box { transform: translateY(-2px); box-shadow: 0 16px 34px -22px #000; }
.choice-big .box { transition: transform .18s cubic-bezier(.16, 1, .3, 1), border-color .18s, box-shadow .18s, background .18s; }
.choice-big .icon { width: 46px; height: 46px; border-radius: 14px; font-size: 21px; margin-bottom: 16px;
  background: linear-gradient(135deg, var(--ic-a, #39415a), var(--ic-b, #2a3242)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.choice-big[data-accent="green"] .icon { background: linear-gradient(135deg, rgba(61, 220, 151, .22), rgba(61, 220, 151, .07)); }
.choice-big[data-accent="blue"] .icon { background: linear-gradient(135deg, rgba(61, 102, 255, .28), rgba(61, 102, 255, .08)); }
.choice-big[data-accent="amber"] .icon { background: linear-gradient(135deg, rgba(255, 184, 77, .24), rgba(255, 184, 77, .07)); }
.choice-big[data-accent="violet"] .icon { background: linear-gradient(135deg, rgba(123, 97, 255, .28), rgba(123, 97, 255, .08)); }
.choice-big .t { font-size: 15.5px; letter-spacing: -.01em; }
.choice-big .d { font-size: 13px; line-height: 1.6; margin-top: 6px; color: var(--muted); }
.choice-big input:checked + .box { background: linear-gradient(180deg, rgba(61, 102, 255, .16), rgba(61, 102, 255, .05)); }
.choice-big input:checked + .box::after { content: "✓"; position: absolute; top: 16px; right: 16px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: var(--brand); box-shadow: 0 4px 12px -3px rgba(61, 102, 255, .9); }
.choice-big:has(.badge) input:checked + .box::after { top: auto; bottom: 16px; }

/* 전문가에게 맡기기 */
.dfy-card { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 18px 20px; border-radius: 18px;
  border: 1px solid var(--line); background: linear-gradient(100deg, rgba(123, 97, 255, .12), rgba(61, 102, 255, .06) 55%, transparent);
  transition: border-color .18s, transform .18s, box-shadow .18s; }
.dfy-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: 0 16px 34px -24px #000; }
.dfy-ic { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: var(--surface-3); }
.dfy-t { display: grid; gap: 3px; flex: 1; min-width: 0; }
.dfy-go { color: var(--brand-text); font-weight: 700; transition: transform .18s; }
.dfy-card:hover .dfy-go { transform: translateX(3px); }

/* 입력 단계 */
.wizard .section-title { font-size: 14px; letter-spacing: .01em; color: var(--ink-2); margin-top: 30px; }
.wizard .textarea, .wizard .input, .wizard .select { border-radius: 12px; }
#freeform { min-height: 190px; line-height: 1.7; padding: 16px 18px; font-size: 15px; }
#ff-count { font-variant-numeric: tabular-nums; }
.dropzone { border-radius: 16px; padding: 32px 20px; }
.wizard-foot .inner { max-width: 1040px; }
@media (max-width: 1080px) { .choice-grid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .choice-grid.big { grid-template-columns: minmax(0, 1fr); }
  .wizard { padding: 28px 16px 124px; }
  .steps .s span { display: none; }
  .steps .s { flex: 1; justify-content: center; }
}

/* ── 전용 서버 선택 ── */
.srv-quiz { margin-bottom: 14px; }
.srv-qs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; }
.srv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.srv { position: relative; display: block; cursor: pointer; }
.srv input { position: absolute; opacity: 0; pointer-events: none; }
.srv-box { display: grid; gap: 4px; height: 100%; padding: 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface);
  transition: border-color .15s, background .15s, transform .15s; }
.srv:hover .srv-box { border-color: var(--line-2); transform: translateY(-1px); }
.srv input:checked + .srv-box { border-color: var(--brand); background: linear-gradient(180deg, rgba(61, 102, 255, .14), rgba(61, 102, 255, .04)); }
.srv-head { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.srv-head b { font-size: 14.5px; }
.srv-price { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.srv-price small { font-size: 12px; color: var(--muted); font-weight: 600; }
.srv-spec { line-height: 1.5; }
.srv-fit { color: var(--ink-2); line-height: 1.5; }
.srv-rec { display: none; }
.srv.is-rec .srv-rec { display: inline-block; background: var(--ok-soft, rgba(61, 220, 151, .16)); color: var(--ok, #3ddc97); }
.srv.is-rec .srv-box { border-color: rgba(61, 220, 151, .5); }
.srv.is-rec input:checked + .srv-box { border-color: var(--brand); }
.srv-locked { cursor: not-allowed; }
.srv-locked .srv-box { opacity: .5; }
.srv-lock { color: var(--warn, #ffb84d); }
.srv-grid.compact .srv-fit { display: none; }
.srv-grid.compact .srv-box { padding: 12px 14px; }
.srv-foot { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.srv-foot .help { flex: 1; min-width: 220px; }

/* ── 약관·정책 페이지 ── */
.legal { max-width: 860px; }
.legal h2 { font-size: 19px; margin: 34px 0 10px; letter-spacing: -.02em; }
.legal h3 { font-size: 15.5px; margin: 22px 0 8px; color: var(--ink); }
.legal p { color: var(--ink-2); line-height: 1.8; margin-bottom: 10px; word-break: keep-all; }
.legal ul.b, .legal ol.b { color: var(--ink-2); line-height: 1.8; padding-left: 20px; margin: 4px 0 12px; }
.legal ul.b li, .legal ol.b li { margin: 5px 0; }
.legal .table { margin: 10px 0 14px; }
.legal .table td, .legal .table th { vertical-align: top; line-height: 1.7; }
.legal .table tr.total td { border-top: 1.5px solid var(--line-2); font-size: 15px; }
.legal .table td.n, .legal .table th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.legal-toc { background: var(--surface-2); margin-bottom: 26px; }
.legal-toc ul { margin: 8px 0 0; }
.legal-end { margin-top: 40px; background: var(--surface-2); display: grid; gap: 14px; color: var(--ink-2); line-height: 1.8; }
.legal-links { display: flex; gap: 14px; flex-wrap: wrap; }
.cancel-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cancel-opts .card { position: relative; display: flex; flex-direction: column; gap: 8px; }
.cancel-opts .card h3 { font-size: 16px; }
.cancel-opts .tag { position: absolute; top: 16px; right: 16px; }
.cancel-opts .btn { margin-top: auto; }
@media (max-width: 760px) { .cancel-opts { grid-template-columns: 1fr; } .cf-legal { justify-content: flex-start; } }

/* 푸터 사업자정보 — 기본은 접어두고 필요할 때만 펼침 */

/* 이메일 인증 안내 배너 */
.verify-bar { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 16px; background: linear-gradient(90deg, rgba(255,184,77,.16), rgba(255,184,77,.08));
  border-bottom: 1px solid rgba(255,184,77,.25); font-size: 13.5px; color: var(--ink-2); }
.verify-bar b { color: var(--ink); }
.verify-bar .link { background: none; border: 0; color: var(--brand-text); font-weight: 700; cursor: pointer; font-size: 13.5px; }
.verify-bar form { display: inline; }

/* 요금제 상세 비교표 */
.compare-box { margin-bottom: 28px; }
.compare-box summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.compare-box summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; }
.compare-box[open] summary::after { content: "–"; }
.compare-box .table-wrap { margin-top: 14px; }
.table.compare td, .table.compare th { padding: 9px 12px; font-size: 13.5px; }
.table.compare th.c, .table.compare td.c { text-align: center; white-space: nowrap; }
.table.compare .yes { color: var(--ok); font-weight: 800; }
.table.compare .no { color: var(--muted); }
.table.compare tbody tr:hover { background: var(--surface-2); }
.callout-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
  background: linear-gradient(90deg, rgba(255,184,77,.12), transparent); border-color: rgba(255,184,77,.3); }

/* ── 푸터 (hashclips 형태) ── */
.site-footer { background: #07090f; border-top: 1px solid var(--line); color: #8d95a8; padding: 56px 20px 48px; font-size: 14px; }
.site-footer .in { max-width: 1160px; margin: 0 auto; }
.site-footer a { color: #b9c0cf; }
.site-footer a:hover { color: #fff; }

.ft-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 28px 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); margin-bottom: 44px; }
.ft-cta-k { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.ft-cta h3 { font-size: 21px; line-height: 1.45; color: #fff; letter-spacing: -.02em; }
.ft-cta-btns { display: flex; flex-direction: column; gap: 10px; align-items: stretch; min-width: 260px; }
.ft-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; padding: 0 22px;
  border-radius: 999px; font-weight: 700; font-size: 14px; transition: transform .15s, filter .15s; }
.ft-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.ft-btn.primary { background: linear-gradient(135deg, #3d66ff, #7b61ff); color: #fff !important; }
.ft-cta-btns .row2 { display: flex; gap: 10px; }
.ft-btn.tg { background: #2aabee; color: #fff !important; flex: 1; }
.ft-btn.kakao { background: #fee500; color: #111 !important; flex: 1; }

.ft-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr); gap: 28px; }
.ft-col { display: grid; gap: 11px; align-content: start; }
.ft-col h4 { font-size: 13.5px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.ft-col a { font-size: 13.5px; }
/* 법정 표시항목 6가지를 모두 노출하되, 줄간격과 색을 낮춰 시각적 비중은 작게 둡니다.
   (심사역은 읽을 수 있고, 일반 방문자의 눈은 위쪽 링크에 머물도록) */
.ft-biz { text-align: right; line-height: 1.75; }
.ft-biz-name { color: #fff; font-weight: 700; margin-bottom: 6px; }
/* 색은 배경(#07090f) 대비 4.5:1 이상을 지킵니다. 법정 표시항목이 읽기 어려울 만큼
   흐리면 '표시했다'는 근거가 약해지므로, 여기서는 더 흐리게 만들지 않습니다. */
.ft-biz-line { font-size: 12px; color: #7a8298; word-break: keep-all; }   /* 5.19:1 */
.ft-biz-line a { color: #7a8298; }
.ft-biz-line a:hover { color: #c9cfdb; }
.ft-copy { font-size: 12px; color: #737b91; margin-top: 12px; }           /* 4.71:1 */

.ft-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; }
.ft-social { display: flex; gap: 9px; }
.sc { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2);
  color: #b9c0cf; transition: transform .15s, background .15s, color .15s; }
.sc:hover { transform: translateY(-2px); color: #fff; }
.sc.ig:hover { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }
.sc.yt:hover { background: #ff0000; }
.sc.nv:hover { background: #03c75a; }
.sc:hover:not(.ig):not(.yt):not(.nv) { background: #1f2636; }
.ft-lang { background: var(--surface-2) !important; }
@media (max-width: 900px) {
  .ft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; }
  .ft-biz { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 560px) {
  .site-footer { padding: 40px 16px calc(80px + env(safe-area-inset-bottom)); }
  .ft-cta { padding: 22px; }
  .ft-cta-btns { min-width: 100%; }
  .ft-grid { grid-template-columns: 1fr; }
}

/* 로그인 후 화면의 푸터는 한 단계 작게 */
.site-footer.app-footer { padding: 40px 20px 44px; }
.site-footer.app-footer .ft-cta { display: none; }
.faq-list { display: grid; gap: 8px; margin: 12px 0 16px; }
.faq-list summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-list summary::after { content: "+"; color: var(--muted); }
.faq-list details[open] summary::after { content: "–"; }

/* ── 페이지 넘김 (FAQ 등) ── */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 22px; }
.pg-nums { display: flex; gap: 6px; }
.pg-arrow, .pg-num { min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s; }
.pg-arrow { font-size: 18px; line-height: 1; }
.pg-arrow:hover:not(:disabled), .pg-num:hover { border-color: var(--line-2); color: var(--ink); }
.pg-arrow:disabled { opacity: .35; cursor: default; }
.pg-num.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pg-arrow:focus-visible, .pg-num:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 480px) { .pg-arrow, .pg-num { min-width: 42px; height: 42px; } }

/* ── 스크롤 진행바 ── */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none;
  opacity: 0; transition: opacity .25s; }
.scroll-progress.on { opacity: 1; }
.scroll-progress i { display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%;
  background: linear-gradient(90deg, #3d66ff, #7b61ff 60%, #9d8bff);
  box-shadow: 0 0 12px rgba(61, 102, 255, .55); will-change: transform; }
@media (max-width: 760px) { .scroll-progress { height: 3px; } }
@media (prefers-reduced-motion: reduce) { .scroll-progress i { transition: none; } }

.menu [data-menu]:hover .avatar, .menu-panel:hover ~ [data-menu] .avatar { color: var(--ink); }

/* ── 계정 아바타 ── */
.menu [data-menu] { padding: 0; width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #cbd2e2;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)), var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), 0 1px 2px rgba(0, 0, 0, .3);
  transition: color .18s, box-shadow .18s, transform .18s, background .18s; }
.menu [data-menu]:hover .avatar {
  color: #fff; transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(76, 116, 255, .28), rgba(123, 97, 255, .16)), var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(124, 150, 255, .55), 0 6px 16px -6px rgba(61, 102, 255, .8); }
.menu.open .avatar {
  color: #fff;
  background: linear-gradient(180deg, rgba(76, 116, 255, .34), rgba(123, 97, 255, .2)), var(--surface-2);
  box-shadow: inset 0 0 0 1px rgba(124, 150, 255, .7), 0 0 0 3px rgba(61, 102, 255, .16); }
.menu [data-menu]:focus-visible .avatar { box-shadow: inset 0 0 0 1px rgba(124, 150, 255, .7), 0 0 0 3px rgba(61, 102, 255, .35); }
.avatar svg { width: 20px; height: 20px; }

/* ── 문의 유형 선택 ── */
.inquiry { max-width: 940px; }
.inquiry .page-head .k { font-size: 13px; color: var(--brand-text); letter-spacing: .02em; margin-bottom: 8px; font-weight: 600; }
.inquiry .page-head h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -.03em; }
.inquiry .page-head p { color: var(--ink-2); max-width: 620px; line-height: 1.75; margin-top: 8px; }
.field-label { font-size: 13.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; }
.kind-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.kind-chip { position: relative; display: block; cursor: pointer; }
.kind-chip input { position: absolute; opacity: 0; pointer-events: none; }
.kc-box { display: grid; gap: 4px; height: 100%; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--surface); transition: border-color .15s, background .15s, transform .15s; }
.kind-chip:hover .kc-box { border-color: var(--line-2); transform: translateY(-1px); }
.kc-box b { font-size: 14.5px; }
.kc-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.kind-chip input:checked + .kc-box { border-color: var(--brand);
  background: linear-gradient(180deg, rgba(61, 102, 255, .16), rgba(61, 102, 255, .05)); }
.kind-chip input:checked + .kc-box .kc-desc { color: var(--ink-2); }
.kind-chip input:focus-visible + .kc-box { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 560px) { .kind-chips { grid-template-columns: 1fr; } .kc-desc { display: none; } .kc-box { padding: 13px 15px; } }
