:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:var(--color-primary, #0F2437);background-color:var(--color-bg-main, #F7F8F6);font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--color-primary: #0F2437;--color-accent: #F28C28;--color-slate: #4A647A;--color-muted: #7C8C9A;--color-bg-main: #F7F8F6;--color-bg-soft: #E6E8E4;--color-shadow: rgba(27, 31, 35, .15)}a{font-weight:500;color:var(--color-accent, #F28C28);text-decoration:inherit}a:hover{color:var(--color-primary, #0F2437)}body{margin:0;min-width:320px;min-height:100vh;background-color:var(--color-bg-soft, #E6E8E4)}#root{min-height:100vh;display:flex;justify-content:center;align-items:flex-start;background-color:var(--color-bg-main, #F7F8F6)}.app-shell{width:432px;max-width:100%;min-height:100vh;container-type:inline-size}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:var(--color-primary, #0F2437);background-color:var(--color-bg-main, #F7F8F6)}a:hover{color:var(--color-accent, #F28C28)}button{background-color:var(--color-bg-soft, #E6E8E4)}}:root{--navy: #0F2437;--orange: #F28C28;--slate: #4A647A;--muted: #7C8C9A;--paper: #ffffff;--line: #d6dbe0;--soft-blue: #f1f5ff;--soft-amber: #fff7ed;--soft-green: #ecfdf5;--color-primary: #0F2437;--color-accent: #F28C28;--color-slate: #4A647A;--color-muted: #7C8C9A;--color-bg-main: #F7F8F6;--color-bg-soft: #E6E8E4;--color-shadow: rgba(27, 31, 35, .15)}.app{width:100%;max-width:432px;margin:0 auto;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background-color:var(--color-bg-main);position:relative;min-height:100vh;container-type:inline-size}.app--shelves{height:100vh;overflow:hidden;display:flex;flex-direction:column}.app--shelves .app-banner{flex-shrink:0}.app-banner{width:100%;margin:0;padding:0;text-align:center;position:relative;top:0;left:0}.banner-image{width:100%;max-width:600px;height:auto;display:block}@container (min-width: 768px){.app-banner{margin:0}.banner-image{max-width:800px}}.app-header{display:flex;align-items:center;gap:.75rem;margin-bottom:1rem}.app-icon{width:48px;height:48px;border-radius:8px}.app-header h1{margin:0;color:var(--color-primary);font-size:1.5rem;font-weight:700}@container (min-width: 768px){.app-header{gap:1rem;margin-bottom:2rem}.app-icon{width:56px;height:56px}.app-header h1{font-size:2rem}}.lesson-creation-header{display:flex;align-items:center;gap:1rem;margin-bottom:1.5rem;padding-bottom:1rem;border-bottom:1px solid var(--color-bg-soft)}.lesson-creation-title{flex:1}.lesson-creation-title h3{margin:0;color:var(--color-primary);font-size:.85rem;font-weight:700}.collection-context{margin:.25rem 0 0;color:var(--color-slate);font-size:.8rem;font-weight:500}.chapter-title-section{margin-bottom:1.5rem}.chapter-title-section label{display:block;margin-bottom:.5rem;font-weight:600;color:var(--color-primary);font-size:.9rem}.chapter-title-input{width:100%;padding:.75rem;border:1px solid var(--color-muted);border-radius:6px;font-size:1rem;box-sizing:border-box;transition:border-color .2s}.chapter-title-input:focus{outline:none;border-color:var(--color-accent);box-shadow:0 0 0 2px #f28c281a}.collection-builder-form{display:flex;flex-direction:column;gap:.75rem;margin-bottom:1.5rem}.collection-builder-form input,.collection-builder-form textarea,.collection-builder-form select{width:100%;padding:.75rem;border:1px solid var(--color-muted);border-radius:6px;font-size:1rem;box-sizing:border-box}.collection-builder-row{display:flex;flex-direction:column;gap:.5rem;font-weight:600;color:var(--color-primary);font-size:.9rem}.collection-builder-actions{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;margin-bottom:1.5rem}.collection-builder-label{display:flex;align-items:center;gap:.5rem;font-weight:600;color:var(--color-primary);font-size:.9rem}.collection-builder-label input{width:90px;padding:.5rem;border:1px solid var(--color-muted);border-radius:6px;font-size:.9rem}.primary-button{padding:.7rem 1.4rem;border-radius:6px;border:none;background:var(--color-primary);color:#fff;font-weight:600;cursor:pointer}.primary-button:disabled{background:#cbd5e0;cursor:not-allowed}.chapter-outline-section{margin-top:1.5rem;border:1px solid var(--color-bg-soft);border-radius:10px;padding:1rem;background:#fff}.chapter-outline-header{display:flex;justify-content:space-between;align-items:center;gap:.75rem;margin-bottom:.75rem}.chapter-outline-header h4{margin:0;font-size:1rem;color:var(--color-primary)}.chapter-outline-actions{display:flex;gap:.5rem}.chapter-outline-actions button{border:1px solid var(--color-bg-soft);background:var(--color-bg-soft);color:var(--color-primary);border-radius:6px;padding:.35rem .65rem;cursor:pointer;font-size:.85rem}.chapter-outline-list{display:flex;flex-direction:column;gap:.75rem;margin-bottom:1rem}.chapter-outline-item{display:flex;align-items:flex-start;gap:.75rem;padding:.65rem;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc}.chapter-outline-item input{margin-top:.2rem}.chapter-outline-info{display:flex;flex-direction:column;gap:.35rem}.chapter-outline-title{font-weight:700;color:#1f2933}.chapter-outline-summary{font-size:.85rem;color:#4a5568;line-height:1.4}.input-type-selector{display:flex;gap:.5rem;margin-bottom:1.5rem;flex-wrap:wrap}.input-type-btn{background:var(--color-bg-soft);border:1px solid var(--color-bg-soft);padding:.75rem 1.5rem;border-radius:6px;cursor:pointer;font-size:.9rem;font-weight:600;color:var(--color-slate);transition:all .2s;white-space:nowrap}.input-type-btn:hover{background:var(--color-bg-soft);border-color:var(--color-muted);color:var(--color-primary)}.input-type-btn.active{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.dynamic-input-area{margin-bottom:1.5rem}.process-buttons button:disabled{background-color:var(--color-muted);cursor:not-allowed;opacity:.6}.file-upload-area{border:2px dashed var(--color-bg-soft);border-radius:8px;padding:2rem;text-align:center;background:var(--color-bg-main);transition:all .2s}.file-upload-area:hover{border-color:var(--color-accent);background:#f28c280d}.file-upload-label{display:flex;flex-direction:column;align-items:center;gap:.5rem;cursor:pointer;padding:1rem;border-radius:6px;transition:background-color .2s}.file-upload-label:hover{background:var(--color-bg-soft)}.upload-icon{font-size:2rem}.upload-text{font-size:1rem;font-weight:600;color:var(--color-slate)}.selected-file,.selected-files{margin-top:1rem;padding:.75rem;background:var(--color-bg-soft);border-radius:6px;border:1px solid var(--color-bg-soft)}.file-name{display:block;font-size:.9rem;color:var(--color-slate);margin-bottom:.25rem;word-break:break-all}.file-count{font-weight:600;color:var(--color-primary);margin-bottom:.5rem;display:block}.file-list{max-height:120px;overflow-y:auto}.pdf-options{margin-top:1rem;display:flex;flex-direction:column;gap:.5rem;text-align:left}.pdf-option{display:flex;align-items:center;gap:.5rem;font-size:.9rem;color:var(--color-primary)}.pdf-option input[type=checkbox]{width:auto;margin:0}.pdf-option-note{margin:0;font-size:.8rem;color:var(--color-slate);line-height:1.4}.pdf-status{margin-top:.75rem;font-size:.85rem;color:var(--color-slate)}.pdf-error{margin-top:.75rem;font-size:.85rem;color:var(--color-accent)}.preset-manager{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--color-bg-soft);display:flex;flex-direction:column;gap:.75rem}.preset-note{margin:0;font-size:.85rem;color:var(--color-slate);line-height:1.4}.preset-form{display:flex;gap:.5rem;flex-wrap:wrap}.preset-input{flex:1;min-width:180px;padding:.5rem;border:1px solid var(--color-muted);border-radius:6px;font-size:.9rem;background:var(--color-bg-main);color:var(--color-primary)}.preset-save-button{background:var(--color-accent);color:#fff;border:1px solid var(--color-accent);border-radius:6px;padding:.5rem .9rem;font-size:.85rem;font-weight:600;cursor:pointer;transition:background-color .2s}.preset-save-button:disabled{background:var(--color-muted);border-color:var(--color-muted);cursor:not-allowed}.preset-list{display:flex;flex-direction:column;gap:.75rem}.preset-card{border:1px solid var(--color-bg-soft);border-radius:8px;padding:.75rem;background:var(--color-bg-main);display:flex;flex-direction:column;gap:.6rem}.preset-info{display:flex;flex-direction:column;gap:.35rem}.preset-title{font-weight:700;color:var(--color-primary);font-size:.95rem}.preset-meta{font-size:.8rem;color:var(--color-slate);line-height:1.4}.preset-actions{display:flex;gap:.5rem;flex-wrap:wrap}.preset-apply-button,.preset-delete-button{border-radius:6px;padding:.4rem .8rem;font-size:.8rem;font-weight:600;border:1px solid transparent;cursor:pointer}.preset-apply-button{background:var(--color-slate);color:#fff}.preset-delete-button{background:#dc3545;color:#fff}.preset-empty{margin:0;font-size:.85rem;color:var(--color-slate)}.library .lesson-creation-header,.library .chapter-title-section,.library .input-type-selector,.library .dynamic-input-area,.library .process-buttons{margin-left:.75rem;margin-right:.75rem}@container (min-width: 768px){.library .lesson-creation-header,.library .chapter-title-section,.library .input-type-selector,.library .dynamic-input-area,.library .process-buttons{margin-left:1rem;margin-right:1rem}}@container (min-width: 768px){.app{max-width:432px;margin:0 auto;padding:0}.main-content{padding:.5rem 1rem 2rem}}.main-content--shelves{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.settings-page{max-width:800px;margin:0 auto}.settings-page-header{display:flex;align-items:center;gap:1rem;margin-bottom:1rem;padding-bottom:1rem;border-bottom:1px solid var(--color-bg-soft)}.back-button{background:var(--color-bg-soft);border:1px solid var(--color-bg-soft);padding:.5rem;border-radius:6px;cursor:pointer;font-size:1rem;color:var(--color-slate);transition:all .2s;display:flex;align-items:center;justify-content:center;width:40px;height:40px;margin-left:.25rem}.back-button:hover{background:var(--color-bg-soft);border-color:var(--color-muted);color:var(--color-primary)}.settings-page-header h1{margin:0;color:var(--color-primary);font-size:1.5rem;font-weight:700}@container (min-width: 768px){.settings-page-header{gap:1.5rem;margin-bottom:1.5rem}.settings-page-header h1{font-size:2rem}}.menu-list{display:flex;flex-direction:column;gap:.75rem}.menu-card{text-align:left;background:var(--color-bg-main);border:1px solid var(--color-bg-soft);border-radius:12px;padding:.9rem 1rem;cursor:pointer;transition:border-color .2s,box-shadow .2s,transform .2s;color:var(--color-primary)}.menu-card:hover{border-color:var(--color-muted);box-shadow:0 8px 18px #0f24371f;transform:translateY(-1px)}.menu-card-title{font-size:1rem;font-weight:700}.menu-card-subtitle{margin-top:.25rem;font-size:.85rem;color:var(--color-slate)}.settings-icon-button{background:var(--color-bg-soft);border:1px solid var(--color-bg-soft);padding:.5rem;border-radius:6px;cursor:pointer;font-size:1.2rem;color:var(--color-slate);transition:all .2s;display:flex;align-items:center;justify-content:center;width:40px;height:40px;margin-left:auto}.settings-icon-button:hover{background:var(--color-bg-soft);border-color:var(--color-muted);color:var(--color-primary)}.add-icon-button{background:var(--color-accent);border:1px solid var(--color-accent);padding:.5rem;border-radius:6px;cursor:pointer;font-size:1.2rem;color:#fff;font-weight:700;text-shadow:0 1px 1px rgba(0,0,0,.2);transition:all .2s;display:flex;align-items:center;justify-content:center;width:40px;height:40px;margin-right:.5rem}.add-icon-button:hover{background:#e67e22;border-color:#e67e22;color:#fff}.import-icon-button{background:var(--color-bg-soft);border:1px solid var(--color-muted);padding:.5rem;border-radius:6px;cursor:pointer;font-size:1.2rem;color:var(--color-slate);transition:all .2s;display:flex;align-items:center;justify-content:center;width:40px;height:40px;margin-right:.5rem}.import-icon-button:hover{background:var(--color-bg-soft);border-color:var(--color-muted);color:var(--color-primary)}.marketplace-refresh-button{background:var(--color-bg-soft);border:1px solid var(--color-bg-soft);padding:.5rem;border-radius:6px;cursor:pointer;font-size:1rem;color:var(--color-slate);transition:all .2s;display:flex;align-items:center;justify-content:center;width:40px;height:40px}.marketplace-refresh-button:hover{background:var(--color-bg-soft);border-color:var(--color-muted);color:var(--color-primary)}.marketplace-refresh-button:disabled{opacity:.6;cursor:not-allowed}.collection-action-modal{position:fixed;inset:0;background:#00000073;display:flex;align-items:center;justify-content:center;z-index:1000;padding:1rem}.collection-action-sheet{background:var(--color-bg-main);padding:1.25rem;border-radius:10px;box-shadow:0 12px 28px var(--color-shadow);width:min(360px,92vw)}.collection-action-title{margin:0 0 1rem;color:var(--color-primary);font-size:1.1rem;font-weight:700;text-align:center}.collection-action-buttons{display:flex;flex-direction:column;gap:.5rem}.collection-action-buttons button{width:100%;padding:.6rem .75rem;border-radius:6px;border:1px solid var(--color-muted);background:var(--color-bg-soft);color:var(--color-primary);font-weight:600;cursor:pointer;transition:all .2s}.collection-action-buttons button:hover{border-color:var(--color-primary)}.collection-action-buttons .danger{background:#fbeaea;border-color:#e4b1b1;color:#8b1f1f}.collection-action-buttons .secondary{background:transparent}.create-collection-form-modal{position:fixed;inset:0;background:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000;padding:1rem}.create-collection-form{background:var(--color-bg-main);padding:1.5rem;border-radius:8px;box-shadow:0 10px 25px var(--color-shadow);max-width:500px;width:100%;max-height:90vh;overflow-y:auto}.marketplace-share-modal{align-items:flex-start;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:2rem}.marketplace-share-modal .create-collection-form{margin:1rem auto;max-height:none;overflow:visible}.create-collection-form h3{margin:0 0 1rem;color:var(--color-primary);font-size:1.25rem;font-weight:700;text-align:center}.create-collection-form input,.create-collection-form textarea,.create-collection-form select{width:100%;padding:.75rem;margin-bottom:.75rem;border:1px solid var(--color-muted);border-radius:6px;font-size:1rem;box-sizing:border-box}.voice-mode-selection{margin-bottom:1rem}.voice-mode-selection label{display:flex;flex-direction:column;gap:.5rem;font-weight:600;color:var(--color-primary)}.voice-mode-selection select{padding:.5rem;border:1px solid var(--color-muted);border-radius:6px;background:var(--color-bg-main);font-size:.9rem;color:var(--color-primary)}.voice-mode-selection select option{color:var(--color-primary);background:var(--color-bg-main)}.voice-config-display{background:var(--color-bg-soft);border:1px solid var(--color-bg-soft);border-radius:6px;padding:.5rem;margin-bottom:.5rem}.voice-config-display h4{margin:0 0 .375rem;color:var(--color-primary);font-size:.85rem;font-weight:600}.current-voices{display:flex;flex-direction:column;gap:.25rem}.voice-info{display:flex;justify-content:space-between;align-items:center;padding:.25rem;background:var(--color-bg-main);border-radius:4px;border:1px solid var(--color-bg-soft)}.voice-label{font-weight:500;color:var(--color-slate);font-size:.8rem}.voice-value{font-weight:600;color:var(--color-accent);font-size:.8rem;text-transform:capitalize}.create-collection-form .voice-selection{display:flex;flex-direction:column;gap:1rem;margin-bottom:1rem}.create-collection-form .voice-selection label{display:flex;flex-direction:column;gap:.5rem;font-weight:600;color:#2d3748}.create-collection-form .voice-selection select{padding:.5rem;border:1px solid var(--color-muted);border-radius:6px;background:var(--color-bg-main);font-size:.9rem}.create-collection-form .voice-selection select:disabled{background:#f7fafc;color:#a0aec0;cursor:not-allowed}.form-actions{display:flex;gap:.75rem;justify-content:flex-end;margin-top:1rem}.marketplace-form-note{margin:0 0 .75rem;font-size:.85rem;color:var(--color-slate)}.marketplace-form-row{display:flex;flex-direction:column;gap:.35rem;margin-bottom:.75rem;font-weight:600;color:var(--color-primary)}.marketplace-form-row--split{display:grid;grid-template-columns:1fr 110px;gap:.75rem;margin-bottom:.75rem}.marketplace-form-row select,.marketplace-form-row--split input,.marketplace-form-row--split select{margin-bottom:0}.marketplace-checkbox-group{display:grid;gap:.6rem;padding:.75rem;border-radius:8px;border:1px solid var(--line);background:var(--paper);margin-bottom:.75rem}.marketplace-checkbox{display:grid;grid-template-columns:18px 1fr;gap:.6rem;align-items:start;font-size:.85rem;color:var(--color-primary)}.marketplace-checkbox input{margin-top:.15rem}.marketplace-checkbox span{line-height:1.35}.marketplace-checkbox-group .marketplace-form-hint{margin:0}.marketplace-form-hint{margin-bottom:.75rem;font-size:.8rem;color:var(--color-muted)}.marketplace-form-status{margin-bottom:.75rem;padding:.5rem .75rem;border-radius:6px;border:1px solid var(--line);background:var(--soft-blue);font-size:.8rem;color:var(--color-primary)}.create-btn{background:var(--color-slate);color:#fff;border:none;padding:.75rem 1.5rem;border-radius:6px;cursor:pointer;font-weight:600;transition:background-color .2s}.create-btn:hover{background:var(--color-primary)}.cancel-btn{background:var(--color-slate);color:#fff;border:none;padding:.75rem 1.5rem;border-radius:6px;cursor:pointer;font-weight:600;transition:background-color .2s}.cancel-btn:hover{background:var(--color-primary)}@container (max-width: 768px){.add-icon-button,.import-icon-button{width:36px;height:36px;font-size:1rem;margin-right:.25rem}.settings-icon-button{width:36px;height:36px;font-size:1rem}.create-collection-form{padding:1rem;margin:.5rem}.form-actions{flex-direction:column}.create-btn,.cancel-btn{width:100%}}.settings{margin-bottom:1rem;padding:.75rem;border-radius:8px}@container (min-width: 768px){.settings{margin-bottom:2rem;padding:1rem}}.settings label{display:block;margin-bottom:.25rem;font-size:.9rem}.settings input,.settings select{width:100%;padding:.4rem;margin-bottom:.5rem;border:1px solid var(--color-muted);border-radius:4px;font-size:.9rem;color:var(--color-primary);background:var(--color-bg-main)}.settings-section{margin-bottom:1rem;padding-bottom:.75rem;border-bottom:1px solid var(--color-bg-soft)}@container (min-width: 768px){.settings-section{margin-bottom:2rem;padding-bottom:1rem}}.settings-section:last-child{border-bottom:none}.settings-section h3{margin-top:0;margin-bottom:.5rem;color:var(--color-primary);font-size:1rem}.settings-section h4{margin-top:0;margin-bottom:.5rem;color:var(--color-slate);font-size:.9rem}.account-sync-note{margin:0 0 .5rem;color:var(--color-slate);font-size:.85rem;line-height:1.4}.account-sync-grid{display:grid;gap:.6rem;margin-top:.5rem}@container (min-width: 620px){.account-sync-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}.account-sync-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.6rem}.account-sync-button{background:var(--color-slate);color:#fff;border:1px solid var(--color-slate);border-radius:6px;padding:.5rem .9rem;font-size:.85rem;font-weight:600;cursor:pointer;transition:background-color .2s}.account-sync-button--primary{background:var(--color-accent);border-color:var(--color-accent)}.account-sync-button--ghost{background:transparent;color:var(--color-slate);border-color:var(--color-muted)}.account-sync-button:disabled{background:var(--color-muted);border-color:var(--color-muted);cursor:not-allowed;color:#fff}.account-sync-button--ghost:disabled{background:transparent;color:var(--color-muted)}.account-sync-hint{margin-top:.5rem;color:var(--color-muted);font-size:.85rem;line-height:1.4}.account-sync-meta{margin-top:.5rem;color:var(--color-slate);font-size:.85rem;display:flex;flex-direction:column;gap:.25rem}.account-sync-status{margin-top:.5rem;font-size:.85rem;line-height:1.4}.account-sync-status.is-error{color:#b91c1c}.account-sync-status.is-success{color:#166534}.account-sync-status.is-warning{color:#92400e}.dev-tools-note{margin:0 0 .75rem;color:var(--color-slate);font-size:.9rem;line-height:1.5}.model-updates-info{background:var(--color-bg-soft);padding:1rem;border-radius:8px;border:1px solid var(--color-bg-soft)}.model-updates-info p{margin:0 0 .5rem;color:var(--color-slate);line-height:1.5}.last-update-info{font-size:.875rem;color:var(--color-muted)}.update-needed{color:var(--color-accent);font-weight:600}.update-models-button{background:var(--color-slate);color:#fff;border:none;padding:.5rem 1rem;border-radius:6px;cursor:pointer;font-weight:600;margin-top:.5rem;margin-right:.5rem;transition:background-color .2s;display:inline-block;min-width:120px;font-size:.875rem}.update-models-button:hover:not(:disabled){background:var(--color-primary)}.update-models-button:disabled{background:var(--color-muted);cursor:not-allowed}.refresh-pricing-button{background:var(--color-slate);color:#fff;border:none;padding:.5rem 1rem;border-radius:6px;cursor:pointer;font-weight:600;margin-top:.5rem;transition:background-color .2s;display:inline-block;min-width:120px;font-size:.875rem}.refresh-pricing-button:hover{background:var(--color-primary)}.model-updates-info{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}.model-updates-info p{flex-basis:100%;margin-bottom:.5rem}.icon-link{background:none;border:none;color:var(--color-accent);text-decoration:underline;cursor:pointer;padding:.25rem .5rem;font-size:.875rem;border-radius:4px;transition:background-color .2s;display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px}.icon-link:hover{background-color:#3182ce1a}.peek-button{background:none;border:none;color:var(--color-slate);cursor:pointer;padding:.25rem .5rem;font-size:.875rem;border-radius:4px;transition:background-color .2s;display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px}.peek-button:hover{background-color:#4a55681a}.peek-button.expanded{color:var(--color-accent)}.peek-button.expanded:hover{background-color:#3182ce1a}.voice-settings-info{background:var(--color-bg-soft);padding:1rem;border-radius:8px;border:1px solid var(--color-bg-soft);margin-bottom:1rem;font-size:.9rem;line-height:1.5;color:var(--color-slate)}.voice-selection{display:flex;flex-direction:column;gap:1rem}@container (min-width: 768px){.voice-selection{display:flex;flex-direction:column;gap:1.5rem}}.voice-selection label{display:flex;flex-direction:column;gap:.5rem;padding:1rem;background:var(--color-bg-soft);border-radius:8px;border:1px solid var(--color-bg-soft)}.voice-selection label span{font-weight:600;color:var(--color-primary);font-size:.9rem}.voice-selection select{width:100%;padding:.5rem;border:1px solid var(--color-muted);border-radius:6px;background:var(--color-bg-main);font-size:.9rem;color:var(--color-primary)}.voice-selection select option{color:var(--color-primary);background:var(--color-bg-main)}.voice-id-toggle{margin-top:.5rem;display:flex;flex-direction:column;gap:.4rem}.voice-id-checkbox{display:flex;align-items:center;gap:.5rem;font-size:.85rem;color:var(--color-slate)}.voice-id-checkbox input[type=checkbox]{width:auto;padding:0;margin:0}.voice-id-input{font-size:.85rem}.loading-indicator,.error-indicator{color:var(--color-accent);font-weight:600;margin-left:.5rem}.voice-selection select:disabled{background:#f7fafc;color:#a0aec0;cursor:not-allowed}.voice-dropdown-container{display:flex;gap:.5rem;align-items:center}.voice-dropdown-container select{flex:1}.voice-preview-button{background:var(--color-slate);color:#fff;border:none;padding:.5rem;border-radius:6px;cursor:pointer;font-size:.8rem;min-width:40px;height:40px;display:flex;align-items:center;justify-content:center;transition:background-color .2s}.voice-preview-button:hover:not(:disabled){background:#2c5282}.voice-preview-button:disabled{background:#a0aec0;cursor:not-allowed}.settings-tabs{display:flex;gap:.5rem;margin-bottom:1rem;border-bottom:1px solid #e2e8f0}.settings-tabs button{padding:.75rem 1rem;border:none;background:none;border-bottom:2px solid transparent;cursor:pointer;font-weight:500;color:#4a5568;transition:all .2s}.settings-tabs button:hover{color:#2d3748;background:#f8fafc}.settings-tabs button.active{color:var(--color-slate);border-bottom-color:var(--color-slate)}.tab-content{padding:1rem 0}.usage-overview{display:flex;flex-direction:column;gap:1.5rem}.usage-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1rem}.usage-stat{background:#f8fafc;padding:1rem;border-radius:8px;text-align:center;border:1px solid #e2e8f0}.usage-stat h4{margin:0 0 .5rem;color:#2d3748;font-size:.9rem}.stat-value{font-size:1.5rem;font-weight:700;color:#3182ce;margin:.25rem 0}.stat-label{font-size:.8rem;color:#718096;margin:0}.stat-sublabel{font-size:.75rem;color:#a0aec0;margin:.25rem 0 0}.usage-breakdown{background:#f8fafc;padding:1rem;border-radius:8px;border:1px solid #e2e8f0}.usage-breakdown h4{margin:0 0 1rem;color:#2d3748}.cost-category{margin-bottom:1rem}.cost-category:last-child{margin-bottom:0}.cost-category h5{margin:0 0 .5rem;color:#4a5568;font-size:.9rem}.cost-bar{width:100%;height:8px;background:#e2e8f0;border-radius:4px;overflow:hidden;margin-bottom:.5rem}.cost-fill{height:100%;background:#3182ce;border-radius:4px;transition:width .3s ease}.cost-fill.audio{background:#48bb78}.usage-history-section{background:#f8fafc;padding:1rem;border-radius:8px;border:1px solid #e2e8f0}.history-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.history-header h4{margin:0;color:#2d3748}.clear-history-button{background:#e53e3e;color:#fff;border:none;padding:.5rem 1rem;border-radius:6px;cursor:pointer;font-size:.8rem;font-weight:600;transition:background-color .2s}.clear-history-button:hover{background:#c53030}.empty-state{text-align:center;color:#718096;font-style:italic;margin:2rem 0}.history-list{max-height:300px;overflow-y:auto}.history-entry{display:grid;grid-template-columns:100px 120px 1fr 80px 60px;gap:.5rem;padding:.75rem;border-bottom:1px solid #e2e8f0;align-items:center;font-size:.85rem}.history-entry:last-child{border-bottom:none}.history-date{color:#4a5568;font-weight:500}.history-type{color:#718096;font-size:.8rem}.history-model{color:#2d3748;font-weight:500}.history-tokens{color:#718096;font-size:.8rem}.history-cost{color:#3182ce;font-weight:600;text-align:right}@container (max-width: 768px){.settings-tabs{flex-wrap:wrap}.settings-tabs button{flex:1;min-width:120px}.usage-stats{grid-template-columns:1fr}.history-entry{grid-template-columns:1fr;gap:.25rem;text-align:left}.history-cost{text-align:left}}.compact-pricing{font-size:.85rem}.pricing-compact-container{display:flex;flex-direction:column;gap:1rem}@container (min-width: 768px){.pricing-compact-container{flex-direction:row;gap:2rem}}.pricing-section{flex:1}.compact-pricing-row{display:flex;justify-content:flex-start;align-items:center;gap:.6rem;padding:.4rem 0;border-bottom:1px solid #f1f5f9}.compact-pricing-row:last-child{border-bottom:none}.model-info{display:flex;flex-direction:column;gap:.2rem;flex:1}.model-selector{display:inline-flex;align-items:center}.model-selector input{width:16px;height:16px}.pricing-section-header{display:flex;align-items:center;gap:.4rem;position:relative;margin-bottom:.4rem}.pricing-info-button{background:none;border:none;cursor:pointer;font-size:.9rem;padding:.1rem .25rem;border-radius:4px}.pricing-info-button:hover{background:#0284c71a}.pricing-info-popup{position:absolute;top:1.6rem;right:0;background:var(--color-bg-main);border:1px solid var(--color-bg-soft);border-radius:8px;box-shadow:0 10px 25px var(--color-shadow);padding:.75rem;z-index:10;width:240px}.pricing-info-popup p{margin:0 0 .75rem;font-size:.85rem;color:#4a5568}.model-name{font-weight:600;color:#2d3748;font-size:.9rem}.pricing-unavailable{font-size:.75rem;color:#a0aec0;font-style:italic}.estimates{display:flex;gap:.5rem}.estimate{font-size:.8rem;color:#4a5568;font-weight:500}.api-keys-container{display:flex;flex-direction:column;gap:1rem}@container (min-width: 768px){.api-keys-container{gap:2rem}}.api-provider{display:flex;flex-direction:column;gap:.5rem;padding:.75rem;background:#f8fafc;border-radius:8px;border:1px solid #e2e8f0}@container (min-width: 768px){.api-provider{gap:.75rem;padding:1rem}}.api-provider h4{margin:0 0 .5rem;color:#2d3748;font-size:.9rem;border-bottom:1px solid #e2e8f0;padding-bottom:.25rem}@container (min-width: 768px){.api-provider h4{font-size:1rem;padding-bottom:.5rem}.api-provider{flex:1}}.api-key-label{display:flex;flex-direction:column;gap:.5rem;width:100%}.api-key-header{display:flex;justify-content:space-between;align-items:center;gap:.5rem}.api-key-header span{font-weight:600;color:#2d3748}.api-key-actions{display:flex;align-items:center;gap:.5rem}.peek-button-small{background:none;border:none;color:#4a5568;cursor:pointer;padding:.25rem;border-radius:4px;transition:background-color .2s;display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;font-size:1rem}.peek-button-small:hover{background-color:#4a55681a}.api-key-link{background:none;border:none;color:#3182ce;text-decoration:none;cursor:pointer;padding:.25rem;border-radius:4px;transition:background-color .2s;display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;font-size:1rem}.api-key-link:hover{background-color:#3182ce1a}@container (min-width: 768px){.api-key-label{width:100%}}.api-key-label input{font-family:Courier New,monospace;width:100%;max-width:300px;padding:.5rem;border:1px solid #cbd5e0;border-radius:6px;font-size:.9rem;box-sizing:border-box}.model-selection{display:flex;flex-direction:column;gap:.75rem}@container (min-width: 768px){.model-selection{display:grid;grid-template-columns:1fr 1fr;gap:1rem}}.pricing-inputs{display:flex;flex-direction:column;gap:1.5rem}.pricing-row{padding:1rem;background:#f7fafc;border-radius:6px;border:1px solid #e2e8f0}.pricing-row h4{margin:0 0 1rem;color:#4a5568;font-size:.9rem}.pricing-row label{display:inline-block;margin-right:1rem;margin-bottom:.5rem}.pricing-row input{width:100px;margin-left:.5rem}.save-button{background:#48bb78;color:#fff;border:none;padding:.75rem 1.5rem;border-radius:6px;font-weight:600;cursor:pointer;margin-top:1rem}.save-button:hover{background:#38a169}.text-input{margin-bottom:1.5rem}.text-input textarea{width:100%;max-width:100%;box-sizing:border-box;padding:.75rem;border:1px solid #ccc;border-radius:6px;font-family:inherit;font-size:1rem;resize:vertical;min-height:120px}@container (min-width: 768px){.text-input{margin-bottom:2rem}.text-input textarea{padding:.5rem;min-height:150px}}.processing-message{margin-top:.5rem;color:#007bff;font-weight:700}.processing-overlay{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;background:#0f2437b3;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);cursor:wait}.processing-overlay-content{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem;padding:1.5rem;text-align:center;color:#f8fafc}.processing-overlay-content img{width:min(80vw,560px);height:auto;max-height:80vh;object-fit:contain}.processing-overlay-text{max-width:32rem}.processing-overlay-title{font-size:1.1rem;font-weight:700;letter-spacing:.02em}.processing-overlay-status{margin-top:.35rem;font-size:.95rem;color:#d5e2f0}.process-buttons{margin-bottom:1.5rem}.process-buttons button{width:100%;padding:.75rem 1rem;margin-bottom:.5rem;background-color:#007bff;color:#fff;border:none;border-radius:6px;cursor:pointer;font-size:1rem;font-weight:600}@container (min-width: 768px){.process-buttons{margin-bottom:2rem}.process-buttons button{width:auto;padding:.75rem 1.5rem;margin-right:1rem;margin-bottom:0}}.process-buttons button:hover{background-color:#0056b3}.process-buttons button:disabled{background-color:#ccc;cursor:not-allowed}.script-display{margin-top:2rem}.script-display-header{text-align:center;margin-bottom:1rem}.script-display-title{margin:0;color:var(--color-primary);font-size:1.3rem;font-weight:700}.script-display-subtitle{margin:.25rem 0 0;color:var(--color-slate);font-size:.85rem}.lesson-card{max-width:720px;margin:16px auto;padding:20px;background:var(--paper);border:1px solid var(--line);border-radius:14px;box-shadow:0 8px 24px #0f243714;font-family:system-ui,-apple-system,Segoe UI,sans-serif;color:var(--navy)}.card-modal{position:fixed;inset:0;background:#0f172aa6;display:flex;align-items:center;justify-content:center;z-index:1100;padding:1.5rem}.card-modal-content{position:relative;width:min(90vw,900px);max-height:90vh;overflow-y:auto;background:transparent}.card-modal-card{margin:0 auto;position:relative}.card-modal-close{position:absolute;top:8px;right:8px;padding:4px 6px;border:none;background:transparent;color:var(--color-slate);font-size:1rem;line-height:1;cursor:pointer}.card-modal-close:hover{color:var(--color-primary)}.card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:6px}.card-title{margin:0;font-size:1.25rem;line-height:1.25;font-weight:800;color:var(--navy)}.card-number{font-weight:800;color:var(--muted)}.card-subtitle{margin:0 0 16px;color:var(--slate);line-height:1.45}.big-idea{background:var(--soft-blue);border-left:5px solid var(--navy);border-radius:12px;padding:14px 14px 12px;margin:0 0 16px}.big-idea h4{margin:0 0 6px;font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;color:var(--navy)}.gist{margin:0 0 10px;font-weight:700;color:var(--navy)}.example{margin:0;font-style:italic;color:var(--slate)}.key-takeaways{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fff}.key-takeaways-label{margin:0 0 10px;font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;color:var(--slate)}.key-takeaways-list{list-style:none;padding:0;margin:0}.key-takeaway{display:flex;gap:10px;margin:0 0 10px;line-height:1.45}.checkmark{color:var(--orange);font-size:.9rem;line-height:1.2;margin-top:2px}.divider{border:none;border-top:1px solid var(--line);margin:18px 0}.stop-and-think{border:1px solid rgba(242,140,40,.45);background:var(--soft-amber);border-radius:12px;padding:14px;margin-bottom:14px}.stop-and-think-label{font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;font-weight:800;color:var(--orange);margin-bottom:6px}.stop-and-think-text{margin:0;font-weight:700;color:var(--navy);line-height:1.45}.recap-and-next-steps{border:1px solid rgba(5,150,105,.25);background:var(--soft-green);border-radius:12px;padding:14px}.recap-and-next-steps-label{font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;font-weight:800;color:#059669;margin-bottom:6px}.recap-and-next-steps-text{margin:0;color:var(--slate);line-height:1.5}.card-attribution{margin-top:16px;text-align:center;border-top:1px solid var(--line);padding-top:12px}.card-attribution small{color:var(--muted);font-size:.8rem}.card-actions{margin-top:16px;display:flex;flex-direction:column;gap:8px}.card-actions button{width:100%;padding:12px 14px;border-radius:12px;border:1px solid rgba(15,36,55,.15);background:var(--navy);color:#fff;font-weight:700;cursor:pointer}.card-actions--modal{gap:12px}.card-action-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.card-action-row button{flex:1 1 140px}.download-png-btn{background:var(--slate)!important}.download-png-btn:hover{background:var(--navy)!important}.download-png-btn--compact{width:auto!important;padding:6px 10px;font-size:.75rem;border-radius:8px;align-self:center;flex:0 0 auto!important}.card-actions .dismiss-btn{background:var(--color-bg-soft)!important;color:var(--color-primary);border:1px solid var(--color-bg-soft)}.card-actions .dismiss-btn:hover{background:var(--color-muted)!important}@container (min-width: 768px){.card-actions{flex-direction:row}.card-actions button{flex:1}}@media print{:root{--line: #bfc7cf}.lesson-card{box-shadow:none!important;border:1px solid var(--line);border-radius:10px;margin:0;max-width:none}.big-idea,.stop-and-think,.recap-and-next-steps{background:transparent!important}.big-idea{border:1px solid var(--line);border-left:5px solid var(--navy)}.stop-and-think{border:1px solid rgba(242,140,40,.75)}.recap-and-next-steps{border:1px solid rgba(5,150,105,.45)}.card-actions{display:none!important}.checkmark,.stop-and-think-label{color:#000!important}}.audio-controls{display:flex;flex-direction:column;align-items:center;gap:.5rem}.audio-controls audio{width:100%;max-width:300px}.audio-controls a{color:var(--color-accent);text-decoration:none;font-weight:500}.audio-controls a:hover{text-decoration:underline}.audio-controls--loading{padding:.5rem 0}.audio-loading{color:var(--color-slate);font-size:.85rem}.collection-selector{margin-bottom:1.5rem;padding:1rem;border:1px solid var(--color-bg-soft);border-radius:8px;background:var(--color-bg-soft)}@container (min-width: 768px){.collection-selector{margin-bottom:2rem;border:1px solid #ccc}}.collection-selector h3{margin-top:0}.collection-list{margin-bottom:1rem}.collection-list select{width:100%;max-width:100%;box-sizing:border-box;padding:.75rem;border:1px solid var(--color-muted);border-radius:6px;font-size:1rem;background:var(--color-bg-main)}@container (min-width: 768px){.collection-list select{padding:.5rem;border:1px solid #ccc}}.create-collection-form{margin-top:1rem;padding:1rem;border:1px solid var(--color-bg-soft);border-radius:6px;background:var(--color-bg-main)}.create-collection-form h4{margin-top:0}.create-collection-form input,.create-collection-form textarea,.create-collection-form select{width:100%;max-width:100%;box-sizing:border-box;padding:.75rem;margin-bottom:.75rem;border:1px solid var(--color-muted);border-radius:6px;font-size:1rem}.create-collection-form textarea{resize:vertical;min-height:80px}@container (min-width: 768px){.create-collection-form input,.create-collection-form textarea,.create-collection-form select{padding:.5rem;margin-bottom:.5rem;border:1px solid #ccc}}.voice-settings{display:flex;flex-direction:column;gap:1rem;margin-bottom:1rem}@container (min-width: 768px){.voice-settings{flex-direction:row;gap:1rem}}.voice-settings label{display:flex;flex-direction:column;gap:.5rem}.current-collection-info{margin-top:1rem;padding:1rem;background:var(--color-bg-soft);border-radius:6px;border-left:4px solid var(--color-accent)}@container (min-width: 768px){.current-collection-info{padding:1rem}}.current-collection-info h4{margin-top:0;color:var(--color-accent)}.library{margin-bottom:2rem;padding:.75rem}@container (min-width: 768px){.library{padding:1rem}}.library-view-toggle{display:flex;gap:.25rem}.library-view-toggle button{padding:.5rem;border:1px solid var(--color-bg-soft);background:var(--color-bg-soft);border-radius:6px;cursor:pointer;font-size:1.2rem;color:var(--color-slate);transition:all .2s;display:flex;align-items:center;justify-content:center;width:40px;height:40px}.library-view-toggle button.active{background:var(--color-slate);color:#fff;border-color:var(--color-slate)}.library-view-toggle button:hover:not(.active){background:var(--color-bg-soft);color:var(--color-primary)}.library--shelves{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.library--shelves .collection-detail{flex:1;min-height:0;display:flex;flex-direction:column;min-width:0;width:100%}.library--shelves .chapters-section{flex:1;min-height:0;display:flex;flex-direction:column;margin-top:.75rem}.library--shelves .collections-bookshelf,.library--shelves .collections-grid{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}.collections-bookshelf{display:flex;flex-direction:column;--shelf-gap: 12px;gap:var(--shelf-gap);padding:1.5rem 1rem 1.75rem;background:linear-gradient(#7c8c9a26,#7c8c9a1a),repeating-linear-gradient(90deg,var(--color-bg-soft) 0px,var(--color-bg-soft) 12px,var(--color-muted) 12px,var(--color-muted) 24px);background-attachment:fixed;min-height:600px;position:relative;border-radius:4px;box-shadow:inset 0 6px 20px #0000004d}.library--shelves .collections-bookshelf{min-height:0}.collections-bookshelf:before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at center,transparent 0%,rgba(124,140,154,.08) 70%,rgba(74,100,122,.15) 100%);pointer-events:none;border-radius:4px}.bookshelf-shelf{position:relative;display:flex;justify-content:flex-start;align-items:flex-end;padding:20px 10px 15px;min-height:200px;margin-bottom:0}.bookshelf-shelf--empty{justify-content:center}.spine-stack{display:flex;flex-direction:column;align-items:flex-start;gap:var(--stack-gap, 0px);z-index:4;pointer-events:none}.spine-stack-item{--spine-base-width: 32px;--spine-height: 160px;width:var(--spine-height);height:calc(var(--spine-base-width) * var(--spine-width-scale, 1));position:relative;transform:translateY(-8px)}.bookshelf-spine.bookshelf-spine--stacked{position:absolute;top:100%;left:0;margin:0;transform-origin:top left;transform:rotate(-90deg)}.bookshelf-shelf:after{content:"";position:absolute;bottom:0;left:0;right:0;height:20px;background:linear-gradient(to bottom,var(--color-slate) 0%,var(--color-primary) 100%);border-radius:0 0 4px 4px;box-shadow:0 4px 8px #0006,inset 0 2px 4px #ffffff26,inset 0 -1px 2px #0006;z-index:1}.bookshelf-shelf:before{content:"";position:absolute;bottom:15px;left:0;right:0;height:8px;background:linear-gradient(to bottom,var(--color-slate) 0%,var(--color-primary) 50%,var(--color-primary) 100%);box-shadow:0 2px 4px #0000004d,inset 0 1px #fff3;z-index:6}.bookshelf-book{display:flex;flex-direction:column;align-items:center;cursor:pointer;transition:all .3s ease;width:120px;margin:0 8px;z-index:5;position:relative;transform:translateY(-8px)}.playlist-indicator{position:absolute;top:-34px;left:50%;transform:translate(-50%);display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:6}.playlist-indicator img{height:34px;width:auto;display:block;filter:drop-shadow(0 6px 12px rgba(15,36,55,.25))}.playlist-jump-target{position:absolute;left:50%;bottom:calc(100% + 4px);width:90%;max-width:120px;min-width:70px;height:30px;border:none;background:transparent;padding:0;margin:0;cursor:pointer;z-index:7;transform:translate(-50%);outline:none;box-shadow:none;-webkit-tap-highlight-color:transparent;appearance:none}.playlist-jump-target:focus,.playlist-jump-target:focus-visible,.playlist-jump-target:active{outline:none;box-shadow:none;border:none}.bookshelf-spine{--spine-base-width: 32px;--spine-title-size: .54rem;--spine-height: 160px;width:calc(var(--spine-base-width) * var(--spine-width-scale, 1));height:var(--spine-height);margin:0 4px;border-radius:2px;position:relative;z-index:4;transform:translateY(-8px) rotate(0);transform-origin:bottom center;pointer-events:none;box-shadow:0 10px 18px #00000040,inset 0 1px #ffffff59,inset 0 -1px #0003}.bookshelf-decoration{width:auto;height:auto;margin:0;display:flex;align-items:flex-end;justify-content:center;z-index:4;transform:translateY(-8px);pointer-events:none;overflow:visible;flex:0 0 auto}.bookshelf-decoration img{width:100%;height:100%;object-fit:contain;object-position:center bottom;display:block}.bookshelf-bookend{width:auto;height:auto;margin:0;display:flex;align-items:flex-end;justify-content:center;z-index:4;transform:translateY(-8px);pointer-events:none;overflow:visible;flex:0 0 auto}.bookshelf-bookend img{width:100%;height:100%;object-fit:contain;object-position:center bottom;display:block}.bookshelf-spine:after{content:"";position:absolute;top:0;bottom:0;right:0;width:4px;background:#00000026}.bookshelf-spine--lean-left{transform:translateY(-8px) rotate(-3deg)}.bookshelf-spine--lean-right{transform:translateY(-8px) rotate(3deg)}.spine-label{position:absolute;inset:8px 4px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;writing-mode:vertical-rl;text-orientation:mixed;color:#d6b45a;text-shadow:0 1px 0 rgba(255,255,255,.4),0 -1px 2px rgba(0,0,0,.7);overflow:hidden}.spine-initials{position:absolute;left:50%;transform:translate(-50%);font-size:.52rem;font-weight:700;letter-spacing:.1em;color:#d6b45a;text-shadow:0 1px 0 rgba(255,255,255,.4),0 -1px 2px rgba(0,0,0,.7);z-index:2}.spine--initials-top .spine-initials{top:6px}.spine--initials-bottom .spine-initials{bottom:6px}.spine--initials-top .spine-label{inset:14px 4px 8px}.spine--initials-bottom .spine-label{inset:8px 4px 14px}.spine-title{font-size:calc(var(--spine-title-size, .54rem) * var(--spine-title-scale, 1));font-weight:700;line-height:1.05;letter-spacing:.05em;text-align:center;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;white-space:normal;word-break:break-word}.spine-author{font-size:.46rem;font-weight:600;line-height:1.1;opacity:.85;letter-spacing:.04em;text-align:center}.spine-style-1{--spine-width-scale: .9;background:linear-gradient(to bottom,rgba(0,0,0,.7) 0,rgba(0,0,0,.7) 6px,transparent 6px),linear-gradient(180deg,#3a1c19,#24110f)}.spine-style-2{--spine-width-scale: 1;background:linear-gradient(to top,rgba(0,0,0,.7) 0,rgba(0,0,0,.7) 6px,transparent 6px),linear-gradient(180deg,#1c2944,#111a2e)}.spine-style-3{--spine-width-scale: .85;background:linear-gradient(to bottom,rgba(0,0,0,.6) 0,rgba(0,0,0,.6) 5px,transparent 5px),linear-gradient(to top,rgba(0,0,0,.6) 0,rgba(0,0,0,.6) 5px,transparent 5px),linear-gradient(180deg,#1f3b2f,#14271f)}.spine-style-4{--spine-width-scale: .95;background:linear-gradient(180deg,#231814,#14100e)}.bookshelf-book:hover{transform:translateY(-20px) scale(1.05);z-index:15}.bookshelf-book--no-hover:hover{transform:translateY(-8px);z-index:5}.book-cover{width:120px;height:160px;border-radius:2px 2px 0 0;background:#1a1512;box-shadow:0 12px 24px #0000004d,0 6px 12px #0003,0 3px 6px #0000001a,inset 0 1px #fff3,inset 0 -1px #0006;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}.book-cover:before{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(145deg,#fff3,#ffffff0d,#00000008);pointer-events:none}.book-cover--gilded-a:before{box-shadow:inset 0 0 0 1px #d6b45abf,inset 0 0 0 5px #d6b45a40}.book-cover--gilded-b:before{box-shadow:inset 0 0 0 1px #d6b45aa6,inset 0 0 0 3px #d6b45a4d,inset 0 0 0 7px #d6b45a2e}.book-cover:after{content:"";position:absolute;right:-3px;top:0;bottom:0;width:5px;z-index:2;background:linear-gradient(to right,#8a6a2a,#d6b45a,#f2e2a5);box-shadow:3px 0 6px #0003}.book-cover--marketplace{background:radial-gradient(circle at top,#d6b45a33,#1a1512d9),#17130f}.marketplace-cover-icon{width:46px;height:46px;border-radius:50%;border:1px solid rgba(214,180,90,.7);background:radial-gradient(circle at 30% 30%,#f2e2a559,#1a1512e6);box-shadow:inset 0 0 0 2px #d6b45a40,0 4px 10px #00000059;display:flex;align-items:center;justify-content:center;margin:.1rem auto .5rem}.marketplace-cover-icon svg{width:24px;height:24px;stroke:#f2e2a5;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;fill:none;filter:drop-shadow(0 1px 1px rgba(0,0,0,.6))}.book-cover.has-image{background:#fff}.book-cover-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:0}.card-cover{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:6px;padding:8px;text-align:center;box-sizing:border-box}.card-cover-title{font-size:.65rem;font-weight:700;line-height:1.2;color:var(--color-primary);z-index:3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-shadow:0 1px 2px rgba(255,255,255,.8)}.card-cover-preview{flex:1;border-radius:8px;overflow:hidden;border:1px solid rgba(15,36,55,.15);background:#f8fafc;position:relative;z-index:2}.card-cover-preview-image{width:140%;height:140%;object-fit:cover;object-position:center top;transform:translate(-12%,-10%)}.chapter-badge{background:#3182ce;color:#fff;padding:.25rem .5rem;border-radius:12px;font-size:.75rem;font-weight:600;min-width:1.5rem;text-align:center;flex-shrink:0}.cover-chapter-badge{position:absolute;bottom:4px;right:4px;width:14px;height:14px;background:#f28c28e6;color:#fff;border-radius:50%;font-size:.4rem;font-weight:600;display:flex;align-items:center;justify-content:center;box-shadow:0 1px 2px #0003,inset 0 1px #ffffff1a;z-index:2}.book-cover-content{padding:.85rem;text-align:center;display:flex;flex-direction:column;justify-content:space-between;height:100%;box-sizing:border-box;position:relative;z-index:3}.book-cover-title{color:#d6b45a;font-size:.7rem;font-weight:700;line-height:1.15;margin-bottom:.5rem;text-shadow:0 1px 0 rgba(255,255,255,.4),0 -1px 2px rgba(0,0,0,.7);display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}.book-cover-author{color:#d6b45ad9;font-size:.65rem;font-weight:500;text-shadow:0 1px 0 rgba(255,255,255,.4),0 -1px 2px rgba(0,0,0,.7);margin-top:auto;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cover-ornament{--ornament-color: rgba(214, 180, 90, .92);position:relative;width:70%;height:12px;margin:.25rem 0 .4rem;align-self:center;opacity:.85;filter:drop-shadow(0 1px 1px rgba(0,0,0,.35))}.cover-ornament--1:before{content:"";position:absolute;left:0;right:0;top:50%;height:1px;background:linear-gradient(to right,transparent,var(--ornament-color),transparent)}.cover-ornament--1:after{content:"";position:absolute;left:50%;top:50%;width:6px;height:6px;background:var(--ornament-color);transform:translate(-50%,-50%) rotate(45deg);box-shadow:0 0 6px #d6b45a59}.cover-ornament--2:before{content:"";position:absolute;left:50%;top:50%;width:4px;height:4px;border-radius:50%;background:var(--ornament-color);transform:translate(-50%,-50%);box-shadow:-10px 0 0 var(--ornament-color),10px 0 0 var(--ornament-color)}.cover-ornament--2:after{content:"";position:absolute;left:15%;right:15%;top:50%;height:1px;background:linear-gradient(to right,transparent,rgba(214,180,90,.7),transparent);opacity:.7}.cover-ornament--3:before{content:"";position:absolute;left:20%;right:20%;top:50%;height:1px;background:linear-gradient(to right,transparent,var(--ornament-color),transparent);box-shadow:0 -3px #d6b45a8c}.cover-ornament--3:after{content:"";position:absolute;left:50%;top:50%;width:3px;height:3px;border-radius:50%;background:var(--ornament-color);transform:translate(-50%,-50%)}.cover-ornament--4:before{content:"";position:absolute;left:12%;right:12%;top:50%;height:1px;background:#d6b45ab3}.cover-ornament--4:after{content:"";position:absolute;left:50%;top:50%;width:6px;height:6px;border:1px solid var(--ornament-color);transform:translate(-50%,-50%) rotate(45deg);opacity:.9}.cover-ornament--5:before{content:"";position:absolute;left:10%;right:10%;top:50%;height:1px;background:repeating-linear-gradient(to right,var(--ornament-color) 0 6px,transparent 6px 12px);opacity:.8}.cover-ornament--5:after{content:"";position:absolute;left:50%;top:50%;width:4px;height:4px;background:var(--ornament-color);transform:translate(-50%,-50%) rotate(45deg)}.cover-ornament--6:before{content:"";position:absolute;left:18%;right:18%;top:50%;height:1px;background:#d6b45ad9}.cover-ornament--6:after{content:"";position:absolute;left:0;right:0;top:50%;height:6px;background:linear-gradient(to right,var(--ornament-color) 0 2px,transparent 2px calc(100% - 2px),var(--ornament-color) calc(100% - 2px));transform:translateY(-50%);opacity:.7}.cover-ornament--7:before{content:"";position:absolute;left:50%;top:50%;width:18px;height:6px;border-radius:10px;background:var(--ornament-color);transform:translate(-50%,-50%);opacity:.8}.cover-ornament--7:after{content:"";position:absolute;left:50%;top:50%;width:4px;height:4px;border-radius:50%;background:var(--ornament-color);transform:translate(-50%,-50%);box-shadow:-16px 0 0 var(--ornament-color),16px 0 0 var(--ornament-color);opacity:.8}.cover-ornament--8:before{content:"";position:absolute;left:20%;right:20%;top:50%;height:1px;background:#d6b45acc}.cover-ornament--8:after{content:"";position:absolute;left:20%;top:50%;width:5px;height:5px;background:var(--ornament-color);transform:translate(-50%,-50%) rotate(45deg);box-shadow:60% 0 0 var(--ornament-color);opacity:.85}.cover-ornament--9:before{content:"";position:absolute;left:18%;right:18%;top:50%;height:1px;background:#d6b45ab3}.cover-ornament--9:after{content:"";position:absolute;left:50%;top:50%;width:6px;height:6px;border:1px solid var(--ornament-color);border-radius:50%;transform:translate(-50%,-50%)}.cover-ornament--10:before{content:"";position:absolute;left:14%;right:14%;top:50%;height:1px;background:#d6b45acc}.cover-ornament--10:after{content:"";position:absolute;left:50%;top:50%;width:3px;height:3px;background:var(--ornament-color);transform:translate(-50%,-50%);box-shadow:-8px 0 0 var(--ornament-color),8px 0 0 var(--ornament-color);opacity:.9}.cover-ornament--11:before{content:"";position:absolute;left:16%;right:16%;top:50%;height:1px;background:#d6b45abf;box-shadow:0 -2px #d6b45a73,0 2px #d6b45a73}.cover-ornament--11:after{content:"";position:absolute;left:50%;top:50%;width:3px;height:3px;background:var(--ornament-color);transform:translate(-50%,-50%)}.cover-ornament--12:before{content:"";position:absolute;left:0;right:0;top:50%;height:1px;background:linear-gradient(to right,transparent,var(--ornament-color),transparent);opacity:.6}.cover-ornament--12:after{content:"";position:absolute;left:50%;top:50%;width:4px;height:4px;border-radius:50%;background:var(--ornament-color);transform:translate(-50%,-50%);box-shadow:-14px -2px #d6b45acc,14px -2px #d6b45acc}.cover-ornament--13,.cover-ornament--14,.cover-ornament--15,.cover-ornament--16,.cover-ornament--17,.cover-ornament--18{height:20px}.cover-ornament--13:before{content:"❦"}.cover-ornament--14:before{content:"❧"}.cover-ornament--15:before{content:"☙"}.cover-ornament--16:before{content:"❦ ❧ ❦";letter-spacing:.15em}.cover-ornament--17:before{content:"❧ ❦ ❧";letter-spacing:.15em}.cover-ornament--18:before{content:"☙ ❦ ☙";letter-spacing:.2em}.cover-ornament--13:before,.cover-ornament--14:before,.cover-ornament--15:before,.cover-ornament--16:before,.cover-ornament--17:before,.cover-ornament--18:before{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:1rem;line-height:1;color:var(--ornament-color);text-shadow:0 1px 2px rgba(0,0,0,.35);white-space:nowrap}.cover-style-1{background:linear-gradient(145deg,rgba(0,0,0,.25) 0%,transparent 40%,rgba(255,255,255,.08) 100%),linear-gradient(180deg,#3a1c19,#24110f)}.cover-style-2{background:linear-gradient(145deg,rgba(0,0,0,.25) 0%,transparent 40%,rgba(255,255,255,.08) 100%),linear-gradient(180deg,#1c2944,#111a2e)}.cover-style-3{background:linear-gradient(145deg,rgba(0,0,0,.25) 0%,transparent 40%,rgba(255,255,255,.08) 100%),linear-gradient(180deg,#1f3b2f,#14271f)}.cover-style-4{background:linear-gradient(145deg,rgba(0,0,0,.25) 0%,transparent 40%,rgba(255,255,255,.08) 100%),linear-gradient(180deg,#231814,#14100e)}@container (max-width: 768px){.collections-bookshelf{--shelf-gap: 10px;padding:1.25rem .5rem 1.5rem}.bookshelf-shelf{padding:15px 5px 12px;min-height:160px;margin-bottom:0}.bookshelf-book{width:100px;margin:0 4px}.playlist-indicator{top:-30px}.playlist-indicator img{height:30px}.playlist-jump-target{height:26px;min-width:60px;bottom:calc(100% + 2px)}.bookshelf-spine{--spine-base-width: 26px;--spine-height: 130px;--spine-title-size: .5rem;height:var(--spine-height);margin:0 3px;transform:translateY(-8px) rotate(0)}.spine-stack-item{--spine-base-width: 26px;--spine-height: 130px}.bookshelf-spine--lean-left{transform:translateY(-8px) rotate(-3deg)}.bookshelf-spine--lean-right{transform:translateY(-8px) rotate(3deg)}.spine-label{inset:6px 3px;gap:4px}.spine-initials{font-size:.48rem}.spine--initials-top .spine-label{inset:12px 3px 6px}.spine--initials-bottom .spine-label{inset:6px 3px 12px}.spine-author{font-size:.44rem}.book-cover{width:100px;height:130px}.book-cover-title,.book-cover-author,.card-cover-title{font-size:.6rem}.book-stats{font-size:.65rem}}@container (max-width: 480px){.collections-bookshelf{--shelf-gap: 8px;padding:1.1rem .5rem 1.35rem}.bookshelf-shelf{padding:12px 4px 10px;min-height:150px;margin-bottom:0}.bookshelf-book{width:84px;margin:0 2px}.playlist-indicator{top:-26px}.playlist-indicator img{height:26px}.playlist-jump-target{height:24px;min-width:52px;bottom:calc(100% + 2px)}.bookshelf-spine{--spine-base-width: 22px;--spine-height: 120px;--spine-title-size: .46rem;height:var(--spine-height);margin:0 2px;transform:translateY(-8px) rotate(0)}.spine-stack-item{--spine-base-width: 22px;--spine-height: 120px}.bookshelf-spine--lean-left{transform:translateY(-8px) rotate(-3deg)}.bookshelf-spine--lean-right{transform:translateY(-8px) rotate(3deg)}.spine-label{inset:6px 2px;gap:3px}.spine-initials{font-size:.44rem}.spine--initials-top .spine-label{inset:12px 2px 6px}.spine--initials-bottom .spine-label{inset:6px 2px 12px}.spine-author{font-size:.4rem}.book-cover{width:84px;height:120px}.book-cover-title,.book-cover-author,.card-cover-title{font-size:.55rem}}.library-header{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;padding:0 .75rem}.library-header-center{display:flex;justify-content:center;align-items:center}.library-header--compact{justify-content:flex-start;margin-bottom:.5rem;padding:0 .5rem}.library-header--compact .library-header-center{justify-content:flex-start}.library-back-button{margin-left:0}.library-header-center h2{margin:0;color:var(--color-primary);font-size:1.5rem;font-weight:700;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.return-to-collections-btn{background:var(--color-slate);color:#fff;border:none;padding:.75rem 1.5rem;border-radius:6px;cursor:pointer;font-size:1rem;font-weight:600;transition:background-color .2s;display:flex;align-items:center;gap:.5rem}.return-to-collections-btn:hover{background:var(--color-primary)}.collection-actions{display:flex;align-items:center;gap:.5rem}.collection-manage-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.75rem}.collection-manage-label{font-size:.8rem;font-weight:600;color:var(--color-slate)}.collection-manage-actions{position:relative}.collection-manage-button{background:var(--color-bg-soft);border:1px solid var(--color-bg-soft);padding:.35rem .6rem;border-radius:6px;cursor:pointer;font-size:.75rem;font-weight:600;color:var(--color-slate);transition:all .2s}.collection-manage-button:hover{border-color:var(--color-muted);color:var(--color-primary)}.collection-manage-menu{position:absolute;top:calc(100% + .4rem);right:0;min-width:180px;background:var(--color-bg-main);border:1px solid var(--color-muted);border-radius:8px;box-shadow:0 10px 25px var(--color-shadow);padding:.35rem;z-index:10}.collection-manage-menu button{width:100%;border:none;background:var(--color-bg-soft);color:var(--color-primary);font-weight:600;padding:.55rem .75rem;border-radius:6px;cursor:pointer;text-align:left;transition:all .2s}.collection-manage-menu button:hover{border-color:var(--color-primary);background:#f4f6f2}.collection-manage-menu .danger{background:#fbeaea;color:#8b1f1f}.collection-marketplace{margin-top:.75rem;padding-top:.75rem;border-top:1px solid var(--color-bg-soft)}.collection-marketplace-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.5rem}.collection-marketplace-header h4{margin:0;font-size:.9rem;color:var(--color-primary)}.collection-marketplace-header button{border:none;background:var(--color-slate);color:#fff;padding:.4rem .75rem;border-radius:6px;cursor:pointer;font-size:.75rem;font-weight:600}.collection-marketplace-header button:hover{background:var(--color-primary)}.collection-marketplace-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:.5rem 1rem}.collection-marketplace-grid div{display:flex;flex-direction:column;gap:.2rem}.collection-marketplace-label{font-size:.7rem;color:var(--color-muted);text-transform:uppercase;letter-spacing:.04em}.collection-marketplace-value{font-size:.85rem;color:var(--color-primary);font-weight:600}.collection-marketplace-empty{margin:0;font-size:.85rem;color:var(--color-muted)}.expand-details-btn{background:var(--color-bg-soft);border:1px solid var(--color-bg-soft);padding:.25rem;border-radius:4px;cursor:pointer;font-size:.8rem;color:var(--color-slate);transition:all .2s;display:flex;align-items:center;justify-content:center;width:24px;height:24px}.expand-details-btn:hover{background:var(--color-bg-soft);color:var(--color-primary)}.collection-details-expanded{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--color-bg-soft)}.collection-description{margin-bottom:.75rem}.collection-description p{margin:0;color:var(--color-slate);font-size:.9rem;line-height:1.4}.collection-meta{margin-bottom:.75rem}.collection-meta small{color:var(--color-muted);font-size:.8rem}.collection-detail-actions{display:flex;gap:.5rem;flex-wrap:wrap}.collection-detail-actions button{padding:.5rem 1rem;border:none;border-radius:6px;cursor:pointer;font-size:.85rem;font-weight:600;transition:background-color .2s}.collection-detail-actions button:first-child{background:var(--color-slate);color:#fff}.collection-detail-actions button:first-child:hover{background:var(--color-primary)}.collection-detail-actions .delete-btn{background:#dc3545;color:#fff}.collection-detail-actions .delete-btn:hover{background:#c82333}.chapters-section{margin-top:2rem}.chapters-section h4{margin:0 0 1rem;color:var(--color-primary);font-size:1.1rem;font-weight:600}@container (max-width: 768px){.collection-detail-actions{flex-direction:column}.collection-detail-actions button{width:100%}.expand-details-btn{width:20px;height:20px;font-size:.7rem}}.library-controls{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem;padding:0 1rem;gap:1rem}.library-controls--chapter{flex-wrap:wrap}.chapter-action-buttons{display:flex;gap:.4rem;flex-wrap:wrap;justify-content:flex-end;margin-left:auto}.chapter-action-buttons button{padding:.25rem .45rem;border:1px solid var(--color-bg-soft);background:var(--color-bg-soft);border-radius:6px;cursor:pointer;font-size:.7rem;color:var(--color-slate);transition:all .2s;white-space:nowrap}.chapter-action-buttons button:hover:not(.active):not(:disabled){background:var(--color-bg-soft);color:var(--color-primary)}.chapter-action-buttons button.active{background:var(--color-slate);color:#fff;border-color:var(--color-slate)}.chapter-action-buttons button:disabled{opacity:.6;cursor:not-allowed}.collection-play-button{padding:.25rem .45rem;border:1px solid var(--color-bg-soft);background:var(--color-bg-soft);border-radius:6px;cursor:pointer;font-size:.7rem;color:var(--color-slate);transition:all .2s;white-space:nowrap;margin-right:.4rem}.collection-play-button:hover:not(.active){background:var(--color-bg-soft);color:var(--color-primary)}.collection-play-button.active{background:var(--color-slate);color:#fff;border-color:var(--color-slate)}.library-view-toggle{display:flex;gap:.25rem;flex-shrink:0}.library-sort-controls{display:flex;gap:.25rem;flex-wrap:nowrap;justify-content:center;flex:1;max-width:400px}.library-sort-controls button{padding:.4rem .6rem;border:1px solid var(--color-bg-soft);background:var(--color-bg-soft);border-radius:4px;cursor:pointer;font-size:.8rem;color:var(--color-slate);transition:all .2s;white-space:nowrap;flex-shrink:0}.library-sort-controls button:hover{background:var(--color-bg-soft);color:var(--color-primary)}.library-sort-controls button.active{background:var(--color-slate);color:#fff;border-color:var(--color-slate)}.library-controls-right{display:flex;justify-content:flex-end;align-items:center;flex-shrink:0}@container (max-width: 768px){.library-header{padding:0 .5rem;margin-bottom:1rem}.library-controls{padding:0 .5rem;margin-bottom:1rem;gap:.5rem}.library-sort-controls{gap:.25rem;flex:1;max-width:none;min-width:0}.library-sort-controls button{padding:.3rem .4rem;font-size:.7rem;flex-shrink:1}.library-header-center h2{font-size:1.25rem}.library-view-toggle button,.settings-icon-button{width:36px;height:36px;font-size:1rem}}.collections-grid{display:grid;grid-template-columns:1fr;gap:1rem}@container (min-width: 480px){.collections-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}}@container (min-width: 768px){.collections-grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1rem}}.collection-card{padding:1rem;border:1px solid var(--color-bg-soft);border-radius:8px;cursor:pointer;transition:box-shadow .2s;background:var(--color-bg-main)}.collection-card--with-spine{display:flex;gap:.75rem;align-items:center;min-height:160px}.collection-card-content{flex:1;display:flex;flex-direction:column;gap:0}@container (min-width: 768px){.collection-card{padding:1.5rem;border:1px solid #ccc}}.collection-card:hover{box-shadow:0 4px 8px #0000001a}.marketplace-toolbar{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin-bottom:1rem}.marketplace-search{flex:1;min-width:220px;padding:.65rem .75rem;border:1px solid var(--color-muted);border-radius:6px;background:var(--color-bg-main);color:var(--color-primary)}.marketplace-filters{display:flex;gap:.4rem;align-items:center}.marketplace-filter{padding:.4rem .8rem;border-radius:999px;border:1px solid var(--color-muted);background:var(--color-bg-soft);color:var(--color-primary);font-size:.75rem;font-weight:600;white-space:nowrap;cursor:pointer;transition:background-color .2s,color .2s,border-color .2s}.marketplace-filter.is-active{background:var(--color-primary);border-color:var(--color-primary);color:#fff}.marketplace-hint{font-size:.8rem;color:var(--color-muted)}.marketplace-status,.marketplace-empty{padding:.75rem;color:var(--color-slate);font-size:.9rem}.marketplace-card{cursor:default}.marketplace-card-summary{display:flex;flex-direction:column;gap:.6rem}.marketplace-card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:.75rem;margin-bottom:.5rem}.marketplace-price{padding:.25rem .6rem;border-radius:999px;background:var(--soft-amber);border:1px solid var(--line);font-size:.75rem;font-weight:700;color:var(--color-primary);white-space:nowrap}.marketplace-price.is-free{background:var(--soft-green)}.marketplace-description{margin:0 0 .75rem;color:var(--color-slate);font-size:.85rem;line-height:1.45}.marketplace-meta{margin-bottom:.75rem;font-size:.75rem;color:var(--color-muted)}.marketplace-card-summary-actions{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}.marketplace-card-toggle{display:inline-flex;align-items:center;gap:.45rem;border:none;background:transparent;color:var(--color-primary);font-weight:600;font-size:.85rem;cursor:pointer;padding:0}.marketplace-card-toggle:focus,.marketplace-card-toggle:focus-visible,.marketplace-card-toggle:active,.marketplace-chapters-toggle:focus,.marketplace-chapters-toggle:focus-visible,.marketplace-chapters-toggle:active{outline:none;box-shadow:none}.marketplace-card-toggle:hover{color:var(--color-slate)}.marketplace-toggle-icon{display:inline-flex;align-items:center;justify-content:center;width:1.4rem;height:1.4rem;border-radius:999px;border:1px solid var(--color-muted);font-size:1rem;line-height:1}.marketplace-card-body{margin-top:.85rem;padding-top:.85rem;border-top:1px dashed var(--color-bg-soft)}.marketplace-chapters{margin-bottom:.75rem}.marketplace-chapters-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.marketplace-chapters-label{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--color-muted);margin-bottom:.35rem}.marketplace-chapters-toggle{border:none;background:transparent;color:var(--color-primary);font-size:.75rem;font-weight:600;cursor:pointer;padding:0}.marketplace-chapters-toggle:hover{color:var(--color-slate)}.marketplace-chapter-list{margin:0;padding:0;display:grid;gap:.35rem;color:var(--color-slate);font-size:.78rem;list-style:none;counter-reset:marketplace-chapter}.marketplace-chapter-item{display:flex;align-items:baseline;gap:.5rem;counter-increment:marketplace-chapter}.marketplace-chapter-item:before{content:counter(marketplace-chapter) ".";display:inline-block;width:1.4rem;text-align:right;color:var(--color-muted);flex-shrink:0}.marketplace-chapter-name{flex:1;font-size:.76rem}.marketplace-chapter-count{font-size:.7rem;color:var(--color-muted);white-space:nowrap}.marketplace-sample{padding:.75rem;border-radius:8px;border:1px solid var(--color-bg-soft);background:var(--color-bg-soft);margin-bottom:.75rem}.marketplace-sample-label{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--color-muted);margin-bottom:.25rem}.marketplace-sample-chapter{font-size:.75rem;color:var(--color-muted);margin-bottom:.35rem}.marketplace-sample-controls{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.marketplace-sample-title{font-weight:700;color:var(--color-primary);margin-bottom:.35rem;font-size:.85rem}.marketplace-sample-text{margin:0 0 .5rem;font-size:.8rem;color:var(--color-slate);line-height:1.4}.marketplace-sample-image{width:100%;border-radius:8px;border:1px solid var(--color-bg-soft);display:block}.marketplace-sample-audio{flex:1 1 220px;min-width:200px;margin-top:0}.marketplace-sample-preview{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;padding:.4rem .65rem;border-radius:8px;border:1px solid var(--color-muted);background:var(--color-bg-main);color:var(--color-primary);cursor:pointer;transition:border-color .2s,color .2s,background-color .2s}.marketplace-sample-preview svg{width:1.1rem;height:1.1rem;stroke:currentColor;fill:none;stroke-width:1.6}.marketplace-sample-preview-label{font-size:.75rem;font-weight:600}.marketplace-sample-preview:hover:not(:disabled){border-color:var(--color-primary);color:var(--color-slate)}.marketplace-sample-preview:disabled{opacity:.5;cursor:not-allowed}.marketplace-sample-placeholder{font-size:.8rem;color:var(--color-muted);flex:1 1 220px}.marketplace-preview-modal{position:fixed;inset:0;background:#0f172a99;display:flex;align-items:center;justify-content:center;z-index:1200;padding:1.5rem}.marketplace-preview-card{background:var(--color-bg-main);border-radius:12px;padding:1rem;max-width:640px;width:100%;max-height:85vh;overflow-y:auto;box-shadow:0 20px 40px #00000040}.marketplace-preview-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:.75rem}.marketplace-preview-title{font-weight:700;color:var(--color-primary)}.marketplace-preview-subtitle{font-size:.8rem;color:var(--color-muted);margin-top:.25rem}.marketplace-preview-close{border:none;background:transparent;font-size:1.2rem;color:var(--color-muted);cursor:pointer;padding:.25rem}.marketplace-preview-close:hover{color:var(--color-slate)}.marketplace-preview-image{width:100%;height:auto;border-radius:10px;border:1px solid var(--color-bg-soft);display:block}.marketplace-action-button{padding:.6rem 1rem;border-radius:6px;border:none;background:var(--color-primary);color:#fff;font-weight:600;cursor:pointer;transition:background-color .2s}.marketplace-action-button:hover:not(:disabled){background:var(--color-slate)}.marketplace-action-button:disabled{background:#cbd5e0;cursor:not-allowed}.collection-card--summary{border:2px solid var(--color-primary);padding:.6rem .85rem;margin-bottom:.5rem;width:100%;max-width:100%;box-sizing:border-box;min-width:0;overflow:visible;position:relative}.list-spine{margin:0;transform:none;align-self:center;position:relative;flex:0 0 auto;box-shadow:0 6px 12px #0000002e,inset 0 1px #ffffff59,inset 0 -1px #0003}.collection-header-line{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:.5rem}.collection-card--summary .collection-header-line{margin-bottom:.35rem;min-width:0}.collection-title{margin:0;color:var(--color-primary);font-size:.95rem;font-weight:700;flex:1;padding-right:1rem}.collection-card--summary .collection-title{font-size:.76rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.collection-card--summary.is-expanded .collection-title{white-space:normal;overflow:visible;text-overflow:unset}.collection-card--summary .collection-author-line{min-width:0}.collection-card--summary .collection-author{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chapter-badge{background:var(--color-accent);color:#fff;padding:.25rem .5rem;border-radius:12px;font-size:.75rem;font-weight:600;min-width:1.5rem;text-align:center;flex-shrink:0}.collection-meta-badges{display:flex;align-items:center;gap:.35rem;flex-shrink:0}.listening-badge{background:var(--color-slate)}.collection-author-line{display:flex;justify-content:space-between;align-items:center}@container (max-width: 768px){.collection-card--with-spine{min-height:130px}.card-index-drawer{--card-index-tab-size: 56px;--card-index-panel-height: 58px;--card-index-panel-padding: calc(var(--card-index-tab-size) + 16px)}.card-index-input{height:32px;font-size:.85rem}}@container (max-width: 480px){.collection-card--with-spine{gap:.6rem;min-height:120px}.card-index-drawer{--card-index-tab-size: 50px;--card-index-panel-height: 54px;--card-index-panel-padding: calc(var(--card-index-tab-size) + 14px)}.card-index-panel-inner{gap:8px}.card-index-input{height:30px;font-size:.8rem}}.collection-author{color:var(--color-slate);font-size:.85rem;font-weight:500;flex:1}.card-index-drawer{position:absolute;left:0;right:0;bottom:0;width:100%;height:calc(var(--card-index-panel-height) + 8px);z-index:50;--card-index-tab-size: 64px;--card-index-panel-height: 64px;--card-index-panel-padding: calc(var(--card-index-tab-size) + 18px)}.card-index-drawer.is-hidden{opacity:0;visibility:hidden;pointer-events:none}.card-index-tab{pointer-events:auto;position:absolute;left:8px;bottom:8px;width:var(--card-index-tab-size);height:var(--card-index-tab-size);z-index:2;border-radius:12px;background:transparent;border:none;padding:0;display:grid;place-items:center;cursor:pointer}.card-index-tab-image{width:100%;height:100%;object-fit:contain;display:block;filter:drop-shadow(0 3px 6px rgba(0,0,0,.25))}.card-index-panel{pointer-events:auto;position:absolute;left:0;bottom:0;width:100%;height:var(--card-index-panel-height);z-index:1;background:#f3ead3;border-top:2px solid #c2a16a;transform:translate(-100%);transition:transform .35s ease;box-shadow:0 -8px 16px #0003}.card-index-drawer.is-open .card-index-panel{transform:translate(0)}.card-index-panel-inner{height:100%;display:flex;align-items:center;gap:10px;padding:0 16px 0 var(--card-index-panel-padding)}.card-index-input{flex:1;height:36px;border-radius:8px;border:1px solid #c2a16a;padding:0 12px;font-size:.9rem;background:#fff7e6;color:#2f241a;box-shadow:inset 0 1px 2px #0000001f}.card-index-input::placeholder{color:#2f241a99}.card-index-clear{border:none;border-radius:6px;padding:.35rem .7rem;background:#8f6a3b;color:#fff7e6;font-size:.75rem;font-weight:600;cursor:pointer}.card-index-clear:hover{background:#7a5a34}.collection-date{color:var(--color-muted);font-size:.8rem;white-space:nowrap;flex-shrink:0}.collection-stats{display:flex;justify-content:space-between;margin-top:1rem;font-size:.875rem;color:var(--color-muted)}.collection-detail{max-width:800px;margin:0 auto}.collection-detail button:first-child{margin-bottom:1rem}.chapter-summary{border:1px solid var(--color-bg-soft);padding:1rem;margin-bottom:1rem;border-radius:6px}.chapter-summary h5{margin:0 0 .5rem}.chapter-summary small{color:var(--color-muted)}.language-selector{position:relative;margin:1rem 0;padding:.75rem;background:var(--color-bg-soft);border:1px solid var(--color-bg-soft);border-radius:6px}.language-display{display:flex;align-items:center;gap:.5rem}.language-label{font-weight:600;color:var(--color-accent)}.language-link{background:none;border:none;color:var(--color-accent);cursor:pointer;font-size:.9rem;font-weight:500;text-decoration:underline;padding:.25rem .5rem;border-radius:4px;transition:background-color .2s;display:inline-flex;align-items:center;gap:.25rem}.language-link:hover{background-color:#0284c71a}.language-popup{position:absolute;top:100%;left:0;right:0;background:var(--color-bg-main);border:1px solid var(--color-bg-soft);border-radius:8px;box-shadow:0 10px 25px var(--color-shadow);z-index:1000;margin-top:.5rem}.language-popup-content{padding:1rem}.language-popup-content h4{margin:0 0 .75rem;color:var(--color-primary);font-size:1rem;font-weight:600}.language-options{display:flex;flex-direction:column;gap:.25rem;margin-bottom:.75rem;max-height:200px;overflow-y:auto}.language-option{background:none;border:none;padding:.5rem .75rem;text-align:left;cursor:pointer;border-radius:4px;font-size:.9rem;color:var(--color-slate);transition:background-color .2s}.language-option:hover{background-color:var(--color-bg-soft)}.language-option.selected{background-color:var(--color-bg-soft);color:var(--color-accent);font-weight:500}.close-popup-button{background:var(--color-slate);color:#fff;border:none;padding:.5rem 1rem;border-radius:4px;cursor:pointer;font-size:.875rem;width:100%;transition:background-color .2s}.close-popup-button:hover{background:var(--color-primary)}
