/* chenzao DESIGN.md: warm canvas, understated panels, magenta actions. */
.ref-library,.ref-me{color:#262420}.ref-library button,.ref-me button,.reference-overlay button{font:inherit;cursor:pointer}.ref-library-intro{padding:22px 24px;margin:22px 0;background:linear-gradient(120deg,#eee9ff,#f4efed 60%,#f2f1e3);border-radius:20px}.ref-library-intro h2{font-size:23px;line-height:1.4;margin:10px 0}.ref-library-intro p{font-size:14px;color:#726c69;line-height:1.8;margin:0}.ref-search{display:flex;align-items:center;gap:10px;padding:0 16px;background:#eeede8;border-radius:12px}.ref-search>span{font-size:26px}.ref-search input{border:0;background:transparent;min-width:0;width:100%;height:46px;font:inherit;font-size:14px;outline-offset:2px}.ref-library-filters{display:flex;gap:8px;margin:18px 0 24px}.ref-library-filters button{background:transparent;border:1px solid #dedcd5;border-radius:20px;padding:8px 16px;font-size:13px;color:#77736e}.ref-library-filters .selected{background:#282624;color:#fff;border-color:#282624}.ref-results-label{font-weight:650;margin-bottom:18px}.ref-results-label span{float:right;font-size:12px;font-weight:400;color:#878078}.ref-book-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px 16px}.ref-book{display:flex;flex-direction:column;align-items:stretch;text-align:left;border:0;padding:0;background:none;min-width:0}.ref-book-cover{position:relative;aspect-ratio:0.68;background:var(--book-color,#e7e1d1);overflow:hidden;border-radius:3px 7px 7px 3px;box-shadow:2px 5px 10px #29201918}.ref-book-cover>span{position:absolute;inset:0;display:grid;align-content:center;padding:14px;font-family:'Songti SC',SimSun,serif;font-size:19px;line-height:1.5;font-weight:700}.ref-book-cover:not(.ref-sprite)>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.ref-book-cover.ref-sprite{background:transparent}.ref-sprite img{position:absolute;max-width:none;height:auto;display:block}.ref-book strong{font-size:14px;line-height:1.6;margin-top:10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ref-book small{font-size:11px;color:#888079;margin-top:4px;line-height:1.5}.ref-empty{padding:40px 18px;color:#8a837b;line-height:1.8;text-align:center}.ref-section-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 17px}.ref-section-heading h2{font-size:20px;margin:0;line-height:1.4}.ref-section-heading h3{margin:0}.ref-section-heading>.link{font-size:12px;white-space:nowrap;padding:0;color:#7c756e}.ref-model-collection{margin-bottom:34px}.ref-model-shelf{display:flex;overflow-x:auto;gap:14px;scroll-snap-type:x proximity;padding:0 0 12px;scrollbar-width:thin;scrollbar-color:#d4cec4 transparent}.ref-model-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.ref-model{position:relative;flex:0 0 230px;min-height:224px;padding:24px;text-align:left;border:0;border-radius:20px;color:#34313a;display:flex;flex-direction:column;align-items:start;scroll-snap-align:start;overflow:hidden}.palette-0{background:linear-gradient(135deg,#e5dcff,#f2ecff 65%,#ded9fa)}.palette-1{background:linear-gradient(135deg,#dcebe2,#f0f1df 65%,#e2eada)}.palette-2{background:linear-gradient(135deg,#f2dfb7,#faf0da 65%,#eadbb6)}.palette-3{background:linear-gradient(135deg,#f0dcdf,#f6ece6 65%,#efd8d8)}.ref-model-title{font-size:28px;font-weight:650;line-height:1.3;letter-spacing:-.5px;max-width:100%;word-break:break-word}.ref-model-rule{width:28px;height:2px;background:currentColor;opacity:.4;margin:16px 0 10px}.ref-model-desc{font-size:13px;line-height:1.7;padding-right:5px;margin-bottom:25px}.ref-model-arrow{position:absolute;right:17px;bottom:16px;border:1px solid #ffffffb3;background:#ffffff4a;width:27px;height:27px;display:grid;place-items:center;border-radius:50%}.ref-model-grid .ref-model{min-height:220px;padding:20px}.ref-model-grid .ref-model-title{font-size:24px}
.reference-overlay{position:fixed;inset:0;z-index:1500;display:flex;justify-content:center;background:#17151255;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif;color:#292622}.reference-sheet{width:min(100%,480px);height:100%;height:100dvh;background:#f8f7f3;display:flex;flex-direction:column;box-shadow:0 0 70px #0001}.reference-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;min-height:64px;padding:8px 14px;border-bottom:1px solid #e8e5dd;background:#f8f7f3;padding-top:max(8px,env(safe-area-inset-top))}.reference-header h1{font-size:16px;font-weight:650;margin:0;letter-spacing:.03em}.ref-icon{display:inline-grid;place-items:center;width:40px;height:40px;padding:8px;border:0;background:transparent;color:#34302b;font-size:25px;border-radius:50%;flex-shrink:0}.ref-icon svg{width:24px;height:24px}.ref-icon:hover{background:#eeeae2}.reference-content{overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0;padding:24px 20px calc(28px + env(safe-area-inset-bottom))}.reference-content h2{font-size:24px}.reference-content h3{font-size:18px;margin:0 0 16px}.reference-content p,.reference-content li{font-size:14px;line-height:1.9}.reference-content section{margin:28px 0}.ref-book-hero{display:grid;grid-template-columns:120px 1fr;gap:24px;align-items:center}.ref-book-hero h2{font-size:24px;line-height:1.4;margin:8px 0}.ref-book-hero p{font-size:13px;color:#80786e}.ref-save{border:1px solid #ddd7ca;background:#fffdf9;border-radius:18px;padding:7px 15px;font-size:13px!important}.ref-save[aria-pressed=true]{color:#d70050;border-color:#eab7c9;background:#fff4f8}.ref-book-summary{font-size:15px!important;line-height:1.9;margin:26px 0}.ref-audio{padding:20px;background:#eeebe3;border-radius:18px}.ref-audio span{font-size:12px;color:#898075}.ref-audio audio{width:100%;height:38px}.ref-audio p{color:#7d756e;margin:8px 0 0}.ref-chapter{display:flex;align-items:baseline;gap:16px;width:100%;text-align:left;background:transparent;border:0;border-bottom:1px solid #e6e2da;padding:14px 0;font-size:14px!important;line-height:1.6}.ref-chapter span{color:#ac7c91;font-size:12px;font-variant-numeric:tabular-nums;min-width:34px}.ref-diagram{width:100%;height:auto;display:block;border-radius:12px}.ref-muted{font-size:12px!important;color:#8b8379!important;line-height:1.7}.ref-book-detail blockquote{margin:20px 0;border-left:3px solid #cfc5ba;padding:8px 16px;color:#807166;font-size:14px;line-height:1.8}.ref-detail-title{margin:18px 0}.reference-overlay .btn{font:inherit;font-size:14px;min-height:44px}.reference-overlay .btn.red{background:#d70050;border-color:#d70050;color:#fff}.reference-overlay button:focus-visible,.ref-me button:focus-visible,.ref-library button:focus-visible{outline:2px solid #d70050;outline-offset:3px}.reference-overlay input,.reference-overlay select,.reference-overlay textarea{font:inherit;color:inherit;max-width:100%}.reference-overlay .field{box-sizing:border-box;width:100%;margin-bottom:16px}
.ref-me{padding-top:14px}.ref-profile{background:#fffdf9;border:1px solid #ebe7de;padding:22px 20px 0;border-radius:22px;overflow:hidden;margin-bottom:30px}.ref-profile-main{display:flex;align-items:center;gap:16px}.ref-avatar{width:62px;height:62px;border:1px solid #ebe3d5;background:#ede9df;border-radius:50%;font-family:SimSun,serif!important;font-size:27px!important;color:#847668}.ref-identity{display:flex;align-items:center;gap:10px}.ref-identity strong{font-size:22px;max-width:210px;overflow-wrap:anywhere}.ref-identity em{font-size:9px;font-weight:800;font-style:normal;background:#c3a573;color:#fff;padding:2px 5px;border-radius:4px}.ref-profile-edit{border:0;background:none;color:#9a9288;font-size:11px!important;padding:5px 0}.ref-profile-metrics{display:grid;grid-template-columns:repeat(3,1fr);width:100%;border:0;background:none;margin:24px 0 20px}.ref-profile-metrics span{display:grid;gap:5px;border-right:1px solid #ece7de}.ref-profile-metrics span:last-child{border:0}.ref-profile-metrics strong{font-size:23px;font-weight:650}.ref-profile-metrics small{font-size:11px;color:#888075}.ref-insight{background:#f2eee5;margin:0 -20px;padding:13px 18px;font-size:11px;color:#897d6d;text-align:center;line-height:1.7}.ref-me-board{margin-bottom:32px}.ref-me-board .v39-board-controls{margin-bottom:12px}.ref-add-wish{width:100%;background:transparent;border:1px dashed #d9d2c5;border-radius:12px;margin-top:14px;padding:12px;color:#87776c;font-size:13px!important}.ref-me-badges{margin:28px 0 32px}.ref-badge-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:18px 0}.ref-badge-grid button{background:none;border:0;display:flex;flex-direction:column;align-items:center;min-width:0;padding:0}.ref-badge-grid button>span{width:64px;height:64px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fffaf0,#e8d5b5);border:4px double #cdbb94;font-size:27px;display:grid;place-items:center;margin-bottom:10px}.ref-badge-grid strong{font-size:11px;line-height:1.6;font-weight:500;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.ref-badge-grid small{font-size:9px;color:#a09382;margin-top:4px}.ref-badge-grid>p{grid-column:1/-1}.ref-other-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.ref-other-grid button{background:#fffdf9;border:1px solid #ebe6dc;border-radius:17px;padding:18px;display:flex;align-items:start;flex-direction:column;text-align:left}.ref-other-grid svg{width:24px;height:24px;color:#817564;margin-bottom:14px}.ref-other-grid strong{font-size:14px;font-weight:550}.ref-other-grid span{font-size:10px;color:#998e80;margin-top:7px;line-height:1.7}.ref-more{margin:24px 0;color:#8e8376;font-size:12px}.ref-more summary{cursor:pointer;padding:12px 0}.ref-dashboard{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.ref-dashboard>div{background:#f0ece2;border-radius:14px;padding:20px 6px;text-align:center}.ref-dashboard strong{display:block;font-size:28px}.ref-dashboard span{font-size:12px;color:#887a67;display:block;margin-top:10px}.ref-personal-library{margin-top:26px}
.agent-sheet .reference-content{padding:0;position:relative;display:flex;flex-direction:column;overflow:hidden}.agent-conversation{padding:24px 18px;overflow-y:auto;overscroll-behavior:contain;flex:1;min-height:0}.agent-message{display:flex;align-items:flex-start;gap:9px;margin-bottom:20px}.agent-message p{margin:0;padding:11px 14px;border-radius:4px 16px 16px;max-width:85%;background:#fffdf9;font-size:14px;line-height:1.8;overflow-wrap:anywhere}.agent-message.user{justify-content:flex-end}.agent-message.user p{background:#eae8e2;border-radius:16px 4px 16px 16px}.agent-avatar{width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;background:#e7e0ef;border-radius:50%;color:#625276}.agent-avatar svg{width:18px;height:18px}.agent-examples{padding:10px 0 24px 39px}.agent-examples .eyebrow{display:block;margin-bottom:14px}.agent-examples button{display:block;border:0;border-bottom:1px solid #e8e3d9;padding:15px 0;text-align:left;background:none;width:100%;font-size:13px;color:#867a6d;line-height:1.8}.reference-content .agent-preview{padding:20px;background:#fffdf9;border:1px solid #e8e2d7;border-radius:20px;margin:24px 0}.agent-tag{font-size:10px;padding:4px 8px;border-radius:12px;background:#f4e5eb;color:#ac486d}.agent-title-label{display:block;font-size:11px;color:#918678}.agent-title-label input{display:block;width:100%;border:0;border-bottom:1px solid #eee8de;background:transparent;font-size:20px!important;font-weight:650;padding:10px 0 12px;border-radius:0}.agent-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px 12px;margin-top:18px}.agent-fields label{font-size:11px;color:#958776;min-width:0}.agent-fields input,.agent-fields select{display:block;box-sizing:border-box;width:100%;padding:9px 8px;margin-top:7px;background:#f6f3ed;border:1px solid #eee7dc;border-radius:9px;font-size:13px;min-width:0;height:39px}.agent-preview .btn{margin-top:20px}.agent-weekdays{display:flex;gap:5px;justify-content:space-between;margin-top:18px}.agent-weekdays button{border:1px solid #e2dace;background:none;border-radius:50%;width:32px;height:32px;font-size:12px}.agent-weekdays [aria-pressed=true]{background:#36312a;color:#fff;border-color:#36312a}.agent-prompt{font-size:14px;line-height:1.8;margin-bottom:6px}.agent-choices{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.agent-choices button{padding:9px 14px;border:1px solid #ddd5c9;background:#fffdf9;border-radius:12px;font-size:12px}.agent-composer{flex-shrink:0;padding:12px 12px max(15px,env(safe-area-inset-bottom));background:#f8f7f3;border-top:1px solid #e8e2d8}.agent-input-row{display:flex;align-items:center;background:#fffdf9;border:1px solid #e7e0d5;border-radius:24px;padding:6px;gap:2px}.agent-input-row textarea{border:0;background:transparent;outline-offset:2px;resize:none;min-width:0;width:100%;padding:8px 5px;max-height:120px;font-size:14px;line-height:1.6}.agent-input-row .ref-icon{width:32px;height:36px;padding:4px}.agent-attach{position:relative;overflow:hidden;cursor:pointer}.agent-attach input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}.agent-send{background:#d70050;border:0;color:#fff;border-radius:50%;width:36px;height:36px;flex:0 0 36px;font-size:23px!important}.agent-composer-hint{font-size:9px!important;margin:9px 3px 0;color:#9d9388;display:flex;gap:8px;justify-content:space-between}.agent-composer-hint button{border:0;background:none;color:#a08a7e;font-size:10px;white-space:nowrap;padding:0}.agent-attachments{display:flex;flex-wrap:wrap;gap:6px}.agent-attachments>span{display:flex;align-items:center;gap:5px;font-size:10px;background:#ece7dd;padding:5px 8px;border-radius:8px;margin-bottom:10px;max-width:100%;overflow-wrap:anywhere}.agent-attachments button{border:0;background:none;padding:2px 5px}.agent-task-note{white-space:pre-wrap;background:#eeebe4;padding:16px;border-radius:12px}#agentError{font-size:12px;color:#b43d61;line-height:1.7;margin:6px 4px 0}#agentMediaPreview img{max-width:100%;border-radius:10px}#agentMediaPreview audio{width:100%;margin:16px 0}.agent-event-details{padding:0;border:0;background:none;flex:1;min-width:0;text-align:left;font:inherit;color:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.agent-event-details b{pointer-events:none}
@media(max-width:360px){.ref-book-grid{gap:22px 12px}.ref-book strong{font-size:12px}.ref-book-cover>span{font-size:16px;padding:9px}.ref-model-grid .ref-model{padding:17px;min-height:225px}.ref-model-grid .ref-model-title{font-size:21px}.ref-model-grid .ref-model-desc{font-size:11px}.ref-book-hero{grid-template-columns:94px 1fr;gap:18px}.ref-book-hero h2{font-size:21px}.ref-badge-grid button>span{width:54px;height:54px}.agent-composer-hint{font-size:8px!important}.agent-composer-hint button{font-size:9px}.ref-profile{padding:18px 16px 0}.ref-insight{margin:0 -16px}.agent-fields input,.agent-fields select{font-size:12px;padding:8px 4px}.ref-other-grid button{padding:16px 13px}}
@media(prefers-reduced-motion:reduce){.reference-overlay *{scroll-behavior:auto!important;transition:none!important}}

.ref-model-title>span{display:block}.ref-model-grid .ref-model-title>span{overflow-wrap:anywhere}body.v40-board-visible:not(.v40-editing) .shell:is([data-tab="mine"],[data-tab="vision"][data-page="main"]) .nav{opacity:1;pointer-events:auto;transform:translateX(-50%)}
.toast{z-index:2000}
.ref-action-list{margin:20px 0}
.ref-action-card{display:flex;align-items:stretch;gap:14px;width:100%;padding:12px;overflow:hidden;border:1px solid var(--line,#e8e2d8);border-radius:16px;background:#fffdf9;color:var(--ink,#272722);text-align:left;cursor:pointer;font:inherit}
.ref-action-card>img{display:block;width:100px;height:100px;flex:0 0 100px;aspect-ratio:1;object-fit:contain;border-radius:10px}
.ref-action-info{display:flex;flex:1;min-width:0;flex-direction:column;gap:4px;padding:1px 0}
.ref-action-info>strong{display:block;font-size:17px;line-height:1.5;font-weight:600}
.ref-action-subtitle{display:block;font-size:13px;line-height:1.5;color:#77736e}
.ref-action-meta{display:flex;align-items:center;justify-content:space-between;gap:4px;margin-top:auto;color:#888079;font-size:11px;line-height:1.5}
.ref-action-arrow{display:grid;place-items:center;width:24px;height:24px;flex:0 0 24px}
.ref-action-arrow svg{width:18px;height:18px}
@media(max-width:360px){.ref-action-card{gap:10px;padding:10px}.ref-action-card>img{width:84px;height:84px;flex-basis:84px}.ref-action-info>strong{font-size:16px}.ref-action-subtitle{font-size:12px}}
.ref-action-card:focus-visible{outline:2px solid #d70050;outline-offset:4px}
.ref-action-detail .reference-header h1{font-size:17px}
.ref-action-detail .reference-content{padding:0;background:#fff}
.ref-action-images img{display:block;width:100%;height:auto}
.ref-action-purchase{display:grid;grid-template-columns:1fr 1fr;gap:10px;flex-shrink:0;padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:#fffdf9;border-top:1px solid #e8e2d8}
.ref-action-purchase button{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 8px;min-height:52px;padding:10px 8px;border:1px solid #d70050;border-radius:14px;font:inherit;cursor:pointer}
.ref-action-purchase span{font-size:13px;white-space:nowrap}
.ref-action-purchase strong{font-size:20px;font-weight:650}
.ref-action-member{background:#d70050;color:#fff}
.ref-action-regular{background:#fff4f8;color:#b60043}
.ref-me-treasures{margin-bottom:28px}
.ref-me-treasures .ref-section-heading h2{font-size:20px}
.ref-treasure-entries{border:1px solid #e9e7e2;border-radius:20px;overflow:hidden;background:#fffdf9}
.ref-treasure-entries>button{display:flex;align-items:center;gap:14px;width:100%;min-height:82px;padding:16px;border:0;border-bottom:1px solid #eeebe5;background:transparent;text-align:left;color:inherit}
.ref-treasure-entries>button:last-child{border-bottom:0}
.ref-treasure-icon{display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:12px;background:#f0eee8}
.ref-treasure-icon svg{width:23px;height:23px}
.ref-treasure-label{display:grid;gap:5px;flex:1;min-width:0}
.ref-treasure-label strong{font-size:15px;font-weight:550;line-height:1.5}
.ref-treasure-label small{font-size:12px;line-height:1.5;color:#878078}
.ref-treasure-arrow{display:grid;place-items:center;flex:0 0 18px;color:#878078}
.ref-treasure-arrow svg{width:18px;height:18px}
.ref-treasure-entries>button:focus-visible{outline:2px solid #d70050;outline-offset:-4px}
/* Reference alignment: shared 390px canvas and semantic sizes from chenzao/DESIGN.md.
   These adapters retain the application's current actions and data bindings. */
.shell[data-tab="treasure"][data-page="main"] .v39-footnote,
.shell[data-tab="today"][data-page="main"] .v39-footnote,
.shell[data-tab="mine"][data-page="main"] .v39-footnote{display:none}
.ref-library-tabs.seg{margin:0 0 12px;padding:3px;gap:2px}
.ref-treasure-header{position:sticky;top:0;z-index:20;display:flow-root;background:var(--cream);padding-top:max(8px,env(safe-area-inset-top));margin-top:-8px}
.ref-treasure-header .ref-announcement{margin-top:0}
@media(max-height:700px){
  .ref-treasure-header .ref-announcement{padding:16px 18px;margin-bottom:16px}
  .ref-treasure-header .ref-announcement-meta{margin-bottom:10px}
  .ref-treasure-header .ref-announcement-title{font-size:21px}
  .ref-treasure-header .ref-announcement-summary{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:10px 0 12px}
  .ref-treasure-header .ref-announcement-action>span{width:32px;height:32px}
}
.ref-announcement{display:block;width:100%;box-sizing:border-box;margin:8px 0 30px;padding:25px 23px 20px;border:1px solid #e9e2e3;border-radius:26px;background:radial-gradient(ellipse at 100% 0%,#d700501a 0%,#d7005006 32%,transparent 65%),radial-gradient(ellipse at 96% 12%,#f0e5f1 0%,transparent 47%),radial-gradient(ellipse at 76% 0%,#fff0d9 0%,transparent 57%),#f8f7f3;color:#272722;font-family:var(--font-ui);text-align:left;cursor:pointer}
.ref-announcement-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.ref-announcement-tag{padding:5px 10px;border-radius:999px;background:#42374319;color:#625761;font-size:12px;line-height:1.3}
.ref-announcement-new{padding:5px 12px;border-radius:999px;background:#bf2454;color:#fff;font-size:13px;line-height:1.35;font-weight:550}
.ref-announcement-title{display:block;font-size:24px;line-height:1.4;font-weight:650;letter-spacing:0;text-wrap:pretty}
.ref-announcement-summary{display:block;margin:14px 0 24px;color:#726c69;font-size:14px;font-weight:400;line-height:1.8;overflow-wrap:anywhere}
.ref-announcement-action{display:flex;align-items:center;justify-content:space-between;gap:20px}
.ref-announcement-action strong{font-size:13px;font-weight:600}
.ref-announcement-action>span{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#3c332a12}
.ref-announcement-action svg{width:24px;height:24px}
.ref-announcement:focus-visible{outline:3px solid #a51c50;outline-offset:3px}
@media(max-width:350px){.ref-announcement{padding:22px 18px 18px}.ref-announcement-title{font-size:22px}}
.ref-library-tabs.seg button{min-height:38px;padding:8px;font-size:13px;line-height:18px}
.ref-library-search{position:relative;margin-bottom:12px}
.ref-search{min-height:46px;padding:0 50px 0 14px;border:1px solid var(--line);background:#fff;border-radius:12px;gap:10px}
.ref-search>span{display:flex}.ref-search svg{width:20px;height:20px}
.ref-search input{height:44px;font-size:14px;line-height:22px}
.ref-filter{position:absolute;right:1px;top:1px;width:44px;height:44px;border:0;border-radius:11px;background:none;color:var(--sub);display:grid;place-items:center}
.ref-filter svg{width:20px;height:20px}.ref-filter.selected{color:var(--brand);background:#f7edf0}
.ref-saved-status{margin:8px 0 16px;font-size:12px;color:var(--sub)}
.ref-book-grid{gap:24px 12px;align-items:start}
.ref-book-cover{aspect-ratio:.735!important;border-radius:10px;box-shadow:0 5px 12px #28241d0c;background:var(--book-color,#ede7dc)}
.ref-book-cover>span{font:500 16px/24px var(--font-ui);padding:12px}
.ref-book strong{display:block;overflow:visible;-webkit-line-clamp:unset;margin:10px 0 0;font-size:16px;line-height:24px;font-weight:500;text-wrap:pretty;overflow-wrap:anywhere}
.ref-book small{font-size:12px;line-height:18px;margin-top:4px;color:var(--sub);overflow-wrap:anywhere}
.ref-section-heading{gap:8px;flex-wrap:wrap;margin-bottom:14px}
.ref-section-heading h2{display:flex;align-items:center;gap:9px;font:600 20px/28px var(--font-ui)}
.ref-section-heading h2 svg{width:24px;height:24px;flex-shrink:0}
.ref-section-heading>.link{display:flex;align-items:center;gap:2px;min-height:44px;font-size:13px;line-height:18px;color:var(--sub)}
.ref-section-heading>.link svg{width:18px;height:18px}
.ref-model-collection{margin:24px 0 28px}
.ref-model-shelf{gap:12px;padding:2px 0 9px;overscroll-behavior-x:contain;scroll-snap-type:x mandatory}
.ref-model,.ref-model-grid .ref-model{
 --cover-base:#d4dcfa;--cover-glow:#efebff;--cover-ribbon:#aaa1ee;--cover-edge:#81c6e3;
 flex:0 0 232px;width:232px;min-height:224px;padding:20px 18px;border:1px solid #2727221f;border-radius:20px;
 background:linear-gradient(0deg,#f8f7f3 0%,rgba(248,247,243,.94) 17%,transparent 76%),linear-gradient(115deg,transparent 12%,var(--cover-glow) 30%,transparent 53%),radial-gradient(ellipse at 105% 25%,var(--cover-edge),transparent 63%),linear-gradient(125deg,var(--cover-ribbon),var(--cover-base) 62%);
 color:var(--ink);scroll-snap-align:start
}
.ref-model.palette-1{--cover-base:#b7e9df;--cover-glow:#d1f2d6;--cover-ribbon:#76cba2;--cover-edge:#7bd5ef}
.ref-model.palette-2{--cover-base:#f4d59c;--cover-glow:#fff0c9;--cover-ribbon:#edb14e;--cover-edge:#ed9b63}
.ref-model.palette-3{--cover-base:#cad3f4;--cover-glow:#f4dafa;--cover-ribbon:#dba6e6;--cover-edge:#92b9ed}
.ref-model-title,.ref-model-grid .ref-model-title{font:700 28px/34px var(--font-ui);letter-spacing:0}
.ref-model-rule{height:1px;width:168px;max-width:100%;margin:14px 0 24px;opacity:.55;flex-shrink:0}
.ref-model-desc,.ref-model-grid .ref-model-desc{font:400 14px/22px var(--font-ui);padding-right:30px;margin:auto 0 0;color:#484841}
.ref-model-arrow{width:36px;height:36px;right:14px;bottom:16px;background:var(--surface);border:1px solid #2727221f}
.ref-model-arrow svg{width:20px;height:20px}
.ref-model-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,232px),1fr));gap:16px}
.ref-model-grid .ref-model{width:100%}
.ref-me{padding-top:0}.ref-profile{padding:22px 18px 0;border:1px solid #e9e7e2;border-radius:20px;background:#fff;margin-bottom:24px}
.ref-profile-main{gap:14px;padding-bottom:20px;border-bottom:1px solid #e9e7e2}
.ref-avatar{width:64px;height:64px;flex:0 0 64px;border:0;background:linear-gradient(120deg,#f7dc86,#f4be65);color:#50452c;font:400 28px/34px var(--font-ui)!important}
.ref-identity strong{font:600 24px/34px var(--font-ui);max-width:190px}.ref-identity em{font:500 12px/18px var(--font-ui);color:#8d7851;background:#f3e9cf;border-radius:999px;padding:3px 7px}
.ref-profile-edit{font-size:12px!important;line-height:18px;min-height:44px;display:flex;align-items:center;color:var(--sub);padding:0}
.ref-profile-edit svg{width:14px;height:14px;margin-left:4px}
.ref-profile-metrics{margin:20px 0;padding:0}.ref-profile-metrics span{gap:4px}
.ref-profile-metrics strong{font:500 30px/38px var(--font-ui);font-variant-numeric:tabular-nums}
.ref-profile-metrics small{font:400 12px/18px var(--font-ui);color:var(--sub)}
.ref-insight{margin:0 -18px;padding:18px 20px;min-height:88px;text-align:left;font:400 14px/22px var(--font-ui);color:#625c52;background:linear-gradient(125deg,#f7f0de,#f4edf7)}
.ref-me-board{margin-bottom:24px}.ref-me-board>.ref-section-heading{flex-wrap:nowrap;gap:4px;margin-bottom:12px}
.ref-me-board h2{white-space:nowrap}.ref-board-tools{display:flex;align-items:center;margin-right:-8px}
.ref-board-tools button{width:44px;height:44px;padding:12px;border:0;background:none;color:var(--sub)}.ref-board-tools svg{width:20px;height:20px}
.ref-board-settings .v40-toolbar{display:none}body.v40-editing .ref-board-settings .v40-toolbar{display:grid}
.ref-me-board .v40-board{padding:0;border:1px solid #e8e3dc;border-radius:20px;overflow:hidden}.ref-me-board .v40-board canvas{border-radius:0}
.ref-me-badges{margin:24px 0}.ref-badge-grid{gap:8px;padding:12px 0}.ref-badge-grid strong{font:500 13px/20px var(--font-ui)}
.ref-badge-grid small{font:400 12px/18px var(--font-ui);color:var(--sub)}
.ref-badge-grid button>span{width:min(64px,100%);height:auto;aspect-ratio:1;margin-bottom:8px}
.ref-other-grid{gap:12px}.ref-other-grid button{padding:16px;border:1px solid #e9e6df;border-radius:20px;background:#fffdf9}
.ref-other-grid svg{width:24px;height:24px;color:var(--ink);margin-bottom:12px}.ref-other-grid strong{font:500 16px/24px var(--font-ui)}
.ref-other-grid span{font:400 12px/18px var(--font-ui);color:var(--sub);margin-top:6px}.ref-more summary{min-height:44px;text-align:center}
.reference-sheet{width:min(100%,390px)}.reference-header{padding:0 18px;min-height:64px}.reference-header h1{font:600 20px/28px var(--font-ui);letter-spacing:0}
.ref-icon{width:44px;height:44px}.ref-icon svg{width:20px;height:20px}.reference-content{padding:24px 18px calc(24px + env(safe-area-inset-bottom))}
.reference-content h3{font:600 20px/28px var(--font-ui)}.ref-book-detail p,.ref-book-detail li{font:400 16px/28px var(--font-ui)}
.reference-content .ref-book-summary{font:400 14px/22px var(--font-ui)!important}.reference-content section{margin:24px 0}
.ref-book-hero{gap:18px;grid-template-columns:110px minmax(0,1fr)}.ref-audio{border-radius:20px;padding:16px}.ref-save{min-height:44px}
.agent-message{gap:8px;margin-bottom:24px}.agent-message p{background:none;padding:0;max-width:calc(100% - 32px);font:400 16px/28px var(--font-ui)}
.agent-message.user p{background:#eae8e5;padding:12px 16px;border-radius:20px}
.agent-avatar{width:24px;height:24px;flex-basis:24px;background:#ebe9e0;color:#55554b}.agent-avatar svg{width:16px;height:16px}
.agent-examples{padding-left:32px}.agent-examples button{font:400 14px/22px var(--font-ui)}
.agent-composer{padding:12px 18px max(16px,env(safe-area-inset-bottom));border:0}.agent-input-row{padding:2px;min-height:48px;border-radius:24px}
.agent-input-row .ref-icon{width:44px;height:44px;flex:0 0 44px}.agent-input-row textarea{font-size:16px;line-height:24px;padding:8px 0}
.agent-send{position:relative;width:32px;height:32px;flex-basis:32px;margin:0 6px;background:var(--selected);display:grid;place-items:center}.agent-send:before{content:'';position:absolute;inset:-6px}.agent-send svg{width:18px;height:18px}
.agent-composer-hint,.agent-composer-hint button{font-size:12px!important;line-height:18px}.agent-composer-hint{flex-wrap:wrap;gap:4px}.agent-composer-hint button{min-height:32px}
.agent-title-label,.agent-fields label{font-size:12px}.agent-fields input,.agent-fields select{height:44px;font-size:14px}.agent-tag{font-size:12px}
.agent-attachments{flex-wrap:nowrap;overflow-x:auto}.agent-attachments>span{flex-shrink:0;max-width:240px;font-size:12px}.agent-attachments button{min-height:36px;min-width:36px}
/* Calendar shares the reference's uncluttered time cards. */
.date-head{margin:0 0 6px}.date-head h1{margin:0;font:600 21px/32px var(--font-ui);white-space:nowrap}.date-head small{font:400 12px/18px var(--font-ui)}
.view-toggle button{min-height:38px;font-size:13px;padding:6px 10px}.today-quote{margin:0 0 16px;font:400 12px/18px var(--font-ui);color:var(--sub)}
.calendarstrip{margin:0 0 20px}.day-axis{position:relative;margin-left:44px;margin-right:0}.day-hour{position:absolute;left:0;right:0;height:1px;background:#dcdad3}
.day-hour>span{position:absolute;right:calc(100% + 8px);top:-9px;font:400 12px/18px var(--font-ui);color:#817e76}
.day-event{position:absolute;display:flex;align-items:stretch;border:0;border-radius:4px;background:#e2e8f5;color:#3f4d6b;overflow:hidden;padding:0 4px 0 0;min-width:0}
.day-event:before{content:'';position:absolute;left:2px;top:4px;bottom:4px;width:3px;background:#8d9fce;border-radius:4px}
.day-event.official{background:var(--schedule-rose);color:#303030}.day-event.official:before{background:#ab0040}
.day-event.course{background:#e9e1f4;color:#58436b}.day-event.course:before{background:#a18cbf}
.day-event.habit{background:#e1f1e8;color:#3d6051}.day-event.habit:before{background:#90c6ac}
.day-event-check{position:relative;align-self:flex-start;flex:0 0 44px;width:44px;height:44px;background:none;border:0;padding:12px 8px 12px 14px;color:inherit}
.day-event-check span,.today-overview-check span{display:grid;place-items:center;width:14px;height:14px;border:1px solid currentColor;border-radius:3px;font-size:12px;line-height:14px}
.day-event-open{flex:1;min-width:0;text-align:left;padding:8px 2px;border:0;background:none;color:inherit;font:inherit;overflow:hidden}
.day-event-open strong{display:block;font:700 14px/20px var(--font-ui);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day-event-open>span{display:block;font:400 12px/18px var(--font-ui);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day-event.is-done strong{text-decoration:line-through}.day-event.is-done{opacity:.65}
.day-event.compact .day-event-open>span{display:none}
svg[data-icon="brain-side"]{fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round}
.ico svg[data-solid="true"] .brain-contour{fill:currentColor}
.ico svg[data-solid="true"] .brain-folds{stroke:var(--cream);stroke-width:1.1}
.day-axis .now-line span{position:absolute;right:calc(100% + 5px);top:-10px;background:var(--brand);color:#fff;border-radius:4px;padding:0 3px;font:400 12px/18px var(--font-ui)}
.floating-add{width:52px;height:52px;right:max(18px,calc((100% - 354px)/2));display:grid;place-items:center;padding:14px}.floating-add svg{width:24px;height:24px}
.calendar-period{display:flex;align-items:center;justify-content:space-between;margin:16px 0}.calendar-period strong{font-size:16px;font-weight:500}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.calendar-weekday{text-align:center;font-size:12px;color:var(--sub);padding:8px 0}
.calendar-cell{min-height:54px;border:0;border-radius:12px;background:none;color:var(--ink);padding:6px 0;display:grid;gap:2px}.calendar-cell strong{font-size:16px;font-weight:500}.calendar-cell span{font-size:12px;line-height:18px;min-height:18px;color:var(--sub)}
.calendar-cell.selected{background:var(--selected);color:#fff}.calendar-cell.selected span{color:#fff}.calendar-cell.outside{opacity:.45}
.day-agenda{margin-top:24px}.day-agenda h2{margin-bottom:16px}.day-agenda .day-event,.day-loose .day-event{position:relative;min-height:64px;margin-bottom:8px}.day-loose{display:grid;grid-template-columns:44px 1fr;gap:0;margin-bottom:20px}.day-loose>span{font-size:12px;color:var(--sub)}
@media(max-width:360px){.ref-me-board>.ref-section-heading{flex-wrap:wrap}.ref-board-tools{margin-left:auto}.ref-profile{padding:18px 16px 0}.ref-insight{margin:0 -16px}.ref-book-grid{gap:24px 10px}.ref-book-hero{grid-template-columns:94px minmax(0,1fr)}.date-head{gap:4px}.date-head h1{font-size:20px}.view-toggle button{padding:6px 8px}.agent-input-row .ref-icon{flex-basis:40px;width:40px}}

.ref-avatar{padding:0;overflow:hidden}
.ref-avatar img,.ref-avatar-preview img{display:block;width:100%;height:100%;object-fit:cover}
.ref-profile-editor{max-width:440px;margin:0 auto;padding-bottom:12px}
.ref-avatar-upload{display:flex;flex-direction:column;align-items:center;text-align:center;margin:12px 0 30px}
.ref-avatar-preview{display:grid;place-items:center;width:96px;height:96px;overflow:hidden;border-radius:50%;background:linear-gradient(120deg,#f7dc86,#f4be65);color:#50452c;font-size:38px;cursor:pointer}
.ref-avatar-upload-label{position:relative;display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin-top:12px;padding:0 18px;border:1px solid #e5dfd7;border-radius:24px;cursor:pointer;color:#D70050}
.ref-avatar-upload-label input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.ref-avatar-upload-label:focus-within{outline:2px solid #D70050;outline-offset:3px}
.ref-avatar-upload .ref-muted{font-size:12px;max-width:260px;margin:10px 0 0;line-height:1.7}
.ref-profile-error{color:#D70050;font-size:13px;line-height:1.6;margin:12px 0;min-height:21px}
.ref-profile-editor .btn.red{background:#D70050;color:#fff}
.ref-profile-editor .btn:disabled{opacity:.5;cursor:wait}
