/* 디브릿지 툴즈 — dark aurora theme */
:root {
  --bg: #07080d;
  --bg-2: #0c0e16;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .055);
  --surface-solid: #11131d;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #eef0f7;
  --text-2: #a4abc0;
  --text-3: #6b7390;
  --brand: #7c6cff;
  --brand-2: #4f8dff;
  --brand-3: #22d3ee;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(139, 92, 246, .18), rgba(34, 211, 238, .12));
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --radius: 16px;
  --glow: 0 0 0 1px rgba(124, 108, 255, .35), 0 8px 40px -8px rgba(124, 108, 255, .45);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .6);
  --mono: "JetBrains Mono", "Pretendard Variable", Pretendard, "Malgun Gothic", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
/* 오로라 배경 */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(120px); opacity: .55; pointer-events: none;
}
body::before {
  width: 720px; height: 720px; left: -200px; top: -260px;
  background: radial-gradient(circle, rgba(124, 92, 255, .55), transparent 65%);
  animation: float1 18s ease-in-out infinite alternate;
}
body::after {
  width: 640px; height: 640px; right: -220px; bottom: -260px;
  background: radial-gradient(circle, rgba(34, 211, 238, .35), transparent 65%);
  animation: float2 22s ease-in-out infinite alternate;
}
@keyframes float1 { to { transform: translate(120px, 80px) scale(1.1); } }
@keyframes float2 { to { transform: translate(-100px, -60px) scale(1.15); } }
.grid-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
}

