*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}:root{--brand: #2563eb;--brand-dark: #1d4ed8;--brand-light: #eff6ff;--success: #22c55e;--success-bg: #f0fdf4;--danger: #ef4444;--danger-bg: #fef2f2;--warning: #f59e0b;--warning-bg: #fffbeb;--text: #1a1a2e;--text-muted: #64748b;--border: #e2e8f0;--surface: #f8fafc;--white: #ffffff;--radius: 8px;--shadow: 0 1px 4px rgba(0,0,0,.08);--shadow-md: 0 4px 16px rgba(0,0,0,.1)}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,sans-serif;background:var(--surface);color:var(--text);line-height:1.6;min-height:100vh}.app-header{background:var(--white);border-bottom:1px solid var(--border);padding:0 24px;display:flex;align-items:center;gap:12px;height:56px;position:sticky;top:0;z-index:100}.app-header-brand{font-size:1.1rem;font-weight:700;color:var(--brand);margin-right:auto}.app-tabs{display:flex;gap:2px;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:3px}.app-tab{padding:5px 16px;border:none;background:transparent;border-radius:6px;font-size:.88rem;font-weight:500;cursor:pointer;color:var(--text-muted);transition:background .15s,color .15s}.app-tab.active{background:var(--white);color:var(--brand);box-shadow:var(--shadow)}.app-main{max-width:900px;margin:0 auto;padding:24px 16px 64px}.card{background:var(--white);border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow);overflow:hidden;margin-bottom:16px}.card-header{padding:16px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:8px}.card-header h2{font-size:.97rem;font-weight:600;flex:1}.card-body{padding:20px}.form-group{margin-bottom:16px}.form-group:last-child{margin-bottom:0}label,.label{display:block;font-size:.84rem;font-weight:600;color:var(--text-muted);margin-bottom:5px;text-transform:uppercase;letter-spacing:.04em}input[type=text],input[type=number],textarea,select{width:100%;padding:9px 12px;border:1.5px solid var(--border);border-radius:var(--radius);font-size:.95rem;font-family:inherit;background:var(--white);color:var(--text);transition:border-color .15s;outline:none}input[type=text]:focus,input[type=number]:focus,textarea:focus,select:focus{border-color:var(--brand)}textarea{resize:vertical;min-height:72px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-row-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}.checkbox-group{display:flex;flex-direction:column;gap:8px}.checkbox-label{display:flex;align-items:center;gap:8px;font-size:.93rem;font-weight:400;color:var(--text);text-transform:none;letter-spacing:0;cursor:pointer}.checkbox-label input[type=checkbox]{width:16px;height:16px;accent-color:var(--brand);flex-shrink:0}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 16px;border:1.5px solid transparent;border-radius:var(--radius);font-size:.9rem;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s,transform .1s;white-space:nowrap;text-decoration:none}.btn:active{transform:scale(.97)}.btn:disabled{opacity:.5;cursor:not-allowed}.btn-primary{background:var(--brand);color:#fff;border-color:var(--brand)}.btn-primary:hover:not(:disabled){background:var(--brand-dark);border-color:var(--brand-dark)}.btn-secondary{background:var(--white);color:var(--text);border-color:var(--border)}.btn-secondary:hover:not(:disabled){background:var(--surface)}.btn-danger{background:var(--white);color:var(--danger);border-color:var(--danger)}.btn-danger:hover:not(:disabled){background:var(--danger-bg)}.btn-ghost{background:transparent;color:var(--text-muted);border-color:transparent}.btn-ghost:hover:not(:disabled){background:var(--surface);color:var(--text)}.btn-sm{padding:5px 10px;font-size:.82rem}.btn-icon{padding:6px 8px}.question-list{display:flex;flex-direction:column;gap:8px}.question-row{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1.5px solid var(--border);border-radius:10px;background:var(--white);cursor:pointer;transition:border-color .15s,background .15s}.question-row:hover,.question-row.selected{border-color:var(--brand);background:var(--brand-light)}.question-row-num{font-size:.78rem;font-weight:700;color:var(--text-muted);min-width:24px}.question-row-prompt{flex:1;font-size:.93rem;font-weight:500;color:var(--text);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.question-row-type{font-size:.76rem;color:var(--text-muted);background:var(--surface);border:1px solid var(--border);border-radius:4px;padding:2px 6px;white-space:nowrap}.question-row-actions{display:flex;gap:4px;flex-shrink:0}.choices-editor{display:flex;flex-direction:column;gap:8px}.choice-row{display:flex;align-items:center;gap:8px}.choice-row input[type=radio],.choice-row input[type=checkbox]{width:16px;height:16px;flex-shrink:0;accent-color:var(--brand)}.choice-row input[type=text]{flex:1}.badge{display:inline-flex;align-items:center;padding:2px 8px;border-radius:12px;font-size:.76rem;font-weight:600}.badge-blue{background:#dbeafe;color:#1d4ed8}.badge-green{background:#dcfce7;color:#166534}.badge-red{background:#fee2e2;color:#991b1b}.badge-yellow{background:#fef9c3;color:#854d0e}.alert{padding:12px 14px;border-radius:var(--radius);font-size:.9rem;border:1.5px solid}.alert-danger{background:var(--danger-bg);border-color:var(--danger);color:#991b1b}.alert-warning{background:var(--warning-bg);border-color:var(--warning);color:#92400e}.alert-success{background:var(--success-bg);border-color:var(--success);color:#166534}.preview-frame{max-width:720px;margin:0 auto;background:#f5f7fa;border-radius:12px;padding:24px 16px}.preview-inner{max-width:660px;margin:0 auto;background:var(--white);border-radius:12px;box-shadow:var(--shadow-md);overflow:hidden}.preview-header{background:var(--brand);color:#fff;padding:22px 28px 18px}.preview-header h2{font-size:1.3rem;font-weight:700;margin-bottom:4px}.preview-header p{opacity:.88;font-size:.93rem}.preview-body{padding:22px 28px}.preview-footer{padding:14px 28px 22px;display:flex;flex-direction:column;align-items:center;gap:12px}.preview-question{margin-bottom:20px;padding:16px 18px;border:1.5px solid var(--border);border-radius:10px;background:var(--surface)}.preview-question.correct{border-color:var(--success);background:var(--success-bg)}.preview-question.incorrect{border-color:var(--danger);background:var(--danger-bg)}.preview-q-num{font-size:.76rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);margin-bottom:6px}.preview-q-prompt{font-size:1rem;font-weight:500;margin-bottom:12px}.preview-choices{display:flex;flex-direction:column;gap:6px;list-style:none}.preview-choice-label{display:flex;align-items:center;gap:8px;padding:8px 12px;border:1.5px solid var(--border);border-radius:7px;cursor:pointer;background:var(--white);font-size:.93rem;transition:border-color .12s,background .12s}.preview-choice-label:hover,.preview-choice-label.chosen{border-color:var(--brand);background:var(--brand-light)}.preview-choice-label.correct{border-color:var(--success);background:var(--success-bg)}.preview-choice-label.wrong{border-color:var(--danger);background:var(--danger-bg)}.preview-feedback{margin-top:10px;padding:8px 12px;border-radius:6px;font-size:.88rem;font-weight:500}.preview-feedback.correct{background:#dcfce7;color:#166534}.preview-feedback.incorrect{background:#fee2e2;color:#991b1b}.preview-result{width:100%;padding:16px 18px;border-radius:10px;text-align:center}.preview-result.passed{background:#dcfce7;border:1.5px solid var(--success);color:#166534}.preview-result.failed{background:#fee2e2;border:1.5px solid var(--danger);color:#991b1b}.preview-result.completed{background:#e0f2fe;border:1.5px solid #38bdf8;color:#075985}.preview-result h3{font-size:1.1rem;font-weight:700;margin-bottom:3px}.divider{height:1px;background:var(--border);margin:16px 0}.text-muted{color:var(--text-muted);font-size:.9rem}.empty-state{text-align:center;padding:40px 20px;color:var(--text-muted)}.empty-state h3{font-size:1rem;font-weight:600;margin-bottom:6px;color:var(--text)}.section-title{font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-muted);margin-bottom:10px}.validation-list{list-style:none;display:flex;flex-direction:column;gap:6px}.validation-item{display:flex;align-items:flex-start;gap:8px;font-size:.88rem;color:#991b1b}.validation-item:before{content:"✕";flex-shrink:0;font-weight:700;margin-top:1px}.drag-handle{cursor:grab;color:var(--text-muted);font-size:.9rem;padding:2px}.drag-handle:active{cursor:grabbing}.theme-section-title{font-size:.78rem;font-weight:700;text-transform:uppercase;letter-spacing:.07em;color:var(--text-muted)}.theme-section-header{display:flex;align-items:center;justify-content:space-between;width:100%}.theme-preset-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.theme-preset-card{border:2px solid var(--border);border-radius:10px;padding:14px 10px 10px;cursor:pointer;background:var(--white);transition:border-color .15s,box-shadow .15s;text-align:center;width:100%}.theme-preset-card:hover{border-color:var(--brand)}.theme-preset-card.active{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-light)}.theme-preset-swatches{display:flex;justify-content:center;gap:5px;margin-bottom:9px}.theme-preset-swatch{width:22px;height:22px;border-radius:50%;border:1px solid rgba(0,0,0,.12);flex-shrink:0;display:inline-block}.theme-preset-name{font-size:.82rem;font-weight:600;color:var(--text)}.theme-color-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 20px}.theme-color-row{display:flex;align-items:center;gap:10px}.theme-color-row input[type=color]{width:38px;height:38px;border:1.5px solid var(--border);border-radius:var(--radius);cursor:pointer;padding:2px;background:var(--white);flex-shrink:0}.theme-color-row .color-label{font-size:.88rem;font-weight:500;color:var(--text)}.theme-layout-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.theme-layout-card{border:2px solid var(--border);border-radius:10px;padding:14px 10px;cursor:pointer;background:var(--white);text-align:center;transition:border-color .15s,box-shadow .15s;width:100%}.theme-layout-card:hover{border-color:var(--brand)}.theme-layout-card.active{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-light)}.theme-layout-card-name{font-size:.9rem;font-weight:600;color:var(--text);margin-bottom:4px}.theme-layout-card-desc{font-size:.76rem;color:var(--text-muted)}
