:root{--bg:#101624;--panel:rgba(255,255,255,.09);--panel2:rgba(255,255,255,.14);--text:#f4f7fb;--muted:#aab6c8;--primary:#63e6be;--primary2:#74c0fc;--danger:#ff6b6b;--ok:#51cf66;--shadow:0 24px 80px rgba(0,0,0,.35);--radius:24px}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:radial-gradient(circle at 20% 10%,#24415c,transparent 30%),radial-gradient(circle at 80% 20%,#2d1f55,transparent 32%),var(--bg);color:var(--text);min-height:100vh}.ambient{position:fixed;inset:0;overflow:hidden;z-index:-1}.ambient span{position:absolute;width:34vmax;height:34vmax;border-radius:50%;filter:blur(50px);opacity:.22;animation:float 18s infinite alternate ease-in-out}.ambient span:nth-child(1){background:#63e6be;left:-10%;top:10%}.ambient span:nth-child(2){background:#748ffc;right:-12%;top:5%;animation-duration:22s}.ambient span:nth-child(3){background:#ff922b;left:20%;bottom:-20%;animation-duration:26s}.ambient span:nth-child(4){background:#f06595;right:25%;bottom:-25%;animation-duration:20s}@keyframes float{to{transform:translate3d(8vw,-5vh,0) scale(1.25)}}a{color:inherit;text-decoration:none}.topbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 22px;background:rgba(9,13,23,.68);backdrop-filter:blur(18px);border-bottom:1px solid rgba(255,255,255,.1)}.brand{display:flex;align-items:center;gap:10px;font-weight:800}.brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:14px;background:linear-gradient(135deg,var(--primary),var(--primary2));color:#07111f}.topbar nav{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.topbar nav a{padding:9px 12px;border-radius:999px;color:var(--muted)}.topbar nav a:hover,.pill{background:var(--panel2);color:var(--text)}.shell{width:min(1180px,calc(100% - 28px));margin:24px auto 70px}.card{background:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.07));border:1px solid rgba(255,255,255,.16);box-shadow:var(--shadow);border-radius:var(--radius);padding:24px;backdrop-filter:blur(16px)}.hero{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:20px}.hero h1{font-size:clamp(38px,6vw,76px);margin:0}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}.test-card{transition:.25s transform,.25s border}.test-card:hover{transform:translateY(-4px);border-color:rgba(99,230,190,.55)}.meta{display:flex;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:13px;margin:16px 0}.meta span{padding:6px 10px;background:rgba(255,255,255,.08);border-radius:999px}.btn,button{border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border-radius:16px;background:rgba(255,255,255,.14);color:var(--text);font-weight:700;transition:.2s transform,.2s background}.btn:hover,button:hover{transform:translateY(-1px);background:rgba(255,255,255,.2)}.primary{background:linear-gradient(135deg,var(--primary),var(--primary2));color:#07111f}.danger{background:linear-gradient(135deg,#ff8787,#ff6b6b);color:#210909}.form{display:grid;gap:14px}.form label{display:grid;gap:7px;color:var(--muted)}input,select,textarea{width:100%;padding:13px 14px;border-radius:14px;border:1px solid rgba(255,255,255,.16);background:rgba(0,0,0,.22);color:var(--text);outline:none}textarea{min-height:120px}.narrow{max-width:520px;margin-inline:auto}.toast,.notice{padding:14px 16px;border-radius:16px;background:rgba(99,230,190,.16);border:1px solid rgba(99,230,190,.35);margin-bottom:16px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse}th,td{padding:12px;border-bottom:1px solid rgba(255,255,255,.1);text-align:left}th{color:var(--primary)}.quiz-head{display:flex;justify-content:space-between;align-items:center;gap:16px}.quiz-head small{display:block;color:var(--muted);margin-top:4px}.lives{font-size:24px;color:#ff6b6b;letter-spacing:2px}.progress{height:10px;background:rgba(255,255,255,.1);border-radius:999px;overflow:hidden;margin:18px 0}.progress i{display:block;height:100%;background:linear-gradient(90deg,var(--primary),var(--primary2));transition:.3s}.qimg{max-width:100%;border-radius:20px;margin:12px 0}.answers{display:grid;gap:12px;margin-top:18px}.answer{width:100%;justify-content:flex-start;text-align:left;font-size:17px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.12)}.answer img{width:82px;height:62px;object-fit:cover;border-radius:12px}.answer.selected{outline:2px solid var(--primary)}.answer.right{background:rgba(81,207,102,.24);border-color:rgba(81,207,102,.7)}.answer.wrong{background:rgba(255,107,107,.24);border-color:rgba(255,107,107,.7)}.result-box{margin-top:18px;padding:16px;border-radius:18px;background:rgba(255,255,255,.1)}.result-box.ok{border:1px solid rgba(81,207,102,.5)}.result-box.bad{border:1px solid rgba(255,107,107,.5)}.hidden{display:none!important}.big{font-size:20px;padding:18px 22px}.finish{text-align:center}.score-ring{margin:20px auto;width:160px;height:160px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--primary),var(--primary2),var(--primary));box-shadow:0 0 60px rgba(99,230,190,.25)}.score-ring span{display:grid;place-items:center;width:124px;height:124px;border-radius:50%;background:#101624;font-size:34px;font-weight:900}.admin-layout{display:grid;grid-template-columns:240px 1fr;gap:18px}.side{display:grid;align-content:start;gap:8px}.side a{padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.08)}.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.statgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.stat{padding:18px;border-radius:18px;background:rgba(255,255,255,.1)}.stat b{font-size:30px;display:block}@media(max-width:760px){.topbar{align-items:flex-start;flex-direction:column}.hero{flex-direction:column;align-items:flex-start}.admin-layout{grid-template-columns:1fr}.card{padding:18px}.shell{width:min(100% - 16px,1180px)}.topbar nav{justify-content:flex-start}.answer{font-size:16px}}

/* v011 editor stromu, přepínače a jemnější efekty */
html{scroll-behavior:smooth}.card,.answer,.btn,button,input,select,textarea{transition:transform .22s ease,background .22s ease,border-color .22s ease,box-shadow .22s ease,opacity .22s ease}.card{animation:cardIn .38s ease both}@keyframes cardIn{from{opacity:0;transform:translateY(12px) scale(.99)}to{opacity:1;transform:none}}.admin-layout-wide{grid-template-columns:330px 1fr}.tree-panel{position:sticky;top:86px;max-height:calc(100vh - 110px);overflow:auto}.side-head{display:grid;gap:10px;margin-bottom:14px}.tree-panel h2{margin:8px 0 14px;font-size:18px}.question-tree{display:grid;gap:10px}.tree-question{border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.055);border-radius:18px;padding:8px}.tree-question.active{border-color:rgba(99,230,190,.55);box-shadow:0 0 0 1px rgba(99,230,190,.18),0 18px 45px rgba(0,0,0,.18)}.tree-q-title{display:grid;grid-template-columns:34px 1fr;gap:8px;align-items:center;padding:9px 10px;border-radius:14px;font-weight:800}.tree-q-title:hover,.tree-answer:hover{background:rgba(255,255,255,.09);transform:translateX(2px)}.tree-num{display:grid;place-items:center;width:28px;height:28px;border-radius:10px;background:linear-gradient(135deg,var(--primary),var(--primary2));color:#06111d;font-size:13px}.tree-answers{display:grid;gap:4px;margin:2px 0 4px 22px;border-left:1px solid rgba(255,255,255,.13);padding-left:10px}.tree-answer{display:grid;grid-template-columns:18px 1fr;gap:6px;align-items:center;padding:7px 8px;border-radius:12px;color:var(--muted);font-size:13px}.tree-answer.correct{color:var(--primary)}.tree-answer.add{display:block;color:var(--primary2);font-weight:800}.editor-card h1{margin-top:0}.edit-form,.answer-edit-form{background:rgba(0,0,0,.12);border:1px solid rgba(255,255,255,.1);border-radius:22px;padding:18px;margin-top:14px}.form-grid{display:grid;gap:14px}.form-grid.two{grid-template-columns:1fr 180px}.form-actions,.action-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:8px}.form-actions .btn,.form-actions button,.action-row .btn,.action-row button{margin-top:0}.split-head{display:flex;gap:14px;align-items:center;justify-content:space-between;margin:10px 0}.answer-list-admin{display:grid;gap:10px;margin:12px 0 18px}.answer-admin-row{display:grid;grid-template-columns:42px 1fr auto auto;gap:12px;align-items:center;padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.075);border:1px solid rgba(255,255,255,.1)}.answer-admin-row:hover{background:rgba(255,255,255,.12);transform:translateY(-1px)}.answer-admin-row.correct{border-color:rgba(81,207,102,.45);background:rgba(81,207,102,.12)}.answer-order{display:grid;place-items:center;width:32px;height:32px;border-radius:12px;background:rgba(255,255,255,.1);font-weight:900}.answer-badge,.answer-picks{font-size:12px;padding:6px 9px;border-radius:999px;background:rgba(255,255,255,.11);color:var(--muted)}.answer-admin-row.correct .answer-badge{background:rgba(81,207,102,.22);color:#baffc8}.preview-img{max-width:220px;border-radius:18px;border:1px solid rgba(255,255,255,.14);box-shadow:0 14px 35px rgba(0,0,0,.24)}.switch-row{display:flex!important;grid-template-columns:none!important;align-items:center;gap:12px;cursor:pointer;color:var(--text)!important}.switch-input{position:absolute;opacity:0;width:1px;height:1px}.switch-ui{position:relative;width:54px;height:30px;flex:0 0 auto;border-radius:999px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.16);box-shadow:inset 0 2px 8px rgba(0,0,0,.25)}.switch-ui:after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 4px 12px rgba(0,0,0,.35);transition:transform .22s ease,background .22s ease}.switch-input:checked + .switch-ui{background:linear-gradient(135deg,var(--primary),var(--primary2));border-color:transparent}.switch-input:checked + .switch-ui:after{transform:translateX(24px);background:#07111f}.quiz-step{animation:quizStep .34s ease both}@keyframes quizStep{from{opacity:0;transform:translateY(14px) scale(.985);filter:blur(3px)}to{opacity:1;transform:none;filter:blur(0)}}.result-box{animation:softPop .25s ease both}.answer.right,.answer.wrong{animation:softPop .24s ease both}@keyframes softPop{from{opacity:.35;transform:scale(.985)}to{opacity:1;transform:none}}.soft{background:rgba(255,255,255,.09)}
@media(max-width:900px){.admin-layout-wide{grid-template-columns:1fr}.tree-panel{position:relative;top:auto;max-height:none}.form-grid.two{grid-template-columns:1fr}.answer-admin-row{grid-template-columns:36px 1fr}.answer-badge,.answer-picks{justify-self:start}.split-head{align-items:flex-start;flex-direction:column}}

.quiz-card,.card.quiz{padding:32px!important}
.answers{gap:16px;margin-top:24px}
.progress{margin:24px 0 32px}
.actions,.quiz-actions{display:flex;gap:12px;align-items:center;margin-top:28px;padding-top:8px}
.actions .btn,.quiz-actions .btn,.actions button,.quiz-actions button{min-width:180px}
.btn-submit{margin-top:28px;align-self:flex-start}
.card{padding:32px}
@media (max-width:700px){
.card{padding:24px}
.actions,.quiz-actions{flex-direction:column;align-items:stretch}
.actions .btn,.quiz-actions .btn,.actions button,.quiz-actions button{width:100%}
}

/* v013: akční tlačítka nejsou nalepená na odpovědi */
.play-card{padding-bottom:40px}
.question-actions{margin-top:40px;padding-top:22px;border-top:1px solid rgba(255,255,255,.10)}
.question-actions .btn{min-width:190px}
.feedback-actions{margin-top:28px;padding-top:18px}
#confirmMulti.hidden{display:none!important}
@media(max-width:760px){.question-actions{margin-top:34px}.question-actions .btn,.feedback-actions .btn{width:100%}}

.hero-actions{display:flex;gap:16px;flex-wrap:wrap;align-items:center;justify-content:flex-end}
@media(max-width:720px){.hero-actions{justify-content:flex-start;width:100%}}

/* v015: čitelné roletky comboboxů */
select{
    color-scheme:dark;
    background:rgba(5,10,20,.92);
    color:var(--text);
    border-color:rgba(255,255,255,.22);
}
select option,
select optgroup{
    background:#111827;
    color:#f4f7fb;
}
select option:checked,
select option:hover{
    background:#1f3b4d;
    color:#ffffff;
}
select:focus{
    border-color:rgba(99,230,190,.7);
    box-shadow:0 0 0 4px rgba(99,230,190,.14);
}

/* v016: SuperAdmin mazání statistik */
.danger-zone{
    margin:24px 0;
    padding:20px;
    border:1px solid rgba(255,107,107,.38);
    border-radius:22px;
    background:rgba(255,107,107,.10);
}
.danger-zone h2{margin-top:0;color:#ffb3b3}
.danger-zone p{color:var(--muted);margin-bottom:18px}
.danger-form{
    padding:16px;
    margin:14px 0;
    border-radius:18px;
    background:rgba(0,0,0,.16);
    border:1px solid rgba(255,255,255,.10);
}
.danger-form .btn{justify-self:start}

.image-preview-wrap{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin:12px 0 18px}.image-preview-box{display:grid;gap:8px;align-items:start;padding:12px;border-radius:18px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12)}.image-preview-box span{font-size:12px;color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.06em}.image-preview-box code{display:block;overflow:auto;max-width:100%;font-size:11px;color:var(--muted);background:rgba(0,0,0,.18);border-radius:10px;padding:6px 8px}.image-preview-box.live-preview{border-color:rgba(99,230,190,.45);box-shadow:0 14px 40px rgba(99,230,190,.08)}.preview-img{display:block;max-width:100%;max-height:260px;object-fit:contain;background:rgba(0,0,0,.18)}.answer-admin-row{grid-template-columns:32px 42px 68px 1fr auto auto}.answer-admin-row .answer-text{color:var(--text);font-weight:800}.drag-handle{display:grid;place-items:center;width:28px;height:32px;border-radius:10px;background:rgba(255,255,255,.08);color:var(--muted);cursor:grab;user-select:none}.sortable-answer:active .drag-handle{cursor:grabbing}.sortable-answer.dragging{opacity:.52;transform:scale(.985);border-color:rgba(99,230,190,.65)}.sortable-answer.drag-over{box-shadow:0 -2px 0 rgba(99,230,190,.9)}.answer-list-admin.saving{opacity:.72;pointer-events:none}.answer-thumb{width:58px;height:42px;object-fit:cover;border-radius:12px;border:1px solid rgba(255,255,255,.14);background:rgba(0,0,0,.22)}.answer-thumb.empty{display:grid;place-items:center;font-size:10px;color:var(--muted);background:rgba(255,255,255,.055)}.answer img,.qimg{background:rgba(0,0,0,.16);border:1px solid rgba(255,255,255,.12)}
@media(max-width:900px){.answer-admin-row{grid-template-columns:30px 36px 54px 1fr}.answer-badge,.answer-picks{grid-column:4}.answer-thumb{width:48px;height:38px}.drag-handle{width:26px}}

/* v019: oprava náhledů obrázků, řazení odpovědí a přepsání rozbitého layoutu */
img.preview-img,
img.answer-thumb,
.qimg,
.answer img{
    display:block;
}
.preview-img{
    width:auto;
    max-width:100%;
    max-height:280px;
    object-fit:contain;
    border-radius:18px;
    background:rgba(0,0,0,.24);
}
.image-preview-box img{
    margin-top:4px;
}
.media-state{
    display:inline-flex;
    width:max-content;
    padding:5px 8px;
    border-radius:999px;
    font-size:11px;
    font-weight:800;
}
.media-state.ok{
    color:#c6ffd5;
    background:rgba(81,207,102,.16);
    border:1px solid rgba(81,207,102,.34);
}
.media-state.bad{
    color:#ffd0d0;
    background:rgba(255,107,107,.16);
    border:1px solid rgba(255,107,107,.34);
}
.answer-list-admin{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin:16px 0 22px;
}
.answer-admin-row{
    display:grid !important;
    grid-template-columns:42px 52px 76px minmax(180px,1fr) auto auto 74px;
    gap:12px;
    align-items:center;
    width:100%;
    min-height:72px;
    padding:12px 14px;
    border-radius:18px;
    background:rgba(255,255,255,.075);
    border:1px solid rgba(255,255,255,.12);
    transform:none;
}
.answer-admin-row:hover{
    background:rgba(255,255,255,.12);
    border-color:rgba(255,255,255,.22);
}
.answer-admin-row.correct{
    background:rgba(81,207,102,.11);
    border-color:rgba(81,207,102,.42);
}
.answer-admin-row.dragging{
    opacity:.55;
    border-color:rgba(99,230,190,.75);
    box-shadow:0 16px 40px rgba(0,0,0,.22);
}
.answer-admin-row.drop-before{
    box-shadow:0 -3px 0 rgba(99,230,190,.95);
}
.answer-admin-row.drop-after{
    box-shadow:0 3px 0 rgba(99,230,190,.95);
}
.drag-handle{
    display:grid;
    place-items:center;
    width:34px;
    height:42px;
    border-radius:13px;
    background:rgba(255,255,255,.10);
    border:1px solid rgba(255,255,255,.12);
    cursor:grab;
    touch-action:none;
    user-select:none;
}
.drag-handle:active{cursor:grabbing}
.answer-order{
    width:40px;
    height:40px;
    border-radius:14px;
}
.answer-thumb{
    width:66px;
    height:50px;
    object-fit:cover;
    border-radius:14px;
    border:1px solid rgba(255,255,255,.16);
    background:rgba(0,0,0,.25);
}
.answer-thumb.empty{
    display:grid;
    place-items:center;
    text-align:center;
    line-height:1.15;
}
.answer-text{
    min-width:0;
    overflow-wrap:anywhere;
}
.answer-sort-buttons{
    display:flex;
    gap:6px;
    justify-content:flex-end;
}
.mini-btn{
    width:32px;
    height:32px;
    min-width:32px;
    padding:0;
    border-radius:11px;
    font-size:15px;
    line-height:1;
    background:rgba(255,255,255,.12);
}
.answer-list-admin.saving{
    opacity:.65;
    pointer-events:none;
}
@media(max-width:980px){
    .answer-admin-row{
        grid-template-columns:38px 44px 64px minmax(0,1fr);
    }
    .answer-badge,
    .answer-picks,
    .answer-sort-buttons{
        grid-column:4;
        justify-self:start;
    }
}
@media(max-width:560px){
    .answer-admin-row{
        grid-template-columns:36px 42px minmax(0,1fr);
        gap:10px;
    }
    .answer-thumb{
        grid-column:1 / 3;
        width:90px;
        height:62px;
    }
    .answer-text,
    .answer-badge,
    .answer-picks,
    .answer-sort-buttons{
        grid-column:3;
    }
}

/* Testovník v020: kompaktní editor testů */
.compact-editor-head{
    display:flex;
    justify-content:space-between;
    gap:24px;
    align-items:flex-start;
    margin-bottom:24px;
}
.compact-editor-head h1{margin:14px 0 8px;}
.editor-stats{
    display:flex;
    gap:12px;
    align-items:center;
    flex-wrap:wrap;
    justify-content:flex-end;
}
.editor-stats span{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:10px 14px;
    border:1px solid rgba(255,255,255,.12);
    background:rgba(255,255,255,.06);
    border-radius:16px;
}
.compact-new-question{margin-bottom:24px;}
.compact-question-list{display:flex;flex-direction:column;gap:22px;}
.compact-question-card{
    padding:26px;
    overflow:hidden;
}
.compact-question-title{
    display:flex;
    gap:16px;
    align-items:flex-start;
    margin-bottom:18px;
}
.compact-question-title h2{margin:0 0 6px;font-size:1.18rem;line-height:1.35;}
.compact-question-title p{margin:0;color:var(--muted);font-size:.92rem;}
.q-num{
    min-width:42px;
    height:42px;
    border-radius:15px;
    display:grid;
    place-items:center;
    font-weight:900;
    background:linear-gradient(135deg,rgba(124,92,255,.32),rgba(45,212,191,.22));
    border:1px solid rgba(255,255,255,.13);
}
.compact-details{
    border:1px solid rgba(255,255,255,.10);
    background:rgba(255,255,255,.035);
    border-radius:18px;
    padding:0;
    margin-bottom:22px;
}
.compact-details summary{
    cursor:pointer;
    padding:14px 16px;
    font-weight:800;
    list-style:none;
}
.compact-details summary::-webkit-details-marker{display:none;}
.compact-details summary:before{content:'▾';margin-right:10px;color:var(--accent);}
.compact-details:not([open]) summary:before{content:'▸';}
.compact-details .form{padding:0 16px 16px;}
.compact-grid{
    display:grid;
    grid-template-columns:1.1fr .7fr .8fr;
    gap:14px;
    align-items:end;
}
.compact-media-row{
    display:flex;
    gap:14px;
    flex-wrap:wrap;
    margin:10px 0 14px;
}
.inline-delete{
    padding:0 16px 16px;
    display:flex;
    justify-content:flex-end;
}
.compact-answers-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:12px;
    margin:4px 0 12px;
}
.compact-answers-head h3{margin:0;}
.compact-answers-head small{color:var(--muted);}
.compact-answer-list{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-bottom:16px;
}
.compact-answer-row{
    display:grid;
    grid-template-columns:34px 72px 118px minmax(180px,1fr) 128px 184px;
    gap:10px;
    align-items:center;
    padding:12px;
    border:1px solid rgba(255,255,255,.11);
    background:rgba(255,255,255,.045);
    border-radius:18px;
    transition:transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.compact-answer-row.correct{
    border-color:rgba(34,197,94,.35);
    background:rgba(34,197,94,.08);
}
.compact-answer-row.dragging{
    opacity:.72;
    transform:scale(.992);
    box-shadow:0 18px 40px rgba(0,0,0,.30);
}
.compact-answer-row.drop-before{border-top-color:var(--accent);}
.compact-answer-row.drop-after{border-bottom-color:var(--accent);}
.drag-handle{
    cursor:grab;
    width:30px;
    height:34px;
    border-radius:12px;
    display:grid;
    place-items:center;
    background:rgba(255,255,255,.08);
    user-select:none;
}
.mini-order{font-size:.72rem;color:var(--muted);display:flex;flex-direction:column;gap:4px;}
.mini-order input{padding:7px 8px;min-height:34px;}
.answer-media-cell{display:flex;align-items:center;gap:8px;min-width:0;}
.answer-media-cell input[type=file]{font-size:.72rem;max-width:74px;padding:6px;}
.compact-answer-row textarea{min-height:52px;resize:vertical;}
.compact-switch{margin:0;white-space:nowrap;}
.answer-row-actions{
    display:flex;
    gap:6px;
    justify-content:flex-end;
    flex-wrap:wrap;
}
.answer-row-actions .btn{padding:8px 10px;min-height:36px;}
.mini-btn{
    border:1px solid rgba(255,255,255,.14);
    background:rgba(255,255,255,.08);
    color:var(--text);
    border-radius:10px;
    min-width:34px;
    min-height:34px;
    cursor:pointer;
}
.compact-add-answer{
    display:grid;
    grid-template-columns:minmax(220px,1fr) 132px 150px auto;
    gap:12px;
    align-items:center;
    padding:14px;
    border:1px dashed rgba(255,255,255,.16);
    border-radius:18px;
    background:rgba(255,255,255,.025);
}
.compact-add-answer textarea{min-height:48px;}
.answer-file{font-size:.84rem;display:flex;flex-direction:column;gap:4px;color:var(--muted);}
.preview-img,.answer-thumb{object-fit:cover;}
.answer-thumb{
    width:54px;
    height:42px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,.12);
    background:rgba(0,0,0,.18);
}
.answer-thumb.empty{
    display:grid;
    place-items:center;
    color:var(--muted);
    font-size:.68rem;
}
@media(max-width:980px){
    .compact-editor-head{flex-direction:column;}
    .editor-stats{justify-content:flex-start;}
    .compact-grid{grid-template-columns:1fr;}
    .compact-answer-row{grid-template-columns:34px 70px 110px 1fr;}
    .compact-answer-row textarea,.compact-switch,.answer-row-actions{grid-column:1/-1;}
    .compact-add-answer{grid-template-columns:1fr;}
}
@media(max-width:640px){
    .compact-question-card{padding:18px;}
    .compact-answer-row{grid-template-columns:32px 70px 1fr;}
    .answer-media-cell{grid-column:1/-1;}
}

