:root { color-scheme: dark; font-family: Inter, Pretendard, "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #0d1117; color: #e9edf5; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 20% -10%, #252d45 0, transparent 32rem), #0d1117; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
img { max-width: 100%; }
.topbar { height: 80px; padding: 0 clamp(22px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #222b3a; background: #10151ee8; position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; background: linear-gradient(140deg, #f7bd79, #ed706c); color: #211b1b; border-radius: 13px; font-weight: 900; font-size: 25px; box-shadow: 0 8px 30px #ec84602b; }
.brand strong { display: block; font-size: 17px; line-height: 1.15; letter-spacing: -.03em; }
.brand span { display: block; color: #8792a5; font-size: 12px; margin-top: 3px; }
.top-actions { display: flex; align-items: center; gap: 18px; }
.status-pill { font-size: 12px; color: #c6d1de; border: 1px solid #334253; border-radius: 100px; padding: 7px 11px; white-space: nowrap; }
.status-pill.online { color: #9ee5bb; border-color: #345a47; background: #153026; }
.status-pill.offline { color: #f2b9a6; border-color: #684337; background: #33221e; }
.text-button { background: none; border: 0; color: #aeb8c6; padding: 7px 0; font-size: 13px; }
.text-button:hover { color: white; }
.layout { width: min(1510px, 100%); margin: 0 auto; padding: 34px clamp(20px, 4vw, 58px) 70px; display: grid; grid-template-columns: minmax(340px, 480px) minmax(0, 1fr); gap: 24px; align-items: start; }
.workspace-right { display: grid; gap: 24px; min-width: 0; }
.panel { border: 1px solid #273142; border-radius: 20px; padding: 26px; background: linear-gradient(165deg, #181f2b, #131a24 75%); box-shadow: 0 20px 60px #0002; min-width: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 23px; }
.eyebrow { margin: 0 0 5px; color: #f2ae88; font-size: 10px; font-weight: 800; letter-spacing: .17em; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 29px; line-height: 1.15; letter-spacing: -.05em; margin-bottom: 0; }
h2 { font-size: 21px; letter-spacing: -.04em; margin-bottom: 0; }
.muted { color: #91a0b2; }
.sync-label { color: #8ea0b6; font-size: 11px; white-space: nowrap; padding-top: 6px; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #6ce5a5; box-shadow: 0 0 12px #6ce5a5; margin-right: 5px; }
.mode-tabs { display: flex; background: #0e141e; padding: 5px; border: 1px solid #2b3543; border-radius: 12px; gap: 3px; margin-bottom: 25px; }
.mode-tabs button { flex: 1; border: 0; padding: 11px 5px; border-radius: 9px; color: #91a1b4; background: transparent; font-size: 13px; font-weight: 600; white-space: nowrap; }
.mode-tabs button.active { background: #2d3c50; color: white; box-shadow: 0 2px 12px #0004; }
.field { margin-bottom: 18px; }
.field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.field-heading label, .settings-grid label { font-size: 13px; font-weight: 700; color: #d9e2ed; }
.field-heading span { color: #8290a2; font-size: 11px; text-align: right; }
textarea, input[type="number"], input[type="password"], select { width: 100%; background: #0d141e; color: #ecf1f7; border: 1px solid #344153; border-radius: 10px; outline: 0; }
textarea { padding: 14px 15px; resize: vertical; min-height: 155px; line-height: 1.55; }
textarea:focus, input:focus, select:focus { border-color: #e79b77; box-shadow: 0 0 0 3px #e79b7720; }
input[type="number"], select, input[type="password"] { min-height: 42px; margin-top: 8px; padding: 0 12px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 17px; }
.secondary-settings { margin-bottom: 19px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; margin: 4px 0 17px; }
.check-row input { accent-color: #f3a77e; width: 17px; height: 17px; }
.helper { color: #8999aa; font-size: 11px; line-height: 1.6; margin: 9px 0 18px; }
.helper code { color: #ebbcaa; background: #2b2931; border-radius: 4px; padding: 2px 4px; }
.hardware-note { border-top: 1px solid #283443; padding-top: 16px; margin-top: 18px; }
.primary, .secondary { border: 1px solid transparent; border-radius: 10px; min-height: 44px; padding: 0 16px; font-size: 13px; font-weight: 750; }
.primary { background: linear-gradient(110deg, #ffc08a, #f3827c); color: #211a1b; }
.primary:hover:not(:disabled) { filter: brightness(1.08); }
.secondary { color: #d7e2ee; background: #243246; border-color: #35475d; }
.secondary:hover { background: #2d4057; }
.generate-button { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 0 17px; font-size: 15px; }
.generate-button span:last-child { font-size: 19px; }
.error-message { color: #ffb0a5; font-size: 12px; margin: 10px 0 0; line-height: 1.5; }
.references-section { margin-bottom: 22px; }
.references { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.reference-card { position: relative; border-radius: 11px; background: #101722; border: 1px solid #334153; overflow: hidden; }
.reference-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.reference-card .slot { position: absolute; top: 6px; left: 6px; background: #0b101acc; color: #fff; padding: 3px 6px; border-radius: 5px; font-size: 10px; }
.reference-card .ref-actions { display: flex; justify-content: space-between; align-items: center; padding: 5px 6px; }
.reference-card button { border: 0; background: none; color: #c8d6e5; font-size: 11px; padding: 3px; }
.reference-card button:hover { color: #fff; }
.upload-zone { border: 1px dashed #526177; border-radius: 12px; min-height: 90px; margin-top: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; color: #cbd7e6; cursor: pointer; background: #172231; }
.upload-zone.dragover { border-color: #f3a77e; background: #292e38; }
.upload-zone .upload-icon { font-size: 22px; line-height: 1; color: #f4ad85; }
.upload-zone strong { font-size: 12px; }
.upload-zone small { color: #8091a4; font-size: 10px; }
.jobs-list { display: grid; gap: 12px; }
.empty { border: 1px dashed #334052; border-radius: 12px; padding: 31px 16px; text-align: center; color: #8695a8; font-size: 13px; margin: 0; }
.job { border: 1px solid #2e3b4d; border-radius: 14px; background: #121a25; padding: 15px; }
.job-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.job-top strong { font-size: 13px; }
.job time { font-size: 11px; color: #71849a; white-space: nowrap; }
.job-prompt { font-size: 12px; line-height: 1.5; color: #bac7d7; margin: 0 0 12px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-stage { color: #d4dfec; font-size: 11px; display: flex; justify-content: space-between; gap: 10px; }
.job-stage span:last-child { color: #f1b68f; white-space: nowrap; }
.progress-track { width: 100%; height: 7px; border-radius: 7px; background: #2a3648; overflow: hidden; margin: 10px 0 10px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #e87976, #ffc88e); border-radius: inherit; transition: width .4s; }
.job-foot { display: flex; justify-content: space-between; color: #8293a6; font-size: 11px; gap: 8px; }
.job.failed { border-color: #6d3d42; }
.job.failed .job-stage { color: #ffaca5; }
.job-result, .gallery-card img, .image-dialog img { background: repeating-conic-gradient(#d9dde2 0 25%, #aeb6bf 0 50%) 0 0 / 20px 20px; }
.job-result { width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; margin-top: 12px; cursor: zoom-in; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gallery .empty { grid-column: 1 / -1; }
.gallery-card { border: 1px solid #354052; border-radius: 11px; overflow: hidden; background: #121a25; text-align: left; padding: 0; color: inherit; }
.gallery-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.gallery-card div { padding: 9px; }
.gallery-card strong { font-size: 11px; line-height: 1.4; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gallery-card span { display: block; font-size: 10px; color: #8797aa; margin-top: 3px; }
#more-gallery { margin-top: 17px; width: 100%; }
dialog { border: 1px solid #3b4b60; border-radius: 16px; color: #eef3fa; background: #141c28; box-shadow: 0 30px 100px #000b; max-width: calc(100vw - 26px); }
dialog::backdrop { background: #03070cc9; backdrop-filter: blur(6px); }
.image-dialog { width: min(900px, 96vw); max-height: 94vh; padding: 17px; text-align: center; }
.image-dialog img { max-width: 100%; max-height: 72vh; object-fit: contain; display: block; margin: auto; }
.image-dialog #image-caption { text-align: left; font-size: 12px; color: #b9c8d8; margin: 12px 0; }
.image-dialog .secondary { display: inline-flex; align-items: center; text-decoration: none; }
.dialog-close { position: absolute; right: 13px; top: 9px; border: 0; background: #1d2b3bcc; color: white; border-radius: 7px; font-size: 23px; width: 31px; height: 31px; }
.draw-dialog { width: min(950px, 96vw); max-height: 94vh; padding: 20px; }
.draw-head { display: flex; justify-content: space-between; padding-right: 35px; }
.draw-head h2 { margin: 0 0 5px; }
.draw-head p { font-size: 12px; }
.draw-canvas-wrap { max-height: 72vh; overflow: auto; text-align: center; background: #0b1119; border-radius: 9px; }
.draw-canvas-wrap canvas { max-width: 100%; height: auto; cursor: crosshair; touch-action: none; display: block; margin: auto; }
.draw-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 14px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #344b60; color: white; border: 1px solid #55728e; border-radius: 9px; padding: 10px 16px; box-shadow: 0 12px 30px #0008; z-index: 100; font-size: 12px; }
.login-page { display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); border: 1px solid #334053; background: #171f2b; border-radius: 22px; padding: 34px; box-shadow: 0 24px 70px #0006; }
.login-card .brand-mark { margin-bottom: 25px; }
.login-card h1 { margin-bottom: 10px; }
.login-card .muted { font-size: 13px; line-height: 1.55; margin-bottom: 26px; }
.login-card label { display: block; font-size: 12px; font-weight: 700; }
.login-card input { margin-bottom: 17px; }
.login-card .primary { width: 100%; }
@media (max-width: 1020px) { .layout { grid-template-columns: 1fr; max-width: 760px; } }
@media (max-width: 600px) { .topbar { height: 66px; padding: 0 16px; } .status-pill { display: none; } .layout { padding: 16px 12px 45px; gap: 13px; } .workspace-right { gap: 13px; } .panel { padding: 18px; border-radius: 15px; } .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sync-label { white-space: normal; text-align: right; } }
