:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.app{min-height:100vh;display:flex;flex-direction:column}.app-header{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:2rem;text-align:center;box-shadow:0 4px 6px #0000001a}.app-header h1{margin:0;font-size:3rem;font-weight:700}.subtitle{margin:.5rem 0;opacity:.9;font-size:1.1rem}.nav{display:flex;gap:1rem;justify-content:center;margin-top:1.5rem}.nav button{padding:.75rem 1.5rem;border:2px solid white;background:transparent;color:#fff;border-radius:8px;cursor:pointer;font-size:1rem;font-weight:500;transition:all .3s}.nav button:hover,.nav button.active{background:#fff;color:#667eea}.app-main{flex:1;max-width:1200px;width:100%;margin:0 auto;padding:2rem}.app-footer{background:#f8f9fa;padding:1.5rem;text-align:center;color:#666;border-top:1px solid #e0e0e0}.loading{text-align:center;padding:3rem;font-size:1.2rem;color:#667eea}.error{text-align:center;padding:2rem;background:#fee;border-radius:8px;color:#c33;margin:2rem 0}.create-story{max-width:800px;margin:0 auto}.create-story h2{margin-bottom:2rem;color:#333}.story-form{background:#fff;padding:2rem;border-radius:12px;box-shadow:0 2px 8px #0000001a}.form-group{margin-bottom:1.5rem}.form-group label{display:block;margin-bottom:.5rem;font-weight:500;color:#333}.form-group input,.form-group textarea,.form-group select{width:100%;padding:.75rem;border:2px solid #e0e0e0;border-radius:8px;font-size:1rem;font-family:inherit;transition:border-color .3s}.form-group input:focus,.form-group textarea:focus,.form-group select:focus{outline:none;border-color:#667eea}.form-group textarea{resize:vertical;min-height:100px}.form-group small{display:block;margin-top:.25rem;color:#888;font-size:.85rem}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.submit-btn{width:100%;padding:1rem;background:#667eea;color:#fff;border:none;border-radius:8px;font-size:1.1rem;font-weight:500;cursor:pointer;transition:background .3s;margin-top:1rem}.submit-btn:hover:not(:disabled){background:#5568d3}.submit-btn:disabled{background:#ccc;cursor:not-allowed}.error-message{background:#f8d7da;color:#721c24;padding:1rem;border-radius:8px;margin-bottom:1rem}.story-list{padding:1rem}.story-list h2{margin-bottom:2rem;color:#333}.stories-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1.5rem}.story-card{background:#fff;border-radius:12px;padding:1.5rem;box-shadow:0 2px 8px #0000001a;transition:transform .2s,box-shadow .2s}.story-card:hover{transform:translateY(-4px);box-shadow:0 4px 16px #00000026}.story-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.story-emoji{font-size:2rem}.status-badge{padding:.25rem .75rem;border-radius:12px;font-size:.8rem;font-weight:500}.status-badge.draft{background:#e0e0e0;color:#666}.status-badge.processing{background:#fff3cd;color:#856404}.status-badge.published{background:#d4edda;color:#155724}.status-badge.error{background:#f8d7da;color:#721c24}.story-card h3{margin:0 0 1rem;color:#333;font-size:1.3rem}.story-idea{color:#666;font-size:.9rem;line-height:1.5;margin-bottom:1rem;min-height:60px}.story-meta{display:flex;gap:1rem;font-size:.85rem;color:#888;margin-bottom:1rem}.view-btn{width:100%;padding:.75rem;background:#667eea;color:#fff;border:none;border-radius:8px;font-size:1rem;cursor:pointer;transition:background .3s}.view-btn:hover:not(:disabled){background:#5568d3}.view-btn:disabled{background:#ccc;cursor:not-allowed}.empty-state{text-align:center;padding:4rem 2rem;color:#666}.empty-state p:first-child{font-size:1.5rem;margin-bottom:1rem}.story-viewer{max-width:900px;margin:0 auto}.viewer-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:2rem;padding-bottom:1rem;border-bottom:2px solid #e0e0e0}.back-btn{padding:.5rem 1rem;background:#f0f0f0;border:none;border-radius:8px;cursor:pointer;font-size:1rem;transition:background .3s}.back-btn:hover{background:#e0e0e0}.viewer-header h2{margin:0;color:#333;flex:1;text-align:center}.page-counter{padding:.5rem 1rem;background:#667eea;color:#fff;border-radius:8px;font-weight:500}.viewer-content{background:#fff;border-radius:12px;padding:2rem;box-shadow:0 2px 8px #0000001a}.no-pages{text-align:center;padding:3rem 2rem;color:#666}.no-pages p:first-child{font-size:1.3rem;margin-bottom:1rem}.story-info{background:#f8f9fa;padding:1.5rem;border-radius:8px;margin-top:2rem;text-align:left}.story-info p{margin:.5rem 0}.story-page{margin-bottom:2rem}.page-illustration{width:100%;aspect-ratio:4/3;background:#f0f0f0;border-radius:12px;overflow:hidden;margin-bottom:1.5rem}.page-illustration img{width:100%;height:100%;object-fit:cover}.placeholder-image{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#999}.placeholder-image span{font-size:4rem;margin-bottom:1rem}.page-text{font-size:1.3rem;line-height:1.8;color:#333;text-align:center;padding:1.5rem;background:#f8f9fa;border-radius:8px}.page-audio{margin-top:1.5rem;text-align:center}.page-audio audio{width:100%;max-width:400px}.page-navigation{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:2rem}.nav-btn{padding:.75rem 1.5rem;background:#667eea;color:#fff;border:none;border-radius:8px;cursor:pointer;font-size:1rem;transition:background .3s}.nav-btn:hover:not(:disabled){background:#5568d3}.nav-btn:disabled{background:#ccc;cursor:not-allowed;opacity:.5}.page-dots{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:center}.dot{width:12px;height:12px;border-radius:50%;background:#e0e0e0;border:none;cursor:pointer;transition:all .3s;padding:0}.dot:hover{background:#667eea;transform:scale(1.2)}.dot.active{background:#667eea;width:24px;border-radius:6px}
