:root{--green:#243d34;--dark:#182d27;--sage:#dce5d9;--cream:#f7f2e8;--paper:#fffdfa;--ink:#24362f;--muted:#748077;--brown:#a9734a;--border:#e8e4d9;--shadow:0 12px 35px rgba(29,44,35,.07)}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--cream);color:var(--ink);font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}h1,h2,h3{font-family:Georgia,'Times New Roman',serif;font-weight:500;line-height:1.2;margin:0}h1{font-size:clamp(32px,4.5vw,54px)}h2{font-size:28px}h3{font-size:23px}p{margin:.4rem 0 1rem;color:#6f796d}.hidden{display:none!important}.eyebrow{font-size:10px;letter-spacing:2.2px;font-weight:800;color:var(--brown)}.eyebrow.light{color:#d7c5a9}.app{min-height:100dvh;padding-bottom:88px}.topbar{height:77px;background:#fffefa;display:flex;align-items:center;justify-content:space-between;padding:0 max(22px,calc((100vw - 1180px)/2));border-bottom:1px solid var(--border)}.brand{display:flex;align-items:center;gap:11px;border:0;padding:0;background:transparent;color:inherit;text-align:left;cursor:pointer}.brand:hover b{text-decoration:underline;text-underline-offset:3px}.brand:focus-visible,.stat:focus-visible{outline:3px solid #6c957a;outline-offset:3px}.brand-mark{width:43px;height:43px;display:grid;place-items:center;background:var(--green);border-radius:11px;font-size:22px}.brand b{display:block;font-family:Georgia,serif;font-size:19px;font-weight:500;line-height:1.2}.brand span{font-size:9px;color:var(--brown);letter-spacing:1.5px;font-weight:800}.header-actions{display:flex;gap:12px;align-items:center}.icon-button{border:none;background:#f2ede4;width:39px;height:39px;border-radius:50%;font-size:19px}.button{border:1px solid transparent;border-radius:9px;padding:11px 16px;font-weight:700;display:inline-flex;justify-content:center;align-items:center;gap:8px;transition:transform .13s,background .13s;text-decoration:none}.button:hover{transform:translateY(-1px)}.button.primary{color:#fff;background:var(--green)}.button.primary:hover{background:#385849}.button.small{font-size:12px;padding:9px 14px}.button.cream{background:#f6e3bf;color:var(--dark)}.button.outline-light{border-color:#cbd4ce;color:#fff;background:transparent}.button.subtle{background:#fff;border-color:#d9dfd5;color:var(--green)}.button.danger-outline{border-color:#e8b8a9;background:#fff;color:#a13d2d}.button.wide{width:100%}.page{max-width:1180px;margin:0 auto;padding:28px 22px 90px}.hero{min-height:275px;border-radius:20px;background:linear-gradient(115deg,#243d34,#436354);color:#fff;padding:40px 48px;display:flex;justify-content:space-between;overflow:hidden;position:relative}.hero-content{z-index:1}.hero h1{font-size:clamp(34px,4vw,50px);margin:9px 0 12px}.hero h1 em{color:#f4d2a6;font-weight:400}.hero p{color:#dce6dd;max-width:490px}.hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:23px}.hero-art{position:absolute;bottom:37px;right:65px;width:275px;height:215px;opacity:.89}.art-book{position:absolute;bottom:7px;width:42px;height:178px;border-radius:4px 7px 2px 2px;box-shadow:inset -8px 0 10px rgba(0,0,0,.13);border-left:3px solid rgba(255,255,255,.15)}.art-book:before{content:'';position:absolute;top:23px;left:5px;right:5px;height:2px;background:rgba(255,255,255,.4)}.art-book:after{content:'';position:absolute;bottom:24px;left:5px;right:5px;height:2px;background:rgba(255,255,255,.4)}.art-book.a{left:0;background:#dfb184;height:160px}.art-book.b{left:44px;background:#b97a5f;height:195px}.art-book.c{left:89px;background:#a9b2a1;height:177px}.art-book.d{left:135px;background:#d9c9a6;height:200px}.art-book.e{left:185px;background:#a2745a;height:170px;transform:rotate(-13deg);transform-origin:bottom}.art-shelf{position:absolute;bottom:0;left:-18px;width:290px;height:11px;background:#c99c6d;border-radius:8px}.section-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin:34px 0 16px}.section-head h2{margin-top:6px}.text-link{border:0;background:none;color:#6e855f;font-weight:700;font-size:12px;padding:6px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.stat{background:var(--paper);border:1px solid var(--border);border-radius:14px;padding:23px;text-align:left;color:inherit;width:100%;transition:border-color .15s,box-shadow .15s,transform .15s}.stat:hover{border-color:#819f87;box-shadow:var(--shadow);transform:translateY(-2px)}.stat:active{transform:translateY(0)}.stat .stat-icon{font-size:20px;margin-bottom:11px}.stat strong{display:block;font:36px Georgia,serif;color:var(--green);line-height:1.1}.stat small{font-size:11px;color:var(--muted);font-weight:700}.dashboard-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:17px;margin-top:17px}.paper-card{background:var(--paper);border:1px solid var(--border);border-radius:15px;padding:25px}.card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px;gap:10px}.card-header h3{margin-top:5px}.year-bars{display:flex;flex-direction:column;gap:12px;padding-top:6px}.year-row{display:grid;grid-template-columns:45px 1fr 35px;gap:10px;align-items:center;font-size:12px}.bar-track{background:#edf0e9;height:13px;border-radius:10px;overflow:hidden}.bar-fill{background:linear-gradient(90deg,#6c957a,#315b46);height:100%;border-radius:10px}.mini-book{display:flex;gap:12px;align-items:center;padding:9px 0;border-bottom:1px solid var(--border)}.mini-book:last-child{border-bottom:0}.mini-cover{width:40px;height:54px;border-radius:3px;object-fit:cover;background:#e3dacb}.mini-book b{font-size:13px;display:block}.mini-book small{color:var(--muted);font-size:11px}.book-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:15px}.book-card{background:#fffdfa;border:1px solid var(--border);border-radius:13px;padding:12px;min-width:0;text-align:left;display:block;color:inherit;box-shadow:0 2px 6px rgba(0,0,0,.02)}.book-card:hover{border-color:#b8c5b7;transform:translateY(-2px)}.book-cover{height:185px;border-radius:7px;background:linear-gradient(135deg,#536b5d,#243d34);width:100%;object-fit:cover;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(0,0,0,.04)}.book-cover .fallback{font:20px Georgia,serif;color:#f5e7cb;padding:15px;text-align:center;line-height:1.15;overflow-wrap:anywhere}.book-cover .cover-spine{position:absolute;left:10px;top:7px;bottom:7px;border-left:2px solid #d4aa77;opacity:.5}.book-card .cover-img{height:185px;width:100%;object-fit:cover;border-radius:7px;background:#ddd7cd}.book-card b{display:block;margin-top:10px;font-size:12px;line-height:1.35;min-height:32px}.book-card small{display:block;color:var(--muted);font-size:11px;margin:3px 0 8px;line-height:1.25}.tag{display:inline-flex;padding:4px 8px;font-size:10px;font-weight:700;background:#edf2e9;color:#4c6b52;border-radius:50px;margin-right:3px;margin-top:3px}.tag.recommend{background:#f1ebd8;color:#886f3c}.tag.dnf{background:#f6e5e0;color:#955b50}.tag.reading{background:#e3ebf3;color:#4c708b}.tag.fav{background:#fce8b3;color:#8e6a20}.empty{color:var(--muted);background:#fffefa;border:1px dashed #ccd3c7;border-radius:14px;padding:27px;text-align:center;grid-column:1/-1}.page-title{display:flex;justify-content:space-between;align-items:end;gap:20px;margin:10px 0 26px}.page-title h1{margin:5px 0}.page-title p{margin:5px 0 0}.actions-row{display:flex;gap:8px}.filters{display:grid;grid-template-columns:minmax(220px,1.8fr) repeat(5,minmax(120px,1fr));gap:9px;background:#fffdfa;padding:13px;border:1px solid var(--border);border-radius:13px}.filters input,.filters select,input,select,textarea{border:1px solid #d9ded5;border-radius:9px;background:#fff;color:var(--ink);padding:11px;min-width:0;width:100%;outline:none}.filters input:focus,.filters select:focus,input:focus,select:focus,textarea:focus{border-color:#6c957a;box-shadow:0 0 0 2px #d7e6d7}.filters select{font-size:12px;padding:10px 6px}.search-box{display:flex;align-items:center;gap:8px}.search-box input{border:0;box-shadow:none!important;padding:7px}.search-box span{font-size:20px;color:#76927c}.results-line{display:flex;justify-content:space-between;align-items:center;margin:21px 0 14px;font-size:12px;color:var(--muted)}.recommend-choices{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:23px 0}.choice-card{background:#fffefa;border:1px solid var(--border);border-radius:14px;text-align:left;min-height:212px;padding:23px;display:flex;flex-direction:column;align-items:flex-start;color:inherit;gap:9px}.choice-card:hover{border-color:#819f87;background:#fbfaf5}.choice-icon{font-size:27px;line-height:1}.choice-card b{font:22px/1.2 Georgia,serif}.choice-card small{color:var(--muted);font-size:12px}.choice-arrow{margin-top:auto;color:#6e855f;font-weight:700;font-size:12px}.spark{color:#b58a48}.recommend-results{margin-top:20px}.rec-list{display:grid;gap:13px}.rec-item{display:grid;grid-template-columns:54px 1fr auto;gap:15px;align-items:start;padding:18px;background:#fffefa;border:1px solid var(--border);border-radius:12px}.rec-number{background:#e9eee6;color:#52715b;border-radius:9px;width:44px;height:44px;display:grid;place-items:center;font:22px Georgia,serif}.rec-item h3{font-size:21px}.rec-item p{margin:6px 0 9px;font-size:13px}.rec-item small{color:#9a7960}.settings-layout{display:grid;grid-template-columns:1.2fr .8fr;gap:15px}.settings-layout textarea{margin:14px 0 8px;resize:vertical}.stack-actions{display:flex;flex-direction:column;gap:10px;margin:20px 0}.stack-actions button{justify-content:flex-start}.settings-layout small{color:var(--muted)}.bottom-nav{position:fixed;bottom:0;left:0;right:0;z-index:10;background:#fffefa;border-top:1px solid var(--border);height:70px;display:flex;align-items:stretch;justify-content:center;padding-bottom:env(safe-area-inset-bottom)}.bottom-nav button{width:105px;border:0;background:transparent;color:#839087;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.bottom-nav button span{font-size:24px;line-height:1.2}.bottom-nav button small{font-size:10px;font-weight:700}.bottom-nav button.active{color:var(--green)}.chat-widget{position:fixed;bottom:82px;right:24px;z-index:20}.chat-toggle{background:var(--green);color:white;border:0;border-radius:99px;padding:12px 18px;font-size:12px;font-weight:700;box-shadow:0 6px 22px #13281d38;display:flex;gap:12px;align-items:center}.chat-toggle span{font-size:17px;color:#eac88e}.chat-panel{width:min(390px,calc(100vw - 28px));height:min(510px,calc(100dvh - 135px));border-radius:16px;background:#fffefa;border:1px solid var(--border);box-shadow:0 18px 45px #1f352b38;display:flex;flex-direction:column;overflow:hidden;margin-bottom:10px}.chat-header{background:var(--green);padding:15px 17px;color:#fff;display:flex;justify-content:space-between;align-items:start}.chat-header b,.chat-header small{display:block}.chat-header small{font-size:11px;opacity:.77}.chat-header button{background:transparent;border:0;color:#fff;font-size:26px}.chat-messages{padding:16px;flex:1;overflow:auto;display:flex;flex-direction:column;gap:10px}.chat-bubble{max-width:90%;border-radius:12px;padding:12px 14px;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.chat-bubble.ai{align-self:flex-start;background:#edf1e9;white-space:normal}.chat-bubble.ai p{margin:0 0 .7em;color:inherit}.chat-bubble.ai p:last-child{margin-bottom:0}.chat-bubble.ai ul,.chat-bubble.ai ol{margin:.4em 0 .75em;padding-left:1.4em}.chat-bubble.ai li{margin:.2em 0}.chat-bubble.ai ul:last-child,.chat-bubble.ai ol:last-child{margin-bottom:0}.chat-bubble.user{align-self:flex-end;background:#2f5440;color:#fff}.chat-entry{display:flex;padding:10px;border-top:1px solid var(--border);gap:7px}.chat-entry input{border:0;flex:1}.send-button{border:0;border-radius:8px;background:var(--green);color:#fff;padding:8px 13px}.login-screen{min-height:100dvh;display:grid;place-items:center;background:radial-gradient(ellipse at top left,#405a4e 0%,#223b32 70%);padding:20px}.login-card{background:#fffefa;border-radius:22px;padding:40px 36px;max-width:390px;width:100%;text-align:center;box-shadow:0 25px 85px #0003}.login-icon{font-size:40px;margin-bottom:6px}.login-card h1{font-size:43px;margin:10px 0}.login-card h1 em{color:#ad825c}.login-card p{margin-bottom:25px}.login-card form{text-align:left}.login-card label{display:block;font-size:12px;font-weight:700;margin:9px 0}.login-card input{text-align:center;letter-spacing:7px;font-size:23px;margin-bottom:13px}.login-card small{color:var(--muted);font-size:11px}.error{color:#b34d40!important;min-height:18px;font-size:12px}dialog{width:min(650px,calc(100vw - 18px));max-height:92dvh;overflow:auto;border:1px solid var(--border);border-radius:16px;padding:0;background:#fffefa;box-shadow:0 25px 80px #1115;color:var(--ink)}dialog::backdrop{background:#14291fd2;backdrop-filter:blur(3px)}.modal-header{position:sticky;top:0;background:#fffefa;z-index:2;padding:20px 23px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border)}.modal-header h2{font-size:24px}.close-button{font-size:25px;border:0;background:#f5f2ea;border-radius:9px;line-height:1;width:34px;height:34px}.modal-content{padding:21px 23px 24px}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}.field label{font-size:12px;font-weight:700;color:#5d6f60}.field small{font-size:11px;color:var(--muted)}.field textarea{resize:vertical}.span-all{grid-column:1/-1}.toggle-row{display:flex;align-items:center;gap:8px;min-height:44px}.toggle-row input{width:auto}.form-actions{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:20px}.cover-preview{width:94px;height:125px;object-fit:cover;background:#e8e1d3;border-radius:7px}.book-form-top{display:flex;gap:17px;align-items:center;margin-bottom:16px}.muted{color:var(--muted)}.search-results{display:grid;gap:7px;max-height:350px;overflow:auto;margin-top:12px}.search-result{display:flex;gap:11px;align-items:center;text-align:left;border:1px solid var(--border);background:#fff;border-radius:9px;padding:7px}.search-result img{width:37px;height:52px;object-fit:cover;border-radius:3px;background:#ddd}.search-result strong{display:block;font-size:13px}.search-result small{color:var(--muted)}.tabs{display:flex;border-bottom:1px solid var(--border);gap:10px;margin-bottom:17px}.tabs button{border:0;background:none;padding:9px 12px;color:var(--muted);font-weight:700}.tabs button.active{color:var(--green);border-bottom:2px solid var(--green)}.image-preview{width:100%;max-height:260px;object-fit:contain;border-radius:10px;background:#f2f1ea}.notice{background:#eef2ea;border-radius:9px;padding:12px;font-size:13px}.scan-result{background:#f6f2e8;border:1px solid var(--border);padding:16px;border-radius:11px;margin-top:12px}.scan-result h3{margin:5px 0}.csv-map{display:grid;grid-template-columns:1fr 1fr;gap:10px}.csv-map label{font-size:11px}.csv-map select{font-size:12px;padding:8px}.csv-preview{max-height:190px;overflow:auto;font-size:12px;background:#f7f6f0;padding:12px;border-radius:9px}.tiny-note{font-size:11px;color:var(--muted)}#toast{position:fixed;bottom:88px;left:50%;transform:translateX(-50%);z-index:80;background:#253e34;color:white;padding:12px 19px;border-radius:10px;box-shadow:0 9px 22px #0002;display:none;max-width:min(90vw,520px);text-align:center;font-size:13px}#toast.show{display:block}@media(max-width:980px){.book-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.filters{grid-template-columns:repeat(3,1fr)}.filters .search-box{grid-column:1/-1}.recommend-choices{grid-template-columns:repeat(2,1fr)}.hero-art{opacity:.3;right:10px}}@media(max-width:690px){.topbar{height:67px;padding:0 14px}.brand b{font-size:16px}.brand span{font-size:8px}.brand-mark{width:37px;height:37px;font-size:19px}.header-actions{gap:6px}.page{padding:16px 13px 110px}.hero{border-radius:15px;padding:27px 22px;min-height:280px}.hero h1{font-size:37px}.hero-art{opacity:.17;right:-90px;bottom:0}.hero-actions{flex-direction:column;align-items:start}.hero-actions .button{font-size:12px}.stats-grid{grid-template-columns:repeat(2,1fr);gap:9px}.stat{padding:16px}.stat strong{font-size:30px}.dashboard-grid,.settings-layout{grid-template-columns:1fr}.paper-card{padding:19px}.book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.book-cover,.book-card .cover-img{height:178px}.section-head{margin:28px 0 12px}.section-head h2{font-size:24px}.page-title{align-items:start;flex-direction:column;gap:12px}.page-title h1{font-size:38px}.filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:9px;gap:7px}.filters select{font-size:11px}.recommend-choices{gap:10px}.choice-card{min-height:185px;padding:15px}.choice-card b{font-size:18px}.choice-icon{font-size:22px}.rec-item{grid-template-columns:38px 1fr}.rec-item .button{grid-column:2;justify-self:start}.rec-number{width:34px;height:34px}.chat-widget{bottom:76px;right:11px}.chat-toggle{font-size:11px;padding:10px 12px}.chat-panel{height:min(470px,calc(100dvh - 135px))}.field-grid{grid-template-columns:1fr}.span-all{grid-column:1}.modal-content{padding:15px}.modal-header{padding:16px}.book-form-top{align-items:start}.actions-row{flex-wrap:wrap}}@media(min-width:1050px){.bottom-nav{position:static;height:62px;display:flex;justify-content:center}.app{padding-bottom:0}.page{padding-bottom:50px}.chat-widget{bottom:24px}}
/* Emily's Bookshelf v1.0.2 */
.app-back{font-size:12px;font-weight:700;color:var(--green);white-space:nowrap;padding:9px 8px;margin-right:6px}
.dashboard-ai-note{margin:4px 0 16px;color:var(--muted);font-size:13px;line-height:1.5}
#dashboard-tbr.book-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.ai-pick{background:#fffefa;border:1px solid var(--border);border-radius:15px;padding:16px;display:grid;grid-template-columns:30px 75px minmax(0,1fr);gap:13px;box-shadow:0 2px 10px #23382b08;align-items:start}
.ai-pick-rank{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:var(--green);color:#fff;font:15px Georgia,serif}
.ai-pick-cover{background:transparent;border:0;padding:0;width:75px;cursor:pointer}
.ai-pick-cover .cover-img,.ai-pick-cover .book-cover{width:75px;height:108px;object-fit:cover;border-radius:6px}
.ai-pick-cover .book-cover .fallback{font-size:12px;padding:6px}
.ai-pick-body{display:flex;flex-direction:column;gap:6px;min-width:0}
.ai-pick-body>b{font:18px Georgia,serif;color:var(--green)}
.ai-pick-body>small{color:var(--muted);font-size:12px}
.ai-pick-body .tag{align-self:start}
.ai-pick-body>p{font-size:13px;line-height:1.5;margin:5px 0 0}
.ai-pick-body .text-link{align-self:start;padding:0;margin-top:3px}
.retailer-links{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0 2px;align-items:center}
.retailer-links .button{font-size:11px;padding:8px 10px;white-space:nowrap}
.retailer-unavailable{font-size:11px;padding:8px 9px;border:1px dashed var(--border);border-radius:7px;color:var(--muted)}
.ai-pick .retailer-links{gap:5px}
.ai-pick .retailer-links .button{padding:6px 8px}
.ai-pick .tiny-note{font-size:10px}
.retailer-edit{margin:14px 0;padding:12px 14px;border:1px solid var(--border);border-radius:10px}
.retailer-edit summary{cursor:pointer;font-size:12px;font-weight:700;color:var(--green)}
.retailer-edit .field{margin-top:10px}
.conversion-summary{display:grid;grid-template-columns:repeat(2,1fr);gap:7px;margin:14px 0}
.conversion-summary b{background:#eef2ea;border:1px solid var(--border);border-radius:9px;padding:10px;font-size:12px}
.preview-table-wrap{max-height:260px;overflow:auto;border:1px solid var(--border);border-radius:10px}
.preview-table{border-collapse:collapse;width:100%;font-size:12px}
.preview-table th,.preview-table td{padding:9px;text-align:left;border-bottom:1px solid var(--border)}
.preview-table th{position:sticky;top:0;background:#f4f5ed;color:var(--green)}
.preview-table small{display:block;color:var(--muted)}
.import-issues{max-height:180px;overflow:auto;font-size:12px;padding:7px;color:var(--muted)}
.import-issues>div{border-bottom:1px solid var(--border);padding:5px 0}
.chat-camera{display:grid;place-items:center;font-size:21px;cursor:pointer;flex:0 0 34px;border:1px solid var(--border);border-radius:8px}
.chat-photo-indicator{padding:8px 12px;border-top:1px solid var(--border);background:#f4f5ed;color:var(--green);font-size:12px}
.chat-proposal{border:1px solid #bad1bb;background:#f2f7ef;border-radius:10px;margin-top:10px;padding:12px;color:#254532;line-height:1.4}
.chat-proposal>ul{padding-left:17px;margin:8px 0 12px}
.chat-proposal li{font-size:12px;margin:6px 0;overflow-wrap:anywhere}
.proposal-buttons{display:flex;gap:8px;flex-wrap:wrap}
.chat-missing{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.chat-missing .button{white-space:normal;text-align:left;line-height:1.3}
.chat-bubble.ai{max-width:100%}
.chat-widget .chat-panel{height:min(610px,calc(100dvh - 140px))}
@media(max-width:900px){#dashboard-tbr.book-grid{grid-template-columns:1fr}}
@media(max-width:640px){
 .app-back{font-size:11px;margin-right:3px}
 .topbar .brand-mark{height:35px;width:35px;font-size:17px}
 .topbar .brand b{font-size:15px}
 .ai-pick{grid-template-columns:26px 65px minmax(0,1fr);padding:12px;gap:9px}
 .ai-pick-cover,.ai-pick-cover .cover-img,.ai-pick-cover .book-cover{width:65px}
 .ai-pick-cover .cover-img,.ai-pick-cover .book-cover{height:96px}
 .ai-pick-body>b{font-size:16px}
 .conversion-summary{grid-template-columns:1fr 1fr}
 .preview-table{min-width:560px}
 .chat-camera{min-height:35px}
 .chat-widget .chat-panel{height:min(68dvh,650px)}
}

/* v1.0.5: featured recommendations are full-width, unboxed rows, not browser-default buttons. */
#favorites-list{display:grid;grid-template-columns:minmax(0,1fr);gap:0;width:100%;}
#favorites-list .mini-book{appearance:none;-webkit-appearance:none;background:transparent;border:0;border-bottom:1px solid var(--border);border-radius:0;box-shadow:none;display:flex;align-items:center;gap:16px;width:100%;min-width:0;margin:0;padding:14px 2px;text-align:left;color:var(--ink);cursor:pointer;transition:background-color .15s ease,padding-left .15s ease;}
#favorites-list .mini-book:first-child{padding-top:8px}
#favorites-list .mini-book:last-child{border-bottom:0;padding-bottom:4px}
#favorites-list .mini-book:hover{background:#f7f5ef;padding-left:10px}
#favorites-list .mini-book:focus-visible{outline:2px solid var(--green);outline-offset:3px;border-radius:6px}
#favorites-list .mini-cover{display:block;flex:none;width:58px;height:82px;object-fit:cover;object-position:center;border-radius:5px;background:#e9e4da;box-shadow:0 3px 12px rgba(22,45,34,.12)}
#favorites-list .mini-book-details{display:flex;flex:1;flex-direction:column;justify-content:center;min-width:0;gap:5px}
#favorites-list .mini-book-details b{font-size:15px;font-weight:700;line-height:1.35;overflow-wrap:anywhere}
#favorites-list .mini-book-details small{font-size:13px;color:var(--muted);line-height:1.35;overflow-wrap:anywhere}
#favorites-list .mini-book-star{flex:none;align-self:center;color:#b47d45;font-size:19px;line-height:1;padding-right:5px}
@media (max-width:690px){#favorites-list .mini-book{gap:12px;padding:12px 0}#favorites-list .mini-cover{width:48px;height:69px}#favorites-list .mini-book-details b{font-size:14px}}

/* v1.1.0: purposeful mobile-first refinements, particularly iPhone 17 Safari. */
html{overflow-x:hidden;-webkit-text-size-adjust:100%}
body,.app{max-width:100%;overflow-x:clip}
button,input,textarea,select{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.field input,.field select,.field textarea,#chat-input{font-size:16px}
.topbar{padding-top:env(safe-area-inset-top);height:auto;min-height:68px}
.bottom-nav{height:calc(66px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom)}
.chat-widget{bottom:calc(76px + env(safe-area-inset-bottom))}
.chat-panel{max-width:calc(100vw - 22px);overflow:hidden}
.chat-entry{min-width:0;gap:5px}
.chat-entry #chat-input{flex:1;min-width:0;max-width:100%;border-radius:9px}
.chat-entry .chat-camera{flex:0 0 35px;font-size:20px;height:42px;min-height:42px}
.chat-entry .send-button{min-width:39px;min-height:42px}
#modal{max-width:min(96vw,680px);max-height:calc(100dvh - env(safe-area-inset-top) - 30px);overflow-y:auto}
#modal-body,.modal-content{max-width:100%;overflow-wrap:anywhere}
.add-options{display:grid;gap:10px;margin:16px 0 4px}
.add-option{width:100%;display:grid;grid-template-columns:46px minmax(0,1fr) 18px;gap:13px;align-items:center;text-align:left;border:1px solid var(--border);border-radius:12px;background:#fffefa;padding:16px 13px;min-height:86px;color:var(--ink);cursor:pointer}
.add-option:hover,.add-option:focus-visible{background:#eef3ec;border-color:#9bac9b}
.add-option-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:10px;color:var(--green);background:#edf2ec;font-size:24px}
.add-option b,.add-option small{display:block;line-height:1.3}
.add-option b{font-size:15px}.add-option small{font-size:12px;color:var(--muted);margin-top:4px}
.scan-options{display:flex;gap:9px;flex-wrap:wrap;margin:14px 0}
.scan-options label{min-height:45px;cursor:pointer;display:inline-flex;align-items:center}
.recent-section{margin-top:24px}.section-head.compact{margin:0 0 8px}.section-head.compact h2{font-size:23px}
.recent-strip{display:flex;gap:10px;overflow-x:auto;padding:5px 1px 12px;scroll-snap-type:x proximity}
.recent-book{flex:0 0 clamp(150px,32%,220px);min-width:0;display:flex;align-items:center;gap:9px;background:#fffefa;border:1px solid var(--border);border-radius:10px;padding:8px;text-align:left;scroll-snap-align:start}
.recent-book img{flex:0 0 37px;width:37px;height:52px;object-fit:cover;border-radius:4px}
.recent-book span{min-width:0}.recent-book b,.recent-book small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.recent-book b{font-size:12px}.recent-book small{font-size:11px;color:var(--muted);margin-top:4px}
.related-books{border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin:17px 0;padding:12px 0}
.related-books .card-header{display:flex;justify-content:space-between;align-items:center;gap:8px}
.related-books .card-header h3{margin:3px 0;font-size:18px}
.similar-results{display:grid;gap:7px;margin-top:10px}
.similar-row{display:flex;flex-direction:column;align-items:flex-start;gap:3px;text-align:left;padding:11px 12px;background:#fbfaf4;border:1px solid var(--border);border-radius:8px;min-width:0}
.similar-row b{color:var(--green)}.similar-row small{font-size:11px;color:var(--muted)}.similar-row span{font-size:12px;line-height:1.4}
.dna-list{display:grid;gap:9px;margin:12px 0}
.dna-insight{display:flex;justify-content:space-between;align-items:start;gap:10px;padding:11px;border:1px solid var(--border);border-radius:9px;background:#fcfbf7}
.dna-insight>div{min-width:0}.dna-insight b,.dna-insight small,.dna-kind{display:block}.dna-insight b{font-size:13px;line-height:1.4}.dna-insight small{color:var(--muted);margin-top:5px;font-size:11px;line-height:1.4}
.dna-kind{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:#657c6c;margin-bottom:5px}
.dna-insight .text-link{font-size:11px;white-space:nowrap}
.post-read-prompt{line-height:1.6}
.duplicate-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}
.duplicate-pair article{border:1px solid var(--border);padding:12px;border-radius:10px;background:#fbfaf4;min-width:0;overflow-wrap:anywhere}
.duplicate-pair article>b,.duplicate-pair article>small{display:block}
.duplicate-pair article>b{font:17px Georgia,serif;color:var(--green)}
.duplicate-pair article>small{font-size:12px;color:var(--muted);margin-top:5px}
.duplicate-pair article>p{font-size:12px;margin:10px 0}
.toast-undo{font:inherit;color:#fff;background:transparent;border:1px solid #ffffff90;border-radius:7px;padding:4px 10px;margin-left:12px;cursor:pointer;text-decoration:underline}
@media(max-width:690px){
 .page{padding-bottom:calc(118px + env(safe-area-inset-bottom))}
 .topbar{gap:5px;padding-left:10px;padding-right:10px}
 .header-actions .button{padding:8px 9px;min-height:42px}
 .bottom-nav button{min-height:48px}
 .book-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .recent-book{flex-basis:165px}
 .duplicate-pair{grid-template-columns:1fr}
 .modal-content{padding:14px}
 .modal-header{position:sticky;top:0;background:var(--paper,#fffefa);z-index:2}
 .chat-widget .chat-panel{height:min(68dvh,610px);max-height:calc(100dvh - 105px - env(safe-area-inset-bottom));width:calc(100vw - 22px)}
 .chat-entry{padding-left:5px;padding-right:5px}
 .chat-entry #chat-input{padding-left:8px;padding-right:8px}
 .chat-toggle{max-width:calc(100vw - 22px)}
}
@media(min-width:1050px){.chat-widget{bottom:24px}.bottom-nav{height:62px;padding-bottom:0}}

.dna-actions{display:flex;flex-direction:column;align-items:flex-end;gap:3px;flex-shrink:0}
.recommendation-outcome{margin:12px 0;padding:13px;background:#f7f4e9;border:1px solid var(--border);border-radius:10px}
.recommendation-outcome p{margin:5px 0 10px;font-size:13px}
.book-talk-action{margin:5px 0 14px}
.past-book-chats{border:1px solid var(--border);border-radius:8px;padding:10px 12px;margin:12px 0}
.past-book-chats summary{cursor:pointer;color:var(--green);font-size:12px;font-weight:700}
.past-interview{padding:12px 0;border-bottom:1px solid var(--border)}
.past-interview:last-child{border-bottom:0}
.past-interview p{font-size:12px;line-height:1.45;margin:6px 0}

/* v1.1.1: permanent reading queue, visually distinct from active reading. */
.reading-shelf-section{margin:26px 0 34px}
.reading-shelf{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.reading-shelf-group{min-width:0;border:1px solid var(--border);border-radius:15px;background:var(--paper);padding:16px}
.reading-shelf-group h3{font-size:19px;margin:0 0 10px}
.queue-count{font:600 12px/1 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:var(--sage);color:var(--green);padding:4px 8px;border-radius:12px;margin-left:6px}
.reading-shelf-book{display:flex;align-items:center;gap:9px;border-top:1px solid var(--border);padding:10px 0;min-width:0}
.reading-shelf-book:first-of-type{border-top:0}
.reading-shelf-open{display:flex;align-items:center;gap:11px;border:0;padding:0;background:transparent;color:var(--ink);text-align:left;flex:1;min-width:0}
.reading-shelf-open img{width:40px;height:58px;object-fit:cover;border-radius:5px;flex:none}
.reading-shelf-open span{min-width:0;flex:1}.reading-shelf-open b,.reading-shelf-open small{display:block;overflow-wrap:anywhere;line-height:1.4}
.reading-shelf-open b{font-size:13px}.reading-shelf-open small{font-size:12px;color:var(--muted)}
.reading-shelf-book>.button{flex:none;min-height:36px}
.queue-actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin-top:8px}
.queue-actions .button{min-height:38px}
.tag.queued{background:#e5ede3;color:#2b5944}
.book-queue-option{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px;border:1px solid var(--border);background:#f9f8f3;border-radius:10px;margin:15px 0}
.book-queue-option div{display:flex;flex-direction:column;gap:4px;min-width:0}
.book-queue-option small{font-size:12px;color:var(--muted)}
.queue-matches{display:grid;gap:8px;margin-top:12px}
@media(max-width:690px){.reading-shelf{grid-template-columns:1fr}.reading-shelf-section{margin:20px 0 26px}.reading-shelf-book>.button{padding:8px 10px}.book-queue-option{flex-direction:column;align-items:stretch}.book-queue-option button{align-self:flex-start}}