/* v021 - nová kompaktní editace otázek */
.split-head{display:flex;justify-content:space-between;gap:24px;align-items:flex-start;margin-bottom:24px}
.question-list-page,.question-editor-page,.answer-editor-page{animation:softIn .22s ease both}
.question-create-grid{display:grid;grid-template-columns:minmax(260px,1fr) 220px 260px;gap:16px;align-items:end}
.question-index{display:flex;flex-direction:column;gap:12px;margin-top:24px}
.question-row-link{display:grid;grid-template-columns:56px minmax(0,1fr) 74px 100px;gap:16px;align-items:center;text-decoration:none;color:inherit;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.11);border-radius:20px;padding:16px 18px;transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease}
.question-row-link:hover{transform:translateY(-2px);background:rgba(255,255,255,.085);border-color:rgba(124,231,255,.42);box-shadow:0 18px 44px rgba(0,0,0,.22)}
.question-row-num{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:rgba(124,231,255,.14);color:#baf4ff;font-weight:800}
.question-row-main strong{display:block;font-size:1.02rem;margin-bottom:5px}.question-row-main small{color:var(--muted)}
.question-row-thumb img{width:64px;height:48px;object-fit:cover;border-radius:12px;border:1px solid rgba(255,255,255,.15)}
.question-row-open{justify-self:end;color:#baf4ff;font-weight:800}
.ajax-box{background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.10);border-radius:22px;padding:22px;margin-top:18px}
.question-edit-layout{grid-template-columns:240px minmax(0,1fr);align-items:start}.answer-editor-page{grid-column:2}
.editor-ajax-form{background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.08);border-radius:22px;padding:20px}
.editor-grid{grid-template-columns:minmax(180px,260px) 150px minmax(220px,1fr)}
.media-preview-panel{display:grid;grid-template-columns:220px minmax(220px,1fr);gap:16px;margin:16px 0}.media-preview-panel.small{grid-template-columns:150px minmax(160px,1fr);margin:10px 0}
.image-preview-box.empty{opacity:.78}.image-preview-box em{display:grid;place-items:center;min-height:80px;color:var(--muted);font-style:normal}.media-preview-panel.small .preview-img{max-height:110px}
.upload-progress{height:28px;border-radius:999px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);overflow:hidden;position:relative;margin:14px 0}.upload-progress i{display:block;height:100%;width:0;background:linear-gradient(90deg,#38bdf8,#a78bfa);transition:width .16s ease}.upload-progress span{position:absolute;inset:0;display:grid;place-items:center;font-weight:800;font-size:.82rem;color:white;text-shadow:0 1px 3px #000}
.form-message{min-height:22px;margin:8px 0;font-size:.92rem}.form-message.ok{color:#86efac}.form-message.bad{color:#fca5a5}.is-saving{opacity:.82;pointer-events:none}.sticky-actions{position:sticky;bottom:12px;background:rgba(13,18,35,.72);backdrop-filter:blur(14px);padding:12px;border-radius:18px;border:1px solid rgba(255,255,255,.10)}
.ajax-answer-list{display:flex;flex-direction:column;gap:14px;margin:18px 0}.answer-edit-card{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.12);border-radius:22px;padding:14px;transition:transform .18s ease,border-color .18s ease,background .18s ease}.answer-edit-card.dragging{opacity:.55;transform:scale(.99)}.answer-edit-card.drop-before{border-top-color:#7ce7ff}.answer-edit-card.drop-after{border-bottom-color:#7ce7ff}.drag-handle{cursor:grab;user-select:none;display:grid;place-items:center;border-radius:16px;background:rgba(255,255,255,.07);font-weight:900;color:#baf4ff}.answer-edit-grid{display:grid;grid-template-columns:minmax(240px,1fr) minmax(180px,260px) 150px;gap:14px;align-items:end}.answer-switch{align-self:center}.answer-actions{gap:10px;flex-wrap:wrap}.pill-soft{display:inline-flex;align-items:center;gap:6px;border-radius:999px;background:rgba(124,231,255,.12);border:1px solid rgba(124,231,255,.24);padding:8px 12px;color:#d9fbff}
@keyframes softIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:900px){.split-head{flex-direction:column}.question-create-grid,.editor-grid,.answer-edit-grid,.media-preview-panel,.media-preview-panel.small{grid-template-columns:1fr}.question-edit-layout{grid-template-columns:1fr}.answer-editor-page{grid-column:auto}.question-row-link{grid-template-columns:46px minmax(0,1fr);}.question-row-thumb,.question-row-open{display:none}}

/* v022 - otázky jako klikací karty a oprava provozu bez mbstring */
.question-card-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:18px;
    margin-top:24px;
}
.question-click-card{
    min-height:260px;
    display:flex;
    flex-direction:column;
    text-decoration:none;
    color:inherit;
    background:linear-gradient(145deg,rgba(255,255,255,.085),rgba(255,255,255,.035));
    border:1px solid rgba(255,255,255,.12);
    border-radius:26px;
    padding:16px;
    overflow:hidden;
    box-shadow:0 18px 50px rgba(0,0,0,.18);
    transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
.question-click-card:hover{
    transform:translateY(-4px);
    border-color:rgba(124,231,255,.48);
    box-shadow:0 26px 70px rgba(0,0,0,.28),0 0 0 1px rgba(124,231,255,.06) inset;
    background:linear-gradient(145deg,rgba(124,231,255,.12),rgba(255,255,255,.045));
}
.question-card-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    margin-bottom:12px;
}
.question-card-num{
    width:44px;
    height:44px;
    display:grid;
    place-items:center;
    border-radius:15px;
    background:rgba(124,231,255,.16);
    color:#c9f8ff;
    font-weight:900;
}
.question-card-state{
    border-radius:999px;
    padding:7px 10px;
    font-size:.78rem;
    font-weight:800;
    border:1px solid rgba(255,255,255,.13);
    color:var(--muted);
    background:rgba(255,255,255,.05);
}
.question-card-state.is-on{color:#b7ffd0;background:rgba(34,197,94,.13);border-color:rgba(34,197,94,.25)}
.question-card-state.is-off{color:#ffd2d2;background:rgba(239,68,68,.10);border-color:rgba(239,68,68,.22)}
.question-card-image{
    height:126px;
    border-radius:20px;
    overflow:hidden;
    background:rgba(0,0,0,.18);
    border:1px solid rgba(255,255,255,.10);
    margin-bottom:14px;
}
.question-card-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.question-card-image.empty{
    display:grid;
    place-items:center;
    color:var(--muted);
    font-weight:700;
    background:radial-gradient(circle at 30% 30%,rgba(124,231,255,.12),rgba(0,0,0,.15));
}
.question-card-body{flex:1;min-height:0;}
.question-card-body h3{
    margin:0 0 10px;
    font-size:1.05rem;
    line-height:1.35;
}
.question-card-body p{
    margin:0;
    color:var(--muted);
    font-size:.9rem;
}
.question-card-action{
    margin-top:16px;
    padding-top:14px;
    border-top:1px solid rgba(255,255,255,.10);
    color:#baf4ff;
    font-weight:900;
}
@media(max-width:640px){
    .question-card-grid{grid-template-columns:1fr;gap:14px;}
    .question-click-card{min-height:auto;border-radius:22px;}
}

/* v023 - výběr obrázku kliknutím na náhled / Bez obrázku */
.image-file-input{
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    opacity:0 !important;
    overflow:hidden !important;
    pointer-events:none !important;
}
.image-picker-note{
    min-height:48px;
    display:flex;
    align-items:center;
    padding:12px 14px;
    border-radius:16px;
    border:1px dashed rgba(124,231,255,.28);
    background:rgba(124,231,255,.06);
    color:var(--muted);
    font-size:13px;
    line-height:1.35;
}
.image-picker-box{
    cursor:pointer;
    position:relative;
    transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.image-picker-box:hover,
.image-picker-box:focus-visible{
    transform:translateY(-1px);
    border-color:rgba(99,230,190,.62);
    background:rgba(99,230,190,.09);
    box-shadow:0 18px 48px rgba(99,230,190,.12);
    outline:none;
}
.image-picker-box .pick-hint{
    display:block;
    color:#9ff7e4;
    font-size:12px;
    line-height:1.3;
    opacity:.92;
}
.image-picker-box.empty em{
    border:1px dashed rgba(255,255,255,.22);
    border-radius:14px;
    background:rgba(0,0,0,.14);
}
.image-picker-box::after{
    content:'Vybrat obrázek';
    position:absolute;
    right:12px;
    bottom:12px;
    padding:7px 10px;
    border-radius:999px;
    background:rgba(15,23,42,.78);
    border:1px solid rgba(255,255,255,.16);
    color:#dffbf6;
    font-size:11px;
    font-weight:800;
    opacity:0;
    transform:translateY(4px);
    transition:opacity .18s ease,transform .18s ease;
    pointer-events:none;
}
.image-picker-box:hover::after,
.image-picker-box:focus-visible::after{
    opacity:1;
    transform:translateY(0);
}

/* v024 - miniatury obrázků v testu + modal */
body.modal-open{overflow:hidden}.quiz-image-thumb{position:relative;flex:0 0 auto;width:132px;height:92px;padding:0;border-radius:18px;overflow:hidden;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08);box-shadow:0 12px 36px rgba(0,0,0,.18);transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}.quiz-image-thumb:hover{transform:translateY(-2px) scale(1.015);border-color:rgba(99,230,190,.72);box-shadow:0 16px 46px rgba(0,0,0,.28)}.quiz-image-thumb img{width:100%;height:100%;object-fit:cover;display:block;border-radius:0}.quiz-image-thumb span{position:absolute;right:8px;bottom:8px;width:30px;height:30px;display:grid;place-items:center;border-radius:999px;background:rgba(7,17,31,.74);backdrop-filter:blur(8px);font-size:14px}.question-thumb{width:190px;height:130px;margin:8px 0 18px}.answer .quiz-image-thumb{width:86px;height:64px;margin-right:4px}.answer .quiz-image-thumb span{width:24px;height:24px;right:5px;bottom:5px;font-size:11px}.image-modal{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:28px;background:rgba(3,8,18,.84);backdrop-filter:blur(18px);animation:modalFade .18s ease both}.image-modal.hidden{display:none}.image-modal-panel{position:relative;max-width:min(1100px,96vw);max-height:92vh;padding:58px 18px 18px;border-radius:26px;background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.07));border:1px solid rgba(255,255,255,.18);box-shadow:0 30px 100px rgba(0,0,0,.55)}.image-modal-panel img{display:block;max-width:100%;max-height:calc(92vh - 90px);object-fit:contain;border-radius:18px;cursor:zoom-in}.image-modal-close{position:absolute;top:14px;right:14px;z-index:2}.image-modal.fullscreen{padding:0;background:#020611}.image-modal.fullscreen .image-modal-panel{width:100vw;height:100vh;max-width:none;max-height:none;padding:0;border:0;border-radius:0;background:#020611;display:grid;place-items:center}.image-modal.fullscreen .image-modal-panel img{width:100vw;height:100vh;max-width:none;max-height:none;object-fit:contain;border-radius:0;cursor:zoom-out}.image-modal.fullscreen .image-modal-close{top:18px;right:18px;background:rgba(255,255,255,.16);box-shadow:0 10px 28px rgba(0,0,0,.4)}@keyframes modalFade{from{opacity:0}to{opacity:1}}@media(max-width:760px){.question-thumb{width:150px;height:104px}.answer .quiz-image-thumb{width:72px;height:54px}.image-modal{padding:12px}.image-modal-panel{padding:56px 12px 12px;border-radius:20px}}
