@import"https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap";:root{font-family:Atkinson Hyperlegible,Segoe UI,system-ui,-apple-system,BlinkMacSystemFont,sans-serif;color:#1b1e2b;background-color:#f5f6fb;line-height:1.5}*{box-sizing:border-box}body{margin:0;padding:0;font-family:inherit;-webkit-font-smoothing:antialiased;background:#f1f2fa}input,textarea,select,button{font-family:inherit;font-size:16px}button{min-height:44px;border-radius:8px;padding:.5rem 1rem;border:1px solid #d0d5ff;background:#fff;cursor:pointer;transition:all .2s ease}button:hover:not(:disabled){border-color:#7b83ff;box-shadow:0 2px 8px #7b83ff33}button:disabled{opacity:.5;cursor:not-allowed}.app-header{display:flex;justify-content:space-between;align-items:center;padding:1rem 0;margin-bottom:1rem}.app-header h1{margin:0;font-size:1.8rem}.top-settings{margin-bottom:1.5rem}.setting-grid{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}.setting-grid label{display:flex;flex-direction:column;gap:4px}.setting-grid select{padding:.5rem .7rem;border-radius:10px;border:1px solid #dfe2ff}.workspace{display:flex;gap:18px}.reading-split{flex:1;display:flex;gap:18px;align-items:stretch;min-width:0}.left-toolbar{flex:0 0 100px;min-width:90px;max-width:110px;display:flex;flex-direction:column;gap:8px;align-self:flex-start;position:sticky;top:20px}.toolbar-group{display:flex;flex-direction:column;gap:6px}.toolbar-group span{font-size:.65rem;letter-spacing:.08em;color:#8a8fb8;text-transform:uppercase;font-weight:600;text-align:center}.toolbar-group button{width:100%;font-size:.75rem;padding:.35rem .5rem;min-height:32px}.text-zone{flex:1 1 50%;min-width:320px;max-width:700px;min-height:500px}.text-content{display:flex;flex-direction:column;gap:12px;height:100%}.text-header-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.mode-inline{display:flex;gap:6px}.mode-button{padding:.4rem .9rem;font-size:.9rem;min-height:36px}.mode-button.active,.tool-button.active{border-color:#7b83ff;color:#1f1e5a;background:#f8f8ff;font-weight:600}.audio-controls{display:flex;gap:8px}.story-audio-btn{display:inline-flex;align-items:center;gap:6px;background:#1f1e5a;color:#fff;border:none;padding:.5rem 1rem;border-radius:999px;font-weight:600;font-size:.9rem;min-height:36px}.story-audio-btn.playing{background:#e63946}.story-audio-btn:disabled{opacity:.4}.batch-generate-btn{display:flex;align-items:center;justify-content:center;gap:6px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;padding:.65rem 1rem;border-radius:8px;font-weight:600;font-size:.95rem;min-height:44px;cursor:pointer;transition:all .2s ease;box-shadow:0 2px 8px #667eea4d;width:100%}.batch-generate-btn:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 12px #667eea66}.batch-generate-btn:disabled{opacity:.5;cursor:not-allowed}.batch-generate-btn.loaded{background:linear-gradient(135deg,#11998e,#38ef7d)}.audio-error{padding:8px 12px;background:#ffebee;color:#c62828;border-radius:8px;font-size:.85rem;margin-bottom:8px}.fragment-view{border:1px solid #e0e4ff;border-radius:18px;padding:1.4rem;background:#fff;line-height:1.8;font-size:1rem;transition:font-size .2s ease;max-height:420px;overflow-y:auto;white-space:pre-wrap}.fragment-view.large{font-size:1.2rem;line-height:2}.fragment-view.with-ruler{background-image:repeating-linear-gradient(transparent,transparent 26px,rgba(103,114,229,.08) 26px,rgba(103,114,229,.08) 28px)}.fragment-reading{box-shadow:inset 0 0 0 3px #7b83ff;background:#f8f9ff}.hl-correct{background:#4caf504d;border-radius:4px;padding:2px 4px;font-weight:500}.hl-wrong{background:#ef53504d;border-radius:4px;padding:2px 4px;font-weight:500}.seq-word{background:#ffd54f66;border-radius:4px;padding:1px 3px;font-weight:500}.audio-highlight{background:linear-gradient(120deg,#84fab0,#8fd3f4);border-radius:6px;padding:3px 6px;font-weight:600;color:#1f1e5a;box-shadow:0 2px 8px #84fab066;transition:all .15s ease-in-out;animation:pulse-highlight .3s ease-in-out}@keyframes pulse-highlight{0%{transform:scale(1)}50%{transform:scale(1.05)}to{transform:scale(1)}}.qa-panel{flex:0 1 30%;min-width:280px;max-width:380px;min-height:500px;display:flex;flex-direction:column;gap:12px;align-self:flex-start;position:sticky;top:20px}.qa-panel-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:flex-start}.qa-progress-count{display:block;color:#8a8fb8;font-size:.85rem;margin-top:2px}.difficulty-row{display:flex;gap:6px;flex-wrap:wrap}.difficulty-row button{font-size:.8rem;padding:.3rem .7rem;min-height:32px}.loading-message{padding:12px;background:#e3f2fd;border-radius:8px;text-align:center;font-size:.9rem;color:#1565c0}.result-banner{padding:12px 14px;border-radius:12px;border:1px solid #dfe2ff;background:#eef1ff;color:#4f5795;display:flex;flex-direction:column;gap:4px;font-size:.9rem}.result-banner.correct{background:#4caf5026;color:#1b5e20;border-color:#4caf5066}.result-banner.incorrect{background:#ef535026;color:#b71c1c;border-color:#ef535066}.result-banner.rateLimited{background:#ffc10733;color:#7a4a00;border-color:#ffc10766}.qa-body{flex:1;display:flex;flex-direction:column;gap:12px}.qa-question-block{border:1px solid #dfe2ff;border-radius:12px;padding:12px;background:#fff;display:flex;flex-direction:column;gap:8px}.qa-question-block p{margin:0;font-size:1rem;line-height:1.6}.question-audio-btn{align-self:flex-start;background:#f2f4ff;border:1px solid #d0d5ff;border-radius:999px;padding:.35rem .8rem;font-weight:600;font-size:.85rem;min-height:34px}.qa-body label{font-weight:500;font-size:.9rem;color:#5f648a}.answer-input{width:100%;border-radius:10px;border:1px solid #dfe2ff;padding:.7rem .9rem;font-size:1rem;line-height:1.5;resize:vertical}.submit-btn{width:100%;background:#28a745;color:#fff;border:none;font-weight:600}.submit-btn:hover:not(:disabled){background:#218838;box-shadow:0 3px 10px #28a7454d}.next-btn{width:100%;background:#ffc107;color:#1f1e5a;border:none;font-weight:600;margin-top:8px}.next-btn:hover:not(:disabled){background:#ffb300}.read-again-btn{width:100%;background:#f8f9ff;border:1px solid #7b83ff;color:#1f1e5a;font-weight:600}.read-again-btn:hover:not(:disabled){background:#7b83ff;color:#fff}.panel{background:#fff;border-radius:18px;border:1px solid #e1e4ff;padding:1.2rem;box-shadow:0 10px 30px #10195f0f}.panel-title{margin:0 0 12px;font-size:.9rem;text-transform:uppercase;letter-spacing:.08em;color:#7b83ff;font-weight:700}.hint{font-size:.85rem;color:#6a6f91;margin:8px 0;line-height:1.5}.hint-text{font-size:.8rem;color:#8a8fb8;line-height:1.4;display:block;margin-top:4px}.upload-container{max-width:900px;margin:0 auto}.upload-form{background:#fff;border-radius:18px;padding:2rem;border:1px solid #e1e4ff;box-shadow:0 10px 30px #10195f0f}.control-grid{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.tool-with-hint{display:flex;flex-direction:column;gap:4px}.tool-with-hint button{width:100%}.preview-panel-scrollable{border:1px solid #dfe2ff;border-radius:12px;padding:1rem;background:#fafbff;max-height:350px;overflow-y:auto}.preview-fragment{padding:12px;margin-bottom:12px;background:#fff;border-radius:8px;border:1px solid #e8ebff}.preview-fragment:last-child{margin-bottom:0}.upload-message{padding:12px 16px;border-radius:10px;margin-top:16px;font-weight:500}.upload-message.success{background:#d4edda;color:#155724;border:1px solid #c3e6cb}.upload-message.error{background:#f8d7da;color:#721c24;border:1px solid #f5c6cb}.save-button{background:#7b83ff;color:#fff;border:none}.save-button:hover:not(:disabled){background:#6772e5;box-shadow:0 4px 12px #7b83ff66}@media(max-width:1100px){.reading-split{flex-wrap:wrap}.text-zone{flex:1 1 100%;max-width:none}.qa-panel{flex:1 1 100%;max-width:none;position:static}.left-toolbar{flex:1 1 100%;max-width:none;flex-direction:row;position:static}.toolbar-group{flex:1;flex-direction:row;gap:8px}.toolbar-group button{flex:1;min-width:80px}}@media(max-width:768px){.setting-grid{grid-template-columns:1fr}.text-header-actions{flex-direction:column;align-items:stretch}.mode-inline{width:100%}.mode-button{flex:1}.audio-controls{width:100%}.story-audio-btn{width:100%;justify-content:center}.fragment-view{max-height:300px}.control-grid{grid-template-columns:1fr}.difficulty-row{width:100%}.difficulty-row button{flex:1}}@media(max-width:600px){button{width:100%}.toolbar-group{flex-direction:column}}.upload-success-banner{position:fixed;top:80px;left:50%;transform:translate(-50%);background:linear-gradient(135deg,#4caf50,#45a049);color:#fff;padding:16px 32px;border-radius:12px;box-shadow:0 4px 20px #4caf5066;z-index:1000;font-weight:600;animation:slideDown .4s ease,fadeOut .5s ease 3.5s forwards;max-width:90%;text-align:center}@keyframes slideDown{0%{opacity:0;transform:translate(-50%) translateY(-20px)}to{opacity:1;transform:translate(-50%) translateY(0)}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.final-results-overlay{position:fixed;inset:0;background:#1b1e2bd9;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:2000;animation:fadeIn .3s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.final-results-modal{background:#fff;border-radius:20px;padding:40px;max-width:500px;width:90%;box-shadow:0 10px 50px #0000004d;animation:scaleIn .3s ease;text-align:center}@keyframes scaleIn{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}.final-results-modal h2{margin:0 0 24px;font-size:2rem;color:#7b83ff}.score-summary{margin-bottom:32px}.score-big{font-size:4rem;font-weight:700;color:#4caf50;line-height:1;margin-bottom:8px;background:linear-gradient(135deg,#4caf50,#45a049);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.score-summary p{margin:0;font-size:1.1rem;color:#6a6f91;font-weight:500}.fragment-breakdown{background:#f5f6fb;border-radius:12px;padding:20px;margin-bottom:24px;text-align:left}.fragment-breakdown h3{margin:0 0 16px;font-size:1rem;color:#1b1e2b;font-weight:600}.fragment-score-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid #e5e7f3}.fragment-score-row:last-child{border-bottom:none}.fragment-score-row strong{color:#1b1e2b;font-weight:600}.score-value{color:#7b83ff;font-weight:700;font-size:1.1rem}.start-over-btn{background:linear-gradient(135deg,#7b83ff,#6a73e6);color:#fff;border:none;padding:14px 32px;font-size:1.1rem;font-weight:600;border-radius:12px;cursor:pointer;transition:all .2s ease;box-shadow:0 4px 15px #7b83ff4d;width:100%}.start-over-btn:hover{transform:translateY(-2px);box-shadow:0 6px 20px #7b83ff66}.start-over-btn:active{transform:translateY(0)}@media(max-width:600px){.final-results-modal{padding:24px;max-width:95%}.final-results-modal h2{font-size:1.5rem}.score-big{font-size:3rem}.upload-success-banner{padding:12px 20px;font-size:.9rem}}nav a[href="/upload"]:hover{opacity:.9;box-shadow:0 2px 8px #7b83ff4d}nav a[href="/upload"]:active{opacity:.8}