a { color: #a99fff; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(124, 108, 255, .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 10px; border: 2px solid var(--bg); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mono { font-family: var(--mono); }

/* ── 레이아웃 ── */
.shell { display: grid; grid-template-columns: 288px 1fr; min-height: 100vh; }
.side {
  background: rgba(10, 11, 18, .72); backdrop-filter: blur(18px); border-right: 1px solid var(--line);
  padding: 22px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.logo { display: flex; align-items: center; gap: 11px; padding: 4px 10px 24px; color: #fff; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; position: relative;
  background: var(--grad); font-weight: 800; font-size: 16px; color: #fff;
  box-shadow: 0 6px 24px -4px rgba(124, 92, 255, .7);
}
.logo b { display: block; font-size: 15px; letter-spacing: -.2px; }
.logo small { display: block; color: var(--text-3); font-size: 11px; font-family: var(--mono); letter-spacing: .2px; }
.nav-label { font-size: 10.5px; color: var(--text-3); padding: 16px 12px 6px; letter-spacing: 1.2px; text-transform: uppercase; font-family: var(--mono); }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; margin-bottom: 2px; position: relative; transition: all .15s;
}
.nav a:hover { background: var(--surface-2); color: #fff; }
.nav a.on { background: var(--grad-soft); color: #fff; box-shadow: inset 0 0 0 1px rgba(124, 108, 255, .3); }
.nav a.on::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad);
}
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .kbd { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--text-3); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.side-status {
  margin-top: auto; margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); font-size: 11.5px; color: var(--text-2); font-family: var(--mono);
}
.pulse { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 7px; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.side-foot { border-top: 1px solid var(--line); padding: 14px 8px 0; }
.me { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none;
}
.me b { color: #fff; font-size: 13px; display: block; }
.me a, .me button { color: var(--text-3); font-size: 12px; background: none; border: 0; padding: 0; cursor: pointer; }
.me a:hover, .me button:hover { color: #fff; }

.main { padding: 32px 40px 72px; min-width: 0; max-width: 1480px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.eyebrow { font-family: var(--mono); font-size: 11.5px; color: #a99fff; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.page-head h1 { font-size: 28px; margin: 0 0 6px; letter-spacing: -.8px; font-weight: 700; }
.page-head p { margin: 0; color: var(--text-2); }

/* ── 카드 ── */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 16px; backdrop-filter: blur(10px); position: relative;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h2 { font-size: 16px; margin: 0; letter-spacing: -.3px; display: flex; align-items: center; gap: 10px; font-weight: 650; }
.card-head p { margin: 3px 0 0 34px; color: var(--text-3); font-size: 12.5px; }
.step {
  width: 24px; height: 24px; border-radius: 8px; background: var(--grad-soft); color: #c4bcff;
  display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 700; font-family: var(--mono);
  box-shadow: inset 0 0 0 1px rgba(124, 108, 255, .35);
}

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.sticky { position: sticky; top: 24px; }

/* ── 폼 ── */
.grid { display: grid; gap: 16px 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.field label .req { color: #c084fc; margin-left: 3px; }
.field .hint { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: rgba(0, 0, 0, .28); outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder { color: #4d5470; }
.input:hover { border-color: rgba(255, 255, 255, .22); }
textarea.input { height: auto; min-height: 66px; padding: 10px 13px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124, 108, 255, .22); background: rgba(0, 0, 0, .4); }
.input.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 13px; }
select.input option { background: var(--surface-solid); }
input[type="date"].input::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
.input-wrap { position: relative; }
.input-wrap .unit {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 12px; pointer-events: none;
}
.input-wrap .input.num { padding-right: 34px; }
.input.sm { height: 36px; font-size: 13px; padding: 0 10px; border-radius: 9px; }
.input-wrap .input.sm.num { padding-right: 28px; font-size: 12.5px; }
.input-wrap.sm .unit { right: 9px; font-size: 11.5px; }
.period { display: flex; align-items: center; gap: 8px; }
.period span { color: var(--text-3); }

/* 매체 선택 칩 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13px;
  color: var(--text-2); transition: all .18s; user-select: none;
}
.chip:hover { border-color: rgba(124, 108, 255, .6); color: #fff; transform: translateY(-1px); }
.chip.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 22px -6px rgba(124, 92, 255, .8); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .45; }
.chip.on .dot { opacity: 1; background: #fff; box-shadow: 0 0 8px #fff; }
.chip-group-label { font-size: 11px; color: var(--text-3); margin: 16px 0 9px; font-family: var(--mono); letter-spacing: .6px; text-transform: uppercase; }

/* 매체 카드 */
.media-card {
  border: 1px solid var(--line); border-radius: 14px; margin-top: 14px; background: rgba(0, 0, 0, .22); overflow: hidden;
  animation: rise .28s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.media-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(124,108,255,.10), transparent 60%);
}
.media-card-head .t { display: flex; align-items: center; gap: 10px; font-weight: 700; flex-wrap: wrap; }
.media-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.media-card-body { padding: 16px; }
.icon-btn {
  border: 0; background: none; color: var(--text-3); cursor: pointer; padding: 6px; border-radius: 8px; line-height: 0;
}
.icon-btn:hover { background: rgba(248, 113, 113, .12); color: var(--err); }
.est { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.est b { color: #d7dcff; font-variant-numeric: tabular-nums; font-weight: 600; }

details.more { margin-top: 14px; }
details.more summary {
  cursor: pointer; font-size: 12.5px; font-weight: 600; color: #b3a9ff; list-style: none; display: inline-flex; gap: 6px; align-items: center;
}
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: "▸"; transition: transform .15s; }
details.more[open] summary::before { transform: rotate(90deg); }
details.more .inner { margin-top: 12px; }

/* 배지 */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line);
  font-family: var(--mono); letter-spacing: .2px;
}
.badge.blue { background: rgba(124, 108, 255, .14); color: #c4bcff; border-color: rgba(124, 108, 255, .3); }
.badge.ok { background: rgba(52, 211, 153, .12); color: var(--ok); border-color: rgba(52, 211, 153, .28); }
.badge.warn { background: rgba(251, 191, 36, .1); color: var(--warn); border-color: rgba(251, 191, 36, .28); }
.badge.gray { color: var(--text-2); }
.badge.ai { background: var(--grad); color: #fff; border-color: transparent; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); font-weight: 600; cursor: pointer;
  color: var(--text); transition: all .18s; white-space: nowrap;
}
.btn:hover { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.08); }
.btn.primary {
  background: var(--grad); background-size: 160% 160%; border-color: transparent; color: #fff;
  box-shadow: 0 8px 28px -8px rgba(124, 92, 255, .9), inset 0 1px 0 rgba(255,255,255,.25);
  animation: shimmer 6s ease infinite;
}
@keyframes shimmer { 50% { background-position: 100% 50%; } }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 36px -8px rgba(124, 92, 255, 1), inset 0 1px 0 rgba(255,255,255,.3); }
.btn.primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; height: 50px; font-size: 15px; border-radius: 12px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn.ghost { border-color: transparent; background: transparent; color: #b3a9ff; }
.btn.ghost:hover { background: rgba(124, 108, 255, .12); }
.btn.danger { color: var(--err); }
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 요약 패널 */
.summary { background: linear-gradient(180deg, rgba(124,108,255,.09), rgba(255,255,255,.03) 40%); }
.summary::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(139,92,246,.7), rgba(34,211,238,.25) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.summary h3 { margin: 0 0 16px; font-size: 13px; display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); letter-spacing: .8px; text-transform: uppercase; color: var(--text-2); font-weight: 600; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; color: var(--text-2); font-size: 13px; }
.sum-row b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; font-family: var(--mono); font-size: 12.5px; }
.sum-row.sub { padding-left: 12px; font-size: 12.5px; color: var(--text-3); }
.sum-total {
  border-top: 1px dashed var(--line-strong); margin-top: 10px; padding-top: 14px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.sum-total span { font-weight: 600; color: var(--text-2); }
.sum-total b { font-size: 24px; letter-spacing: -.6px; font-variant-numeric: tabular-nums; font-weight: 700; }
.sum-vat { text-align: right; color: var(--text-3); font-size: 12px; margin-top: 3px; font-family: var(--mono); }
.bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.06); margin: 18px 0 10px; gap: 2px; }
.bar i { display: block; height: 100%; transition: width .35s ease; }
.legend { display: grid; gap: 5px; font-size: 12px; color: var(--text-2); margin-bottom: 16px; }
.legend div { display: flex; justify-content: space-between; gap: 8px; }
.legend div b { font-family: var(--mono); font-weight: 500; color: var(--text-3); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.checklist { margin: 16px 0 18px; padding: 0; list-style: none; font-size: 12.5px; color: var(--text-3); }
.checklist li { display: flex; gap: 9px; padding: 4px 0; align-items: center; transition: color .2s; }
.checklist li::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; transition: all .2s;
}
.checklist li.done { color: var(--text); }
.checklist li.done::before { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 10px rgba(52, 211, 153, .6); }

/* 알림 */
.alert { padding: 12px 14px; border-radius: 11px; font-size: 13px; margin-bottom: 14px; border: 1px solid; }
.alert.err { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .3); color: #fecaca; }
.alert.ok { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .3); color: #a7f3d0; }
.alert.warn { background: rgba(251, 191, 36, .07); border-color: rgba(251, 191, 36, .28); color: #fde68a; }
.alert.info { background: rgba(124, 108, 255, .08); border-color: rgba(124, 108, 255, .28); color: #d4ceff; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert code { font-family: var(--mono); background: rgba(0,0,0,.35); padding: 1px 6px; border-radius: 5px; }

/* 생성 중 오버레이 */
.gen-overlay {
  position: fixed; inset: 0; background: rgba(5, 6, 10, .72); backdrop-filter: blur(8px); display: none;
  align-items: center; justify-content: center; z-index: 55;
}
.gen-overlay.show { display: flex; }
.gen-box { width: min(440px, 92vw); background: var(--surface-solid); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--glow); }
.gen-box h3 { margin: 0 0 16px; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.orb { width: 22px; height: 22px; border-radius: 50%; background: var(--grad); animation: orb 1.4s ease-in-out infinite; box-shadow: 0 0 22px rgba(124,92,255,.9); }
@keyframes orb { 50% { transform: scale(.72); opacity: .7; } }
.gen-log { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); min-height: 118px; }
.gen-log div { padding: 3px 0; animation: rise .25s ease-out; }
.gen-log div::before { content: "› "; color: #a99fff; }
.gen-log div.done { color: var(--ok); }
.gen-log div.done::before { content: "✓ "; color: var(--ok); }

/* 결과 모달 */
.modal-back {
  position: fixed; inset: 0; background: rgba(5, 6, 10, .7); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center;
  z-index: 50; padding: 20px;
}
.modal-back.show { display: flex; }
.modal { background: var(--surface-solid); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--glow), var(--shadow-lg); width: min(540px, 100%); padding: 30px; animation: pop .3s cubic-bezier(.2,.9,.3,1.3); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal .ok-icon {
  width: 52px; height: 52px; border-radius: 16px; background: var(--grad); color: #fff; display: grid; place-items: center; margin-bottom: 16px;
  box-shadow: 0 10px 30px -6px rgba(124, 92, 255, .8);
}
.modal h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.3px; }
.modal .fname { color: var(--text-2); word-break: break-all; margin-bottom: 16px; font-size: 12.5px; font-family: var(--mono); background: rgba(0,0,0,.3); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

/* 토스트 */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--surface-solid); border: 1px solid var(--line-strong); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-lg);
  transition: all .25s; z-index: 60; max-width: min(640px, 90vw); font-size: 13.5px; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { border-color: rgba(248, 113, 113, .5); box-shadow: 0 0 0 1px rgba(248,113,113,.2), var(--shadow-lg); }
.toast.err::before { content: "⚠ "; color: var(--err); }

/* 테이블 */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; color: var(--text-3); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-family: var(--mono); letter-spacing: .6px; text-transform: uppercase; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: rgba(255,255,255,.025); }
.table .muted { color: var(--text-3); font-size: 12.5px; }
.table .fn { font-weight: 600; word-break: break-all; }
.table .num { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.empty { text-align: center; color: var(--text-3); padding: 40px 0; }

/* 홈 */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 34px 36px; margin-bottom: 22px;
  border: 1px solid var(--line); background: linear-gradient(135deg, rgba(124,92,255,.16), rgba(34,211,238,.06) 60%, rgba(255,255,255,.02));
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: conic-gradient(from 180deg, #8b5cf6, #22d3ee, #6366f1, #8b5cf6); filter: blur(70px); opacity: .35;
  animation: spin 24s linear infinite;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 34px; margin: 10px 0 8px; letter-spacing: -1.2px; line-height: 1.2; }
.hero p { margin: 0; color: var(--text-2); max-width: 560px; }
.hero-stats { display: flex; gap: 28px; margin-top: 24px; flex-wrap: wrap; }
.hero-stats div b { display: block; font-size: 24px; font-family: var(--mono); letter-spacing: -.5px; }
.hero-stats div span { font-size: 12px; color: var(--text-3); }

.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.tool {
  display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  color: var(--text); transition: all .22s; position: relative; overflow: hidden;
}
.tool::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .25s;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 0%), rgba(124,108,255,.18), transparent 45%);
}
.tool:hover { border-color: rgba(124, 108, 255, .5); transform: translateY(-3px); box-shadow: var(--glow); }
.tool:hover::before { opacity: 1; }
.tool > * { position: relative; }
.tool .ti { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; color: #fff; }
.tool h3 { margin: 0 0 6px; font-size: 16.5px; letter-spacing: -.3px; }
.tool p { margin: 0; color: var(--text-2); font-size: 13px; }
.tool .go { position: absolute; right: 22px; top: 26px; color: var(--text-3); transition: all .2s; }
.tool:hover .go { color: #fff; transform: translateX(3px); }
.tool .tags { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }

.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg a { padding: 6px 12px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: 12.5px; }
.seg a.on { background: var(--grad-soft); color: #fff; box-shadow: inset 0 0 0 1px rgba(124,108,255,.3); }

.kind { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px; white-space: nowrap; font-family: var(--mono); }
.kind.da { background: rgba(124, 108, 255, .15); color: #c4bcff; }
.kind.ua { background: rgba(52, 211, 153, .12); color: #6ee7b7; }
.kind.io { background: rgba(244, 114, 182, .12); color: #f9a8d4; }

/* 로그인 */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); position: relative; overflow: hidden; }
.login-art .logo { padding: 0; }
.login-art h2 { font-size: 44px; line-height: 1.12; letter-spacing: -1.6px; margin: 0 0 16px; }
.login-art p { color: var(--text-2); max-width: 440px; margin: 0; font-size: 15px; }
.terminal {
  margin-top: 34px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.45); max-width: 480px;
  font-family: var(--mono); font-size: 12.5px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.terminal .bar-top { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.terminal .bar-top i { width: 10px; height: 10px; border-radius: 50%; background: #2b2f40; }
.terminal .bar-top i:nth-child(1) { background: #ff5f57; } .terminal .bar-top i:nth-child(2) { background: #febc2e; } .terminal .bar-top i:nth-child(3) { background: #28c840; }
.terminal pre { margin: 0; padding: 14px 16px; color: var(--text-2); white-space: pre-wrap; line-height: 1.7; min-height: 150px; }
.terminal .c1 { color: #a99fff; } .terminal .c2 { color: var(--ok); } .terminal .c3 { color: var(--text-3); }
.caret { display: inline-block; width: 7px; height: 14px; background: #a99fff; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.login-side { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: min(400px, 100%); }
.login-card h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.6px; }
.login-card p.sub { margin: 0 0 28px; color: var(--text-2); font-size: 13.5px; }
.login-card .field { margin-bottom: 16px; }
.login-card .input { height: 46px; }
.login-foot { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 22px; font-family: var(--mono); }

.dropzone { display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1.5px dashed var(--line-strong); border-radius: 14px; padding: 30px; text-align: center; color: var(--text-2);
  cursor: pointer; transition: all .18s; background: rgba(0,0,0,.2);
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: rgba(124, 108, 255, .08); color: #fff; }
.dropzone b { display: block; margin-bottom: 4px; color: var(--text); }
.dropzone svg { color: #a99fff; margin-bottom: 8px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 11px; margin: 18px 0; font-family: var(--mono); letter-spacing: 1px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.kv { display: grid; grid-template-columns: 110px 1fr; gap: 9px 12px; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 600; }

.tg-row { display: grid; grid-template-columns: 1.1fr 1.2fr 1.6fr 34px; gap: 8px; margin-bottom: 8px; }
.row-head { display: grid; gap: 8px; font-size: 10.5px; color: var(--text-3); font-weight: 600; margin-bottom: 7px; font-family: var(--mono); letter-spacing: .5px; text-transform: uppercase; }
.country-row { display: grid; grid-template-columns: 1.2fr 1.3fr 1fr .8fr .8fr 1fr 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.country-row.tcpi { grid-template-columns: 1.2fr 1.3fr 1fr .8fr .8fr 34px; }
.toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-2); }
.toggle input { width: 16px; height: 16px; accent-color: var(--brand); }

.fade-in { animation: rise .4s ease-out both; }
.fade-in:nth-child(2) { animation-delay: .05s; } .fade-in:nth-child(3) { animation-delay: .1s; }

@media (max-width: 1200px) {
  .form-layout { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .tools { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; }
  .side .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-label, .side-status, .side-foot .me div, .nav .kbd { display: none; }
  .nav a.on::before { display: none; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .logo { padding: 0 8px 0 0; }
  .main { padding: 20px 16px 48px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .country-row, .country-row.tcpi, .tg-row { grid-template-columns: 1fr 1fr; }
  .hero { padding: 26px 22px; } .hero h1 { font-size: 26px; }
}

/* 레지스트리 확장 */
.section-label { font-family: var(--mono); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-3); margin: 6px 0 10px; }
.tool.soon { opacity: .55; cursor: default; border-style: dashed; }
.tool.soon:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
.tool.soon .ti { filter: grayscale(.5); }
.nav a.soon { color: var(--text-3); cursor: default; }
.nav a.soon:hover { background: transparent; color: var(--text-3); }
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.table td.fn { min-width: 240px; }
.table td.muted, .table td.num { white-space: nowrap; }
.page-head { flex-wrap: wrap; }
.nav a { white-space: nowrap; }
.nav a .kbd { flex: none; }
.kind.contract { background: rgba(245, 158, 11, .12); color: #fcd34d; }
.item-card .grid { gap: 12px 14px; }
.amount-ko { font-size: 11.5px; color: #b3a9ff; margin-top: 6px; font-family: var(--mono); }
.doc-preview { background: #f7f6f2; color: #1b1b1b; border-radius: 12px; padding: 18px 20px; font-family: "Malgun Gothic", "Pretendard Variable", sans-serif; font-size: 12.5px; line-height: 1.7; max-height: 420px; overflow: auto; border: 1px solid var(--line); }
.doc-preview b { font-weight: 700; }
.doc-preview .sub { padding-left: 1.4em; color: #333; }

.kind.report { background: rgba(239, 68, 68, .12); color: #fca5a5; }
.kind.setup { background: rgba(99, 102, 241, .14); color: #c7d2fe; }
.kind.settle { background: rgba(168, 85, 247, .14); color: #e9d5ff; }
.kind.voucher { background: rgba(34, 211, 238, .12); color: #67e8f9; }
.preset { display:block; border:1px solid var(--line-strong); border-radius:12px; padding:14px 16px; cursor:pointer; background:rgba(0,0,0,.2); transition:all .15s; }
.preset:hover { border-color: rgba(124,108,255,.6); }
.preset.on { border-color: var(--brand); box-shadow: var(--glow); background: var(--grad-soft); }
.preset.locked { opacity:.5; cursor:not-allowed; }
.preset b { display:block; margin-bottom:4px; }
.preset span { font-size:12px; color:var(--text-2); }
