/* 디자인 스튜디오 */
.studio { display: flex; flex-direction: column; gap: 10px; }
.st-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 8px 10px; box-shadow: var(--shadow-1); }
.st-top .st-name { flex: 1 1 160px; min-width: 120px; border: 0; background: transparent; font-weight: 750; font-size: 16px; padding: 6px 8px; border-radius: 8px; min-height: 40px; }
.st-top .st-name:hover, .st-top .st-name:focus { background: var(--surface-3); outline: none; }
.st-info { font-size: 12px; color: var(--text-3); font-weight: 600; white-space: nowrap; }
.st-main { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); min-height: 0; }
@media (min-width: 1100px) { .st-main { grid-template-columns: 250px minmax(0, 1fr) 290px; height: calc(100vh - 168px); min-height: 520px; } .st-left, .st-right { overflow-y: auto; } }
.st-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px; box-shadow: var(--shadow-1); min-width: 0; }
.st-panel h4 { margin: 4px 0 8px; font-size: 12.5px; color: var(--text-3); font-weight: 750; letter-spacing: .02em; display: flex; align-items: center; gap: 6px; }
.st-panel h4:not(:first-child) { margin-top: 16px; }
.st-tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.st-tool { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); font-size: 11.5px; font-weight: 650; color: var(--text-2); min-height: 56px; justify-content: center; }
.st-tool:hover { border-color: var(--brand-100); background: var(--brand-50); color: var(--brand-t); }
.st-canvas { position: relative; background: repeating-conic-gradient(var(--surface-3) 0% 25%, var(--bg) 0% 50%) 50% / 20px 20px; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: auto; min-height: 340px; display: flex; align-items: flex-start; justify-content: center; padding: 18px; }
@media (max-width: 1099.98px) { .st-canvas { max-height: 62vh; } }
.st-stage { position: relative; flex: none; box-shadow: 0 10px 34px rgba(0, 0, 0, .18); background: #fff; margin: auto; }
.st-stage svg { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.st-stage svg [data-lid] { cursor: move; }
.st-stage svg .h { cursor: nwse-resize; } .st-stage svg .h.ne, .st-stage svg .h.sw { cursor: nesw-resize; }
.st-zoom { position: sticky; bottom: 6px; left: 6px; align-self: flex-end; display: flex; gap: 4px; background: var(--surface); border-radius: 12px; padding: 4px; box-shadow: var(--shadow-2); z-index: 2; margin-left: auto; }
.st-pages { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.st-pages button.pg { min-width: 36px; height: 32px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface); font-weight: 700; font-size: 12.5px; }
.st-pages button.pg.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.st-layers { display: flex; flex-direction: column; gap: 2px; }
.st-layer { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 8px; font-size: 13px; min-height: 38px; cursor: pointer; border: 1px solid transparent; }
.st-layer:hover { background: var(--surface-3); }
.st-layer.on { background: var(--brand-50); border-color: var(--brand-100); }
.st-layer .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.st-layer .iconbtn { width: 28px; height: 28px; border-radius: 7px; }
.st-props .row { margin-bottom: 6px; }
.st-props label.mini { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--text-3); font-weight: 650; flex: 1; min-width: 0; }
.st-props .input.sm, .st-props .select.sm { min-height: 34px; padding: 4px 8px; font-size: 13.5px; }
.st-props input[type=color] { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--surface); flex: none; }
.st-props input[type=range] { width: 100%; accent-color: var(--brand); }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 8px; }
.swatch { width: 24px; height: 24px; border-radius: 7px; border: 1px solid rgba(0, 0, 0, .15); cursor: pointer; padding: 0; }
.swatch.add { display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-weight: 800; }
.st-tpls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-tpl { text-align: left; padding: 9px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: 12.5px; font-weight: 650; min-height: 48px; }
.st-tpl small { display: block; color: var(--text-3); font-weight: 500; font-size: 11px; }
.st-tpl:hover { border-color: var(--brand-100); background: var(--brand-50); }
.st-tpl.rec { border-color: var(--brand-100); }
.st-mbar { position: sticky; bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom)); z-index: 15; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: 16px; padding: 6px; box-shadow: var(--shadow-2); }
.st-mbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; font-size: 11px; font-weight: 700; color: var(--text-2); min-height: 48px; border-radius: 10px; justify-content: center; }
.st-mbar button:active { background: var(--surface-3); }
.pf-list { display: flex; flex-direction: column; gap: 6px; }
.pf { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.pf.error { background: var(--red-b); color: var(--red); } .pf.warn { background: var(--amber-b); color: var(--amber); } .pf.ok { background: var(--green-b); color: var(--green); }
.design-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.design-card { overflow: hidden; text-decoration: none; color: inherit; display: block; transition: box-shadow .15s, transform .15s; }
.design-card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.design-thumb { aspect-ratio: 4 / 3; background: repeating-conic-gradient(var(--surface-3) 0% 25%, var(--surface-2) 0% 50%) 50% / 16px 16px; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--border); }
.design-thumb img { max-width: 92%; max-height: 92%; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); background: #fff; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.preset { text-align: left; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 650; min-height: 52px; }
.preset small { display: block; color: var(--text-3); font-weight: 500; font-size: 11px; }
.preset.on { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 2px var(--brand-100); }
.ai-out { white-space: pre-wrap; font-size: 13.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-top: 8px; }
