@import url('/assets/fonts/fonts.css');*{box-sizing:border-box}body{margin:0;background:#10131e;color:#ecedf6;font:15px/1.65 'Be Vietnam Pro',system-ui,-apple-system,sans-serif;background-image:radial-gradient(ellipse at 80% 0%,#342b4c 0%,transparent 45%)}a{color:#c7b4ff}button,input,textarea,select{font:inherit}button,a.primary,a.secondary{cursor:pointer;min-height:44px;border:1px solid #393748;border-radius:12px;padding:11px 18px;background:#222330;color:#ecedf6;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px}button:hover,a.primary:hover,a.secondary:hover{border-color:#a997e2;background:#2d2b40}button:disabled{opacity:.5;cursor:wait}.primary,button.primary{background:linear-gradient(105deg,#c5b6ff,#a791f3);color:#161323;font-weight:750;border:0}.secondary{background:#20212c}.story-header{display:flex;justify-content:space-between;align-items:center;max-width:1500px;margin:auto;padding:24px 32px;gap:16px}.story-brand{font-size:24px;font-weight:800;display:flex;gap:10px;align-items:center;text-decoration:none;color:#fff}.story-brand svg{width:30px;height:30px;stroke:#ccbaff}.story-brand span{font-size:12px;padding:5px 8px;border:1px solid #4f485f;border-radius:8px}.story-header nav{display:flex;gap:24px;align-items:center;font-size:14px}.story-header nav span{color:#b4b6c9}main{max-width:1450px;margin:auto;padding:28px 32px 50px}.story-hero{max-width:780px;margin:18px 0 40px}.eyebrow{font-size:12px;letter-spacing:2.4px;color:#c7b9ec;font-weight:750}h1{font-size:24px;line-height:1.17;letter-spacing:-2px;margin:16px 0}h1 em{font-style:normal;color:#c4acff}h2{font-size:20px;line-height:1.35;letter-spacing:-.5px;margin:8px 0}.story-hero p{max-width:650px;color:#adb0c4}.fiction-note{font-size:12px;display:inline-block;border:1px solid #414056;border-radius:30px;padding:8px 14px;color:#c9c6d8}.story-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:26px}.story-sidebar{position:sticky;top:24px;align-self:start;background:#171a27;border:1px solid #303346;border-radius:22px;padding:20px}.sidebar-title,.section-heading,.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.sidebar-title button,.dialog-heading button{width:44px;height:44px;padding:0;font-size:24px;flex-shrink:0}.story-sidebar small{display:block;color:#a4a8c0;margin-top:20px}.project-button{width:100%;justify-content:flex-start;flex-direction:column;align-items:flex-start;text-align:left;margin:8px 0;padding:13px}.project-button.active{border-color:#bca7ff;background:#302843}.project-button small{margin:0;font-size:12px}.story-sidebar .secondary{width:100%;margin-top:16px}.story-card{border:1px solid #303246;background:linear-gradient(135deg,#1c1d2bf5,#161a28f5);border-radius:24px;padding:28px;margin-bottom:26px}.story-card p{color:#acb0c7;font-size:14px}label{display:block;color:#c0c4d7;font-size:14px;margin:17px 0}input,select,textarea{display:block;width:100%;margin-top:8px;border:1px solid #383a50;background:#10141f;color:#ebecf5;padding:12px 14px;border-radius:12px;outline:none}input:focus,select:focus,textarea:focus{border-color:#bb9fed;box-shadow:0 0 0 3px #bca7ff1a}textarea{resize:vertical;min-height:90px;line-height:1.7}.form-grid{display:grid;grid-template-columns:1.7fr 1fr;gap:18px}.story-templates{display:flex;gap:8px;flex-wrap:wrap}.story-templates button{font-size:12px;min-height:36px;padding:7px 12px}summary{cursor:pointer;color:#b9b2d1;font-size:14px;padding:12px 0}#story-save-state,#cast-count{font-size:12px;color:#bca7ff}.cast-heading{margin:28px 0 12px}.cast-heading p{margin:5px 0}#character-search{margin-bottom:18px}.character-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.character-card{border:1px solid #343649;border-radius:16px;overflow:hidden;background:#171c29;position:relative}.character-card.selected{border-color:#cbb7ff;box-shadow:0 0 0 1px #bca7ff80}.character-card img{width:100%;aspect-ratio:3/4;object-fit:cover;display:block}.character-card .character-copy{padding:13px}.character-copy strong{font-size:14px;display:block}.character-copy small{color:#b4b7c9;font-size:12px;line-height:1.5;display:block;min-height:36px;margin-top:4px}.character-card .cast-select{display:flex;align-items:center;gap:6px;font-size:12px;margin:8px 0 0}.cast-select input{width:18px;height:18px;margin:0;accent-color:#c6adff}.character-card button{padding:4px 8px;min-height:32px;font-size:12px;margin-top:8px;width:100%}.character-card[hidden]{display:none}#story-form>.primary{margin-top:20px;width:100%}.form-error{color:#ffb7b7!important}.writer-actions{display:flex;gap:12px;flex-wrap:wrap}#story-thinking{padding:14px;border:1px solid #4c405e;border-radius:12px;color:#c9b8e9}#story-chapters details{border-top:1px solid #353247;margin-top:25px;padding-top:12px}#story-chapters summary{font-size:20px;font-weight:750;color:#ededf6}.chapter-body{line-height:1.85;color:#e0dfed}.chapter-editor{display:grid;gap:10px}.chapter-editor textarea{min-height:250px}.chapter-toolbar{display:flex;gap:10px;margin:18px 0;flex-wrap:wrap}.chapter-toolbar button{font-size:12px}.story-consent{font-size:12px;color:#888ca5;text-align:center;margin-top:30px}.story-consent a{color:#a5a3b7}dialog{border:1px solid #565069;background:#171a29;color:#ededf5;border-radius:24px;padding:28px;max-width:750px;width:calc(100% - 32px);max-height:90dvh;overflow:auto}dialog::backdrop{background:#050711bf;backdrop-filter:blur(7px)}#character-detail img{width:170px;height:220px;object-fit:cover;border-radius:16px;float:left;margin:0 22px 16px 0}#character-detail p{font-size:14px;color:#bec0d3;white-space:pre-wrap}#character-choose{width:100%;clear:both}.library-gallery{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:20px 0}.library-gallery img{width:100%;height:130px;object-fit:cover;border-radius:12px}.upload-control{position:relative;cursor:pointer;min-height:52px;border:1px dashed #75658d;padding:16px;border-radius:12px}.upload-control:focus-within{outline:2px solid #c5b6ff;outline-offset:3px}.upload-control input{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:pointer}.library-result img,#illustration-result img{width:100%;max-height:550px;object-fit:contain;border-radius:14px}.revision-box{padding:14px;background:#111622;border-radius:12px;margin:12px 0}.revision-box pre{white-space:pre-wrap;font:inherit;font-size:12px;max-height:220px;overflow:auto}svg{width:18px;height:18px;flex-shrink:0}[hidden]{display:none!important}@media(max-width:1100px){.character-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}.story-layout{grid-template-columns:200px minmax(0,1fr)}}@media(max-width:760px){.story-header{padding:18px}.story-header nav span{display:none}.story-header nav a{font-size:12px}main{padding:18px}.story-hero{margin:10px 0 24px}.story-layout{grid-template-columns:1fr;gap:18px}.story-sidebar{position:static;padding:16px}#story-project-list{display:flex;gap:8px;overflow:auto}.project-button{min-width:180px;width:auto;margin:5px 0}.story-sidebar .secondary{margin-top:8px}.story-card{padding:20px;border-radius:18px}.character-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.form-grid{grid-template-columns:1fr;gap:0}.story-hero p{font-size:14px}h1{letter-spacing:-1px}dialog{padding:20px}.library-gallery{grid-template-columns:repeat(3,1fr)}.section-heading{align-items:flex-start;flex-wrap:wrap}.writer-actions .primary{width:100%}#character-detail img{width:120px;height:160px;margin-right:15px}.fiction-note{font-size:12px}.story-consent{font-size:12px}}

select:not([multiple]){appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23a6adc3' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center;padding-right:46px!important}
.story-hero{padding-top:32px!important;padding-bottom:24px!important}.story-hero h1{font-size:24px!important}.character-gallery{max-height:590px;overflow-y:auto;padding:3px 5px 3px 3px;scrollbar-width:thin;scrollbar-color:#8473b3 transparent}@media(max-width:600px){.story-hero{padding-top:24px!important}.character-gallery{max-height:520px}}

.character-card{display:flex;flex-direction:column}.character-card .character-copy{display:flex;flex-direction:column;flex:1;min-width:0}.character-copy strong{line-height:1.45;min-height:41px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.character-copy small{height:36px;min-height:36px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.character-card .cast-select{margin-top:auto;padding-top:10px}.character-card button{margin-top:10px}
