:root{--canvas:#f4f7fc;--paper:#ffffff;--ink:#223654;--text:#40516c;--muted:#6b7c96;--primary:#4f7de4;--primary-hover:#3d66c5;--soft:#edf3ff;--line:#dfe7f3;--gold:#4f7de4;--warm:#d7e2fb;--danger:#a54a3b;--radius:20px;font-family:"Microsoft YaHei","PingFang SC","Noto Sans CJK SC",system-ui,sans-serif;color:var(--text);background:var(--canvas);font-size:16px;line-height:1.65;font-synthesis:none}
*{box-sizing:border-box}body{margin:0}a{color:inherit;text-decoration:none}a:hover{color:var(--primary)}button,input,select,textarea{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #728abf;outline-offset:3px}button[hidden],[hidden]{display:none!important}h1,h2,h3,h4,p{margin:0}h1,h2,h3{color:var(--ink);font-weight:600;line-height:1.4}h1{font-size:32px;letter-spacing:-.6px}h2{font-size:22px;letter-spacing:-.3px}h3{font-size:19px}p+p{margin-top:10px}img{max-width:100%;object-fit:cover}hr{border:0;border-top:1px solid var(--line);width:100%;margin:24px 0}small,.tiny{font-size:14px}.muted{color:var(--muted)}.error-text{color:var(--danger)}.preserve{white-space:pre-wrap;overflow-wrap:anywhere}.stack{display:flex;flex-direction:column;gap:20px}.page-stack{gap:28px}.row{display:flex;align-items:center;gap:12px}.between{justify-content:space-between}.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.eyebrow{font-family:Georgia,"Times New Roman",serif;color:var(--muted);font-size:13px;letter-spacing:2px;font-weight:500}.text-link{font-size:15px;color:var(--primary);font-weight:600;white-space:nowrap}.text-link:hover{text-decoration:underline}.count{display:inline-block;margin-left:12px;background:#ccdbfa;color:#374d7c;border-radius:30px;padding:1px 9px;font-size:14px;vertical-align:middle}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:10px 19px;border:1px solid var(--line);border-radius:10px;line-height:1.4;background:var(--paper);color:var(--text);font-weight:500;transition:background .18s,transform .18s,border-color .18s;text-align:center}.button:hover{background:#e7eefd;border-color:#9cb5ea;color:var(--primary)}.button.primary{background:var(--primary);color:#ffffff;border-color:var(--primary);box-shadow:0 3px 6px #4f7de41a}.button.primary:hover{background:var(--primary-hover);border-color:var(--primary-hover)}.button.danger{color:var(--danger);border-color:#e3c8bf;background:#fff8f4}.button.danger:hover{background:#f4e3dc}.button.small{min-height:33px;padding:6px 12px;font-size:14px;border-radius:8px}.button.ghost{border-color:transparent;background:transparent;min-height:30px;padding:5px 9px;box-shadow:none}.button.ghost:hover{background:var(--soft)}.button.icon-button{padding:2px;min-width:30px;min-height:30px;border:0;background:transparent;color:#6a7691;font-size:22px;box-shadow:none}.button.icon-button:hover{background:var(--soft)}.badge{display:inline-flex;align-items:center;border-radius:6px;background:#d7e2fb;color:#364a77;padding:3px 8px;font-size:13px;white-space:nowrap;line-height:1.5}.badge+.badge{margin-left:2px}.badge.error{color:var(--danger);background:#faeae4}.panel{padding:26px 28px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);display:flex;flex-direction:column;gap:18px;min-width:0}.panel>.row h3{margin:0}.panel .panel{padding:18px}.notice{padding:14px 17px;background:#e2eafc;border:1px solid #b0c5f2;border-radius:10px;color:#384e7d;font-size:15px;line-height:1.8}.notice.error,.form-error{color:var(--danger);background:#fbede7;border-color:#ebd6cc}.form-error{padding:12px 15px;border-radius:8px;font-size:15px;white-space:pre-wrap;overflow-wrap:anywhere}.empty-state{text-align:center;padding:48px 24px;background:var(--paper);border:1px dashed #aec2ec;border-radius:var(--radius);display:flex;align-items:center;flex-direction:column;gap:12px;width:100%}.empty-state p{max-width:440px;font-size:15px}.empty-state .button{margin-top:6px}.empty-symbol{display:flex;align-items:center;justify-content:center;background:#dce6fc;color:#395080;width:54px;height:54px;border-radius:50%;font-size:28px}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:22px}.page-heading h1{margin-top:7px}.heading-description{margin-top:10px;font-size:15px;max-width:720px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:15px}.section-heading h2{margin-top:5px}.narrow{max-width:970px}.initial-loading{min-height:100vh;display:flex;gap:20px;flex-direction:column;align-items:center;justify-content:center;color:var(--muted)}.route-loading{min-height:300px;display:flex;align-items:center;justify-content:center;gap:12px;color:var(--muted)}.loading-dot{width:10px;height:10px;border-radius:50%;background:#6882bb;animation:pulse 1s infinite alternate}.skip-link{position:fixed;top:-60px;left:20px;z-index:20;background:var(--primary);color:#fff;padding:10px}.skip-link:focus{top:20px}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.mobile-only{display:none!important}
/* Typography is shared across modes; media queries only rearrange the layout. */
/* Blue application frame */
.sidebar{position:fixed;inset:0 auto 0 0;width:238px;background:#ebf1fd;border-right:1px solid #cad6f1;padding:34px 24px 20px;display:flex;flex-direction:column;z-index:10}.brand-row{display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:11px}.brand>span{font-size:27px;line-height:1.2;font-weight:650;color:var(--primary);letter-spacing:4px}.brand small{display:block;font-family:Georgia,serif;font-size:9px;letter-spacing:1.7px;margin-top:8px;font-weight:400}.brand-subtitle{color:#64718d;font-size:12px;letter-spacing:1.6px;margin:19px 0 33px 1px}.main-nav{display:flex;flex-direction:column;gap:7px}.nav-link{display:flex;align-items:center;gap:13px;color:#596682;font-size:15px;padding:12px 16px;border-radius:10px;line-height:1.7;min-height:46px}.nav-link:hover{background:#dce6fb}.nav-link.active{color:var(--primary);font-weight:600;background:#bdd0f9}.nav-icon{width:19px;font-size:22px;line-height:1;display:inline-flex;justify-content:center;color:#5472b2}.nav-link.active .nav-icon{color:var(--primary)}.admin-nav{border-top:1px solid var(--line);padding-top:15px;margin-top:15px}.notification-count{margin-left:auto;border-radius:10px;background:var(--primary);color:white;font-size:12px;padding:0 6px}.sidebar-note{margin:auto 0 28px;padding:45px 15px 0;color:#62708f;font-size:14px;line-height:1.9}.sidebar-note>span{display:block;margin-bottom:9px;font-size:26px;color:#6d87be}.sidebar-account{border-top:1px solid #c2d0ef;padding-top:20px}.user-profile{display:flex;align-items:center;gap:10px}.user-profile>div{min-width:0;flex:1}.user-profile small{display:block;font-size:12px}.user-name{font-size:14px;display:block;max-width:95px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-avatar{background:#b6cbf8;color:#394f7e;width:36px;height:36px;border-radius:50%;font-size:15px;display:flex;justify-content:center;align-items:center}.workspace{margin-left:238px;min-height:100vh;display:flex;flex-direction:column}.topbar{height:85px;display:flex;justify-content:space-between;align-items:center;padding:0 42px;border-bottom:1px solid var(--line);gap:18px}.topbar-greeting{font-size:14px;color:#63708b;letter-spacing:.5px}.topbar>.row{gap:24px}.server-status{display:flex;align-items:center;gap:7px;font-size:12px;color:#68738a}.server-status i{width:5px;height:5px;border-radius:50%;background:#a3afc9}.server-status.connected i{background:#57966a}.server-status.offline{color:var(--danger)}.main-content{width:100%;max-width:1620px;padding:33px 42px 44px;flex:1;outline:none}.site-footer{margin:0 42px;padding:22px 0;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:20px;font-size:12px;color:#68738b;letter-spacing:.3px}.nav-backdrop{display:none}
/* Welcome and companion illustrations */
.hero{border-radius:24px;background:linear-gradient(115deg,#dce6fc 0%,#b7ccf8 62%,#a9c1f6 100%);min-height:336px;display:flex;overflow:hidden;position:relative;border:1px solid #93b1f3}.hero-copy{padding:39px 38px 36px;width:61%;position:relative;z-index:1}.hero-copy .eyebrow{font-size:11px;letter-spacing:2.2px;color:#394f7e}.hero-copy h1{font-size:38px;line-height:1.5;letter-spacing:1px;color:#283859;margin:16px 0}.hero-copy>p:not(.eyebrow){font-size:14px;line-height:1.9;color:#3c5384}.hero-copy .actions{margin-top:23px;gap:24px}.hero-copy .button{font-size:14px;padding:12px 21px}.hero-art{position:relative;width:42%;min-height:336px;isolation:isolate}.sun-disc{position:absolute;width:240px;height:240px;border-radius:50%;background:radial-gradient(circle at 36% 30%,#a3bdf6,#5d8bef);top:39px;left:-12px;box-shadow:0 0 0 20px #a9c1f6}.art-caption{position:absolute;bottom:29px;right:34px;font-size:12px;color:#395080;letter-spacing:1px}.botanical{position:absolute;width:90px;height:150px;z-index:-1}.botanical:before,.botanical:after{content:"";display:block;position:absolute;width:33px;height:84px;border-radius:90% 4% 90% 4%;background:#83b76b;box-shadow:18px 29px 0 #a8cd78;transform:rotate(-25deg)}.leaf-one{bottom:30px;right:15px;transform:rotate(23deg)}.leaf-two{bottom:5px;left:-47px;transform:rotate(-26deg) scale(.68)}.illustrated-panda{position:absolute;width:230px;height:260px;bottom:14px;left:-8px;transform:rotate(-5deg)}.face{position:absolute;z-index:3;width:158px;height:134px;background:#f6f8fe;top:19px;left:33px;border-radius:48% 48% 45% 45%;box-shadow:inset -9px -8px 0 #cdd9f4,0 5px 10px #3c54871a}.ear{position:absolute;background:#534943;width:48px;height:51px;top:5px;border-radius:50%;z-index:2}.ear.left{left:30px;transform:rotate(-30deg)}.ear.right{right:29px;transform:rotate(30deg)}.eye{position:absolute;width:36px;height:45px;background:#5b5049;top:43px;border-radius:45%;transform:rotate(32deg)}.eye.left{left:25px}.eye.right{right:25px;transform:rotate(-32deg)}.eye:after{content:"";position:absolute;top:14px;left:13px;width:9px;height:11px;background:#f6f8fe;border-radius:50%;box-shadow:2px 2px 0 #332c29 inset}.nose{width:20px;height:14px;background:#534943;position:absolute;left:69px;top:91px;border-radius:40% 40% 50% 50%}.nose:after{content:"";display:block;position:absolute;left:0;top:7px;border:1.5px solid #534943;border-top:0;border-radius:0 0 12px 12px;width:20px;height:16px}.cheek{position:absolute;top:89px;width:24px;height:10px;border-radius:50%;background:#ffb79b;opacity:.7}.cheek.left{left:15px}.cheek.right{right:13px}.panda-body{position:absolute;left:34px;top:123px;background:#f6f8fe;width:166px;height:127px;border-radius:45% 45% 43% 43%;box-shadow:inset -15px -10px #cad7f3}.panda-body:before,.panda-body:after{content:"";width:61px;height:36px;background:#534943;position:absolute;bottom:-4px;border-radius:50%;left:-6px;transform:rotate(-18deg)}.panda-body:after{left:auto;right:-8px;transform:rotate(18deg)}.arm{position:absolute;background:#534943;width:46px;height:97px;top:137px;border-radius:50%;left:17px;transform:rotate(-14deg);z-index:4}.arm.right{left:auto;right:9px;top:120px;transform:rotate(-55deg);height:85px}.scenario-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.scenario{padding:27px 29px;border:1px solid var(--line);border-radius:18px;background:#eff3fd;position:relative;overflow:hidden}.scenario:hover{border-color:#7f9ad4}.scenario.memorial{background:#e8effd;border-color:#cad7f4}.scenario.memorial:hover{border-color:#8eaae6}.scenario .eyebrow{font-size:11px;letter-spacing:1.5px;margin-bottom:12px}.scenario h3{font-size:19px;font-weight:500;letter-spacing:.5px}.scenario p:not(.eyebrow){font-size:13px;color:#636d82;margin:9px 0 16px}.scenario .text-link{font-size:13px}.scenario-symbol{position:absolute;font-size:88px;color:#9db5e9;right:25px;top:35px;font-family:Georgia,serif;opacity:.6;line-height:1}.memorial .scenario-symbol{color:#7fa2ef}.gentle-note{font-size:12px;text-align:center;letter-spacing:.3px;color:#66718a;padding:2px 10px}
/* Companions and their collections */
.pet-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.pet-grid>.empty-state{grid-column:1/-1}.pet-card{background:var(--paper);border-radius:18px;overflow:hidden;border:1px solid var(--line);transition:transform .2s,box-shadow .2s}.pet-card:hover{transform:translateY(-3px);box-shadow:0 10px 30px #46619c14}.pet-card-image{height:177px;display:flex;align-items:center;justify-content:center;background:#dce6fc;overflow:hidden}.pet-card:nth-child(3n+2) .pet-card-image{background:#ecf1fd}.pet-card.memorial .pet-card-image{background:#e2eafc}.pet-card-body{padding:18px 20px 17px}.pet-card-body h3{font-size:20px;font-weight:500}.pet-card-body>.muted{font-size:13px;margin-top:5px}.pet-story{font-size:13px;color:#636f8a;margin:12px 0 18px!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:36px}.pet-card .text-link{font-size:13px}.pet-avatar{width:66px;height:66px;border-radius:18px;display:block;flex-shrink:0;object-fit:cover;background:#ccdbfa}.pet-avatar.placeholder{display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;color:#3f588d;font-size:44px;font-family:Georgia,serif}.pet-avatar.placeholder:before{content:"";position:absolute;border-radius:50%;width:80%;height:80%;background:#e9effd;top:22%;left:10%}.pet-avatar.placeholder span{position:relative;z-index:1}.pet-avatar.card-avatar{height:100%;width:100%;border-radius:0}.pet-avatar.placeholder.card-avatar{font-size:98px;width:150px;height:150px;background:transparent;overflow:visible;transform:rotate(-7deg)}.pet-avatar.placeholder.card-avatar:after{content:"";position:absolute;top:24px;left:18px;background:#5b5049;border-radius:50%;width:37px;height:37px;box-shadow:76px 0 0 #5b5049}.pet-avatar.placeholder.card-avatar span{color:#5b5049;font-size:102px;line-height:1;transform:translateY(11px)}.pet-avatar.placeholder.card-avatar:before{z-index:1;background:#f1f5fe;top:40px;height:105px;width:140px;left:5px}.pet-avatar.placeholder.card-avatar span{z-index:2}.pet-avatar.mini{width:34px;height:34px;border-radius:11px;font-size:26px}.pet-heading{display:flex;align-items:center;gap:19px}.pet-heading h1{font-size:29px}.pet-heading .muted{font-size:13px;margin-top:4px}.tabs{display:flex;gap:26px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:thin;flex-shrink:0}.tabs a{padding:0 2px 15px;font-size:14px;color:#67738d;white-space:nowrap;border-bottom:2px solid transparent}.tabs a.active{color:var(--primary);font-weight:600;border-color:var(--primary)}.asset-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.asset-card{border:1px solid var(--line);padding:10px;border-radius:12px;min-width:0}.asset-card>img{width:100%;height:145px;border-radius:8px;margin-bottom:9px}.asset-card>p{overflow-wrap:anywhere;font-size:14px}.asset-card .actions{margin-top:12px;gap:6px}.knowledge-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.knowledge-grid .panel>p{font-size:15px}.knowledge-grid .panel>.preserve{max-height:320px;overflow:auto}.preview-answer:not(:empty){background:#e6edfd;border-radius:14px;padding:20px;border-left:3px solid #8399c8}
/* Inputs, tables, dialogs */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),textarea,select{width:100%;border:1px solid #c1cee9;background:#fafcff;border-radius:9px;padding:11px 13px;min-height:43px;color:var(--text);transition:border-color .15s,background .15s}input::placeholder,textarea::placeholder{color:#74809b;font-size:14px}input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):focus,textarea:focus,select:focus{border-color:#5976b5;background:white}textarea{resize:vertical;line-height:1.8}input[type=file]{width:100%;font-size:14px;color:var(--muted);padding:8px 0}input[type=file]::file-selector-button{background:#dce6fc;color:var(--primary);padding:9px 13px;border:1px solid #b8c9ef;border-radius:8px;margin-right:12px;cursor:pointer}input[type=checkbox]{accent-color:var(--primary);width:16px;height:16px;flex-shrink:0}input[type=range]{accent-color:var(--primary);width:100%;height:20px;margin:0;cursor:pointer}.field{display:flex;flex-direction:column;gap:8px;min-width:0}.field>label{font-size:14px;font-weight:500;color:#4c5b7b}.field small{font-size:13px;line-height:1.7}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.check-field{display:flex;align-items:flex-start;gap:10px;font-size:14px;color:#596682;cursor:pointer}.check-field input{margin-top:3px}.trait-grid{display:grid;grid-template-columns:1fr 1fr;gap:23px 36px}.trait{display:grid;grid-template-columns:1fr 30px;align-items:center;column-gap:10px}.trait .field{gap:10px}.trait output{font-size:14px;color:#3f578c;text-align:right;align-self:end;padding-bottom:2px}.trait>small{grid-column:1/-1;font-size:12px;color:#6a7792;display:flex;justify-content:space-between}fieldset{border:1px solid var(--line);border-radius:10px;padding:16px;display:flex;gap:12px;flex-wrap:wrap}legend{font-size:14px;padding:0 7px;color:var(--muted)}.code-input,.json-view{font-family:Consolas,"SFMono-Regular",monospace;font-size:13px;tab-size:2}.json-view{white-space:pre-wrap;overflow-wrap:anywhere;max-height:460px;overflow:auto;background:#eff3fd;border:1px solid var(--line);padding:16px;border-radius:10px;line-height:1.8;margin:0}.table-wrap{width:100%;overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:14px}th{font-size:13px;font-weight:500;color:#5e6c8b;letter-spacing:.5px;background:#ebf1fd}td,th{padding:14px 12px;border-bottom:1px solid var(--line);vertical-align:middle}td .actions{flex-wrap:nowrap}td{max-width:400px;overflow-wrap:anywhere}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#f5f8fe}details>summary{font-size:13px;color:#435d94;cursor:pointer}details[open]>summary{margin-bottom:12px}details .json-view{margin-top:8px;min-width:160px}.toolbar{display:flex;gap:14px;align-items:center}.toolbar input{max-width:390px}.toolbar select{max-width:180px}.modal{border:1px solid var(--line);border-radius:20px;padding:26px 28px;max-width:720px;width:calc(100% - 32px);max-height:90vh;color:var(--text);background:var(--paper);box-shadow:0 24px 100px #32456e30}.modal::backdrop{background:#252f4659;backdrop-filter:blur(3px)}.modal-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:23px}.modal-heading h2{font-size:22px}.modal .panel{background:#f4f7fe}.toasts{position:fixed;bottom:26px;right:26px;z-index:99;display:flex;flex-direction:column;gap:10px;pointer-events:none;max-width:min(450px,calc(100vw - 32px))}.toast{padding:14px 20px;background:var(--primary);color:#ffffff;border-radius:11px;box-shadow:0 10px 25px #32456e20;font-size:14px;animation:slide-in .2s ease-out}.toast.error{background:#9d5444}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.stat-card{padding:22px 25px;border:1px solid var(--line);border-radius:16px;background:var(--paper)}.stat-card .muted{font-size:14px}.stat-card strong{font-family:Georgia,serif;font-weight:400;font-size:36px;display:block;margin-top:8px}
/* A conversation with room to breathe */
.chat-layout{display:grid;grid-template-columns:190px minmax(0,1fr);border:1px solid var(--line);border-radius:20px;overflow:hidden;min-height:580px;background:var(--paper)}.chat-history{background:#f0f5fe;padding:22px 16px;border-right:1px solid var(--line)}.chat-history h3{font-size:14px;font-weight:500;color:#4e618b}.history-list{display:flex;flex-direction:column;gap:6px;margin-top:17px;max-height:500px;overflow-y:auto}.button.history-item{border:0;justify-content:flex-start;padding:10px 11px;min-height:38px;font-size:13px;background:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;text-align:left;color:#5e6d8d}.button.history-item.active{background:#c7d7fa;color:var(--primary)}.chat-main{min-width:0;display:flex;flex-direction:column;position:relative}.messages{height:440px;overflow-y:auto;overscroll-behavior:contain;padding:28px 26px;display:flex;flex-direction:column;gap:24px;scroll-behavior:smooth}.messages>.empty-state{border:0;align-self:center;background:transparent;margin:auto;gap:13px;padding:30px 5px}.messages>.empty-state p{font-size:14px;max-width:370px}.message{display:flex;gap:11px;max-width:91%;align-self:flex-start;min-width:0}.message.from-user{align-self:flex-end;flex-direction:row-reverse}.message-body{min-width:0}.message-meta{display:flex;gap:10px;align-items:center;margin-bottom:7px}.message-meta strong{font-size:13px;font-weight:500;color:#586787}.message-meta time{font-size:11px;color:#6e7b98}.from-user .message-meta{justify-content:flex-end}.message-bubble{padding:13px 17px;border-radius:0 13px 13px;background:#e7eefd;font-size:15px;line-height:1.9;color:#3e4e71}.from-user .message-bubble{border-radius:13px 0 13px 13px;background:#c3d4f9;color:#2c3e63}.message-text:empty:after{content:'· · ·';color:#516fb1;animation:pulse 1s infinite alternate}.message-tools{display:flex;flex-wrap:wrap;gap:3px;align-items:center;margin-top:5px}.message-tools .button{font-size:11px;color:#536793;min-height:23px;padding:2px 6px}.message-tools summary{font-size:11px}.message-tools details{margin-left:8px}.message-tools details[open]{width:100%;margin-left:0}.message-status{display:block;margin-top:6px}.message-image{display:block;max-width:280px;max-height:220px;object-fit:contain;border-radius:8px;margin-top:8px}.composer{border-top:1px solid var(--line);margin-top:auto;padding:16px 21px 14px;display:flex;flex-direction:column;gap:9px;background:#ffffff}.composer>textarea{border:0;background:transparent!important;resize:none;padding:5px 3px;min-height:60px;font-size:15px;outline:none!important}.composer-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px}.composer-bottom>.actions{gap:7px}.composer .tiny{font-size:11px}.composer .button[type=submit]{font-size:13px;min-height:34px;padding:7px 17px}.composer .row.between{border-top:1px solid #d6e0f5;padding-top:6px;min-height:24px;gap:6px}.composer .row.between>.tiny{max-width:80%;overflow-wrap:anywhere}.composer .row.between>.button{font-size:11px;padding:3px 0;min-height:20px}.attachment-list{display:flex;flex-wrap:wrap;gap:8px}.attachment-chip{border:1px solid var(--line);border-radius:8px;padding:5px;display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}.attachment-chip img{width:30px;height:30px;border-radius:4px}.attachment-chip>span{max-width:110px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.attachment-chip .button{font-size:18px;min-width:22px;min-height:22px}
/* Account entrance */
.auth-layout{display:grid;grid-template-columns:1fr 1fr;max-width:1120px;min-height:560px;gap:30px;align-items:center}.auth-story{padding:30px}.auth-story h1{font-size:30px;line-height:1.8;margin-top:24px;font-weight:500}.auth-story>p:not(.eyebrow){font-size:15px;color:#5a6a8b;line-height:2}.auth-story .eyebrow{font-size:11px;letter-spacing:1.7px}.auth-flower{font-family:Georgia,serif;font-size:132px;color:#8398c7;line-height:1.5;padding-left:35px}.auth-panel{padding:35px 32px;gap:20px;box-shadow:0 8px 40px #46619c0a}.auth-panel h2{font-size:26px}.auth-panel>.muted{font-size:14px;margin-top:-10px}.auth-panel form{gap:19px}.auth-panel form>.button{width:100%;margin-top:3px}.auth-links{display:flex;justify-content:space-between;gap:12px;font-size:13px;color:#425c93;padding-top:9px}.auth-links a:hover{text-decoration:underline}
@keyframes pulse{from{opacity:.35}to{opacity:1}}@keyframes slide-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:1500px){.main-content{padding:40px 60px 50px}.hero{min-height:370px}.hero-copy{padding:43px 48px}.hero-art{min-height:370px}.illustrated-panda{left:24px;transform:rotate(-5deg) scale(1.13);bottom:29px}.sun-disc{left:14px;top:43px;width:265px;height:265px}.pet-card-image{height:220px}.pet-card-body{padding:22px 24px}.chat-layout{min-height:670px}.messages{height:530px}.topbar{padding:0 60px}.site-footer{margin:0 60px}}
@media(max-width:1200px){.sidebar{width:210px;padding:28px 18px 20px}.workspace{margin-left:210px}.main-content{padding:28px}.topbar{padding:0 28px}.site-footer{margin:0 28px}.hero-copy{padding:30px;width:63%}.hero-art{width:37%}.illustrated-panda{left:-25px;transform:rotate(-5deg) scale(.9)}.sun-disc{width:210px;height:210px;left:-35px;top:50px}.art-caption{right:16px;}.pet-grid{gap:16px}.pet-card-image{height:160px}.pet-card-body{padding:16px}.pet-card-body>.row:first-child{gap:5px}.pet-card .badge{padding:3px 5px}.scenario{padding:23px}.scenario-symbol{right:12px;top:55px;}.chat-layout{grid-template-columns:155px minmax(0,1fr)}.chat-history{padding:18px 12px}.messages{padding:23px 18px}.asset-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.panel{padding:23px}.tabs{gap:20px}.auth-layout{gap:14px}.auth-story{padding:15px}.auth-panel{padding:28px 24px}}
@media(max-width:980px){.sidebar{width:185px;padding:25px 13px 18px}.workspace{margin-left:185px}.brand img{width:36px;height:36px}.brand{gap:8px;margin-left:7px}.brand small{letter-spacing:1.1px}.brand-subtitle{margin-left:9px}.nav-link{padding:11px 12px;gap:10px}.main-content{padding:24px}.topbar{padding:0 24px;height:75px}.hero-copy h1{letter-spacing:0}.hero-copy{padding:28px}.hero-art{min-height:310px}.hero-copy .eyebrow{letter-spacing:1px}.hero-copy .actions{gap:15px}.hero-art .art-caption{display:none}.illustrated-panda{left:-35px;bottom:3px;transform:rotate(-5deg) scale(.8)}.sun-disc{left:-35px;top:64px;width:185px;height:185px}.hero{min-height:310px}.pet-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero+.section-heading{margin-top:0}.scenario-grid{gap:16px}.scenario{padding:21px}.scenario-symbol{opacity:.35}.scenario .eyebrow{letter-spacing:1px}.site-footer{margin:0 24px;flex-wrap:wrap;gap:7px}.pet-heading{gap:13px;flex-wrap:wrap}.knowledge-grid{grid-template-columns:1fr}.chat-layout{grid-template-columns:minmax(0,1fr)}.chat-history{border-right:0;border-bottom:1px solid var(--line);padding:12px 18px}.history-list{margin-top:6px;flex-direction:row;max-height:48px}.history-list .button.history-item{flex-shrink:0;max-width:180px;padding:8px;min-height:30px}.messages{height:440px}.auth-layout{grid-template-columns:1fr;max-width:500px;margin:auto}.auth-story{display:none}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.page-heading{align-items:flex-start}.page-heading>.button{padding:9px 12px;white-space:nowrap}.asset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.mobile-only{display:inline-flex!important}.sidebar{width:245px;transform:translateX(-100%);transition:transform .2s;padding:26px 22px 20px}.nav-open .sidebar{transform:translateX(0)}.nav-open .nav-backdrop{display:block;position:fixed;inset:0;z-index:9;background:#252f464a;border:0}.workspace{margin-left:0}.topbar{height:66px;padding:0 20px;background:var(--canvas)}.topbar>.row{gap:12px}.topbar .server-status{display:none}.topbar .button.small{min-height:32px;padding:7px 10px}.main-content{padding:22px 20px 30px}.sidebar .brand{margin:0}.brand img{width:40px;height:40px}.brand small{letter-spacing:1.5px}.brand-subtitle{margin-left:0;margin-bottom:28px}.nav-link{padding:12px 16px}.site-footer{margin:0 20px}.sidebar-note{padding-top:25px}.hero-copy{width:63%;padding:27px}.hero-art{width:37%}.hero-art .illustrated-panda{left:-20px;bottom:0;transform:rotate(-5deg) scale(.83)}.hero-art .sun-disc{left:-23px}.hero-copy .eyebrow{letter-spacing:1.2px}.hero-copy .button{padding:11px 15px}.hero-copy .actions{gap:16px}.hero{min-height:325px}.hero-art{min-height:325px}.pet-card-image{height:185px}.pet-grid{gap:16px}.panel{padding:23px}.pet-heading .row{flex-wrap:wrap;gap:6px}.tabs{gap:24px}.trait-grid{gap:20px 25px}.page-stack{gap:25px}.toasts{bottom:20px;right:16px}.chat-layout{min-height:600px}.message{max-width:96%}.messages{height:420px}.form-grid{gap:18px}}
@media(max-width:500px){.main-content{padding:18px 16px 26px}.topbar{padding:0 16px}.topbar-greeting{letter-spacing:0;}.hero{min-height:360px;border-radius:18px;overflow:hidden}.hero-copy{padding:27px 23px;width:100%;z-index:2}.hero-copy h1{line-height:1.55;letter-spacing:.5px;margin:17px 0 14px}.hero-copy>p:not(.eyebrow){line-height:1.9;max-width:240px}.hero-copy .eyebrow{letter-spacing:1.15px;white-space:nowrap}.hero-copy .actions{margin-top:23px;flex-wrap:wrap;gap:17px}.hero-art{position:absolute;width:130px;height:160px;min-height:160px;bottom:0;right:1px;opacity:.85;z-index:1;pointer-events:none}.hero-art .illustrated-panda{left:-37px;bottom:-51px;transform:rotate(-6deg) scale(.57)}.hero-art .sun-disc{width:140px;height:140px;top:10px;left:-1px;box-shadow:0 0 0 14px #a9c1f6}.leaf-one{transform:rotate(23deg) scale(.6);right:-40px;bottom:-25px}.leaf-two{display:none}.hero-copy .actions>.button{padding:10px 13px;}.hero-copy .actions{position:relative;z-index:3;max-width:250px}.scenario-grid{grid-template-columns:1fr;gap:14px}.scenario{padding:22px 24px}.scenario-symbol{top:25px;right:25px;opacity:.7}.scenario p:not(.eyebrow){max-width:220px}.pet-grid{gap:12px}.pet-card-image{height:138px}.pet-card-body{padding:13px}.pet-card-body>.row:first-child{display:block}.pet-card-body>.row:first-child .badge{margin-top:5px;line-height:1.4;}.pet-story{min-height:31px;margin:9px 0 13px!important}.pet-card-body>.row:last-child{gap:5px}.pet-avatar.placeholder.card-avatar{transform:rotate(-7deg) scale(.85)}.pet-card-image>.pet-avatar.card-avatar:not(.placeholder){width:100%;height:100%}.section-heading{margin-bottom:14px}.section-heading .eyebrow{letter-spacing:1.4px}.page-heading{gap:15px;flex-wrap:wrap}.page-heading>.button{min-height:34px}.form-grid,.trait-grid{grid-template-columns:1fr}.trait-grid{gap:18px}.panel{border-radius:15px;padding:21px 18px}.panel .stack{gap:18px}.asset-grid{grid-template-columns:1fr 1fr;gap:10px}.asset-card>img{height:115px}.asset-card .button{padding:5px 7px}.asset-card .actions{gap:4px}.toolbar{flex-wrap:wrap}.toolbar input{max-width:100%}.toolbar select{max-width:100%;flex:1}.pet-heading .pet-avatar{width:54px;height:54px;border-radius:15px}.pet-heading .badge{padding:2px 5px}.tabs{gap:23px}.tabs a{padding-bottom:12px}.chat-layout{margin:0 -4px;border-radius:14px;min-height:600px}.chat-history{padding:10px 13px}.messages{padding:21px 13px;height:390px;gap:20px}.message{gap:8px;max-width:98%}.message .pet-avatar.mini{width:27px;height:27px;border-radius:8px;}.message-bubble{padding:11px 13px}.message-image{max-width:210px}.composer{padding:13px 13px 10px}.composer .keyboard-hint{display:none}.composer-bottom{gap:8px}.composer-bottom .button{padding:7px 10px;min-height:32px}.composer .row.between>.tiny{max-width:74%}.auth-panel{padding:26px 22px}.modal{padding:22px 19px;border-radius:17px}.stat-grid{gap:12px}.stat-card{padding:18px}.site-footer{margin:0 16px;gap:5px;flex-direction:column}.empty-state{padding:35px 20px}}
.pet-avatar.placeholder.card-avatar:after{display:none}.pet-avatar.placeholder.card-avatar span{font-size:68px;color:#4d6bab;transform:translateY(29px)}.chat-consent{padding:15px 18px 0}.chat-consent .notice{font-size:13px}.chat-consent .text-link{margin-left:8px;font-size:13px}.stat-card strong.usage-metric{font-family:inherit;font-size:22px;line-height:1.6;overflow-wrap:anywhere}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.message-timing{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:7px;font-variant-numeric:tabular-nums;font-size:12px;line-height:1.6}

/* Illustrated guides use local, responsive UI diagrams instead of remote images. */
.guide-page{--guide-accent:#4f7de4;--guide-soft:#edf3ff}
.guide-page p{line-height:1.85}
.guide-intro{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:32px 36px;border:1px solid #cbd3e4;border-radius:22px;background:linear-gradient(115deg,#dbe3f4,#eceff5)}
.guide-intro h2{margin:10px 0;font-size:34px;line-height:1.4}
.guide-intro p{max-width:600px;margin:0;color:#61656d}
.guide-mascot{display:flex;flex-direction:column;align-items:center;gap:12px;flex-shrink:0;text-align:center;font-size:14px;color:#636a78}
.guide-mascot img{filter:drop-shadow(0 8px 12px #4966a330)}
.guide-role-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:12px}
.guide-role{display:flex;flex-direction:column;gap:8px;padding:20px 16px;border:1px solid #d8dce5;border-radius:16px;background:#f8fafe;text-decoration:none;color:inherit;transition:border-color .15s,background .15s}
.guide-role:hover{border-color:var(--guide-accent)}
.guide-role.selected{background:var(--guide-soft);border-color:var(--guide-accent);box-shadow:inset 0 0 0 1px var(--guide-accent)}
.guide-role-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:#d6deef;color:#3d517c;font-size:24px}
.guide-role.selected .guide-role-icon{background:#d6dbe7;color:var(--guide-accent)}
.guide-role strong{font-size:16px}
.guide-role small{font-size:14px;line-height:1.6;color:#6b6e75}
.guide-lesson{display:grid;grid-template-columns:minmax(230px,.85fr) minmax(0,1.3fr);gap:30px;align-items:start}
.guide-diagram{margin:0;min-width:0;border:1px solid #d3d7e0;border-radius:16px;overflow:hidden;background:#e8ecf4}
.guide-window-bar{display:flex;align-items:center;gap:5px;padding:13px 16px;background:#d8deea;color:#595e69;font-size:13px}
.guide-window-bar i{width:6px;height:6px;border-radius:50%;background:#9aa4b9}
.guide-window-bar span{margin-left:8px}
.guide-flow{display:flex;flex-direction:column;list-style:none;margin:0;padding:24px;gap:26px}
.guide-flow li{position:relative;display:grid;grid-template-columns:42px minmax(0,1fr);column-gap:12px;align-items:center;padding:16px;background:#fbfcff;border:1px solid #d1d7e5;border-radius:12px}
.guide-flow li+li:before{content:'↓';position:absolute;top:-25px;left:calc(50% - 6px);font-size:20px;color:#818794}
.guide-flow-icon{grid-row:span 2;display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#e5e8ee;color:var(--guide-accent);font-size:25px}
.guide-flow strong{font-size:15px;line-height:1.6}
.guide-flow small{color:#6d717a;font-size:13px;line-height:1.7}
.guide-diagram figcaption{padding:0 22px 20px;color:#696e79;font-size:14px;line-height:1.8}
.guide-diagram-meet,.guide-diagram-create{background:#dfe7f8}
.guide-diagram-team,.guide-diagram-system{background:#e9ecf2}
.guide-steps{list-style:none;counter-reset:guide-step;display:flex;flex-direction:column;gap:22px;margin:0;padding:0}
.guide-steps>li{display:flex;align-items:flex-start;gap:14px;counter-increment:guide-step}
.guide-steps>li:before{content:counter(guide-step,decimal-leading-zero);display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;border-radius:10px;background:var(--guide-soft);color:var(--guide-accent);font-size:14px;font-weight:700}
.guide-steps h3{font-size:17px;line-height:1.7;margin:2px 0 6px}
.guide-steps p{font-size:15px;color:#666970;margin:0;overflow-wrap:anywhere}
.guide-resource-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.guide-command{min-width:0;margin:12px 0}
.guide-command pre{margin:8px 0 0;padding:18px 20px;border:1px solid #d7dae2;border-radius:12px;background:#edeff4;color:#334e7d;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.9;tab-size:2}
.guide-page>*,.guide-lesson>*{min-width:0}
.guide-page>.guide-diagram .guide-flow{flex-direction:row}
.guide-page>.guide-diagram .guide-flow li{flex:1}
.guide-page>.guide-diagram .guide-flow li+li:before{content:'→';top:calc(50% - 12px);left:-23px}
.guide-page details{padding:14px 0;border-bottom:1px solid #dce2ee}
.guide-page summary{cursor:pointer;font-size:16px;font-weight:600;line-height:1.7}
.guide-page details p{font-size:15px;color:#666970}
.guide-role:focus-visible,.guide-page summary:focus-visible{outline:3px solid #4f7de4;outline-offset:4px}
@media(max-width:1000px){.guide-lesson{grid-template-columns:1fr}.guide-page>.guide-diagram .guide-flow{flex-direction:column}.guide-page>.guide-diagram .guide-flow li+li:before{content:'↓';top:-25px;left:calc(50% - 6px)}}
@media(max-width:600px){.guide-intro{padding:22px;align-items:flex-start}.guide-mascot{display:none}.guide-role-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.guide-role{padding:15px 12px}.guide-resource-grid{grid-template-columns:1fr}.guide-flow{padding:18px}.guide-lesson{gap:22px}.guide-command pre{padding:14px;}}

/* Shared layout: use the available workspace, with compact intrinsic actions. */
:root{--primary-soft:#edf3ff;--primary-border:#c8d8fa;--radius:16px}
.workspace{min-width:0}
.main-content{max-width:none;min-width:0;padding:24px 28px 32px}
.narrow{width:100%;max-width:none}
.topbar{height:76px;padding:0 28px}
.site-footer{margin:0 28px;padding:16px 0}
.sidebar{padding-top:26px;overflow-y:auto}
.brand-subtitle{margin-bottom:22px}
.main-nav{gap:4px}
.nav-link{min-height:42px;padding-top:9px;padding-bottom:9px}
.sidebar-note{padding-top:24px;margin-bottom:20px}
.stack{gap:16px}
.page-stack{gap:20px}
.panel{padding:20px;gap:16px}
.panel .panel{padding:16px}
.panel>.row,.section-heading,.page-heading,.pet-heading>.row{flex-wrap:wrap}
.page-heading>div{min-width:0}
.heading-description{max-width:none}
.button{width:fit-content;max-width:100%;align-self:flex-start;flex:0 0 auto;min-height:40px;padding:9px 16px;white-space:normal;overflow-wrap:anywhere}
.actions>.button,.row>.button,.page-heading>.button,.modal-heading>.button{align-self:center}
.auth-panel form>.button{width:fit-content}
.button.history-item{width:100%;align-self:stretch;max-width:100%}
.pet-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));gap:16px}
.pet-card-image{height:168px}
.pet-card-body{padding:16px}
.pet-card-body>.row{flex-wrap:wrap;gap:8px}
.pet-story{margin:10px 0 14px!important;min-height:0}
.knowledge-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:16px;align-items:start}
.asset-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),1fr));gap:12px;align-items:start}
.asset-card>img{height:140px;object-fit:cover}
.stat-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:14px}
.stat-card{padding:18px 20px;min-width:0}
.scenario-grid,.guide-resource-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:16px}
.scenario{padding:24px}
.account-page,.settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,400px),1fr));gap:16px;align-items:start}
.account-page>.page-heading{grid-column:1/-1}
.account-page>.panel:nth-child(2){grid-row:span 2}
.account-page>*{min-width:0}
.create-form{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;align-items:start}
.form-grid,.trait-grid{gap:16px}
td,th{padding:12px 10px}
td .actions{flex-wrap:wrap}
.table-wrap{min-width:0}
.toolbar{flex-wrap:wrap}
.tabs{flex-wrap:wrap;overflow-x:visible;gap:8px 22px}
.tabs a{padding-bottom:10px}
.auth-layout{width:100%;max-width:none;margin:0;grid-template-columns:minmax(0,1fr) minmax(0,1fr);min-height:calc(100vh - 200px);gap:24px}
.auth-panel{padding:28px}
.auth-story{display:block}
.auth-links{flex-wrap:wrap}
.guide-intro{padding:24px 28px}
.guide-role{padding:16px}
.guide-lesson{gap:22px}
.guide-flow{padding:18px}
.guide-flow li{padding:13px}
.guide-steps{gap:18px}
.chat-history{width:auto}
.chat-layout{min-height:600px}
.message-bubble{font-size:15px}
.composer-bottom{flex-wrap:wrap}
.composer-bottom>.actions{flex:1;min-width:0}
.composer .row.between{flex-wrap:wrap}
@media(min-width:1800px){
  .guide-lesson{grid-template-columns:minmax(260px,.65fr) minmax(0,1.8fr)}
  .guide-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));align-items:start}
  .hero-copy{width:65%}.hero-art{width:35%}
}
@media(max-width:1100px){.auth-layout{gap:16px}}
@media(max-width:760px){
  .main-content{padding:20px}.topbar{height:66px;padding:0 20px}.site-footer{margin:0 20px}
  .auth-layout{grid-template-columns:minmax(0,1fr);min-height:0}.auth-story{display:none}
  .chat-layout{min-height:580px}.topbar>.row{gap:10px}
}
@media(max-width:500px){
  .main-content{padding:16px 14px 24px}.topbar{padding:0 14px}.site-footer{margin:0 14px}
  .account-page>.panel:nth-child(2){grid-row:auto}
  .panel{padding:18px 16px}.page-stack{gap:18px}
  .pet-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr))}
  .pet-card-image{height:180px}.pet-card-body{padding:16px}.pet-card-body>.row:first-child{display:flex}
  .pet-card-body>.row:first-child .badge{margin:0;}
  .form-grid,.trait-grid{grid-template-columns:minmax(0,1fr)}
  .guide-role-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.guide-role{padding:14px 12px}
  .page-heading>.button{white-space:normal}
  .message-meta{flex-wrap:wrap}
  .message-image{max-width:100%}.composer .row.between>.tiny{max-width:100%}
}

/* On chat pages the message list owns scrolling and fills the remaining viewport. */
.workspace:has(.chat-workspace){height:100dvh;min-height:0}
.workspace:has(.chat-workspace)>.topbar,.workspace:has(.chat-workspace)>.site-footer{flex-shrink:0}
.chat-workspace{display:flex;flex-direction:column;min-height:0}
.chat-workspace>.pet-page{flex:1;min-height:0}
.chat-workspace .pet-heading,.chat-workspace .tabs{flex-shrink:0}
.chat-workspace .chat-layout{flex:1;min-height:260px}
.chat-workspace .chat-main{min-height:0;overflow:hidden}
.chat-workspace .messages{flex:1;height:0;min-height:80px}
.chat-workspace .composer,.chat-workspace .chat-consent{flex-shrink:0}
.chat-workspace .composer-bottom>.actions:last-child{flex:0 0 auto;justify-content:flex-end}
.chat-workspace .chat-history{min-height:0;display:flex;flex-direction:column;overflow:hidden}
.chat-workspace .history-list{flex:1;min-height:0;max-height:none}
.organization-heading{display:flex;align-items:center;gap:16px;min-width:0}
.organization-heading>div{min-width:0}
.organization-heading h2{overflow-wrap:anywhere}
.organization-logo{width:64px;height:64px;flex-shrink:0;object-fit:contain;border:1px solid var(--line);border-radius:14px;background:white;padding:5px}
.organization-logo.placeholder{display:grid;place-items:center;background:var(--primary-soft);color:var(--primary);font-size:28px;font-weight:600}
.organization-logo-preview{width:112px;height:112px}
.organization-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,560px),1fr));gap:24px}
.organization-card{--organization-logo-size:224px;display:grid;grid-template-columns:var(--organization-logo-size) minmax(0,1fr);gap:0;min-width:0;padding:0;overflow:hidden;color:inherit;text-decoration:none;transition:border-color .15s,box-shadow .15s}
.organization-card-logo{position:relative;align-self:start;width:100%;aspect-ratio:1;min-width:0;background:var(--primary-soft)}
.organization-card-logo .organization-logo{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:0;object-fit:cover;object-position:center}
.organization-card-logo .placeholder{font-size:48px}
.organization-card-body{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:16px;min-width:0;padding:32px}
.organization-card-body>*{flex-shrink:0}
.organization-card-body h2{overflow-wrap:anywhere}
.pet-organization{overflow-wrap:anywhere}
.organization-card:hover,.organization-card:focus-visible{border-color:var(--primary);box-shadow:0 4px 18px #4f7de41a}
.organization-card .text-link{align-self:flex-start}
.notification-list{list-style:none;margin:0;padding:0;border-block:1px solid var(--line)}
.notification-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:24px;padding:20px 4px;border-bottom:1px solid var(--line)}
.notification-row:last-child{border-bottom:0}
.notification-content{display:flex;flex-direction:column;gap:10px;min-width:0;overflow-wrap:anywhere}
.notification-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.notification-row .actions{justify-content:flex-end}
.voice-preview-player{display:flex;flex-direction:column;align-items:flex-start;gap:12px;margin-top:18px;padding:18px;border:1px solid var(--line);border-radius:12px;background:var(--primary-soft)}
.voice-preview-player audio{width:100%;max-width:520px}
.organization-page>.panel>.actions{margin-top:20px}
.organization-animals{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:16px}
.organization-animals>.empty-state{grid-column:1/-1}
.organization-animal{display:flex;flex-direction:column;gap:20px;min-width:0}
.organization-animal-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.organization-animal-heading>div:not(.pet-avatar){min-width:0;flex:1}
.organization-animal-heading h3{overflow-wrap:anywhere}
.organization-animal-heading>.actions{flex-basis:100%!important}
.organization-animal-filters{gap:12px;flex-wrap:wrap}
.organization-animal-filters input{flex:1;min-width:min(100%,180px)}
@media(max-width:980px){
  .chat-workspace .chat-history{max-height:106px;flex-shrink:0}
  .chat-workspace .history-list{min-height:38px;overflow-x:auto;overflow-y:hidden}
}
@media(max-height:650px){
  .workspace:has(.chat-workspace){height:auto;min-height:100dvh}
  .chat-workspace .chat-layout{min-height:460px}
}

/* Facts and relationship memories remain ordered, full-width lists. */
.record-list{display:flex;flex-direction:column;list-style:none;padding:0;margin:0;background:var(--paper);border:1px solid var(--line);border-radius:14px;overflow:hidden}
.record-row{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:16px 18px;min-width:0;border-bottom:1px solid var(--line)}
.record-row:last-child{border-bottom:0}
.record-row:hover{background:#f8faff}
.record-main{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.record-main .row{flex-wrap:wrap;gap:8px}
.record-main h3{font-size:17px;overflow-wrap:anywhere}
.record-main>.preserve{font-size:15px;line-height:1.8;max-height:none}
.record-sources{display:flex;gap:8px 16px;flex-wrap:wrap}
.record-row>.actions{flex:0 0 auto;max-width:260px;justify-content:flex-end}
.record-meta{font-size:12px;color:var(--muted)}
/* JS enhances existing responsive grids; without JS they retain normal grid layout. */
.masonry-panels{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,400px),1fr));column-gap:16px}
.guide-page.masonry-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,620px),1fr));column-gap:16px}
.guide-page.masonry-grid>.page-heading,.guide-page.masonry-grid>.guide-intro,.guide-page.masonry-grid>.guide-role-grid,.guide-page.masonry-grid>.notice,.guide-page.masonry-grid>.guide-diagram{grid-column:1/-1}
.masonry-grid{grid-auto-rows:1px;grid-auto-flow:dense;row-gap:0;align-items:start}
.masonry-grid>*{min-width:0;margin-block:0}
.account-page.masonry-grid>.panel:nth-child(2){grid-row-start:auto}
@media(max-width:760px){
  .record-row{flex-direction:column;gap:12px;padding:15px 16px}
  .record-row>.actions{max-width:100%;justify-content:flex-start}
}

/* One record per line; narrow viewports scroll the list without wrapping rows. */
.record-list{display:block;overflow-x:auto;overflow-y:hidden}
.record-row{flex-direction:row;align-items:center;min-width:820px;gap:16px;padding:9px 14px;min-height:52px}
.record-main{flex-direction:row;align-items:center;gap:12px}
.record-main>.badge,.record-main>.record-meta{flex-shrink:0;white-space:nowrap}
.record-preview{display:flex;align-items:center;gap:12px;flex:1;min-width:80px;padding:4px 0;border:0;background:transparent;color:var(--text);text-align:left;font-size:15px;line-height:1.6}
.record-preview:hover{color:var(--primary)}
.record-preview strong{max-width:35%;flex-shrink:0;font-weight:600}
.record-preview span{flex:1;min-width:0}
.record-preview strong,.record-preview span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.record-row>.actions{max-width:none;flex-wrap:nowrap;justify-content:flex-end;gap:8px}
.record-row>.actions .button{white-space:nowrap}

/* Keep conversation management reachable beside truncated titles. */
.history-entry{display:flex;align-items:center;min-width:0;flex-shrink:0;border-radius:9px}
.history-entry.active{background:#c7d7fa}
.history-entry .button.history-item{flex:1;min-width:0;width:auto;background:transparent}
.history-more{flex:0 0 28px;min-width:28px;min-height:32px;padding:2px;font-size:20px;color:var(--primary);background:transparent}
.history-more:hover,.history-more:focus-visible{background:#d7e3fc}
.conversation-menu{position:fixed;inset:auto;margin:0;padding:5px;width:166px;max-width:calc(100vw - 16px);border:1px solid #e3e8f1;border-radius:12px;background:#fff;color:#465571;box-shadow:0 6px 24px #273d651a,0 2px 6px #273d650a}
.conversation-menu:popover-open{display:block;animation:conversation-menu-in .12s ease-out}
.conversation-menu .button.conversation-menu-item{display:flex;align-items:center;justify-content:flex-start;gap:11px;width:100%;min-height:38px;padding:8px 11px;border:0;border-radius:7px;background:transparent;color:inherit;font-size:13px;font-weight:400;box-shadow:none;text-align:left}
.conversation-menu-item svg{width:17px;height:17px;flex-shrink:0;color:#7b89a3}
.conversation-menu .conversation-menu-item:hover,.conversation-menu .conversation-menu-item:focus-visible{background:#f0f4fb;color:#34538b;outline:none}
.conversation-menu .conversation-menu-item.is-danger{color:#c55357}
.conversation-menu-item.is-danger svg{color:inherit}
.conversation-menu .conversation-menu-item.is-danger:hover,.conversation-menu .conversation-menu-item.is-danger:focus-visible{background:#fff1f1;color:#b63d44}
.conversation-menu-divider{height:1px;margin:4px 7px;background:#edf0f5}
@keyframes conversation-menu-in{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.conversation-menu:popover-open{animation:none}}
@media(max-width:980px){.history-entry{max-width:220px}.history-entry .button.history-item{flex-shrink:1}.history-list{max-height:52px}}

/* Companion templates in the creation form. */
.template-picker{margin:0;min-width:0;padding:24px 26px;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);display:block}
.template-picker>:not(legend)+*{margin-top:16px}
.template-picker legend{padding:0 8px;font-size:22px;font-weight:600;color:var(--ink)}
.template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.template-option{position:relative;display:flex;flex-direction:column;overflow:hidden;min-width:0;cursor:pointer;border:2px solid var(--line);border-radius:16px;background:#fafcff;transition:border-color .15s,box-shadow .15s}
.template-option:hover{border-color:#9cb5ea}.template-option:has(input:checked){border-color:var(--primary);box-shadow:0 0 0 3px #4f7de414;background:#f1f5ff}.template-option:focus-within{outline:3px solid #728abf;outline-offset:3px}
.template-option>img{width:100%;height:auto;aspect-ratio:1;object-fit:cover}.template-copy{display:flex;flex-direction:column;gap:4px;padding:14px;min-width:0}.template-copy strong{font-size:19px;color:var(--ink)}.template-summary{font-size:14px;color:var(--muted);overflow-wrap:anywhere;line-height:1.7}
.template-copy{overflow-wrap:anywhere}.template-copy strong{white-space:normal}
.template-option input[type=radio]{position:absolute;right:12px;top:12px;width:20px;height:20px;min-height:0;margin:0;accent-color:var(--primary);cursor:pointer}
.template-custom{display:flex;align-items:center;gap:10px;cursor:pointer;min-height:44px}.template-custom input[type=radio]{width:18px;height:18px;min-height:0;margin:0;accent-color:var(--primary)}
.template-persona-fields{min-width:0}
html[data-display-mode=mobile] .template-picker{padding:18px 16px}
html[data-display-mode=mobile] .template-grid{grid-template-columns:minmax(0,1fr);gap:12px}
html[data-display-mode=mobile] .template-option{display:grid;grid-template-columns:92px minmax(0,1fr)}
html[data-display-mode=mobile] .template-option>img{width:92px;height:100%;min-height:120px;aspect-ratio:auto}
html[data-display-mode=mobile] .template-copy{padding:12px 36px 12px 12px}
/* Companion template administration keeps the catalog as a list in both modes. */
.template-admin-avatar{display:block;width:64px;height:64px;object-fit:cover;border-radius:12px;max-width:none}
.template-admin-list{min-width:0}
.template-admin-list table{min-width:760px}
.template-admin-list td:nth-child(2){min-width:110px}
.template-admin-list td:nth-child(3){min-width:200px;max-width:320px;overflow-wrap:anywhere}
.modal.template-editor{width:min(960px,calc(100vw - 32px));max-width:960px}
.template-editor-grid{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:24px;align-items:start}
.template-editor-grid>.stack{min-width:0}
.template-editor-preview{width:100%;aspect-ratio:1;object-fit:cover;border-radius:14px;border:1px solid var(--line)}
html[data-display-mode=mobile] .template-editor-grid{grid-template-columns:minmax(0,1fr)}
html[data-display-mode=mobile] .template-editor-preview{max-width:180px}
@media(max-width:600px){.template-editor-grid{grid-template-columns:minmax(0,1fr)}.template-editor-preview{max-width:180px}}
.persona-section{display:flex;flex-direction:column;align-items:stretch;min-width:0;gap:16px}
.persona-fields>.persona-section{margin:0;padding:18px 16px;border-radius:12px}
.persona-fields>.persona-section>legend{font-size:17px;font-weight:700;color:var(--ink);border-left:4px solid var(--primary);padding:0 10px;line-height:1.4}
.persona-section>p{margin:0;font-size:13px}
.persona-section>.button{align-self:flex-start}
.persona-profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.persona-profile-fields.masonry-grid{row-gap:0}
.persona-profile-fields>.persona-section{padding:20px;gap:16px}
.persona-profile-fields>.persona-section>h2{font-size:19px}
.persona-profile-fields>.persona-section[aria-label="口头禅设置"],.persona-profile-fields>.persona-section[aria-label="互动规则设置"]{grid-column:1/-1}
.persona-profile-fields .trait-grid{grid-template-columns:minmax(0,1fr);gap:20px}
.persona-save-bar{flex-direction:row;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px}
.persona-save-bar>p{font-size:14px}
.persona-save-bar>.button{flex-shrink:0}
@media(max-width:1000px){.persona-profile-fields{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.persona-save-bar{flex-direction:column;align-items:stretch}}
html[data-display-mode=mobile] .persona-profile-fields{grid-template-columns:minmax(0,1fr)}
html[data-display-mode=mobile] .persona-save-bar{flex-direction:column;align-items:stretch}
.persona-phrase-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:16px;align-items:start}
.catchphrase-helper-entry{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--soft)}
.catchphrase-helper-entry>p{font-size:13px}
.persona-phrase-column{display:flex;flex-direction:column;gap:12px;min-width:0;padding:12px;border:1px solid var(--line);border-radius:10px}
.persona-phrase-column>h3,.persona-phrase-column>p{margin:0}
.persona-phrase-column>p{font-size:13px}
.persona-phrase-column>.button{align-self:flex-start}
.persona-phrase-list{display:flex;flex-direction:column;gap:8px}
.persona-phrase{display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--paper);min-width:0}
.persona-phrase-text{grid-column:2/-1}
.persona-phrase-probability{grid-column:2}
.persona-phrase-delete{grid-column:3;grid-row:2}
.persona-phrase-condition{grid-column:2/-1;min-width:0}
.persona-phrase:has(.persona-phrase-condition)>.persona-phrase-text{grid-column:2;grid-row:1}
.persona-phrase:has(.persona-phrase-condition)>.persona-phrase-delete{grid-row:1}
.persona-phrase [hidden]{display:none}
.persona-phrase:has(input[type=checkbox]:checked){border-color:#adc3f0;background:#f8faff}
.persona-phrase>input[type=checkbox]{margin:0}
.persona-phrase input.persona-phrase-text[type=text][name]{min-width:0;padding:9px 10px;font-size:14px}
.persona-phrase-probability{display:flex;align-items:center;gap:6px;font-size:13px;white-space:nowrap}
.persona-phrase .persona-phrase-probability input[type=number][name]{width:66px;min-width:0;padding:9px 6px;font-size:14px;text-align:center}
.persona-phrase .persona-phrase-delete{min-height:44px;min-width:64px;padding:9px 12px;font-size:14px;white-space:nowrap}
/* Small, finite virtual interactions; respect both account and system motion choices. */
.companion-actions { padding: .5rem 1rem; flex-wrap: wrap; }
.companion-stage { text-align: center; padding: 1.5rem; border-radius: 1rem; background: var(--surface, #f6f3ed); }
.companion-expression { font-size: 3rem; line-height: 1.4; animation: companion-arrive .5s ease-out; }
.companion-stage.still .companion-expression { animation: none; }
@keyframes companion-arrive { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .companion-expression { animation: none; } }

/* Keep the whole companion image visible inside a square at every card size. */
.pet-card-image{height:auto;aspect-ratio:1/1}
.pet-card-image>.pet-avatar.card-avatar:not(.placeholder){width:100%;height:100%;object-fit:contain}

.organization-page .actions>.button{background:var(--primary-soft);border-color:#9cb5ea;color:#345cae;box-shadow:0 2px 4px #4f7de414;font-weight:600}
.organization-page .actions>.button:hover{background:#dce8ff;border-color:var(--primary);box-shadow:0 3px 8px #4f7de426}
.organization-page .actions>.button:active{transform:translateY(1px);box-shadow:none}
.organization-page .actions>.button:focus-visible{outline:3px solid var(--primary);outline-offset:3px}

/* Give writing and identity records room; keep image tools together. */
.profile-workspace{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:20px;align-items:start;min-width:0}
.profile-column{display:flex;flex-direction:column;gap:16px;min-width:0}
.pet-page:has(>.profile-workspace){gap:12px}
.profile-workspace .panel{padding:20px;gap:16px}
.profile-workspace .panel h2{font-size:19px}
.profile-workspace form.stack{gap:14px}
.profile-workspace .field{gap:6px}
.profile-workspace .form-grid{gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
.profile-workspace input:not([type=file]):not([type=checkbox]){height:40px;min-width:0;padding:8px 10px;line-height:1.5}
.profile-workspace textarea{min-height:80px;height:80px}
.profile-workspace textarea[name=story]{min-height:240px;height:clamp(240px,30vh,360px);resize:vertical;line-height:1.8}
.profile-workspace .notice{padding:10px 12px;font-size:14px;line-height:1.65}
.profile-images form.stack{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px}
.profile-images form>.button{align-self:end}
.profile-photo-empty{font-size:14px;padding:12px 0;border-top:1px solid var(--line)}
.profile-workspace .asset-grid{display:flex;flex-direction:column;gap:10px}
.profile-workspace .asset-card{display:grid;grid-template-columns:96px minmax(0,1fr);gap:6px 12px;padding:10px;width:100%}
.profile-workspace .asset-card>img{grid-column:1;grid-row:1/4;width:96px;height:96px;object-fit:contain;background:var(--primary-soft);border-radius:8px}
.profile-workspace .asset-card>p,.profile-workspace .asset-card>.actions{grid-column:2;margin:0}
.profile-workspace .asset-card>p{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-workspace .asset-card>.actions{gap:6px;align-self:start}
.profile-workspace .asset-card p,.profile-workspace .check-field{overflow-wrap:anywhere;min-width:0}
.profile-workspace .record-list{min-width:0;overflow:visible}
.profile-workspace .record-list:empty{display:none}
.profile-workspace .identity-panel .record-row{display:flex;min-width:0;flex-wrap:nowrap;height:auto;max-height:none;gap:12px;padding:10px 0}
.profile-workspace .identity-panel .record-main{display:flex;min-width:0;flex-wrap:nowrap;flex:1;gap:10px}
.profile-workspace .identity-panel .record-preview{min-width:0;overflow:hidden}
.profile-workspace .identity-panel .record-row>.actions{margin-left:0;flex-wrap:nowrap;flex:none;gap:6px}
@media(max-width:1000px){
  .profile-workspace{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:500px){
  .profile-workspace .asset-card{grid-template-columns:72px minmax(0,1fr);gap:6px 10px}
  .profile-workspace .asset-card>img{width:72px;height:72px}
  .profile-images form.stack{grid-template-columns:minmax(0,1fr)}
  .profile-images form>.button{justify-self:start}
}
/* Speech capture uses the same form controls in desktop and mobile layouts. */
.fact-input{padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--soft)}
.modal.knowledge-editor{width:min(1180px,calc(100vw - 32px));max-width:1180px;height:min(740px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);padding:16px 20px;overflow-y:auto}
.knowledge-editor .modal-heading{margin-bottom:12px}
.knowledge-editor .modal-heading h2{font-size:22px;line-height:1.4}
.knowledge-editor>form.stack{gap:10px;position:relative;padding-bottom:28px}
.knowledge-editor .field{gap:4px}
.knowledge-editor .field>small{font-size:13px;line-height:1.5}
.knowledge-editor textarea[name=content]{height:100px;min-height:100px;resize:none;padding:8px 10px}
.knowledge-editor input:not([type=checkbox]),.knowledge-editor select{min-height:40px;padding:8px 10px}
.knowledge-editor .fact-input{gap:6px;padding:8px 12px}
.knowledge-editor-main-fields{display:grid;grid-template-columns:2fr 1fr 1.5fr;gap:12px;align-items:start}
.knowledge-editor-main-fields:has([name=legacy_occurred_on]){grid-template-columns:1.6fr 1fr 1.5fr 1.5fr}
.knowledge-editor .knowledge-editor-semantics{display:grid;grid-template-columns:1fr 1.3fr 1.3fr 1.3fr;gap:8px 12px;margin:0;padding:8px 12px}
.knowledge-editor-semantics>.check-field{grid-column:1/-1}
.knowledge-editor-footer{display:grid;grid-template-columns:2fr 1.3fr auto;gap:12px;align-items:end}
.knowledge-editor-footer>.button{min-height:40px;white-space:nowrap;align-self:end}
.knowledge-editor>form>.form-error{position:absolute;bottom:0;left:0;right:0;margin:0;max-height:24px;overflow:auto}
@media(max-width:1000px){.knowledge-editor-main-fields,.knowledge-editor-main-fields:has([name=legacy_occurred_on]),.knowledge-editor .knowledge-editor-semantics{grid-template-columns:repeat(2,minmax(0,1fr))}}
html[data-display-mode=mobile] .modal.knowledge-editor{height:fit-content;max-height:calc(100dvh - 40px);padding:18px 16px}
html[data-display-mode=mobile] .knowledge-editor-main-fields,html[data-display-mode=mobile] .knowledge-editor .knowledge-editor-semantics,html[data-display-mode=mobile] .knowledge-editor-footer{grid-template-columns:minmax(0,1fr)}
.fact-input-toolbar{display:grid;grid-template-columns:max-content max-content minmax(0,1fr);align-items:center;gap:12px}
.fact-input-toolbar>.button{flex-shrink:0}
.fact-input-status-slot{height:48px;min-width:0;display:flex;align-items:center;overflow:hidden}
.fact-input-status{font-size:14px;line-height:1.7;max-height:100%;overflow-y:auto;margin:0;overflow-wrap:anywhere}
.fact-input .button[aria-pressed=true]{color:var(--danger,#a73434);border-color:currentColor}
.fact-input-status:empty{display:none}
@media(max-width:1050px){.fact-input-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}.fact-input-toolbar>.button{justify-self:stretch;padding-left:8px;padding-right:8px;white-space:nowrap}.fact-input-status-slot{grid-column:1/-1;height:72px}}
html[data-display-mode=mobile] .fact-input-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}
html[data-display-mode=mobile] .fact-input-toolbar>.button{justify-self:stretch;padding-left:8px;padding-right:8px;white-space:nowrap}
html[data-display-mode=mobile] .fact-input-status-slot{grid-column:1/-1;height:72px}
@media(max-width:360px){.fact-input-toolbar,html[data-display-mode=mobile] .fact-input-toolbar{grid-template-columns:minmax(0,1fr)}}
/* Administrator release history follows the application's shared type scale. */
.version-current{display:grid;grid-template-columns:auto minmax(0,1fr);gap:32px;align-items:center}
.version-current h2{font-size:32px;color:var(--primary)}
.version-current .stack{gap:8px;align-items:flex-start}
.version-entry-heading{display:flex;justify-content:space-between;align-items:baseline;gap:16px;flex-wrap:wrap}
.version-entry-heading h3{font-size:20px}
.version-entry-heading time{color:var(--muted);white-space:nowrap}
.version-summary{max-width:80ch}
.version-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 32px}
.version-sections h4{margin:0 0 8px;color:var(--ink)}
.versions-page ul{margin:0;padding-left:22px}
.versions-page li+li{margin-top:8px}
.versions-page li{overflow-wrap:anywhere}
@media(max-width:760px){.version-current,.version-sections{grid-template-columns:minmax(0,1fr);gap:20px}}
html[data-display-mode=mobile] .version-current,html[data-display-mode=mobile] .version-sections{grid-template-columns:minmax(0,1fr);gap:20px}

.reply-speech-bar{gap:10px;flex-shrink:0;flex-wrap:wrap}.reply-speech-bar:has(button:not([hidden]),[role=status]:not(:empty)){padding:6px 18px}.reply-speech-bar [role=status]{overflow-wrap:anywhere}
.message-speech-metrics{display:contents}

.chat-input-tools{flex:1 1 130px;min-width:0}.chat-input-tools>.button{flex-shrink:0}
.chat-speech-input{flex:1;min-width:0;overflow-wrap:anywhere}
.chat-speech-input:has([role=status]:empty),.chat-speech-input.is-recording{display:none}
.chat-speech-hold{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;white-space:nowrap}
.composer .chat-speech-hold{font-size:13px;min-height:34px;padding:7px 17px;min-width:calc(4em + 36px)}
.chat-send-actions,.chat-send-actions>.button{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.chat-speech-hold[aria-pressed=true]{background:var(--primary-hover);color:#fff;box-shadow:0 0 0 3px var(--primary-soft)}
.chat-speech-anchor{position:relative;display:inline-flex;flex:0 0 auto;align-self:center}
.chat-speech-cancel{position:absolute;bottom:calc(100% + 8px);left:0;z-index:5;width:100%;height:64px;min-height:64px;font-size:13px;line-height:1.4;white-space:pre-line;background:var(--primary-soft);border-color:var(--primary);color:var(--primary);box-shadow:0 3px 12px #23436c20;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.chat-speech-cancel.is-cancel-target{background:#fee4e2;border-color:var(--danger);color:var(--danger);box-shadow:0 0 0 2px var(--danger)}
.chat-toolbar{display:contents}
.chat-status:empty,.attachment-list:empty{display:none}

/* Numbered creation cards share two compact columns without splitting the editor state. */
.create-page{width:100%;max-width:none}
.creation-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:20px;min-width:0;align-items:start}
.creation-sections>.template-persona-fields,.creation-sections .persona-fields{display:contents}
.creation-sections .create-section{margin:0;padding:20px;gap:16px;border-radius:var(--radius)}
.create-page .trait-grid{grid-template-columns:minmax(0,1fr);gap:20px}
.create-page .creation-helper-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 24px;align-items:center}
.create-page .creation-helper-panel>h2,.create-page .creation-helper-panel>p{grid-column:1}
.create-page .creation-helper-panel>.actions{grid-column:2;grid-row:1/3;max-width:390px}
.create-page .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.create-page .field,.create-page select{min-width:0}
@media(max-width:500px){.create-page .form-grid{grid-template-columns:minmax(0,1fr)}}
.create-page .create-basics textarea{min-height:160px}
.create-review-actions{display:flex;align-items:center;justify-content:space-between;gap:24px}
.create-review-actions>.check-field{max-width:760px}
.create-review-actions>.button{align-self:center}
@media(max-width:1100px){
  .creation-sections{grid-template-columns:minmax(0,1fr)}
  .create-page .creation-helper-panel{grid-template-columns:minmax(0,1fr);gap:12px}
  .create-page .creation-helper-panel>.actions{grid-column:1;grid-row:auto;max-width:none}
}
html[data-display-mode=mobile] .creation-sections{grid-template-columns:minmax(0,1fr);grid-auto-rows:auto;grid-auto-flow:row;row-gap:16px}
html[data-display-mode=mobile] .creation-sections>.create-basics,html[data-display-mode=mobile] .creation-sections .create-section{grid-row:auto!important}
html[data-display-mode=mobile] .create-page .form-grid,html[data-display-mode=mobile] .create-page .trait-grid{grid-template-columns:minmax(0,1fr)}
html[data-display-mode=mobile] .create-page .creation-helper-panel{grid-template-columns:minmax(0,1fr);gap:12px}
html[data-display-mode=mobile] .create-page .creation-helper-panel>.actions{grid-column:1;grid-row:auto;max-width:none}
html[data-display-mode=mobile] .create-review-actions{flex-direction:column;align-items:stretch;gap:16px}
html[data-display-mode=mobile] .create-review-actions>.button{width:100%;align-self:stretch}

/* Creation assistant and field-by-field import preview. */
.modal.creation-helper-modal{max-width:1060px}
.creation-helper-modal .creation-steps{gap:8px}
.creation-helper-modal .creation-steps .button{flex:1;min-width:150px}
.creation-helper-modal textarea{max-height:45vh;min-height:180px}
.creation-helper-modal ol{margin:0;padding-left:24px;line-height:1.8}
.creation-preview-field{border:1px solid var(--line);border-radius:12px;padding:18px;min-width:0;display:flex;flex-direction:column;gap:14px}
.creation-preview-field>.check-field{font-weight:600}
.creation-preview-values{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}
.creation-preview-values>div{min-width:0}
.creation-preview-values p{margin-top:6px;max-height:260px;overflow:auto;line-height:1.8}
.creation-source-list{margin:0;padding-left:24px;overflow-wrap:anywhere;line-height:1.8}
.creation-source-list li+li{margin-top:10px}
@media(max-width:600px){.creation-preview-values{grid-template-columns:minmax(0,1fr);gap:12px}.creation-preview-field{padding:14px}.creation-helper-modal .creation-steps .button{min-width:0;flex:1 1 100%;font-size:14px}}

.panel.efficiency-test-panel{flex-direction:row;flex-wrap:wrap;align-items:center;gap:12px 20px;padding-block:14px}
.efficiency-test-panel>h2{flex:none;font-size:18px}
.efficiency-controls{display:flex;flex:1 1 588px;flex-wrap:wrap;align-items:center;gap:10px 14px;min-width:0}
.efficiency-controls>.field{flex:1 1 184px;flex-direction:row;align-items:center}
.efficiency-controls>.field:nth-child(2){flex:2 1 170px}
.efficiency-controls label{white-space:nowrap}
.efficiency-controls select{flex:1;min-width:0;text-overflow:ellipsis}
.efficiency-controls .button{white-space:nowrap}
.efficiency-readiness{flex-basis:100%}
.efficiency-readiness:empty,.efficiency-output:empty{display:none}
.efficiency-rankings{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px}
.efficiency-ranking{min-width:0;padding:14px 16px;border:1px solid var(--line);border-radius:12px}
.efficiency-ranking h3{font-size:15px;margin:0 0 8px}
.efficiency-ranking-metric{margin:0 0 8px}
.efficiency-ranking ol{margin:0;padding-inline-start:24px;font-size:14px}
.efficiency-ranking li+li{margin-top:8px}
.efficiency-rank-entry{display:flex;align-items:baseline;justify-content:space-between;gap:8px;overflow-wrap:anywhere}
.efficiency-rank-entry strong{flex:none;white-space:nowrap;font-variant-numeric:tabular-nums}
/* Conversation tools share the compact chat layout on desktop and mobile. */
.tool-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; gap: 6px; overflow-wrap: anywhere; }
.tool-card-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tool-call-badge { background: var(--soft); color: var(--primary-hover); }
.tool-call-status { color: var(--primary-hover); }
.tool-card[data-tool-status="failed"] .tool-call-status,
.tool-card[data-tool-status="unknown"] .tool-call-status { color: var(--danger); }
.message-history-more { flex-shrink: 0; text-align: center; }
.message-history-more[hidden] { display: none; }

/* A compact reading guide; profile choices do not edit companion settings. */
.guide-page.masonry-grid > .guide-persona { grid-column: 1 / -1; }
.guide-persona p, .guide-persona details p { font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.guide-persona h3 { margin: 0 0 8px; font-size: 18px; }
.guide-persona-overview, .guide-persona-config { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.guide-persona-overview { margin: 18px 0 8px; }
.guide-persona-overview article { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--primary-soft); }
.guide-persona-overview p { margin: 0; }
.guide-persona-examples { margin: 24px 0 10px; }
.guide-persona-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.guide-persona-choice { font-size: 16px; white-space: normal; }
.guide-persona-choice[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.guide-persona-choice:focus-visible { outline: 3px solid #4f7de4; outline-offset: 3px; }
.guide-persona-preview { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.guide-persona-preview h4 { margin: 0; font-size: 18px; }
.guide-persona-preview h5 { margin: 16px 0 10px; font-size: 16px; }
.guide-persona-reply, .guide-persona-rule { margin: 14px 0; padding: 14px 18px; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 0 10px 10px 0; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.guide-persona-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.guide-persona-values > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px; padding: 8px; border-radius: 8px; background: var(--primary-soft); }
.guide-persona-values dt { font-size: 14px; overflow-wrap: anywhere; }
.guide-persona-values dd { margin: 0; font-size: 16px; font-weight: 700; }
.guide-persona > .actions { margin-top: 20px; }
@media (max-width: 600px) {
  .guide-persona-preview { padding: 14px; }
  .guide-persona-values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
