*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;background:linear-gradient(135deg,#2c3e50,#34495e);min-height:100vh;height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;color:#333;overflow-x:hidden;overflow-y:auto}.container{width:100%;max-width:720px;margin:0 auto;max-height:100%;display:flex;flex-direction:column;overflow:hidden}header{text-align:center;color:#fff;margin-bottom:16px;flex-shrink:0}header h1{font-size:2.2rem;font-weight:700;margin-bottom:2px;text-shadow:2px 2px 4px rgba(0,0,0,.2);letter-spacing:-.5px}.subtitle{font-size:.95rem;opacity:.95;font-weight:300}.creation-form{background:#fff;border-radius:16px;padding:28px;box-shadow:0 20px 60px #0000004d;flex:1;display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto;min-height:0}.form-section{margin-bottom:20px;flex-shrink:0}.section-label{display:block;font-size:.95rem;font-weight:600;color:#2d3748;margin-bottom:10px;text-transform:uppercase;letter-spacing:.5px;font-size:.85rem}.radio-group{display:flex;gap:10px}.radio-option{flex:1;cursor:pointer}.radio-option input[type=radio]{display:none}.radio-option span{display:block;padding:10px 16px;background:#f7fafc;border:2px solid #e2e8f0;border-radius:8px;text-align:center;font-weight:500;font-size:.95rem;transition:all .2s ease}.radio-option input[type=radio]:checked+span{background:#2c3e50;color:#fff;border-color:#2c3e50;box-shadow:0 2px 8px #2c3e504d}.radio-option:hover span{border-color:#2c3e50;transform:translateY(-1px)}.settings-row{margin-bottom:16px}.section-divider{height:1px;background:linear-gradient(90deg,transparent,#e2e8f0 20%,#e2e8f0 80%,transparent);margin:20px 0}.setting-item{display:flex;align-items:center;justify-content:space-between;gap:20px}.setting-item.full-width{flex-direction:column;align-items:flex-start;gap:10px;padding-right:0}.setting-label{font-size:.95rem;font-weight:600;color:#2d3748;flex-shrink:0}.setting-help{font-size:.8rem;color:#718096;line-height:1.4;margin-top:-4px}.api-key-input{width:100%;padding:10px 12px;border:2px solid #e2e8f0;border-radius:8px;font-size:.9rem;font-family:Monaco,Menlo,Courier New,monospace;transition:all .2s ease;background:#f7fafc}.api-key-input:focus{outline:none;border-color:#2c3e50;background:#fff;box-shadow:0 0 0 3px #2c3e501a}.radio-group-inline{display:flex;gap:8px;flex-shrink:0;width:240px}.radio-group-inline .radio-option{flex:1;min-width:72px}.radio-group-inline .radio-option span{padding:10px 16px;font-size:.88rem;white-space:nowrap;text-align:center;display:flex;align-items:center;justify-content:center}.toggle-buttons{display:flex;gap:8px;background:#f7fafc;padding:4px;border-radius:10px}.toggle-btn{flex:1;padding:10px 16px;background:transparent;border:none;border-radius:8px;font-size:.95rem;font-weight:500;cursor:pointer;transition:all .2s ease;color:#4a5568}.toggle-btn:hover{background:#e2e8f0}.toggle-btn.active{background:#fff;color:#2c3e50;box-shadow:0 2px 4px #0000001a}.story-input{width:100%;height:100%;padding:12px;border:2px solid #e2e8f0;border-radius:8px;font-size:.95rem;font-family:inherit;resize:none;transition:all .2s ease;line-height:1.5}.story-input:focus{outline:none;border-color:#2c3e50;box-shadow:0 0 0 3px #2c3e501a}#customSection,#randomSection{display:flex;flex-direction:column;height:180px}#customSection.hidden,#randomSection.hidden{display:none}.genre-grid{display:flex;gap:12px;overflow-x:auto;overflow-y:hidden;padding:12px 4px;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;height:100%;align-items:center}.genre-grid::-webkit-scrollbar{height:6px}.genre-grid::-webkit-scrollbar-track{background:#f7fafc;border-radius:3px}.genre-grid::-webkit-scrollbar-thumb{background:#cbd5e0;border-radius:3px}.genre-grid::-webkit-scrollbar-thumb:hover{background:#a0aec0}.genre-option{cursor:pointer;flex-shrink:0}.genre-option input[type=radio]{display:none}.genre-card{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px 14px;background:#f7fafc;border:2px solid #e2e8f0;border-radius:10px;transition:all .2s ease;text-align:center;width:140px;min-width:140px;height:140px}.genre-icon{font-size:2rem;margin-bottom:6px}.genre-name{font-weight:600;font-size:.95rem;color:#2d3748;margin-bottom:4px}.genre-desc{font-size:.75rem;color:#718096;line-height:1.3}.genre-option input[type=radio]:checked+.genre-card{background:#2c3e50;border-color:#2c3e50;box-shadow:0 2px 8px #2c3e504d}.genre-option input[type=radio]:checked+.genre-card .genre-name,.genre-option input[type=radio]:checked+.genre-card .genre-desc{color:#fff}.genre-option:hover .genre-card{border-color:#2c3e50;transform:translateY(-2px);box-shadow:0 4px 12px #2c3e5033}.create-btn{width:100%;display:block;padding:14px;background:linear-gradient(135deg,#2c3e50,#34495e);color:#fff;border:none;border-radius:10px;font-size:1.05rem;font-weight:600;cursor:pointer;transition:all .2s ease;box-shadow:0 4px 12px #2c3e5066;margin-top:20px}.create-btn:hover{transform:translateY(-2px);box-shadow:0 6px 20px #2c3e5080}.create-btn:active{transform:translateY(0);box-shadow:0 2px 8px #2c3e5066}.hidden{display:none}@media(max-width:768px){body{padding:12px}header{margin-bottom:12px}header h1{font-size:1.8rem}.subtitle{font-size:.85rem}.creation-form{padding:20px}.form-section{margin-bottom:16px}#customSection,#randomSection{height:160px}.genre-card{width:130px;min-width:130px;height:140px;padding:14px 12px}.genre-icon{font-size:1.75rem}}@media(max-width:480px){body{padding:10px}header h1{font-size:1.6rem}.subtitle{font-size:.8rem}.creation-form{padding:16px}.form-section{margin-bottom:14px}#customSection,#randomSection{height:140px}.radio-group{gap:8px}.radio-option span{padding:8px 12px;font-size:.85rem}.toggle-btn{font-size:.85rem;padding:8px 12px}.story-input{font-size:.9rem}.genre-card{width:120px;min-width:120px;height:130px;padding:12px 10px}.genre-icon{font-size:1.6rem}.genre-name{font-size:.85rem}.genre-desc{font-size:.7rem}.create-btn{padding:12px;font-size:.95rem}.setting-item{flex-direction:column;align-items:flex-start;gap:10px}.radio-group-inline{width:100%;gap:8px}.radio-group-inline .radio-option{flex:1;min-width:68px}.radio-group-inline .radio-option span{padding:10px 12px;font-size:.85rem;text-align:center;display:flex;align-items:center;justify-content:center}}@media(max-height:700px){header h1{font-size:1.8rem}.subtitle{font-size:.85rem}header{margin-bottom:12px}.creation-form{padding:20px}.form-section{margin-bottom:14px}.section-label{margin-bottom:8px}}
