/*
 * 플랫폼 소개(/) '지식베이스 종류' 섹션 — 문서 · 표·엑셀 · 데이터베이스 · 웹사이트·뉴스 · 지리정보 (움직임은 kb_showcase.js).
 * saas.css 다음에 읽는다(색 토큰). 색은 파랑 한 계열만. 움직임은 transform·opacity 위주, 화면 밖이면 .live 가 빠져 반복 효과가 멈춘다.
 * 상태 클래스: is-in(나타남) · is-on(강조) · is-dim(흐리게) · is-hit · is-flow · is-col · is-learned.
 */
.kb-sx {
  position: relative;
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(56, 160, 245, .10), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%);
}
.kb { --kb-mono: ui-monospace, "SFMono-Regular", Consolas, "D2Coding", monospace; --kb-ease: cubic-bezier(.2, .8, .2, 1); }
.kb:not(.live) *, .kb:not(.live) *::before, .kb:not(.live) *::after { animation-play-state: paused !important; }

/* ── 탭 ─────────────────────────────────────────────── */
.kb-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kb-tab {
  position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 14px 15px; text-align: left;
  font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 16px; cursor: pointer; overflow: hidden;
  box-shadow: var(--shadow-sm); transition: border-color .25s, box-shadow .25s, transform .25s;
}
.kb-tab:hover { border-color: var(--line-2); transform: translateY(-2px); }
.kb-tab:focus-visible { outline: 3px solid rgba(29, 99, 237, .35); outline-offset: 2px; }
.kb-ic {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  color: var(--brand); background: var(--brand-soft); transition: background .3s, color .3s, transform .3s;
}
.kb-tx { display: flex; flex-direction: column; min-width: 0; }
.kb-tx b { font-size: 15.5px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.kb-tx small { margin-top: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-beta { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--brand); background: var(--brand-soft); padding: 1px 6px; border-radius: 999px; vertical-align: 2px; }
.kb-tab.on { border-color: rgba(29, 99, 237, .55); box-shadow: 0 14px 34px rgba(29, 99, 237, .16); }
.kb-tab.on .kb-ic { color: #fff; background: var(--grad); transform: scale(1.05); }
.kb-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: left; }
.kb-tab.on .kb-prog { transform: scaleX(1); opacity: .35; }
.kb-tab.on.run .kb-prog { opacity: 1; animation: kbProg var(--kb-dur, 12s) linear forwards; }
@keyframes kbProg { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ── 무대 ───────────────────────────────────────────── */
.kb-panel { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 16px; box-shadow: 0 30px 70px rgba(16, 58, 128, .12); }
.kb-stage { display: grid; grid-template-columns: minmax(0, 1.34fr) 46px minmax(0, 1fr); align-items: stretch; }
.kb-viz {
  position: relative; height: 412px; border-radius: 18px; overflow: hidden; color: #CBD5E1;
  background:
    radial-gradient(520px 300px at 85% 0%, rgba(29, 99, 237, .38), transparent 65%),
    radial-gradient(420px 260px at 0% 100%, rgba(56, 160, 245, .16), transparent 60%),
    #06112B;
}
.kb-viz::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(148, 197, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 197, 255, .06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.kb-viz-top { position: absolute; top: 14px; left: 16px; right: 16px; z-index: 3; }
.kb-live { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: #BFDBFE; background: rgba(255, 255, 255, .06); border: 1px solid rgba(148, 197, 255, .18); padding: 5px 11px 5px 9px; border-radius: 999px; }
.kb-live i { width: 7px; height: 7px; border-radius: 50%; background: #7DD3FC; box-shadow: 0 0 0 0 rgba(125, 211, 252, .6); animation: kbPing 1.6s ease-out infinite; }
@keyframes kbPing { 0% { box-shadow: 0 0 0 0 rgba(125, 211, 252, .6); } 100% { box-shadow: 0 0 0 9px rgba(125, 211, 252, 0); } }

.kb-scene { position: absolute; inset: 52px 18px 18px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s; }
.kb-scene.on { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease, transform .45s ease, visibility 0s; }

/* 공통 나타나기 */
.dc-file, .dc-cap, .dc-node, .sh-top, .sh-fx, .sh-row, .db-conn, .db-t, .db-sql, .wb-browser, .wb-l {
  opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .45s var(--kb-ease), background .3s, color .3s, box-shadow .3s;
}
.is-in.dc-file, .is-in.dc-cap, .is-in.dc-node, .is-in.sh-top, .is-in.sh-fx, .is-in.sh-row, .is-in.db-conn, .is-in.db-t, .is-in.db-sql, .is-in.wb-browser, .is-in.wb-l { opacity: 1; transform: none; }

/* ── ① 문서 ── */
.sc-doc { display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1.12fr); align-items: center; }
.dc-files { display: flex; flex-direction: column; gap: 9px; }
.dc-file { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 11px; border-radius: 11px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(148, 197, 255, .18); transform: translateX(-14px); }
.dc-file.is-dim { opacity: .3; }
.dc-file b { font-size: 12.5px; font-weight: 600; color: #E2E8F0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ext { flex: none; min-width: 40px; padding: 3px 6px; border-radius: 6px; text-align: center; font-size: 10.5px; font-weight: 850; letter-spacing: .02em; color: #fff; background: #1D63ED; }
.dc-file:nth-child(2) .ext { background: #2F7BF5; }
.dc-file:nth-child(3) .ext { background: #3B8EF7; }
.dc-file:nth-child(4) .ext { background: #5AA8F8; }
.dc-arrow { display: flex; justify-content: center; gap: 4px; }
.dc-arrow i { width: 5px; height: 5px; border-radius: 50%; background: rgba(125, 211, 252, .25); }
.is-flow .dc-arrow i { animation: kbFlow 1s ease-in-out infinite; }
.is-flow .dc-arrow i:nth-child(2) { animation-delay: .15s; }
.is-flow .dc-arrow i:nth-child(3) { animation-delay: .3s; }
@keyframes kbFlow { 0%, 100% { background: rgba(125, 211, 252, .25); transform: none; } 50% { background: #7DD3FC; transform: translateX(3px) scale(1.3); } }
.dc-tree { padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(148, 197, 255, .14); }
.dc-cap { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #7DD3FC; margin: 0 0 8px 2px; }
.dc-node { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 9px; margin-top: 3px; border-radius: 8px; font-size: 12.5px; color: #CBD5E1; white-space: nowrap; }
.dc-node.d0 { font-weight: 800; color: #fff; }
.dc-node.d1 { margin-left: 14px; }
.dc-node.d2 { margin-left: 30px; }
.dc-node.d1::before, .dc-node.d2::before { content: ""; position: absolute; left: -9px; top: 50%; width: 7px; height: 1px; background: rgba(148, 197, 255, .3); }
.dc-node em { font-style: normal; font-size: 11px; color: #93C5FD; }
.dc-node.is-on { background: rgba(56, 160, 245, .18); color: #fff; box-shadow: inset 0 0 0 1px rgba(125, 211, 252, .5); }
.dc-node.hit.is-on { background: var(--grad); box-shadow: 0 8px 22px rgba(29, 99, 237, .45); }
.dc-node.hit.is-on em { color: #fff; }
.dc-node.is-in.is-dim { opacity: .35; }
.dc-page {
  position: absolute; left: 0; bottom: 0; width: 52%; padding: 12px 13px 10px; border-radius: 13px; background: #fff; color: var(--ink);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(16px) scale(.96); transform-origin: bottom left;
  transition: opacity .4s ease, transform .5s var(--kb-ease);
}
.dc-page.is-in { opacity: 1; transform: none; }
.pg-h { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; margin-bottom: 8px; }
.pg-h b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; color: var(--ink-2); }
.pg-h span { flex: none; font-weight: 800; color: var(--brand); }
.dc-page i { display: block; height: 6px; margin: 6px 0; border-radius: 3px; background: #E6EAF2; }
.dc-page i.s { width: 62%; }
.dc-page mark {
  display: block; padding: 6px 8px; margin: 7px -3px; border-radius: 7px; font-size: 12px; font-weight: 800; color: var(--ink);
  background: linear-gradient(#CFE3FF, #CFE3FF) no-repeat left / 0% 100%; transition: background-size .7s var(--kb-ease);
}
.dc-page mark.is-on { background-size: 100% 100%; }

/* ── ② 표·엑셀 ── */
.sc-sheet { display: flex; flex-direction: column; gap: 9px; }
.sh-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sh-file { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; font-weight: 700; color: #E2E8F0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-file .ext { background: #38A0F5; }
.sh-tabs { display: flex; gap: 4px; flex: none; }
.sh-tabs span { font-size: 11px; padding: 3px 8px; border-radius: 6px; color: #94A3B8; background: rgba(255, 255, 255, .06); }
.sh-tabs span.on { color: #fff; background: rgba(56, 160, 245, .3); }
.sh-fx { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 10px; border-radius: 9px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(148, 197, 255, .14); }
.sh-fx em { flex: none; font-style: normal; font-size: 10.5px; font-weight: 850; color: #7DD3FC; }
.sh-sql { font-family: var(--kb-mono); font-size: 11.5px; color: #E0F2FE; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-grid { border: 1px solid rgba(148, 197, 255, .16); border-radius: 11px; overflow: hidden; }
.sh-row { display: grid; grid-template-columns: 1fr 1.3fr .8fr .8fr; font-size: 12.5px; border-top: 1px solid rgba(255, 255, 255, .05); }
.sh-row:first-child { border-top: none; }
.sh-row span { padding: 7px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .3s, color .3s; }
.sh-row span:nth-child(n+3) { text-align: right; font-variant-numeric: tabular-nums; }
.sh-row.hd { font-size: 11.5px; font-weight: 800; color: #93C5FD; background: rgba(56, 160, 245, .12); }
.is-col .sh-row .c { background: rgba(56, 160, 245, .14); color: #fff; font-weight: 700; }
.sh-row.m.is-on { background: rgba(29, 99, 237, .32); color: #fff; }
.is-col .sh-row.m.is-on .c { background: rgba(125, 211, 252, .28); }
.sh-row.is-in.is-dim { opacity: .3; }
.sh-res {
  align-self: flex-end; display: flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: 12px; color: #fff; background: var(--grad);
  box-shadow: 0 12px 28px rgba(29, 99, 237, .4); opacity: 0; transform: scale(.9); transform-origin: right; transition: opacity .35s, transform .45s var(--kb-ease);
}
.sh-res.is-in { opacity: 1; transform: none; }
.sh-res span { font-size: 12px; opacity: .9; }
.sh-res b { font-size: 24px; font-weight: 850; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sh-res small { font-size: 13px; font-weight: 700; }

/* ── ③ 데이터베이스 ── */
.sc-db { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; }
.db-conn { display: flex; flex-direction: column; align-items: center; text-align: center; }
.db-cyl {
  position: relative; width: 92px; height: 108px; border-radius: 46px / 15px;
  background: linear-gradient(90deg, #1746B8 0%, #3B8EF7 55%, #1D4ED8 100%); box-shadow: 0 16px 40px rgba(29, 99, 237, .45);
}
.db-cyl::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30px; border-radius: 50%; background: linear-gradient(180deg, #8EC9FF, #4C9DF8); }
.db-cyl span { position: absolute; left: 0; right: 0; height: 30px; border-radius: 50%; border-bottom: 2px solid rgba(255, 255, 255, .3); }
.db-cyl span:nth-child(1) { top: 26px; }
.db-cyl span:nth-child(2) { top: 50px; }
.db-cyl span:nth-child(3) { top: 74px; border-bottom-color: transparent; }
.live .is-in .db-cyl { animation: kbGlow 2.4s ease-in-out infinite; }
@keyframes kbGlow { 0%, 100% { box-shadow: 0 16px 40px rgba(29, 99, 237, .4); } 50% { box-shadow: 0 16px 56px rgba(56, 160, 245, .75); } }
.db-name { margin-top: 10px; font-size: 13px; font-weight: 800; color: #fff; }
.db-engs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 9px; }
.db-engs span { font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 6px; color: #94A3B8; background: rgba(255, 255, 255, .06); transition: background .2s, color .2s; }
.db-engs span.is-on { color: #fff; background: #1D63ED; }
.db-work { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.db-tables { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.db-t { padding: 8px 9px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(148, 197, 255, .16); min-width: 0; }
.db-t b { display: block; font-family: var(--kb-mono); font-size: 11.5px; font-weight: 700; color: #E0F2FE; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-t b em, .db-t .lock em {
  display: block; font-family: "Pretendard", sans-serif; font-style: normal; font-size: 11px; font-weight: 700; color: #7DD3FC;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height .4s ease, opacity .4s ease;
}
.db-t span { display: block; font-family: var(--kb-mono); font-size: 10.5px; color: #94A3B8; padding: 1.5px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-learned .db-t b em { max-height: 18px; opacity: 1; }
.is-learned .db-t .lock { display: flex; align-items: center; gap: 4px; color: #64748B; }
.db-t .lock s { text-decoration: none; }
.is-learned .db-t .lock s { text-decoration: line-through; }
.is-learned .db-t .lock em { display: inline-block; max-height: 18px; opacity: 1; font-size: 10px; color: #BAE6FD; background: rgba(56, 160, 245, .2); padding: 0 5px; border-radius: 4px; text-decoration: none; }
.db-sql { min-height: 128px; padding: 9px 11px; border-radius: 10px; background: rgba(0, 0, 0, .32); border: 1px solid rgba(148, 197, 255, .14); }
.db-sql-t { display: block; font-family: var(--kb-mono); font-size: 10.8px; line-height: 1.55; color: #BFDBFE; white-space: pre; overflow: hidden; }
.db-guard { display: flex; flex-wrap: wrap; gap: 6px; }
.db-guard span {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 4px 10px 4px 8px; border-radius: 999px;
  color: #BAE6FD; background: rgba(56, 160, 245, .16); border: 1px solid rgba(125, 211, 252, .3);
  opacity: 0; transform: scale(.85); transition: opacity .3s, transform .35s var(--kb-ease);
}
.db-guard span::before { content: ""; width: 9px; height: 5px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg) translate(1px, -1px); }
.db-guard span.is-in { opacity: 1; transform: none; }

/* ── ④ 웹사이트·뉴스 ── */
.sc-web { display: flex; flex-direction: column; gap: 9px; }
.wb-browser { position: relative; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .04); border: 1px solid rgba(148, 197, 255, .16); }
.wb-bar { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-bottom: 1px solid rgba(148, 197, 255, .12); }
.wb-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.wb-url { flex: 1; min-width: 0; margin-left: 6px; padding: 3px 9px; border-radius: 6px; font-family: var(--kb-mono); font-size: 11px; color: #93C5FD; background: rgba(0, 0, 0, .25); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-cyc { flex: none; font-size: 10.5px; font-weight: 700; color: #7DD3FC; }
.wb-map { display: block; width: 100%; height: 178px; padding: 4px 6px; }
.wb-edges path { fill: none; stroke: rgba(148, 197, 255, .24); stroke-width: 1.5; }
.wb-n rect { fill: rgba(255, 255, 255, .05); stroke: rgba(148, 197, 255, .28); stroke-width: 1; transition: fill .3s, stroke .3s; }
.wb-n text { fill: #CBD5E1; font-size: 11.5px; font-weight: 600; text-anchor: middle; transition: fill .3s; }
.wb-n.is-on rect { fill: rgba(56, 160, 245, .24); stroke: #7DD3FC; }
.wb-n.is-on text { fill: #fff; }
.wb-n.new.is-on rect { fill: #1D63ED; stroke: #93C5FD; }
.wb-n.same.is-on rect { fill: rgba(255, 255, 255, .03); stroke: rgba(148, 197, 255, .4); stroke-dasharray: 3 3; }
.wb-n.same.is-on text { fill: #94A3B8; }
.wb-n.is-hit rect { stroke: #fff; stroke-width: 2.2; }
.wb-bot { opacity: 0; transition: transform .45s var(--kb-ease), opacity .3s; }
.wb-bot.is-in { opacity: 1; }
.wb-bot circle { fill: #7DD3FC; }
.wb-bot .halo { fill: rgba(125, 211, 252, .28); transform-box: fill-box; transform-origin: center; animation: kbHalo 1.2s ease-out infinite; }
@keyframes kbHalo { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.wb-flash { position: absolute; inset: 31px 0 0; border: 2px solid #7DD3FC; border-radius: 0 0 12px 12px; opacity: 0; pointer-events: none; }
.wb-flash span { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 800; color: #fff; background: #1D63ED; padding: 3px 9px; border-radius: 999px; }
.wb-flash.is-in { opacity: 1; animation: kbShot .6s ease-out; }
@keyframes kbShot { 0% { background: rgba(255, 255, 255, .55); } 100% { background: rgba(255, 255, 255, 0); } }
.wb-log { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.wb-l { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 7px 9px; border-radius: 9px; font-size: 11.5px; color: #CBD5E1; background: rgba(255, 255, 255, .04); border: 1px solid rgba(148, 197, 255, .1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-l em { flex: none; font-style: normal; font-size: 10.5px; font-weight: 800; padding: 2px 6px; border-radius: 5px; color: #BAE6FD; background: rgba(56, 160, 245, .2); }
.wb-l.new em { color: #fff; background: #1D63ED; }
.wb-l.same em { color: #94A3B8; background: rgba(255, 255, 255, .08); }

/* ── ⑤ 지리정보 ── */
.sc-geo { border-radius: 13px; overflow: hidden; border: 1px solid rgba(148, 197, 255, .16); }
.gm { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gm-bg { fill: #0A1B42; }
.gm-park { fill: rgba(56, 160, 245, .12); }
.gm-road { fill: none; stroke: rgba(148, 197, 255, .17); stroke-width: 14; stroke-linecap: round; }
.gm-road.thin { stroke-width: 7; }
.gm-b { fill: rgba(255, 255, 255, .06); stroke: rgba(148, 197, 255, .24); stroke-width: 1; transition: fill .4s, stroke .4s; }
.gm-b.goal.is-on { fill: rgba(29, 99, 237, .4); stroke: #7DD3FC; stroke-width: 1.6; }
.gm-t { fill: #CBD5E1; font-size: 12.5px; font-weight: 700; text-anchor: middle; }
.gm-t.gate { fill: #7DD3FC; font-size: 12px; }
.gm-route { fill: none; stroke: #7DD3FC; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 6px rgba(125, 211, 252, .7)); transition: stroke-dashoffset 1.1s ease-in-out; }
.gm-route.is-in { stroke-dashoffset: 0; }
.gm-pin > * { opacity: 0; transform: translateY(-16px); transition: opacity .3s, transform .45s cubic-bezier(.3, 1.5, .5, 1); }
.gm-pin path { fill: #38A0F5; }
.gm-pin circle { fill: #06112B; }
.gm-pin.is-in > *, .gm-goal.is-in .gm-pin > * { opacity: 1; transform: none; }
.gm-pin.big path { fill: #fff; }
.gm-pin.big circle { fill: #1D63ED; }
.gm-goal .ring { fill: none; stroke: #7DD3FC; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.gm-goal.is-in .ring { animation: kbRing 1.6s ease-out infinite; }
@keyframes kbRing { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.gm-count {
  position: absolute; left: 10px; top: 10px; display: flex; align-items: baseline; gap: 5px; padding: 6px 11px; border-radius: 10px;
  font-size: 12px; color: #BFDBFE; background: rgba(6, 17, 43, .86); border: 1px solid rgba(148, 197, 255, .2);
  opacity: 0; transition: opacity .4s;
}
.sc-geo.is-in .gm-count { opacity: 1; }
.gm-count b { font-size: 17px; font-weight: 850; color: #fff; font-variant-numeric: tabular-nums; }
.gm-card {
  position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 2px; min-width: 150px; padding: 10px 12px; border-radius: 12px;
  color: var(--ink); background: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(-8px); transition: opacity .35s, transform .45s var(--kb-ease);
}
.gm-card.is-in { opacity: 1; transform: none; }
.gm-card b { font-size: 13px; font-weight: 800; }
.gm-card span { font-size: 12px; color: var(--ink-2); }
.gm-card small { margin-top: 3px; font-size: 11px; color: var(--brand); font-weight: 700; }

/* ── 흐름 ── */
.kb-beam { position: relative; display: flex; align-items: center; justify-content: center; gap: 5px; }
.kb-beam::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; border-top: 2px dashed var(--line-2); }
.kb-beam i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.kb-beam.is-on i { animation: kbBeam .9s ease-in-out infinite; }
.kb-beam.is-on i:nth-child(2) { animation-delay: .15s; }
.kb-beam.is-on i:nth-child(3) { animation-delay: .3s; }
@keyframes kbBeam { 0%, 100% { background: var(--line-2); transform: none; } 50% { background: var(--brand); transform: scale(1.45); } }

/* ── 대화 ── */
.kb-chat { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px; border-radius: 18px; background: var(--bg-soft); border: 1px solid var(--line); }
.kb-chat-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; color: var(--ink-2); }
.kb-ai { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; font-size: 10.5px; font-weight: 850; color: #fff; background: var(--grad); }
.kb-q {
  align-self: flex-end; max-width: 94%; min-height: 40px; padding: 10px 14px; border-radius: 16px 16px 4px 16px; font-size: 14px; font-weight: 600; color: #fff; background: var(--brand);
  opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .4s var(--kb-ease);
}
.kb-q.is-in { opacity: 1; transform: none; }
.kb-caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: rgba(255, 255, 255, .85); animation: kbCaret 1s steps(1) infinite; }
.kb-q.is-on .kb-caret { display: none; }
@keyframes kbCaret { 50% { opacity: 0; } }
.kb-think { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); max-height: 0; opacity: 0; overflow: hidden; transition: max-height .3s, opacity .3s; }
.kb-think.is-in { max-height: 24px; opacity: 1; }
.kb-think .dots { display: inline-flex; gap: 3px; }
.kb-think .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); animation: kbBounce 1s ease-in-out infinite; }
.kb-think .dots i:nth-child(2) { animation-delay: .15s; }
.kb-think .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes kbBounce { 0%, 100% { transform: none; opacity: .4; } 50% { transform: translateY(-3px); opacity: 1; } }
.kb-a {
  max-width: 100%; padding: 12px 14px; border-radius: 4px 16px 16px 16px; font-size: 14px; line-height: 1.7; color: var(--ink); background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .45s var(--kb-ease);
}
.kb-a:empty { display: none; }
.kb-a.is-in { opacity: 1; transform: none; }
.kb-a b { font-weight: 800; color: var(--brand-hover); }
.kb-a .cite { display: inline-grid; place-items: center; min-width: 16px; height: 16px; margin: 0 1px 0 2px; padding: 0 3px; border-radius: 5px; font-size: 10px; font-weight: 800; line-height: 1; color: var(--brand); background: var(--brand-soft); vertical-align: 3px; }
.kb-bars { display: none; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.kb[data-kb="db"] .kb-bars { display: flex; }
.kb-bars div { display: grid; grid-template-columns: 82px minmax(0, 1fr) 42px; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-2); }
.kb-bars span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-bars i { display: block; height: 10px; border-radius: 5px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--kb-ease); }
.kb-bars.is-in i { transform: scaleX(var(--v, 1)); }
.kb-bars div:nth-child(2) i { transition-delay: .1s; }
.kb-bars div:nth-child(3) i { transition-delay: .2s; }
.kb-bars div:nth-child(4) i { transition-delay: .3s; }
.kb-bars b { text-align: right; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.kb-cite {
  margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 11px; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  background: #fff; border: 1px solid var(--line); opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .45s var(--kb-ease);
}
.kb-cite.is-in { opacity: 1; transform: none; }
.kb-cite-n { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #fff; background: var(--brand); }
.kb-cite-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 넣기 · 읽기 · 답하기 ── */
.kb-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.kb-how > div { position: relative; padding: 14px 16px 15px; border-radius: 14px; background: var(--bg-soft); }
.kb-how > div + div::before {
  content: ""; position: absolute; left: -9px; top: 22px; width: 6px; height: 6px; border-top: 2px solid var(--faint); border-right: 2px solid var(--faint); transform: rotate(45deg);
}
.kb-how-k { display: inline-block; font-size: 12px; font-weight: 800; color: var(--brand); background: var(--brand-soft); padding: 3px 10px; border-radius: 999px; }
.kb-how p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.kb-note { margin: 16px auto 0; max-width: 760px; text-align: center; font-size: 13.5px; color: var(--muted); }

/* ── 좁은 화면 ── */
@media (max-width: 1080px) {
  .kb-tab { gap: 10px; padding: 12px 12px 13px; }
  .kb-ic { width: 36px; height: 36px; border-radius: 10px; }
  .kb-tx b { font-size: 14.5px; }
  .kb-tx small { font-size: 11.5px; }
}
@media (max-width: 920px) {
  .kb-tabs { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px 6px; }
  .kb-tabs::-webkit-scrollbar { display: none; }
  .kb-tab { flex: none; min-width: 164px; scroll-snap-align: start; }
  .kb-stage { grid-template-columns: minmax(0, 1fr); }
  .kb-beam { height: 34px; flex-direction: column; gap: 4px; }
  .kb-beam::before { left: 50%; right: auto; top: 4px; bottom: 4px; border-top: none; border-left: 2px dashed var(--line-2); }
  .kb-chat { min-height: 270px; }
}
@media (max-width: 640px) {
  .kb-panel { padding: 10px; border-radius: 20px; }
  .kb-viz { height: 470px; border-radius: 14px; }
  .kb-scene { inset: 50px 12px 12px; }
  .kb-live { font-size: 11.5px; }
  .sc-doc { grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1.15fr); align-items: start; }
  .dc-file { padding: 8px; gap: 7px; }
  .dc-file b { font-size: 11px; }
  .ext { min-width: 34px; font-size: 9.5px; padding: 2px 4px; }
  .dc-tree { padding: 9px 7px; }
  .dc-node { font-size: 11px; padding: 5px 6px; }
  .dc-node.d1 { margin-left: 8px; }
  .dc-node.d2 { margin-left: 16px; }
  .dc-page { width: 74%; }
  .sh-row { grid-template-columns: 1fr 1.35fr .8fr; font-size: 11.5px; }
  .sh-row span:nth-child(4) { display: none; }
  .sh-row span { padding: 6px 8px; }
  .sh-tabs { display: none; }
  .sc-db { grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: start; }
  .db-conn { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 4px 10px; text-align: left; }
  .db-cyl { width: 40px; height: 46px; border-radius: 20px / 7px; }
  .db-cyl::before, .db-cyl span { height: 14px; }
  .db-cyl span:nth-child(1) { top: 11px; }
  .db-cyl span:nth-child(2) { top: 21px; }
  .db-cyl span:nth-child(3) { top: 31px; }
  .db-name { margin: 0; }
  .db-engs { margin: 0; justify-content: flex-start; flex-basis: 100%; }
  .db-t { padding: 6px; }
  .db-t b { font-size: 10.5px; }
  .db-t span { font-size: 9.5px; }
  .db-sql { min-height: 118px; padding: 7px 9px; }
  .db-sql-t { font-size: 9.6px; }
  .wb-map { height: 150px; }
  .wb-n text { font-size: 12.5px; }
  .wb-log { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .wb-l { padding: 6px 8px; }
  .gm-card { min-width: 0; max-width: 58%; padding: 8px 10px; }
  .kb-how { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .kb-how > div + div::before { display: none; }
  .kb-how p { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .kb *, .kb *::before, .kb *::after { animation: none !important; transition: none !important; }
}
