:root {
  --bg: #06080c;
  --bg-grad: radial-gradient(1200px 600px at 78% -10%, rgba(124, 92, 255, .18), transparent 60%),
             radial-gradient(900px 500px at 10% 110%, rgba(34, 211, 166, .10), transparent 60%);
  --panel: #0d1118;
  --panel-2: #111823;
  --panel-3: #151d2a;
  --border: #1d2634;
  --border-soft: #161d28;
  --text: #e8edf5;
  --muted: #8b98ab;
  --muted-2: #64708a;
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, .14);
  --mint: #24d3a5;
  --mint-soft: rgba(36, 211, 165, .12);
  --amber: #f5b544;
  --amber-soft: rgba(245, 181, 68, .12);
  --danger: #ff6076;
  --danger-soft: rgba(255, 96, 118, .12);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg-grad);
  pointer-events: none;
  z-index: 0;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }

.hidden { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- login */

.login {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  background: var(--bg);
}

.login-brand {
  position: relative;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(600px 400px at 20% 10%, rgba(124, 92, 255, .35), transparent 65%),
    radial-gradient(500px 400px at 90% 90%, rgba(36, 211, 165, .18), transparent 70%),
    #080b11;
  border-right: 1px solid var(--border-soft);
  overflow: hidden;
}

.login-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 40% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  letter-spacing: .18em;
  font-size: 13px;
  color: var(--text);
}
.brand-dot {
  width: 32px; height: 32px; border-radius: 10px;
  background: conic-gradient(from 210deg, #7c5cff, #24d3a5, #7c5cff);
  box-shadow: 0 0 28px rgba(124, 92, 255, .55);
  position: relative;
}
.brand-dot::after {
  content: ""; position: absolute; inset: 9px; border-radius: 4px; background: #080b11;
}

.login-headline { position: relative; z-index: 1; max-width: 520px; }
.login-headline h1 { font-size: 44px; line-height: 1.15; letter-spacing: -.03em; }
.login-headline h1 span {
  background: linear-gradient(100deg, #a68bff, #24d3a5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-headline p { margin-top: 18px; color: #a6b2c6; font-size: 15px; line-height: 1.75; }
.login-points { margin-top: 34px; display: grid; gap: 12px; }
.login-point { display: flex; gap: 12px; align-items: flex-start; color: #c3ccdd; font-size: 13.5px; }
.login-point b { color: #fff; font-weight: 620; }
.check {
  flex: none; width: 20px; height: 20px; border-radius: 6px;
  background: var(--mint-soft); color: var(--mint);
  display: grid; place-items: center; font-size: 12px; margin-top: 1px;
}
.login-foot { color: var(--muted-2); font-size: 12px; z-index: 1; }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card {
  width: 100%; max-width: 380px;
  background: linear-gradient(180deg, #101722, #0b1017);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
}
.login-card h2 { font-size: 22px; }
.login-card .sub { color: var(--muted); margin-top: 6px; font-size: 13px; }
.login-card form { margin-top: 24px; display: grid; gap: 14px; }
.login-card .hint {
  margin-top: 18px; padding: 12px 14px; border-radius: 10px;
  background: var(--panel-2); border: 1px dashed var(--border);
  color: var(--muted); font-size: 12px; line-height: 1.7;
}
.login-error {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: var(--danger-soft); color: #ffb3be; font-size: 12.5px;
  border: 1px solid rgba(255, 96, 118, .25);
}

/* ---------------------------------------------------------------- shell */

.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 24px 16px;
  border-right: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(13, 17, 24, .92), rgba(8, 11, 16, .92));
  backdrop-filter: blur(14px);
}

.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 24px; }
.side-brand .brand-dot { width: 26px; height: 26px; border-radius: 8px; }
.side-brand .brand-dot::after { inset: 7px; border-radius: 3px; }
.side-brand .name { font-size: 12px; font-weight: 750; letter-spacing: .2em; }
.side-brand .tag { display: block; font-size: 10px; color: var(--muted-2); letter-spacing: .08em; margin-top: 2px; }

.nav { display: grid; gap: 4px; }
.nav-label { font-size: 10.5px; letter-spacing: .14em; color: var(--muted-2); padding: 12px 12px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 10px;
  background: transparent; border: 1px solid transparent; cursor: pointer;
  color: var(--muted); font-size: 13.5px; font-weight: 520;
  transition: background .16s, color .16s, border-color .16s;
  text-align: left; width: 100%;
}
.nav-item svg { width: 17px; height: 17px; opacity: .85; flex: none; }
.nav-item:hover { background: rgba(255, 255, 255, .03); color: var(--text); }
.nav-item.active {
  background: linear-gradient(100deg, rgba(124, 92, 255, .18), rgba(124, 92, 255, .04));
  border-color: rgba(124, 92, 255, .3);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--accent);
}

.side-foot { margin-top: auto; padding: 14px 12px 4px; border-top: 1px solid var(--border-soft); }
.side-status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(36,211,165,.5); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(36, 211, 165, .45); }
  70% { box-shadow: 0 0 0 8px rgba(36, 211, 165, 0); }
  100% { box-shadow: 0 0 0 0 rgba(36, 211, 165, 0); }
}

.main { min-width: 0; padding: 28px 32px 56px; }

