:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:#19191a;background:#edeef0;font-synthesis:none;text-rendering:optimizeLegibility;--accent: #447bba;--accent-hover: #3b6fa9;--surface: #ffffff;--surface-muted: #f5f6f8;--text: #19191a;--text-muted: #6d7885;--border: #dce1e6;--danger: #e64646;--success: #2f8f46;--shadow: 0 1px 2px rgba(0, 0, 0, .08)}*{box-sizing:border-box}html{min-height:100%;background:#edeef0}body{margin:0;min-width:320px;min-height:100vh;background:#edeef0;color:var(--text)}button,input,textarea,select{font:inherit}button{-webkit-tap-highlight-color:transparent}img{max-width:100%;display:block}.app-shell{min-height:100vh}.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;min-height:56px;padding:env(safe-area-inset-top) max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left));background:#fffffff5;border-bottom:1px solid var(--border);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}.brand{border:0;background:none;padding:12px 0;font-size:20px;font-weight:750;color:var(--text);cursor:pointer}.topbar-actions{display:flex;gap:8px}.nav-button{border:0;border-radius:8px;padding:8px 12px;background:transparent;color:var(--text-muted);cursor:pointer}.nav-button:hover,.nav-button.active{background:var(--surface-muted);color:var(--text)}.dev-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px max(16px,calc((100vw - 960px)/2));background:#fff6d8;border-bottom:1px solid #ead99d;font-size:13px}.dev-toolbar>div:first-child{display:flex;flex-wrap:wrap;gap:6px 12px}.dev-toolbar span{color:#725f20}.segmented{display:inline-flex;gap:2px;padding:2px;border-radius:8px;background:#00000014}.segmented button{border:0;border-radius:6px;padding:5px 9px;background:transparent;cursor:pointer}.segmented button.selected{background:#fff;box-shadow:var(--shadow)}.page-wrap{width:min(960px,100%);margin:0 auto;padding:28px 16px max(48px,env(safe-area-inset-bottom))}.page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:20px}.page-heading h1{margin:0;font-size:clamp(25px,4vw,34px);line-height:1.15}.page-heading p{margin:8px 0 0;max-width:680px;color:var(--text-muted);line-height:1.5}.page-actions{flex:0 0 auto}.card{background:var(--surface);border-radius:14px;box-shadow:var(--shadow);border:1px solid rgba(0,0,0,.04)}.quiz-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));gap:16px}.quiz-card{overflow:hidden;display:flex;flex-direction:column;min-height:290px}.quiz-cover{width:100%;aspect-ratio:16 / 8;object-fit:cover;background:var(--surface-muted)}.quiz-card-body{display:flex;flex:1;flex-direction:column;padding:20px}.quiz-card h2{margin:14px 0 6px;font-size:21px}.quiz-card p{margin:0 0 20px;color:var(--text-muted);line-height:1.5;flex:1}.meta-row{display:flex;flex-wrap:wrap;gap:8px 16px;color:var(--text-muted);font-size:13px}.meta-row.large{font-size:14px;margin:20px 0}.button-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.button-row.spread{justify-content:space-between}.centered-row{justify-content:center}.button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid transparent;border-radius:9px;min-height:40px;padding:9px 16px;font-weight:650;cursor:pointer;transition:background-color .14s ease,opacity .14s ease,border-color .14s ease}.button:disabled,.icon-button:disabled{opacity:.45;cursor:not-allowed}.button.primary{color:#fff;background:var(--accent)}.button.primary:hover:not(:disabled){background:var(--accent-hover)}.button.secondary{color:var(--text);background:var(--surface);border-color:var(--border)}.button.secondary:hover:not(:disabled),.button.ghost:hover:not(:disabled){background:var(--surface-muted)}.button.ghost{color:var(--accent);background:transparent;border-color:transparent}.button.danger{color:var(--danger);background:#fff;border-color:#efcaca}.button.danger:hover:not(:disabled){background:#fff1f1}.button.small{min-height:34px;padding:6px 11px;font-size:13px}.full-width{width:100%}.back-link{padding:0;border:0;background:none;color:var(--accent);cursor:pointer;font-weight:600}.loading-block,.centered{display:flex;align-items:center;justify-content:center;gap:12px;min-height:180px;color:var(--text-muted)}.centered{min-height:100vh;flex-direction:column}.spinner{width:24px;height:24px;border:3px solid #cbd3dc;border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.notice{margin:12px 0;padding:12px 14px;border-radius:10px;background:#edf5ff;color:#24598d;line-height:1.45}.notice.error{background:#fff0f0;color:#a92d2d}.empty-state{padding:48px 24px;text-align:center}.empty-state h1,.empty-state h2{margin-top:0}.empty-state p{color:var(--text-muted)}.quiz-intro{overflow:hidden}.hero-cover{width:100%;max-height:430px;object-fit:cover}.quiz-intro-body{padding:clamp(22px,5vw,44px)}.quiz-intro h1{margin:20px 0 12px;font-size:clamp(30px,6vw,46px);line-height:1.08}.quiz-intro p{max-width:680px;color:var(--text-muted);font-size:17px;line-height:1.55}.question-card{padding:clamp(20px,5vw,38px)}.question-card h1{margin:24px 0;font-size:clamp(23px,4vw,32px);line-height:1.25}.progress-row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:16px;color:var(--text-muted);font-size:14px}progress{width:100%;height:8px;border:0;border-radius:20px;overflow:hidden;background:var(--surface-muted)}progress::-webkit-progress-bar{background:var(--surface-muted)}progress::-webkit-progress-value{background:var(--accent);border-radius:20px}progress::-moz-progress-bar{background:var(--accent);border-radius:20px}.question-image{width:100%;max-height:380px;object-fit:contain;margin-top:24px;border-radius:12px;background:var(--surface-muted)}.answer-list{display:grid;gap:10px;margin-bottom:24px}.answer-option{display:flex;align-items:flex-start;gap:12px;padding:15px;border:1px solid var(--border);border-radius:11px;cursor:pointer;transition:border-color .14s,background-color .14s}.answer-option:hover{background:var(--surface-muted)}.answer-option.selected{border-color:var(--accent);background:#edf5ff}.answer-option input{margin-top:3px;accent-color:var(--accent)}.result-card{padding:clamp(30px,7vw,64px);text-align:center}.result-card h1{margin:24px 0 8px}.result-card>p{margin:0 auto 28px;max-width:520px;color:var(--text-muted);line-height:1.5}.admin-list{display:grid;gap:12px}.admin-item{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px}.admin-item-main{min-width:0}.admin-item-title{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.admin-item h2{margin:0;font-size:20px}.admin-item p{margin:7px 0 13px;color:var(--text-muted)}.admin-item-actions{display:flex;flex:0 0 auto;flex-wrap:wrap;justify-content:flex-end;gap:7px}.status-badge{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border-radius:999px;font-size:12px;font-weight:700}.status-badge.published{background:#e6f5e9;color:#267b38}.status-badge.draft{background:#fff4d5;color:#80631b}.status-badge.archived{background:#eceff2;color:#58626d}.editor-form{display:grid;gap:16px}.form-section{padding:22px}.form-section h2{margin:0 0 18px;font-size:21px}.form-grid{display:grid;gap:16px}.form-grid.two-columns{grid-template-columns:repeat(2,minmax(0,1fr))}.field{display:grid;gap:7px;margin-bottom:16px}.field>span,.options-header span{color:var(--text-muted);font-size:13px}.field input,.field textarea,.field select,.option-editor-row input[type=text],.option-editor-row>input:not([type]){width:100%;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text);padding:10px 12px;outline:none}.field input:focus,.field textarea:focus,.field select:focus,.option-editor-row input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #447bba24}.field textarea{resize:vertical;min-height:74px}.input-prefix{display:flex;align-items:stretch}.input-prefix>span{display:flex;align-items:center;padding:0 10px;border:1px solid var(--border);border-right:0;border-radius:9px 0 0 9px;background:var(--surface-muted);color:var(--text-muted)}.input-prefix input{border-radius:0 9px 9px 0}.checkbox-field{display:flex;align-items:center;gap:10px;min-height:66px;padding-top:22px;cursor:pointer}.checkbox-field input{width:18px;height:18px;accent-color:var(--accent)}.question-editor-list{display:grid;gap:16px}.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.options-editor{border-top:1px solid var(--border);padding-top:16px}.options-header{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}.option-editor-row{display:grid;grid-template-columns:22px 1fr 36px;align-items:center;gap:9px;margin-bottom:9px}.option-editor-row input[type=radio]{width:18px;height:18px;accent-color:var(--accent)}.option-editor-row input[type=text]{min-width:0}.icon-button{width:34px;height:34px;border:0;border-radius:8px;background:transparent;font-size:23px;cursor:pointer}.danger-text{color:var(--danger)}.icon-button:hover:not(:disabled){background:#fff1f1}.sticky-save-bar{position:sticky;bottom:12px;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;border:1px solid var(--border);border-radius:13px;background:#fffffff2;box-shadow:0 8px 30px #00000021;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.sticky-save-bar>span{color:var(--text-muted);font-size:14px}.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}.stat-card{padding:22px;text-align:center}.stat-card strong{display:block;font-size:34px;color:var(--accent)}.stat-card span{display:block;margin-top:5px;color:var(--text-muted)}.stats-questions{display:grid;gap:14px}.stats-question{padding:22px}.stats-question h2{margin:0 0 18px;font-size:19px}.option-stats{display:grid;gap:13px}.option-stat-label{display:flex;align-items:baseline;justify-content:space-between;gap:14px;font-size:14px}.option-stat-label strong{flex:0 0 auto}.option-stat.correct .option-stat-label span{color:var(--success);font-weight:700}.bar{height:8px;margin-top:6px;border-radius:999px;overflow:hidden;background:var(--surface-muted)}.bar span{display:block;height:100%;border-radius:inherit;background:#8da9c7}.option-stat.correct .bar span{background:var(--success)}.muted{color:var(--text-muted)}@media (max-width: 720px){.page-wrap{padding-top:20px}.page-heading,.admin-item,.dev-toolbar{align-items:stretch;flex-direction:column}.page-actions .button{width:100%}.admin-item-actions{justify-content:flex-start}.form-grid.two-columns,.stats-grid{grid-template-columns:1fr}.checkbox-field{min-height:auto;padding-top:0;margin-bottom:16px}.sticky-save-bar{bottom:max(8px,env(safe-area-inset-bottom))}.sticky-save-bar>span{display:none}.sticky-save-bar .button-row{width:100%;display:grid;grid-template-columns:1fr 1fr}}@media (prefers-color-scheme: dark){:root{color:#e7e8ea;background:#19191a;--surface: #232324;--surface-muted: #2c2d2e;--text: #e7e8ea;--text-muted: #9ca4ad;--border: #3b3c3e;--shadow: none}html,body{background:#19191a}.topbar{background:#232324f2}.dev-toolbar{background:#443b1e;border-bottom-color:#6c5b22}.dev-toolbar span{color:#e0ca7d}.segmented button.selected{background:#5a4d24}.notice{background:#203a54;color:#b4d8ff}.notice.error{background:#502929;color:#ffc3c3}.answer-option.selected{background:#243b54}.button.secondary,.button.danger{background:var(--surface)}.button.danger{border-color:#674040}.input-prefix>span{background:var(--surface-muted)}.sticky-save-bar{background:#232324f2}}.field-hint{margin-top:-8px;color:var(--text-muted);line-height:1.45}.inline-actions{display:flex;align-items:center;gap:5px}.result-editor-list{display:grid;gap:14px}.result-editor-card{padding:16px;border:1px solid var(--border);border-radius:12px;background:var(--surface-muted)}.result-editor-card .field:last-of-type{margin-bottom:8px}.result-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.result-editor-card code{word-break:break-all}.personality-option-editor{display:grid;gap:10px;margin-bottom:12px;padding:12px;border:1px solid var(--border);border-radius:11px;background:var(--surface-muted)}.option-editor-main{display:grid;grid-template-columns:28px 1fr 34px;align-items:center;gap:8px}.option-editor-main>input,.score-editor-row select,.weight-field input{width:100%;min-width:0;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text);padding:9px 11px;outline:none}.option-editor-main>input:focus,.score-editor-row select:focus,.weight-field input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #447bba24}.option-number{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--surface);color:var(--text-muted);font-size:13px;font-weight:700}.score-editor-list{display:grid;gap:8px;padding-left:36px}.score-editor-row{display:grid;grid-template-columns:auto minmax(150px,1fr) 112px 34px;align-items:center;gap:8px}.score-editor-row>span{color:var(--text-muted);font-size:12px}.weight-field{display:grid;grid-template-columns:auto 64px;align-items:center;gap:6px;color:var(--text-muted);font-size:12px}.weight-field input{padding-inline:8px}.personality-result-card{overflow:hidden}.result-image{width:min(520px,100%);max-height:520px;margin:0 auto 26px;border-radius:14px;object-fit:contain;background:var(--surface-muted)}.result-kicker{display:inline-block;color:var(--accent);font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.result-distribution{display:grid;gap:14px}.result-distribution-row{display:grid;grid-template-columns:54px 1fr;align-items:center;gap:12px}.result-distribution-row img,.result-thumb-placeholder{width:54px;height:54px;border-radius:10px;object-fit:cover;background:var(--surface-muted)}.result-distribution-main,.option-stat-label span{min-width:0}.option-stat-label small{display:block;margin-top:3px;color:var(--text-muted);font-size:12px;font-weight:400}@media (max-width: 720px){.section-title-row{align-items:flex-start}.score-editor-list{padding-left:0}.score-editor-row{grid-template-columns:1fr 92px 34px}.score-editor-row>span{display:none}.weight-field{grid-template-columns:1fr;gap:3px}.weight-field span{display:none}.result-editor-head{align-items:flex-start}}
