:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;color:#26223a;background:#f8f7fd;font-synthesis:none;font-size:15px;--ink:#26223a;--muted:#8a849c;--muted2:#aaa4bb;--bg:#f8f7fd;--card:#fff;--stroke:#eeecf5;--primary:#7c3aed;--primary-dark:#6025bd;--pale:#f2ebff;--shadow:0 14px 45px rgba(48,31,105,.045);--accent:#f7efff;--input:#faf9fd}
*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.48;cursor:not-allowed}a{color:inherit;text-decoration:none}svg{display:inline-block;flex-shrink:0;vertical-align:middle}input,textarea,select{outline:none;min-width:0}input:focus,textarea:focus,select:focus{border-color:#a78bfa!important;box-shadow:0 0 0 4px rgba(139,92,246,.11)!important}button:focus-visible,a:focus-visible,[role=button]:focus-visible{outline:3px solid #c4b5fd;outline-offset:3px}::selection{background:#ddd1ff}
body.dark{--ink:#edeaf8;--muted:#aea7c2;--muted2:#8f869f;--bg:#151422;--card:#211f32;--stroke:#363145;--pale:#35274f;--shadow:none;--accent:#332544;--input:#292639;color:var(--ink);background:var(--bg)}
#app{min-height:100vh}.boot{min-height:100vh;display:flex;align-items:center;justify-content:center;flex-direction:column;color:var(--primary);font-weight:700;gap:14px}.boot .brandmark{font-size:32px;background:#7c3aed;color:white;display:grid;place-items:center;border-radius:22px;width:66px;height:66px}
.app-shell{display:flex;min-height:100vh}.sidebar{width:246px;background:var(--card);border-right:1px solid var(--stroke);padding:30px 16px 22px;position:fixed;left:0;top:0;bottom:0;display:flex;flex-direction:column;z-index:20}.logo{display:flex;align-items:center;gap:10px;font-size:25px;font-weight:850;letter-spacing:-1.45px;color:var(--ink)}.logo .logo-icon{width:39px;height:39px;border-radius:13px;background:linear-gradient(135deg,#ac6aff,#6d28d9);color:#fff;display:grid;place-items:center;box-shadow:0 7px 17px #7c3aed30}.logo-dot{color:var(--primary)}.side-top{padding:0 13px 36px}.side-label{color:var(--muted2);font-weight:800;font-size:10px;letter-spacing:1.7px;padding:0 17px;margin:0 0 12px}.side-nav{display:flex;flex-direction:column;gap:4px}.nav-item{display:flex;align-items:center;gap:13px;border:0;background:transparent;color:var(--muted);padding:12px 15px;border-radius:13px;width:100%;text-align:left;font-weight:650;font-size:13px;transition:.18s}.nav-item:hover{background:var(--input);color:var(--primary)}.nav-item.active{background:var(--pale);color:var(--primary);font-weight:800}.nav-item .nav-ic{width:21px;height:21px}.sidebar-bottom{margin-top:auto}.side-challenge{padding:18px;border-radius:18px;background:linear-gradient(142deg,#f5eaff,#fef2f9);color:#4a2e75;margin:8px 5px 20px;position:relative;overflow:hidden}.side-challenge:after{content:"✦";position:absolute;right:-7px;top:-25px;font-size:95px;color:#9b5af51c}.side-challenge h4{margin:0 0 6px;font-size:13px}.side-challenge p{font-size:11px;margin:0 0 12px;color:#806a9e;line-height:1.5}.side-mini{display:flex;justify-content:space-between;align-items:center;font-size:11px;font-weight:700;margin-bottom:6px}.progress{height:8px;background:#eae4f4;border-radius:20px;overflow:hidden}.progress>span{display:block;height:100%;background:linear-gradient(90deg,#8b5cf6,#be78fa);border-radius:20px;transition:width .3s}.profile-mini{display:flex;gap:9px;align-items:center;padding:10px 9px;border-top:1px solid var(--stroke)}.avatar{border-radius:50%;background:linear-gradient(135deg,#e9d5ff,#d8c5fc);color:#7c3aed;font-weight:850;display:grid;place-items:center;flex-shrink:0;width:37px;height:37px;font-size:15px}.avatar.big{width:75px;height:75px;font-size:29px}.profile-mini .pm-name{font-size:12px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-mini .pm-user{font-size:10px;color:var(--muted);margin-top:3px}.profile-mini .pm-text{min-width:0;flex:1}.main{margin-left:246px;width:calc(100% - 246px);min-width:0}.content{max-width:1310px;margin:auto;padding:30px 42px 90px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px;gap:15px}.page-location{font-weight:650;color:var(--muted);font-size:13px}.crumb{color:var(--primary)}.top-actions{display:flex;gap:11px;align-items:center}.top-search{display:flex;align-items:center;gap:11px;width:280px;border:1px solid var(--stroke);background:var(--card);border-radius:13px;padding:11px 14px;color:var(--muted);cursor:pointer;font-size:12px}.top-search:hover{border-color:#cbb8f8}.ic-button{height:40px;width:40px;display:grid;place-items:center;border:1px solid var(--stroke);border-radius:12px;background:var(--card);color:var(--muted);cursor:pointer}.ic-button:hover{color:var(--primary);background:var(--pale)}.mobile-head,.mobile-nav{display:none}.eyebrow{font-size:11px;letter-spacing:1.3px;text-transform:uppercase;color:var(--primary);font-weight:800;margin-bottom:11px}.page-head{margin-bottom:23px}.page-head.flex-head{display:flex;align-items:center;justify-content:space-between;gap:16px}.h1{font-size:30px;letter-spacing:-1.15px;line-height:1.18;font-weight:850;margin:0 0 8px}.subhead{color:var(--muted);margin:0;font-size:13px;line-height:1.65}.h2{font-size:18px;font-weight:800;letter-spacing:-.5px;margin:0}.h3{font-size:15px;font-weight:800;letter-spacing:-.2px;margin:0}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin:31px 0 16px}.muted{color:var(--muted)}.small{font-size:12px}.tiny{font-size:11px}.bold{font-weight:800}.purple{color:var(--primary)}.inline-icon{vertical-align:-3px}.btn{border:none;border-radius:12px;padding:12px 16px;display:inline-flex;justify-content:center;align-items:center;gap:8px;font-size:12px;font-weight:800;white-space:nowrap;transition:transform .15s,background .15s,color .15s;min-height:40px}.btn:hover:not(:disabled){transform:translateY(-1px)}.btn-primary{background:#7c3aed;color:#fff;box-shadow:0 7px 17px #7c3aed1e}.btn-primary:hover{background:#692ccf}.btn-soft{background:var(--pale);color:var(--primary)}.btn-white{background:#fff;color:#6834bc}.btn-outline{background:var(--card);color:var(--ink);border:1px solid var(--stroke)}.btn-danger{background:#fff0f2;color:#d43b59}.btn-sm{padding:8px 12px;min-height:32px;font-size:11px;border-radius:9px}.btn-icon{padding:8px;min-width:36px;min-height:36px}.btn-block{width:100%}.link-button{border:none;background:none;color:var(--primary);font-weight:800;font-size:12px;padding:5px;cursor:pointer}.link-button:hover{text-decoration:underline}.hero{min-height:223px;border-radius:23px;background:linear-gradient(115deg,#6d32d5 0%,#8a4de9 58%,#b97aff 100%);position:relative;color:#fff;overflow:hidden;display:flex;align-items:center;padding:31px 36px;box-shadow:0 15px 35px #7c3aed16}.hero:before{content:"";position:absolute;width:360px;height:360px;border-radius:50%;border:1px solid #ffffff2b;right:-45px;top:-145px;box-shadow:0 0 0 55px #ffffff0a,0 0 0 110px #ffffff09}.hero:after{content:"✦";font-size:70px;position:absolute;right:49px;top:17px;color:#ffffff6a}.hero-inner{position:relative;z-index:2;max-width:65%}.hero .hello{font-size:12px;opacity:.87;display:flex;gap:8px;align-items:center;margin-bottom:12px}.hero h1{font-size:30px;line-height:1.2;letter-spacing:-1px;max-width:490px;margin:0 0 12px;font-weight:850}.hero p{opacity:.8;font-size:12px;max-width:370px;line-height:1.6;margin:0 0 19px}.hero-buttons{display:flex;gap:10px;flex-wrap:wrap}.hero-art{position:absolute;right:10%;bottom:-43px;transform:rotate(-12deg);z-index:1}.hero-art .art-book{position:absolute;width:93px;height:136px;border-radius:7px 14px 14px 7px;box-shadow:6px 10px 20px #3b1b6d66;border-left:6px solid #fff4;transform-origin:center bottom}.hero-art .a{background:linear-gradient(135deg,#ffdc85,#e5a840);bottom:20px;right:-12px;transform:rotate(-17deg)}.hero-art .b{background:linear-gradient(135deg,#b3f1e7,#4dc3af);bottom:18px;right:65px;transform:rotate(1deg)}.hero-art .c{background:linear-gradient(135deg,#ffc4d5,#fc76b0);bottom:20px;right:142px;transform:rotate(22deg)}.hero-art .art-book:before{content:"";position:absolute;left:13px;right:15px;top:19px;height:3px;background:#fff8;border-radius:3px;box-shadow:0 12px 0 #ffffff72,0 24px 0 #ffffff55}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-top:21px}.stat-card{background:var(--card);border:1px solid var(--stroke);border-radius:17px;padding:17px 18px;display:flex;align-items:center;gap:14px;min-width:0;box-shadow:var(--shadow)}.stat-icon{width:43px;height:43px;display:grid;place-items:center;border-radius:13px;flex-shrink:0}.stat-icon.purple{background:#f1eaff;color:#7c3aed}.stat-icon.pink{background:#ffeaf3;color:#e3528c}.stat-icon.mint{background:#def9f2;color:#1ba987}.stat-icon.orange{background:#fff3db;color:#dc9c34}.stat-num{font-size:23px;font-weight:850;line-height:1.15;letter-spacing:-.6px}.stat-label{font-size:11px;color:var(--muted);margin-top:5px}.dashboard-cols{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(285px,1fr);gap:21px;align-items:start}.card{background:var(--card);border:1px solid var(--stroke);border-radius:18px;padding:20px;box-shadow:var(--shadow)}.book-row{display:flex;gap:17px;align-items:center;padding:15px 0;border-bottom:1px solid var(--stroke);min-width:0}.book-row:first-child{padding-top:0}.book-row:last-child{border-bottom:0;padding-bottom:0}.book-row-body{flex:1;min-width:0}.book-row .book-cover{width:66px;height:94px;flex-shrink:0}.book-row-title{font-size:13px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 0 6px}.book-row-author{font-size:11px;color:var(--muted);margin-bottom:11px}.book-row .progress{margin-bottom:6px}.row-between{display:flex;align-items:center;justify-content:space-between;gap:12px}.book-cover{border-radius:8px;overflow:hidden;position:relative;background:linear-gradient(140deg,#7152b0,#2e3056);box-shadow:0 7px 17px #23203921;color:#fff;display:flex;align-items:center;justify-content:center;text-align:center;isolation:isolate}.book-cover img{width:100%;height:100%;object-fit:cover;position:absolute;inset:0;z-index:1}.book-cover .cover-abstract{position:absolute;inset:0;background:radial-gradient(circle at 80% 20%,#ffffff45,transparent 38%),repeating-linear-gradient(135deg,#ffffff10 0 2px,transparent 2px 19px)}.book-cover .cover-abstract:after{content:"✦";position:absolute;right:10px;bottom:15px;font-size:32px;color:#ffffff50}.book-cover .cover-text{font-weight:800;font-family:Georgia,serif;font-size:clamp(9px,1.15vw,15px);padding:12px;line-height:1.2;position:relative;z-index:0;overflow-wrap:anywhere}.book-cover:hover{box-shadow:0 11px 24px #23203936}.goal-title{display:flex;align-items:center;gap:9px;margin-bottom:16px}.goal-count{font-size:28px;font-weight:850;letter-spacing:-.7px;margin:0 0 10px}.goal-count span{font-size:13px;color:var(--muted);font-weight:500}.goal-bar{height:9px;background:var(--pale);border-radius:12px;overflow:hidden;margin:13px 0}.goal-bar span{height:100%;display:block;background:linear-gradient(90deg,#8b5cf6,#e77bb1);border-radius:10px}.goal-box{background:linear-gradient(145deg,#f3edff,#fff7fb);border-radius:15px;padding:17px;color:#3b2a61;position:relative;overflow:hidden}.goal-box:after{content:"✦";color:#a48bf441;font-size:100px;position:absolute;right:-10px;top:-35px}.dark .goal-box,.dark .side-challenge{background:linear-gradient(145deg,#39294e,#2e243f);color:#eee5ff}.dark .goal-box p,.dark .side-challenge p{color:#c3b0d8}.quote-box{margin-top:17px;padding:17px;border-radius:15px;background:var(--input);border:1px solid var(--stroke)}.quote-box blockquote{font-family:Georgia,serif;font-style:italic;font-size:14px;line-height:1.65;margin:9px 0;color:var(--ink)}.chip{display:inline-flex;align-items:center;gap:5px;border-radius:20px;background:var(--pale);color:var(--primary);padding:5px 10px;font-weight:750;font-size:10px}.chip.mint{background:#e2f8f0;color:#0b9677}.chip.pink{background:#ffecf4;color:#c94277}.chip.orange{background:#fff2df;color:#bb842c}.chip.gray{background:var(--input);color:var(--muted)}
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:22px}.field{background:var(--card);border:1px solid var(--stroke);border-radius:12px;padding:12px 13px;color:var(--ink);font-size:12px;width:100%}.field::placeholder{color:var(--muted2)}.field-select{appearance:none;padding-right:30px;background:var(--card)}.search-field{display:flex;align-items:center;gap:10px;padding:0 13px;background:var(--card);border:1px solid var(--stroke);border-radius:12px;flex:1;min-width:180px;color:var(--muted)}.search-field .field{border:none;box-shadow:none!important;padding:12px 0;background:none}.search-field:focus-within{border-color:#a78bfa;box-shadow:0 0 0 4px #8b5cf619}.toggle-group{display:flex;gap:5px;flex-wrap:wrap}.toggle-group .filter{padding:9px 12px;border:1px solid var(--stroke);background:var(--card);color:var(--muted);border-radius:10px;font-size:11px;font-weight:750}.toggle-group .filter.active{background:var(--pale);color:var(--primary);border-color:transparent}.books-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(158px,1fr));gap:17px}.book-tile{background:var(--card);border:1px solid var(--stroke);border-radius:16px;padding:13px;min-width:0;cursor:pointer;transition:transform .16s,box-shadow .16s}.book-tile:hover{transform:translateY(-3px);box-shadow:0 10px 25px #3d2a7815}.book-tile .book-cover{width:100%;height:205px;margin-bottom:12px;border-radius:9px}.book-tile h3{font-size:12px;line-height:1.45;margin:0 0 4px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:34px}.book-tile .author{font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:18px}.book-tile .progress{margin-top:10px;height:6px}.tile-footer{display:flex;justify-content:space-between;gap:6px;align-items:center;margin-top:9px}.rating{color:#e2a82c;font-size:12px;font-weight:750}.empty{text-align:center;background:var(--card);border:1px dashed #cbbcf2;border-radius:19px;padding:45px 22px;color:var(--muted)}.empty .empty-icon{width:60px;height:60px;border-radius:18px;background:var(--pale);color:var(--primary);display:grid;place-items:center;margin:0 auto 14px}.empty h3{color:var(--ink);margin:0 0 7px}.empty p{font-size:12px;line-height:1.6;margin:0 0 18px}.library-list .book-row{padding:14px}.library-list{padding:0 15px}.discover-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:15px}.discover-card{background:var(--card);border:1px solid var(--stroke);padding:12px;border-radius:16px}.discover-card .book-cover{height:180px;margin-bottom:12px}.discover-card h3{font-size:12px;margin:0 0 5px;line-height:1.4;min-height:33px}.discover-card .author{font-size:10px;color:var(--muted);min-height:28px}.moods{display:flex;gap:9px;flex-wrap:wrap}.mood{border-radius:13px;padding:12px 16px;display:flex;align-items:center;gap:8px;font-size:12px;font-weight:750;border:1.5px solid transparent;background:var(--card);color:var(--ink);cursor:pointer}.mood.selected{border-color:#ad8aff;background:var(--pale);color:var(--primary)}.recommend-box{background:linear-gradient(135deg,#eee8ff,#faecf4);border-radius:17px;padding:23px;display:flex;gap:20px;align-items:center;color:#4a2e75}.dark .recommend-box{background:linear-gradient(135deg,#3c2a5b,#4a2a43);color:#f0e5ff}.activity-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:19px}.heatmap{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin:18px 0 6px}.heat-cell{aspect-ratio:1;max-height:46px;border-radius:9px;background:var(--input);display:grid;place-items:center;font-size:11px;color:var(--muted)}.heat-cell.on1{background:#e2d5fc;color:#6e45a6}.heat-cell.on2{background:#bb9cf3;color:#fff}.heat-cell.on3{background:#8251d8;color:#fff}.weekday-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:7px;text-align:center;font-size:10px;color:var(--muted);margin:12px 0}.bar-chart{display:flex;height:160px;align-items:flex-end;gap:12px;margin:21px 0 2px}.bar-month{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:7px;height:100%}.bar-column{width:min(33px,100%);border-radius:7px 7px 0 0;background:linear-gradient(#ae7cf7,#7950d4);min-height:3px;transition:height .3s}.bar-label{font-size:10px;color:var(--muted)}.badge-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.award{padding:16px 8px;border-radius:14px;text-align:center;background:var(--input);border:1px solid var(--stroke);display:flex;flex-direction:column;align-items:center;gap:7px}.award .award-emoji{font-size:29px}.award.locked{filter:grayscale(1);opacity:.5}.award h4{font-size:11px;margin:0}.award p{font-size:10px;color:var(--muted);margin:0;line-height:1.4}.list-cards{display:flex;flex-direction:column;gap:12px}.note-card{border:1px solid var(--stroke);background:var(--card);border-radius:16px;padding:18px}.note-card blockquote{font-family:Georgia,serif;font-style:italic;font-size:15px;line-height:1.7;margin:13px 0;color:var(--ink)}.note-card p{font-size:13px;line-height:1.7;white-space:pre-wrap}.note-card .n-head{display:flex;justify-content:space-between;align-items:start;gap:10px}.note-card .note-book{font-size:11px;color:var(--primary);font-weight:750}.note-date{font-size:10px;color:var(--muted)}.timer-layout{display:grid;grid-template-columns:1.2fr .8fr;gap:20px}.timer-circle{width:260px;height:260px;border-radius:50%;margin:20px auto;display:flex;align-items:center;justify-content:center;flex-direction:column;background:radial-gradient(circle at center,var(--card) 61%,transparent 62%),conic-gradient(#8b5cf6 0 65%,#ece5fb 65%);box-shadow:0 7px 30px #7c3aed13}.timer-time{font-size:46px;font-weight:850;letter-spacing:-2px;font-variant-numeric:tabular-nums}.timer-status{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:1.4px}.timer-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.rank-row{display:flex;gap:14px;align-items:center;padding:11px 0;border-bottom:1px solid var(--stroke)}.rank-row:last-child{border:0}.rank-number{width:30px;color:var(--primary);font-size:18px;font-weight:850}.rank-row .book-cover{height:63px;width:44px}.rank-info{flex:1;min-width:0}.rank-info strong{font-size:12px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rank-info p{font-size:10px;color:var(--muted);margin:5px 0 0}.ai-layout{display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:18px}.chat-card{border:1px solid var(--stroke);background:var(--card);border-radius:18px;display:flex;flex-direction:column;height:570px;overflow:hidden}.chat-header{padding:18px 21px;border-bottom:1px solid var(--stroke);display:flex;align-items:center;gap:10px}.chat-header h3{margin:0;font-size:13px}.chat-header p{margin:3px 0 0;color:var(--muted);font-size:10px}.chat-messages{padding:22px;overflow-y:auto;flex:1;display:flex;flex-direction:column;gap:18px}.bubble{border-radius:16px;padding:13px 16px;max-width:87%;font-size:12px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.user{background:#7c3aed;color:#fff;align-self:flex-end;border-bottom-right-radius:4px}.bubble.ai{background:var(--input);border:1px solid var(--stroke);align-self:flex-start;border-bottom-left-radius:4px}.chat-form{border-top:1px solid var(--stroke);padding:15px;display:flex;gap:9px}.chat-form .field{flex:1}.prompt-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.prompt-chip{font-size:11px;background:var(--pale);color:var(--primary);border:0;border-radius:13px;padding:10px 12px;text-align:left;cursor:pointer}.social-person{background:var(--card);padding:15px;border:1px solid var(--stroke);border-radius:15px;display:flex;gap:12px;align-items:center}.social-person .details{flex:1;min-width:0}.social-person .details strong{font-size:12px}.social-person .details p{margin:3px 0 0;font-size:10px;color:var(--muted);overflow:hidden;text-overflow:ellipsis}.social-post{padding:19px;border:1px solid var(--stroke);border-radius:16px;background:var(--card)}.social-post p{font-size:12px;line-height:1.7;white-space:pre-wrap}.settings-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:20px}.settings-list{display:flex;flex-direction:column;gap:9px}.field-label{display:block;font-size:11px;color:var(--muted);font-weight:750;margin:0 0 7px}.form-group{margin-bottom:15px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-helper{font-size:10px;color:var(--muted);margin:6px 0 0;line-height:1.5}.switch-line{display:flex;gap:14px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--stroke);padding:14px 0}.switch-line:last-child{border:0}.switch-line strong{font-size:12px}.switch-line p{font-size:11px;color:var(--muted);margin:5px 0 0}.check-switch{appearance:none;width:39px;height:23px;border-radius:50px;background:#d7d2e1;flex-shrink:0;position:relative;cursor:pointer;transition:background .2s}.check-switch:after{content:"";position:absolute;height:17px;width:17px;top:3px;left:3px;background:#fff;border-radius:50%;transition:left .2s}.check-switch:checked{background:#8b5cf6}.check-switch:checked:after{left:19px}
.modal-overlay{position:fixed;inset:0;background:#201735a6;z-index:50;display:grid;place-items:center;padding:18px;animation:fade .14s ease-out}.modal{width:min(610px,100%);max-height:min(92vh,850px);background:var(--card);border-radius:21px;overflow:auto;box-shadow:0 25px 100px #140d343d}.modal.wide{width:min(780px,100%)}.modal-head{padding:21px 24px 15px;display:flex;justify-content:space-between;gap:12px;align-items:start;position:sticky;top:0;background:var(--card);z-index:4;border-bottom:1px solid var(--stroke)}.modal-head h2{font-size:19px;margin:0;letter-spacing:-.4px}.modal-head p{font-size:11px;color:var(--muted);margin:6px 0 0}.modal-body{padding:22px 24px 25px}.modal-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:16px;flex-wrap:wrap}.detail-top{display:flex;gap:23px;margin-bottom:22px}.detail-top .book-cover{width:132px;height:190px;flex-shrink:0}.detail-top h2{font-size:23px;letter-spacing:-.8px;margin:0 0 8px}.detail-top p{margin:0 0 12px;color:var(--muted);font-size:12px}.star-select{display:flex;gap:3px;flex-wrap:wrap}.star-select button{padding:4px 7px;border:none;background:none;color:#d1c9da;font-size:24px;cursor:pointer}.star-select button.chosen{color:#f0aa2b}.twocol{display:grid;grid-template-columns:1fr 1fr;gap:14px}.separator{height:1px;background:var(--stroke);margin:19px 0}.callout{padding:12px 14px;background:var(--pale);color:var(--primary);border-radius:12px;font-size:11px;line-height:1.6}.hint{background:var(--input);color:var(--muted);font-size:11px;border-radius:12px;padding:11px 13px;line-height:1.5}.tabs{display:flex;gap:7px;border-bottom:1px solid var(--stroke);margin-bottom:18px;overflow-x:auto;padding-bottom:8px}.tab{border:none;background:none;color:var(--muted);padding:9px 12px;border-radius:9px;font-size:12px;font-weight:800;white-space:nowrap}.tab.active{background:var(--pale);color:var(--primary)}.catalog-list{display:flex;flex-direction:column;gap:10px;max-height:360px;overflow-y:auto}.catalog-item{display:flex;gap:12px;align-items:center;padding:10px;background:var(--input);border:1px solid var(--stroke);border-radius:12px;cursor:pointer}.catalog-item:hover{border-color:#bd9df8}.catalog-item .book-cover{height:72px;width:52px;flex-shrink:0}.catalog-info{flex:1;min-width:0}.catalog-info strong{font-size:12px;display:block;line-height:1.4}.catalog-info p{font-size:10px;color:var(--muted);margin:4px 0}.auth-container{min-height:100vh;display:grid;grid-template-columns:1.02fr 1fr}.auth-art{background:linear-gradient(145deg,#5727b4,#8745e2 55%,#ba7ef6);color:#fff;padding:50px 10%;position:relative;overflow:hidden;display:flex;justify-content:space-between;flex-direction:column}.auth-art:before{content:"";border:1px solid #ffffff35;position:absolute;height:600px;width:600px;border-radius:50%;right:-250px;bottom:-240px;box-shadow:0 0 0 90px #ffffff0c,0 0 0 170px #ffffff09}.auth-art .logo{color:#fff}.auth-art .logo-dot{color:#e3b6ff}.auth-copy{position:relative;z-index:1;max-width:410px}.auth-copy h1{font-size:clamp(34px,4vw,62px);letter-spacing:-2px;line-height:1.1;margin:0 0 22px}.auth-copy p{font-size:15px;line-height:1.7;opacity:.79}.auth-book-stack{display:flex;gap:15px;align-items:end;height:220px;transform:rotate(-9deg);margin-top:18px}.auth-book-stack .onebook{height:195px;width:120px;border-radius:6px 15px 15px 6px;box-shadow:10px 12px 24px #35146f59;position:relative}.auth-book-stack .onebook:after{content:"";position:absolute;top:21px;left:17px;right:14px;height:4px;border-radius:10px;background:#ffffff90;box-shadow:0 15px 0 #ffffff70,0 30px 0 #ffffff50}.auth-book-stack .b1{background:#ffd082;height:175px;transform:rotate(-13deg)}.auth-book-stack .b2{background:#fba4bf;height:210px;transform:rotate(3deg)}.auth-book-stack .b3{background:#8ce6d3;height:190px;transform:rotate(11deg)}.auth-art-footer{position:relative;z-index:2;font-size:11px;opacity:.7}.auth-form-wrap{display:flex;align-items:center;justify-content:center;padding:38px 25px}.auth-form{width:min(420px,100%)}.auth-form h2{font-size:28px;letter-spacing:-.8px;margin:0 0 8px}.auth-form .intro{color:var(--muted);font-size:12px;margin:0 0 29px;line-height:1.5}.auth-options{margin-top:21px;text-align:center;color:var(--muted);font-size:12px}.auth-options button{color:var(--primary);border:0;background:none;font-weight:800}.auth-form .field{padding:14px}.auth-form .btn{padding:14px}.auth-divider{display:flex;gap:12px;align-items:center;color:var(--muted2);font-size:11px;margin:19px 0}.auth-divider:before,.auth-divider:after{content:"";height:1px;background:var(--stroke);flex:1}.auth-note{font-size:10px;color:var(--muted);line-height:1.6;margin-top:18px}.alert-error{background:#fff0f0;color:#b72f44;padding:12px;border-radius:10px;font-size:12px;margin-bottom:18px}.dark .alert-error{background:#4a2634;color:#ffb2bb}#toast-area{position:fixed;right:22px;bottom:24px;z-index:100;display:flex;flex-direction:column;gap:10px;pointer-events:none}.toast{background:#26203f;color:#fff;border-radius:12px;padding:13px 17px;box-shadow:0 13px 35px #24154140;font-size:12px;font-weight:750;display:flex;align-items:center;gap:10px;animation:fade .2s;max-width:380px}.toast.bad{background:#a3344f}@keyframes fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.loading{text-align:center;color:var(--muted);font-size:12px;padding:25px}.spinner{width:22px;height:22px;border-radius:50%;border:3px solid #e2d9f8;border-top-color:#7c3aed;animation:spin .8s linear infinite;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:1180px){.content{padding-left:28px;padding-right:28px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-cols{grid-template-columns:1.5fr 1fr}.top-search{width:210px}}
@media(max-width:900px){.sidebar{width:207px;padding-left:12px;padding-right:12px}.main{margin-left:207px;width:calc(100% - 207px)}.content{padding:24px 20px 95px}.dashboard-cols,.activity-grid,.timer-layout,.ai-layout,.settings-layout{grid-template-columns:1fr}.hero-art{right:3%;opacity:.65}.hero-inner{max-width:75%}.book-tile .book-cover{height:190px}.top-search{display:none}}
@media(max-width:680px){.sidebar{display:none}.main{margin:0;width:100%}.content{padding:17px 16px 107px}.topbar{display:none}.mobile-head{display:flex;justify-content:space-between;align-items:center;padding:16px 17px 4px}.mobile-head .logo{font-size:23px}.mobile-head .logo-icon{height:34px;width:34px;border-radius:11px}.mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;padding:8px 9px calc(7px + env(safe-area-inset-bottom));background:var(--card);border-top:1px solid var(--stroke);z-index:30;justify-content:space-around;box-shadow:0 -8px 30px #2a1b5610}.mobile-nav button{background:none;border:0;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;font-size:9px;color:var(--muted);font-weight:700;min-width:53px;padding:7px 3px;border-radius:12px}.mobile-nav button.active{color:var(--primary);background:var(--pale)}.h1{font-size:25px}.page-head{margin-bottom:19px}.hero{padding:27px 22px;min-height:222px;border-radius:19px}.hero-inner{max-width:88%}.hero h1{font-size:25px;max-width:315px}.hero p{max-width:275px}.hero-art{right:-45px;opacity:.35}.hero-buttons{gap:7px}.hero .btn{font-size:11px;padding:10px}.stats-grid{gap:10px;margin-top:13px}.stat-card{padding:13px 10px;gap:9px}.stat-icon{height:36px;width:36px;border-radius:10px}.stat-num{font-size:20px}.stat-label{font-size:10px}.dashboard-cols{grid-template-columns:1fr;gap:17px}.section-heading{margin-top:23px}.books-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.book-tile{padding:10px}.book-tile .book-cover{height:215px}.toolbar{gap:8px}.toolbar .search-field{flex-basis:100%}.discover-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.discover-card{padding:9px}.discover-card .book-cover{height:165px}.activity-grid{grid-template-columns:1fr}.heatmap{gap:5px}.heat-cell{border-radius:7px}.modal-overlay{padding:0;align-items:end}.modal,.modal.wide{width:100%;max-height:94dvh;border-radius:22px 22px 0 0}.modal-head{padding:18px}.modal-body{padding:18px}.detail-top .book-cover{width:101px;height:148px}.detail-top{gap:14px}.detail-top h2{font-size:19px}.timer-circle{width:230px;height:230px}.timer-time{font-size:39px}.badge-list{grid-template-columns:repeat(3,1fr)}.auth-container{grid-template-columns:1fr}.auth-art{padding:25px 22px;min-height:230px;justify-content:start;gap:25px}.auth-copy h1{font-size:29px;letter-spacing:-1px;margin-bottom:10px}.auth-copy p{font-size:12px}.auth-book-stack,.auth-art-footer{display:none}.auth-form-wrap{align-items:start;padding:28px 21px 45px}.auth-form h2{font-size:23px}.form-row,.twocol{grid-template-columns:1fr}.page-head.flex-head{flex-wrap:wrap}.page-head.flex-head .btn{margin-left:auto}#toast-area{right:12px;left:12px;bottom:83px}.toast{max-width:none}}
@media(max-width:365px){.book-tile .book-cover{height:175px}.mobile-nav button{min-width:43px;font-size:8px}.hero h1{font-size:22px}.stat-card{gap:5px}.stat-icon{height:31px;width:31px}}
.collection-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}.collection-card{display:flex;position:relative;gap:2px;align-items:start;border-radius:16px;background:var(--card);border:1px solid var(--stroke);padding:9px;min-height:130px}.collection-card.selected{border-color:#9e72f2;background:var(--pale)}.collection-main{border:0;background:none;flex:1;text-align:left;display:flex;flex-direction:column;align-items:start;gap:7px;padding:9px;cursor:pointer;color:var(--ink)}.collection-main strong{font-size:13px}.quick-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin-bottom:19px}.quick-link{border:1px solid var(--stroke);background:var(--card);border-radius:13px;display:flex;align-items:center;justify-content:center;gap:8px;flex-direction:column;padding:15px 6px;color:var(--primary);font-size:11px;font-weight:750;min-height:78px;cursor:pointer}.quick-link:hover{border-color:#a884ed;background:var(--pale)}.quick-link span{color:var(--ink)}
@media(max-width:900px){.quick-nav{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){.quick-nav{grid-template-columns:repeat(3,minmax(0,1fr))}.collection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.book-cover .cover-text{overflow-wrap:normal;word-break:normal;hyphens:auto;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}.book-row .book-cover .cover-text,.rank-row .book-cover .cover-text{font-size:9px;line-height:1.2;padding:5px;-webkit-line-clamp:3}.book-row .book-cover .cover-abstract:after,.rank-row .book-cover .cover-abstract:after{font-size:15px;bottom:5px;right:5px}

/* Bookly Pocket: mobile-first interaction refinements */
.btn-pocket{background:linear-gradient(110deg,#7c3aed,#b252db);color:white;box-shadow:0 6px 20px #7c3aed2e;margin-top:10px}
.btn-pocket:hover{filter:brightness(1.05)}
.install-promo{display:flex;gap:12px;justify-content:space-between;align-items:center;background:var(--card);border:1px solid var(--stroke);border-radius:16px;padding:13px 17px;margin:16px 0 4px}
.install-promo strong{font-size:13px}.install-promo p{font-size:11px;line-height:1.5;margin:4px 0 0;color:var(--muted)}
.install-guide{display:flex;flex-direction:column;gap:16px}.install-guide-step{background:var(--input);border-radius:13px;padding:14px}.install-guide-step strong{font-size:14px}.install-guide-step p{font-size:12px;line-height:1.65;margin:8px 0 0;color:var(--muted)}
.mobile-head-actions{display:flex;align-items:center;gap:8px}.pocket-tag{display:inline-flex;align-items:center;gap:4px;font-size:10px;background:#eee8ff;color:#6d28d9;border-radius:30px;padding:7px 9px;font-weight:800}
button,select,[role=button]{touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.55;cursor:not-allowed}
button:focus-visible,[role=button]:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #a78bfa;outline-offset:2px}
@media(max-width:680px){
  html{scroll-padding-bottom:100px}input,select,textarea{font-size:16px!important}
  .mobile-head{padding-top:calc(12px + env(safe-area-inset-top))}.mobile-head .ic-button{width:41px;height:41px}
  .content{padding-bottom:calc(118px + env(safe-area-inset-bottom))}
  .mobile-nav{min-height:68px}.mobile-nav button{min-height:48px;min-width:0;flex:1}
  .btn{min-height:44px}.btn-sm{min-height:40px}.modal{max-height:calc(100dvh - env(safe-area-inset-top) - 12px);padding-bottom:env(safe-area-inset-bottom)}
  .modal-foot .btn{flex:1}.install-promo{flex-wrap:wrap}.install-promo .btn{width:100%}
  .book-tile{cursor:pointer}.toolbar .toggle-group{max-width:100%;overflow-x:auto;flex-wrap:nowrap;overscroll-behavior-x:contain;scrollbar-width:none}
  .toolbar .toggle-group::-webkit-scrollbar{display:none}.filter{flex-shrink:0}
  .book-cover img{object-fit:cover}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

/* Standalone phone welcome */
.pocket-welcome{min-height:100dvh;display:grid;place-items:center;padding:calc(24px + env(safe-area-inset-top)) 18px calc(24px + env(safe-area-inset-bottom));background:radial-gradient(circle at top left,#dac6ff,transparent 58%),linear-gradient(150deg,#faf7ff,#fbeffb)}
.pocket-welcome-card{width:min(430px,100%);background:#fff;border-radius:28px;padding:30px 25px;box-shadow:0 25px 80px #512d8b1b;text-align:center}
.pocket-logo{display:grid;place-items:center;margin:0 auto 10px;width:75px;height:75px;border-radius:24px;color:#fff;background:linear-gradient(135deg,#9760ef,#6725cf);box-shadow:0 10px 22px #7234ce40}
.pocket-welcome-card h1{font-size:38px;letter-spacing:-2px;color:#4b278f;margin:0}.pocket-welcome-card h2{font-size:20px;color:#33264a;margin:8px 0 10px}.pocket-welcome-card p{font-size:13px;color:#807492;line-height:1.65}.pocket-welcome-card .pocket-subtitle{font-size:13px;margin-top:2px}.pocket-illustration{font-size:55px;letter-spacing:7px;background:linear-gradient(120deg,#f4eeff,#ffeaf4);border-radius:20px;padding:27px 2px;margin:24px 0 20px}.pocket-illustration span{font-size:28px;vertical-align:top}.pocket-welcome-card .btn{margin-top:10px;min-height:48px}.pocket-welcome-card .pocket-footnote{font-size:11px;margin-top:20px}

@media(max-width:390px){.pocket-tag{display:none}.mobile-head .logo{font-size:20px}.mobile-head-actions{gap:5px}.mobile-head .ic-button{width:40px;height:40px}}

/* Bookly Cloud — network status */
.cloud-status { display:flex;align-items:center;gap:7px;padding:9px 12px;border-radius:12px; background:#eee9ff;color:#6d3bb1;font-size:12px;font-weight:650;}
.cloud-status.offline{background:#fff4dd;color:#925f0c;}

/* Bookly 3.1 — non mostrare piu' l'installazione dentro la PWA installata. */
.bookly-installed .install-promo,
.bookly-installed [data-action="install"] {display:none !important;}
@media (display-mode:standalone){
  .install-promo, [data-action="install"] {display:none !important;}
}

/* Bookly 4.1 — Modern Color Community, desktop and smartphone */
.community-intro{background:linear-gradient(108deg,#f4ebff,#fff7fd);border:1px solid #efe4ff;border-radius:25px;padding:25px 30px;display:flex;align-items:center;gap:18px;min-height:165px;overflow:hidden;position:relative;margin-bottom:17px}
.community-intro-copy{z-index:1;flex:1}.community-kicker{display:flex;align-items:center;gap:8px;font-size:10px;font-weight:850;letter-spacing:1.4px;color:#6932b8}
.community-intro h1{font-size:35px;font-weight:900;letter-spacing:-1.8px;margin:9px 0 6px;color:#251344}
.community-intro p{font-size:13px;line-height:1.75;color:#4b376c;max-width:470px;margin:0}
.community-books{height:120px;width:190px;flex-shrink:0;display:grid;place-items:center;position:relative}
.community-books span{font-size:88px;filter:drop-shadow(0 7px 9px #7d49b537);transform:rotate(-10deg)}.community-books i{position:absolute;bottom:6px;right:15px;color:#fff;font-style:normal;border-radius:50%;background:linear-gradient(135deg,#f472b6,#aa4aca);height:31px;width:31px;text-align:center;line-height:31px;box-shadow:0 5px 9px #b650a544}
.community-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin-bottom:22px}
.community-shortcut{border:1px solid #eadfff;background:#eee5ff;color:#57279b;min-height:112px;border-radius:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:11px;padding:12px;cursor:pointer;transition:transform .15s,background .15s;box-shadow:0 2px 7px #7444a209}
.community-shortcut:nth-child(2){background:#f2e9ff}.community-shortcut:nth-child(3){background:#faeafd}.community-shortcut:nth-child(4){background:#e9f8fa}
.community-shortcut span{font-size:12px;font-weight:750;max-width:110px;line-height:1.35;text-align:center;color:#352050}
.community-shortcut:hover{transform:translateY(-2px);background:#e4d5ff}
.community-tabs{display:flex;overflow-x:auto;gap:10px;margin:0 0 17px;padding-bottom:4px;scrollbar-width:thin}
.community-tabs button{white-space:nowrap;border:0;border-radius:999px;padding:12px 19px;background:#eee6fc;color:#4b3268;font-size:12px;font-weight:850;cursor:pointer;flex:1}
.community-tabs button.selected{background:#6829c9;color:white;box-shadow:0 5px 13px #7f41d522}
.community-content{max-width:930px;margin:0 auto 25px}.community-section-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 13px}
.community-section-header h2{font-size:20px;letter-spacing:-.5px;margin:0;color:var(--ink)}.community-section-header p{font-size:12px;color:var(--muted);line-height:1.6;margin:6px 0 0}
.community-refresh{background:transparent;border:0;color:#7c3aed;display:flex;align-items:center;gap:6px;cursor:pointer;font-size:12px;font-weight:800}
.community-feed{display:flex;flex-direction:column;gap:16px}.community-post{background:var(--card);border:1px solid var(--stroke);box-shadow:0 5px 25px #4b28790a;border-radius:25px;padding:21px 23px}
.community-post-head{display:flex;align-items:center;gap:11px}.community-avatar{width:42px;height:42px;flex-shrink:0;background:linear-gradient(145deg,#d0b5ff,#8d55eb);color:#4e188f;border-radius:50%;display:grid;place-items:center;font-weight:900;font-size:16px;border:3px solid #f8f2ff}.community-avatar.big{width:72px;height:72px;font-size:24px;margin:auto}
.community-post-author{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.community-post-author strong{color:var(--ink);font-size:14px}.community-post-author small{font-size:11px;color:var(--muted)}
.community-post-book{display:flex;align-items:flex-start;gap:19px;padding:17px 0}.community-post-book .book-cover{height:150px;width:105px;flex-shrink:0;border-radius:11px;box-shadow:0 6px 12px #3a1e5426}
.community-book-copy{flex:1;min-width:0}.community-book-copy h3{font-size:19px;color:var(--ink);margin:2px 0 5px;line-height:1.25}.community-book-copy>p{font-size:12px;color:var(--muted);margin:0 0 12px}.community-stars{color:#eaaa18;font-size:22px;letter-spacing:1.5px}.community-stars span{font-size:11px;letter-spacing:0;color:var(--muted);vertical-align:middle}.community-book-copy .community-review{font-size:13px;line-height:1.7;white-space:pre-wrap;color:var(--ink);margin:8px 0 0;overflow-wrap:anywhere}
.community-post-actions{border-top:1px solid var(--stroke);padding-top:12px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.community-post-actions button{display:flex;gap:7px;align-items:center;justify-content:center;background:none;border:0;border-radius:10px;padding:9px 3px;font-size:11px;font-weight:750;cursor:pointer;color:var(--muted)}.community-post-actions button:hover{background:var(--pale)}.community-post-actions .liked{color:#db2777}.community-post-actions .liked svg{fill:#f9c5df}
.community-panel{border:1px solid var(--stroke);background:var(--card);border-radius:22px;padding:22px;margin:0 0 16px}.community-panel h2{display:flex;align-items:center;gap:9px;font-size:18px;color:var(--ink)}.community-panel>p{font-size:12px;color:var(--muted);margin:7px 0 18px}.community-people{display:flex;flex-direction:column;gap:10px;margin-top:15px}
.community-person{display:flex;align-items:center;gap:10px;border:1px solid var(--stroke);background:var(--card);border-radius:14px;padding:12px}.community-person-info{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}.community-person-info strong{font-size:13px}.community-person-info small{font-size:11px;color:var(--primary)}.community-person-info span{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.community-person-actions{display:flex;align-items:center;gap:4px}
.community-help{color:var(--muted);font-size:12px}.community-empty{text-align:center;background:var(--card);border:1px dashed #d4c4ee;border-radius:22px;padding:36px 18px;color:var(--primary)}.community-empty h3{color:var(--ink);font-size:17px;margin:10px 0 5px}.community-empty p{font-size:12px;line-height:1.6;color:var(--muted);margin:0 auto 16px;max-width:360px}.community-skeleton{border:1px solid var(--stroke);border-radius:21px;padding:25px;background:var(--card);font-size:12px;color:var(--muted)}
.community-group-card{display:flex;gap:15px;align-items:flex-start;border:1px solid var(--stroke);border-radius:19px;padding:20px;background:var(--card);margin-bottom:12px}.community-group-icon{height:56px;width:56px;flex-shrink:0;display:grid;place-items:center;border-radius:18px;background:#e8dcff;color:#7134be}.community-group-icon.challenge{background:#fff3d4;color:#ae7912}.community-group-main{flex:1;min-width:0}.community-group-main h3{font-size:15px;margin:0 0 7px}.community-group-main p{font-size:12px;color:var(--muted);margin:5px 0}.community-group-main small{font-size:11px;color:var(--primary);font-weight:800}.community-progress-input{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0 0}.community-progress-input label{font-size:12px}.community-progress-input input{width:64px;background:var(--input);border:1px solid var(--stroke);border-radius:8px;padding:8px;color:var(--ink)}
.community-comments{max-height:42vh;overflow-y:auto;display:flex;flex-direction:column;gap:11px;margin-bottom:20px}.community-comment{display:flex;align-items:flex-start;gap:8px;border-bottom:1px solid var(--stroke);padding:7px 0 13px}.community-comment>div:nth-child(2){flex:1;min-width:0}.community-comment strong{font-size:12px}.community-comment p{font-size:12px;line-height:1.6;white-space:pre-wrap}.community-comment small{font-size:10px;color:var(--muted)}
.community-profile-modal{text-align:center;padding:12px 4px}.community-profile-modal h3{margin:7px 0 3px}.community-profile-modal p{font-size:12px;color:var(--muted)}.community-profile-books{margin-top:15px}.community-profile-book{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid var(--stroke)}.community-profile-book .book-cover{height:108px;width:75px;flex-shrink:0}.community-profile-book strong{font-size:13px}.community-profile-book p{font-size:12px;color:var(--muted);line-height:1.45;margin:5px 0}
.community-privacy{display:flex;align-items:center;gap:9px;padding:14px 16px;background:var(--pale);border-radius:13px;color:var(--muted);font-size:11px;line-height:1.5}.community-privacy>span{flex:1}.community-privacy button{background:transparent;border:0;color:var(--primary);font-size:11px;font-weight:800;cursor:pointer}
.highlight-post{outline:3px solid #c39ffb;outline-offset:3px}
.dark .community-intro{background:linear-gradient(115deg,#37204b,#2e2243);border-color:#684e7c}.dark .community-intro h1,.dark .community-intro p{color:#f3eaff}.dark .community-intro .community-kicker{color:#dabaff}.dark .community-shortcut{background:#392c54;border-color:#564073;color:#d7c1fc}.dark .community-shortcut span{color:#f0e8ff}.dark .community-tabs button{background:#443157;color:#e7d7f2}.dark .community-tabs button.selected{background:#7c3aed;color:white}
@media(max-width:680px){.community-intro{padding:19px 15px;min-height:135px;border-radius:20px}.community-intro h1{font-size:29px}.community-intro p{font-size:12px;max-width:78%}.community-books{width:80px;height:98px;position:absolute;right:7px;bottom:2px;opacity:.85}.community-books span{font-size:52px}.community-books i{height:21px;width:21px;line-height:21px;right:0}.community-shortcuts{gap:7px}.community-shortcut{min-height:92px;border-radius:16px;gap:8px;padding:8px 4px}.community-shortcut svg{height:21px;width:21px}.community-shortcut span{font-size:10px}.community-tabs{gap:7px}.community-tabs button{padding:11px 14px;flex:0 0 auto;font-size:11px}.community-post{padding:14px;border-radius:20px}.community-post-book{gap:12px;padding:14px 0}.community-post-book .book-cover{height:125px;width:87px}.community-book-copy h3{font-size:15px}.community-stars{font-size:17px}.community-book-copy .community-review{font-size:12px}.community-post-actions button{gap:4px;font-size:10px}.community-post-actions svg{height:16px;width:16px}.community-person{flex-wrap:wrap}.community-person-actions .btn{font-size:10px}.community-group-card{gap:10px;padding:14px}.community-group-icon{height:42px;width:42px;border-radius:13px}.community-group-card>.btn{font-size:10px;padding:8px}.community-section-header h2{font-size:17px}}
@media(max-width:355px){.community-shortcut span{font-size:9px}.community-intro p{max-width:90%}.community-books{opacity:.35}.community-post-book .book-cover{height:105px;width:70px}.community-post-actions button{font-size:9px}}

/* Bookly 4.2 — responsive fixes for Community and AI. Safe to append once. */
/* BOOKLY_RESPONSIVE_42 */
html,body,#app,.app-shell,.main,.content{min-width:0}
.content,.community-content,.community-panel,.community-feed,.community-post,.community-post-book,.community-book-copy,.community-intro-copy,.community-group-main,.community-person-info,.ai-layout,.chat-card{min-width:0}
.community-intro,.community-content,.community-post,.community-panel,.community-group-card,.community-person,.chat-card{max-width:100%}
.community-intro h1,.community-intro p,.community-book-copy h3,.community-book-copy p,.community-person-info strong,.community-group-main h3,.community-group-main p,.community-profile-book strong{overflow-wrap:anywhere}
.community-intro-copy{position:relative;min-width:0;flex:1}
.community-books{pointer-events:none}
.community-shortcuts{grid-template-columns:repeat(4,minmax(0,1fr))}
.community-shortcut{min-width:0;height:100%;line-height:1.3;overflow-wrap:anywhere}
.community-shortcut span{max-width:100%;overflow-wrap:anywhere}
.community-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));overflow:visible;gap:8px;scrollbar-width:none}
.community-tabs button{min-width:0;min-height:44px;white-space:normal;overflow-wrap:anywhere;line-height:1.3;padding:10px 8px;flex:none}
.community-post-head{min-width:0}
.community-post-author{min-width:0;overflow-wrap:anywhere}
.community-post-author strong,.community-post-author small{overflow-wrap:anywhere}
.community-post-book{display:grid;grid-template-columns:105px minmax(0,1fr);align-items:start;gap:16px}
.community-post-book .book-cover{width:100%;height:auto;aspect-ratio:7/10;max-width:100%;min-width:0;flex-shrink:1}
.community-stars{line-height:1.4;overflow-wrap:anywhere}
.community-post-actions button{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.3;gap:6px;min-height:44px}
.community-person-info{min-width:0}
.community-person-actions{min-width:0;flex-wrap:wrap}
.community-group-main{min-width:0}
.community-group-card>.btn{align-self:start;max-width:100%}
.community-group-main .progress{margin-top:10px}
.community-progress-input label{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;max-width:100%}
.community-progress-input input{width:70px;max-width:100%;font-size:16px}
.community-privacy{flex-wrap:wrap;gap:10px}
.community-privacy>span{min-width:0;flex:1 1 180px}
.ai-layout,.chat-card,.chat-header,.chat-form{min-width:0}
.chat-header>div:last-child{min-width:0}
.chat-header p{overflow-wrap:anywhere}
.chat-form .field{min-width:0;width:100%;flex:1 1 0}
.chat-form .btn-icon{flex:0 0 44px;min-width:44px}
@media (max-width:1050px){
  .community-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}
  .community-tabs button{font-size:12px}
  .community-group-card{flex-wrap:wrap}
}
@media (max-width:680px){
  .content{padding-left:clamp(12px,4vw,18px);padding-right:clamp(12px,4vw,18px)}
  .community-intro{padding:20px 17px;min-height:0;gap:7px;border-radius:20px}
  .community-kicker{font-size:10px;letter-spacing:1px}
  .community-intro h1{font-size:clamp(25px,7.7vw,33px);letter-spacing:-1px;margin:8px 0 7px}
  .community-intro p{max-width:none;font-size:12px;line-height:1.55;padding-right:0}
  .community-intro-copy{padding-right:66px}
  .community-books{right:5px;bottom:11px;width:70px;height:73px;opacity:.52}
  .community-books span{font-size:45px}
  .community-books i{font-size:12px;height:19px;width:19px;line-height:19px;right:2px;bottom:0}
  .community-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:17px}
  .community-shortcut{min-height:80px;gap:6px;padding:12px 9px;border-radius:17px}
  .community-shortcut svg{width:22px;height:22px}
  .community-shortcut span{font-size:12px;line-height:1.22;max-width:none}
  .community-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;gap:8px;margin-bottom:18px}
  .community-tabs button{padding:9px 6px;min-height:43px;font-size:11px;border-radius:13px}
  .community-section-header{align-items:center;flex-wrap:wrap;gap:8px}
  .community-section-header>div{min-width:0;flex:1 1 170px}
  .community-section-header h2{font-size:18px}
  .community-refresh{min-height:40px;padding:7px 2px}
  .community-post{border-radius:20px;padding:15px}
  .community-post-book{grid-template-columns:minmax(70px,25%) minmax(0,1fr);gap:12px}
  .community-post-book .book-cover{width:100%;height:auto;aspect-ratio:7/10;border-radius:10px}
  .community-book-copy h3{font-size:clamp(14px,4.2vw,17px);margin-top:0;line-height:1.35}
  .community-book-copy>p{margin-bottom:7px}
  .community-stars{font-size:clamp(15px,4.4vw,20px);letter-spacing:0;line-height:1.25}
  .community-stars span{display:inline-block;white-space:nowrap;line-height:1.4}
  .community-book-copy .community-review{font-size:12px;line-height:1.55}
  .community-post-actions{gap:4px;padding-top:10px}
  .community-post-actions button{padding:8px 4px;display:flex;flex-direction:column;align-items:center;gap:4px;font-size:10px;min-height:51px}
  .community-post-actions svg{width:18px;height:18px}
  .community-person{display:grid;grid-template-columns:42px minmax(0,1fr);gap:8px 10px;padding:12px}
  .community-person .community-avatar{grid-column:1;grid-row:1}
  .community-person-info{grid-column:2;grid-row:1}
  .community-person-actions{grid-column:2;grid-row:2;justify-content:flex-start;flex-wrap:wrap;gap:8px}
  .community-group-card{display:grid;grid-template-columns:44px minmax(0,1fr);gap:10px;padding:14px;border-radius:17px;align-items:start}
  .community-group-icon{width:44px;height:44px}
  .community-group-main{grid-column:2}
  .community-group-card>.btn{grid-column:2;justify-self:start;min-height:40px;margin-top:1px}
  .community-group-main h3{font-size:15px;line-height:1.4}
  .community-panel{padding:16px;border-radius:19px}
  .community-panel h2{font-size:17px;flex-wrap:wrap}
  .community-privacy{padding:12px}
  .chat-card{height:min(570px,70dvh);min-height:350px}
  .chat-header{padding:13px}
  .chat-messages{padding:14px;gap:10px}
  .bubble{max-width:94%;font-size:12px;padding:11px 12px}
  .chat-form{padding:10px;gap:7px}
}
@media (max-width:380px){
  .community-intro-copy{padding-right:0}
  .community-books{display:none}
  .community-intro h1{font-size:28px}
  .community-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .community-tabs button{font-size:11px;min-height:39px}
  .community-post{padding:12px}
  .community-post-book{grid-template-columns:72px minmax(0,1fr);gap:10px}
  .community-post-actions button{font-size:9px}
  .community-post-actions svg{width:17px;height:17px}
  .community-stars{font-size:15px}
  .community-shortcut{min-height:76px}
  .community-shortcut span{font-size:11px}
  .community-group-card>.btn{width:100%;justify-self:stretch}
}

/* Bookly Cloudflare 5.0 — prevent duplicate purple outlines in Community search. */
.community-panel .search-field{box-sizing:border-box;width:100%;min-width:0;max-width:100%;border:1px solid var(--stroke);border-radius:13px}
.community-panel .search-field:focus-within{border-color:#8b5cf6;box-shadow:0 0 0 3px rgba(139,92,246,.12)}
.community-panel .search-field .field,.community-panel .search-field .field:focus,.community-panel .search-field .field:focus-visible{box-shadow:none!important;outline:0!important;border:0!important;min-width:0;max-width:100%;width:100%;padding:12px 0;background:transparent}