.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.topbar h1 { font-size: 25px; letter-spacing: -.02em; }
.topbar .sub { color: var(--muted); font-size: 13px; margin-top: 5px; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.admin-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--panel); font-size: 12px; color: var(--muted);
}
.admin-chip .avatar { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(140deg, #7c5cff, #24d3a5); }

/* ------------------------------------------------------------- controls */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text);
  font-size: 13px; font-weight: 550; cursor: pointer;
  transition: border-color .16s, background .16s, transform .1s;
  white-space: nowrap;
}
.btn:hover { border-color: #2b394d; background: #17202d; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  border: none; color: #fff;
  background: linear-gradient(100deg, #7c5cff, #6247e0);
  box-shadow: 0 8px 22px rgba(124, 92, 255, .3);
}
.btn.primary:hover { background: linear-gradient(100deg, #8f74ff, #6d51f0); }
.btn.ghost { background: transparent; }
.btn.danger { color: #ffb3be; border-color: rgba(255, 96, 118, .3); background: var(--danger-soft); }
.btn.tiny { padding: 5px 9px; font-size: 12px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.field { display: grid; gap: 7px; }
.field > label { font-size: 12px; color: var(--muted); font-weight: 550; }
.field .help { font-size: 11.5px; color: var(--muted-2); }

.input, .select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: #0a0f16; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
  min-width: 0;
}
.input:focus, .select:focus { border-color: rgba(124, 92, 255, .6); box-shadow: 0 0 0 3px rgba(124, 92, 255, .15); }
.input::placeholder { color: var(--muted-2); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.switch { position: relative; display: inline-flex; width: 44px; height: 25px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; cursor: pointer;
  background: #202a3a; border: 1px solid #2a3547; transition: background .18s;
}
.switch span::after {
  content: ""; position: absolute; width: 17px; height: 17px; border-radius: 50%;
  left: 3px; top: 3px; background: #8b98ab; transition: transform .18s, background .18s;
}
.switch input:checked + span { background: rgba(124, 92, 255, .35); border-color: rgba(124, 92, 255, .6); }
.switch input:checked + span::after { transform: translateX(19px); background: #fff; }

/* ---------------------------------------------------------------- cards */

.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 1180px) {
  .stats.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stats.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1500px) {
  .stats.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.card {
  background: linear-gradient(180deg, #0f1520, #0b1017);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 0;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-head h3 { font-size: 14.5px; }
.card-head .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

.stat { position: relative; overflow: hidden; }
.stat .label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.stat .value { font-size: 27px; font-weight: 700; letter-spacing: -.02em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.stat .delta { margin-top: 8px; font-size: 11.5px; color: var(--muted-2); }
.stat .icon {
  position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; background: var(--accent-soft); color: #b4a3ff;
}
.stat .icon svg { width: 17px; height: 17px; }
.stat.mint .icon { background: var(--mint-soft); color: var(--mint); }
.stat.amber .icon { background: var(--amber-soft); color: var(--amber); }
.stat.rose .icon { background: var(--danger-soft); color: var(--danger); }

.dash-grid { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); margin-top: 16px; }
.dash-grid > .card:first-child { display: flex; flex-direction: column; }
.dash-grid > .card:first-child .chart-wrap { flex: 1; min-height: 240px; }
.stack { display: grid; gap: 16px; align-content: start; }

.chart-wrap { position: relative; height: 240px; }
.chart-wrap canvas { width: 100% !important; height: 100% !important; display: block; }
.legend { display: flex; gap: 16px; font-size: 11.5px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

.upstream-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border-soft);
}
.upstream-row:last-child { border-bottom: none; padding-bottom: 0; }
.upstream-row .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot.ok { background: var(--mint); box-shadow: 0 0 10px rgba(36, 211, 165, .6); }
.dot.error { background: var(--danger); box-shadow: 0 0 10px rgba(255, 96, 118, .5); }
.dot.unknown { background: var(--muted-2); }
.upstream-row .meta { min-width: 0; flex: 1; }
.upstream-row .meta b { font-size: 13px; font-weight: 600; display: block; }
.upstream-row .meta span { font-size: 11.5px; color: var(--muted-2); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--panel-3); color: var(--muted); border: 1px solid var(--border);
  white-space: nowrap;
}
.pill.ok { background: var(--mint-soft); color: #6ff0cd; border-color: rgba(36, 211, 165, .25); }
.pill.error { background: var(--danger-soft); color: #ffadb7; border-color: rgba(255, 96, 118, .25); }
.pill.warn { background: var(--amber-soft); color: #ffd08a; border-color: rgba(245, 181, 68, .25); }
.pill.accent { background: var(--accent-soft); color: #b9a8ff; border-color: rgba(124, 92, 255, .3); }
.pool-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pool-chips .pill { font-size: 10.5px; padding: 2px 7px; }
button.pill { font-family: inherit; cursor: pointer; transition: border-color .15s, color .15s; }
button.pill:hover { border-color: var(--accent); color: var(--text); }
.krw-tag {
  display: inline-block; padding: 0 5px; margin-left: 2px; border-radius: 999px;
  background: rgba(36, 211, 165, .14); color: #6ff0cd; font-size: 9.5px; font-weight: 700;
  letter-spacing: .04em; vertical-align: 1px;
}
.model-tag { margin-left: 6px; font-size: 10px; padding: 1px 7px; vertical-align: 1px; }

.meter { height: 6px; border-radius: 999px; background: #1a2231; overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7c5cff, #24d3a5); }
.meter.warn > i { background: linear-gradient(90deg, #f5b544, #ff8a5b); }
.meter.danger > i { background: linear-gradient(90deg, #ff6076, #ff9a6b); }

/* ---------------------------------------------------------------- table */

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .012); white-space: nowrap;
}
tbody td { padding: 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:hover td { background: rgba(255, 255, 255, .016); }
tbody tr:last-child td { border-bottom: none; }
td.right, th.right { text-align: right; }
.table-empty { padding: 34px 12px; text-align: center; color: var(--muted-2); font-size: 13px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); cursor: pointer;
}
.chip.active { border-color: rgba(124, 92, 255, .5); background: var(--accent-soft); color: #c6b9ff; }

.key-cell b { display: block; font-size: 13px; font-weight: 600; }
.key-cell span { font-size: 11.5px; color: var(--muted-2); }
.bar-cell { min-width: 132px; }
.bar-cell .top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.bar-cell .top b { font-weight: 650; }

.key-cards { display: none; }

.key-card {
  background: linear-gradient(180deg, #0f1520, #0b1017);
  border: 1px solid var(--border); border-radius: 14px; padding: 14px;
}
.key-card .kc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.key-card .kc-head b { font-size: 14px; display: block; }
.key-card .kc-head span:not(.pill) { font-size: 11px; color: var(--muted-2); display: block; margin-top: 3px; word-break: break-all; }
.key-card .kc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.key-card .kc-grid span { font-size: 11px; color: var(--muted-2); display: block; }
.key-card .kc-grid b { font-size: 14px; font-variant-numeric: tabular-nums; }
.key-card .kc-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.key-card .kc-foot .spacer { flex: 1; }

/* ---------------------------------------------------------------- views */

.view { display: none; animation: fade .18s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-title h2 { font-size: 16px; }
.section-title .sub { color: var(--muted); font-size: 12px; }

.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.up-card .up-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.up-card .url { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 8px; word-break: break-all; }
.up-card .rows { margin-top: 14px; display: grid; gap: 8px; font-size: 12px; }
.up-card .rows div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.up-card .rows b { color: var(--text); font-weight: 550; }

.price-table input { width: 92px; padding: 7px 9px; font-size: 12.5px; text-align: right; }
.model-id { font-family: var(--mono); font-size: 12.5px; }

/* --------------------------------------------------------------- modal */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(3, 5, 9, .72); backdrop-filter: blur(6px); padding: 20px;
  overflow-y: auto;
}
.modal {
  width: 100%; max-width: 520px; background: #0e141d;
  border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow); padding: 24px; margin: auto;
}
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.modal-head h3 { font-size: 17px; }
.modal-head p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.modal-close { background: transparent; border: none; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; padding: 4px; }
.modal-body { display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.preset-row { display: flex; flex-wrap: wrap; gap: 8px; }
.preset {
  padding: 8px 12px; border-radius: 10px; cursor: pointer; font-size: 12px;
  border: 1px solid var(--border); background: var(--panel-2); color: var(--muted);
  transition: all .15s;
}
.preset:hover { border-color: rgba(124, 92, 255, .45); color: #cfc4ff; }
.preset.active { border-color: var(--accent); background: var(--accent-soft); color: #d6ccff; }

.reveal-key {
  display: flex; gap: 10px; align-items: center;
  background: #070b11; border: 1px dashed rgba(36, 211, 165, .4);
  border-radius: 12px; padding: 14px; margin-top: 6px;
}
.reveal-key code { flex: 1; font-family: var(--mono); font-size: 12.5px; color: #8df0d4; word-break: break-all; }
.warn-box {
  padding: 11px 13px; border-radius: 10px; font-size: 12px; line-height: 1.65;
  background: var(--amber-soft); border: 1px solid rgba(245, 181, 68, .25); color: #ffd89a;
}

kv { display: contents; }
.detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.detail-box { background: var(--panel-2); border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px; }
.detail-box .k { font-size: 11px; color: var(--muted-2); }
.detail-box .v { font-size: 15px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; }
.detail-tabs { display: flex; gap: 6px; margin: 18px 0 10px; }
.detail-tabs button { font-size: 12px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; }
.detail-tabs button.active { background: var(--accent-soft); border-color: rgba(124, 92, 255, .4); color: #cfc4ff; }
.scroll-box { max-height: 300px; overflow: auto; border: 1px solid var(--border-soft); border-radius: 12px; }
.scroll-box table { font-size: 12px; }
.scroll-box thead th { position: sticky; top: 0; background: #0e141d; z-index: 1; }

/* --------------------------------------------------------------- toast */

.toast-stack { position: fixed; right: 22px; bottom: 22px; z-index: 120; display: grid; gap: 10px; }
.toast {
  min-width: 240px; max-width: 360px; padding: 12px 14px; border-radius: 12px;
  background: #131b26; border: 1px solid var(--border); box-shadow: var(--shadow);
  font-size: 12.5px; animation: toastIn .2s ease;
}
.toast.ok { border-color: rgba(36, 211, 165, .35); }
.toast.error { border-color: rgba(255, 96, 118, .4); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* -------------------------------------------------------------- portal */

.portal-wrap { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; }
.portal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.portal-card { background: linear-gradient(180deg, #0f1520, #0b1017); border: 1px solid var(--border); border-radius: 20px; padding: 26px; }
.portal-hero { margin-top: 22px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
.portal-credit { font-size: 34px; font-weight: 720; letter-spacing: -.03em; }
.portal-note { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* -------------------------------------------------------------- studio */

.studio-wrap { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 40px 20px 80px; }
.studio-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.studio-brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.studio-brand .brand-mark { font-size: 12px; }
.studio-brand .brand-dot { width: 28px; height: 28px; border-radius: 9px; }
.studio-brand .brand-dot::after { inset: 8px; border-radius: 3px; }
.studio-tag {
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: var(--accent-soft); color: #b9a8ff; border: 1px solid rgba(124, 92, 255, .3);
}
.studio-nav { display: flex; gap: 8px; flex-wrap: wrap; }

.studio-key-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.studio-key-form .input { flex: 1; min-width: 220px; font-family: var(--mono); font-size: 13px; }
.studio-remember { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; }

.studio-status { margin-top: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.studio-big { font-size: 20px; letter-spacing: -.01em; }
.studio-models { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.studio-models-label { font-size: 11px; color: var(--muted-2); letter-spacing: .04em; }
.studio-model-pills { display: flex; gap: 6px; flex-wrap: wrap; }

.studio-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.studio-prompt { min-height: 132px; resize: vertical; line-height: 1.6; }
.studio-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 16px; }
.studio-sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.studio-sizes .preset { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 6px; }
.studio-sizes .preset b { font-size: 12.5px; color: var(--text); }
.studio-sizes .preset span { font-size: 10.5px; color: var(--muted-2); }
.studio-sizes .preset.active b { color: #e3dbff; }
.studio-sizes .preset.active span { color: #b9a8ff; }
.studio-size-custom {
  display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap;
}
.studio-size-custom-label { font-size: 11.5px; color: var(--muted-2); margin-right: 2px; }
.studio-size-input {
  width: 82px; padding: 7px 8px; font-size: 12.5px; text-align: center;
  font-family: var(--mono); -moz-appearance: textfield;
}
.studio-size-input::-webkit-outer-spin-button,
.studio-size-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.studio-size-x { color: var(--muted-2); font-size: 12px; }
.studio-size-unit { color: var(--muted-2); font-size: 11.5px; margin-right: 2px; }
.studio-generate { width: 100%; margin-top: 16px; padding: 12px 16px; font-size: 14px; }
.studio-generate.busy svg { animation: spin 1.1s linear infinite; }
.studio-form-note { margin-top: 12px; }

.studio-stage {
  position: relative; border-radius: 14px; border: 1px solid var(--border-soft);
  background: radial-gradient(600px 240px at 50% 0%, rgba(124, 92, 255, .12), transparent 70%), #080c12;
  min-height: 320px; display: grid; place-items: center; padding: 16px; overflow: hidden;
}
.studio-empty, .studio-loading, .studio-error { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 34px 18px; }
.studio-empty b, .studio-loading b, .studio-error b { font-size: 14px; }
.studio-empty span, .studio-loading span { font-size: 12px; color: var(--muted); max-width: 320px; line-height: 1.7; }
.studio-empty-icon {
  width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center;
  background: var(--accent-soft); color: #b4a3ff; border: 1px solid rgba(124, 92, 255, .25);
}
.studio-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2.5px solid rgba(124, 92, 255, .18); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.studio-error-icon {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--danger-soft); color: #ffb3be; border: 1px solid rgba(255, 96, 118, .35);
  font-weight: 800; font-size: 17px;
}
.studio-error p { font-size: 12.5px; color: var(--muted); line-height: 1.7; max-width: 340px; }
.studio-error .studio-error-hint { color: var(--muted-2); font-size: 11.5px; }
.studio-error .studio-error-hint:empty { display: none; }

.studio-figure { margin: 0; width: 100%; display: grid; place-items: center; }
.studio-figure img {
  max-width: 100%; max-height: 460px; border-radius: 12px; display: block;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5); background: #0a0f16;
}
.studio-result-foot { margin-top: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.studio-result-prompt {
  flex: 1; min-width: 160px; font-size: 12.5px; color: var(--muted); line-height: 1.65;
  max-height: 62px; overflow: auto; word-break: break-word;
}
.studio-result-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.studio-history { margin-top: 16px; }
.studio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.studio-item {
  margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--panel); cursor: pointer; transition: border-color .16s, transform .1s;
}
.studio-item:hover { border-color: rgba(124, 92, 255, .45); }
.studio-item.active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(124, 92, 255, .35); }
.studio-thumb { background: #080c12; display: grid; place-items: center; overflow: hidden; min-height: 110px; }
/* 결과 비율 그대로 보여 준다 — 1:1 로 잘라 두면 16:9(1920×1080) 결과도 정사각형처럼 보인다. */
.studio-thumb img { width: 100%; height: auto; max-height: 300px; object-fit: contain; display: block; }
.studio-item figcaption { padding: 9px 10px 10px; }
.studio-item-prompt {
  font-size: 11.5px; color: var(--muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 33px; word-break: break-word;
}
.studio-item-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; }
.studio-item-meta span { font-size: 10px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .studio-wrap { padding: 22px 14px 60px; }
  .studio-main { grid-template-columns: minmax(0, 1fr); }
  .studio-status { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .studio-key-form .input { min-width: 100%; }
  .studio-key-form .btn { flex: 0 0 auto; }
  .studio-remember { flex: 1; justify-content: flex-end; white-space: nowrap; }
  .studio-big { font-size: 17px; }
  .studio-figure img { max-height: 340px; }
  .studio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* ------------------------------------------------------- video studio */

.studio-tag.video {
  background: rgba(36, 211, 165, .12); color: #6ff0cd; border-color: rgba(36, 211, 165, .3);
}

.studio-hints { margin-top: 14px; display: grid; gap: 8px; }
.studio-hints-label { font-size: 11.5px; color: var(--muted-2); }
.studio-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.studio-chips .chip { font-size: 11.5px; padding: 5px 10px; }
.studio-chips .chip:hover { border-color: rgba(124, 92, 255, .45); color: #cfc4ff; }

.video-stage { min-height: 340px; }
.studio-empty-icon.video { background: var(--mint-soft); color: var(--mint); border-color: rgba(36, 211, 165, .25); }

.video-timer { font-size: 22px; font-weight: 700; letter-spacing: .04em; color: #cfc4ff; margin-top: 4px; }
.video-progress {
  width: min(320px, 88%); height: 5px; border-radius: 999px;
  background: #1a2231; overflow: hidden; margin-top: 4px;
}
.video-progress > i {
  display: block; height: 100%; width: 2%; border-radius: inherit;
  background: linear-gradient(90deg, #7c5cff, #24d3a5);
  transition: width 1s linear;
}

.video-figure { width: 100%; }
.video-figure video {
  width: 100%; max-height: 460px; border-radius: 12px; display: block;
  background: #05080d; box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}

.video-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.video-thumb { position: relative; aspect-ratio: 16 / 9; }
.video-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.video-badge {
  position: absolute; right: 6px; bottom: 6px;
  padding: 2px 6px; border-radius: 6px; font-size: 10px;
  background: rgba(3, 6, 11, .78); color: #dfe6f2; border: 1px solid rgba(255, 255, 255, .12);
}
.video-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 20px; color: rgba(255, 255, 255, .82);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .6); pointer-events: none;
}

@media (max-width: 560px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-figure video { max-height: 300px; }
}

/* ---------------------------------------------------------------- misc */

.kv-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 12.5px; }
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--muted); }
.kv-row .v { font-weight: 550; }

.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form .input { width: auto; flex: 1; min-width: 90px; }

.footnote { margin-top: 26px; color: var(--muted-2); font-size: 11.5px; line-height: 1.8; }

@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-panel { padding: 24px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: sticky; top: 0; height: auto; flex-direction: row; align-items: center;
    padding: 10px 12px; gap: 10px; z-index: 40; border-right: none; border-bottom: 1px solid var(--border-soft);
    overflow: hidden;
  }
  .side-brand { padding: 0 8px 0 0; flex: none; }
  .side-brand .tag { display: none; }
  .nav { display: flex; gap: 6px; flex: 1; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav-label, .side-foot { display: none; }
  .nav-item { width: auto; padding: 8px 10px; font-size: 12.5px; white-space: nowrap; }
  .nav-item svg { width: 15px; height: 15px; }
  .main { padding: 18px 14px 48px; }
  .topbar { flex-direction: column; gap: 12px; margin-bottom: 18px; }
  .topbar h1 { font-size: 21px; }
  .top-actions { justify-content: flex-start; }
  .cards-3, .cards-2 { grid-template-columns: minmax(0, 1fr); }
  .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-hero { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .col-prefix, .col-rpm, .col-status { display: none; }
  .admin-chip { display: none; }
  tbody td, thead th { padding-left: 9px; padding-right: 9px; }
  .key-cell b { font-size: 12.5px; }
  .bar-cell { min-width: 108px; }
  .keys-table-wrap { display: none; }
  .key-cards { display: grid; gap: 10px; }
  .table-wrap > table { min-width: 640px; }
  .cards-3, .cards-2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 21px; margin-top: 8px; }
  .stat .delta { font-size: 10.5px; }
  .stat .icon { width: 26px; height: 26px; right: 12px; top: 12px; }
  .stat .icon svg { width: 13px; height: 13px; }
  .card { padding: 16px; }
  .modal { padding: 18px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
}

/* ── 이미지 스튜디오 · 다중 생성 항목 (2026-11-30) ─────────────────────── */
.studio-items { display: grid; gap: 10px; margin-top: 14px; }
.studio-item-row {
  border: 1px solid var(--border);
  background: rgba(9, 13, 20, .55);
  border-radius: 13px;
  padding: 11px 12px 12px;
  display: grid;
  gap: 9px;
}
.studio-item-row:focus-within { border-color: rgba(124, 92, 255, .45); }
.studio-item-head { display: flex; align-items: center; gap: 8px; }
.studio-item-no { font-size: 11.5px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.studio-item-tier { font-size: 10.5px; padding: 2px 8px; }
.studio-item-remove {
  margin-left: auto;
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.studio-item-remove:hover:not(:disabled) { color: #ff8f8f; border-color: rgba(255, 122, 122, .45); background: rgba(255, 90, 90, .08); }
.studio-item-remove:disabled { opacity: .28; cursor: not-allowed; }
.studio-item-prompt { min-height: 68px; resize: vertical; line-height: 1.55; font-size: 13px; }
.studio-item-prompt.invalid { border-color: rgba(255, 122, 122, .7); box-shadow: 0 0 0 1px rgba(255, 122, 122, .25); }
.studio-item-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.studio-item-size-select { flex: 0 0 auto; min-width: 178px; font-size: 12px; padding: 7px 10px; }
.studio-item-size-custom { flex: 1 1 auto; min-width: 190px; display: flex; align-items: center; gap: 6px; }
.studio-item-size-custom .studio-size-input { width: 64px; }
.studio-items-foot { display: flex; align-items: center; justify-content: flex-end; margin-top: 10px; }
.studio-add { display: inline-flex; align-items: center; gap: 7px; }
.studio-add:disabled { opacity: .45; cursor: not-allowed; }
.studio-item-cap { font-size: 10.5px; padding: 2px 7px; }
.studio-total {
  margin-top: 14px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  background: rgba(124, 92, 255, .05);
  font-size: 12.5px;
  color: var(--muted);
}
.studio-total.warn { border-color: rgba(255, 122, 122, .5); color: #ffb4b4; }
.studio-results { display: grid; gap: 12px; margin-top: 12px; }
.studio-results .studio-empty { padding: 34px 18px; }
.studio-run-card {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(8, 12, 18, .6);
  overflow: hidden;
  display: grid;
}
.studio-run-card[data-state="done"] { border-color: rgba(36, 211, 165, .35); }
.studio-run-card[data-state="error"] { border-color: rgba(255, 122, 122, .4); }
.studio-run-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px 0; }
.studio-run-badge { font-size: 10.5px; padding: 2px 8px; }
.studio-run-badge.accent { color: #cfc4ff; border-color: rgba(124, 92, 255, .5); }
.studio-run-badge.ok { color: #7ff0cd; border-color: rgba(36, 211, 165, .45); }
.studio-run-badge.warn { color: #ffb4b4; border-color: rgba(255, 122, 122, .45); }
.studio-run-media { display: grid; place-items: center; min-height: 150px; padding: 8px 11px; }
.studio-run-media img { width: 100%; height: auto; border-radius: 9px; display: block; }
.studio-run-wait, .studio-run-error { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 18px 8px; }
.studio-run-wait b { font-size: 12.5px; }
.studio-run-wait span { font-size: 11.5px; color: var(--muted-2); }
.studio-run-wait .studio-spinner { width: 26px; height: 26px; }
.studio-run-error b { font-size: 12.5px; }
.studio-run-error p { font-size: 11.5px; color: var(--muted); line-height: 1.6; max-width: 280px; }
.studio-run-error .studio-error-hint { color: var(--muted-2); font-size: 11px; }
.studio-run-error .studio-error-hint:empty { display: none; }
.studio-run-foot { padding: 0 11px 11px; display: grid; gap: 7px; align-items: center; }
.studio-run-prompt {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.studio-run-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.studio-run-meta span:first-child { font-size: 10.5px; color: var(--muted-2); }
.studio-run-foot .btn { justify-self: start; }

@media (min-width: 981px) {
  .studio-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-results .studio-empty { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .studio-item-size-select { min-width: 100%; }
  .studio-item-size-custom { min-width: 100%; }
  .studio-item-size-custom .studio-size-input { flex: 1; width: auto; }
}

/* 완료/실패한 카드에서 대기·오류 블록이 남지 않도록 (display:grid 가 [hidden] 을 덮어씀) */
.studio-run-wait[hidden],
.studio-run-error[hidden],
.studio-run-media img[hidden] { display: none !important; }

/* ------------------------------------------------------- novel studio */

.studio-tag.novel {
  background: rgba(245, 181, 68, .12); color: #ffd08a; border-color: rgba(245, 181, 68, .3);
}
.novel-version { font-size: 10.5px; padding: 2px 8px; }
.novel-dim { color: var(--muted-2); font-size: 11.5px; font-weight: 400; }

.novel-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.novel-tab {
  text-align: left; padding: 14px 16px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--border); background: rgba(13, 17, 24, .75); color: var(--muted);
  display: grid; gap: 4px; transition: border-color .16s, background .16s, color .16s;
}
.novel-tab b { font-size: 13.5px; color: var(--text); }
.novel-tab span { font-size: 11.5px; color: var(--muted-2); line-height: 1.55; }
.novel-tab:hover { border-color: #2b394d; }
.novel-tab.active {
  border-color: rgba(124, 92, 255, .55); background: linear-gradient(180deg, rgba(124, 92, 255, .16), rgba(124, 92, 255, .04));
  box-shadow: 0 0 0 1px rgba(124, 92, 255, .18) inset;
}
.novel-tab.active b { color: #e3dbff; }

.novel-bible { margin-top: 16px; }
.novel-bible-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.novel-span-2 { grid-column: 1 / -1; }
.novel-area { min-height: 96px; resize: vertical; line-height: 1.6; font-size: 13px; }
.novel-bible-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.novel-preset {
  border-color: rgba(245, 181, 68, .35); color: #ffd08a; background: rgba(245, 181, 68, .08);
}
.novel-preset:hover { border-color: rgba(245, 181, 68, .6); background: rgba(245, 181, 68, .14); }
.novel-preset-pick { width: auto; min-width: 210px; font-size: 12px; padding: 7px 10px; }
.novel-plan-note { margin-top: 10px; }
.novel-model-select { width: auto; min-width: 190px; font-size: 12px; padding: 6px 10px; }

.novel-panel { margin-top: 16px; }

.novel-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; margin-top: 6px; }
.novel-slot {
  border: 1px solid var(--border); background: rgba(9, 13, 20, .6); border-radius: 14px;
  padding: 12px; display: grid; gap: 9px; align-content: start;
}
.novel-slot:hover { border-color: rgba(124, 92, 255, .32); }
.novel-slot-head { display: flex; align-items: center; gap: 8px; }
.novel-slot-no { font-size: 11.5px; font-weight: 650; letter-spacing: .02em; color: var(--muted); }
.novel-slot-head .studio-item-remove { margin-left: auto; }
.novel-status { font-size: 10.5px; padding: 2px 8px; }
.novel-status.idle { color: var(--muted); }
.novel-status.running { background: var(--accent-soft); color: #c3b4ff; border-color: rgba(124, 92, 255, .35); }
.novel-status.running::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%;
  background: #b9a8ff; animation: novel-pulse 1s ease-in-out infinite;
}
.novel-status.done { background: var(--mint-soft); color: #6ff0cd; border-color: rgba(36, 211, 165, .3); }
.novel-status.error { background: var(--danger-soft); color: #ffadb7; border-color: rgba(255, 96, 118, .3); }
.novel-status.stopped { background: var(--amber-soft); color: #ffd08a; border-color: rgba(245, 181, 68, .3); }
@keyframes novel-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.novel-slot-title { font-size: 13px; font-weight: 600; }
.novel-slot-premise { min-height: 52px; resize: vertical; font-size: 12.5px; line-height: 1.55; }
.novel-slot-fields { display: flex; gap: 14px; flex-wrap: wrap; }
.novel-slot-fields label { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted-2); }
.novel-num { width: 74px; padding: 6px 8px; font-size: 12px; text-align: center; font-family: var(--mono); }

.novel-bar { height: 5px; border-radius: 999px; background: #1a2231; overflow: hidden; }
.novel-bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #7c5cff, #24d3a5); transition: width .35s ease; }
.novel-slot-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }

.novel-fold { border-top: 1px solid var(--border-soft); padding-top: 8px; }
.novel-fold > summary {
  cursor: pointer; font-size: 11.5px; color: var(--muted); list-style: none; display: flex; gap: 6px; align-items: center;
}
.novel-fold > summary::-webkit-details-marker { display: none; }
.novel-fold > summary::before { content: "▸"; color: var(--muted-2); font-size: 10px; transition: transform .15s; }
.novel-fold[open] > summary::before { transform: rotate(90deg); }
.novel-memo, .novel-body, .novel-prompt {
  margin-top: 8px; max-height: 320px; overflow: auto; font-size: 12px; line-height: 1.75;
  color: var(--muted); white-space: pre-wrap; word-break: break-word;
  background: #080c12; border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 12px;
}
.novel-body { color: #d7dfec; max-height: 380px; }
.novel-prompt { font-size: 11px; color: var(--muted-2); max-height: 260px; font-family: var(--mono); }
.novel-slot-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.novel-slot-actions .novel-dim { margin-left: auto; color: #ffadb7; font-size: 11px; }

.novel-slot-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.novel-run { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.novel-run-btn { padding: 12px 20px; font-size: 14px; }
.novel-run-btn.busy svg { animation: spin 1.1s linear infinite; }

.novel-focus-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.novel-blueprint-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.novel-blueprint-head b { font-size: 13px; }
.novel-blueprint-head .btn { margin-left: auto; }
.novel-blueprint { display: grid; gap: 8px; margin-top: 10px; max-height: 520px; overflow: auto; padding-right: 4px; }
.novel-bp-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: start; }
.novel-bp-no { font-size: 11.5px; color: var(--muted-2); padding-top: 9px; font-variant-numeric: tabular-nums; }
.novel-bp-fields { display: grid; gap: 6px; }
.novel-bp-input { font-size: 12px; padding: 7px 10px; }
.novel-bp-input[data-bp="event"] { border-color: rgba(124, 92, 255, .28); }

.novel-runmode { display: grid; gap: 8px; margin-top: 18px; }
.novel-radio {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(9, 13, 20, .5); cursor: pointer;
}
.novel-radio:has(input:checked) { border-color: rgba(124, 92, 255, .5); background: rgba(124, 92, 255, .08); }
.novel-radio input { margin-top: 3px; accent-color: var(--accent); }
.novel-radio span { display: grid; gap: 3px; }
.novel-radio b { font-size: 12.5px; }
.novel-radio em { font-style: normal; font-size: 11.5px; color: var(--muted-2); line-height: 1.55; }

.novel-focus-output { margin-top: 16px; }
.novel-chapters { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.novel-chapter {
  border: 1px solid var(--border); background: rgba(9, 13, 20, .6); border-radius: 14px;
  padding: 12px; display: grid; gap: 8px; align-content: start;
}
.novel-chapter-title { font-size: 13px; font-weight: 600; line-height: 1.45; }
.studio-empty-icon.novel { background: rgba(245, 181, 68, .12); color: #ffd08a; border-color: rgba(245, 181, 68, .3); }

@media (max-width: 900px) {
  .novel-tabs { grid-template-columns: minmax(0, 1fr); }
  .novel-bible-grid { grid-template-columns: minmax(0, 1fr); }
  .novel-focus-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .novel-slots, .novel-chapters { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .novel-focus-form { grid-template-columns: minmax(0, 1fr); }
  .novel-preset-pick { width: 100%; }
  .novel-bp-row { grid-template-columns: 40px minmax(0, 1fr); }
}

.novel-bulk {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px dashed var(--border); background: rgba(9, 13, 20, .45);
}
.novel-bulk label { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted-2); }

/* ------------------------------------------------------- dev team studio */

.studio-tag.devteam {
  background: rgba(36, 211, 165, .12); color: #6ff0cd; border-color: rgba(36, 211, 165, .3);
}
.devteam-version { font-size: 10.5px; padding: 2px 8px; }

.devteam-brief { margin-top: 16px; }
.devteam-brief-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.devteam-area-lg { min-height: 132px; resize: vertical; line-height: 1.65; font-size: 13px; }
.devteam-brief-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.devteam-preset {
  border-color: rgba(36, 211, 165, .35); color: #6ff0cd; background: rgba(36, 211, 165, .08);
}
.devteam-preset:hover { border-color: rgba(36, 211, 165, .6); background: rgba(36, 211, 165, .14); }
.devteam-preset-pick { width: auto; min-width: 250px; font-size: 12px; padding: 7px 10px; }

.devteam-spec { margin-top: 16px; }
.devteam-spec-area {
  min-height: 240px; resize: vertical; line-height: 1.65; font-size: 12.5px;
  font-family: var(--mono); color: #cfd8e6;
}
.devteam-panel { margin-top: 16px; }

.devteam-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; margin-top: 6px; }
.devteam-slot {
  border: 1px solid var(--border); background: rgba(9, 13, 20, .6); border-radius: 14px;
  padding: 12px; display: grid; gap: 9px; align-content: start;
}
.devteam-slot:hover { border-color: rgba(36, 211, 165, .32); }
.devteam-slot-head { display: flex; align-items: center; gap: 6px; }
.devteam-emoji {
  width: 38px; flex: none; padding: 6px 4px; text-align: center; font-size: 14px; line-height: 1;
}
.devteam-role { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; padding: 7px 9px; }
.devteam-slot-head .studio-item-remove { margin-left: 0; }
.devteam-status { font-size: 10.5px; padding: 2px 8px; white-space: nowrap; }
.devteam-status.idle { color: var(--muted); }
.devteam-status.running { background: var(--accent-soft); color: #c3b4ff; border-color: rgba(124, 92, 255, .35); }
.devteam-status.running::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%;
  background: #b9a8ff; animation: novel-pulse 1s ease-in-out infinite;
}
.devteam-status.done { background: var(--mint-soft); color: #6ff0cd; border-color: rgba(36, 211, 165, .3); }
.devteam-status.error { background: var(--danger-soft); color: #ffadb7; border-color: rgba(255, 96, 118, .3); }
.devteam-status.stopped { background: var(--amber-soft); color: #ffd08a; border-color: rgba(245, 181, 68, .3); }

.devteam-task { min-height: 68px; resize: vertical; font-size: 12px; line-height: 1.55; }
.devteam-slot-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.devteam-output { max-height: 520px; }
.devteam-slot-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.devteam-slot-actions .novel-dim { margin-left: auto; color: #ffadb7; font-size: 11px; text-align: right; }
.devteam-slot-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.devteam-bulk {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px dashed var(--border); background: rgba(9, 13, 20, .45);
}
.devteam-bulk label { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted-2); }

.devteam-run { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.devteam-run-btn { padding: 12px 20px; font-size: 14px; }
.devteam-run-btn.busy svg { animation: spin 1.1s linear infinite; }
.devteam-review-btn { padding: 12px 20px; font-size: 14px; }

.devteam-review { margin-top: 16px; }
.devteam-review-out { margin-top: 14px; }

@media (max-width: 900px) {
  .devteam-brief-grid { grid-template-columns: minmax(0, 1fr); }
  .devteam-slots { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------- exam bank studio */

.studio-tag.exam {
  background: rgba(124, 92, 255, .14); color: #c3b4ff; border-color: rgba(124, 92, 255, .34);
}
.exam-version { font-size: 10.5px; padding: 2px 8px; }

.exam-config { margin-top: 16px; }
.exam-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.exam-span-2 { grid-column: 1 / -1; }
.exam-inline { display: flex; align-items: center; gap: 8px; }
.exam-inline .select { flex: 1; min-width: 0; }
.exam-preset {
  border-color: rgba(124, 92, 255, .35); color: #c3b4ff; background: rgba(124, 92, 255, .08); white-space: nowrap;
}
.exam-preset:hover { border-color: rgba(124, 92, 255, .6); background: rgba(124, 92, 255, .16); }

.exam-blueprint-card { margin-top: 16px; }
.exam-blueprint-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.exam-bp { display: grid; gap: 7px; margin-top: 12px; max-height: 460px; overflow: auto; padding-right: 4px; }
.exam-bp-empty { margin: 4px 0; }
.exam-bp-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: start; }
.exam-bp-no { font-size: 11.5px; color: var(--muted-2); padding-top: 9px; font-variant-numeric: tabular-nums; }
.exam-bp-fields { display: grid; gap: 6px; }
.exam-bp-input { font-size: 12px; padding: 7px 10px; }
.exam-bp-input[data-trap] { border-color: rgba(245, 181, 68, .22); }

.exam-panel { margin-top: 16px; }
.exam-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-top: 6px; }
.exam-slot {
  border: 1px solid var(--border); background: rgba(9, 13, 20, .6); border-radius: 14px;
  padding: 12px; display: grid; gap: 9px; align-content: start;
}
.exam-slot:hover { border-color: rgba(124, 92, 255, .32); }
.exam-slot-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.exam-slot-no {
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: #c3b4ff;
  background: rgba(124, 92, 255, .12); border: 1px solid rgba(124, 92, 255, .3);
  border-radius: 8px; padding: 2px 8px;
}
.exam-count { font-size: 10.5px; padding: 2px 8px; }
.exam-status { font-size: 10.5px; padding: 2px 8px; margin-left: auto; }
.exam-status.idle { color: var(--muted); }
.exam-status.running { background: var(--accent-soft); color: #c3b4ff; border-color: rgba(124, 92, 255, .35); }
.exam-status.running::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%;
  background: #b9a8ff; animation: novel-pulse 1s ease-in-out infinite;
}
.exam-status.done { background: var(--mint-soft); color: #6ff0cd; border-color: rgba(36, 211, 165, .3); }
.exam-status.partial { background: var(--amber-soft); color: #ffd08a; border-color: rgba(245, 181, 68, .3); }
.exam-status.error { background: var(--danger-soft); color: #ffadb7; border-color: rgba(255, 96, 118, .3); }
.exam-status.stopped { background: var(--amber-soft); color: #ffd08a; border-color: rgba(245, 181, 68, .3); }
.exam-slot-issue { font-size: 12px; line-height: 1.55; color: #cfd8e6; }
.exam-slot-issue.empty { color: var(--muted-2); font-style: italic; }
.exam-slot-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.exam-dupflag { font-size: 11px; }
.exam-dupflag.warn { color: #ffd08a; }
.exam-questions { margin-top: 8px; max-height: 560px; overflow: auto; display: grid; gap: 10px; }
.exam-q { border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px; background: #080c12; }
.exam-q-head { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 4px; }
.exam-q-unit { font-size: 11px; color: #c3b4ff; }
.exam-q-dup { font-size: 10px; padding: 1px 6px; }
.exam-q-passage {
  font-size: 12px; color: #c9d4e4; background: rgba(124, 92, 255, .07);
  border-left: 3px solid rgba(124, 92, 255, .45); padding: 7px 9px; border-radius: 6px; margin: 5px 0;
}
.exam-q-stem { font-size: 12.5px; line-height: 1.65; color: #e4eaf4; }
.exam-q-choices { list-style: none; margin: 6px 0 0; padding: 0 0 0 4px; display: grid; gap: 3px; counter-reset: examchoice; }
.exam-q-choices li {
  font-size: 12px; color: var(--muted); line-height: 1.55; padding-left: 20px; position: relative;
  counter-increment: examchoice;
}
.exam-q-choices li::before {
  content: counter(examchoice, decimal) "."; position: absolute; left: 0; color: var(--muted-2); font-family: var(--mono); font-size: 11px;
}
.exam-q-answer { font-size: 11.5px; color: #6ff0cd; margin-top: 6px; font-weight: 600; }
.exam-q-expl, .exam-q-trap { font-size: 11.5px; line-height: 1.65; color: var(--muted); margin-top: 5px; }
.exam-q-expl b, .exam-q-trap b { color: #b9c6da; margin-right: 4px; }
.exam-q-trap { color: #d9b98a; }
.exam-slot-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.exam-slot-actions .novel-dim { margin-left: auto; color: #ffadb7; font-size: 11px; text-align: right; }

.exam-run { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.exam-run-btn { padding: 12px 20px; font-size: 14px; }
.exam-run-btn.busy svg { animation: spin 1.1s linear infinite; }

.exam-export { margin-top: 16px; }
.exam-export-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.exam-export-box {
  border: 1px solid var(--border-soft); border-radius: 12px; background: rgba(9, 13, 20, .55);
  padding: 11px 12px; display: grid; gap: 7px; align-content: start;
}
.exam-export-box b { font-size: 12.5px; }
.exam-export-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.exam-export-box .novel-dim { font-size: 11px; line-height: 1.6; }
.exam-check { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.exam-check input { accent-color: var(--accent); }

@media (max-width: 900px) {
  .exam-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exam-slots { grid-template-columns: minmax(0, 1fr); }
  .exam-export-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .exam-grid { grid-template-columns: minmax(0, 1fr); }
  .exam-span-2 { grid-column: auto; }
  .exam-export-grid { grid-template-columns: minmax(0, 1fr); }
  .exam-bp-row { grid-template-columns: 32px minmax(0, 1fr); }
}

/* ------------------------------------------------------- red team studio */

.studio-tag.redteam {
  background: rgba(255, 96, 118, .13); color: #ffadb7; border-color: rgba(255, 96, 118, .32);
}
.rt-version { font-size: 10.5px; padding: 2px 8px; }

.rt-target { margin-top: 16px; }
.rt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rt-span-2 { grid-column: 1 / -1; }
.rt-inline { display: flex; align-items: center; gap: 8px; }
.rt-inline .select { flex: 1; min-width: 0; }
.rt-preset {
  border-color: rgba(255, 96, 118, .35); color: #ffadb7; background: rgba(255, 96, 118, .08); white-space: nowrap;
}
.rt-preset:hover { border-color: rgba(255, 96, 118, .6); background: rgba(255, 96, 118, .16); }
.rt-area-lg { min-height: 220px; resize: vertical; line-height: 1.65; font-size: 12.5px; font-family: var(--mono); }

.rt-panel { margin-top: 16px; }
.rt-personas { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-top: 6px; }
.rt-persona {
  border: 1px solid var(--border); background: rgba(9, 13, 20, .6); border-radius: 14px;
  padding: 12px; display: grid; gap: 8px; align-content: start;
}
.rt-persona:hover { border-color: rgba(255, 96, 118, .3); }
.rt-persona.off { opacity: .62; }
.rt-persona-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rt-check { display: inline-flex; align-items: center; cursor: pointer; }
.rt-check input { width: 15px; height: 15px; accent-color: var(--mint); cursor: pointer; }
.rt-emoji { width: 38px; flex: none; padding: 6px 4px; text-align: center; font-size: 14px; line-height: 1; }
.rt-role { flex: 1; min-width: 90px; font-size: 12.5px; font-weight: 600; padding: 7px 9px; }
.rt-lens { min-height: 62px; resize: vertical; font-size: 11.5px; line-height: 1.55; }
.rt-persona-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.rt-status { font-size: 10.5px; padding: 2px 8px; }
.rt-status.idle { color: var(--muted); }
.rt-status.running { background: var(--accent-soft); color: #c3b4ff; border-color: rgba(124, 92, 255, .35); }
.rt-status.running::before {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%;
  background: #b9a8ff; animation: novel-pulse 1s ease-in-out infinite;
}
.rt-status.done { background: var(--mint-soft); color: #6ff0cd; border-color: rgba(36, 211, 165, .3); }
.rt-status.error { background: var(--danger-soft); color: #ffadb7; border-color: rgba(255, 96, 118, .3); }
.rt-status.stopped { background: var(--amber-soft); color: #ffd08a; border-color: rgba(245, 181, 68, .3); }
.rt-sevpill { font-size: 10.5px; padding: 2px 8px; }
.rt-sevpill.critical { background: var(--danger-soft); color: #ffadb7; border-color: rgba(255, 96, 118, .45); font-weight: 700; }
.rt-sevpill.high { background: var(--amber-soft); color: #ffd08a; border-color: rgba(245, 181, 68, .4); }
.rt-sevpill.medium { background: rgba(124, 92, 255, .12); color: #c3b4ff; border-color: rgba(124, 92, 255, .34); }
.rt-output { max-height: 520px; }
.rt-persona-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rt-persona-actions .novel-dim { margin-left: auto; color: #ffadb7; font-size: 11px; text-align: right; }
.rt-persona-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.rt-run { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.rt-run-btn { padding: 12px 20px; font-size: 14px; }
.rt-run-btn.busy svg { animation: spin 1.1s linear infinite; }
.rt-report-btn { padding: 12px 20px; font-size: 14px; }

.rt-report { margin-top: 16px; }
.rt-report-out { margin-top: 14px; }
.rt-sevbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.rt-sev {
  display: inline-flex; align-items: baseline; gap: 7px; font-size: 11.5px;
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; color: var(--muted);
}
.rt-sev b { font-size: 14px; font-variant-numeric: tabular-nums; }
.rt-sev.critical { border-color: rgba(255, 96, 118, .42); color: #ffb3bc; background: rgba(255, 96, 118, .08); }
.rt-sev.high { border-color: rgba(245, 181, 68, .4); color: #ffd08a; background: rgba(245, 181, 68, .07); }
.rt-sev.medium { border-color: rgba(124, 92, 255, .34); color: #c3b4ff; background: rgba(124, 92, 255, .07); }
.rt-sev.unknown { border-style: dashed; }

@media (max-width: 900px) {
  .rt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-personas { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .rt-grid { grid-template-columns: minmax(0, 1fr); }
  .rt-span-2 { grid-column: auto; }
}

/* ------------------------------------------------- retry-failed (all studios) */

.retry-failed {
  border-color: rgba(245, 181, 68, .45) !important;
  color: #ffd08a !important;
  background: rgba(245, 181, 68, .09) !important;
}
.retry-failed:hover:not(:disabled) {
  border-color: rgba(245, 181, 68, .78) !important;
  background: rgba(245, 181, 68, .18) !important;
}

/* ------------------------------------------------- dev-team 계약서 · 위반 검사 (2026-12-02) */

.devteam-contract { margin-top: 16px; }
.devteam-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted-2);
}
.devteam-check input[type="checkbox"] { width: 13px; height: 13px; accent-color: #24d3a5; }
.devteam-gate { margin-top: 16px; }
.devteam-gate-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.devteam-gate-row {
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .015);
}
.devteam-gate-row.fail { border-color: rgba(255, 96, 118, .35); background: rgba(255, 96, 118, .05); }
.devteam-gate-row.warn { border-color: rgba(245, 181, 68, .3); background: rgba(245, 181, 68, .04); }
.devteam-gate-row.pass { border-color: rgba(36, 211, 165, .22); }
.devteam-gate-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.devteam-gate-role { font-size: 12.5px; font-weight: 600; }
.devteam-gate-head .novel-dim { font-size: 11px; }
.devteam-gate-head .btn { margin-left: auto; }
.devteam-gate-chip { font-size: 10px; padding: 1px 7px; }
.devteam-gate-chip.fail { background: var(--danger-soft); color: #ffadb7; border-color: rgba(255, 96, 118, .35); }
.devteam-gate-chip.warn { background: var(--amber-soft); color: #ffd08a; border-color: rgba(245, 181, 68, .32); }
.devteam-gate-chip.pass { background: var(--mint-soft); color: #6ff0cd; border-color: rgba(36, 211, 165, .3); }
.devteam-gate-issues {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
  line-height: 1.5;
}
.devteam-gate-issues li::before { content: "•"; margin-right: 6px; }
.devteam-gate-issues li.error { color: #ffadb7; }
.devteam-gate-issues li.warn { color: #ffd08a; }
.devteam-gate-issues li.ok { color: #6ff0cd; }
.devteam-gate-ok { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; }
.devteam-gate-row.pass .devteam-gate-ok { color: #6ff0cd; }
.devteam-gate-banner {
  border: 1px solid rgba(245, 181, 68, .3);
  background: rgba(245, 181, 68, .06);
  color: #ffd08a;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 11.5px;
  line-height: 1.65;
}
.devteam-gate-banner.warn { border-color: rgba(255, 96, 118, .32); background: rgba(255, 96, 118, .06); color: #ffadb7; }
.devteam-gate-banner code { font-size: 11px; }
.footnote.warn { color: #ffd08a; }
