:root{font-family:Inter,system-ui,sans-serif;color:#382b1e;background:#fff9f0}*{box-sizing:border-box}body{margin:0}.page{min-height:100vh;max-width:1120px;margin:auto;padding:24px}.text-link{color:#8b6f47;text-decoration:none;font-weight:600}.hero{max-width:720px;padding:112px 0}.eyebrow{color:#8b6f47;font-weight:700;text-transform:uppercase;letter-spacing:.08em}h1{font:700 clamp(42px,8vw,76px) / 1.05 Georgia,serif;margin:16px 0 24px}.lede{font-size:20px;line-height:1.6;color:#6b5a48}.actions{display:flex;gap:12px;margin-top:32px}.button{border-radius:10px;padding:14px 20px;font-weight:700;text-decoration:none}.primary{background:#8b6f47;color:#fff}.secondary{border:1px solid #8b6f47;color:#8b6f47}nav{display:flex;gap:16px;flex-wrap:wrap;align-items:center}button{cursor:pointer;font:inherit;border:1px solid #8b6f47;background:#8b6f47;color:#fff;border-radius:8px;padding:12px 18px}button:disabled{opacity:.55;cursor:wait}nav button{background:transparent;color:#715737;border:0;padding:8px}.panel{max-width:800px;background:#fff;border:1px solid #e8ded0;border-radius:16px;padding:32px;margin:36px auto}.panel h1,section h1{font-size:36px}label{display:block;margin:20px 0;font-weight:600}input,select,textarea{display:block;width:100%;margin-top:8px;padding:12px;border:1px solid #cdbcaa;border-radius:8px;font:inherit;background:#fffcf7;color:#382b1e}.book-type{margin:20px 0;padding:0;border:0;min-width:0}.book-type legend{padding:0;font-weight:600}.book-type-options{display:flex;flex-wrap:wrap;gap:8px 24px;margin-top:8px}.book-type-options label{display:flex;align-items:center;gap:8px;margin:0;padding:8px 0;cursor:pointer}.book-type-options input{width:auto;margin:0;accent-color:#8b6f47}.prose{overflow-wrap:anywhere;line-height:1.8}.loading-status{display:flex;align-items:center;gap:12px;margin:24px 0;line-height:1.6}.spinner{display:inline-block;width:24px;height:24px;flex-shrink:0;border:3px solid #e8ded0;border-top-color:#8b6f47;border-radius:50%;animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner{animation:none}}.preview-notice{background:#fff3df;padding:20px 32px;line-height:1.6}.preview-notice p{margin:0}.story-controls{margin:24px 0;padding:20px 0;border-top:1px solid #e8ded0;font:16px/1.5 Inter,system-ui,sans-serif}.story-direction textarea{resize:none}.chapter-editor{font:19px/1.8 Georgia,serif;resize:vertical}.story-chapter{max-height:25lh;overflow-y:auto;padding:16px;margin-bottom:24px;border:1px solid #e8ded0;border-radius:8px;background:#fffcf7}.field-help{color:#6b5a48;font-size:14px;line-height:1.6;margin-top:-8px}.reader{font:19px/1.8 Georgia,serif}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),min(100%,320px)));gap:20px;margin-top:24px}.library-section{margin-top:36px;padding-top:16px;border-top:1px solid #e8ded0}.book{background:#fff;color:#382b1e;text-align:left}.preview-card{border:1px solid #8b6f47;border-radius:8px;overflow:hidden}.preview-open{width:100%;text-align:left;background:transparent;color:inherit;border:0}.delete-preview{display:block;margin:8px 18px 18px;padding:0;background:transparent;border:0;color:#8f2418;text-decoration:underline;text-underline-offset:3px}.chapter{display:block;margin:12px 0;background:#fff9f0;color:#5a4832;text-align:left;width:100%}.previous-chapters{margin:24px 0}.previous-chapters summary{cursor:pointer;font-weight:600}.delete-book-section{margin-top:40px;padding:24px;border:1px solid #e2b9b4;border-radius:8px;background:#fff5f4;color:#8f2418}.delete-book-section h2{margin-top:0}.delete-book-section button{background:#8f2418;border-color:#8f2418}.error{white-space:pre-wrap;overflow-wrap:anywhere;background:#ffe4df;padding:16px;color:#8f2418}.auth-links{display:flex;flex-direction:column;align-items:flex-start;gap:16px;margin-top:24px}.sign-out-button{display:block;margin-top:24px}.auth-links a{color:#715737;text-underline-offset:3px;line-height:1.5}.auth-note{margin-top:24px}progress{width:100%;accent-color:#8b6f47}@media(max-width:600px){.page{padding:16px}.panel{padding:20px}}.story-choices{border:0;padding:0;margin:20px 0}.story-choices legend{font-weight:600;margin-bottom:12px}.story-choices>label,.story-choice-custom{display:flex;align-items:flex-start;gap:12px;padding:14px;margin-bottom:10px;border:1px solid #e8ded0;border-radius:8px;cursor:pointer}.story-choices input[type=radio]{width:auto;flex-shrink:0;margin:5px 0 0;accent-color:#8b6f47}.story-choices>label:has(input:checked),.story-choice-custom:has(input:checked){background:#fff3df;border-color:#8b6f47}.story-choice-custom{display:block}.story-choice-heading{display:flex;align-items:flex-start;gap:12px;margin:0;cursor:pointer}.story-choice-custom>label:not(.story-choice-heading){display:block;margin-top:16px}.story-choice-custom .field-help{margin-bottom:0}.site-page{margin:0;padding:0;min-height:100vh;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}.site-header,.site-footer{box-sizing:border-box;width:min(1120px,calc(100% - 32px));margin-left:auto;margin-right:auto;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;line-height:1.5}.site-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 0 8px}.site-header .site-brand{min-width:0;color:#2c2416;text-decoration:none}.site-brand-name{display:block;font-size:24px;font-weight:800;line-height:1.1}.site-brand-tag{display:block;margin-top:4px;color:#6b6155;font-size:14px;font-weight:400}.site-navigation,.site-navigation span,.site-footer nav{display:flex;flex-wrap:wrap;align-items:center;gap:16px}.site-navigation{justify-content:flex-end}.site-navigation [hidden]{display:none!important}.site-navigation a,.site-navigation button{display:inline-block;margin:0;border:0;border-radius:0;padding:8px 0;background:transparent;color:#715737;font:inherit;font-size:16px;font-weight:600;text-decoration:none;cursor:pointer}.site-footer{display:block;margin-top:auto;border-top:1px solid #e0d8cf;padding:24px 0}.site-footer a{color:#715737;font-size:14px;text-decoration:none}.site-navigation a:hover,.site-navigation button:hover,.site-footer a:hover{text-decoration:underline}.site-page>.page{width:min(1120px,calc(100% - 32px));min-height:0;margin:0 auto;padding:0 0 48px}.site-page>.page>.shell{width:100%}body.site-page>.container{box-sizing:border-box;width:calc(100% - 32px);margin:36px auto 48px}@media(max-width:600px){.site-header{align-items:flex-start;flex-direction:column;gap:12px}.site-navigation{justify-content:flex-start}body.site-page>.container{padding:20px}}
