:root {
    color-scheme: dark;
    font-family: Inter, Pretendard, "Noto Sans KR", system-ui, sans-serif;
    --bg: #080b12; --surface: #10151f; --surface-2: #151c28; --line: #283141;
    --text: #f2f5f7; --muted: #8d98a8; --accent: #d9ff63; --accent-ink: #121805;
    --blue: #78a6ff; --danger: #ff7f86; --warning: #ffc46b;
    background: var(--bg); color: var(--text);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: radial-gradient(circle at 14% 0%, #172219 0, transparent 28rem), var(--bg); }
body { margin: 0; min-height: 100vh; background: linear-gradient(140deg, rgba(217,255,99,.025), transparent 45%); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; min-height: 66px; padding: 0 30px; background: rgba(8,11,18,.88); border-bottom: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(18px); }
.topbar > div { display: flex; align-items: center; }
.topbar strong { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; letter-spacing: -.02em; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px rgba(217,255,99,.75); }
.subtitle { margin-left: 13px; padding-left: 13px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; }
nav { display: flex; align-items: center; gap: 3px; }
nav a, .logout-form button { color: #aab3bf; text-decoration: none; padding: 8px 12px; border-radius: 999px; border: 0; background: transparent; font-size: 13px; cursor: pointer; }
nav a.active, nav a:hover, .logout-form button:hover { color: white; background: #1b2330; }
.logout-form { margin: 0 0 0 5px; }
.container { width: min(1420px, calc(100% - 42px)); margin: 0 auto 80px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 64px 4px 32px; }
.hero h1 { max-width: 780px; margin: 8px 0 14px; font-size: clamp(36px, 5vw, 70px); line-height: .98; letter-spacing: -.055em; }
.hero p { max-width: 730px; margin: 0; color: var(--muted); line-height: 1.7; }
.compact-hero { padding-top: 45px; }
.compact-hero h1 { font-size: clamp(34px, 4vw, 52px); }
.eyebrow { color: var(--accent); font: 700 10px/1.2 ui-monospace, monospace; letter-spacing: .16em; }
.vault-badge { display: flex; align-items: center; gap: 9px; border: 1px solid #334027; border-radius: 999px; padding: 10px 14px; color: #dffb8a; background: #151b12; font-size: 12px; white-space: nowrap; }
.vault-badge i, .live-dot::before { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(217,255,99,.7); }
.notice { margin: 0 0 16px; padding: 13px 16px; border-radius: 10px; font-size: 13px; }
.warning { color: #ffdc9f; background: #261c0c; border: 1px solid #55401c; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.stats-grid article { min-height: 92px; padding: 18px; background: rgba(16,21,31,.88); border: 1px solid var(--line); border-radius: 14px; }
.stats-grid span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.stats-grid strong { display: block; margin-top: 10px; font: 600 23px/1 ui-monospace, monospace; }
.studio-grid { display: grid; grid-template-columns: minmax(480px, .82fr) minmax(520px, 1.18fr); gap: 12px; align-items: start; }
.panel { margin-top: 12px; padding: 24px; background: rgba(16,21,31,.94); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 70px rgba(0,0,0,.18); }
.live-panel { position: sticky; top: 78px; min-height: 660px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 2px 0 15px; }
.section-heading > div { display: flex; align-items: center; gap: 10px; }
.section-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.section-heading > span { color: var(--muted); font-size: 11px; }
.section-heading:not(:first-child) { margin-top: 28px; }
.step { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #3a4631; border-radius: 8px; color: var(--accent); font: 700 10px/1 ui-monospace, monospace; }
.dropzone { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 20px; text-align: center; border: 1px dashed #424d5e; border-radius: 14px; color: #d9dfe6; background: #0c1119; cursor: pointer; transition: .2s ease; outline: none; }
.dropzone:hover, .dropzone:focus, .dropzone.dragging { border-color: var(--accent); background: rgba(217,255,99,.045); transform: translateY(-1px); }
.dropzone span { color: var(--muted); font-size: 11px; }
.drop-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #3a4631; border-radius: 50%; color: var(--accent); font-size: 23px; }
.reference-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.reference-card { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #090d13; }
.reference-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reference-card button { position: absolute; top: 5px; right: 5px; width: 25px; height: 25px; padding: 0; border: 1px solid #ffffff30; border-radius: 50%; color: white; background: #080b12cc; cursor: pointer; }
label { display: flex; flex-direction: column; gap: 7px; margin-top: 13px; color: #c9d0d9; font-size: 12px; }
.hint { color: var(--muted); font-size: 10px; font-weight: 400; }
input, textarea, select { width: 100%; border: 1px solid #313b4a; border-radius: 9px; background: #0a0f17; color: var(--text); padding: 10px 11px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: #819c42; box-shadow: 0 0 0 3px rgba(217,255,99,.08); }
input[readonly] { color: #aeb7c3; background: #111722; cursor: not-allowed; }
textarea { resize: vertical; line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 12px; }
.check { flex-direction: row; align-items: center; align-self: end; min-height: 39px; }
.check input { width: 16px; accent-color: var(--accent); }
.estimate-card { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-top: 20px; padding: 16px; border: 1px solid #35422b; border-radius: 12px; background: linear-gradient(120deg, rgba(217,255,99,.09), rgba(217,255,99,.025)); }
.estimate-card span { display: block; color: #b9c5a1; font-size: 11px; }
.estimate-card strong { display: block; margin-top: 5px; color: var(--accent); font: 700 23px/1 ui-monospace, monospace; }
.estimate-card small { max-width: 230px; color: var(--muted); line-height: 1.45; text-align: right; }
.privacy-line { margin: 13px 1px; color: #87909c; font-size: 10px; line-height: 1.5; }
button { border: 0; border-radius: 9px; padding: 10px 14px; color: white; background: #263142; font-weight: 650; cursor: pointer; }
button:hover { filter: brightness(1.12); }
button:disabled { opacity: .4; cursor: not-allowed; }
.primary { width: 100%; padding: 14px 18px; color: var(--accent-ink); background: var(--accent); font-weight: 800; }
.actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; }
.muted { color: var(--muted); }
.live-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--accent) !important; font: 700 9px/1 ui-monospace, monospace; letter-spacing: .1em; }
.live-actions { display: flex; align-items: center; gap: 8px; }.live-actions button { padding: 6px 9px; font-size: 10px; }
.live-dot::before { content: ""; display: block; }
.batch-summary { padding: 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; line-height: 1.6; }
.summary-line { margin-top: 9px; }
.status-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 5px 8px; border-radius: 999px; background: #1c2532; color: #b8c3d0; font: 600 10px/1 ui-monospace, monospace; }
.pill.good { color: #dfff7d; background: #1c2814; }.pill.bad { color: #ffacb1; background: #32191c; }.pill.running { color: #a9c5ff; background: #17233a; }.pill.cancelled { color: #d4c3ff; background: #28203c; }
.result-gallery { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.result-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #0b1018; }
.result-image { position: relative; aspect-ratio: 1; background: #0a0e15; }
.result-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result-image .job-state { position: absolute; top: 8px; left: 8px; padding: 5px 7px; border-radius: 6px; background: #080b12dd; font: 700 9px/1 ui-monospace, monospace; }
.result-placeholder { height: 100%; display: grid; place-items: center; padding: 25px; color: var(--muted); text-align: center; font-size: 12px; }
.result-body { padding: 11px; }
.result-meta { display: flex; justify-content: space-between; color: var(--muted); font: 10px/1.3 ui-monospace, monospace; }
.result-prompt { height: 35px; overflow: hidden; margin: 8px 0; color: #cbd2dc; font-size: 11px; line-height: 1.55; }
.result-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.result-actions button, .result-actions a { padding: 6px 8px; border-radius: 6px; color: #dce3ec; background: #1b2430; text-decoration: none; font-size: 10px; }
.result-gallery.detail-jobs { grid-template-columns: 1fr; }
.result-card.detailed { display: grid; grid-template-columns: minmax(230px,.62fr) minmax(0,1fr); }
.result-card.detailed .result-prompt { height: auto; max-height: 78px; }
.job-safe-error { margin: 10px 0; padding: 9px 10px; border: 1px solid #5b3036; border-radius: 8px; color: #ffc0c4; background: #251417; font-size: 11px; line-height: 1.5; }
.job-audit { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; overflow: hidden; margin: 10px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--line); }
.job-audit > div { min-width: 0; padding: 8px; background: #101721; }
.job-audit dt { color: var(--muted); font-size: 9px; }
.job-audit dd { overflow-wrap: anywhere; margin: 4px 0 0; color: #dce2ea; font: 10px/1.35 ui-monospace,monospace; }
.batch-audit { grid-template-columns: repeat(5,minmax(0,1fr)); margin-top: 18px; }
.batch-prompt { margin: 12px 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #0b1018; }
.batch-prompt span { color: var(--muted); font-size: 10px; }
.batch-prompt p { margin: 7px 0 0; color: #d4dae2; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.empty { grid-column: 1/-1; min-height: 180px; display: grid; place-items: center; padding: 24px; color: #717c8b; border: 1px dashed #303948; border-radius: 12px; text-align: center; }
.history-list { display: grid; gap: 8px; }
.history-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; color: inherit; background: #0d121b; }
.history-row:hover { border-color: #455266; }
.history-summary { display: grid; grid-template-columns: 1.35fr .8fr 1fr 1.35fr; align-items: center; gap: 14px; min-width: 0; color: inherit; text-decoration: none; }
.history-summary strong, .history-summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-row small { display: block; margin-top: 5px; color: var(--muted); }
.settings-list > div { display: grid; grid-template-columns: minmax(180px,.7fr) 1fr; padding: 13px 0; border-bottom: 1px solid var(--line); }
.settings-list dt { color: var(--muted); }.settings-list dd { margin: 0; }
.settings-form { display: grid; }
.settings-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 14px; }
.settings-section { margin-top: 36px !important; padding-top: 28px; border-top: 1px solid var(--line); }
.active-price { min-height: 100px; padding: 16px; border: 1px solid #35422b; border-radius: 12px; background: #0d130d; }
.active-price .empty { min-height: 66px; }
.price-head { display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.price-head strong { color: var(--accent); font: 700 16px/1.2 ui-monospace,monospace; }
.price-head span { color: var(--muted); font: 11px/1.2 ui-monospace,monospace; }
.price-rates { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin-top: 15px; }
.price-rates span { padding: 10px; border: 1px solid #293329; border-radius: 8px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.price-rates b { display: block; color: #e5eada; font: 700 12px/1.4 ui-monospace,monospace; }
.price-toggle { margin: 22px 0 10px; padding: 13px; border: 1px solid #3a4631; border-radius: 10px; background: rgba(217,255,99,.04); }
.new-price-fields { min-width: 0; margin: 6px 0 0; padding: 18px; border: 1px solid #35422b; border-radius: 12px; }
.new-price-fields legend { padding: 0 7px; color: var(--accent); font-size: 12px; font-weight: 700; }
.price-inputs { grid-template-columns: repeat(3,minmax(0,1fr)); }
.matrix-head { display: flex; justify-content: space-between; margin: 22px 2px 8px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.price-matrix { display: grid; gap: 6px; }
.matrix-row { display: grid; grid-template-columns: minmax(130px,.55fr) repeat(2,minmax(0,1fr)); align-items: end; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #0b1018; }
.matrix-row > strong { align-self: center; color: #dce3d0; font: 700 11px/1.4 ui-monospace,monospace; }
.matrix-row > strong small { display: block; color: var(--muted); font-size: 9px; font-weight: 500; }
.matrix-row label { margin-top: 0; }
.settings-save { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 24px; }
.settings-save p { margin: 0; }
.settings-submit { width: auto; min-width: 180px; }
.login-page { display: grid; place-items: center; padding: 24px; }
.login-shell { width: min(420px,100%); }
.login-card { padding: 34px; border: 1px solid #333d4b; border-radius: 22px; background: rgba(16,21,31,.96); box-shadow: 0 35px 110px #0008; }
.login-card h1 { margin: 9px 0; font-size: 36px; letter-spacing: -.04em; }.login-card p { margin: 0 0 20px; color: var(--muted); }
.login-card form { display: grid; gap: 14px; }.login-card small { display: block; margin-top: 18px; color: #727d8b; line-height: 1.5; }
.vault-mark { float: right; color: #7c8b62; font: 700 11px/1 ui-monospace,monospace; }.login-error { margin: 12px 0; color: #ffb0b4; font-size: 12px; }
.detail-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }.detail-head h1 { margin: 5px 0; }.detail-jobs { margin-top: 20px; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: min(420px,calc(100vw - 40px)); padding: 12px 15px; border: 1px solid #3d4958; border-radius: 10px; background: #141c27; color: white; box-shadow: 0 18px 50px #0008; font-size: 12px; animation: toast-in .18s ease-out; }
.toast.error { border-color: #66343a; background: #281619; color: #ffc2c5; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 1020px) { .studio-grid { grid-template-columns: 1fr; }.live-panel { position: static; }.history-summary { grid-template-columns: 1fr 1fr; }.batch-audit { grid-template-columns: repeat(3,minmax(0,1fr)); }.settings-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.price-rates { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 680px) { .topbar { padding: 10px 15px; align-items: flex-start; gap: 9px; flex-direction: column; }.subtitle { display: none; }nav { width: 100%; overflow-x: auto; }.container { width: min(100% - 20px,1420px); }.hero { padding: 38px 3px 22px; align-items: flex-start; flex-direction: column; }.hero h1 { font-size: 42px; }.stats-grid { grid-template-columns: repeat(2,1fr); }.studio-grid { display: block; }.panel { padding: 17px; }.form-grid, .settings-grid, .price-inputs { grid-template-columns: 1fr; }.result-gallery { grid-template-columns: 1fr; }.result-card.detailed { grid-template-columns: 1fr; }.job-audit, .batch-audit { grid-template-columns: repeat(2,minmax(0,1fr)); }.reference-grid { grid-template-columns: repeat(2,1fr); }.estimate-card { align-items: flex-start; flex-direction: column; }.estimate-card small { text-align: left; }.history-row { grid-template-columns: 1fr; }.history-row > button { justify-self: end; }.history-summary { grid-template-columns: 1fr; }.price-rates { grid-template-columns: 1fr 1fr; }.matrix-row { grid-template-columns: 1fr; }.settings-save { align-items: stretch; flex-direction: column; }.settings-submit { width: 100%; }.login-card { padding: 25px; } }
