*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%;font-family:Inter,system-ui,sans-serif;background:#faf8f4;color:#1a1a1a;font-size:16px;-webkit-font-smoothing:antialiased}.app-layout{display:flex;flex-direction:column;height:100vh;overflow:hidden}.top-bar{display:flex;align-items:center;justify-content:space-between;padding:0 24px;height:52px;background:#fff;border-bottom:1px solid #e8e3db;flex-shrink:0;z-index:10}.top-bar-title{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:600;color:#1a1a1a;letter-spacing:-.01em}.book-icon{font-size:18px}.main-layout{display:flex;flex:1;overflow:hidden}.chapter-list{width:220px;flex-shrink:0;background:#f3f0ea;border-right:1px solid #e0d9ce;overflow-y:auto;padding:16px 0}.chapter-list-header{padding:0 16px 12px;font-size:10px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:#888}.chapter-group{margin-bottom:8px}.chapter-group-label{padding:6px 16px 4px;font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#aaa}.chapter-item{display:flex;align-items:center;justify-content:space-between;width:100%;padding:7px 16px;background:none;border:none;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:13px;color:#444;transition:background .1s,color .1s;border-radius:0}.chapter-item:hover{background:#ede8df;color:#1a1a1a}.chapter-item.active{background:#349864;color:#fff}.chapter-name{font-weight:500}.chapter-gene-count{font-size:11px;opacity:.65}.chapter-item.active .chapter-gene-count{opacity:.8}.reader-area{flex:1;overflow-y:auto;padding:40px 48px;display:flex;justify-content:center}.book-reader{width:100%;max-width:720px}.chapter-heading{margin-bottom:20px}.chapter-label{font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:#999}.chapter-title{font-family:Lora,Georgia,serif;font-size:22px;font-weight:500;color:#2c2c2c;margin-top:4px}.ideogram-wrapper{margin-bottom:32px;background:#fff;border:1px solid #e8e3db;border-radius:8px;padding:16px 20px 10px}.ideogram-wrapper svg{width:100%;height:auto;display:block}.gene-article{background:#fff;border:1px solid #e8e3db;border-radius:8px;padding:36px 40px;margin-bottom:24px}.gene-header{margin-bottom:28px}.gene-title-row{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-bottom:10px}.gene-name{font-family:Lora,Georgia,serif;font-size:32px;font-weight:500;color:#1a1a1a;letter-spacing:-.02em;line-height:1.1}.gene-type-badge{padding:3px 9px;border-radius:20px;font-size:11px;font-weight:600;letter-spacing:.03em;white-space:nowrap;background:#e8f4ed;color:#2a7a50}.gene-type-badge.type-protein_coding{background:#e8f4ed;color:#2a7a50}.gene-type-badge.type-lncRNA{background:#e8eef8;color:#2a4a8a}.gene-type-badge.type-pseudogene,.gene-type-badge.type-processed_pseudogene,.gene-type-badge.type-unprocessed_pseudogene,.gene-type-badge.type-transcribed_unprocessed_pseudogene{background:#f2f0f8;color:#5a4a8a}.gene-type-badge.type-miRNA{background:#fef3e2;color:#8a5a10}.gene-type-badge.type-snRNA,.gene-type-badge.type-snoRNA{background:#fde8e8;color:#8a2020}.gene-meta{font-size:12.5px;color:#888;display:flex;flex-wrap:wrap;gap:4px;align-items:center}.meta-sep{color:#ccc}.story-text{font-family:Lora,Georgia,serif;font-size:17.5px;line-height:1.85;color:#2c2c2c}.story-text p{margin-bottom:1.4em}.story-text p:last-child{margin-bottom:0}.cursor-blink{display:inline-block;animation:blink .8s step-start infinite;color:#349864;font-style:normal}@keyframes blink{0%,to{opacity:1}50%{opacity:0}}.story-generating{display:flex;align-items:center;gap:10px;color:#888;font-family:Inter,sans-serif;font-size:14px}.generating-label{font-style:italic}.story-empty{color:#aaa;font-style:italic}.gene-footer{margin-top:28px;padding-top:16px;border-top:1px solid #f0ece4;display:flex;gap:20px;font-size:11.5px;color:#aaa;font-family:Inter,sans-serif}.ensembl-id{font-family:monospace}.book-nav{display:flex;justify-content:space-between;gap:16px;margin-bottom:60px}.nav-btn{flex:1;padding:12px 20px;background:#fff;border:1px solid #e0d9ce;border-radius:6px;font-family:Inter,sans-serif;font-size:13px;font-weight:500;color:#555;cursor:pointer;transition:background .15s,border-color .15s,color .15s}.nav-btn:hover:not(:disabled){background:#f3f0ea;border-color:#c8c0b0;color:#1a1a1a}.nav-btn:disabled{opacity:.35;cursor:not-allowed}.nav-prev{text-align:left}.nav-next{text-align:right}.nav-gene-name{font-weight:600;color:#349864}.search-wrapper{position:relative;width:240px}.search-input{width:100%;padding:7px 12px;background:#f3f0ea;border:1px solid #e0d9ce;border-radius:6px;font-family:Inter,sans-serif;font-size:13px;color:#1a1a1a;outline:none;transition:border-color .15s,background .15s}.search-input:focus{background:#fff;border-color:#349864}.search-input::placeholder{color:#aaa}.search-spinner{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:12px;height:12px;border:2px solid #ddd;border-top-color:#349864;border-radius:50%;animation:spin .6s linear infinite}@keyframes spin{to{transform:translateY(-50%) rotate(360deg)}}.search-dropdown{position:absolute;top:calc(100% + 4px);left:0;right:0;background:#fff;border:1px solid #e0d9ce;border-radius:6px;box-shadow:0 4px 16px #00000014;list-style:none;z-index:100;max-height:300px;overflow-y:auto}.search-result{display:flex;align-items:center;justify-content:space-between;padding:9px 14px;cursor:pointer;border-bottom:1px solid #f3f0ea;transition:background .1s}.search-result:last-child{border-bottom:none}.search-result:hover{background:#f3f0ea}.search-result-name{font-size:13px;font-weight:600;color:#1a1a1a}.search-result-meta{display:flex;gap:6px;align-items:center}.search-result-chrom{font-size:11px;color:#999}.search-result-type{font-size:10px;padding:1px 6px;background:#e8f4ed;color:#2a7a50;border-radius:10px}.loading-screen,.error-screen{height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:#888;font-family:Inter,sans-serif}.loading-text{font-size:15px;color:#aaa;font-style:italic}.error-screen h2{color:#c0392b;font-size:18px}.error-screen p{font-size:14px;color:#888}.error-screen code{background:#f3f0ea;padding:2px 6px;border-radius:4px;font-size:13px}.reader-loading{display:flex;align-items:center;gap:10px;padding:40px 0;color:#aaa;font-size:14px}.loading-pulse{width:10px;height:10px;background:#349864;border-radius:50%;animation:pulse 1s ease-in-out infinite}@keyframes pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.4);opacity:.5}}.reader-error{padding:40px;text-align:center;color:#888}.reader-error button{margin-top:12px;padding:8px 20px;background:#349864;color:#fff;border:none;border-radius:6px;cursor:pointer;font-size:13px}.welcome{padding:60px 40px;text-align:center;color:#888}.welcome h1{font-family:Lora,serif;font-size:28px;color:#2c2c2c;margin-bottom:12px}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:#d0c8bc;border-radius:3px}::-webkit-scrollbar-thumb:hover{background:#b0a898}
