/* Home follows the workspace's theme and type scale. No project palette is stored here. */
#homeView,.home-file-dialog{--home-muted:color-mix(in srgb,var(--muted) 80%,var(--text))}
html[data-route="home"] #homeView .home-view{width:100%;max-width:1440px!important;margin:0 auto!important;padding:44px clamp(24px,5vw,72px) 32px!important;box-sizing:border-box;background:none!important}
#homeView svg,.home-file-dialog svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round;flex:none}
#homeView .home-workspace-heading{display:flex;align-items:center;justify-content:space-between;gap:32px;margin:0 0 36px}
#homeView .home-brand{height:34px;margin-bottom:22px;display:flex;align-items:center;justify-content:flex-start}
#homeView .home-logo-full{width:auto!important;height:44px!important;max-width:140px!important;object-fit:contain;object-position:left;filter:none!important;margin:0!important}
#homeView .home-heading-copy h1{font:500 clamp(32px,3.5vw,44px)/1.15 var(--theme-heading,var(--theme-ui,system-ui));letter-spacing:-.035em;color:var(--text);margin:0 0 10px}
#homeView .home-heading-copy p{font:400 14px/1.6 var(--theme-ui,system-ui);color:var(--home-muted,var(--muted));margin:0}
#homeView .home-heading-actions{gap:10px;align-self:flex-end;margin-bottom:3px}
#homeView :is(.soft-btn,.primary-btn){display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px!important;padding:10px 15px!important;border-radius:7px!important;font:500 13px/1.45 var(--theme-ui,system-ui);box-shadow:none!important;letter-spacing:0}
#homeView .soft-btn{background:transparent;color:var(--text);border:1px solid var(--line)}
#homeView .primary-btn{background:var(--accent);color:var(--accent-ink,var(--bg));border:1px solid transparent}
#homeView .primary-btn:hover{filter:brightness(1.08);transform:none}
.home-eyebrow{font:600 10px/1.4 var(--theme-ui,system-ui);letter-spacing:.13em;color:var(--home-muted,var(--muted))}
#homeView .home-continue{padding:24px 28px 0;border:1px solid var(--line);border-radius:10px;background:var(--surface);margin-bottom:42px}
#homeView .home-continue[hidden]{display:none}
#homeView .home-continue-main{display:flex;gap:24px;align-items:center;padding-bottom:24px}
#homeView .home-book-cover{display:block;width:88px;height:126px;object-fit:cover;border-radius:3px;background:var(--surface-2);box-shadow:0 3px 8px color-mix(in srgb,var(--text) 8%,transparent);flex:none}
#homeView .home-continue-copy{min-width:0;flex:1}
#homeView .home-continue h2{font:500 clamp(21px,2.4vw,29px)/1.3 var(--theme-heading,var(--theme-ui,system-ui));margin:8px 0 9px;overflow-wrap:anywhere;color:var(--text)}
#homeView .home-resume-path{font-size:13px;line-height:1.5;color:var(--home-muted,var(--muted));margin:0 0 14px;overflow-wrap:anywhere}
#homeView .home-resume-facts{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:11px;line-height:1.5;color:var(--home-muted,var(--muted))}
#homeView .home-continue-actions{display:flex;flex-direction:column;align-items:stretch;gap:8px;flex:none}
#homeView .home-text-btn,.home-file-dialog .home-text-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;background:none;color:var(--text);padding:10px 0;min-height:42px;font:500 12px/1.4 var(--theme-ui,system-ui);cursor:pointer;text-decoration:none}
#homeView .home-text-btn:hover,.home-file-dialog .home-text-btn:hover{color:var(--accent)}
#homeView .home-book-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--line);gap:20px}
#homeView .home-book-shortcuts button{display:flex;align-items:center;gap:10px;background:none;border:0;border-radius:4px;color:var(--home-muted,var(--muted));font:500 12px/1.5 var(--theme-ui,system-ui);min-height:54px;padding:10px 0;cursor:pointer}
#homeView .home-book-shortcuts button:hover{color:var(--accent)}
#homeView .home-book-shortcuts svg:last-child{width:14px;margin-left:auto;opacity:.6}
#homeView .home-library-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:20px}
#homeView .home-library-heading>div{display:flex;align-items:baseline;gap:16px}
#homeView .home-library-heading h2{font:500 20px/1.3 var(--theme-ui,system-ui);color:var(--text);margin:0}
#homeView #homeLibraryCount{font-size:12px;color:var(--home-muted,var(--muted));font-variant-numeric:tabular-nums}
#homeView .home-library-tools{display:flex;align-items:flex-end;gap:14px;margin-bottom:24px}
#homeView .home-search{position:relative;flex:1;min-width:180px}
#homeView .home-search>svg{position:absolute;left:13px;top:14px;color:var(--home-muted,var(--muted));width:16px;height:16px;pointer-events:none}
#homeView .home-search input{width:100%;padding-left:38px!important}
#homeView :is(.home-search input,.home-select select),.home-file-dialog select{height:44px;min-height:44px;box-sizing:border-box;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--text);font:400 13px/1.5 var(--theme-ui,system-ui);padding:10px 12px}
#homeView .home-select{display:flex;flex-direction:column;gap:6px;flex:0 1 190px;min-width:140px;color:var(--home-muted,var(--muted));font-size:11px}
#homeView .home-select select{width:100%;text-overflow:ellipsis}
#homeView #homeResetFilters{flex:none;font-size:11px;color:var(--accent)}
#homeView #homeResetFilters[hidden]{display:none}
#homeView .home-books{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 32px}
#homeView .home-book{display:flex;gap:22px;padding:26px 0;min-width:0;border-top:1px solid var(--line);align-items:flex-start;background:none}
#homeView .home-cover-open{border:0;background:none;cursor:pointer;flex:none;padding:0;border-radius:3px}
#homeView .home-book-body{flex:1;min-width:0}
#homeView .home-book-overline{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--home-muted,var(--muted));line-height:1.5;min-height:15px}
#homeView .home-book-overline>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#homeView .home-active-label{color:var(--accent);flex:none}
#homeView .home-book h3{font:500 18px/1.4 var(--theme-heading,var(--theme-ui,system-ui));color:var(--text);margin:6px 0 8px;white-space:normal}
#homeView .home-book h3 button{font:inherit;letter-spacing:inherit;color:inherit;display:block;text-align:left;line-height:inherit;border:0;padding:0;background:none;cursor:pointer;overflow-wrap:anywhere}
#homeView .home-book-facts{display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:12px;color:var(--home-muted,var(--muted));margin:0 0 7px;line-height:1.5}
#homeView .home-book-date{font-size:12px;color:var(--home-muted,var(--muted));margin:0;line-height:1.5}
#homeView .home-book-actions{display:flex;align-items:flex-start;gap:16px;margin-top:8px;flex-wrap:wrap}
#homeView .home-book-actions .home-text-btn{font-size:12px}
#homeView .home-book-actions .home-text-btn:first-child{color:var(--accent)}
#homeView .home-book-actions svg{width:15px;height:15px}
#homeView .home-book-menu{margin-left:auto;position:relative}
#homeView .home-book-menu summary{list-style:none;display:grid;place-items:center;width:38px;height:42px;cursor:pointer;color:var(--home-muted,var(--muted));border-radius:6px}
#homeView .home-book-menu summary::-webkit-details-marker{display:none}
#homeView .home-book-menu[open] summary{background:var(--accent-soft);color:var(--text)}
#homeView .home-book-menu>div{position:absolute;right:0;top:43px;z-index:4;min-width:170px;padding:5px;border:1px solid var(--line);border-radius:8px;background:var(--surface-strong);box-shadow:0 6px 24px color-mix(in srgb,var(--text) 10%,transparent)}
#homeView .home-book-menu>div button{display:block;width:100%;min-height:42px;padding:10px;text-align:left;font:400 12px var(--theme-ui,system-ui);color:var(--text);border:0;background:none;cursor:pointer;border-radius:4px}
#homeView .home-book-menu>div button:hover{background:var(--accent-soft)}
#homeView .home-empty{grid-column:1/-1;padding:40px 20px;border-top:1px solid var(--line);text-align:center;color:var(--home-muted,var(--muted))}
#homeView .home-empty>svg{width:28px;height:28px;margin-bottom:14px;color:var(--accent)}
#homeView .home-empty h3{font:500 19px/1.4 var(--theme-heading,var(--theme-ui,system-ui));margin:0 0 10px;color:var(--text)}
#homeView .home-empty p{font-size:13px;margin:0 0 18px;line-height:1.6}
#homeView .home-sagas{border-top:1px solid var(--line);padding-top:5px;margin-top:8px}
#homeView .home-sagas>summary{font:500 12px/1.5 var(--theme-ui,system-ui);color:var(--home-muted,var(--muted));cursor:pointer;min-height:44px;padding:12px 0;box-sizing:border-box}
#homeView #homeSagaCount{font-size:11px;margin-left:5px}
#homeView .home-saga-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 26px;padding:6px 0 18px}
#homeView .home-saga{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:7px;padding:6px 10px;min-width:0}
#homeView .home-saga-filter{display:flex;align-items:center;flex:1;min-width:0;gap:14px;padding:8px 0;min-height:44px;color:var(--text);border:0;background:none;text-align:left;cursor:pointer}
#homeView .home-saga-filter>span{min-width:0;flex:1;display:grid;gap:6px}
#homeView .home-saga-filter b{font:500 13px/1.4 var(--theme-ui,system-ui);overflow-wrap:anywhere}
#homeView .home-saga-filter small{font-size:12px;color:var(--home-muted,var(--muted))}
#homeView .home-icon-btn,.home-file-dialog .home-icon-btn{display:grid;place-items:center;padding:10px;width:40px;height:40px;flex:none;border:1px solid var(--line);border-radius:7px;background:none;color:var(--home-muted,var(--muted));cursor:pointer}
#homeView .home-sync-strip{display:flex;align-items:center;justify-content:space-between;gap:24px;border-top:1px solid var(--line);padding:24px 0;margin-top:24px}
#homeView .home-sync-strip h2{font:500 15px/1.5 var(--theme-ui,system-ui);color:var(--text);margin:0 0 6px}
#homeView .home-sync-strip p{max-width:540px;font-size:12px;line-height:1.65;color:var(--home-muted,var(--muted));margin:0}
#homeView #cloudHomeBtn{flex:0 1 280px;justify-content:flex-start;gap:14px;min-width:200px;text-align:left;background:none!important}
#homeView #cloudHomeBtn>span{min-width:0;display:grid;gap:4px}
#homeView #cloudHomeBtn b{font-size:12px;font-weight:500}
#homeView #cloudHomeBtn small{font-size:11px;line-height:1.5;color:var(--home-muted,var(--muted));overflow-wrap:anywhere}
#homeView .home-info-section{margin:0;padding:12px 0;border-top:1px solid var(--line);color:var(--home-muted,var(--muted))}
#homeView .home-info-section>summary{font:400 12px/1.5 var(--theme-ui,system-ui);padding:10px 0;min-height:40px;box-sizing:border-box;color:var(--home-muted,var(--muted));cursor:pointer}
#homeView .home-info-links{display:flex;flex-wrap:wrap;gap:8px 24px;padding:6px 0 12px}
#homeView .home-info-links button{border:0;background:none;color:var(--home-muted,var(--muted));font:400 12px var(--theme-ui,system-ui);padding:10px 0;cursor:pointer}
#homeView .home-info-links button:hover{color:var(--accent)}
#homeView .home-footer{margin-top:12px;padding:18px 0 0;border-top:1px solid var(--line)}
#homeView .home-footer small{font-size:11px}
.home-visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#homeView :is(button,input,select,summary):focus-visible,.home-file-dialog :is(button,select):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
#modal.home-transfer-modal{width:min(640px,94vw)!important;padding:28px!important;border-radius:12px!important;background:var(--surface-strong)!important;box-shadow:0 20px 70px color-mix(in srgb,var(--text) 12%,transparent)!important}
.home-file-dialog{color:var(--text);font-family:var(--theme-ui,system-ui)}
.home-file-dialog .home-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:22px}
#modal.home-transfer-modal .home-dialog-heading h2{font:500 27px/1.3 var(--theme-heading,var(--theme-ui,system-ui))!important;letter-spacing:-.025em;color:var(--text);margin:6px 0 0}
.home-file-dialog>p{font-size:13px;line-height:1.65;color:var(--home-muted,var(--muted));margin:0 0 20px}
.home-file-dialog .home-export-label{display:block;font-size:12px;color:var(--home-muted,var(--muted));margin-bottom:7px}
.home-file-dialog select{width:100%;max-width:100%;text-overflow:ellipsis}
.home-file-dialog #homeExportBook{font-size:11px;line-height:1.6;overflow-wrap:anywhere;margin:8px 0 22px;color:var(--home-muted,var(--muted))}
.home-file-dialog .home-file-options{display:grid;gap:0;border-top:1px solid var(--line)}
.home-file-dialog .home-file-options>button{display:flex;align-items:center;gap:17px;width:100%;min-height:82px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;color:var(--text);padding:18px 6px;text-align:left;cursor:pointer;box-shadow:none}
.home-file-dialog .home-file-options>button:hover{background:var(--accent-soft)}
.home-file-dialog .home-file-options>button>span{min-width:0;flex:1;display:grid;gap:6px}
.home-file-dialog .home-file-options b{font:500 15px/1.4 var(--theme-ui,system-ui)}
.home-file-dialog .home-file-options em{font-size:12px;color:var(--home-muted,var(--muted));font-weight:400;font-style:normal;margin-left:6px}
.home-file-dialog .home-file-options small{font-size:12px;line-height:1.5;color:var(--home-muted,var(--muted))}
.home-file-dialog .home-file-options>button>svg:last-child{width:16px;color:var(--home-muted,var(--muted))}
.home-file-dialog .home-export-bottom{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-top:16px}
.home-file-dialog .home-export-bottom>span{font-size:11px;line-height:1.6;color:var(--home-muted,var(--muted));max-width:220px}
.home-file-dialog .home-export-bottom button[hidden]{display:none}
.home-file-dialog .home-export-status{min-height:21px;margin:12px 0 0;font-size:12px;color:var(--accent)}
.home-file-dialog button:disabled{opacity:.5;cursor:wait}
@media(min-width:1600px){#homeView .home-books{grid-template-columns:repeat(3,minmax(0,1fr));gap:0 28px}#homeView .home-book{gap:16px}#homeView .home-book .home-book-cover{width:72px;height:104px}}
@media(max-width:1050px){#homeView .home-continue-main{flex-wrap:wrap;gap:20px}#homeView .home-continue-copy{flex-basis:calc(100% - 110px)}#homeView .home-continue-actions{flex-direction:row;width:100%;gap:22px}#homeView .home-continue-actions .primary-btn{flex:none}#homeView .home-book-shortcuts{gap:14px}#homeView .home-book-shortcuts svg:last-child{display:none}#homeView .home-book{gap:16px}#homeView .home-book .home-book-cover{width:72px;height:104px}#homeView .home-book-actions{gap:12px}}
@media(max-width:800px){html[data-route="home"] #homeView .home-view{padding:40px 28px 28px!important}#homeView .home-workspace-heading{align-items:flex-start;gap:22px;flex-direction:column;margin-bottom:28px}#homeView .home-heading-actions{align-self:flex-start;justify-content:flex-start;width:auto}#homeView .home-brand{margin-bottom:18px}#homeView .home-continue{padding:22px 22px 0;margin-bottom:32px}#homeView .home-library-tools{flex-wrap:wrap;gap:12px}#homeView .home-search{flex-basis:100%}#homeView .home-select{flex:1 1 150px}#homeView .home-books{grid-template-columns:1fr}#homeView .home-book .home-book-cover{width:80px;height:116px}#homeView .home-book-actions{gap:22px}#homeView .home-book-menu{margin-left:0}#homeView .home-saga-list{grid-template-columns:1fr}#homeView .home-sync-strip{align-items:flex-start;flex-direction:column}#homeView #cloudHomeBtn{flex-basis:auto;max-width:100%}}
@media(max-width:560px){#homeView .home-book-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 20px}.home-file-dialog .home-export-bottom{align-items:flex-start;flex-direction:column;gap:4px}.home-file-dialog .home-file-options>button{gap:12px}.home-file-dialog .home-file-options small{font-size:11px}}
@media(prefers-reduced-motion:reduce){#homeView *{scroll-behavior:auto;transition:none!important}}

html[data-route="home"][data-theme="sylva-dark"] #homeView .primary-btn{background:var(--accent)!important;color:var(--bg)!important}
