@font-face { font-family: "Noto Sans Devanagari"; src: url("vendor/NotoSansDevanagari.ttf") format("truetype"); font-weight: 100 900; font-display: block; }
.cd { --cd-line: #d8dfeb; background: #f6f8fb; font-family: Arial, "Noto Sans Devanagari", sans-serif; letter-spacing: 0; }
.cd[hidden], .cd [hidden] { display: none !important; }
.studio-shell[hidden] { display: none !important; }
.cd button, .cd-dialog button { border: 1px solid #d8dfeb; background: #fff; color: #263655; border-radius: 5px; padding: 8px 10px; font-weight: 600; display: inline-flex; justify-content: center; align-items: center; gap: 6px; font-size: 13px; }
.cd button:hover, .cd-dialog button:hover { background: #eaf0fa; }
.cd button.primary, .cd-dialog button.primary { background: #214fb5; color: #fff; border-color: #214fb5; }
.cd button.active { background: #e8efff; border-color: #214fb5; color: #214fb5; }
.cd svg, .cd-dialog svg { width: 16px; height: 16px; flex-shrink: 0; }
.cd .icon-btn { width: 33px; height: 33px; padding: 7px; flex-shrink: 0; }
.cd-head, .cd-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--cd-line); }
.cd-head h2 { margin: 0 8px 0 0; font-size: 19px; color: #19233c; }
.cd-head input { max-width: 230px; }
.cd-head .spacer { flex: 1; }
.cd-status { font-size: 12px; color: #52735a; white-space: nowrap; }
.cd-error { min-height: 0; color: #993a22; background: #fff2eb; padding: 10px 18px; border-bottom: 1px solid #f4d4be; font-size: 13px; }
.cd-body { display: grid; grid-template-columns: 260px minmax(0, 1fr) 258px; align-items: start; }
.cd-sidebar, .cd-inspector { background: #fff; padding: 14px; min-width: 0; }
.cd-sidebar { border-right: 1px solid var(--cd-line); }
.cd-inspector { border-left: 1px solid var(--cd-line); }
.cd h3 { margin: 16px 0 10px; font-size: 14px; }
.cd h3:first-child { margin-top: 0; }
.cd label, .cd-dialog label { display: grid; gap: 5px; font-size: 12px; color: #5a6780; margin: 9px 0; font-weight: 600; }
.cd input, .cd select, .cd textarea, .cd-dialog input, .cd-dialog select, .cd-dialog textarea { width: 100%; min-width: 0; border: 1px solid #cfd8e6; border-radius: 5px; padding: 8px; color: #19233c; background: #fff; font-size: 13px; font-family: inherit; }
.cd textarea { resize: vertical; min-height: 74px; }
.cd input[type=color] { height: 35px; padding: 3px; }
.cd input[type=checkbox] { width: 16px; height: 16px; margin: 0; }
.cd input[type=range] { padding: 0; accent-color: #214fb5; }
.cd .check, .cd-dialog .check { display: flex; align-items: center; gap: 7px; }
.cd-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.cd-tabbar { display: flex; gap: 4px; margin-bottom: 12px; }
.cd-tabbar button { flex: 1; padding: 8px 5px; font-size: 12px; }
.cd .cd-tablet-edit { display: none; }
.cd-photo-tray { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: 206px; overflow: auto; padding: 4px 0; }
.cd-photo-tile { position: relative; min-width: 0; }
.cd-photo-tile > button { width: 100%; padding: 0; height: 68px; overflow: hidden; }
.cd-photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.cd-photo-tile .remove { position: absolute; right: 2px; top: 2px; padding: 2px; width: 20px; height: 20px; background: #fff; color: #9d3228; }
.cd-workspace { min-width: 0; position: sticky; top: 10px; }
.cd-toolbar { padding: 9px 12px; gap: 6px; }
.cd-toolbar select { width: 94px; padding: 6px; }
.cd-stage-wrap { height: calc(100vh - 250px); min-height: 360px; overflow: auto; display: flex; align-items: flex-start; justify-content: flex-start; padding: 22px; background: #e6ebf2; overscroll-behavior: contain; }
.cd-stage { flex: 0 0 auto; margin: auto; box-shadow: 0 2px 14px #15223921; background: repeating-conic-gradient(#f4f4f4 0% 25%, #fff 0% 50%) 50% / 14px 14px; }
.cd-stage .konvajs-content { touch-action: none; }
.cd-metrics { background: #fff; padding: 10px 12px; font-size: 12px; color: #61708a; border-top: 1px solid var(--cd-line); }
.cd-warning { color: #9a4f16; padding: 8px 0 0; font-size: 12px; }
.cd-layer-list { display: grid; gap: 4px; max-height: 270px; overflow: auto; }
.cd-layer { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid #edf0f5; }
.cd-layer > button:first-child { flex: 1; text-align: left; justify-content: flex-start; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cd-library-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cd-library { display: grid; gap: 9px; max-height: 560px; overflow: auto; }
.cd-design { border: 1px solid #d8dfeb; border-radius: 5px; padding: 9px; }
.cd-design img { width: 100%; height: 115px; object-fit: contain; background: #f5f7fa; }
.cd-design strong { display: block; font-size: 13px; margin: 7px 0 4px; overflow-wrap: anywhere; }
.cd-design small { display: block; font-size: 11px; color: #6a7890; margin-bottom: 8px; }
.cd-design .actions { display: flex; gap: 5px; flex-wrap: wrap; }
.cd-design .actions button { font-size: 11px; padding: 6px; }
.cd-dialog { border: 1px solid #d8dfeb; border-radius: 8px; padding: 20px; width: min(690px, calc(100vw - 30px)); max-height: 90vh; overflow: auto; color: #19233c; }
.cd-dialog::backdrop { background: #16213d99; }
.cd-dialog h2 { margin: 0 0 14px; font-size: 20px; }
.cd-dialog p { font-size: 13px; line-height: 1.6; }
.cd-dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 14px; }
.cd-dialog img { width: 100%; max-height: 440px; object-fit: contain; background: #edf0f6; }
.cd-divider { border: 0; border-top: 1px solid #e1e6ef; margin: 15px 0; }
.cd-pill { padding: 5px 8px; background: #f1f4f9; border-radius: 4px; font-size: 11px; }
.cd-btn-row { display: flex; gap: 6px; flex-wrap: wrap; }
.cd-empty { color: #72809b; padding: 18px 4px; font-size: 13px; }
.cd details { border-top: 1px solid #edf0f5; margin-top: 10px; padding: 8px 0; }
.cd summary { cursor: pointer; font-size: 12px; color: #4b5f7d; font-weight: 600; }
.cd .cd-generate { width: 100%; margin: 12px 0; padding: 12px; }
.cd-count { font-size: 11px; color: #586d81; margin: 8px 0; }
.cd .cd-photo-check { display: flex; align-items: center; gap: 3px; font-size: 10px; margin: 3px 0; }
.cd #cdProgress { font-size: 12px; color: #214fb5; padding: 8px 0; }
.cd #cdProgress progress { width: 100%; height: 10px; accent-color: #214fb5; }
.cd-mobile-actions { display: none; }
.cd-dialog .progress { padding: 12px; background: #eef3fa; color: #214fb5; }
body.cd-print-preview .cd-sidebar, body.cd-print-preview .cd-inspector { visibility: hidden; }
@media (max-width: 1150px) { .cd-body { grid-template-columns: 225px minmax(0,1fr) 225px; } .cd-head { padding: 10px; } .cd-head h2 { font-size: 17px; } }
@media (max-width: 980px) { .cd-body { grid-template-columns: 225px minmax(0,1fr); } .cd-inspector { padding: 0; border-left: 0; } .cd .cd-tablet-edit { display: inline-flex; } .cd-tabbar { flex-wrap: wrap; } .cd-tabbar button { min-width: 65px; } .cd-stage-wrap { min-height: 360px; height: 560px; } }
@media (max-width: 620px) { .cd-body { display: flex; flex-direction: column; } .cd-sidebar, .cd-workspace, .cd-inspector { width: 100%; } .cd-workspace { position: static; } .cd-inspector { display: block; } .cd-stage-wrap { height: 480px; padding: 12px; } .cd-photo-tray { grid-template-columns: repeat(6,minmax(0,1fr)); } .cd-head input { max-width: 170px; } }
@media (max-width: 620px) { .cd-mobile-actions { display: flex; justify-content: center; gap: 8px; padding: 12px; background: #fff; } }
