@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(./KaTeX_AMS-Regular-BQhdFMY1.woff2) format("woff2"),url(./KaTeX_AMS-Regular-DMm9YOAa.woff) format("woff"),url(./KaTeX_AMS-Regular-DRggAlZN.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(./KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2) format("woff2"),url(./KaTeX_Caligraphic-Bold-BEiXGLvX.woff) format("woff"),url(./KaTeX_Caligraphic-Bold-ATXxdsX0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(./KaTeX_Caligraphic-Regular-Di6jR-x-.woff2) format("woff2"),url(./KaTeX_Caligraphic-Regular-CTRA-rTL.woff) format("woff"),url(./KaTeX_Caligraphic-Regular-wX97UBjC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(./KaTeX_Fraktur-Bold-CL6g_b3V.woff2) format("woff2"),url(./KaTeX_Fraktur-Bold-BsDP51OF.woff) format("woff"),url(./KaTeX_Fraktur-Bold-BdnERNNW.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(./KaTeX_Fraktur-Regular-CTYiF6lA.woff2) format("woff2"),url(./KaTeX_Fraktur-Regular-Dxdc4cR9.woff) format("woff"),url(./KaTeX_Fraktur-Regular-CB_wures.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(./KaTeX_Main-Bold-Cx986IdX.woff2) format("woff2"),url(./KaTeX_Main-Bold-Jm3AIy58.woff) format("woff"),url(./KaTeX_Main-Bold-waoOVXN0.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(./KaTeX_Main-BoldItalic-DxDJ3AOS.woff2) format("woff2"),url(./KaTeX_Main-BoldItalic-SpSLRI95.woff) format("woff"),url(./KaTeX_Main-BoldItalic-DzxPMmG6.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(./KaTeX_Main-Italic-NWA7e6Wa.woff2) format("woff2"),url(./KaTeX_Main-Italic-BMLOBm91.woff) format("woff"),url(./KaTeX_Main-Italic-3WenGoN9.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(./KaTeX_Main-Regular-B22Nviop.woff2) format("woff2"),url(./KaTeX_Main-Regular-Dr94JaBh.woff) format("woff"),url(./KaTeX_Main-Regular-ypZvNtVU.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(./KaTeX_Math-BoldItalic-CZnvNsCZ.woff2) format("woff2"),url(./KaTeX_Math-BoldItalic-iY-2wyZ7.woff) format("woff"),url(./KaTeX_Math-BoldItalic-B3XSjfu4.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(./KaTeX_Math-Italic-t53AETM-.woff2) format("woff2"),url(./KaTeX_Math-Italic-DA0__PXp.woff) format("woff"),url(./KaTeX_Math-Italic-flOr_0UB.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(./KaTeX_SansSerif-Bold-D1sUS0GD.woff2) format("woff2"),url(./KaTeX_SansSerif-Bold-DbIhKOiC.woff) format("woff"),url(./KaTeX_SansSerif-Bold-CFMepnvq.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(./KaTeX_SansSerif-Italic-C3H0VqGB.woff2) format("woff2"),url(./KaTeX_SansSerif-Italic-DN2j7dab.woff) format("woff"),url(./KaTeX_SansSerif-Italic-YYjJ1zSn.ttf) format("truetype")}@font-face{font-display:block;font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(./KaTeX_SansSerif-Regular-DDBCnlJ7.woff2) format("woff2"),url(./KaTeX_SansSerif-Regular-CS6fqUqJ.woff) format("woff"),url(./KaTeX_SansSerif-Regular-BNo7hRIc.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(./KaTeX_Script-Regular-D3wIWfF6.woff2) format("woff2"),url(./KaTeX_Script-Regular-D5yQViql.woff) format("woff"),url(./KaTeX_Script-Regular-C5JkGWo-.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(./KaTeX_Size1-Regular-mCD8mA8B.woff2) format("woff2"),url(./KaTeX_Size1-Regular-C195tn64.woff) format("woff"),url(./KaTeX_Size1-Regular-Dbsnue_I.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(./KaTeX_Size2-Regular-Dy4dx90m.woff2) format("woff2"),url(./KaTeX_Size2-Regular-oD1tc_U0.woff) format("woff"),url(./KaTeX_Size2-Regular-B7gKUWhC.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC) format("woff2"),url(./KaTeX_Size3-Regular-CTq5MqoE.woff) format("woff"),url(./KaTeX_Size3-Regular-DgpXs0kz.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(./KaTeX_Size4-Regular-Dl5lxZxV.woff2) format("woff2"),url(./KaTeX_Size4-Regular-BF-4gkZK.woff) format("woff"),url(./KaTeX_Size4-Regular-DWFBv043.ttf) format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(./KaTeX_Typewriter-Regular-CO6r4hn1.woff2) format("woff2"),url(./KaTeX_Typewriter-Regular-C0xS9mPB.woff) format("woff"),url(./KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,math,Times New Roman,serif;line-height:1.2;position:relative;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.18.11"}.katex .katex-mathml{border:0;-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.katex-newline{display:block}.katex .katex-base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .katex-base,.katex .katex-strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .katex-vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .katex-thinbox{display:inline-flex;flex-direction:row;max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .katex-hdashline,.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-rule,.katex .katex-underline .underline-line,.katex .mfrac .frac-line{min-height:1px}.katex .mspace{display:inline-block}.katex .katex-smash{display:inline;line-height:0}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.katex-inner,.katex .llap>.katex-inner,.katex .rlap>.katex-inner{position:absolute}.katex .clap>.katex-fix,.katex .llap>.katex-fix,.katex .rlap>.katex-fix{display:inline-block}.katex .llap>.katex-inner{right:0}.katex .clap>.katex-inner,.katex .rlap>.katex-inner{left:0}.katex .clap>.katex-inner>span{margin-left:-50%;margin-right:50%}.katex .katex-rule{border:0 solid;display:inline-block;position:relative}.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .katex-hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.katex-root{margin-left:.2777777778em;margin-right:-.5555555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .katex-sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .katex-sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .katex-sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .katex-sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .katex-sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .katex-sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .katex-sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .katex-sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .katex-sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .katex-sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .katex-sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .katex-sizing.reset-size2.size1{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .katex-sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .katex-sizing.reset-size2.size3{font-size:1.1666666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .katex-sizing.reset-size2.size4{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .katex-sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .katex-sizing.reset-size2.size6{font-size:1.6666666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .katex-sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .katex-sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .katex-sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .katex-sizing.reset-size2.size10{font-size:3.4566666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .katex-sizing.reset-size2.size11{font-size:4.1466666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .katex-sizing.reset-size3.size1{font-size:.7142857143em}.katex .fontsize-ensurer.reset-size3.size2,.katex .katex-sizing.reset-size3.size2{font-size:.8571428571em}.katex .fontsize-ensurer.reset-size3.size3,.katex .katex-sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .katex-sizing.reset-size3.size4{font-size:1.1428571429em}.katex .fontsize-ensurer.reset-size3.size5,.katex .katex-sizing.reset-size3.size5{font-size:1.2857142857em}.katex .fontsize-ensurer.reset-size3.size6,.katex .katex-sizing.reset-size3.size6{font-size:1.4285714286em}.katex .fontsize-ensurer.reset-size3.size7,.katex .katex-sizing.reset-size3.size7{font-size:1.7142857143em}.katex .fontsize-ensurer.reset-size3.size8,.katex .katex-sizing.reset-size3.size8{font-size:2.0571428571em}.katex .fontsize-ensurer.reset-size3.size9,.katex .katex-sizing.reset-size3.size9{font-size:2.4685714286em}.katex .fontsize-ensurer.reset-size3.size10,.katex .katex-sizing.reset-size3.size10{font-size:2.9628571429em}.katex .fontsize-ensurer.reset-size3.size11,.katex .katex-sizing.reset-size3.size11{font-size:3.5542857143em}.katex .fontsize-ensurer.reset-size4.size1,.katex .katex-sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .katex-sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .katex-sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .katex-sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .katex-sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .katex-sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .katex-sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .katex-sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .katex-sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .katex-sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .katex-sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .katex-sizing.reset-size5.size1{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .katex-sizing.reset-size5.size2{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .katex-sizing.reset-size5.size3{font-size:.7777777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .katex-sizing.reset-size5.size4{font-size:.8888888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .katex-sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .katex-sizing.reset-size5.size6{font-size:1.1111111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .katex-sizing.reset-size5.size7{font-size:1.3333333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .katex-sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .katex-sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .katex-sizing.reset-size5.size10{font-size:2.3044444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .katex-sizing.reset-size5.size11{font-size:2.7644444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .katex-sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .katex-sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .katex-sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .katex-sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .katex-sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .katex-sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .katex-sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .katex-sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .katex-sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .katex-sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .katex-sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .katex-sizing.reset-size7.size1{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .katex-sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .katex-sizing.reset-size7.size3{font-size:.5833333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .katex-sizing.reset-size7.size4{font-size:.6666666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .katex-sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .katex-sizing.reset-size7.size6{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .katex-sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .katex-sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .katex-sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .katex-sizing.reset-size7.size10{font-size:1.7283333333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .katex-sizing.reset-size7.size11{font-size:2.0733333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .katex-sizing.reset-size8.size1{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .katex-sizing.reset-size8.size2{font-size:.4166666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .katex-sizing.reset-size8.size3{font-size:.4861111111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .katex-sizing.reset-size8.size4{font-size:.5555555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .katex-sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .katex-sizing.reset-size8.size6{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .katex-sizing.reset-size8.size7{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .katex-sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .katex-sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .katex-sizing.reset-size8.size10{font-size:1.4402777778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .katex-sizing.reset-size8.size11{font-size:1.7277777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .katex-sizing.reset-size9.size1{font-size:.2893518519em}.katex .fontsize-ensurer.reset-size9.size2,.katex .katex-sizing.reset-size9.size2{font-size:.3472222222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .katex-sizing.reset-size9.size3{font-size:.4050925926em}.katex .fontsize-ensurer.reset-size9.size4,.katex .katex-sizing.reset-size9.size4{font-size:.462962963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .katex-sizing.reset-size9.size5{font-size:.5208333333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .katex-sizing.reset-size9.size6{font-size:.5787037037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .katex-sizing.reset-size9.size7{font-size:.6944444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .katex-sizing.reset-size9.size8{font-size:.8333333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .katex-sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .katex-sizing.reset-size9.size10{font-size:1.2002314815em}.katex .fontsize-ensurer.reset-size9.size11,.katex .katex-sizing.reset-size9.size11{font-size:1.4398148148em}.katex .fontsize-ensurer.reset-size10.size1,.katex .katex-sizing.reset-size10.size1{font-size:.2410800386em}.katex .fontsize-ensurer.reset-size10.size2,.katex .katex-sizing.reset-size10.size2{font-size:.2892960463em}.katex .fontsize-ensurer.reset-size10.size3,.katex .katex-sizing.reset-size10.size3{font-size:.337512054em}.katex .fontsize-ensurer.reset-size10.size4,.katex .katex-sizing.reset-size10.size4{font-size:.3857280617em}.katex .fontsize-ensurer.reset-size10.size5,.katex .katex-sizing.reset-size10.size5{font-size:.4339440694em}.katex .fontsize-ensurer.reset-size10.size6,.katex .katex-sizing.reset-size10.size6{font-size:.4821600771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .katex-sizing.reset-size10.size7{font-size:.5785920926em}.katex .fontsize-ensurer.reset-size10.size8,.katex .katex-sizing.reset-size10.size8{font-size:.6943105111em}.katex .fontsize-ensurer.reset-size10.size9,.katex .katex-sizing.reset-size10.size9{font-size:.8331726133em}.katex .fontsize-ensurer.reset-size10.size10,.katex .katex-sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .katex-sizing.reset-size10.size11{font-size:1.1996142719em}.katex .fontsize-ensurer.reset-size11.size1,.katex .katex-sizing.reset-size11.size1{font-size:.2009646302em}.katex .fontsize-ensurer.reset-size11.size2,.katex .katex-sizing.reset-size11.size2{font-size:.2411575563em}.katex .fontsize-ensurer.reset-size11.size3,.katex .katex-sizing.reset-size11.size3{font-size:.2813504823em}.katex .fontsize-ensurer.reset-size11.size4,.katex .katex-sizing.reset-size11.size4{font-size:.3215434084em}.katex .fontsize-ensurer.reset-size11.size5,.katex .katex-sizing.reset-size11.size5{font-size:.3617363344em}.katex .fontsize-ensurer.reset-size11.size6,.katex .katex-sizing.reset-size11.size6{font-size:.4019292605em}.katex .fontsize-ensurer.reset-size11.size7,.katex .katex-sizing.reset-size11.size7{font-size:.4823151125em}.katex .fontsize-ensurer.reset-size11.size8,.katex .katex-sizing.reset-size11.size8{font-size:.578778135em}.katex .fontsize-ensurer.reset-size11.size9,.katex .katex-sizing.reset-size11.size9{font-size:.6945337621em}.katex .fontsize-ensurer.reset-size11.size10,.katex .katex-sizing.reset-size11.size10{font-size:.8336012862em}.katex .fontsize-ensurer.reset-size11.size11,.katex .katex-sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .katex-accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .katex-accent .accent-body{position:relative}.katex .katex-accent .accent-body:not(.accent-full){width:0}.katex .katex-overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .katex-stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .katex-stretchy:after,.katex .katex-stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .katex-sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-box;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .reflectbox{display:inline-block;transform:scaleX(-1)}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.katex-tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.katex-tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}
/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */

/**
 *  Default styles for xterm.js
 */

.xterm {
    cursor: text;
    position: relative;
    user-select: none;
    -ms-user-select: none;
    -webkit-user-select: none;
}

.xterm.focus,
.xterm:focus {
    outline: none;
}

.xterm .xterm-helpers {
    position: absolute;
    top: 0;
    /**
     * The z-index of the helpers must be higher than the canvases in order for
     * IMEs to appear on top.
     */
    z-index: 5;
}

.xterm .xterm-helper-textarea {
    padding: 0;
    border: 0;
    margin: 0;
    /* Move textarea out of the screen to the far left, so that the cursor is not visible */
    position: absolute;
    opacity: 0;
    left: -9999em;
    top: 0;
    width: 0;
    height: 0;
    z-index: -5;
    /** Prevent wrapping so the IME appears against the textarea at the correct position */
    white-space: nowrap;
    overflow: hidden;
    resize: none;
}

.xterm .composition-view {
    /* TODO: Composition position got messed up somewhere */
    background: #000;
    color: #FFF;
    display: none;
    position: absolute;
    white-space: nowrap;
    z-index: 1;
}

.xterm .composition-view.active {
    display: block;
}

.xterm .xterm-viewport {
    /* On OS X this is required in order for the scroll bar to appear fully opaque */
    background-color: #000;
    overflow-y: scroll;
    cursor: default;
    position: absolute;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
}

.xterm .xterm-screen {
    position: relative;
}

.xterm .xterm-screen canvas {
    position: absolute;
    left: 0;
    top: 0;
}

.xterm .xterm-scroll-area {
    visibility: hidden;
}

.xterm-char-measure-element {
    display: inline-block;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: -9999em;
    line-height: normal;
}

.xterm.enable-mouse-events {
    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
    cursor: default;
}

.xterm.xterm-cursor-pointer,
.xterm .xterm-cursor-pointer {
    cursor: pointer;
}

.xterm.column-select.focus {
    /* Column selection mode */
    cursor: crosshair;
}

.xterm .xterm-accessibility,
.xterm .xterm-message {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 10;
    color: transparent;
    pointer-events: none;
}

.xterm .live-region {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.xterm-dim {
    /* Dim should not apply to background, so the opacity of the foreground color is applied
     * explicitly in the generated class and reset to 1 here */
    opacity: 1 !important;
}

.xterm-underline-1 { text-decoration: underline; }
.xterm-underline-2 { text-decoration: double underline; }
.xterm-underline-3 { text-decoration: wavy underline; }
.xterm-underline-4 { text-decoration: dotted underline; }
.xterm-underline-5 { text-decoration: dashed underline; }

.xterm-overline {
    text-decoration: overline;
}

.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }
.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }
.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }
.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }
.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }

.xterm-strikethrough {
    text-decoration: line-through;
}

.xterm-screen .xterm-decoration-container .xterm-decoration {
	z-index: 6;
	position: absolute;
}

.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
	z-index: 7;
}

.xterm-decoration-overview-ruler {
    z-index: 8;
    position: absolute;
    top: 0;
    right: 0;
    pointer-events: none;
}

.xterm-decoration-top {
    z-index: 2;
    position: relative;
}
pre code.hljs {
  display: block;
  overflow-x: auto;
  padding: 1em
}
code.hljs {
  padding: 3px 5px
}
/*

Atom One Dark by Daniel Gamage
Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax

base:    #282c34
mono-1:  #abb2bf
mono-2:  #818896
mono-3:  #5c6370
hue-1:   #56b6c2
hue-2:   #61aeee
hue-3:   #c678dd
hue-4:   #98c379
hue-5:   #e06c75
hue-5-2: #be5046
hue-6:   #d19a66
hue-6-2: #e6c07b

*/
.hljs {
  color: #abb2bf;
  background: #282c34
}
.hljs-comment,
.hljs-quote {
  color: #5c6370;
  font-style: italic
}
.hljs-doctag,
.hljs-keyword,
.hljs-formula {
  color: #c678dd
}
.hljs-section,
.hljs-name,
.hljs-selector-tag,
.hljs-deletion,
.hljs-subst {
  color: #e06c75
}
.hljs-literal {
  color: #56b6c2
}
.hljs-string,
.hljs-regexp,
.hljs-addition,
.hljs-attribute,
.hljs-meta .hljs-string {
  color: #98c379
}
.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-type,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-number {
  color: #d19a66
}
.hljs-symbol,
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-title {
  color: #61aeee
}
.hljs-built_in,
.hljs-title.class_,
.hljs-class .hljs-title {
  color: #e6c07b
}
.hljs-emphasis {
  font-style: italic
}
.hljs-strong {
  font-weight: bold
}
.hljs-link {
  text-decoration: underline
}.yh-upgrade-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgb(0 0 0 / .24);
  backdrop-filter: blur(9px);
  -webkit-app-region: no-drag;
  animation: yh-upgrade-fade .22s ease-out both;
  letter-spacing: 0;
}
.yh-upgrade-dialog {
  width: min(440px, 100%);
  max-height: calc(100dvh - 56px);
  overflow: auto;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-window);
  color: var(--text);
  box-shadow: 0 24px 90px rgb(0 0 0 / .18), 0 4px 16px rgb(0 0 0 / .06);
  animation: yh-upgrade-arrive .32s var(--ease-out) both;
  outline: none;
}
.yh-upgrade-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; line-height: 20px; }
.yh-upgrade-eyebrow span { color: var(--text-muted); font-weight: 400; }
.yh-upgrade-dialog h2 { font-size: 22px; line-height: 1.4; font-weight: 600; margin: 14px 0 10px; overflow-wrap: anywhere; }
.yh-upgrade-versions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--text-muted); font-size: 12px; line-height: 20px; }
.yh-upgrade-versions strong { color: var(--text); font-weight: 500; }
.yh-upgrade-notes { padding-left: 16px; margin: 22px 0 0; font-size: 13px; line-height: 1.85; color: var(--text-muted); overflow-wrap: anywhere; }
.yh-upgrade-notes li + li { margin-top: 5px; }
.yh-upgrade-status { display: flex; gap: 8px; margin-top: 22px; align-items: flex-start; min-height: 42px; font-size: 13px; line-height: 21px; color: var(--text-muted); overflow-wrap: anywhere; }
.yh-upgrade-status.is-error { color: var(--danger); }
.yh-upgrade-state-icon { flex: none; display: inline-flex; padding-top: 2px; }
.yh-upgrade-state-icon:empty { display: none; }
.yh-upgrade-state-icon.is-spinning svg { animation: yh-upgrade-spin 1.5s linear infinite; }
.yh-upgrade-download { margin-top: 12px; }
.yh-upgrade-progress { height: 4px; border-radius: 2px; background: var(--bg-accent); overflow: hidden; }
.yh-upgrade-progress > div { height: 100%; width: 100%; background: var(--text); transform-origin: left center; transition: transform .4s linear; }
.yh-upgrade-transfer { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; color: var(--text-muted); font-size: 11px; line-height: 18px; }
.yh-upgrade-transfer > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.yh-upgrade-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.yh-upgrade-primary, .yh-upgrade-secondary { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: 6px; font-size: 13px; font-weight: 500; line-height: 20px; text-decoration: none; transition: background .18s ease, transform .18s ease, opacity .18s ease; }
.yh-upgrade-primary { background: var(--accent); color: var(--accent-contrast); min-width: 122px; }
.yh-upgrade-primary:disabled { opacity: .55; cursor: default; }
.yh-upgrade-primary:hover:not(:disabled) { opacity: .86; }
.yh-upgrade-primary:active:not(:disabled), .yh-upgrade-secondary:active { transform: translateY(1px); }
.yh-upgrade-secondary { color: var(--text-muted); }
.yh-upgrade-secondary:hover { background: var(--bg-hover); color: var(--text); }
.yh-upgrade-footnote { margin-top: 17px; text-align: right; color: var(--text-muted); font-size: 11px; line-height: 18px; }
.yh-upgrade-overlay.is-leaving { animation: yh-upgrade-fade .16s ease-in reverse both; }
.yh-upgrade-overlay.is-leaving .yh-upgrade-dialog { animation: yh-upgrade-arrive .16s ease-in reverse both; }
@keyframes yh-upgrade-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes yh-upgrade-arrive { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes yh-upgrade-spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
  .yh-upgrade-overlay { padding: 18px; }
  .yh-upgrade-dialog { padding: 24px; }
  .yh-upgrade-dialog h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .yh-upgrade-overlay, .yh-upgrade-dialog, .yh-upgrade-state-icon svg { animation: none !important; }
  .yh-upgrade-progress > div, .yh-upgrade-primary, .yh-upgrade-secondary { transition: none; }
}
/* ---------- 消息流 ---------- */

.yh-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.yh-messages-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.yh-msg-row {
  animation: yh-msg-in 0.42s var(--ease-out) both;
}
@media (prefers-reduced-motion: reduce) {
  .yh-msg-row { animation: yh-fade-in .15s ease both; }
}

.yh-msg-user {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 6px;
}

.yh-user-bubble-text {
  max-width: 72%;
  padding: 9px 14px;
  background: var(--bg-subtle);
  border-radius: 18px;
  border-bottom-right-radius: 7px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
  transition: background-color 0.14s ease;
}

.yh-msg-user:hover .yh-user-bubble-text {
  background: #ffffff;
}

.yh-user-tools {
  flex: none;
  display: flex;
  align-self: center;
  opacity: 0;
  transition: opacity 0.14s ease;
}

.yh-msg-user:hover .yh-user-tools,
.yh-user-tools:focus-within {
  opacity: 1;
}

.yh-user-edit {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.yh-user-edit-input {
  width: 100%;
  resize: none;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.6;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.yh-user-edit-input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.yh-user-edit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.yh-user-edit-save {
  height: 30px;
  padding: 0 14px;
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  font-size: 12.5px;
  transition:
    opacity 0.13s ease,
    transform 0.13s var(--ease-out);
}

.yh-user-edit-save:hover {
  opacity: 0.9;
}

.yh-user-edit-save:active {
  transform: scale(0.96);
}

.yh-msg-assistant {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.yh-msg-content {
  font-size: 15px;
  line-height: 1.65;
  word-break: break-word;
  user-select: text;
}

.yh-msg-assistant.is-busy .yh-msg-content {
  animation: yh-answer-enter 160ms ease-out both;
}

@keyframes yh-answer-enter {
  from { opacity: 0; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

.yh-caret-inline {
  width: 2px;
  height: 1.02em;
  margin-left: 1.5px;
  vertical-align: -0.16em;
  border-radius: 1px;
  background: var(--text-faint);
  opacity: 0.55;
}

/* 思考过程中的行尾光标 */
.yh-caret {
  display: inline-block;
  width: 1.5px;
  height: 13px;
  margin-left: 2px;
  vertical-align: -2px;
  border-radius: 1px;
  background: var(--text-faint);
  animation: yh-caret-breathe .9s ease-in-out infinite;
}

@keyframes yh-caret-breathe {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
  .yh-msg-assistant.is-busy .yh-msg-content,
  .yh-caret {
    animation: none;
  }
}

/* 首 token 等待：三点波浪 */
.yh-msg-loading {
  position: relative;
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 12px;
  border-radius: 99px;
  background: var(--teal);
  animation: yh-dot-wave 1.25s ease-in-out infinite;
}

.yh-msg-loading::before,
.yh-msg-loading::after {
  content: '';
  position: absolute;
  top: 0;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--teal);
  animation: yh-dot-wave 1.25s ease-in-out infinite;
}

.yh-msg-loading::before { left: -11px; animation-delay: 0.16s; }
.yh-msg-loading::after { left: 11px; animation-delay: 0.32s; }

@keyframes yh-dot-wave {
  0%, 70%, 100% { transform: translateY(0) scale(0.7); opacity: 0.35; }
  35% { transform: translateY(-4px) scale(1); opacity: 1; }
}

/* 生成阶段标签：阶段名 + 实时耗时 */
.yh-msg-stage { display: inline-flex; align-items: center; font-size: 12.5px; color: var(--text-faint); }
.yh-msg-stage .yh-msg-loading { margin: 0 10px 0 0; }
.yh-msg-stage-time { margin-left: 7px; font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.yh-msg-tag {
  align-self: flex-start;
  font-size: 12px;
  color: var(--text-faint);
  padding: 3px 0;
  animation: yh-fade-in 0.25s ease both;
}

/* ---------- 思考过程 ---------- */

.yh-thinking-head {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-faint);
  text-align: left;
  transition: color 0.12s ease;
}

.yh-thinking-head:hover {
  color: var(--text-muted);
}

.yh-thinking-head svg {
  flex: none;
  transition: transform 0.2s var(--ease-out);
}

/* 思考中：三个呼吸点（透明度循环，无位移，安静不抢戏） */
.yh-thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 12px;
}

.yh-thinking-dots i {
  width: 4px;
  height: 4px;
  border-radius: 99px;
  background: currentColor;
  animation: yh-think-breathe 1.2s ease-in-out infinite;
}

.yh-thinking-dots i:nth-child(2) { animation-delay: 0.2s; }
.yh-thinking-dots i:nth-child(3) { animation-delay: 0.4s; }

@keyframes yh-think-breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.yh-thinking-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.2s ease-out;
}

.yh-thinking-wrap.is-open {
  grid-template-rows: 1fr;
}

.yh-thinking-clip {
  overflow: hidden;
  min-height: 0;
}

.yh-thinking-body {
  padding: 4px 0 2px 12px;
  border-left: 2px solid var(--border);
  margin-left: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-faint);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
  user-select: text;
}

/* ---------- 消息操作 ---------- */

.yh-msg-assistant { position: relative; }

.yh-msg-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  /* 向上延伸热区（负 margin + padding 补齐），文字到按钮之间无 hover 死区 */
  margin-top: -4px;
  padding-top: 6px;
  position: relative;
  z-index: 10;
}

/* 智能路由：本条回答实际使用的模型 */
.yh-msg-model {
  margin-left: auto;
  padding-left: 12px;
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
  user-select: none;
}

@media (hover: hover) {
  .yh-msg-assistant .yh-msg-actions {
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.18s ease, transform 0.18s var(--ease-out);
    /* 隐藏时不拦截指针，避免吃掉文字选中/点击 */
    pointer-events: none;
  }
  .yh-msg-assistant:hover .yh-msg-actions,
  .yh-msg-assistant .yh-msg-actions:focus-within,
  /* 键盘聚焦到任意操作按钮时强制显示，避免被悬浮层遮挡无法点击 */
  .yh-msg-assistant .yh-msg-actions .yh-icon-btn:focus-visible,
  .yh-msg-assistant .yh-tts:focus-within {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

/* 单条回答导出菜单 */
.yh-export-wrap {
  position: relative;
}

.yh-export-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 158px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 5px;
  background: var(--bg-window);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-menu);
  animation: yh-menu-pop 0.16s var(--ease-out) both;
}

.yh-export-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  transition: color 0.12s ease, background-color 0.12s ease;
}

.yh-export-menu button:hover {
  color: var(--text);
  background: var(--bg-hover);
}

@keyframes yh-menu-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.yh-msg-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.yh-msg-icon.is-active {
  color: var(--teal);
}

.yh-msg-icon.is-active svg {
  animation: yh-pop-check 0.26s var(--ease-out);
}

.yh-act-regen svg {
  transition: transform 0.32s var(--ease-out);
}

/* 分支切换 */
.yh-branch-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-window);
  font-size: 11px;
  color: var(--text-muted);
  user-select: none;
}
.yh-branch-btn {
  width: 20px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 5px;
  font-size: 13px;
  line-height: 1;
  transition: background-color .14s ease, color .14s ease, transform .14s var(--ease-out);
}
.yh-branch-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.yh-branch-btn:active:not(:disabled) { transform: scale(.92); }
.yh-branch-btn:disabled { opacity: .35; cursor: default; }
.yh-branch-text { font-variant-numeric: tabular-nums; min-width: 26px; text-align: center; }

.yh-act-regen:hover svg {
  transform: rotate(180deg);
}

/* 柔流·流转：会话切换时新内容带方向感 blur 接续入场，视线不断 */
.yh-messages.is-switching {
  animation: yh-flow-in 0.38s var(--ease-flow) both;
}
@keyframes yh-flow-in {
  from { opacity: 0; transform: translateY(9px); filter: blur(1.4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}


/* ---------- Markdown ---------- */

.yh-md {
  color: var(--text);
  text-autospace: normal;
}

.yh-md > *:first-child {
  margin-top: 0;
}

.yh-md > *:last-child {
  margin-bottom: 0;
}

.yh-md p {
  margin: 0 0 12px;
  text-wrap: pretty;
}

.yh-md h1,
.yh-md h2,
.yh-md h3,
.yh-md h4 {
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  margin: 24px 0 12px;
  text-wrap: balance;
}

.yh-md h1 {
  font-size: 19px;
}

.yh-md h2 {
  font-size: 17px;
}

.yh-md h3 {
  font-size: 15.5px;
}

.yh-md h4 {
  font-size: 14.5px;
}

.yh-md ul,
.yh-md ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.yh-md li {
  margin: 5px 0;
}

.yh-md li > ul,
.yh-md li > ol {
  margin: 4px 0;
}

.yh-md ul {
  list-style: disc;
}

.yh-md ol {
  list-style: decimal;
}

.yh-md li::marker {
  color: var(--text-faint);
}

.yh-md a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 0.5px;
  text-decoration-color: color-mix(in srgb, var(--teal) 32%, transparent);
  transition: text-decoration-color 0.16s ease, opacity 0.14s ease;
}

.yh-md a:hover {
  opacity: 0.72;
  text-decoration-color: var(--teal);
}

.yh-md blockquote {
  margin: 0 0 12px;
  padding: 6px 14px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 50%, var(--border-strong));
  color: var(--text-muted);
  background: color-mix(in srgb, var(--bg-subtle) 55%, transparent);
  border-radius: 0 6px 6px 0;
}

.yh-md blockquote > *:last-child {
  margin-bottom: 0;
}

.yh-md hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 22px 0;
}

.yh-md strong {
  font-weight: 600;
  color: var(--text);
}

.yh-md :not(pre) > code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--text);
  white-space: break-spaces;
}

/* ---------- 行内引用角标（Perplexity 式：编号角标 + 悬停来源预览） ---------- */

.yh-cite {
  position: relative;
  display: inline-block;
  line-height: 0;
  margin: 0 1px;
  vertical-align: super;
}

.yh-cite-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--teal) 10%, transparent);
  color: var(--teal);
  font-size: 9.5px;
  font-weight: 600;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.14s ease, color 0.14s ease, transform 0.12s var(--ease-out);
}

.yh-cite-chip:hover {
  background: var(--teal);
  color: #fff;
  transform: scale(1.08);
}

.yh-cite-pop {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  width: min(264px, 76vw);
  padding: 10px 12px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-window);
  box-shadow: var(--shadow-menu);
  line-height: 1.5;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s var(--ease-out), visibility 0.16s;
  z-index: 40;
}

/* 小箭头 */
.yh-cite-pop::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--bg-window);
}

.yh-cite:hover .yh-cite-pop,
.yh-cite-chip:focus-visible + .yh-cite-pop {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.yh-cite-pop-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.yh-cite-pop-head b {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.yh-cite-pop-head i {
  font-style: normal;
  font-size: 10.5px;
  color: var(--teal);
  font-family: var(--mono);
}

.yh-cite-pop-body {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--text-muted);
  word-break: break-word;
}

.yh-md table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 14px;
  font-size: 13.5px;
  display: block;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.yh-md th,
.yh-md td {
  border: 1px solid var(--border);
  padding: 8px 14px;
  text-align: left;
  vertical-align: top;
}

.yh-md thead th {
  background: var(--bg-subtle);
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.yh-md tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--bg-subtle) 35%, transparent);
}

.yh-md tbody tr:hover td {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.yh-md th {
  background: var(--bg-subtle);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- 数据表格卡片 ---------- */

.yh-table-card {
  margin: 2px 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-window);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.yh-table-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.yh-table-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px 5px 13px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.yh-table-meta {
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  white-space: nowrap;
}

.yh-table-actions {
  display: flex;
  gap: 2px;
}

.yh-table-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.13s ease, background-color 0.13s ease;
}

.yh-table-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.yh-table-btn.is-active {
  color: var(--teal);
  background: var(--bg-accent);
}

.yh-table-scroll {
  overflow-x: auto;
}

.yh-table-scroll table {
  display: table;
  margin: 0;
  border: 0;
  font-size: 13.5px;
}

.yh-table-scroll th,
.yh-table-scroll td {
  border-color: var(--border);
  padding: 8px 13px;
}

.yh-table-scroll th {
  position: relative;
  background: var(--bg-window);
  border-bottom-color: var(--border-strong);
  font-weight: 600;
}

.yh-table-scroll tbody tr {
  transition: background-color 0.12s ease;
}

.yh-table-scroll tbody tr:nth-child(even) {
  background: var(--bg-subtle);
}

.yh-table-scroll tbody tr:hover {
  background: var(--bg-hover);
}

.yh-table-scroll td.is-editing {
  background: var(--bg-window);
  box-shadow: inset 0 0 0 2px var(--accent);
  outline: none;
  border-radius: 4px;
}

.yh-sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s ease;
}

.yh-sortable:hover {
  background: var(--bg-hover);
}

.yh-sortable::after {
  content: '↕';
  margin-left: 7px;
  font-size: 10px;
  color: var(--text-faint);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.yh-sortable:hover::after {
  opacity: 0.6;
}

.yh-sortable.is-asc::after,
.yh-sortable.is-desc::after {
  opacity: 1;
  color: var(--teal);
}

.yh-sortable.is-asc::after { content: '↑'; }
.yh-sortable.is-desc::after { content: '↓'; }

/* 合计 / 总计等汇总行：加粗、与明细分隔 */
.yh-table-scroll tbody tr.yh-row-summary > td {
  font-weight: 600;
  border-top: 1px solid var(--border-strong);
  background: var(--bg-subtle);
}

/* 选中即算状态条（默认收起，选中数值单元格后滑出） */
.yh-table-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 14px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid transparent;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.2s ease, opacity 0.18s ease, padding 0.2s ease, border-color 0.2s ease;
}

.yh-table-stats.is-visible {
  max-height: 38px;
  padding: 7px 14px;
  opacity: 1;
  border-top-color: var(--border);
  background: var(--bg-subtle);
}

.yh-table-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.yh-table-stats em {
  font-style: normal;
  color: var(--text-faint);
}

.yh-table-stats b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* ---------- 表格图表 ---------- */

.yh-chart-panel {
  border-top: 1px solid var(--border);
  padding: 12px 14px 6px;
  background: var(--bg-window);
}

.yh-chart-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.yh-chart-metrics,
.yh-chart-types {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.yh-chart-pill {
  height: 24px;
  padding: 0 11px;
  border-radius: 99px;
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-muted);
  transition: color 0.13s ease, border-color 0.13s ease, background-color 0.13s ease;
}

.yh-chart-pill:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.yh-chart-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg-window);
}

.yh-chart-svg svg {
  width: 100%;
  height: auto;
  display: block;
  color: var(--text-muted);
}

.yh-chart-grid line {
  stroke: currentColor;
  opacity: 0.1;
  stroke-width: 1;
}

.yh-chart-grid text {
  fill: currentColor;
  opacity: 0.55;
  font-size: 10px;
}

.yh-chart-bar {
  fill: var(--teal);
  opacity: 0.82;
  transition: opacity 0.15s ease;
}

.yh-chart-bar:hover {
  opacity: 1;
}

.yh-chart-v {
  fill: currentColor;
  opacity: 0.6;
  font-size: 10px;
}

.yh-chart-x {
  fill: currentColor;
  opacity: 0.6;
  font-size: 10px;
}

.yh-chart-line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yh-chart-area {
  fill: var(--teal);
  opacity: 0.1;
}

.yh-chart-dot {
  fill: var(--bg-window);
  stroke: var(--teal);
  stroke-width: 2;
}

.yh-chart-note {
  padding: 4px 2px 2px;
  font-size: 11px;
  color: var(--text-faint);
}

/* ---------- 代码块 ---------- */

/* 代码块配色随主题切换：浅色=白底，深色=墨底 */
.yh-code {
  --cb-bg: #ffffff;
  --cb-head: #f6f7f8;
  --cb-border: var(--border);
  --cb-text: #24292f;
  --cb-muted: #6e7781;
  --cb-hover: rgba(0, 0, 0, .06);
  --cb-run: #0f766e;
  --cb-run-bg: rgba(15, 118, 110, .08);
  --cb-run-hover: #0b5d56;
  --cb-run-bg-hover: rgba(15, 118, 110, .15);
  --cb-out-bg: #fafbfc;
  --cb-err: #cf222e;
  --tk-comment: #8b949e;
  --tk-keyword: #cf222e;
  --tk-string: #116331;
  --tk-number: #953800;
  --tk-title: #8250df;
  --tk-type: #953800;
  --tk-var: #24292f;
  --tk-op: #0550ae;
  --tk-del: #cf222e;
}

:root[data-theme='dark'] .yh-code {
  --cb-bg: #191a1d;
  --cb-head: #202226;
  --cb-border: #23252a;
  --cb-text: #d3d6dd;
  --cb-muted: #7e828c;
  --cb-hover: rgba(255, 255, 255, .07);
  --cb-run: #5ec9b3;
  --cb-run-bg: rgba(94, 201, 179, .1);
  --cb-run-hover: #7fe0cc;
  --cb-run-bg-hover: rgba(94, 201, 179, .2);
  --cb-out-bg: #141518;
  --cb-err: #f08a8a;
  --tk-comment: #6b7280;
  --tk-keyword: #c678dd;
  --tk-string: #98c379;
  --tk-number: #d19a66;
  --tk-title: #61afef;
  --tk-type: #e5c07b;
  --tk-var: #d3d6dd;
  --tk-op: #56b6c2;
  --tk-del: #e06c75;
}

.yh-code {
  margin: 0 0 14px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cb-bg);
  border: 1px solid var(--cb-border);
  transition: background-color .3s var(--ease-out), border-color .3s var(--ease-out);
}

.yh-code-head {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 14px;
  background: var(--cb-head);
  border-bottom: 1px solid var(--cb-border);
}

.yh-code-lang {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--cb-muted);
  font-family: var(--mono);
  text-transform: lowercase;
}

.yh-code-copy {
  height: 23px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 11.5px;
  color: var(--cb-muted);
  transition: color 0.13s ease, background-color 0.13s ease, transform 0.12s var(--ease-out);
}

.yh-code-copy:hover {
  color: var(--cb-text);
  background: var(--cb-hover);
}

.yh-code-copy:active { transform: scale(.92); }

.yh-code-copy.is-copied {
  color: var(--cb-run);
  animation: yh-pop-check 0.24s var(--ease-morph) both;
}

.yh-code-head-right { display: flex; align-items: center; gap: 6px; }

.yh-code-run {
  height: 23px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 11.5px;
  color: var(--cb-run);
  background: var(--cb-run-bg);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s var(--ease-out);
}

.yh-code-run:hover { background: var(--cb-run-bg-hover); color: var(--cb-run-hover); }

.yh-code-run:active { transform: scale(.92); }

.yh-code-run.is-running { color: var(--cb-muted); background: var(--cb-hover); cursor: wait; }

.yh-code-output {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--cb-border);
  background: var(--cb-out-bg);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  max-height: 320px;
  overflow: auto;
}

.yh-code-output.is-running { color: var(--cb-muted); }

.yh-code-output.is-ok { color: var(--cb-text); }

.yh-code-output.is-err { color: var(--cb-err); }

.yh-code-output pre { margin: 0; white-space: pre-wrap; word-break: break-word; background: transparent; padding: 0; }

.yh-code-loading { display: inline-flex; align-items: center; gap: 6px; }

.yh-code-loading::before { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--cb-muted); border-top-color: var(--cb-run); animation: yh-spin .7s linear infinite; }

.yh-code-out-label { display: block; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--cb-muted); margin-bottom: 6px; }

.yh-code-output.is-ok .yh-code-out-label { color: var(--cb-run); }

.yh-code-output.is-err .yh-code-out-label { color: var(--cb-err); }

.yh-code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
}

.yh-code code {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--cb-text);
  background: transparent;
  white-space: pre;
}

.yh-code .hljs-comment,
.yh-code .hljs-quote {
  color: var(--tk-comment);
  font-style: italic;
}

.yh-code .hljs-keyword,
.yh-code .hljs-selector-tag,
.yh-code .hljs-doctag,
.yh-code .hljs-template-tag {
  color: var(--tk-keyword);
}

.yh-code .hljs-string,
.yh-code .hljs-regexp,
.yh-code .hljs-addition {
  color: var(--tk-string);
}

.yh-code .hljs-number,
.yh-code .hljs-literal,
.yh-code .hljs-attr,
.yh-code .hljs-template-variable,
.yh-code .hljs-built_in {
  color: var(--tk-number);
}

.yh-code .hljs-title,
.yh-code .hljs-title.function_,
.yh-code .hljs-section,
.yh-code .hljs-name {
  color: var(--tk-title);
}

.yh-code .hljs-type,
.yh-code .hljs-class .hljs-title,
.yh-code .hljs-title.class_ {
  color: var(--tk-type);
}

.yh-code .hljs-variable,
.yh-code .hljs-symbol,
.yh-code .hljs-bullet,
.yh-code .hljs-link,
.yh-code .hljs-meta {
  color: var(--tk-var);
}

.yh-code .hljs-operator,
.yh-code .hljs-punctuation {
  color: var(--tk-op);
}

.yh-code .hljs-deletion {
  color: var(--tk-del);
}

.yh-code .hljs-emphasis {
  font-style: italic;
}

.yh-code .hljs-strong {
  font-weight: 600;
}


.yh-set-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.32);
  animation: yh-fade-in 0.16s ease both;
}

.yh-set-panel {
  width: 920px;
  height: min(680px, calc(100vh - 64px));
  max-width: calc(100vw - 48px);
  display: flex;
  background: var(--bg-window);
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--border), 0 24px 70px rgba(0, 0, 0, .14), 0 4px 14px rgba(0, 0, 0, .04);
  overflow: hidden;
  animation: yh-set-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

:root[data-theme='dark'] .yh-set-panel { box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 0 0 1px var(--border), 0 24px 70px rgba(0, 0, 0, .55), 0 4px 14px rgba(0, 0, 0, .3); }

@keyframes yh-set-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.yh-set-side {
  width: 240px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 20px 12px 16px;
}

.yh-set-side-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 2px 10px 14px;
}

/* shadcn 式：白底 + 细边框 + 聚焦环 */
.yh-set-search {
  position: relative;
  display: flex;
  align-items: center;
  height: 34px;
  margin: 0 4px 14px;
  padding: 0 9px;
  gap: 7px;
  border-radius: 6px;
  background: var(--bg-window);
  border: 1px solid var(--border);
  color: var(--text-faint);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.yh-set-search:focus-within {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 7%, transparent);
}

.yh-set-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
}

.yh-set-search input::placeholder {
  color: var(--text-faint);
}

.yh-set-search-clear {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: var(--text-faint);
  transition: background-color 0.14s ease, color 0.14s ease, transform 0.14s var(--ease-out);
}

.yh-set-search-clear:hover {
  background: var(--bg-accent);
  color: var(--text);
}

.yh-set-search-clear:active { transform: scale(.88); }

.yh-set-side nav {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 2px;
}

.yh-set-nav-group-label {
  padding: 0 10px 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* shadcn 式：小圆角、底色反馈、无位移 */
.yh-set-nav-item {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  text-align: left;
  font-size: 13px;
  color: var(--text-muted);
  position: relative;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.yh-set-nav-item:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.yh-set-nav-item:active { background: var(--bg-accent); }

.yh-set-nav-item.is-active {
  color: var(--text);
  background: var(--bg-accent);
  font-weight: 550;
}

.yh-set-nav-empty {
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--text-faint);
}

.yh-set-main {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow-y: auto;
}

.yh-set-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-faint);
  transition:
    color 0.12s ease,
    background-color 0.12s ease,
    transform 0.12s var(--ease-out);
}

.yh-set-close:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.yh-set-close:active { transform: scale(.92); }

.yh-set-content {
  max-width: 660px;
  padding: 40px 48px 64px;
}

.yh-set-page-title {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.015em;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}

/* ---------- ChatGPT 式分组与行 ---------- */

.yh-cfg-group-wrap {
  margin-bottom: 28px;
}

.yh-cfg-group-label {
  margin: 0 2px 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.yh-cfg-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-window);
  overflow: hidden;
}

.yh-cfg-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  padding: 12px 18px;
  transition: background-color 0.16s ease;
}

.yh-cfg-row:hover {
  background: var(--bg-subtle);
}

.yh-cfg-row + .yh-cfg-row,
.yh-cfg-field + .yh-cfg-field,
.yh-cfg-row + .yh-cfg-field,
.yh-cfg-field + .yh-cfg-row {
  border-top: 1px solid var(--border);
}

.yh-cfg-row-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.yh-cfg-row-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.yh-cfg-row-desc {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-faint);
}

/* 插件权限徽章 */
.yh-plugin-perms { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.yh-plugin-perm-badge {
  font-size: 11px; line-height: 1; padding: 3px 8px;
  border-radius: 5px; border: 1px solid rgba(0,0,0,.1);
  color: var(--text-secondary); background: rgba(0,0,0,.03);
}
:root[data-theme='dark'] .yh-plugin-perm-badge {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}
.yh-plugin-perm-warn {
  font-size: 11px; line-height: 1; padding: 3px 8px;
  border-radius: 5px; border: 1px solid rgba(217,119,6,.35);
  color: #b45309; background: rgba(217,119,6,.08);
}
:root[data-theme='dark'] .yh-plugin-perm-warn {
  color: #fbbf24; border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.08);
}

.yh-cfg-row-control {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.yh-row-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.yh-btn-mini {
  height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 12.5px;
  background: var(--yh-btn-bg, #fff);
  border: 1px solid var(--yh-line, #d9d8d3);
  color: var(--yh-ink, #161615);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.yh-btn-mini:hover {
  border-color: var(--yh-ink, #161615);
}

.yh-cfg-switch {
  flex: none;
}

.yh-cfg-select {
  height: 32px;
  max-width: 210px;
  padding: 0 28px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--bg-window);
  color: var(--text);
  font-size: 12.5px;
  outline: none;
  cursor: pointer;
  appearance: auto;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.yh-cfg-select:hover {
  border-color: var(--text-faint);
}

.yh-cfg-select:focus-visible {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* 主题分段选择 */
.yh-segmented {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  overflow: hidden;
}

.yh-segmented-item {
  height: 30px;
  padding: 0 13px;
  font-size: 12.5px;
  color: var(--text-muted);
  border-right: 1px solid var(--border-strong);
  transition: background-color 0.16s ease, color 0.16s ease;
}

.yh-segmented-item:last-child {
  border-right: none;
}

.yh-segmented-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.yh-segmented-item.is-active {
  background: var(--text);
  color: var(--bg-window);
}

/* 语速滑块 */
.yh-cfg-range {
  display: flex;
  align-items: center;
  gap: 10px;
}

.yh-cfg-range input[type='range'] {
  width: 120px;
  accent-color: var(--text);
}

.yh-cfg-range span {
  width: 36px;
  text-align: right;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

/* 音色选择 + 试听 */
.yh-cfg-voice { display: flex; align-items: center; gap: 8px; }
.yh-cfg-voice .yh-cfg-select { min-width: 188px; max-width: 240px; }
.yh-cfg-voice-preview {
  height: 30px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-subtle); color: var(--text-muted); font-size: 12.5px; cursor: pointer;
  transition: color .16s var(--ease-out), border-color .16s var(--ease-out), background .16s var(--ease-out), transform .14s var(--ease-out);
}
.yh-cfg-voice-preview:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-hover); }
.yh-cfg-voice-preview:active { transform: scale(.95); }

/* 组内字段（输入框/文本域） */
.yh-cfg-field {
  padding: 14px 18px 16px;
}

.yh-cfg-field-label {
  display: block;
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 7px;
}

.yh-cfg-input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--bg-window);
  padding: 0 11px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.yh-cfg-input:disabled {
  background: var(--bg-subtle);
  border-color: var(--border);
  color: var(--text-faint);
  cursor: default;
}

/* 带内嵌字数提示的输入框 */
.yh-cfg-input-wrap { position: relative; }
.yh-cfg-input-wrap .yh-cfg-input { padding-right: 52px; }
.yh-cfg-count {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; pointer-events: none;
}

.yh-cfg-input:focus,
.yh-cfg-textarea:focus {
  border-color: #141414;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.045);
}

:root[data-theme='dark'] .yh-cfg-input:focus,
:root[data-theme='dark'] .yh-cfg-textarea:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.07);
}

.yh-cfg-textarea {
  resize: vertical;
}

.yh-cfg-empty {
  padding: 16px;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* 自动保存状态：常态灰字说明，保存后短暂点亮 */
.yh-cfg-autosave {
  margin: -2px 0 16px;
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color .2s ease;
}
.yh-cfg-autosave.is-saved { color: var(--text-muted); animation: yh-pop-check .3s var(--ease-out); }

/* 记忆条目 */
.yh-cfg-memory {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.yh-cfg-memory span {
  flex: 1;
  min-width: 0;
  user-select: text;
}

.yh-cfg-add-memory {
  margin: 12px 16px 14px;
}

/* 内联记忆编辑器 */
.yh-cfg-memory-add {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border);
}
.yh-cfg-memory-add .yh-set-textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--bg-window);
  resize: vertical;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.yh-cfg-memory-add .yh-set-textarea:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 6%, transparent);
}
.yh-cfg-memory-add-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.yh-cfg-memory-add-foot .yh-cfg-count { position: static; transform: none; margin-right: auto; }

/* 快捷键 */
.yh-cfg-keys {
  flex: none;
  display: flex;
  gap: 4px;
}

.yh-cfg-keys kbd {
  display: inline-block;
  min-width: 22px;
  text-align: center;
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--bg-subtle);
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text-muted);
}

/* 归档列表 */
.yh-archived-row {
  gap: 12px;
}

.yh-archived-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  color: var(--text-faint);
}

.yh-archived-open .yh-cfg-row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yh-archived-open .yh-cfg-row-desc {
  flex: none;
}

.yh-archived-open:hover .yh-cfg-row-title {
  color: var(--text);
}

/* 危险操作：黑白克制处理 */
.yh-danger-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 12.5px;
  background: var(--text);
  color: var(--bg-window);
  white-space: nowrap;
  transition: opacity 0.14s ease;
}

.yh-danger-btn:hover {
  opacity: 0.82;
}

.yh-text-danger-btn {
  color: var(--text-muted);
}

.yh-text-danger-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.yh-confirm-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 关于 */
.yh-cfg-about {
  padding: 22px 18px 18px;
}

.yh-cfg-about-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.yh-cfg-about-logo {
  flex: none;
  color: var(--text);
  padding: 9px;
  border-radius: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.yh-cfg-about-name {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.yh-cfg-about-tag {
  margin: 3px 0 0;
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--text-faint);
}

.yh-cfg-about-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 480px;
}

.yh-cfg-about-team {
  padding: 14px 16px 16px;
}

.yh-cfg-about-team p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.yh-cfg-about-team .yh-cfg-about-copy {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-faint);
}

.yh-cfg-static {
  font-size: 12.5px;
  color: var(--text-faint);
  white-space: nowrap;
}

/* 关于页：软件更新 */
.yh-update-ctl { display: inline-flex; align-items: center; gap: 10px; }
.yh-update-btn { font-size: 12.5px; line-height: 1; padding: 8px 15px; border: 1px solid var(--border-strong); border-radius: 9px; color: var(--text); background: var(--bg-window); transition: background-color .16s ease, transform .16s var(--ease-out), box-shadow .16s ease; }
.yh-update-btn:hover { background: var(--bg-hover); }
.yh-update-btn:active { transform: scale(.97); }
.yh-update-btn:disabled { opacity: .5; cursor: default; }
.yh-update-btn.is-primary { background: var(--text); border-color: var(--text); color: var(--bg-window); }
.yh-update-btn.is-primary:hover { background: var(--text); box-shadow: 0 3px 10px rgba(0, 0, 0, .16); transform: translateY(-.5px); }
:root[data-theme='dark'] .yh-update-btn.is-primary:hover { box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.yh-update-note { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }

/* 设置页：本地知识库 */
.yh-kb { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.yh-kb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.yh-kb-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.yh-kb-head-text p { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--text-muted); }
.yh-kb-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.yh-kb-hint { font-size: 12px; color: var(--text-faint); }
.yh-kb-stats { font-size: 12px; color: var(--text-faint); }
.yh-kb-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 20px; border: 1px dashed var(--border-strong); border-radius: 14px; color: var(--text-faint); text-align: center; transition: border-color .2s ease, background-color .2s ease; }
.yh-kb-empty:hover { border-color: var(--text-faint); background: var(--bg-subtle); }
.yh-kb-empty p { margin: 0; max-width: 380px; font-size: 12.5px; line-height: 1.7; }
.yh-kb-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.yh-kb-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--bg-window); transition: background-color .16s ease; }
.yh-kb-item:hover { background: var(--bg-subtle); }
.yh-kb-item + .yh-kb-item { border-top: 1px solid var(--border); }
.yh-kb-item-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; background: var(--bg-subtle); color: var(--text-muted); border-radius: 8px; }
.yh-kb-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.yh-kb-item-name { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-kb-item-meta { font-size: 11.5px; color: var(--text-faint); }
.yh-kb-autolearn { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px; border: 1px dashed var(--border); border-radius: 12px; }
.yh-kb-autolearn-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.yh-kb-autolearn-text p { margin: 0; font-size: 12px; line-height: 1.7; color: var(--text-muted); }
.yh-kb-item-url { font-size: 11px; color: var(--text-faint); opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-kb-del { flex: none; color: var(--text-faint); }
.yh-kb-del:hover { color: var(--danger); }
.yh-kb-refresh { flex: none; color: var(--text-faint); }
.yh-kb-refresh:hover { color: var(--text); }
.yh-kb-refresh:disabled { opacity: .5; cursor: not-allowed; }
.yh-kb-item.is-auto { background: rgba(0, 0, 0, .015); }
:root[data-theme='dark'] .yh-kb-item.is-auto { background: rgba(255, 255, 255, .015); }
.yh-spin { animation: yh-spin 0.9s linear infinite; transform-origin: center; }
@keyframes yh-spin { to { transform: rotate(360deg); } }

/* 添加网页弹窗 */
.yh-kb-url-dialog {
  width: 480px; max-width: calc(100vw - 32px);
  background: var(--bg-window); border: 1px solid var(--border);
  border-radius: 14px; padding: 0 0 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
  animation: yh-dialog-in .18s var(--ease-out);
}
.yh-kb-url-desc { font-size: 12.5px; color: var(--text-faint); line-height: 1.55; padding: 0 20px 12px; }
.yh-kb-url-input {
  display: block; width: calc(100% - 40px); margin: 0 20px 16px;
  height: 36px; padding: 0 12px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: 8px; font-size: 13px; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.yh-kb-url-input:focus { outline: none; border-color: var(--text-muted); box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.yh-kb-url-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 20px; }

/* 兼容：任务编辑器等仍在使用的基础字段样式 */
.yh-set-field {
  margin-bottom: 11px;
}

.yh-set-field label {
  display: block;
  font-size: 11.5px;
  color: var(--text-faint);
  margin-bottom: 5px;
}

.yh-set-field input,
.yh-set-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-window);
  padding: 8px 11px;
  font-size: 13px;
  outline: none;
  user-select: text;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.yh-set-field input:hover,
.yh-set-textarea:hover {
  border-color: var(--border-strong);
}

.yh-set-field input:focus,
.yh-set-textarea:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 7%, transparent);
}

.yh-set-textarea {
  resize: vertical;
  line-height: 1.65;
  font-family: inherit;
}

.yh-set-hint {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-faint);
}


/* ---------- 错误兜底页 ---------- */

.yh-error-page {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-window);
  padding: 24px;
}

.yh-error-card {
  width: 360px;
  max-width: 100%;
  text-align: center;
}

.yh-error-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 10px;
}

.yh-error-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.yh-error-btn {
  height: 36px;
  padding: 0 20px;
  background: var(--teal);
  color: var(--bg-window);
  border-radius: 9px;
  font-size: 13px;
  transition: background-color 0.14s ease;
}

.yh-error-btn:hover {
  background: var(--teal-hover);
}

/* ---------- 对话分支树 ---------- */

.yh-ctree {
  width: 560px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  background: var(--bg-window);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  animation: yh-dialog-in 0.18s var(--ease-out);
}

.yh-ctree-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.yh-ctree-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.yh-ctree-heading h2 {
  font-size: 15px;
  font-weight: 650;
  margin: 0;
}

.yh-ctree-summary {
  font-size: 11.5px;
  color: var(--text-faint);
}

.yh-ctree-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 20px;
}

.yh-ctree-node {
  position: relative;
}

.yh-ctree-node[style*="--depth"]:not([style*="--depth: 0"]) {
  padding-left: 24px;
}

.yh-ctree-node[style*="--depth"]:not([style*="--depth: 0"])::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.yh-ctree-node[style*="--depth"]:not([style*="--depth: 0"])::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 22px;
  width: 14px;
  height: 1px;
  background: var(--border);
}

.yh-ctree-children {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.yh-ctree-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.14s ease, background-color 0.14s ease, transform 0.14s ease;
  position: relative;
}

.yh-ctree-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.yh-ctree-card:active {
  transform: scale(0.995);
}

.yh-ctree-card.is-root {
  border-color: var(--teal);
  background: rgba(47, 111, 119, 0.04);
}

.yh-ctree-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yh-ctree-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-faint);
}

.yh-ctree-preview {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.yh-ctree-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 10px;
  font-weight: 600;
  color: var(--teal);
  background: rgba(47, 111, 119, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
}

:root[data-theme='dark'] .yh-ctree-card.is-root {
  background: rgba(79, 151, 160, 0.08);
}

:root[data-theme='dark'] .yh-ctree-badge {
  color: var(--teal);
  background: rgba(79, 151, 160, 0.15);
}

.yh-info-action {
  margin-top: 10px;
  align-self: flex-start;
  font-size: 11.5px;
  color: var(--teal);
  background: rgba(47, 111, 119, 0.06);
  padding: 5px 12px;
  border-radius: 7px;
  border: 1px solid rgba(47, 111, 119, 0.15);
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

.yh-info-action:hover {
  background: rgba(47, 111, 119, 0.1);
  border-color: rgba(47, 111, 119, 0.3);
}

.yh-info-action:active {
  transform: scale(0.97);
}

:root[data-theme='dark'] .yh-info-action {
  color: var(--teal);
  background: rgba(79, 151, 160, 0.1);
  border-color: rgba(79, 151, 160, 0.2);
}

/* ---------- 收藏夹 ---------- */

.yh-fav {
  width: 620px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  background: var(--bg-window);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  animation: yh-dialog-in 0.18s var(--ease-out);
}

.yh-fav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.yh-fav-heading { display: flex; align-items: baseline; gap: 10px; }
.yh-fav-heading h2 { font-size: 15px; font-weight: 650; margin: 0; }
.yh-fav-count { font-size: 11.5px; color: var(--text-faint); }

.yh-fav-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.yh-fav-search {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.yh-fav-search:focus {
  border-color: var(--text-muted);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.yh-fav-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.yh-fav-tag-chip {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.14s ease;
}

.yh-fav-tag-chip:hover { color: var(--text); }
.yh-fav-tag-chip.is-active { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }

.yh-fav-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.yh-fav-empty {
  text-align: center;
  padding: 40px 20px;
  font-size: 13px;
  color: var(--text-faint);
}

.yh-fav-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--bg-subtle);
  transition: border-color 0.14s ease;
}

.yh-fav-item:hover { border-color: var(--border-strong); }

.yh-fav-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.yh-fav-item-conv {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--teal);
  text-align: left;
  transition: opacity 0.14s ease;
}

.yh-fav-item-conv:hover { opacity: 0.75; }

.yh-fav-item-time {
  font-size: 11px;
  color: var(--text-faint);
  margin-left: auto;
}

.yh-fav-item-del {
  color: var(--text-faint);
  transition: color 0.14s ease;
}

.yh-fav-item-del:hover { color: var(--danger); }

.yh-fav-item-content {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.yh-fav-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.yh-fav-item-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(47, 111, 119, 0.08);
  color: var(--teal);
}

.yh-fav-tag-rm {
  font-size: 13px;
  line-height: 1;
  color: var(--text-faint);
  padding: 0;
  transition: color 0.12s ease;
}

.yh-fav-tag-rm:hover { color: var(--danger); }

.yh-fav-item-addtag { margin-top: 8px; }

.yh-fav-tag-input {
  width: 100%;
  height: 28px;
  padding: 0 10px;
  background: var(--bg-window);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  transition: border-color 0.14s ease;
}

.yh-fav-tag-input:focus { border-color: var(--text-muted); }
.yh-fav-tag-input::placeholder { color: var(--text-faint); }

:root[data-theme='dark'] .yh-fav-item-tag { background: rgba(79, 151, 160, 0.12); }

/* ---------- 自定义指令管理 ---------- */

.yh-cfg-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 16px;
}

.yh-cfg-add-cmd {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.yh-cfg-add-cmd h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 12px;
}

.yh-cfg-add-cmd .yh-set-field input,
.yh-cfg-add-cmd .yh-set-field textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-window);
  padding: 8px 11px;
  font-size: 13px;
  outline: none;
  user-select: text;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
  font-family: inherit;
}

.yh-cfg-add-cmd .yh-set-field input:focus,
.yh-cfg-add-cmd .yh-set-field textarea:focus {
  border-color: var(--text-muted);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.yh-set-field-input {
  font-family: inherit;
}

.yh-set-field-btn {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--bg-window);
  color: var(--text);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

.yh-set-field-btn:hover { background: var(--bg-hover); }
.yh-set-field-btn:active { transform: scale(0.96); }

.yh-cfg-add-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
/* Dialog foundations */
/* 柔流·沉浸：遮罩带轻模糊渐入，弹层 blur→sharp 对焦入场 */
/* no-drag：遮罩盖住标题栏拖拽带，避免落在顶部带内的点击变成拖窗口 */
.yh-modal-overlay, .yh-set-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: #0005; animation: yh-veil-in .4s var(--ease-flow) both; -webkit-app-region: no-drag; }
@keyframes yh-veil-in { from { background: #0000; backdrop-filter: blur(0); } to { background: #0005; backdrop-filter: blur(3px); } }
.yh-command, .yh-library, .yh-shortcuts { border: 1px solid var(--border); border-radius: 18px; background: var(--bg-window); box-shadow: var(--shadow-menu); outline: none; overflow: hidden; animation: yh-cmd-pop .36s var(--ease-arrive) both; }
@keyframes yh-cmd-pop { from { opacity: 0; transform: translateY(7px) scale(.986); filter: blur(2px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
.yh-modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 30px 30px 20px; }
.yh-modal-heading h2 { font-size: 20px; font-weight: 600; margin: 0 0 9px; }
.yh-modal-heading p { color: var(--text-muted); font-size: 13px; }
.yh-primary-btn, .yh-secondary-btn { height: 35px; padding: 0 14px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; font-size: 13px; border-radius: 7px; white-space: nowrap; }
.yh-primary-btn { background: var(--accent); color: var(--accent-contrast); }
.yh-primary-btn:hover { opacity: .9; }
.yh-secondary-btn { border: 1px solid var(--border-strong); }
.yh-secondary-btn:hover { background: var(--bg-hover); }
.yh-empty-state { text-align: center; padding: 40px 20px; color: var(--text-faint); grid-column: 1 / -1; }
.yh-empty-state h3 { margin: 15px 0 8px; font-size: 14px; font-weight: 500; color: var(--text-muted); }
.yh-empty-state p { font-size: 13px; }
.yh-text-danger { color: var(--danger); font-size: 12px; padding: 5px; }

/* Search and commands */
.yh-command-overlay { align-items: flex-start; padding-top: min(17vh, 150px); }
.yh-command { width: 610px; max-width: 100%; }
.yh-command-search { display: flex; align-items: center; gap: 13px; padding: 17px 19px; border-bottom: 1px solid var(--border); color: var(--text-faint); transition: box-shadow .18s ease; }
.yh-command-search:focus-within { box-shadow: 0 1px 0 var(--border), 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.yh-command-search input { flex: 1; height: 29px; background: transparent; outline: none; border: 0; font-size: 15px; color: var(--text); }
.yh-command-search > svg { transition: color .18s ease; }
.yh-command-search:focus-within > svg { color: var(--accent); }
.yh-command-results { max-height: min(430px, 55vh); overflow-y: auto; padding: 7px; }
.yh-list-caption { color: var(--text-faint); font-size: 12px; padding: 10px 11px 7px; letter-spacing: .02em; }
.yh-command-item { display: flex; align-items: center; gap: 13px; padding: 12px; width: 100%; text-align: left; border-radius: 10px; color: var(--text-muted); position: relative; transition: background-color .16s var(--ease-out), color .16s var(--ease-out), transform .14s var(--ease-out); }
.yh-command-item::before { content: ''; position: absolute; left: 3px; top: 50%; height: 0; width: 2.5px; border-radius: 2px; background: var(--accent); transform: translateY(-50%); transition: height .22s var(--ease-morph); }
.yh-command-item.is-selected { background: var(--bg-accent); color: var(--text); }
.yh-command-item.is-selected::before { height: 18px; }
.yh-command-item:hover { background: var(--bg-hover); }
.yh-command-item:active { transform: scale(.992); }
.yh-command-item > svg { transition: color .18s ease, transform .18s var(--ease-out); color: var(--text-faint); }
.yh-command-item.is-selected > svg, .yh-command-item:hover > svg { color: var(--accent); transform: scale(1.04); }
.yh-command-item > span:nth-child(2) { flex: 1; min-width: 0; }
.yh-command-item strong { display: block; color: var(--text); font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .16s ease; }
.yh-command-item small { display: block; color: var(--text-faint); font-size: 12px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-command-enter { color: var(--text-faint); opacity: 0; transform: translateX(-4px); transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), color .16s ease; flex: none; }
.yh-command-item.is-selected .yh-command-enter { opacity: 1; transform: translateX(0); color: var(--accent); }
.yh-command-footer { display: flex; gap: 17px; padding: 12px 19px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 11px; }
.yh-command-footer kbd, .yh-shortcut-row kbd { display: inline-block; padding: 2px 5px; border: 1px solid var(--border-strong); border-radius: 4px; margin-right: 3px; background: var(--bg-sidebar); transition: border-color .14s ease, color .14s ease; }
.yh-command-footer span { display: inline-flex; align-items: center; }
.yh-command-results .yh-empty-state svg { color: var(--text-faint); animation: yh-breathe 3.6s ease-in-out infinite; }

/* Prompt library */
.yh-library { width: 820px; max-width: 100%; max-height: min(800px, 88vh); display: flex; flex-direction: column; }
.yh-library-tools { display: flex; align-items: center; gap: 12px; padding: 0 30px; }
.yh-library-search { display: flex; align-items: center; gap: 9px; flex: 1; border: 1px solid var(--border); background: var(--bg-sidebar); padding: 0 11px; height: 35px; border-radius: 7px; color: var(--text-faint); }
.yh-library-search input { width: 100%; border: 0; background: transparent; outline: none; font-size: 13px; }
.yh-category-tabs { display: flex; gap: 6px; padding: 21px 30px 16px; }
.yh-category-tabs > button { padding: 6px 13px; border-radius: 6px; color: var(--text-muted); font-size: 13px; }
.yh-category-tabs > button.is-active { background: var(--bg-accent); color: var(--teal); }
.yh-category-tabs > button:hover { background: var(--bg-hover); }
.yh-library-grid { display: grid; grid-template-columns: 1fr; gap: 0; padding: 0 30px 22px; overflow-y: auto; min-height: 0; }
.yh-template-card { border-bottom: 1px solid var(--border); padding: 18px 0; display: flex; flex-direction: column; }
.yh-template-category { color: var(--teal); font-size: 11px; letter-spacing: 1px; }
.yh-template-card h3 { font-size: 15px; font-weight: 500; margin: 9px 0 7px; }
.yh-template-card > p { font-size: 12px; color: var(--text-faint); line-height: 1.7; }
.yh-template-preview { color: var(--text-muted); font-size: 12px; line-height: 1.8; margin: 9px 0; max-height: 45px; overflow: hidden; white-space: pre-wrap; }
.yh-template-actions { display: flex; align-items: center; gap: 4px; margin-top: auto; }
.yh-template-use { flex: 1; display: flex; align-items: center; gap: 7px; text-align: left; font-size: 12px; color: var(--teal); padding: 5px 0; }
.yh-library-foot { font-size: 12px; color: var(--text-faint); padding: 13px 30px; border-top: 1px solid var(--border); line-height: 1.6; }
.yh-template-editor { padding: 0 30px 28px; overflow-y: auto; }
.yh-template-editor label { display: block; font-size: 13px; color: var(--text-muted); margin: 14px 0; }
.yh-template-editor input, .yh-template-editor textarea { display: block; width: 100%; padding: 10px 12px; margin-top: 7px; background: var(--bg-sidebar); border: 1px solid var(--border-strong); border-radius: 7px; outline: none; font-size: 14px; line-height: 1.8; resize: vertical; }
.yh-template-editor input:focus, .yh-template-editor textarea:focus { border-color: var(--teal); }
.yh-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.yh-shortcuts { width: 430px; max-width: 100%; max-height: 90vh; overflow: auto; padding: 24px; }
.yh-shortcuts .yh-details-head { margin-bottom: 8px; }
.yh-shortcuts > p { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.yh-shortcut-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.yh-shortcut-row > span:last-child { flex: none; }
.yh-shortcuts > small { font-size: 12px; color: var(--text-faint); display: block; margin-top: 20px; }
.yh-toast-stack { position: fixed; z-index: 160; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.yh-toast { pointer-events: auto; display: flex; align-items: center; gap: 9px; max-width: calc(100vw - 40px); padding: 10px 8px 10px 13px; background: var(--text); color: var(--bg-window); box-shadow: var(--shadow-menu); border-radius: 11px; font-size: 13.5px; line-height: 1.45; animation: yh-toast-in .28s var(--ease-out); }
.yh-toast-icon { display: inline-flex; flex: none; align-items: center; }
.yh-toast-success .yh-toast-icon { color: #4cc4ad; }
.yh-toast-error .yh-toast-icon { color: #f08a8a; }
.yh-toast-info .yh-toast-icon, .yh-toast-loading .yh-toast-icon { color: rgba(255,255,255,.72); }
.yh-toast-text { white-space: nowrap; }
.yh-toast-action { flex: none; padding: 3px 9px; border-radius: 6px; font-size: 12.5px; color: var(--bg-window); background: rgba(255,255,255,.14); transition: background-color .13s ease; }
.yh-toast-action:hover { background: rgba(255,255,255,.24); }
.yh-toast-close.yh-icon-btn { width: 22px; height: 22px; flex: none; color: inherit; opacity: .55; }
.yh-toast-close.yh-icon-btn:hover { opacity: 1; background: rgba(255,255,255,.12); }
.yh-toast-spinner { animation: yh-spin .8s linear infinite; }
@keyframes yh-toast-in { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.yh-toast.is-leaving { animation: yh-toast-out .2s var(--ease-out) forwards; }
@keyframes yh-toast-out { to { opacity: 0; transform: translateY(-6px) scale(.96); } }
@keyframes yh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .yh-toast { animation: yh-fade-in .15s ease both; } .yh-toast-spinner { animation-duration: 1.4s; } }

/* Settings polish */
.yh-set-panel { width: 850px; height: 660px; max-width: 100%; max-height: 90vh; border: 1px solid var(--border); border-radius: 16px; outline: none; }
.yh-set-side { padding: 27px 14px 20px; background: var(--bg-sidebar); }
.yh-set-side-title { padding-bottom: 24px; }
.yh-set-side-foot { line-height: 1.9; font-size: 11px; }
.yh-set-content { padding: 30px; }
.yh-set-intro { font-size: 13px; line-height: 1.8; color: var(--text-muted); margin: -4px 0 23px; }
.yh-add-provider { margin-bottom: 18px; }
.yh-set-card { background: var(--bg-window); }
.yh-set-card.is-active { border-color: var(--teal); }
.yh-set-card-name { font-size: 14px; }
.yh-set-badge { font-size: 11px; border-color: var(--border-strong); }
.yh-set-test { max-width: 100px; font-size: 12px; }
.yh-set-card-head { flex-wrap: wrap; }
.yh-set-field input { font-size: 14px; }
.yh-set-field input:focus, .yh-set-textarea:focus { border-color: var(--text-muted); }
.yh-set-about-desc + .yh-set-about-desc { margin-top: 18px; font-size: 13px; }
.yh-set-test.is-fail { color: var(--danger); }
.yh-set-close { top: 18px; right: 18px; }

/* 创建项目弹窗 */
.yh-cp-overlay { z-index: 120; }
.yh-cp-dialog { width: 560px; max-width: calc(100vw - 48px); padding: 26px 28px 22px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg-window); box-shadow: var(--shadow-menu); animation: yh-fade-up .2s var(--ease-out); }
.yh-cp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.yh-cp-head h2 { font-size: 24px; font-weight: 700; letter-spacing: .01em; }
.yh-cp-head .yh-icon-btn { margin-right: -8px; }
.yh-cp-name { display: flex; align-items: center; gap: 11px; height: 50px; padding: 0 15px; border: 1.5px solid var(--border); border-radius: 12px; transition: border-color .16s ease, box-shadow .16s ease; }
.yh-cp-name:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 16%, transparent); }
.yh-cp-name-icon { flex: none; color: var(--text); }
.yh-cp-name input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 15px; color: var(--text); }
.yh-cp-name input::placeholder { color: var(--text-faint); }
.yh-cp-folder-label { margin: 22px 2px 10px; font-size: 14px; font-weight: 500; }
.yh-cp-folder { min-height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-sidebar); transition: border-color .16s ease, background-color .16s ease; }
.yh-cp-folder.is-selected { align-items: stretch; justify-content: flex-start; }
.yh-cp-folder-prompt { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); }
.yh-cp-folder-prompt svg { color: var(--text-faint); }
.yh-cp-folder-add { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 16px; border-radius: 9px; background: var(--bg-subtle); font-size: 13px; color: var(--text); transition: background-color .15s ease; }
.yh-cp-folder-add:hover:not(:disabled) { background: var(--bg-accent); }
.yh-cp-folder-prompt:disabled, .yh-cp-folder-add:disabled, .yh-cp-folder-change:disabled { opacity: .55; cursor: default; }
.yh-cp-folder-chosen { display: flex; align-items: center; gap: 12px; width: 100%; }
.yh-cp-folder-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--bg-subtle); color: var(--text); }
.yh-cp-folder-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.yh-cp-folder-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-cp-folder-path { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; }
.yh-cp-folder-change { flex: none; height: 30px; padding: 0 13px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 12.5px; color: var(--text-muted); }
.yh-cp-folder-change:hover { background: var(--bg-hover); color: var(--text); }
.yh-cp-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.yh-cp-cancel { height: 38px; padding: 0 16px; font-size: 14px; color: var(--text-muted); border-radius: 10px; }
.yh-cp-cancel:hover { color: var(--text); }
.yh-cp-submit { height: 38px; padding: 0 22px; border-radius: 10px; background: var(--text); color: var(--bg-window); font-size: 14px; font-weight: 500; transition: opacity .15s ease, transform .15s var(--ease-out); }
.yh-cp-submit:hover:not(:disabled) { opacity: .88; }
.yh-cp-submit:active:not(:disabled) { transform: scale(.97); }
.yh-cp-submit:disabled { opacity: .35; cursor: default; }

/* 项目记忆弹窗 */
.yh-pm-dialog { width: 620px; }
.yh-pm-intro { margin: -12px 0 18px; font-size: 12.5px; line-height: 1.65; color: var(--text-faint); }
.yh-pm-field { display: flex; flex-direction: column; gap: 7px; }
.yh-pm-field + .yh-pm-field { margin-top: 15px; }
.yh-pm-field label { font-size: 13px; font-weight: 600; color: var(--text); }
.yh-pm-field label small { margin-left: 6px; font-size: 11.5px; font-weight: 400; color: var(--text-faint); }
.yh-pm-field textarea { resize: vertical; min-height: 58px; padding: 10px 12px; font-family: inherit; font-size: 13px; line-height: 1.65; color: var(--text); border: 1px solid var(--border); border-radius: 10px; background: var(--bg-subtle); transition: border-color .15s ease, background .15s ease; }
.yh-pm-field textarea::placeholder { color: var(--text-faint); }
.yh-pm-field textarea:focus { outline: none; border-color: color-mix(in srgb, var(--text) 40%, var(--border)); background: var(--bg-window); }
.yh-pm-foot { margin-top: 24px; }
.yh-pm-extract { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; margin-right: auto; font-size: 13px; font-weight: 500; color: var(--teal); border: 1px solid color-mix(in srgb, var(--teal) 36%, transparent); border-radius: 10px; transition: background .15s ease, transform .15s var(--ease-out), opacity .15s ease; }
.yh-pm-extract:hover:not(:disabled) { background: color-mix(in srgb, var(--teal) 9%, transparent); }
.yh-pm-extract:active:not(:disabled) { transform: scale(.97); }
.yh-pm-extract:disabled { opacity: .45; cursor: default; }

/* 侧栏项目绑定的源文件夹 */
.yh-project-path { padding: 0 10px 2px 27px; font-size: 10.5px; line-height: 1.5; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; }

/* 登录 / 注册弹窗：磨砂玻璃浮岛（对齐 boot 极光视觉语言） */
.yh-set-overlay:has(.yh-auth-panel) { background: rgba(0, 0, 0, .42); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.yh-auth-panel { width: 420px; max-width: calc(100vw - 48px); padding: 38px 38px 30px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 20px; background: var(--composer-glass); backdrop-filter: blur(30px) saturate(160%); -webkit-backdrop-filter: blur(30px) saturate(160%); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 24px 60px -16px rgba(20, 20, 20, .22), 0 2px 10px rgba(20, 20, 20, .06); animation: yh-auth-rise .5s var(--ease-morph) both; position: relative; }
:root[data-theme='dark'] .yh-auth-panel { border-color: rgba(255, 255, 255, .08); box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 60px -16px rgba(0, 0, 0, .6), 0 2px 10px rgba(0, 0, 0, .3); }
@keyframes yh-auth-rise { from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.yh-auth { display: flex; flex-direction: column; gap: 14px; }
.yh-auth-lang {
  align-self: flex-end;
  appearance: none; border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); font-size: 12px; line-height: 1;
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.yh-auth-lang:hover { color: var(--text); border-color: var(--text-muted); background: rgba(128, 128, 128, .08); }
.yh-auth-lang:active { transform: scale(.96); }
.yh-auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 2px; }
.yh-auth-brand-mark { color: var(--text); filter: drop-shadow(0 4px 10px rgba(20, 20, 20, .18)); animation: yh-breathe 4.6s ease-in-out infinite; transform-origin: center; }
:root[data-theme='dark'] .yh-auth-brand-mark { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)); }
.yh-auth-brand-name { font-size: 19px; font-weight: 650; letter-spacing: .14em; color: var(--text); }
.yh-auth-desc { font-size: 13px; color: var(--text-muted); margin: -2px 0 10px; line-height: 1.6; }
.yh-auth-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.yh-auth-tab { flex: 1; padding: 10px 0 12px; font-size: 14px; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s var(--ease-out), border-color .2s var(--ease-out); }
.yh-auth-tab:hover { color: var(--text); }
.yh-auth-tab.is-active { color: var(--text); border-bottom-color: var(--text); font-weight: 500; }
.yh-auth-subtabs { display: flex; gap: 14px; margin-top: -6px; }
.yh-auth-subtab { font-size: 12px; color: var(--text-faint); padding: 2px 0; border-bottom: 1px solid transparent; transition: color .15s ease, border-color .15s ease; }
.yh-auth-subtab:hover { color: var(--text-muted); }
.yh-auth-subtab.is-active { color: var(--text); border-bottom-color: var(--text); }
.yh-auth-field { display: flex; flex-direction: column; gap: 6px; }
.yh-auth-field label { font-size: 12px; color: var(--text-muted); }
.yh-auth-field input { height: 40px; padding: 0 13px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 12px; background: rgba(255, 255, 255, .32); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 14px; color: var(--text); outline: none; box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset; transition: background-color .25s var(--ease-out), border-color .25s var(--ease-out), box-shadow .25s var(--ease-out); }
:root[data-theme='dark'] .yh-auth-field input { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset; }
.yh-auth-field input::placeholder { color: var(--text-faint); font-size: 14px; }
.yh-auth-field input:focus { background: rgba(255, 255, 255, .55); border-color: rgba(20, 20, 20, .45); box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--text) 10%, transparent), 0 1px 0 rgba(255, 255, 255, .55) inset; }
:root[data-theme='dark'] .yh-auth-field input:focus { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); box-shadow: 0 0 0 3.5px rgba(255, 255, 255, .08), 0 1px 0 rgba(255, 255, 255, .04) inset; }
.yh-auth-code-row { display: flex; gap: 8px; }
.yh-auth-code-row input { flex: 1; }
.yh-auth-code-row .yh-secondary-btn { flex: none; height: 40px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .32); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--text-muted); transition: color .2s, border-color .2s, background-color .2s; }
:root[data-theme='dark'] .yh-auth-code-row .yh-secondary-btn { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); }
.yh-auth-code-row .yh-secondary-btn:hover:not(:disabled) { color: var(--text); border-color: rgba(20, 20, 20, .4); background: rgba(255, 255, 255, .5); }
:root[data-theme='dark'] .yh-auth-code-row .yh-secondary-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); }
.yh-auth-captcha-img { flex: none; width: 128px; height: 40px; padding: 0; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .5); background: #f4f3f0; cursor: pointer; display: grid; place-items: center; transition: border-color .2s; }
:root[data-theme='dark'] .yh-auth-captcha-img { background: #2a2a2a; border-color: rgba(255, 255, 255, .12); }
.yh-auth-captcha-img:hover { border-color: rgba(20, 20, 20, .45); }
:root[data-theme='dark'] .yh-auth-captcha-img:hover { border-color: rgba(255, 255, 255, .35); }
.yh-auth-captcha-img svg { width: 100%; height: 100%; display: block; }
.yh-auth-captcha-img span { font-size: 11px; color: var(--text-muted); }
.yh-auth-error { padding: 9px 13px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 8%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 22%, var(--border)); color: var(--danger); font-size: 13px; line-height: 1.55; animation: yh-fade-up .2s var(--ease-out) both; }
.yh-auth-submit { width: 100%; height: 42px; margin-top: 4px; font-size: 14.5px; font-weight: 550; letter-spacing: .02em; border-radius: 12px; background: rgba(20, 20, 20, .92); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 6px 18px rgba(20, 20, 20, .2); transition: opacity .2s, transform .14s var(--ease-out), box-shadow .25s; }
:root[data-theme='dark'] .yh-auth-submit { background: rgba(255, 255, 255, .92); color: #1d1d1f; box-shadow: 0 1px 0 rgba(0, 0, 0, .08) inset, 0 6px 18px rgba(0, 0, 0, .35); }
.yh-auth-submit:hover:not(:disabled) { opacity: .86; }
.yh-auth-submit:active:not(:disabled) { transform: scale(.985); }
.yh-auth-submit:disabled { opacity: .5; cursor: default; }
.yh-auth-tip { font-size: 11.5px; color: var(--text-faint); line-height: 1.6; text-align: center; margin-top: 2px; }

/* 头像 / 用户信息按钮 */
.yh-user-btn { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--text-muted); transition: background-color .15s ease, color .15s ease; max-width: 100%; }
.yh-user-btn:hover { background: var(--bg-hover); color: var(--text); }
.yh-user-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--text); color: var(--bg-window); display: grid; place-items: center; font-size: 11px; font-weight: 600; flex: none; overflow: hidden; }
.yh-user-avatar.is-plain { background: var(--bg-hover); color: var(--text); border: 1px solid var(--border); font-weight: 600; }
.yh-user-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.yh-user-menu { position: fixed; width: 232px; background: var(--bg-window); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-menu); padding: 6px; animation: yh-menu-pop .22s var(--ease-morph); z-index: 140; transform-origin: 16px 100%; }
.yh-user-menu-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--text); transition: background-color .15s ease, padding-left .16s var(--ease-out); width: 100%; text-align: left; }
.yh-user-menu-row:hover { background: var(--bg-hover); padding-left: 13px; }
.yh-user-menu-row:disabled { color: var(--text-faint); cursor: default; background: transparent; padding-left: 10px; }
.yh-user-menu-row.is-danger { color: var(--danger); }
.yh-user-menu-meta { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.yh-user-menu-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-user-menu-email { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 账号页：头像区 / 用量 / 安全 / 退出 */
.yh-account-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.yh-account-head .yh-user-avatar { border-radius: 50%; }
.yh-account-head-side { min-width: 0; }
.yh-account-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.yh-account-hint { font-size: 12.5px; color: var(--text-faint); margin-bottom: 4px; }
.yh-account-save { margin-top: 14px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.yh-account-dirty { font-size: 12px; color: var(--text-faint); }
.yh-secondary-btn.is-primary { background: var(--text); color: var(--bg-window); border-color: var(--text); }
.yh-secondary-btn.is-primary:hover { opacity: .9; }
.yh-secondary-btn:disabled { opacity: .4; cursor: default; }
.yh-account-collapse { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--border); font-size: 13px; color: var(--text); transition: background-color .15s ease, border-color .15s ease; }
.yh-account-collapse:hover { background: var(--bg-hover); }
.yh-account-collapse-caret { color: var(--text-faint); transition: transform .2s var(--ease-out); font-size: 15px; line-height: 1; }
.yh-account-collapse-caret.is-open { transform: rotate(90deg); }
.yh-account-pw { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: color-mix(in srgb, var(--bg-subtle) 45%, transparent); animation: yh-fade-in .2s var(--ease-out) both; }
.yh-account-logout { width: 100%; height: 38px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--danger) 32%, var(--border)); color: var(--danger); font-size: 13px; transition: background-color .15s ease, border-color .15s ease; }
.yh-account-logout:hover { background: color-mix(in srgb, var(--danger) 7%, transparent); border-color: var(--danger); }
.yh-usage { display: flex; flex-direction: column; gap: 8px; }
.yh-usage-row { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; color: var(--text-muted); }
.yh-usage-row strong { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.yh-usage-quota { font-size: 12px; color: var(--text-faint); }
.yh-usage-bar { height: 6px; border-radius: 4px; background: var(--bg-subtle); overflow: hidden; }
.yh-usage-fill { height: 100%; border-radius: 4px; background: var(--text); transition: width .5s var(--ease-out); }
.yh-usage-note { font-size: 12px; color: var(--text-faint); }
.yh-credits-summary { border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 14px; animation: yh-fade-in .24s var(--ease-out) both; }
.yh-credits-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--text-muted); font-size: 13px; }
.yh-credits-row strong { font-size: 23px; line-height: 1.3; font-variant-numeric: tabular-nums; color: var(--text); }
.yh-credits-row small { font-size: 12px; font-weight: 500; }
.yh-credits-meta { color: var(--text-faint); font-size: 12px; line-height: 1.6; margin-top: 3px; }
.yh-credits-depleted { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--danger); background: color-mix(in srgb, var(--danger) 7%, var(--bg-window)); color: var(--text); font-size: 12px; line-height: 1.55; animation: yh-fade-in .28s var(--ease-out) both; }
.yh-credit-history { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--border); display: grid; gap: 6px; }
.yh-credit-history-row { display: flex; justify-content: space-between; gap: 16px; color: var(--text-faint); font-size: 11.5px; }
.yh-credit-history-row strong { color: var(--text-muted); font-weight: 550; font-variant-numeric: tabular-nums; }
.yh-model-rate { color: var(--text); font-variant-numeric: tabular-nums; }
.yh-pw-captcha, .yh-pw-code { display: flex; gap: 8px; align-items: stretch; }
.yh-pw-captcha .yh-cfg-input, .yh-pw-code .yh-cfg-input { flex: 1; }
.yh-pw-captcha-img { flex: none; width: 116px; height: 36px; padding: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-strong); background: #f4f3f0; cursor: pointer; display: grid; place-items: center; transition: border-color .2s; }
:root[data-theme='dark'] .yh-pw-captcha-img { background: #2a2a2a; }
.yh-pw-captcha-img:hover { border-color: var(--text-muted); }
.yh-pw-captcha-img svg { width: 100%; height: 100%; display: block; }
.yh-pw-captcha-img.is-empty { font-size: 11px; color: var(--text-faint); }
.yh-user-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- 头像选择器（油画肖像 + 自定义上传；引导页与设置页共用） ---------- */
.yh-ap { display: flex; flex-direction: column; gap: 13px; margin: 2px 0 18px; }
.yh-ap-group { display: flex; flex-direction: column; gap: 7px; }
.yh-ap-label { font-size: 11px; color: var(--text-faint); letter-spacing: .16em; text-transform: uppercase; }
.yh-ap-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.yh-ap-tile {
  position: relative; width: 50px; height: 50px; padding: 0; border-radius: 50%;
  overflow: hidden; cursor: pointer; border: 1.5px solid var(--border-strong); background: var(--bg-subtle);
  transition: transform .14s var(--ease-out), box-shadow .18s var(--ease-out), border-color .18s var(--ease-out);
}
.yh-ap-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yh-ap-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.20); }
.yh-ap-tile:active { transform: scale(.93); }
.yh-ap-tile.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg-window), 0 0 0 4px var(--text); }
.yh-ap-tile:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.yh-ap-upload { display: grid; place-items: center; border-style: dashed; background: transparent; }
.yh-ap-upload.on { border-style: solid; }
.yh-ap-plus { font-size: 24px; font-weight: 300; line-height: 1; color: var(--text-faint); }



/* ---------- 更新日志（What's New） ---------- */
.yh-whatsnew { width: 480px; max-width: 92vw; background: var(--bg-window); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 18px 50px #0003; padding: 22px 24px 18px; animation: yh-fade-up .18s ease; }
.yh-whatsnew-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.yh-whatsnew-head h2 { margin: 0; font-size: 17px; font-weight: 650; color: var(--text); }
.yh-whatsnew-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-faint); }
.yh-whatsnew-list { margin: 16px 0 6px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.yh-whatsnew-list li { position: relative; padding-left: 16px; font-size: 13.5px; line-height: 1.55; color: var(--text); }
.yh-whatsnew-list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 2px; background: var(--teal); }
.yh-whatsnew-foot { display: flex; justify-content: flex-end; margin-top: 14px; }
:root {
  color-scheme: light;
  --bg-window: #fff;
  --bg: var(--bg-window);
  --bg-sidebar: #f9f9f9;
  --sidebar-glass: rgba(248, 248, 250, .5);
  --rail-glass: rgba(248, 248, 250, .38);
  --chat-glass: rgba(255, 255, 255, .36);
  --composer-glass: rgba(255, 255, 255, .68);
  --composer-border: rgba(255, 255, 255, .8);
  /* 玻璃内高光：顶部 1px 亮边 + 底部暗边，模拟真实玻璃折射 */
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(0, 0, 0, .03);
  --shell-background: transparent;
  --bg-subtle: #f4f4f4;
  --bg-hover: rgba(0, 0, 0, .055);
  --bg-accent: rgba(0, 0, 0, .08);
  --border: #e9e9e9;
  --border-strong: #d8d8d8;
  --text: #171717;
  --text-muted: #676767;
  --text-faint: #9a9a9a;
  --teal: #171717;
  --teal-hover: #333;
  --teal-accent: #0e7c86;
  /* 工具光带：中性灰彗尾（黑白主调，青色仅点缀） */
  --rail: rgba(23, 23, 23, .38);
  --ink: #171717;
  --accent: #171717;
  --accent-contrast: #fff;
  --warn: #d97706;
  --success: #16a34a;
  --danger: #b42318;
  --shadow-menu: 0 8px 28px #00000014;
  --shadow-composer: 0 2px 10px #00000008, 0 16px 44px #00000014;
  --shadow-composer-scrolled: 0 2px 8px #0000000d, 0 18px 50px #00000021;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 26px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-morph: cubic-bezier(.32, .72, 0, 1);
  /* 柔流交互：流转曲线（阻尼跟手）与入境曲线（快速落定、无弹跳） */
  --ease-flow: cubic-bezier(.2, .76, .18, 1);
  --ease-arrive: cubic-bezier(.16, 1, .3, 1);
  --sidebar-w: 260px;
  --rail-w: 58px;
  --font-sans: 'Segoe UI Variable Text', 'Segoe UI', 'Microsoft YaHei UI', 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg-window: #212121;
  --bg-sidebar: #171717;
  --sidebar-glass: rgba(26, 26, 28, .46);
  --rail-glass: rgba(22, 22, 24, .36);
  --chat-glass: rgba(30, 30, 32, .32);
  --composer-glass: rgba(34, 34, 36, .72);
  --composer-border: rgba(255, 255, 255, .08);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, .07), inset 0 -1px 0 rgba(0, 0, 0, .2);
  --bg-subtle: #2f2f2f;
  --bg-hover: rgba(255, 255, 255, .07);
  --bg-accent: rgba(255, 255, 255, .1);
  --border: #383838;
  --border-strong: #4b4b4b;
  --text: #ececec;
  --text-muted: #b4b4b4;
  --text-faint: #8f8f8f;
  --teal: #ececec;
  --teal-hover: #d4d4d4;
  /* 深色主题点缀用深青（厚重不刺眼），不用亮青 */
  --teal-accent: #17707a;
  --rail: rgba(236, 236, 236, .35);
  --ink: #ececec;
  --accent: #ececec;
  --accent-contrast: #171717;
  --warn: #f59e0b;
  --success: #22c55e;
  --danger: #f28b82;
  --shadow-menu: 0 8px 28px #0004;
  --shadow-composer: 0 2px 10px #00000040, 0 16px 44px #00000060;
  --shadow-composer-scrolled: 0 2px 8px #00000059, 0 18px 50px #00000080;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; }
body { font-family: var(--font-sans); color: var(--text); background: transparent; font-size: 14px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-kerning: normal; overflow: hidden; font-variant-numeric: tabular-nums; }
/* 全局胶片噪点：3.2% 透明度，只在纯色大面积处可感知的纹理层（参考 lusion/rauno 系站点 3-5% 惯例） */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 99999; pointer-events: none; opacity: .032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme='dark'] body::after { opacity: .05; }
/* 深色模式兜底：Mica 跟随系统主题，系统为浅色时给半透明玻璃层一个深色基底 */
:root[data-theme='dark'] body { background: #1d1d1f; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; user-select: none; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 3px; }
input, textarea { min-width: 0; }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
svg { flex-shrink: 0; vertical-align: middle; }
::selection { background: rgba(0, 0, 0, .13); }
:root[data-theme='dark'] ::selection { background: rgba(255, 255, 255, .22); }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 16%, transparent); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--text) 30%, transparent); }
::-webkit-scrollbar-track { background: transparent; }
kbd { font: 11px var(--font-sans); white-space: nowrap; }
@keyframes yh-fade-up { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
/* 消息进入：位移 + 微缩放 + 轻模糊构成「对焦」感（柔流·入境显影），blur 值克制以保性能 */
@keyframes yh-msg-in { from { opacity: 0; transform: translateY(9px) scale(.985); filter: blur(2px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes yh-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes yh-blink { 50% { opacity: .2; } }
@keyframes yh-pulse { 50% { opacity: .4; } }
@keyframes yh-pop-check { from { opacity: .4; } to { opacity: 1; } }
@keyframes yh-menu-pop {
  from { opacity: 0; transform: scale(.94) translateY(-5px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes yh-breathe {
  0%, 100% { transform: scale(1); opacity: .55; }
  50% { transform: scale(1.06); opacity: .85; }
}
@keyframes yh-twinkle {
  0%, 100% { opacity: .35; }
  50% { opacity: .9; }
}

/* 主题切换：圆形扩散过渡（View Transitions API），圆心取最近一次点击点 */
:root { --vt-x: 50%; --vt-y: 50%; }
@supports (view-transition-name: root) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
  ::view-transition-old(root) { z-index: 0; }
  ::view-transition-new(root) { z-index: 1; animation: yh-theme-reveal 0.55s var(--ease-out) both; }
}
@keyframes yh-theme-reveal {
  from { clip-path: circle(0px at var(--vt-x) var(--vt-y)); }
  to { clip-path: circle(150vmax at var(--vt-x) var(--vt-y)); }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-new(root) { animation: none; }
}

/* 柔流·沉浸景深：弹层打开时主界面轻轻退后半步（scale .994），关闭原路回位 */
.yh-app-shell { transition: transform .36s var(--ease-flow); }
.yh-app:has(.yh-modal-overlay, .yh-set-overlay) .yh-app-shell { transform: scale(.994); }

/* 柔流·全局减弱动态：尊重系统设置，位移/空间动画一律即达 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
/* 三栏：图标栏 + 侧栏 + 对话。窗口材质由系统 Mica 透出壁纸色。 */
.yh-app, .yh-app-shell { height: 100%; display: flex; flex-direction: column; }
.yh-app-shell { background: var(--shell-background); }
/* 顶部菜单栏（ChatGPT 式：后退/前进 + 侧栏 + 文件/编辑/视图/帮助） */
.yh-titlebar { height: 44px; flex: none; position: relative; z-index: 95; display: flex; align-items: stretch; padding-left: 6px; background: var(--rail-glass); backdrop-filter: blur(28px) saturate(130%); -webkit-backdrop-filter: blur(28px) saturate(130%); border-bottom: 1px solid #80808010; }
.yh-titlebar-left { flex: none; display: flex; align-items: center; gap: 2px; height: 100%; -webkit-app-region: no-drag; padding: 6px 0; }
.yh-titlebar-drag { flex: 1; min-width: 0; -webkit-app-region: drag; height: 100%; }
.yh-titlebar-nav { display: flex; align-items: center; gap: 1px; }
.yh-titlebar-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--text-muted); transition: background-color .15s ease, color .15s ease, transform .15s var(--ease-out); }
.yh-titlebar-icon:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.yh-titlebar-icon:active:not(:disabled) { transform: scale(.92); }
.yh-titlebar-icon.is-active { color: var(--text); }
.yh-titlebar-sep { width: 1px; height: 16px; flex: none; margin: 0 7px 0 5px; background: var(--border-strong); opacity: .55; border-radius: 1px; }

/* 菜单栏与下拉 */
.yh-menu-bar { display: flex; align-items: stretch; align-self: stretch; }
.yh-menu { position: relative; display: flex; align-items: stretch; }
.yh-menu-trigger { position: relative; height: 100%; padding: 0 11px; display: flex; align-items: center; border-radius: 8px; font-size: 13px; color: var(--text-muted); transition: background-color .14s ease, color .14s ease; }
.yh-menu-trigger::after { content: ''; position: absolute; left: 11px; right: 11px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: center; transition: transform .22s var(--ease-morph); }
.yh-menu-trigger:hover, .yh-menu-trigger.is-open { background: var(--bg-hover); color: var(--text); }
.yh-menu-trigger.is-open::after { transform: scaleX(1); }
.yh-menu-pop { position: absolute; top: calc(100% - 4px); left: 4px; min-width: 236px; padding: 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-window); box-shadow: var(--shadow-menu); z-index: 120; animation: yh-menu-pop .24s var(--ease-morph) both; transform-origin: 24px 0; }
:root[data-theme='dark'] .yh-menu-pop { border-color: rgba(255, 255, 255, .08); }
.yh-menu-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 8px 12px; border-radius: 8px; font-size: 13px; text-align: left; color: var(--text); transition: background-color .14s ease, padding-left .16s var(--ease-out); }
.yh-menu-item:hover:not(:disabled) { background: var(--bg-hover); padding-left: 15px; }
.yh-menu-item:active:not(:disabled) { background: var(--bg-accent); }
.yh-menu-item:disabled { color: var(--text-faint); }
.yh-menu-item-shortcut { flex: none; font-size: 12px; color: var(--text-faint); letter-spacing: .02em; }
.yh-menu-sep { height: 1px; margin: 5px 10px; background: var(--border); border-radius: 1px; }

/* 右侧窗口控件 */
.yh-titlebar-controls { flex: none; display: flex; align-items: stretch; height: 100%; -webkit-app-region: no-drag; }
.yh-win-btn { display: grid; place-items: center; width: 46px; color: var(--text-muted); border-radius: 0; transition: background-color .15s ease, color .15s ease; }
.yh-win-btn:hover { background: var(--bg-hover); color: var(--text); }
.yh-win-btn:active { background: var(--bg-accent); }
.yh-win-btn > svg { transition: transform .16s var(--ease-out); }
.yh-win-btn:hover > svg { transform: scale(1.08); }
.yh-win-close:hover { background: var(--text); color: var(--bg-window); }
.yh-win-close:hover > svg { transform: scale(1); }
.yh-body, .yh-workspace { flex: 1; display: flex; min-height: 0; min-width: 0; }
.yh-main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.yh-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; color: var(--text-muted); border-radius: 6px; transition: background-color .4s cubic-bezier(0.175,0.885,0.32,1.275), color .2s ease, transform .4s cubic-bezier(0.175,0.885,0.32,1.275); }
.yh-icon-btn:hover { background: var(--bg-hover); color: var(--text); transform: translateY(-1px); }
.yh-icon-btn:active { transform: translateY(0) scale(0.97); transition-duration: 0.1s; }
.yh-icon-btn.is-active { background: var(--bg-hover); color: var(--text); }

/* 最左图标栏 */
.yh-rail { width: var(--rail-w); flex: none; display: flex; flex-direction: column; align-items: center; padding: 12px 0; background: var(--rail-glass); backdrop-filter: blur(28px) saturate(130%); -webkit-backdrop-filter: blur(28px) saturate(130%); border-right: 1px solid #80808010; }
.yh-rail-top, .yh-rail-bottom { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.yh-rail-bottom { margin-top: auto; }
/* 品牌标记：纯图标，静态不动画（Lusion 原则：logo 是耳语，不是表演） */
.yh-rail-brand { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 10px; color: var(--text); position: relative; }
/* 邻近缩放：JS 按光标距离写 --prox，图标随之放大（GSAP proximity field） */
.yh-rail-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; color: var(--text-muted); transform: scale(var(--prox, 1)); transition: background-color .4s cubic-bezier(0.175,0.885,0.32,1.275), color .2s ease, transform .35s cubic-bezier(.16, 1, .3, 1); }
.yh-rail-btn:hover { color: var(--text); background: var(--bg-hover); }
.yh-rail-btn:active { transform: scale(calc(var(--prox, 1) * .94)); transition-duration: 0.1s; }
.yh-rail-btn.is-active { background: var(--bg-hover); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 8%, transparent); }

/* Sidebar */
.yh-sidebar { position: relative; width: var(--sidebar-w); flex: none; background: var(--sidebar-glass); backdrop-filter: blur(28px) saturate(125%); -webkit-backdrop-filter: blur(28px) saturate(125%); border-right: 1px solid #80808010; transition: width .18s ease; overflow: hidden; }
.yh-sidebar.is-collapsed { width: 0; }
/* 侧栏拖拽调宽分隔条：悬停显出发丝线，拖拽中常显 */
.yh-sidebar-resizer { position: absolute; top: 0; bottom: 0; right: 0; width: 7px; cursor: col-resize; z-index: 70; touch-action: none; }
.yh-sidebar-resizer::before { content: ''; position: absolute; left: 3px; top: 0; bottom: 0; width: 1px; background: transparent; transition: background-color .15s ease, box-shadow .15s ease; }
.yh-sidebar-resizer:hover::before, body.yh-resizing .yh-sidebar-resizer::before { background: var(--text-faint); box-shadow: 0 0 0 1px rgba(0,0,0,.04); }
body.yh-resizing .yh-sidebar { transition: none; }
.yh-sidebar-inner { width: var(--sidebar-w); height: 100%; display: flex; flex-direction: column; }
.yh-workspace-heading { height: 58px; flex: none; display: flex; align-items: center; justify-content: flex-end; padding: 0 10px 0 16px; }
/* 工作区模式卡片选择器（ChatGPT 式：大号灰底药丸 + 大圆角卡片） */
.yh-ws-switch { position: relative; margin: 2px 14px 6px; }
.yh-ws-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border: 0; border-radius: 10px; background: transparent; text-align: left; transition: background-color .4s cubic-bezier(0.175,0.885,0.32,1.275), transform .4s cubic-bezier(0.175,0.885,0.32,1.275); }
.yh-ws-trigger:hover { background: var(--bg-accent); }
.yh-ws-trigger:active { transform: scale(.985); }
.yh-ws-switch.is-open .yh-ws-trigger { background: var(--bg-accent); }
.yh-ws-trigger-text { font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; color: var(--text); white-space: nowrap; }
.yh-ws-caret { flex: none; color: var(--text-muted); transition: transform .22s var(--ease-out), color .14s ease; }
.yh-ws-switch.is-open .yh-ws-caret { transform: rotate(180deg); color: var(--text); }
.yh-ws-menu { position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: 8px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg-window); box-shadow: 0 6px 20px rgba(0, 0, 0, .07); z-index: 80; animation: yh-menu-pop .2s var(--ease-out) both; transform-origin: 50% 0; }
:root[data-theme='dark'] .yh-ws-menu { border-color: rgba(255, 255, 255, .07); box-shadow: 0 6px 20px rgba(0, 0, 0, .22); }
.yh-ws-option { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 13px; border-radius: 8px; text-align: left; animation: yh-fade-up .24s var(--ease-out) both; transition: background .4s cubic-bezier(0.175,0.885,0.32,1.275), transform .4s cubic-bezier(0.175,0.885,0.32,1.275); }
.yh-ws-option:hover { background: var(--bg-hover); }
.yh-ws-option:active { transform: scale(.985); }
.yh-ws-option-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.yh-ws-option-text strong { font-size: 16.5px; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; color: var(--text); }
.yh-ws-option-text small { font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.yh-ws-option-check { flex: none; width: 20px; display: grid; place-items: center; color: var(--text); }
.yh-ws-option-check svg { animation: yh-check-pop .3s var(--ease-out) both; }
.yh-workspace-heading-right { display: flex; align-items: center; gap: 1px; }
.yh-workspace-heading-right .yh-icon-btn { width: 30px; height: 30px; }

/* 通知中心（侧栏铃铛） */
.yh-notif-wrap { position: relative; }
.yh-notif-badge { position: absolute; top: 1px; right: 0; min-width: 14px; height: 14px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--accent-contrast); font-size: 9px; font-weight: 700; line-height: 14px; text-align: center; pointer-events: none; box-shadow: 0 0 0 2px var(--bg-window); }
.yh-notif-panel { position: fixed; z-index: 1000; width: 360px; max-width: calc(100vw - 16px); max-height: min(500px, calc(100vh - 88px)); display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 16px; background: color-mix(in srgb, var(--bg-window) 88%, transparent); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); box-shadow: 0 24px 64px -20px rgb(0 0 0 / .3), 0 6px 20px -6px rgb(0 0 0 / .12); overflow: hidden; transform-origin: top right; animation: yh-notif-panel-in .26s var(--ease-out) both; }
.yh-notif-panel.is-closing { animation: yh-notif-panel-out .15s ease both; }
.yh-notif-head, .yh-notif-tabs, .yh-notif-list { position: relative; z-index: 1; }
@keyframes yh-notif-panel-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes yh-notif-panel-out { to { opacity: 0; transform: translateY(-4px) scale(.98); } }
.yh-notif-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent); }
.yh-notif-title { font-size: 13px; font-weight: 650; letter-spacing: .01em; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.yh-notif-count { font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--bg-subtle); color: var(--text-faint); }
.yh-notif-actions { display: inline-flex; align-items: center; gap: 2px; }
.yh-notif-clear { display: inline-flex; align-items: center; gap: 4px; border: none; background: none; padding: 4px 8px; font-size: 11px; color: var(--text-faint); cursor: pointer; border-radius: 7px; transition: color .15s ease, background-color .15s ease, transform .15s ease; }
.yh-notif-clear:hover { color: var(--text); background: var(--bg-hover); }
.yh-notif-clear:active { transform: scale(.95); }
/* 文字筛选：下划线指示，无胶囊底 */
.yh-notif-tabs { display: flex; gap: 18px; margin: 0 16px 2px; padding: 0 0 8px; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.yh-notif-tab { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 2px 0; border: none; background: none; font-size: 12px; color: var(--text-faint); cursor: pointer; transition: color .2s ease; }
.yh-notif-tab:hover { color: var(--text-muted); }
.yh-notif-tab.is-active { color: var(--text); font-weight: 600; }
.yh-notif-tab.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -9px; height: 2px; border-radius: 1px; background: var(--text); }
.yh-notif-tab-count { color: var(--text-faint); font-size: 10px; font-weight: 500; }
.yh-notif-tab.is-active .yh-notif-tab-count { color: var(--text-muted); }
.yh-notif-list { overflow-y: auto; padding: 6px 8px 8px; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.yh-notif-list:hover { scrollbar-color: color-mix(in srgb, var(--text-faint) 45%, transparent) transparent; }
.yh-notif-list::-webkit-scrollbar { width: 5px; }
.yh-notif-list::-webkit-scrollbar-track { background: transparent; }
.yh-notif-list::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.yh-notif-list:hover::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text-faint) 40%, transparent); }
/* 空状态：一行安静文字，无图标无装饰 */
.yh-notif-empty { display: flex; align-items: center; justify-content: center; padding: 56px 20px; color: var(--text-faint); text-align: center; animation: yh-notif-item-in .3s var(--ease-out) both; }
.yh-notif-empty p { font-size: 12px; color: var(--text-faint); }
.yh-notif-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px; border: 1px solid transparent; border-radius: 12px; background: none; text-align: left; cursor: default; transition: background-color .16s ease, border-color .16s ease, transform .16s ease; animation: yh-notif-item-in .3s var(--ease-out) both; }
@keyframes yh-notif-item-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.yh-notif-item.is-link, .yh-notif-item.is-server { cursor: pointer; }
.yh-notif-item.is-link:hover, .yh-notif-item.is-server:hover { background: var(--bg-hover); border-color: color-mix(in srgb, var(--border) 75%, transparent); }
.yh-notif-item.is-link:active, .yh-notif-item.is-server:active { transform: scale(.985); }
.yh-notif-item.is-unread { background: var(--bg-subtle); }
.yh-notif-item.is-unread::before { content: ''; flex: none; width: 3px; height: 18px; margin: 5px -6px 0 -7px; border-radius: 2px; background: var(--accent); opacity: .85; }
.yh-notif-item.is-unread.is-link:hover, .yh-notif-item.is-unread.is-server:hover { background: var(--bg-hover); }
/* 裸图标，无背景框 */
.yh-notif-icon { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 2px; color: var(--text-faint); }
.yh-notif-icon.is-success { color: var(--success); }
.yh-notif-icon.is-error { color: var(--danger); }
.yh-notif-icon.is-admin { color: var(--text-muted); }
.yh-notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.yh-notif-item-title { font-size: 12.5px; font-weight: 500; color: var(--text); line-height: 1.45; }
.yh-notif-item-desc { font-size: 11.5px; color: var(--text-faint); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yh-notif-item.is-expanded .yh-notif-item-desc { -webkit-line-clamp: unset; }
.yh-notif-item-time { font-size: 10.5px; color: var(--text-faint); letter-spacing: .01em; }
.yh-notif-go { flex: none; margin-top: 6px; color: var(--text-faint); opacity: 0; transform: translateX(-3px); transition: opacity .16s ease, transform .16s ease; }
.yh-notif-item.is-link:hover .yh-notif-go { opacity: 1; transform: none; }
.yh-notif-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--border); color: var(--text-faint); font-size: 9.5px; font-weight: 500; vertical-align: 1px; }
.yh-notif-badge { animation: yh-notif-item-in .25s var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { .yh-notif-panel::before, .yh-notif-panel::after, .yh-notif-empty-icon::after { animation: none; } }
@keyframes yh-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.yh-sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 2px 14px 0; }
.yh-sidebar-nav > button { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 36px; border-radius: 10px; text-align: left; font-size: 14.5px; font-weight: 450; letter-spacing: .01em; color: var(--text); transition: background-color .13s ease, transform .13s var(--ease-out); }
.yh-sidebar-nav > button svg { color: var(--text-muted); transition: color .13s ease; }
.yh-sidebar-nav > button:hover { background: var(--bg-hover); }
.yh-sidebar-nav > button:hover svg { color: var(--text); }
.yh-sidebar-nav > button:active { transform: scale(.98); }
.yh-conv-list { flex: 1; min-height: 0; overflow: auto; padding: 20px 10px 40px; }
.yh-conv-group + .yh-conv-group { margin-top: 24px; }
.yh-conv-group-label { color: var(--text-muted); font-size: 13px; font-weight: 600; letter-spacing: .05em; padding: 2px 4px 8px; display: flex; align-items: center; justify-content: space-between; }
.yh-projects-add { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--text-faint); opacity: 0; transition: opacity .14s ease, background-color .14s ease, color .14s ease; }
.yh-conv-group:hover .yh-projects-add, .yh-projects-add:focus-visible { opacity: 1; }
.yh-projects-add:hover { background: var(--bg-hover); color: var(--text); }
.yh-project-create { margin: 0 4px 6px; padding: 8px 9px; }
.yh-projects { display: flex; flex-direction: column; gap: 1px; }

.yh-project { border-radius: 10px; }
.yh-project.is-active > .yh-project-row { background: var(--bg-accent); }
.yh-project-row { display: flex; align-items: center; height: 36px; border-radius: 10px; padding-right: 4px; }
.yh-project-row:hover { background: var(--bg-hover); }
.yh-project.is-active > .yh-project-row:hover { background: var(--bg-accent); }
.yh-project-toggle { width: 22px; height: 100%; flex: none; display: grid; place-items: center; color: var(--text-faint); }
.yh-project-chevron { transition: transform .2s var(--ease-out); }
.yh-project.is-expanded .yh-project-chevron { transform: rotate(0deg); }
.yh-project:not(.is-expanded) .yh-project-chevron { transform: rotate(-90deg); }
.yh-project-select { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 100%; text-align: left; font-size: 13px; }
.yh-project-folder { color: var(--text-muted); flex: none; }
.yh-project-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.yh-project-count { flex: none; font-size: 11px; color: var(--text-faint); background: var(--bg-hover); border-radius: 9px; padding: 1px 7px; margin-right: 2px; }
.yh-project-more { width: 25px; height: 25px; opacity: 0; }
.yh-project-row:hover .yh-project-more, .yh-project.has-menu .yh-project-more { opacity: 1; }
.yh-project-menu { top: 34px; }
.yh-project-convs { padding: 2px 0 4px 22px; display: flex; flex-direction: column; gap: 1px; animation: yh-fade-in .18s ease both; }
.yh-conv.is-indented { height: 34px; }
.yh-conv.is-indented .yh-conv-select { padding-left: 10px; font-size: 12.5px; color: var(--text-muted); }
.yh-conv.is-indented .yh-conv-select:hover { color: var(--text); }
.yh-project-empty { font-size: 12px; color: var(--text-faint); padding: 4px 10px 6px; }
.yh-project-pending { font-size: 11px; color: var(--text-faint); padding: 3px 10px 5px; }
.yh-project-add { display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; margin-top: 1px; border-radius: 8px; font-size: 12.5px; color: var(--text-faint); text-align: left; }
.yh-project-add:hover { background: var(--bg-hover); color: var(--text); }
.yh-project-input { margin: 2px 4px; padding: 7px 9px; }
.yh-project-crumb { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; color: var(--text-muted); background: var(--bg-hover); max-width: 260px; }
.yh-conv { position: relative; display: flex; align-items: center; height: 36px; border-radius: 8px; margin: 1px 0; transition: background-color .14s ease, transform .14s var(--ease-out); }
.yh-conv:hover { background: var(--bg-hover); }
.yh-conv:active { transform: scale(.985); }
.yh-conv.is-active { background: var(--bg-accent); }
.yh-conv.is-active::before { content: ''; position: absolute; left: 3px; top: 50%; transform: translateY(-50%); width: 2.5px; height: 15px; border-radius: 3px; background: var(--accent); }
.yh-conv-select { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 0 10px 0 10px; height: 100%; text-align: left; font-size: 13px; transition: transform .18s var(--ease-out); }
.yh-conv:hover .yh-conv-select { transform: translateX(2px); }
.yh-conv-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .14s ease; }
.yh-conv.is-active .yh-conv-title { color: var(--text); }
.yh-conv-more { width: 25px; height: 25px; margin-right: 6px; opacity: 0; transform: scale(.8); transition: opacity .14s var(--ease-out), transform .14s var(--ease-out), background-color .12s ease; }
.yh-conv:hover .yh-conv-more, .yh-conv:focus-within .yh-conv-more, .yh-conv.has-menu .yh-conv-more { opacity: 1; transform: scale(1); }
.yh-conv.has-menu { z-index: 10; }
.yh-conv-menu { position: absolute; top: 35px; right: 3px; width: 192px; padding: 5px; border: 1px solid var(--border); background: var(--bg-window); border-radius: 12px; box-shadow: var(--shadow-menu); z-index: 25; }
.yh-conv-menu > button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 10px; border-radius: 7px; text-align: left; font-size: 13px; white-space: nowrap; overflow: hidden; }
.yh-conv-menu > button svg { flex: none; }
.yh-conv-menu > button:hover { background: var(--bg-hover); }
.yh-conv-menu .is-danger { color: var(--danger); }
.yh-conv-input { width: calc(100% - 10px); margin: 0 5px; background: var(--bg-window); border: 1px solid var(--border-strong); outline: none; border-radius: 5px; padding: 6px 7px; font-size: 13px; }
.yh-sidebar-empty { color: var(--text-faint); font-size: 12px; padding: 4px 6px; }
.yh-stream-dot { width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--text); animation: yh-pulse 1.2s ease-in-out infinite; }
.yh-conv-pin { flex: none; margin-right: 2px; color: var(--text-faint); }

/* 分组折叠：grid-rows 0fr→1fr 丝滑展开收起 */
.yh-group-toggle { display: inline-flex; align-items: center; gap: 5px; color: inherit; font: inherit; letter-spacing: inherit; padding: 2px 4px; border-radius: 6px; transition: background-color .14s ease, color .14s ease; }
.yh-group-toggle:hover { background: var(--bg-hover); color: var(--text); }
.yh-group-chevron { transition: transform .28s var(--ease-out); transform: rotate(0deg); }
.yh-conv-group-label .yh-group-toggle[aria-expanded="false"] .yh-group-chevron { transform: rotate(-90deg); }
.yh-collapse { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .3s var(--ease-out); }
.yh-collapse.is-closed { grid-template-rows: 0fr; }
.yh-collapse-inner { overflow: hidden; min-height: 0; }
.yh-group-all { font-size: 11.5px; color: var(--text-faint); padding: 2px 6px; border-radius: 5px; transition: color .14s ease, background-color .14s ease; }
.yh-group-all:hover { color: var(--text); background: var(--bg-hover); }

/* 批量选择模式 */
.yh-conv-check { width: 15px; height: 15px; flex: none; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; color: transparent; transition: background-color .18s var(--ease-out), border-color .18s var(--ease-out), transform .18s var(--ease-out); }
.yh-conv-check svg { transform: scale(.4); opacity: 0; transition: transform .18s var(--ease-out), opacity .14s ease; }
.yh-conv.is-selected .yh-conv-check { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast, #fff); }
.yh-conv.is-selected .yh-conv-check svg { transform: scale(1); opacity: 1; }
.yh-conv.is-selected { background: var(--bg-accent); }
.yh-conv.is-selecting .yh-conv-more { display: none; }
.yh-icon-btn.is-on { background: var(--bg-accent); color: var(--text); }
/* 批量管理入口：文字按钮，进入后变为「完成」高亮态 */
.yh-manage-btn { height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12px; color: var(--text-muted); transition: background-color .14s ease, color .14s ease, transform .12s ease; }
.yh-manage-btn:hover { background: var(--bg-hover); color: var(--text); }
.yh-manage-btn:active { transform: scale(.94); }
.yh-manage-btn.is-on { background: var(--accent); color: var(--accent-contrast); }

/* 底部批量操作条：上滑入场 */
.yh-batch-bar { display: flex; align-items: center; gap: 6px; margin: 0 10px 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-window); box-shadow: var(--shadow-menu); animation: yh-batch-in .26s var(--ease-out); }
.yh-batch-bar > button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 8px; font-size: 12.5px; color: var(--text-muted); transition: background-color .14s ease, color .14s ease, transform .12s ease; }
.yh-batch-bar > button:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.yh-batch-bar > button:active:not(:disabled) { transform: scale(.95); }
.yh-batch-bar > button:disabled { opacity: .4; }
.yh-batch-bar > button.is-danger:hover:not(:disabled) { color: var(--danger); }
.yh-batch-count { flex: 1; font-size: 12px; color: var(--text-faint); }
.yh-batch-cancel { color: var(--text-faint) !important; }
@keyframes yh-batch-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 模型选择器内嵌在输入框右下角；顶栏只留新建按钮 */
.yh-chat { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; background: var(--chat-glass); }
.yh-topbar { height: 60px; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; }
.yh-topbar-left, .yh-topbar-right { display: flex; align-items: center; gap: 4px; }
/* 顶栏右上角：更多操作 + 置顶摘要 ｜ 新建 */
.yh-topbar-right { gap: 6px; }
.yh-action-wrap { position: relative; }
.yh-top-action { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; color: var(--text-muted); transition: background-color .4s cubic-bezier(0.175,0.885,0.32,1.275), color .2s ease, transform .4s cubic-bezier(0.175,0.885,0.32,1.275); }
.yh-top-action:hover { background: var(--bg-hover); color: var(--text); transform: translateY(-1px); }
.yh-top-action:active { transform: translateY(0) scale(0.97); transition-duration: 0.1s; }
.yh-top-action.is-open, .yh-top-action.is-active { background: var(--bg-accent); color: var(--text); }
.yh-top-action.yh-top-new { border: 1px solid var(--border-strong); background: var(--bg-window); }
.yh-top-action.yh-top-new:hover { background: var(--bg-hover); color: var(--text); transform: translateY(-1px); }
.yh-top-action.yh-top-new:active { transform: translateY(0) scale(0.97); transition-duration: 0.1s; }
.yh-topbar-sep { width: 1px; height: 20px; background: var(--border-strong); margin: 0 5px; flex: none; }
.yh-action-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 236px; max-width: calc(100vw - 24px); padding: 6px; border: 1px solid var(--border); background: var(--bg-window); border-radius: 14px; box-shadow: var(--shadow-menu); z-index: 90; transform-origin: 85% 0; animation: yh-menu-pop .18s var(--ease-out) both; }
.yh-action-menu > button { display: flex; align-items: center; gap: 11px; width: 100%; height: 42px; padding: 0 11px; border-radius: 9px; text-align: left; font-size: 13.5px; color: var(--text); }
.yh-action-menu > button > svg { flex: none; color: var(--text); }
.yh-action-menu > button > span { flex: 1; }
.yh-action-menu > button:hover { background: var(--bg-hover); }
.yh-action-divider { height: 1px; margin: 5px 9px; background: var(--border); }
.yh-action-caret { flex: none !important; color: var(--text-faint); transition: transform .2s var(--ease-out); }
.yh-action-caret.is-open { transform: rotate(90deg); }
.yh-action-subs { display: flex; flex-direction: column; gap: 1px; padding: 0 0 3px; animation: yh-fade-in .16s ease both; }
.yh-action-sub { display: block; width: 100%; padding: 9px 11px 9px 41px; border-radius: 9px; text-align: left; font-size: 12.5px; color: var(--text-muted); }
.yh-action-sub:hover { background: var(--bg-hover); color: var(--text); }
.yh-model-select { position: relative; min-width: 0; }
.yh-model-trigger { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 9px; border-radius: 9px; color: var(--text-muted); font-size: 13px; font-weight: 500; white-space: nowrap; transition: background-color .14s ease, color .14s ease, transform .12s var(--ease-out); max-width: 190px; min-width: 0; }
.yh-model-trigger:hover, .yh-model-trigger.is-open { background: var(--bg-hover); color: var(--text); }
.yh-model-trigger:active { transform: scale(.96); }
.yh-model-trigger.is-open .yh-model-vendor-logo { color: var(--accent); }
.yh-model-vendor-logo { flex: none; }
.yh-model-name { min-width: 0; max-width: 150px; text-overflow: ellipsis; overflow: hidden; }
.yh-model-chevron { color: var(--text-faint); transition: transform .22s var(--ease-out); }
.yh-model-trigger.is-open .yh-model-chevron { transform: rotate(180deg); }

.yh-model-menu { position: absolute; bottom: calc(100% + 8px); right: 0; width: 272px; max-width: calc(100vw - 24px); border: 1px solid var(--border); border-radius: 14px; background: var(--bg-window); box-shadow: var(--shadow-menu); z-index: 80; overflow: hidden; animation: yh-menu-pop .26s var(--ease-morph) both; transform-origin: 88% 100%; }
.yh-media-model-menu { position: fixed; bottom: auto; z-index: 1000; border-radius: 8px; transform-origin: 88% 0; }
.yh-media-model-menu.is-wide { width: 330px; }
.yh-model-panels { display: flex; width: 200%; transform: translateX(0); transition: transform .3s var(--ease-morph); }
.yh-model-panels.is-second { transform: translateX(-50%); }
.yh-model-panel { width: 50%; flex: none; padding: 6px; max-height: 384px; overflow-y: auto; }
.yh-model-menu-title { padding: 8px 10px 7px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; color: var(--text-faint); }

.yh-vendor-row { display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 10px; border-radius: 9px; text-align: left; transition: background-color .14s ease, padding-left .16s var(--ease-out); }
.yh-vendor-row:hover { background: var(--bg-hover); padding-left: 13px; }
.yh-model-auto { margin-bottom: 6px; }
.yh-model-auto.is-active { background: var(--bg-subtle); }
.yh-model-auto + .yh-model-menu-title { border-top: 1px solid var(--border); margin-top: 2px; padding-top: 10px; }
.yh-vendor-badge { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--bg-subtle); color: var(--text); }
.yh-vendor-name { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-vendor-models { flex: none; font-size: 11px; color: var(--text-faint); }
.yh-vendor-arrow { flex: none; color: var(--text-faint); transform: rotate(-90deg); transition: transform .16s var(--ease-out), color .16s ease; }
.yh-vendor-row:hover .yh-vendor-arrow { transform: rotate(-90deg) translateX(2px); color: var(--accent); }
.yh-vendor-row .yh-model-option-check { flex: none; color: var(--accent); }

.yh-model-back { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px; margin: 2px 2px 0; border-radius: 7px; font-size: 12px; color: var(--text-muted); transition: background-color .14s ease, color .14s ease, padding-left .16s var(--ease-out); }
.yh-model-back:hover { background: var(--bg-hover); color: var(--text); padding-left: 11px; }
.yh-back-arrow { transform: rotate(90deg); transition: transform .16s var(--ease-out); }
.yh-model-back:hover .yh-back-arrow { transform: rotate(90deg) translateX(-2px); }
.yh-vendor-head { display: flex; align-items: center; gap: 9px; padding: 6px 10px 9px; font-size: 13.5px; font-weight: 600; }
.yh-model-category + .yh-model-category { margin-top: 7px; }
.yh-model-category-label { padding: 5px 10px 3px; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--text-faint); }
.yh-model-option { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 9px; text-align: left; transition: background-color .14s ease, padding-left .16s var(--ease-out); }
.yh-model-option:hover { background: var(--bg-hover); padding-left: 13px; }
.yh-model-option.is-active { background: var(--bg-subtle); }
.yh-model-option-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.yh-model-option-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-model-option-desc { font-size: 11px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-model-option-check { flex: none; color: var(--accent); display: grid; place-items: center; animation: yh-pop-check .24s var(--ease-morph) both; }
/* Empty page: heading leads into the composer. */
.yh-chat-layout { flex: 1; display: flex; min-height: 0; }
.yh-chat-content { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; overflow: hidden; container-type: size; }
/* 壁纸极光：跟随桌面壁纸真实多主色渲染朦胧光团。挂载于侧边栏 + 标题栏 + 对话顶栏，三处连成整体随壁纸变色；
   --wps-* 侧边栏对应壁纸区域色、--wpt-* 顶栏对应壁纸区域色（拖动窗口实时换色，回退全图 --wp-*）；
   色值强度刻意压低，避免流光过浓 */
.yh-sidebar .yh-aurora {
  display: block; position: absolute; inset: -24% -38%; z-index: 0; pointer-events: none;
  filter: blur(62px) saturate(150%); opacity: .5; will-change: transform;
  background:
    radial-gradient(58% 32% at 32% 14%, color-mix(in srgb, var(--wps-1, var(--wp-1, var(--aurora-tint))) 44%, transparent), transparent 72%),
    radial-gradient(52% 38% at 74% 36%, color-mix(in srgb, var(--wps-2, var(--wp-2, var(--aurora-tint))) 40%, transparent), transparent 74%),
    radial-gradient(66% 44% at 36% 68%, color-mix(in srgb, var(--wps-3, var(--wp-3, var(--aurora-tint))) 36%, transparent), transparent 76%),
    radial-gradient(48% 32% at 82% 88%, color-mix(in srgb, var(--wps-4, var(--wp-4, var(--aurora-tint))) 38%, transparent), transparent 73%),
    radial-gradient(44% 28% at 54% 50%, color-mix(in srgb, var(--wps-5, var(--wp-5, var(--aurora-tint))) 32%, transparent), transparent 72%);
  animation: yh-aurora-drift 92s ease-in-out infinite;
}
/* 顶栏高度有限：极光层贴合容器并自裁，光团在 32/54px 高度内只露出柔和光带。
   顶栏/标题栏不做漂移动画与大光团（拖动窗口流畅度关键），流动感由底部扫光条提供 */
.yh-titlebar .yh-aurora, .yh-topbar .yh-aurora {
  display: block; position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none;
  filter: blur(20px) saturate(175%); opacity: .55;
  background:
    radial-gradient(58% 32% at 32% 14%, color-mix(in srgb, var(--wpt-1, var(--wp-1, var(--aurora-tint))) 46%, transparent), transparent 72%),
    radial-gradient(52% 38% at 74% 36%, color-mix(in srgb, var(--wpt-2, var(--wp-2, var(--aurora-tint))) 42%, transparent), transparent 74%),
    radial-gradient(66% 44% at 36% 68%, color-mix(in srgb, var(--wpt-3, var(--wp-3, var(--aurora-tint))) 36%, transparent), transparent 76%),
    radial-gradient(48% 32% at 82% 88%, color-mix(in srgb, var(--wpt-4, var(--wp-4, var(--aurora-tint))) 40%, transparent), transparent 73%),
    radial-gradient(44% 28% at 54% 50%, color-mix(in srgb, var(--wpt-5, var(--wp-5, var(--aurora-tint))) 34%, transparent), transparent 72%);
}
/* 标题栏最容易被浅色玻璃盖住，单独加大存在感 */
.yh-titlebar .yh-aurora { opacity: calc(var(--wp-glow, .3) * 1.27); filter: blur(18px) saturate(185%); }
/* 侧边栏保留漂移大光团（宽高足够，动画开销可接受） */
.yh-sidebar .yh-aurora::before, .yh-sidebar .yh-aurora::after { content: ''; position: absolute; border-radius: 50%; width: 40vmax; height: 40vmax; max-width: 560px; max-height: 560px; will-change: transform; }
.yh-sidebar .yh-aurora::before { left: -18%; top: -12%; background: radial-gradient(circle, color-mix(in srgb, var(--wps-accent, var(--wp-accent, var(--aurora-tint))) 36%, transparent), transparent 66%); animation: yh-aurora-a 54s ease-in-out infinite; }
.yh-sidebar .yh-aurora::after { right: -22%; bottom: -18%; background: radial-gradient(circle, color-mix(in srgb, var(--wps-2, var(--wp-2, var(--aurora-tint))) 28%, transparent), transparent 66%); animation: yh-aurora-b 69s ease-in-out infinite; }
:root { --aurora-tint: rgba(14, 124, 134, .16); }
:root[data-theme='dark'] { --aurora-tint: rgba(86, 160, 168, .16); }
:root[data-theme='dark'] .yh-sidebar .yh-aurora { opacity: .42; }
:root[data-theme='dark'] .yh-titlebar .yh-aurora { opacity: .62; }
:root[data-theme='dark'] .yh-topbar .yh-aurora { opacity: .5; }
:root[data-theme='dark'] .yh-sidebar .yh-aurora::before { background: radial-gradient(circle, color-mix(in srgb, var(--wps-accent, var(--wp-accent, rgba(255, 255, 255, .1))) 30%, transparent), transparent 66%); }
:root[data-theme='dark'] .yh-sidebar .yh-aurora::after { background: radial-gradient(circle, color-mix(in srgb, var(--wps-2, var(--wp-2, rgba(255, 255, 255, .09))) 24%, transparent), transparent 66%); }
/* web 端无壁纸取色，隐藏全部极光层 */
.yh-app.is-web .yh-aurora { display: none; }
@keyframes yh-aurora-drift {
  0%, 100% { transform: translate(0, 0) scale(1.02); }
  33% { transform: translate(4vmax, 3vmax) scale(1.08); }
  66% { transform: translate(-3vmax, 5vmax) scale(.97); }
}
@keyframes yh-aurora-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(7vmax, 5vmax) scale(1.08); }
  66% { transform: translate(-5vmax, 8vmax) scale(.95); }
}
@keyframes yh-aurora-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-6vmax, -4vmax) scale(1.06); }
  66% { transform: translate(5vmax, -7vmax) scale(.93); }
}
@media (prefers-reduced-motion: reduce) { .yh-aurora { display: none; } }
.yh-empty-center { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 24px 20px 36px; animation: yh-fade-up .3s var(--ease-out) both; }
.yh-empty-center h1 { margin: 0; text-align: left; font-size: 28px; line-height: 1.4; font-weight: 500; letter-spacing: 0; text-wrap: balance; color: var(--text); }
.yh-empty-suggest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; width: 100%; max-width: 520px; animation: yh-fade-up .5s var(--ease-out) .12s both; }
/* 快捷开始：安静的文字条目，无图标块/无阴影/无抬升，悬浮仅一抹底色与细边框 */
.yh-empty-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 10px 14px; border-radius: 10px; text-align: left; cursor: pointer; color: var(--text);
  border: 1px solid transparent; background: transparent; min-width: 0;
  opacity: 0; animation: yh-card-fade .45s var(--ease-out) forwards;
  transition: background .22s ease, border-color .22s ease;
}
@keyframes yh-card-fade { from { opacity: 0 } to { opacity: 1 } }
.yh-empty-card:hover { background: color-mix(in srgb, var(--text) 4%, transparent); border-color: var(--border); }
.yh-empty-card:active { background: color-mix(in srgb, var(--text) 6%, transparent); }
.yh-empty-card-title { font-size: 13px; font-weight: 500; letter-spacing: -.01em; color: var(--text-muted); transition: color .2s ease; }
.yh-empty-card:hover .yh-empty-card-title { color: var(--text); }
.yh-empty-card-desc { font-size: 11.5px; line-height: 1.4; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 560px) {
  .yh-empty-suggest { grid-template-columns: 1fr; max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  .yh-empty-card, .yh-empty-suggest { animation: none; opacity: 1; }
}
.yh-demo-notice { display: block; font-size: 12px; color: var(--text-faint); text-align: center; margin: 12px auto 0; }
.yh-demo-notice:hover { text-decoration: underline; color: var(--text-muted); }
.yh-dock .yh-demo-notice { margin: 0 auto 10px; }
/* 输入框悬浮在消息上方，磨砂模糊背后滚动内容；空对话时抬升到页面中央，发首条消息后滑到底部 */
.yh-dock {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  padding: 56px 32px 16px;
  background: linear-gradient(to bottom, transparent, var(--chat-glass));
  transition: transform .56s var(--ease-morph);
  will-change: transform;
  pointer-events: none;
}
.yh-dock-inner, .yh-dock .yh-demo-notice { pointer-events: auto; }
.yh-chat-content.is-empty .yh-dock { transform: translateY(calc(50% - 50cqh + 5vh)); background: none; }
/* 空态输入框：主角态——更柔的磨砂、漫散阴影、缓慢游走的极光描边 */
.yh-chat-content.is-empty .yh-composer { border-radius: 26px; box-shadow: 0 2px 14px #0000000a, 0 30px 80px #0000001a; transition: border-radius .56s var(--ease-morph), box-shadow .4s var(--ease-morph); }
/* 空态描边：中性灰流光（黑白主调），保留缓慢游走的极光动效 */
.yh-chat-content.is-empty .yh-composer::before { content: ''; position: absolute; opacity: .5; inset: -1px; border-radius: 27px; padding: 1px; mix-blend-mode: normal; pointer-events: none; background: linear-gradient(160deg, color-mix(in srgb, var(--text) 26%, transparent), transparent 38%, transparent 62%, color-mix(in srgb, var(--text) 22%, transparent)); background-size: 220% 200%; animation: yh-composer-aurora 9s ease-in-out infinite; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; }
@keyframes yh-composer-aurora { 0%, 100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }
.yh-chat-content:not(.is-empty) .yh-message-region { animation: yh-fade-in .3s ease; }
.yh-dock-inner { width: 100%; max-width: 780px; margin: 0 auto; }

/* Composer — 白色磨砂悬浮卡片（无光标追光：用户嫌碍眼，已删） */
.yh-composer { container-type: inline-size; background: var(--composer-glass); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); border: 1px solid var(--composer-border); border-radius: 22px; position: relative; box-shadow: var(--glass-inset), var(--shadow-composer); transition: border-color .3s var(--ease-morph), box-shadow .3s var(--ease-morph); }
/* 聚焦：边框明显加深 + 一圈极淡中性环 + 阴影微沉（无色无动画，克制但可感知） */
.yh-composer:focus-within {
  border-color: color-mix(in srgb, var(--text) 30%, transparent);
  box-shadow:
    var(--glass-inset),
    0 0 0 3.5px color-mix(in srgb, var(--text) 5%, transparent),
    0 2px 4px #00000010,
    0 8px 20px #0000000f,
    0 24px 52px #00000019;
}
/* 滚动后输入框抬升感增强 */
.yh-chat-content.is-scrolled .yh-composer { box-shadow: var(--glass-inset), var(--shadow-composer-scrolled); transition: border-color .3s var(--ease-morph), box-shadow .3s var(--ease-morph); }
.yh-chat-content.is-scrolled .yh-composer:focus-within {
  box-shadow:
    var(--glass-inset),
    0 0 0 3.5px color-mix(in srgb, var(--text) 5%, transparent),
    0 2px 4px #00000010,
    0 8px 22px #00000012,
    0 26px 58px #0000001f;
}
.yh-composer-input { display: block; width: 100%; min-height: 56px; max-height: 200px; background: transparent; border: 0; outline: none; resize: none; padding: 17px 20px 4px; font-size: 15px; line-height: 1.75; }
.yh-composer-input::placeholder { color: var(--text-muted); }
.yh-composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 14px 12px; }
.yh-composer-tools, .yh-composer-right { display: flex; align-items: center; gap: 7px; }
/* 工具组不参与收缩，避免中文按钮被压成单字竖排；宽度紧张时由容器查询换行吸收 */
.yh-composer-tools { flex: none; }
.yh-composer-right { min-width: 0; margin-left: auto; }
.yh-composer-tools > * { flex: none; white-space: nowrap; }
/* 窄宽（如高缩放比 + 小窗）：底部栏换两行，模型/发送独占第二行右侧 */
@container (max-width: 480px) {
  .yh-composer-bar { flex-wrap: wrap; row-gap: 6px; }
  .yh-composer-right { flex: 1 0 100%; justify-content: flex-end; }
  .yh-model-trigger { max-width: 150px; }
}
@container (max-width: 320px) {
  .yh-composer-tools { gap: 3px; }
}
.yh-attach-btn { color: var(--text); width: 34px; height: 34px; border-radius: 50%; }
.yh-attach-menu {
  position: absolute; left: 12px; bottom: 54px; z-index: 85;
  display: grid; gap: 2px; width: 188px; padding: 5px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-window); box-shadow: 0 12px 34px #0000001d;
  animation: yh-attach-menu-in .18s var(--ease-out) both;
}
.yh-attach-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 11px;
  border-radius: 5px; color: var(--text); font-size: 13px; text-align: left;
}
.yh-attach-menu button:hover, .yh-attach-menu button:focus-visible { background: var(--bg-hover); }
.yh-attach-menu button svg { flex: none; color: var(--text-muted); }
@keyframes yh-attach-menu-in { from { opacity: 0; transform: translateY(5px) scale(.98); } to { opacity: 1; transform: none; } }
.yh-page-drop {
  position: fixed; inset: 0; z-index: 175; display: grid; place-items: center;
  pointer-events: none; -webkit-app-region: no-drag;
  background: color-mix(in srgb, var(--bg-window) 68%, transparent);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
  animation: yh-page-drop-in .2s var(--ease-out) both;
}
.yh-page-drop::before {
  content: ''; position: absolute; inset: 18px; border: 1px solid var(--border-strong);
  border-radius: 8px; box-shadow: inset 0 0 0 1px var(--border); pointer-events: none;
}
.yh-page-drop-content {
  position: relative; display: grid; justify-items: center; gap: 13px; text-align: center; color: var(--text);
  animation: yh-page-drop-content-in .26s var(--ease-out) both;
}
.yh-page-drop-icon { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-subtle); color: var(--text-muted); }
.yh-page-drop-content strong { font-size: 19px; font-weight: 600; line-height: 1.3; }
.yh-page-drop-content > span:last-child { font-size: 12px; color: var(--text-muted); }
@keyframes yh-page-drop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes yh-page-drop-content-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .yh-page-drop, .yh-page-drop-content, .yh-attach-menu { animation: none; }
}
/* 圆形图标按钮（与 + / 麦克风 同族），开启态用墨色圆底 */
.yh-voice-mode-btn { position: relative; width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--text-muted); border: 0; background: transparent; transition: background-color .4s cubic-bezier(0.175,0.885,0.32,1.275), color .2s ease, transform .4s cubic-bezier(0.175,0.885,0.32,1.275); }
.yh-voice-mode-btn:hover { background: var(--bg-hover); color: var(--text); transform: translateY(-1px); }
.yh-voice-mode-btn:active { transform: translateY(0) scale(.97); transition-duration: .1s; }
.yh-voice-mode-btn.is-on { background: var(--text); color: var(--bg-window); }
.yh-voice-mode-btn.is-on:hover { opacity: .9; }
.yh-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: yh-rec-pulse 1.2s ease-in-out infinite; }
@keyframes yh-rec-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }
/* 麦克风按钮：聆听中深青描边呼吸，识别中转圈 */
.yh-mic-btn { transition: background-color .18s ease, color .18s ease, box-shadow .18s ease; }
.yh-mic-btn.is-listening { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 42%, transparent); animation: yh-mic-breathe 1.8s ease-in-out infinite; }
@keyframes yh-mic-breathe { 0%, 100% { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); } 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent); } }
.yh-mic-btn.is-busy { cursor: wait; }
.yh-mic-spinner { width: 13px; height: 13px; border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 28%, transparent); border-top-color: currentColor; animation: yh-mic-spin .7s linear infinite; }
@keyframes yh-mic-spin { to { transform: rotate(360deg); } }
/* 语音对话模式状态条 */
.yh-voice-status { display: flex; align-items: center; gap: 8px; margin: 0 4px 8px; padding: 6px 12px; align-self: flex-start; max-width: 100%; border-radius: 999px; background: var(--bg-hover); color: var(--text-muted); font-size: 12px; line-height: 1.4; white-space: nowrap; animation: yh-fade-in .22s ease both; }
.yh-voice-status-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--text-faint); }
.yh-voice-status-dot.is-pulse { background: var(--accent); animation: yh-rec-pulse 1.2s ease-in-out infinite; }
/* 麦克风实时电平条 */
.yh-mic-level { display: inline-block; width: 72px; height: 4px; margin-left: 6px; vertical-align: middle; border-radius: 2px; background: color-mix(in srgb, currentColor 14%, transparent); overflow: hidden; }
.yh-mic-level > span { display: block; height: 100%; border-radius: 2px; background: var(--accent); transition: width .1s linear; }
.yh-mode-toggle { position: relative; width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--text-muted); border: 0; background: transparent; transition: background-color .4s cubic-bezier(0.175,0.885,0.32,1.275), color .2s ease, transform .4s cubic-bezier(0.175,0.885,0.32,1.275); }
.yh-mode-toggle:hover { background: var(--bg-hover); color: var(--text); transform: translateY(-1px); }
.yh-mode-toggle:active { transform: translateY(0) scale(.97); transition-duration: .1s; }
.yh-mode-toggle.is-active { background: var(--text); color: var(--bg-window); }
/* 磁吸：hover 时 JS 写入 transform 跟随光标，离开时弹簧回弹 */
.yh-send-btn { width: 34px; height: 34px; display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--text); color: var(--bg-window); transition: opacity .14s ease, transform .6s cubic-bezier(.22, 1.4, .36, 1); }
.yh-send-btn:hover:not(:disabled) { opacity: .82; transition: opacity .14s ease, transform .05s linear; }
.yh-send-btn:active:not(:disabled) { transform: scale(.92) !important; transition-duration: .1s; }
.yh-send-btn:disabled { background: #c9c9c9; color: #fff; opacity: 1; }
/* 停止生成按钮：与发送按钮同尺寸的圆形，浅灰底 + 黑色方块，无文字无描边 */
.yh-stop-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; flex: none; background: var(--bg-subtle); color: var(--text); transition: background-color .16s var(--ease-out), transform .12s var(--ease-out); }
.yh-stop-btn:hover { background: var(--bg-hover); }
.yh-stop-btn:active { transform: scale(.92); }
:root[data-theme='dark'] .yh-stop-btn { background: rgba(255,255,255,.1); }
:root[data-theme='dark'] .yh-stop-btn:hover { background: rgba(255,255,255,.16); }
:root[data-theme='dark'] .yh-mode-toggle { background: rgba(255,255,255,.08); }
:root[data-theme='dark'] .yh-mode-toggle:hover { background: rgba(255,255,255,.14); color: var(--text); }
:root[data-theme='dark'] .yh-send-btn:disabled { background: #676767; color: #aaa; }
.yh-composer-hint, .yh-composer-error { font-size: 11px; color: var(--text-muted); padding: 8px 4px 0; line-height: 1.7; }
.yh-composer-error { color: var(--danger); }
/* 待发送附件托盘：悬浮在输入气泡上方 */
.yh-attachments { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin: 0 2px 8px; animation: yh-fade-up .2s var(--ease-out) both; }
.yh-attachment-file { display: flex; align-items: center; gap: 9px; max-width: 264px; padding: 6px 8px 6px 7px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-window); animation: yh-fade-up .22s var(--ease-out) both; transition: border-color .14s ease, transform .14s var(--ease-out); }
.yh-attachment-file:hover { border-color: var(--border-strong); }
.yh-attachment-file:active { transform: scale(.985); }
.yh-attachment-file-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--bg-subtle); color: var(--text-muted); }
.yh-attachment-file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.yh-attachment-file-name { font-size: 12.5px; font-weight: 500; line-height: 1.35; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-attachment-file-meta small { font-size: 10.5px; line-height: 1.35; color: var(--text-faint); }
.yh-attachment-remove { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--text-faint); transition: background-color .12s ease, color .12s ease, transform .12s var(--ease-out); }
.yh-attachment-remove:hover { background: var(--bg-hover); color: var(--text); }
.yh-attachment-remove:active { transform: scale(.88); }
.yh-drop-hint { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; gap: 12px; z-index: 70; background: var(--bg-subtle); border: 1px dashed var(--text-muted); border-radius: 24px; color: var(--text-muted); pointer-events: none; }

/* Composer：/ 指令 与 @ 文件 建议浮层 */
.yh-suggest {
  position: absolute; left: 12px; bottom: 52px; z-index: 60;
  width: 360px; max-width: calc(100% - 24px);
  border: 1px solid rgba(0, 0, 0, .06); border-radius: 16px;
  background: var(--bg-window); box-shadow: 0 12px 36px rgba(0, 0, 0, .14);
  overflow: hidden; transform-origin: 12px bottom; animation: yh-suggest-pop .26s var(--ease-morph) both;
}
@keyframes yh-suggest-pop { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: scale(1) translateY(0); } }
:root[data-theme='dark'] .yh-suggest { border-color: rgba(255, 255, 255, .08); box-shadow: 0 12px 32px rgba(0, 0, 0, .4); }
.yh-suggest-head { display: flex; align-items: center; gap: 7px; padding: 9px 13px 7px; font-size: 11.5px; color: var(--text-faint); border-bottom: 1px solid var(--border); }
.yh-suggest-cwd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); }
.yh-suggest-list { max-height: 264px; overflow-y: auto; padding: 6px; }
.yh-suggest-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border: 0; border-radius: 10px; background: transparent;
  text-align: left; color: var(--text); cursor: pointer; position: relative;
  transition: background-color .14s var(--ease-out), transform .12s var(--ease-out);
}
.yh-suggest-item::before { content: ''; position: absolute; left: 2px; top: 50%; height: 0; width: 2.5px; border-radius: 2px; background: var(--accent); transform: translateY(-50%); transition: height .2s var(--ease-morph); }
.yh-suggest-item.is-active { background: var(--bg-hover); }
.yh-suggest-item.is-active::before { height: 16px; }
.yh-suggest-item:active { transform: scale(.99); }
.yh-suggest-cmd-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--bg-subtle); color: var(--text-muted); transition: color .16s ease, transform .16s var(--ease-out); }
.yh-suggest-item.is-active .yh-suggest-cmd-icon { color: var(--accent); transform: scale(1.06); }
.yh-suggest-cmd-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.yh-suggest-cmd-name { font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-suggest-cmd-hint { font-size: 11px; line-height: 1.4; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-suggest-file-icon { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--bg-subtle); color: var(--text-muted); transition: color .16s ease, transform .16s var(--ease-out); }
.yh-suggest-item.is-active .yh-suggest-file-icon { color: var(--accent); transform: scale(1.05); }
.yh-suggest-file-icon.is-dir { color: var(--text); }
.yh-suggest-item.is-active .yh-suggest-file-icon.is-dir { color: var(--accent); }
.yh-suggest-file-icon.is-up { background: transparent; }
.yh-suggest-file-name { min-width: 0; flex: 1; font-size: 13px; line-height: 1.4; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-suggest-file-arrow { flex: none; color: var(--text-faint); transition: transform .16s var(--ease-out), color .16s ease; }
.yh-suggest-item.is-active .yh-suggest-file-arrow, .yh-suggest-item:hover .yh-suggest-file-arrow { transform: translateX(2px); color: var(--accent); }
.yh-suggest-note { padding: 10px 12px; font-size: 12px; color: var(--text-faint); line-height: 1.6; }
.yh-suggest-note.is-action { width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--text-muted); transition: color .14s ease; }
.yh-suggest-note.is-action:hover { color: var(--text); }
.yh-suggest-note:not(.is-action) { animation: yh-breathe 3s ease-in-out infinite; }

/* @ 文件引用 chip（发送时才读取内容） */
.yh-mention-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 240px;
  padding: 4px 6px 4px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-window);
  font-size: 12px; line-height: 1.4; color: var(--text);
  animation: yh-fade-up .2s var(--ease-out) both;
}
.yh-mention-chip-icon { flex: none; color: var(--text-muted); }
.yh-mention-chip-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); }
.yh-mention-chip button { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--text-faint); transition: background-color .12s ease, color .12s ease; }
.yh-mention-chip button:hover { background: var(--bg-hover); color: var(--text); }

/* Conversation: plain text, not branded message cards. */
.yh-message-region { position: relative; flex: 1; min-height: 0; display: flex; }
.yh-messages { flex: 1; scroll-behavior: auto; }
/* 底部留白跟随输入框底座实际高度（--dock-height 由 ChatView 实时测量写入），
   多行输入时自动加大，保证最后一条消息的操作按钮不会被输入框遮挡 */
.yh-messages-inner { max-width: 832px; padding: 25px 32px max(calc(var(--dock-height, 180px) + 32px), 200px); gap: 35px; }

.yh-compaction-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 6px;
  font-size: 11.5px;
  color: var(--text-faint);
  opacity: 0.75;
}
.yh-compaction-divider::before,
.yh-compaction-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.yh-resume-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, var(--bg-subtle));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
}
.yh-resume-banner-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.yh-resume-banner-text strong { font-size: 14px; color: var(--text); }
.yh-resume-banner-text span { font-size: 12.5px; color: var(--text-faint); }
.yh-resume-banner-actions { display: flex; gap: 8px; flex-shrink: 0; }
.yh-resume-banner-btn {
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.yh-resume-banner-btn:hover { background: var(--bg-subtle); }
.yh-resume-banner-btn.primary { background: var(--accent); color: var(--accent-contrast, #fff); border-color: var(--accent); }
.yh-resume-banner-btn.primary:hover { background: var(--accent-strong, var(--accent)); }

.yh-user-bubble-text { max-width: 85%; font-size: 15px; padding: 10px 18px; line-height: 1.8; border-radius: 22px; background: var(--bg-subtle); max-height: 320px; overflow-y: auto; }
:root:not([data-theme='dark']) .yh-user-bubble-text { background: #ffffff; }
.yh-msg-user:hover .yh-user-bubble-text { background: var(--bg-subtle); }
:root:not([data-theme='dark']) .yh-msg-user:hover .yh-user-bubble-text { background: #ffffff; }
.yh-msg-content { font-size: 15px; line-height: 1.9; }


/* AI 生成的可下载文件卡 */
.yh-file-card { display: flex; align-items: center; gap: 12px; max-width: 420px; margin: 14px 0 4px; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-window); transition: border-color .16s ease, transform .16s var(--ease-out); animation: yh-fade-up .24s var(--ease-out) both; }
.yh-bundle-btn { display: inline-flex; align-items: center; gap: 7px; margin: 8px 0 4px; height: 32px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-window); color: var(--text); font-size: 12.5px; cursor: pointer; transition: background .14s ease, border-color .14s ease, transform .14s var(--ease-out); animation: yh-fade-up .24s var(--ease-out) both; }
.yh-bundle-btn:hover { background: var(--bg-hover); border-color: var(--text-faint); }
.yh-bundle-btn:active { transform: scale(.97); }
.yh-bundle-btn:disabled { opacity: .55; cursor: default; }

/* 后续建议（vora-suggest）：消息流内联排布，完成态错落浮现，点击直接发起新一轮对话。
   注意：类名必须与输入框斜杠菜单浮层（.yh-suggest）区分，否则 position/阴影等浮层声明会合并污染，
   把整块建议变成悬浮卡片遮住交付文件。 */
.yh-followups { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 2px; }
.yh-followup-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-window); color: var(--text-muted);
  font-size: 12.5px; line-height: 1.35; text-align: left; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: yh-followup-in .24s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 40ms);
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .14s var(--ease-out), box-shadow .16s ease;
}
@keyframes yh-followup-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.yh-followup-chip:hover { border-color: color-mix(in srgb, var(--text) 38%, transparent); background: var(--bg-hover); color: var(--text); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.yh-followup-chip:active { transform: scale(.97); }
.yh-followup-arrow { flex: none; color: var(--text-faint); transition: color .16s ease, transform .16s var(--ease-out); }
.yh-followup-chip:hover .yh-followup-arrow { color: var(--text); transform: translate(1px, -1px); }
.yh-file-card:hover { border-color: var(--border-strong); }
.yh-file-card.is-pending { color: var(--text-faint); }
.yh-file-card-badge { flex: none; display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border: 1px solid var(--border-strong); border-radius: 9px; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--text); }
.yh-file-card.is-pending .yh-file-card-badge { border-color: var(--border); color: var(--text-faint); animation: yh-pulse 1.4s ease infinite; }
.yh-file-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.yh-file-card-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-file-card-meta { font-size: 12px; color: var(--text-faint); }
.yh-file-card-btn { flex: none; transition: transform .16s var(--ease-out); }
.yh-file-card-btn:active { transform: scale(.9); }

.yh-msg-actions { display: flex; gap: 4px; align-items: center; }
.yh-msg-icon { width: 28px; height: 28px; }

/* 朗读迷你播放器：胶囊，与操作行同高 */
.yh-tts { display: flex; align-items: center; gap: 5px; height: 28px; padding: 0 4px 0 3px; border-radius: 999px; background: var(--bg-subtle); animation: yh-tts-in .22s var(--ease-out) both; transition: opacity .18s ease; }
@keyframes yh-tts-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: scale(1); } }
.yh-tts.is-paused { opacity: .62; }
.yh-tts-btn { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: none; border-radius: 999px; background: none; color: var(--text-muted); cursor: pointer; transition: background-color .14s ease, color .14s ease, transform .14s var(--ease-out); }
.yh-tts-btn:hover { background: var(--bg-hover); color: var(--text); }
.yh-tts-btn:active { transform: scale(.88); }
.yh-tts-track { position: relative; width: 54px; height: 3px; border-radius: 2px; background: var(--bg-accent); overflow: hidden; }
.yh-tts-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 2px; background: var(--text); transition: width .3s linear; }
.yh-tts-eq { display: flex; align-items: flex-end; gap: 2px; height: 11px; margin: 0 1px; }
.yh-tts-eq i { width: 2px; height: 10px; border-radius: 1px; background: var(--text-faint); transform-origin: bottom; animation: yh-eq 1.05s ease-in-out infinite; }
.yh-tts-eq i:nth-child(1) { animation-delay: 0s; }
.yh-tts-eq i:nth-child(2) { height: 7px; animation-delay: .22s; }
.yh-tts-eq i:nth-child(3) { height: 9px; animation-delay: .44s; }
.yh-tts.is-paused .yh-tts-eq i { animation-play-state: paused; }
@keyframes yh-eq { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .yh-tts-eq i { animation: none; transform: scaleY(.5); } .yh-tts { animation: none; } }
.yh-thinking-head { font-size: 13px; color: var(--text-muted); }
.yh-thinking-body { font-size: 13px; color: var(--text-muted); }
.yh-msg-error { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin: 8px 0 4px; padding: 12px 16px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--bg-subtle); overflow-wrap: anywhere; animation: yh-fade-up .26s var(--ease-out) both; }
.yh-msg-error-head { display: flex; align-items: baseline; gap: 8px; font-size: 13px; line-height: 1.6; }
.yh-msg-error-title { flex: none; font-weight: 600; color: var(--text); }
.yh-msg-error-reason { color: var(--text-muted); }
.yh-msg-error-note { font-size: 12px; line-height: 1.5; color: var(--text-faint); }
.yh-msg-error-retry { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; padding: 5px 14px; font-size: 12.5px; font-weight: 500; border-radius: 8px; border: 1px solid var(--text); background: var(--text); color: var(--bg-window); transition: opacity .15s ease, transform .15s var(--ease-out); }
.yh-msg-error-retry:hover { opacity: .86; }
.yh-msg-error-retry:active { transform: scale(.96); }
.yh-md :not(pre) > code { color: var(--text); }

/* ---------- Canvas 画布面板 ---------- */
.yh-chat.has-canvas .yh-chat-layout { display: flex; }
.yh-canvas { width: 50%; min-width: 380px; max-width: 720px; display: flex; flex-direction: column; border-left: 1px solid var(--border); background: var(--bg-window); animation: yh-canvas-in .3s var(--ease-morph); }
@keyframes yh-canvas-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* 右侧分屏容器（浏览器式多标签：画布 / 文件预览切换与关闭）。
   进出动画由 ChatView 的 is-enter / is-closing 驱动：宽度收到 0 的同时内部标签右滑淡出，
   对话区随宽度过渡自然让位/收回；不用 top/left，宽度过渡期间内部只动 transform+opacity */
.yh-side { flex: none; width: 50%; min-width: 360px; max-width: none; display: flex; flex-direction: column; border-left: 1px solid var(--border); background: var(--bg-window); transition: width .34s var(--ease-morph), min-width .34s var(--ease-morph), max-width .34s var(--ease-morph), border-color .18s ease; position: relative; }
.yh-side .yh-tabs, .yh-side .yh-tab-body { transition: opacity .28s ease, transform .34s var(--ease-morph); }
.yh-side.is-enter, .yh-side.is-closing {
  width: 0 !important; min-width: 0 !important; max-width: none !important;
  border-left-color: transparent; overflow: hidden; pointer-events: none; will-change: width;
}
.yh-side.is-enter .yh-tabs, .yh-side.is-enter .yh-tab-body,
.yh-side.is-closing .yh-tabs, .yh-side.is-closing .yh-tab-body {
  opacity: 0; transform: translateX(36px);
}
@media (prefers-reduced-motion: reduce) {
  .yh-side, .yh-side .yh-tabs, .yh-side .yh-tab-body { transition: none; }
}
/* 拖拽调宽热区：左缘 8px，hover 显现指示线 */
.yh-side-resizer { position: absolute; left: -4px; top: 0; bottom: 0; width: 9px; cursor: col-resize; z-index: 70; }
.yh-side-resizer::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: transparent; transition: background-color .15s ease, box-shadow .15s ease; }
.yh-side-resizer:hover::before, body.yh-resizing .yh-side-resizer::before { background: var(--text-faint); box-shadow: 0 0 0 1px rgba(0,0,0,.04); }
body.yh-resizing { cursor: col-resize; user-select: none; -webkit-user-select: none; }
body.yh-resizing .yh-side { transition: none; }
body.yh-resizing iframe { pointer-events: none; }
.yh-side.is-expanded { width: 68%; max-width: none; }
.yh-tabs { flex: none; display: flex; align-items: center; gap: 2px; padding: 7px 10px 0; overflow-x: auto; scrollbar-width: none; }
.yh-tabs::-webkit-scrollbar { display: none; }
.yh-tab { display: inline-flex; align-items: center; gap: 6px; max-width: 200px; min-width: 0; height: 30px; padding: 0 6px 0 10px; border: 1px solid transparent; border-bottom: none; border-radius: 9px 9px 0 0; color: var(--text-muted); font-size: 12.5px; cursor: pointer; user-select: none; white-space: nowrap; transition: background .13s ease, color .13s ease, border-color .13s ease; }
.yh-tab:hover { background: var(--bg-hover); }
.yh-tab.is-active { background: var(--bg-window); border-color: var(--border); color: var(--text); position: relative; }
.yh-tab.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; background: var(--bg-window); }
.yh-tab > svg { flex: none; opacity: .65; }
.yh-tab-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yh-tab-close { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border: none; border-radius: 5px; background: transparent; color: var(--text-faint); cursor: pointer; opacity: 0; transition: opacity .12s ease, background .12s ease, color .12s ease; }
.yh-tab:hover .yh-tab-close, .yh-tab.is-active .yh-tab-close { opacity: 1; }
.yh-tab-close:hover { background: var(--bg-accent); color: var(--text); }
.yh-tab-body { flex: 1; min-height: 0; display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.yh-tab-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.yh-tab-pane[hidden] { display: none; }
.yh-side .yh-canvas, .yh-side .yh-preview { width: 100%; min-width: 0; max-width: none; height: 100%; border-left: none; animation: none; transition: none; }
.yh-canvas-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- 内置浏览器面板 ---------- */
.yh-browser { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; background: var(--bg-window); }
.yh-browser-bar { flex: none; display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.yh-browser-bar .yh-icon-btn { width: 30px; height: 30px; }
.yh-browser-bar .yh-icon-btn:disabled { opacity: .35; pointer-events: none; }
.yh-browser-address { flex: 1; min-width: 0; display: flex; align-items: center; position: relative; margin: 0 4px; }
.yh-browser-address input { width: 100%; height: 32px; padding: 0 30px 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-subtle); color: var(--text); font-size: 12.5px; outline: none; transition: border-color .18s var(--ease-out), background-color .18s var(--ease-out), box-shadow .18s var(--ease-out); }
.yh-browser-address input:hover { background: var(--bg-hover); }
.yh-browser-address input:focus { border-color: rgba(0,0,0,.3); background: var(--bg-window); box-shadow: 0 0 0 3.5px rgba(0,0,0,.05); }
:root[data-theme='dark'] .yh-browser-address input:focus { border-color: rgba(255,255,255,.3); box-shadow: 0 0 0 3.5px rgba(255,255,255,.06); }
.yh-browser-loading { position: absolute; right: 10px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; border: 1.5px solid var(--border); border-top-color: #0f766e; animation: yh-spin .8s linear infinite; }
@keyframes yh-spin { to { transform: rotate(360deg); } }
.yh-browser-view { flex: 1; min-height: 0; width: 100%; display: flex; border: none; background: #fff; }
.yh-browser-fail { position: absolute; inset: 0; top: 47px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--bg-window); z-index: 5; animation: yh-fade-up .24s var(--ease-out) both; }
.yh-browser-fail p { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.yh-browser-fail small { max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text-faint); }
.yh-browser-fail button { margin-top: 10px; height: 32px; padding: 0 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-window); color: var(--text); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: background-color .16s var(--ease-out), transform .12s var(--ease-out); }
.yh-browser-fail button:hover { background: var(--bg-hover); }
.yh-browser-fail button:active { transform: scale(.95); }

.yh-canvas-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.yh-canvas-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); min-width: 0; flex: 1; }
.yh-canvas-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--bg-hover); color: var(--text-muted); }
.yh-canvas-actions { display: flex; align-items: center; gap: 2px; }
.yh-canvas-actions .yh-icon-btn { width: 30px; height: 30px; }
.yh-canvas-sep { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }

.yh-canvas-body { flex: 1; overflow-y: auto; padding: 20px 24px; position: relative; }
/* 阅读栏：内容居中限宽（Notion / ChatGPT 画布同款） */
.yh-canvas-page { max-width: 680px; margin: 0 auto; }
/* 全文快捷操作条 */
.yh-canvas-quick { flex: none; display: flex; align-items: center; gap: 6px; padding: 9px 14px 11px; border-top: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; animation: yh-fade-up .24s var(--ease-out) both; }
.yh-canvas-quick::-webkit-scrollbar { display: none; }
.yh-canvas-quick-chip { flex: none; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--text-muted); background: var(--bg-subtle); border: 1px solid transparent; position: relative; overflow: hidden; transition: background-color .16s var(--ease-out), color .16s var(--ease-out), transform .12s var(--ease-out), border-color .16s ease; }
.yh-canvas-quick-chip::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, color-mix(in srgb, var(--accent) 16%, transparent) 50%, transparent 70%); transform: translateX(-100%); transition: transform .6s var(--ease-out); pointer-events: none; }
.yh-canvas-quick-chip:hover { background: var(--bg-hover); color: var(--text); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.yh-canvas-quick-chip:hover::after { transform: translateX(100%); }
.yh-canvas-quick-chip:active { transform: scale(.95); }
.yh-canvas-quick-chip:disabled { opacity: .5; }
.yh-canvas-quick-chip:disabled::after { display: none; }
/* 历史版本弹层 */
.yh-canvas-history { position: absolute; top: calc(100% + 8px); right: 0; width: 300px; max-height: 380px; overflow-y: auto; padding: 6px; background: var(--bg-window); border: 1px solid rgba(0,0,0,.06); border-radius: 16px; box-shadow: 0 8px 28px rgba(0,0,0,.09); z-index: 90; transform-origin: calc(100% - 14px) 0; animation: yh-menu-pop .2s var(--ease-out) both; }
:root[data-theme='dark'] .yh-canvas-history { border-color: rgba(255,255,255,.07); box-shadow: 0 8px 28px rgba(0,0,0,.26); }
.yh-canvas-history-head { display: flex; align-items: baseline; gap: 8px; padding: 8px 10px 6px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.yh-canvas-history-head small { margin-left: auto; font-weight: 400; font-size: 11px; color: var(--text-faint); }
.yh-canvas-history-empty { padding: 14px 10px 12px; font-size: 12px; line-height: 1.6; color: var(--text-faint); }
.yh-canvas-history-item { width: 100%; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; text-align: left; animation: yh-option-in .28s var(--ease-out) both; transition: background-color .14s var(--ease-out); }
.yh-canvas-history-item:hover { background: var(--bg-hover); }
.yh-canvas-history-item strong { font-size: 12.5px; font-weight: 600; color: var(--text); }
.yh-canvas-history-item small { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-canvas-editor { outline: none; min-height: 100%; font-size: 14px; line-height: 1.75; color: var(--text); }
.yh-canvas-editor h1, .yh-canvas-editor h2, .yh-canvas-editor h3, .yh-canvas-editor h4, .yh-canvas-editor h5, .yh-canvas-editor h6 { margin: 1.2em 0 .6em; font-weight: 600; line-height: 1.4; }
.yh-canvas-editor h1 { font-size: 1.6em; border-bottom: 1px solid var(--border); padding-bottom: .3em; }
.yh-canvas-editor h2 { font-size: 1.35em; }
.yh-canvas-editor h3 { font-size: 1.15em; }
.yh-canvas-editor p { margin: .8em 0; }
.yh-canvas-editor ul, .yh-canvas-editor ol { margin: .8em 0; padding-left: 1.6em; }
.yh-canvas-editor li { margin: .3em 0; }
.yh-canvas-editor blockquote { border-left: 3px solid var(--border-strong); margin: 1em 0; padding: .5em 1em; color: var(--text-muted); background: var(--bg-subtle); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.yh-canvas-editor pre { background: var(--bg-subtle); padding: 12px 14px; border-radius: var(--radius-sm); overflow-x: auto; margin: 1em 0; font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.yh-canvas-editor table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 13px; }
.yh-canvas-editor th, .yh-canvas-editor td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.yh-canvas-editor th { background: var(--bg-subtle); font-weight: 600; }
.yh-canvas-editor hr { border: none; border-top: 1px solid var(--border); margin: 1.5em 0; }
.yh-canvas-editor [data-canvas-block] { position: relative; }
.yh-canvas-editor [data-canvas-block]:hover::after { content: ''; position: absolute; left: -8px; top: 0; bottom: 0; width: 3px; background: var(--teal); border-radius: 2px; opacity: .5; }

.yh-canvas-streaming { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 12px; background: var(--bg-window); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-menu); font-size: 12px; color: var(--text-muted); animation: yh-fade-up .24s var(--ease-out) both; }
.yh-canvas-streaming-dots { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.yh-canvas-streaming-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: yh-stream-bounce 1.2s var(--ease-out) infinite; }
.yh-canvas-streaming-dot:nth-child(2) { animation-delay: .15s; }
.yh-canvas-streaming-dot:nth-child(3) { animation-delay: .3s; }
@keyframes yh-stream-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.yh-canvas-edit { flex: 1; display: flex; flex-direction: column; padding: 16px; gap: 12px; }
.yh-canvas-textarea { flex: 1; resize: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; font-family: var(--font-sans); font-size: 13.5px; line-height: 1.7; background: var(--bg-window); color: var(--text); outline: none; }
.yh-canvas-textarea:focus { border-color: var(--border-strong); }
.yh-canvas-edit-actions { display: flex; justify-content: flex-end; gap: 8px; }

.yh-canvas-rewrite { position: absolute; z-index: 50; width: 280px; background: var(--bg-window); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-menu); transform-origin: 80px top; animation: yh-rewrite-pop .3s var(--ease-morph) both; }
@keyframes yh-rewrite-pop { 0% { opacity: 0; transform: scale(.88) translateY(-6px); } 60% { opacity: 1; transform: scale(1.02) translateY(2px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
.yh-canvas-rewrite-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-muted); }
.yh-canvas-rewrite-body { padding: 10px 12px; }
.yh-canvas-rewrite-input { width: 100%; resize: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px; background: var(--bg-window); color: var(--text); outline: none; margin-bottom: 10px; }
.yh-canvas-rewrite-input:focus { border-color: var(--border-strong); }
.yh-canvas-rewrite-actions { display: flex; justify-content: flex-end; gap: 6px; }

/* 画布打开时消息区适配 */
.yh-chat.has-canvas .yh-chat-content { min-width: 0; }
.yh-chat.has-canvas .yh-messages-inner { max-width: 720px; }
/* ---------- 数据分析面板 ---------- */
.yh-data-panel { width: 50%; min-width: 380px; max-width: 720px; display: flex; flex-direction: column; border-left: 1px solid var(--border); background: var(--bg-window); animation: yh-canvas-in .3s var(--ease-morph); }
.yh-data-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.yh-data-title { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.yh-data-badge { font-size: 11px; font-weight: 500; color: var(--text-muted); background: var(--bg-hover); padding: 3px 8px; border-radius: var(--radius-sm); }
.yh-data-actions { display: flex; align-items: center; gap: 2px; }
.yh-data-conv-load { display: inline-flex; align-items: center; gap: 5px; margin-right: 6px; padding: 5px 10px; font-size: 12px; font-weight: 500; color: var(--text); background: var(--bg-subtle); border: none; border-radius: var(--radius-sm); cursor: pointer; transition: background .15s ease, transform .15s var(--ease-out); white-space: nowrap; }
.yh-data-conv-load:hover { background: var(--bg-hover); }
.yh-data-conv-load:active { transform: scale(.96); }

.yh-data-body { flex: 1; display: flex; flex-direction: column; padding: 16px; gap: 12px; overflow-y: auto; }
.yh-data-code { flex: 1; resize: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; font-family: var(--mono); font-size: 13px; line-height: 1.6; background: var(--bg-window); color: var(--text); outline: none; min-height: 200px; }
.yh-data-code:focus { border-color: var(--border-strong); }
.yh-data-run { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 8px 16px; background: var(--accent); color: var(--accent-contrast); border-radius: var(--radius); font-size: 13px; font-weight: 500; transition: opacity .15s ease, transform .15s var(--ease-out); }
.yh-data-run:hover:not(:disabled) { opacity: .88; }
.yh-data-run:active:not(:disabled) { transform: scale(.97); }
.yh-data-run:disabled { opacity: .5; }

.yh-data-output { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.yh-data-output.is-error { border-color: var(--danger); }
.yh-data-output-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--bg-subtle); border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-muted); }
.yh-data-output-actions { display: flex; align-items: center; gap: 6px; }
.yh-data-send { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; font-size: 11.5px; font-weight: 500; color: var(--text); background: var(--bg-window); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: background .15s ease, border-color .15s ease, transform .15s var(--ease-out); white-space: nowrap; }
.yh-data-send:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.yh-data-send:active { transform: scale(.96); }
.yh-data-output pre { margin: 0; padding: 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; background: var(--bg-window); color: var(--text); overflow-x: auto; max-height: 300px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; }
.yh-data-output.is-error pre { color: var(--danger); }

.yh-data-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 0; }
.yh-data-file-chip { font-size: 11.5px; font-family: var(--mono); color: var(--text-muted); background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 2px; padding: 3px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yh-data-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.yh-data-chart { border: 1px solid var(--border); border-radius: 2px; overflow: hidden; background: var(--bg-window); }
.yh-data-chart img { display: block; width: 100%; height: auto; }
.yh-md img { max-width: 100%; }
.yh-user-edit-input { font-size: 14px; }
.yh-edit-warning { font-size: 12px; color: var(--text-faint); }
.yh-btn-ghost, .yh-btn-minor { color: var(--text-muted); font-size: 13px; padding: 5px 9px; }
/* 位置跟随输入框高度，避免多行输入时按钮被输入框盖住；浮现带对焦入场 */
.yh-scroll-bottom { position: absolute; bottom: max(calc(var(--dock-height, 180px) + 12px), 172px); left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 34px; height: 34px; background: var(--bg-window); border: 1px solid var(--border-strong); border-radius: 50%; color: var(--text-muted); box-shadow: 0 2px 10px rgba(0,0,0,.06); transition: bottom .3s var(--ease-out), border-color .16s ease, color .16s ease, transform .14s var(--ease-out), box-shadow .16s ease; animation: yh-scroll-bottom-in .22s var(--ease-out) both; }
@keyframes yh-scroll-bottom-in { from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.94); } to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); } }
.yh-scroll-bottom:hover { border-color: var(--text-faint); color: var(--text); box-shadow: 0 4px 14px rgba(0,0,0,.09); }
.yh-scroll-bottom:active { transform: translateX(-50%) scale(.94); }

/* 置顶摘要：参考 ChatGPT 顶栏列表钮，点击后在右上角弹出圆角卡片 */
.yh-details-pop { position: absolute; top: 58px; right: 16px; z-index: 88; width: 356px; max-width: calc(100% - 32px); max-height: calc(100% - 78px); display: flex; flex-direction: column; animation: yh-menu-pop .2s var(--ease-out) both; transform-origin: calc(100% - 77px) 0; }
.yh-details-caret { position: absolute; top: -5px; right: 71px; z-index: 1; width: 11px; height: 11px; border-top: 1px solid var(--border); border-left: 1px solid var(--border); background: var(--bg-window); transform: rotate(45deg); border-radius: 2px; pointer-events: none; }
.yh-details { position: static; flex: 1; min-height: 0; width: 100%; border: 1px solid var(--border); border-radius: 18px; background: var(--bg-window); box-shadow: var(--shadow-menu); padding: 16px 16px 14px; overflow-y: auto; }
.yh-details-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; padding: 2px 4px 0; }
.yh-details-head h2 { font-size: 15px; font-weight: 500; letter-spacing: .01em; color: var(--text-muted); }
.yh-details-add { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--text-faint); transition: background-color .15s ease, color .15s ease; }
.yh-details-add:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.yh-details-add:disabled { opacity: .38; cursor: default; }

.yh-card { border: 1px solid var(--border); background: var(--bg-window); border-radius: var(--radius-lg); }

/* 信息卡 */
.yh-info-card { padding: 2px 4px 6px; background: transparent; border-color: transparent; animation: yh-fade-in .22s var(--ease-out) both; }
.yh-info-title { display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left; font-size: 14.5px; font-weight: 600; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
.yh-info-title > svg { flex: none; margin-top: 4px; color: var(--text-faint); opacity: 0; transition: opacity .14s ease; }
.yh-info-title:hover > svg { opacity: 1; }
.yh-details-title-input { width: 100%; background: var(--bg-window); border: 1px solid var(--border-strong); outline: none; border-radius: 9px; padding: 8px 10px; font-size: 14px; font-weight: 600; }
.yh-info-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.yh-info-row { display: inline-flex; align-items: center; gap: 7px; }
.yh-info-row > svg { flex: none; color: var(--text-faint); }
.yh-info-pin { color: var(--text-muted); }
.yh-info-project { display: flex; align-items: center; gap: 8px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }
.yh-info-project svg { flex: none; }

/* Activity 时间轴：消息区左边缘刻度，悬停出预览卡，点击跳转 */
.yh-activity { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 3px; }
.yh-activity-tick { width: 28px; height: 9px; display: grid; place-items: center; }
.yh-activity-tick:active::before { transform: scaleX(1.6); }
/* 刻度仅缩放和淡入，光标邻近强度由动画帧驱动，不改变按钮排布。 */
.yh-activity-tick::before { content: ''; width: 9px; height: 2px; border-radius: 2px; background: var(--text-muted); opacity: var(--tick-opacity, .42); transform: scaleX(var(--tick-scale, 1)); will-change: transform, opacity; transition: background-color .18s ease; }
.yh-activity-tick:is(:hover, :focus-visible)::before { background: var(--text); }
.yh-activity:not(:hover) .yh-activity-tick.is-active::before { transform: scaleX(1.95); opacity: 1; background: var(--text); transition: transform .24s var(--ease-out), opacity .24s ease; }
.yh-peek { position: absolute; left: 42px; z-index: 50; width: 300px; padding: 11px 13px; background: var(--bg-window); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-menu); cursor: pointer; animation: yh-fade-up .18s var(--ease-out); transition: border-color .15s ease, top .28s cubic-bezier(.32, .72, 0, 1), opacity .18s ease, transform .18s var(--ease-out); }
.yh-peek.is-leaving { opacity: 0; transform: translateX(-6px); pointer-events: none; }
.yh-peek-body { min-width: 0; }
.yh-peek:hover { border-color: var(--border-strong); }
.yh-peek-title { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.5; }
.yh-peek-title span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yh-peek-title svg { flex: none; color: var(--text-faint); margin-top: 2px; }
.yh-peek-excerpt { margin-top: 5px; font-size: 12px; color: var(--text-muted); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.yh-preference-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 18px; margin-bottom: 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.yh-preference-row select { background: var(--bg-window); border: 1px solid var(--border-strong); padding: 7px 10px; border-radius: 7px; }

@media (max-width: 1150px) {
  :root { --sidebar-w: 240px; }
  .yh-details-pop { width: 324px; }
}
@media (max-width: 700px) {
  :root { --rail-w: 52px; }
  .yh-workspace { position: relative; }
  .yh-sidebar { position: absolute; inset: 0 auto 0 0; z-index: 90; width: min(280px, calc(100% - 48px)); box-shadow: 8px 0 30px #0002; }
  .yh-sidebar-inner { width: 100%; }
  .yh-sidebar.is-collapsed { box-shadow: none; }
  .yh-topbar { padding: 0 12px; height: 56px; }
  .yh-model-menu { right: 0; width: min(272px, calc(100vw - 28px)); }
  .yh-empty-center { padding: 20px 18px calc(50cqh + 72px); }
  .yh-empty-center h1 { font-size: 24px; }
  .yh-dock { padding: 32px 14px 12px; }
  .yh-messages-inner { padding: 15px 20px max(calc(var(--dock-height, 180px) + 32px), 200px); }
  .yh-user-bubble-text { max-width: 90%; }
  .yh-details-pop { top: 52px; right: 10px; width: calc(100% - 20px); max-width: none; }
  .yh-details-caret { right: 64px; }
  .yh-modal-overlay { padding: 15px; }
  .yh-modal-heading { padding: 22px 18px; }
  .yh-library-tools { padding: 0 18px; }
  .yh-library-grid { padding: 0 18px 20px; }
  .yh-category-tabs { padding: 16px 18px; gap: 3px; }
  .yh-category-tabs > button { padding: 6px 10px; }
  .yh-library-foot { padding: 12px 18px; }
  .yh-template-editor { padding: 0 18px 20px; }
  .yh-set-overlay { padding: 12px; }
  .yh-set-panel { flex-direction: column; max-height: 95vh; }
  .yh-set-side { width: 100%; padding: 15px; }
  .yh-set-side nav { flex-direction: row; }
  .yh-set-side-title, .yh-set-side-foot { display: none; }
  .yh-set-content { padding: 22px 18px; }
  .yh-set-cols { grid-template-columns: 1fr; gap: 0; }
  .yh-set-key input { width: 0; }
}
@media (max-width: 560px) {
  .yh-messages-inner { padding-bottom: max(calc(var(--dock-height, 180px) + 48px), 250px); }
}
@media (max-height: 600px) {
  .yh-empty-center { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ===== 图片附件（输入框） ===== */
.yh-attachment-image { position: relative; width: 72px; height: 72px; padding: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-subtle); flex: none; animation: yh-fade-up .22s var(--ease-out) both; transition: border-color .14s ease, transform .14s var(--ease-out); }
.yh-attachment-image:hover { border-color: var(--border-strong); }
.yh-attachment-image:active { transform: scale(.97); }
.yh-attachment-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yh-attachment-image-remove { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.58); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .14s ease, background-color .14s ease, transform .14s var(--ease-out); }
.yh-attachment-image:hover .yh-attachment-image-remove, .yh-attachment-image:focus-within .yh-attachment-image-remove { opacity: 1; }
.yh-attachment-image-remove:hover { background: rgba(0,0,0,.8); }
.yh-attachment-image-remove:active { transform: scale(.88); }
.yh-attachment-video-badge {
  position: absolute; left: 4px; bottom: 4px;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 6px; border-radius: 6px;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: 10px; font-weight: 600; line-height: 1.5;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.yh-attachment-audio { display: grid; place-items: center; }
.yh-attachment-audio-icon { display: grid; place-items: center; color: var(--text-muted); }

/* ===== 操作批准开关 ===== */
.yh-approval { position: relative; }
/* 圆形图标按钮（与 + / 麦克风 同族） */
.yh-approval-chip {
  position: relative; width: 34px; height: 34px; display: inline-grid; place-items: center;
  border-radius: 50%; color: var(--text-muted); background: transparent; border: 0;
  transition: background-color .4s cubic-bezier(0.175,0.885,0.32,1.275), color .2s ease, transform .4s cubic-bezier(0.175,0.885,0.32,1.275);
}
.yh-approval-chip:hover, .yh-approval-chip.is-open { background: var(--bg-hover); color: var(--text); transform: translateY(-1px); }
.yh-approval-chip:active { transform: translateY(0) scale(.97); transition-duration: .1s; }
.yh-approval-chip:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.yh-approval-chip-icon { transition: transform .25s var(--ease-out); }
.yh-approval-chip:hover .yh-approval-chip-icon { transform: scale(1.08); }
/* 严格模式（手动审批）：图标转墨色，一眼区分安全级别 */
.yh-approval-chip[data-mode='ask'] { color: var(--text); }
.yh-approval-chip[data-mode='full'] { color: var(--text-faint); }

.yh-approval-menu {
  position: absolute; bottom: calc(100% + 10px); left: 0; width: 336px; max-width: calc(100vw - 24px);
  padding: 6px; border: 1px solid var(--border); border-radius: 16px;
  background: color-mix(in srgb, var(--bg-window) 88%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 20px 56px -18px rgb(0 0 0 / .3), 0 6px 18px -6px rgb(0 0 0 / .12);
  z-index: 80; transform-origin: 12px 100%; animation: yh-menu-pop .28s var(--ease-morph) both;
  overflow: hidden;
}
.yh-approval-head { position: relative; z-index: 1; margin: 0 0 2px; padding: 10px 12px 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: var(--text-muted); }
.yh-approval-list, .yh-approval-foot { position: relative; z-index: 1; }
.yh-approval-list { display: flex; flex-direction: column; gap: 2px; }
.yh-approval-option {
  position: relative; width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 12px; border: 1px solid transparent; text-align: left;
  transition: background-color .16s var(--ease-out), border-color .16s var(--ease-out);
  animation: yh-option-in .32s var(--ease-out) both;
}
.yh-approval-option:hover { background: var(--bg-hover); }
.yh-approval-option.is-selected { background: var(--bg-subtle); }
.yh-approval-option.is-selected[data-mode='full'] { background: var(--bg-subtle); }
.yh-approval-option-icon { flex: none; color: var(--text-faint); transition: color .16s var(--ease-out), transform .25s var(--ease-out); }
.yh-approval-option:hover .yh-approval-option-icon { color: var(--text); transform: scale(1.08); }
.yh-approval-option.is-selected .yh-approval-option-icon { color: var(--text); }
.yh-approval-option.is-selected[data-mode='full'] .yh-approval-option-icon { color: var(--text); }
.yh-approval-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.yh-approval-text strong { font-size: 13.5px; font-weight: 600; color: var(--text); }
.yh-approval-option.is-selected[data-mode='full'] .yh-approval-text strong { color: var(--text); }
.yh-approval-text small { font-size: 12px; line-height: 1.55; color: var(--text-muted); }
.yh-approval-check { flex: none; width: 18px; display: grid; place-items: center; color: var(--text); }
.yh-approval-check svg { animation: yh-check-pop .3s var(--ease-morph) both; }
.yh-approval-foot { position: relative; z-index: 1; margin-top: 2px; padding: 7px 12px 6px; font-size: 11px; line-height: 1.4; color: var(--text-faint); }
@keyframes yh-option-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes yh-check-pop { 0% { opacity: 0; transform: scale(.3); } 60% { opacity: 1; transform: scale(1.18); } 100% { opacity: 1; transform: scale(1); } }

/* ===== 消息内图片 ===== */
.yh-user-images { display: flex; flex-wrap: wrap; gap: 8px; max-width: 85%; justify-content: flex-end; }
.yh-user-image { display: block; padding: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-subtle); box-shadow: 0 1px 6px rgba(0, 0, 0, .06); cursor: zoom-in; transition: transform .16s var(--ease-out), box-shadow .16s ease; }
.yh-user-image:hover { transform: scale(1.015); box-shadow: 0 4px 16px rgba(0, 0, 0, .12); }
.yh-user-image:active { transform: scale(.98); }
.yh-user-image img { display: block; width: auto; height: auto; max-width: 340px; max-height: 300px; object-fit: contain; }
.yh-user-images.is-multi .yh-user-image img { max-width: 200px; max-height: 170px; }
.yh-lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 48px; background: rgba(0,0,0,.62); cursor: zoom-out; animation: yh-fade .14s ease both; -webkit-app-region: no-drag; }
.yh-lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 18px 60px #0008; }
@keyframes yh-fade { from { opacity: 0 } to { opacity: 1 } }
.yh-model-vision { margin-left: 5px; vertical-align: -1px; color: var(--text-faint); }

/* ---------- 文件预览（右侧分屏停靠面板，与画布同形态） ---------- */
.yh-preview { flex: none; width: 46%; min-width: 400px; max-width: 780px; height: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-window); border-left: 1px solid var(--border); animation: yh-canvas-in .3s var(--ease-morph) both; transition: width .24s var(--ease-out); }
.yh-preview.is-expanded { width: 68%; max-width: none; }
.yh-preview-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 16px; border-bottom: 1px solid var(--border); }
.yh-preview-icon { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--bg-subtle); border: 1px solid var(--border); color: var(--text-muted); }
.yh-preview-titlebox { flex: 1; min-width: 0; display: flex; flex-direction: row; align-items: baseline; gap: 8px; }
.yh-preview-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-preview-meta { flex: none; font-size: 11.5px; color: var(--text-faint); }
.yh-preview-download { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border: none; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: var(--bg-window); background: var(--text); cursor: pointer; transition: opacity .15s ease, transform .15s var(--ease-out); }
.yh-preview-download:hover { opacity: .86; }
.yh-preview-download:active { transform: scale(.95); }
.yh-preview-download:disabled { opacity: .5; cursor: default; }
.yh-preview-body { flex: 1; min-height: 0; overflow: auto; }
.yh-preview-empty { padding: 48px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* 文档（Word / PDF / Markdown） */
.yh-preview-doc { padding: 28px 24px 40px; }
.yh-preview-paper { max-width: 720px; margin: 0 auto; padding: 40px 48px; background: var(--bg-window); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 2px 14px rgba(0,0,0,.05); font-size: 14px; line-height: 1.8; }

/* 表格（Excel / CSV） */
.yh-preview-sheet { display: flex; flex-direction: column; height: 100%; }
.yh-preview-tabs { flex: none; display: flex; gap: 6px; padding: 12px 16px 0; flex-wrap: wrap; }
.yh-preview-tab { display: inline-flex; align-items: baseline; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text-muted); font-size: 12.5px; cursor: pointer; transition: background .14s ease, color .14s ease, border-color .14s ease; }
.yh-preview-tab em { font-style: normal; font-size: 10.5px; color: var(--text-faint); }
.yh-preview-tab:hover { background: var(--bg-subtle); }
.yh-preview-tab.is-active { background: var(--text); border-color: var(--text); color: var(--bg-window); }
.yh-preview-tab.is-active em { color: var(--bg-window); opacity: .65; }
.yh-preview-grid-wrap { flex: 1; overflow: auto; padding: 14px 16px 18px; }
.yh-preview-grid { border-collapse: collapse; min-width: 100%; font-size: 12.5px; }
.yh-preview-grid th, .yh-preview-grid td { border: 1px solid var(--border); padding: 6px 12px; text-align: left; white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.yh-preview-grid thead th { position: sticky; top: 0; z-index: 1; background: var(--bg-subtle); font-weight: 600; }
.yh-preview-grid tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg-subtle) 45%, transparent); }
.yh-preview-rowno { width: 40px; min-width: 40px; text-align: right !important; color: var(--text-faint); background: var(--bg-subtle); font-size: 11px; user-select: none; }

/* 幻灯片（PPT） */
.yh-preview-slides { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 26px 32px 20px; }
.yh-preview-slide { position: relative; width: min(680px, 100%); aspect-ratio: 16 / 10; padding: 40px 48px; background: var(--bg-window); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 36px rgba(0,0,0,.10); overflow: hidden; animation: yh-preview-in .22s var(--ease-out) both; }
.yh-preview-slide.is-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.yh-preview-slide-cover-title { font-size: 30px; font-weight: 700; letter-spacing: .01em; }
.yh-preview-slide-cover-sub { font-size: 13px; color: var(--text-faint); }
.yh-preview-slide-heading { font-size: 21px; font-weight: 700; }
.yh-preview-slide-rule { height: 1px; background: var(--border); margin: 14px 0 18px; }
.yh-preview-slide-points { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; font-size: 14px; line-height: 1.65; color: var(--text); }
.yh-preview-slide-points li::marker { color: var(--text-faint); }
.yh-preview-slide-no { position: absolute; right: 16px; bottom: 12px; font-size: 11px; color: var(--text-faint); }
.yh-preview-slide-nav { flex: none; display: flex; align-items: center; gap: 14px; }
.yh-preview-slide-edit { width: min(680px, 100%); display: flex; flex-wrap: wrap; gap: 8px; }
.yh-preview-slide-edit textarea { flex: 1 0 100%; min-height: 280px; resize: vertical; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-window); color: var(--text); font: inherit; line-height: 1.6; }
.yh-preview-slide-dots { display: flex; gap: 6px; }
.yh-preview-dot { width: 7px; height: 7px; border: none; border-radius: 50%; padding: 0; background: var(--border-strong); cursor: pointer; transition: transform .16s var(--ease-out), background .16s ease; }
.yh-preview-dot:hover { transform: scale(1.3); }
.yh-preview-dot.is-active { background: var(--text); transform: scale(1.25); }

/* 纯文本 / 代码 */
.yh-preview-text { margin: 0; padding: 22px 26px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: var(--text); }

/* HTML 预览：sandbox iframe 隔离渲染 */
.yh-preview-htmlwrap { height: 100%; overflow: auto; padding: 22px 26px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.yh-preview-html-toolbar { flex: none; display: flex; gap: 6px; }
.yh-preview-html { flex: 1; width: 100%; min-height: 100%; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.05); }
.yh-preview-htmlwrap.is-mobile .yh-preview-html { flex: none; width: min(390px, 100%); height: min(844px, calc(100% - 44px)); min-height: 560px; }

/* JSON 预览：格式化缩进 */
.yh-preview-json { margin: 0; padding: 22px 26px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; color: var(--text); }

/* 预览编辑态（保存后下载按新内容生成） */
.yh-preview-edit { width: 100%; height: 100%; box-sizing: border-box; resize: none; border: none; outline: none; padding: 20px 24px; background: transparent; color: var(--text); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; line-height: 1.75; }

/* 表格工具行：工作表标签 + 导出此表 */
.yh-preview-sheet-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px 0; }
.yh-preview-sheet-bar .yh-preview-tabs { padding: 0; flex: 1; min-width: 0; }
.yh-preview-sheet-name { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-preview-sheet-export { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 1px solid var(--border); border-radius: 7px; background: transparent; color: var(--text-muted); font-size: 12px; cursor: pointer; transition: background .14s ease, color .14s ease, transform .14s var(--ease-out); }
.yh-preview-sheet-export:hover { background: var(--bg-subtle); color: var(--text); }
.yh-preview-sheet-export:active { transform: scale(.95); }
.yh-preview-sheet-export:disabled { opacity: .5; cursor: default; }

/* 表格排序：列表头可点，升/降箭头 */
.yh-preview-th-sortable { cursor: pointer; user-select: none; }
.yh-preview-th-sortable:hover { color: var(--text); }
.yh-preview-th-sortable::after { content: '↕'; margin-left: 5px; font-size: 10px; opacity: 0; transition: opacity .14s ease; }
.yh-preview-th-sortable:hover::after { opacity: .45; }
.yh-preview-th-sortable.is-asc::after { content: '↑'; opacity: .8; }
.yh-preview-th-sortable.is-desc::after { content: '↓'; opacity: .8; }

/* 汇总行沉底加粗 + 与明细分隔 */
.yh-preview-grid tr.yh-row-summary td { font-weight: 600; border-top: 1px solid var(--border-strong); background: var(--bg-subtle); }

/* 单元格选中（深青淡染，点题色） */
.yh-preview-grid tbody td { cursor: cell; }
.yh-preview-grid tbody td.is-selected { background: color-mix(in srgb, var(--teal) 14%, transparent); box-shadow: inset 0 0 0 1.5px var(--teal); }
.yh-preview-rowpick { cursor: pointer; }
.yh-preview-rowpick:hover { color: var(--teal); }

/* 选中即算状态条（仿 Excel 状态栏，底部滑出） */
.yh-preview-sheet { position: relative; }
.yh-preview-stats { position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 8px); display: flex; align-items: center; gap: 16px; padding: 8px 16px; border-radius: 10px; background: var(--bg-window); border: 1px solid var(--border); box-shadow: 0 8px 28px rgba(0,0,0,.14); font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .24s var(--ease-out); }
.yh-preview-stats.is-visible { opacity: 1; transform: translate(-50%, 0); }
.yh-preview-stats em { font-style: normal; color: var(--text-faint); margin-right: 6px; }
.yh-preview-stats b { font-weight: 600; font-variant-numeric: tabular-nums; }
.yh-preview-stats-hint { color: var(--text-faint); font-size: 11px; }

/* 表格编辑（可编辑面板：双击单元格 / 双击列头重命名 / 增删行列） */
.yh-sheet-ops { flex: none; display: flex; align-items: center; gap: 5px; }
.yh-sheet-tool { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border: 1px solid var(--border); border-radius: 7px; background: transparent; color: var(--text-muted); font-size: 11.5px; white-space: nowrap; cursor: pointer; transition: background .14s ease, color .14s ease, transform .14s var(--ease-out), opacity .14s ease; }
.yh-sheet-tool:hover { background: var(--bg-subtle); color: var(--text); }
.yh-sheet-tool:active { transform: scale(.94); }
.yh-sheet-tool:disabled { opacity: .38; cursor: default; transform: none; }
.yh-sheet-hint { font-size: 11px; color: var(--text-faint); margin-left: 2px; white-space: nowrap; }
.yh-preview-sheet.is-editable .yh-preview-grid tbody tr:not(.yh-row-summary) td:hover:not(.is-selected):not(.is-editing) { box-shadow: inset 0 0 0 1px var(--border-strong); }
.yh-preview-grid td.is-editing, .yh-preview-grid th.is-editing { padding: 0; }
.yh-cell-input { width: 100%; height: 100%; min-width: 72px; box-sizing: border-box; border: none; outline: none; padding: 6px 10px; background: var(--bg-window); color: var(--text); font: inherit; font-size: 12.5px; box-shadow: inset 0 0 0 2px var(--teal); }

/* 公式栏（fx 栏：显示地址与公式原文，可直接编辑） */
.yh-fxbar { flex: none; display: flex; align-items: center; gap: 8px; margin: 10px 16px 0; padding: 0 10px; height: 32px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-subtle); }
.yh-fx-addr { flex: none; min-width: 42px; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--teal); font-variant-numeric: tabular-nums; }
.yh-fx-mark { flex: none; font-size: 10.5px; font-style: italic; font-weight: 700; color: var(--text-faint); border-left: 1px solid var(--border); padding-left: 8px; }
.yh-fx-input { flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; color: var(--text); font-size: 12.5px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.yh-fx-input:disabled { color: var(--text-muted); cursor: default; }
.yh-fx-input::placeholder { color: var(--text-faint); font-family: inherit; }

/* 公式单元格：角标色字 + 错误态 */
.yh-preview-grid tbody td.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.yh-preview-grid tbody td.is-formula { color: var(--teal); }
.yh-preview-grid tbody td.is-formula-error { color: var(--danger); font-size: 11.5px; }

/* 图表面板（数据随公式实时联动） */
.yh-sheet-chart { flex: none; margin: 12px 16px 0; padding: 12px 14px 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-window); animation: yh-preview-in .22s var(--ease-out) both; }
.yh-sheet-chart-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.yh-sheet-chart-select { height: 26px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-window); color: var(--text); font-size: 12px; padding: 0 6px; outline: none; }
.yh-sheet-chart-types { display: flex; gap: 5px; }
.yh-sheet-tool.is-active { background: var(--text); border-color: var(--text); color: var(--bg-window); }
.yh-sheet-chart-svg { width: 100%; overflow-x: auto; }
.yh-sheet-chart-svg svg { width: 100%; min-width: 480px; height: auto; display: block; }

/* AI 修改表格：输入条与预览横幅 */
.yh-sheet-ai { flex: none; display: flex; align-items: center; gap: 8px; height: 34px; margin: 10px 16px 0; padding: 0 5px 0 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-subtle); color: var(--text-faint); transition: border-color .16s ease, color .16s ease; }
.yh-sheet-ai:focus-within { border-color: var(--teal); color: var(--text-muted); }
.yh-sheet-ai-input { flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; color: var(--text); font-size: 12.5px; }
.yh-sheet-ai-input::placeholder { color: var(--text-faint); }
.yh-sheet-ai-send { flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 13px; border: none; border-radius: 6px; background: var(--text); color: var(--bg-window); font-size: 12px; font-weight: 500; cursor: pointer; transition: opacity .15s ease, transform .15s var(--ease-out); }
.yh-sheet-ai-send:hover { opacity: .86; }
.yh-sheet-ai-send:active { transform: scale(.95); }
.yh-sheet-ai-send:disabled { opacity: .4; cursor: default; transform: none; }
.yh-sheet-ai-banner { flex: none; display: flex; align-items: center; gap: 10px; margin: 10px 16px 0; padding: 6px 6px 6px 12px; border: 1px solid color-mix(in srgb, var(--teal) 45%, transparent); background: color-mix(in srgb, var(--teal) 7%, transparent); border-radius: 9px; font-size: 12.5px; color: var(--text); }
.yh-sheet-ai-state { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-sheet-ai-state svg { flex: none; color: var(--teal); }

/* 用户消息里的文件芯片 */
.yh-user-files { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; justify-content: flex-end; }
.yh-user-file { display: inline-flex; align-items: center; gap: 7px; max-width: 240px; height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 9px; background: var(--bg-window); color: var(--text); font-size: 12.5px; cursor: pointer; transition: background .14s ease, transform .14s var(--ease-out); }
.yh-user-file:hover { background: var(--bg-subtle); }
.yh-user-file:active { transform: scale(.96); }
.yh-user-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yh-user-file svg { flex: none; color: var(--text-muted); }

/* 生成文件卡片可点击 */
.yh-file-card-clickable { cursor: pointer; }
.yh-file-card-clickable:hover { background: var(--bg-subtle); }
.yh-file-card-clickable:active { transform: scale(.99); }
.yh-file-card-clickable:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* 定时任务页：左列任务列表 + 右侧详情/空态 */
.yh-tasks { flex: 1; display: flex; min-width: 0; min-height: 0; background: var(--bg-window); }
.yh-tasks-side { width: 264px; flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--border); padding: 14px 12px; }
.yh-tasks-head { display: flex; align-items: center; gap: 6px; padding: 0 2px 10px; }
.yh-tasks-head h1 { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.yh-tasks-new { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 9px; font-size: 13px; color: var(--text); transition: background-color .16s ease; }
.yh-tasks-new:hover { background: var(--bg-hover); }
.yh-tasks-new:active { transform: scale(.98); }
.yh-tasks-label { margin: 14px 10px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; color: var(--text-faint); }
.yh-tasks-scen { display: flex; flex-direction: column; gap: 2px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.yh-tasks-scen-btn { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; font-size: 12.5px; color: var(--text-muted); text-align: left; transition: background-color .15s ease, color .15s ease, transform .1s ease; }
.yh-tasks-scen-btn:hover { background: var(--bg-hover); color: var(--text); }
.yh-tasks-scen-btn:active { transform: scale(.98); }
.yh-tasks-scen-emoji { flex: none; font-size: 14px; line-height: 1; }
.yh-tasks-scen-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yh-tasks-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.yh-tasks-empty-side { padding: 4px 10px; font-size: 12.5px; color: var(--text-faint); }
.yh-task-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 10px; border-radius: 9px; text-align: left; transition: background-color .16s ease, transform .1s ease; }
.yh-task-item:hover { background: var(--bg-hover); }
.yh-task-item:active { transform: scale(.99); }
.yh-task-item.is-active { background: var(--bg-accent); }
.yh-task-item.is-paused { opacity: .55; }
.yh-task-item-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text); }
.yh-task-item-meta { font-size: 11.5px; color: var(--text-faint); }
.yh-tasks-main { flex: 1; display: flex; min-width: 0; overflow-y: auto; }
.yh-tasks-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 24px; text-align: center; color: var(--text-muted); animation: yh-fade-up .3s var(--ease-out) both; }
.yh-tasks-empty h2 { font-size: 17px; font-weight: 600; color: var(--text); }
.yh-tasks-empty p { font-size: 13px; color: var(--text-faint); margin-bottom: 8px; }
.yh-task-detail { width: 100%; max-width: 620px; margin: 0 auto; padding: 42px 32px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; animation: yh-fade-up .24s var(--ease-out) both; }
.yh-task-detail-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.yh-task-detail-head h2 { font-size: 20px; font-weight: 650; letter-spacing: .01em; }
.yh-task-detail-actions { display: flex; align-items: center; gap: 6px; }
.yh-task-detail-rows { width: 100%; display: flex; flex-direction: column; }
.yh-task-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.yh-task-detail-row span { color: var(--text-faint); }
.yh-task-detail-row b { font-weight: 500; color: var(--text); }
.yh-task-detail-prompt { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-hover); font-size: 13px; line-height: 1.7; color: var(--text); white-space: pre-wrap; user-select: text; }

/* 任务开关 */
.yh-switch { position: relative; width: 36px; height: 21px; flex: none; border-radius: 999px; background: var(--border-strong); transition: background-color .26s var(--ease-out); }
.yh-switch.is-on { background: var(--text); }
.yh-switch:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 18%, transparent); }
.yh-switch-knob { position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg-window); box-shadow: 0 1px 3px rgba(0, 0, 0, .28), 0 0 0 1px rgba(0, 0, 0, .04) inset; transition: transform .26s var(--ease-morph); }
.yh-switch.is-on .yh-switch-knob { transform: translateX(15px); }
.yh-switch:active .yh-switch-knob { width: 18px; transition: transform .26s var(--ease-morph), width .26s var(--ease-morph); }
.yh-switch:active.is-on .yh-switch-knob { transform: translateX(13px); }

/* 任务编辑器弹窗 */
.yh-task-editor { width: 440px; max-width: 100%; border: 1px solid var(--border); border-radius: 18px; background: var(--bg-window); box-shadow: var(--shadow-menu); outline: none; padding: 20px 22px 16px; animation: yh-fade-up .18s var(--ease-out); }
.yh-task-editor .yh-set-field select { width: 100%; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-window); padding: 8px 11px; font-size: 13px; outline: none; color: var(--text); transition: border-color .16s ease, box-shadow .16s ease; }
.yh-task-editor .yh-set-field select:focus { border-color: #141414; box-shadow: 0 0 0 3px rgba(0, 0, 0, .045); }
:root[data-theme='dark'] .yh-task-editor .yh-set-field select:focus { border-color: rgba(255, 255, 255, .4); box-shadow: 0 0 0 3px rgba(255, 255, 255, .07); }
.yh-task-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.yh-task-editor-grid .yh-set-field select,
.yh-task-editor-grid .yh-set-field input { width: 100%; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-window); padding: 8px 11px; font-size: 13px; outline: none; color: var(--text); transition: border-color .16s ease, box-shadow .16s ease; }
.yh-task-editor-grid .yh-set-field select:focus,
.yh-task-editor-grid .yh-set-field input:focus { border-color: #141414; box-shadow: 0 0 0 3px rgba(0, 0, 0, .045); }
:root[data-theme='dark'] .yh-task-editor-grid .yh-set-field select:focus,
:root[data-theme='dark'] .yh-task-editor-grid .yh-set-field input:focus { border-color: rgba(255, 255, 255, .4); box-shadow: 0 0 0 3px rgba(255, 255, 255, .07); }
.yh-task-editor-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
@media (max-width: 700px) {
  .yh-tasks-side { width: 200px; }
  .yh-task-editor-grid { grid-template-columns: 1fr; }
}

/* 对话内查找条（Ctrl+F）：消息区顶部右侧悬浮 */
.yh-find { position: absolute; top: 12px; right: 18px; z-index: 40; display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 6px 0 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-window); box-shadow: 0 6px 20px rgba(0, 0, 0, .07); color: var(--text-muted); animation: yh-menu-pop .18s var(--ease-out) both; }
:root[data-theme='dark'] .yh-find { border-color: rgba(255, 255, 255, .07); box-shadow: 0 6px 20px rgba(0, 0, 0, .22); }
.yh-find > svg { flex: none; }
.yh-find-input { width: 168px; height: 100%; border: none; outline: none; background: transparent; color: var(--text); font-size: 13px; padding: 0 2px; }
.yh-find-input::placeholder { color: var(--text-faint); }
.yh-find-count { flex: none; min-width: 44px; text-align: center; font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.yh-find .yh-icon-btn { width: 27px; height: 27px; }
.yh-find .yh-icon-btn:disabled { opacity: .35; }

/* 查找命中高亮（CSS Custom Highlight API，不改动 DOM） */
::highlight(yh-find) { background: color-mix(in srgb, var(--teal) 26%, transparent); color: inherit; border-radius: 2px; }
::highlight(yh-find-current) { background: var(--teal); color: #fff; border-radius: 2px; }

/* 联网搜索来源芯片 */
.yh-msg-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 10px; }
.yh-msg-sources-label { font-size: 11.5px; color: var(--text-faint); margin-right: 1px; }
.yh-source-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; height: 26px; padding: 0 10px 0 5px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-window); color: var(--text-muted); font-size: 12px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .14s ease, color .14s ease, transform .14s var(--ease-out); }
.yh-source-chip:hover { background: var(--bg-subtle); color: var(--text); }
.yh-source-chip:active { transform: scale(.96); }
.yh-source-num { flex: none; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; background: var(--bg-accent); color: var(--text-muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.yh-source-chip:hover .yh-source-num { color: var(--text); }

/* ---------- Codex 工作目录控件 ---------- */
/* Composer 工具行：工作目录控件（与批准控件同一设计语言） */
.yh-workdir { position: relative; }
/* 圆形图标按钮（与 + / 麦克风 同族），无文字无箭头 */
.yh-workdir-chip {
  position: relative; width: 34px; height: 34px; display: inline-grid; place-items: center;
  border-radius: 50%; color: var(--text-muted); background: transparent; border: 0;
  transition: background-color .4s cubic-bezier(0.175,0.885,0.32,1.275), color .2s ease, transform .4s cubic-bezier(0.175,0.885,0.32,1.275);
}
.yh-workdir-chip:hover, .yh-workdir-chip.is-open { background: var(--bg-hover); color: var(--text); transform: translateY(-1px); }
.yh-workdir-chip:active { transform: translateY(0) scale(.97); transition-duration: .1s; }
.yh-workdir-chip:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.yh-workdir-chip-icon { transition: transform .25s var(--ease-out), color .2s var(--ease-out); }
.yh-workdir-chip:hover .yh-workdir-chip-icon { transform: scale(1.08); }
/* 已授权：图标转墨色 + 右下角状态点 */
.yh-workdir-chip.is-granted { color: var(--text); }
.yh-workdir-chip-dot { position: absolute; right: 6px; bottom: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--composer-glass); }
/* 未选择：弱化灰，hover 才显形 */
.yh-workdir-chip.is-empty { color: var(--text-faint); }
.yh-workdir-chip.is-empty:hover, .yh-workdir-chip.is-empty.is-open { color: var(--text); }

.yh-workdir-menu {
  position: absolute; bottom: calc(100% + 10px); left: 0; width: 344px; max-width: calc(100vw - 24px);
  padding: 6px; border: 1px solid var(--border); border-radius: 16px;
  background: color-mix(in srgb, var(--bg-window) 88%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: 0 20px 56px -18px rgb(0 0 0 / .3), 0 6px 18px -6px rgb(0 0 0 / .12);
  z-index: 80; transform-origin: 12px 100%; animation: yh-menu-pop .28s var(--ease-morph) both;
  overflow: hidden;
}
.yh-workdir-head { position: relative; z-index: 1; display: flex; align-items: center; margin: 0 0 2px; padding: 10px 12px 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: var(--text-muted); }
.yh-workdir-tag { margin-left: auto; flex: none; font-size: 10.5px; font-weight: 500; padding: 2.5px 8px; border-radius: 999px; background: var(--bg-subtle); color: var(--text-faint); }
/* 路径展示：父级弱化 + 末段强调，一键复制 */
.yh-workdir-path { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 6px; margin: 2px 3px 6px; padding: 8px 9px 8px 11px; border-radius: 10px; background: var(--bg-subtle); }
.yh-workdir-path-text { flex: 1; min-width: 0; margin: 0; font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: 11.5px; line-height: 1.7; word-break: break-all; color: var(--text-faint); }
.yh-workdir-path-text .yh-workdir-base { font-size: 12.5px; font-weight: 600; color: var(--text); }
.yh-workdir-copy { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 2px; border-radius: 8px; color: var(--text-faint); transition: background-color .14s ease, color .14s ease, transform .12s var(--ease-out); }
.yh-workdir-copy:hover { background: var(--bg-hover); color: var(--text); }
.yh-workdir-copy:active { transform: scale(.9); }
.yh-workdir-copy.is-copied { color: var(--text); }
.yh-workdir-list { display: flex; flex-direction: column; gap: 2px; }
.yh-workdir-list, .yh-workdir-foot { position: relative; z-index: 1; }
.yh-workdir-row {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 12px; border: 1px solid transparent; text-align: left;
  transition: background-color .16s var(--ease-out), border-color .16s var(--ease-out);
  animation: yh-option-in .32s var(--ease-out) both;
}
.yh-workdir-row:hover { background: var(--bg-hover); }
.yh-workdir-row:disabled { opacity: .55; }
.yh-workdir-row-icon { flex: none; color: var(--text-faint); transition: color .16s var(--ease-out), transform .25s var(--ease-out); }
.yh-workdir-row:hover .yh-workdir-row-icon { color: var(--text); transform: scale(1.08); }
.yh-workdir-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.yh-workdir-text strong { font-size: 13.5px; font-weight: 600; color: var(--text); }
.yh-workdir-text small { font-size: 12px; line-height: 1.55; color: var(--text-muted); }
.yh-workdir-foot { margin-top: 2px; padding: 7px 12px 6px; font-size: 11px; line-height: 1.5; color: var(--text-faint); }

/* ---------- Agent 工具调用（行内艺术排版，无卡片） ---------- */
.yh-tool-list { display: flex; flex-direction: column; gap: 1px; margin: 10px 0 6px; max-width: 660px; }
/* 行内工具条：无背景无边框，读起来像一行注释；运行中底部流动光带 */
.yh-tool-card { position: relative; border: 0; border-radius: 0; background: transparent; overflow: visible; animation: yh-fade-up .2s var(--ease-out) both; }
/* 运行中/待批准：底部极光流光带——深青彗尾 + 柔光晕，运行时才显形 */
.yh-tool-card.is-running::after,
.yh-tool-card.is-awaiting::after {
  content: ''; position: absolute; left: 2px; right: 22%; bottom: -1px; height: 1.5px;
  background: linear-gradient(90deg, transparent 0%, var(--rail) 50%, transparent 100%);
  background-size: 220% 100%;
  animation: yh-tool-flow 2.8s linear infinite;
  border-radius: 2px;
  pointer-events: none;
}
.yh-tool-card.is-running .yh-tool-spinner { border-top-color: var(--teal-accent); }
@keyframes yh-tool-flow {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
/* 已完成的纯桌面操控步骤（截图/点击/输入等）：收敛为低调单行，进一步降噪 */
.yh-tool-card.is-quiet { animation: none; }
.yh-tool-card.is-quiet .yh-tool-toggle { padding: 2px 10px; gap: 7px; }
.yh-tool-card.is-quiet .yh-tool-icon { color: var(--text-faint); opacity: .7; }
.yh-tool-card.is-quiet .yh-tool-name { font-size: 12px; font-weight: 500; color: var(--text-faint); }
.yh-tool-card.is-quiet .yh-tool-status { font-size: 0; gap: 0; }
.yh-tool-card.is-quiet .yh-tool-status svg { width: 10px; height: 10px; }
.yh-tool-card.is-quiet .yh-tool-target { font-size: 11.5px; color: var(--text-faint); opacity: .8; }
.yh-tool-card.is-quiet:hover .yh-tool-name,
.yh-tool-card.is-quiet:hover .yh-tool-target { color: var(--text-muted); opacity: 1; }
/* ---------- task_plan 进度清单：最新计划卡常驻展开，低调勾选样式 ---------- */
.yh-tool-plan { display: flex; flex-direction: column; gap: 1px; margin: 2px 10px 8px 18px; padding: 2px 0 2px 14px; border-left: 1px solid var(--border); }
.yh-tool-plan-step { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); animation: yh-fade-up .2s var(--ease-out) both; }
.yh-tool-plan-dot { flex: none; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--border-strong); color: transparent; }
.yh-tool-plan-step.is-done .yh-tool-plan-dot { border-color: var(--text-faint); color: var(--text-faint); }
.yh-tool-plan-step.is-done .yh-tool-plan-title { color: var(--text-faint); }
.yh-tool-plan-step.is-doing { color: var(--text); }
.yh-tool-plan-step.is-doing .yh-tool-plan-dot { border-color: var(--text-muted); }
.yh-tool-plan-step.is-doing .yh-tool-spinner { width: 8px; height: 8px; }
.yh-tool-plan-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ---------- 交付态：过程折叠 + 交付文件卡 ---------- */
.yh-process-wrap { margin: 0 0 10px; max-width: 660px; }
.yh-process-head { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px; border-radius: 7px; font-size: 12px; color: var(--text-faint); transition: background-color .14s ease, color .14s ease; }
.yh-process-head:hover { background: color-mix(in srgb, var(--bg-hover) 55%, transparent); color: var(--text-muted); }
.yh-process-caret { transition: transform .28s var(--ease-out); transform: rotate(-90deg); }
.yh-process-head[aria-expanded='true'] .yh-process-caret { transform: rotate(0deg); }
.yh-process-title { font-weight: 550; }
.yh-process-count { font-size: 11px; color: var(--text-faint); }
.yh-process-body { padding: 2px 0 6px; }
.yh-process-wrap.is-running .yh-process-head { color: var(--text-muted); }
.yh-progress-list { display: flex; flex-direction: column; gap: 7px; margin: 5px 0 9px; max-width: 620px; }
.yh-progress-update { display: grid; grid-template-columns: 8px minmax(0, 1fr); align-items: start; gap: 8px; color: var(--text-faint); font-size: 12.5px; line-height: 1.65; }
.yh-progress-dot { width: 5px; height: 5px; margin-top: .62em; border-radius: 50%; background: currentColor; opacity: .5; }
.yh-progress-update.is-current { color: var(--text-muted); }
.yh-progress-update.is-current .yh-progress-dot { opacity: .9; animation: yh-progress-pulse 1.4s ease-in-out infinite; }
@keyframes yh-progress-pulse { 0%, 100% { transform: scale(.75); opacity: .45; } 50% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .yh-collapse, .yh-process-caret { transition: none; }
  .yh-progress-update.is-current .yh-progress-dot { animation: none; }
}
.yh-deliver-card { max-width: 660px; margin: 12px 0 4px; border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--bg-window) 65%, transparent); overflow: hidden; animation: yh-fade-up .24s var(--ease-out) both; }
.yh-deliver-head { display: flex; align-items: center; gap: 7px; padding: 9px 14px; font-size: 12.5px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); }
.yh-deliver-head svg { color: var(--text-muted); flex: none; }
.yh-deliver-list { padding: 6px 8px; display: flex; flex-direction: column; }
.yh-deliver-item { padding: 4px 8px; font-family: var(--mono); font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 6px; transition: background-color .14s ease, color .14s ease; }
.yh-deliver-item:hover { background: var(--bg-hover); color: var(--text); }
.yh-deliver-file { display: flex; align-items: center; gap: 8px; }
.yh-deliver-path { flex: 1; min-width: 0; }
.yh-deliver-stats { color: var(--text-faint); font: 10px var(--mono); }
.yh-deliver-acts { display: flex; align-items: center; gap: 5px; }
.yh-deliver-act { flex: none; padding: 3px 7px; border: 1px solid var(--border); border-radius: 5px; color: var(--text-muted); font-size: 10px; }
.yh-deliver-act:hover { background: var(--bg-hover); color: var(--text); }
.yh-deliver-diff { max-height: 280px; overflow: auto; margin: 3px 0 8px; padding: 8px 10px; border-radius: 7px; background: var(--bg-subtle); font: 10.5px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.yh-deliver-diff .is-add { color: #16803c; }
.yh-deliver-diff .is-del { color: #c0392b; }
.yh-regen-wrap { position: relative; display: inline-flex; align-items: center; }
.yh-act-regen-caret { width: 16px; padding: 0 1px; margin-left: -3px; opacity: .65; }
.yh-act-regen-caret:hover { opacity: 1; }
.yh-regen-menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 30; min-width: 220px; max-height: 360px; overflow: auto; }
.yh-regen-vendor { padding: 5px 0; }
.yh-regen-vendor-name { padding: 4px 10px; color: var(--text-faint); font-size: 10px; }
.yh-regen-model { display: block; width: 100%; padding: 6px 10px; text-align: left; font-size: 11px; }
.yh-regen-model:hover { background: var(--bg-hover); }
.yh-regen-sep { height: 1px; margin: 5px 0; background: var(--border); }
.yh-artifact-version-wrap { margin: 5px 0 12px; }
.yh-artifact-versions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 2px; color: var(--text-faint); font-size: 10px; }
.yh-artifact-compare { flex: 1 0 100%; max-height: 240px; overflow: auto; margin: 4px 0; padding: 8px 10px; border-radius: 7px; background: var(--bg-subtle); color: var(--text); font: 10.5px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.yh-tool-body .yh-tool-charts.is-vision { padding: 0; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.yh-tool-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; text-align: left; border-radius: 7px; transition: background-color .14s ease; }
.yh-tool-toggle:not(:disabled):hover { background: color-mix(in srgb, var(--bg-hover) 55%, transparent); }
.yh-tool-toggle:not(:disabled):active { background: var(--bg-hover); }
.yh-tool-toggle:disabled { cursor: default; }
.yh-tool-caret { color: var(--text-faint); transition: transform .18s ease; }
/* 图标不戴底衬，只留字形本身 */
.yh-tool-icon { flex: none; display: grid; place-items: center; width: 18px; height: 18px; color: var(--text-muted); }
.yh-tool-card.is-error .yh-tool-icon { color: var(--text-muted); }
.yh-tool-name { flex: none; font-size: 13px; font-weight: 500; color: var(--text); letter-spacing: .01em; }
.yh-tool-flag { flex: none; font-size: 10.5px; line-height: 1; color: var(--text-faint); background: var(--bg-subtle); padding: 3px 6px; border-radius: 5px; }
.yh-tool-flag.is-muted { color: var(--text-faint); background: transparent; padding: 3px 0; }
/* 状态：右对齐小字，成功与错误都只用文字色彩区分，不铺底色 */
.yh-tool-status { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.yh-tool-status-done { color: var(--text-faint); }
.yh-tool-status-running { color: var(--text-muted); }
.yh-tool-status-error { color: var(--danger); }
.yh-tool-spinner { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--border-strong); border-top-color: var(--text-muted); animation: yh-spin .7s linear infinite; }
@keyframes yh-spin { to { transform: rotate(360deg); } }
.yh-tool-summary { padding: 0 12px 7px 36px; min-width: 0; }
.yh-tool-target { display: block; min-width: 0; font-family: var(--mono); font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 展开的输出：不装盒子，一条细竖线作引导，输出如引文 */
.yh-tool-body { display: flex; flex-direction: column; gap: 8px; margin: 2px 10px 10px 18px; padding: 2px 0 2px 14px; background: transparent; border-left: 1px solid var(--border); }
.yh-tool-output { margin: 0; max-height: 260px; overflow: auto; font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--text-muted); white-space: pre-wrap; word-break: break-word; }
.yh-tool-card.is-error .yh-tool-output { color: var(--text-muted); }
.yh-tool-approve { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.yh-tool-approve-hint { font-size: 12.5px; color: var(--text-muted); }
/* write_file 审批 diff 对比 */
.yh-tool-diff { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 11.5px; line-height: 1.55; border: 1px solid var(--border); border-radius: 8px; overflow: auto; max-height: 280px; background: var(--bg-subtle); }
.yh-tool-diff-line { padding: 0 10px; white-space: pre; min-width: max-content; }
.yh-tool-diff-line.is-add { background: rgba(22, 163, 74, .1); color: var(--text); }
.yh-tool-diff-line.is-add::first-letter { color: #16a34a; font-weight: 600; }
.yh-tool-diff-line.is-del { background: rgba(220, 38, 38, .09); color: var(--text-muted); }
.yh-tool-diff-line.is-del::first-letter { color: #dc2626; font-weight: 600; }
.yh-tool-diff-line.is-ctx { color: var(--text-faint); }
.yh-tool-diff-line.is-fold { color: var(--text-faint); font-size: 10.5px; padding: 2px 10px; }
.yh-tool-approve-actions { display: flex; gap: 8px; margin-left: auto; }
.yh-tool-deny, .yh-tool-allow { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 6px 14px; border-radius: 9px; transition: background-color .14s ease, color .14s ease, transform .12s var(--ease-out); }
.yh-tool-deny { border: 1px solid var(--border-strong); color: var(--text-muted); background: var(--bg-window); }
.yh-tool-deny:hover { background: var(--bg-hover); color: var(--text); }
.yh-tool-allow { background: var(--accent); color: var(--accent-contrast); }
.yh-tool-allow:hover { opacity: .86; background: var(--accent); }
.yh-tool-deny:active, .yh-tool-allow:active { transform: scale(.96); }

/* Python 分析图表 */
.yh-tool-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; padding: 2px 12px 10px 36px; }
.yh-tool-videos { display: grid; gap: 8px; padding: 2px 12px 10px 36px; }
.yh-tool-video { width: 100%; max-width: 520px; border-radius: 2px; background: #000; display: block; }
.yh-tool-chart { padding: 0; border: 1px solid var(--border); border-radius: 2px; background: var(--bg-window); overflow: hidden; cursor: zoom-in; transition: border-color .16s ease, transform .16s var(--ease-out); }
.yh-tool-chart:hover { border-color: var(--border-strong); }
.yh-tool-chart:active { transform: scale(.99); }
.yh-tool-chart img { display: block; width: 100%; height: auto; }
.yh-tool-chart-wrap { position: relative; min-width: 0; }
.yh-tool-chart-wrap .yh-tool-chart { width: 100%; }
.yh-tool-chart-dl {
  position: absolute; right: 6px; bottom: 6px; display: grid; place-items: center;
  width: 26px; height: 26px; padding: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 2px;
  background: rgba(0,0,0,.52); color: #fff; cursor: pointer;
  opacity: 0; transition: opacity .16s ease, background .16s ease;
  backdrop-filter: blur(4px);
}
.yh-tool-chart-wrap:hover .yh-tool-chart-dl,
.yh-tool-chart-dl:focus-visible { opacity: 1; }
.yh-tool-chart-dl:hover { background: rgba(0,0,0,.74); }
.yh-tool-chart-dl:active { transform: scale(.94); }
.yh-tool-charts.is-generated {
  grid-template-columns: repeat(auto-fill, minmax(154px, 184px));
  gap: 12px; align-items: start;
}
.yh-tool-charts.is-generated .yh-tool-chart-wrap { width: 100%; }
.yh-tool-charts.is-generated .yh-tool-chart {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1;
  border-radius: 5px; background: var(--bg-subtle);
}
.yh-tool-charts.is-generated .yh-tool-chart img {
  width: 100%; height: 100%; max-height: 184px; object-fit: contain; image-rendering: auto;
}
.yh-tool-charts.is-generated .yh-tool-chart-actions {
  position: static; align-items: center; justify-content: flex-end; gap: 2px;
  height: 34px; padding: 2px 0;
}
.yh-tool-chart-label {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; color: var(--text-muted);
}
.yh-tool-charts.is-generated .yh-tool-chart-dl {
  position: static; width: 30px; height: 30px; flex: none;
  opacity: 1; color: var(--text-muted); background: transparent; border: 0; border-radius: 5px;
  backdrop-filter: none;
}
.yh-tool-charts.is-generated .yh-tool-chart-dl:hover,
.yh-tool-charts.is-generated .yh-tool-chart-dl:focus-visible {
  background: var(--bg-hover); color: var(--text);
}
@media (max-width: 420px) {
  .yh-tool-charts.is-generated { grid-template-columns: repeat(auto-fill, minmax(128px, 160px)); }
}
.yh-tool-chart.is-pending {
  aspect-ratio: 1; display: grid; place-items: center; cursor: default;
  border: 1px solid var(--border);
  background: linear-gradient(110deg, var(--bg-window) 30%, rgba(128,128,128,.13) 46%, var(--bg-window) 62%);
  background-size: 220% 100%;
  animation: yh-chart-pending 1.7s linear infinite;
}
.yh-tool-chart-pending-text { font-size: 11.5px; color: var(--text-faint); letter-spacing: .04em; }
@keyframes yh-chart-pending { to { background-position-x: -220%; } }
.yh-chart-lightbox { position: fixed; inset: 0; z-index: 180; display: grid; place-items: center; padding: 48px; background: rgba(0,0,0,.72); backdrop-filter: blur(6px); animation: yh-fade .16s ease both; cursor: zoom-out; -webkit-app-region: no-drag; }
.yh-chart-lightbox img { max-width: 100%; max-height: 100%; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 24px 80px rgba(0,0,0,.5); cursor: default; }
@keyframes yh-fade { from { opacity: 0; } to { opacity: 1; } }

/* 沙盒交付文件（/vora_out 产物）：点击即保存 */
.yh-tool-files { display: flex; flex-direction: column; gap: 6px; padding: 2px 12px 10px 36px; }
.yh-tool-file {
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 420px; text-align: left;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: color-mix(in srgb, var(--bg) 60%, transparent); cursor: pointer;
  animation: yh-fade-up .3s var(--ease-out) both;
  transition: border-color .18s var(--ease-out), background .18s var(--ease-out), transform .12s var(--ease-out), box-shadow .18s var(--ease-out);
}
.yh-tool-file:hover { border-color: color-mix(in srgb, var(--text) 40%, transparent); background: var(--bg-hover); transform: translateY(-1px); box-shadow: 0 3px 12px rgba(0,0,0,.05); }
.yh-tool-file:active { transform: scale(.985); }
.yh-tool-file-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 7px; color: var(--text-muted); background: var(--bg-window); }
.yh-tool-file-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.yh-tool-file-name { font-size: 12.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yh-tool-file-size { font-size: 10.5px; color: var(--text-faint); }
.yh-tool-file-dl { flex: none; display: grid; place-items: center; color: var(--text-faint); opacity: 0; transform: translateX(-3px); transition: opacity .18s var(--ease-out), transform .18s var(--ease-out); }
.yh-tool-file:hover .yh-tool-file-dl { opacity: 1; transform: none; }

/* ---------- 图片灯箱（ImageLightbox） ---------- */
/* 必须 -webkit-app-region: no-drag：灯箱盖住自定义标题栏的 drag 拖拽带，
   Electron 的拖拽区会穿透普通浮层，不声明 no-drag 时点顶部工具栏（含叉叉）会变成拖窗口 */
.yh-lb-overlay { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 56px 72px;
  background: rgba(8,8,9,.82); backdrop-filter: blur(14px) saturate(1.1);
  opacity: 0; transition: opacity .26s ease; cursor: zoom-out; user-select: none; -webkit-app-region: no-drag; }
.yh-lb-overlay.is-in { opacity: 1; }
.yh-lb-img { max-width: calc(100vw - 144px); max-height: calc(100vh - 128px); border-radius: 6px;
  box-shadow: 0 32px 120px rgba(0,0,0,.62), 0 0 0 1px rgba(255,255,255,.10);
  opacity: 0; transform-origin: center center; will-change: transform;
  transform: scale(.94) translateY(10px);
  transition: opacity .3s ease, transform .42s cubic-bezier(.16,1,.3,1);
  image-rendering: auto; touch-action: none; }
.yh-lb-img.is-in { opacity: 1; transform: scale(1) translateY(0); }
.yh-lb-img.is-zoomed { transition: transform .12s ease-out; border-radius: 4px; }
.yh-lb-top { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; opacity: 0; transition: opacity .3s ease .12s; }
.yh-lb-overlay.is-in .yh-lb-top { opacity: 1; }
.yh-lb-counter { font-size: 12px; letter-spacing: .04em; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; }
.yh-lb-tools { display: flex; align-items: center; gap: 2px; padding: 4px;
  background: rgba(22,22,24,.62); border: 1px solid rgba(255,255,255,.12); border-radius: 12px;
  backdrop-filter: blur(12px); box-shadow: 0 8px 32px rgba(0,0,0,.35); }
.yh-lb-btn { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: none; border-radius: 8px;
  background: none; color: rgba(255,255,255,.72); cursor: pointer;
  transition: background .14s ease, color .14s ease, transform .14s var(--ease-out); }
.yh-lb-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.yh-lb-btn:active { transform: scale(.88); }
.yh-lb-zoom-num { font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: .02em; min-width: 38px; text-align: center; }
.yh-lb-sep { width: 1px; height: 16px; background: rgba(255,255,255,.14); margin: 0 3px; }
.yh-lb-arrow { position: absolute; top: 50%; transform: translateY(-50%) scale(.92); width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 999px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(22,22,24,.5); color: rgba(255,255,255,.78); backdrop-filter: blur(10px); cursor: pointer;
  opacity: 0; transition: opacity .28s ease .14s, transform .18s var(--ease-out), background .16s ease, color .16s ease; }
.yh-lb-overlay.is-in .yh-lb-arrow { opacity: 1; transform: translateY(-50%) scale(1); }
.yh-lb-arrow:hover { background: rgba(255,255,255,.14); color: #fff; }
.yh-lb-arrow:active { transform: translateY(-50%) scale(.9); }
.yh-lb-arrow.is-prev { left: 26px; }
.yh-lb-arrow.is-next { right: 26px; }
@media (max-width: 720px) {
  .yh-lb-overlay { padding: 40px 14px; }
  .yh-lb-img { max-width: calc(100vw - 28px); max-height: calc(100vh - 80px); }
  .yh-lb-arrow.is-prev { left: 8px; } .yh-lb-arrow.is-next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .yh-lb-img, .yh-lb-top, .yh-lb-arrow { transition: none; }
}

/* 媒体结果图片的操作簇：用作参考图 / 复制 / 下载 */
.yh-tool-chart-actions { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.yh-tool-chart-actions .yh-tool-chart-dl { position: static; }
/* 视频结果：悬浮下载按钮 */
.yh-tool-video-wrap { position: relative; max-width: 520px; }
.yh-tool-video-wrap .yh-tool-video { width: 100%; }
.yh-tool-video-dl { top: 6px; right: 6px; bottom: auto; }
.yh-tool-video-wrap:hover .yh-tool-video-dl,
.yh-tool-video-dl:focus-visible { opacity: 1; }
/* 媒体生成失败后的按原方案一键重试 */
.yh-tool-retry-row { padding: 0 12px 8px 36px; }
.yh-tool-retry { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; font-size: 11.5px; border: 1px solid var(--border); border-radius: 2px; background: transparent; color: var(--text-muted); cursor: pointer; transition: color .14s ease, border-color .14s ease, background-color .14s ease; }
.yh-tool-retry:hover { color: var(--text); border-color: var(--border-strong); background: color-mix(in srgb, var(--bg-hover) 55%, transparent); }
.yh-tool-retry:active { transform: scale(.97); }
.yh-tool-retry.is-cancel { color: var(--text-faint); }
.yh-mplan:focus { outline: none; }

/* ---------- 媒体生成方案卡（云端导演：编辑式排版 + 规格表参数行） ---------- */
.yh-tool-card.is-planning .yh-tool-toggle { cursor: default; }
.yh-mplan {
  position: relative;
  margin: 8px 0 6px; width: 100%; max-width: 660px;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--bg); padding: 22px 24px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 28px rgba(0,0,0,.05);
  animation: yh-mplan-in .42s var(--ease-morph) both;
}
@keyframes yh-mplan-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 头部：编辑式眉题 + 标题 */
.yh-mplan-head { display: flex; align-items: center; gap: 12px; }
.yh-mplan-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--text); color: var(--bg); flex: none; }
.yh-mplan-head-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.yh-mplan-eyebrow { font-size: 9.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--text-faint); }
.yh-mplan-title { font-size: 15.5px; font-weight: 650; letter-spacing: .01em; line-height: 1.2; }
.yh-mplan-src { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: .04em; color: var(--text-faint); }
.yh-mplan-src-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-faint); opacity: .7; }
.yh-mplan-close { display: grid; place-items: center; width: 26px; height: 26px; border: none; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; transition: background .15s, color .15s, transform .15s var(--ease-out); }
.yh-mplan-close:hover { background: var(--bg-hover); color: var(--text); }
.yh-mplan-close:active { transform: scale(.92); }

/* 导演构思区：纸面质感内卡 */
.yh-mplan-director { margin-top: 16px; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 12px; background: var(--bg-subtle); }
.yh-mplan-dir-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.yh-mplan-style { font-size: 11px; font-weight: 600; letter-spacing: .04em; padding: 3px 10px; border-radius: 999px; background: var(--text); color: var(--bg); }
.yh-mplan-tag { font-size: 11px; padding: 3px 10px; border-radius: 999px; background: transparent; border: 1px solid var(--border); color: var(--text-faint); }
.yh-mplan-note { margin: 9px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* 视频导演分镜脚本 */
.yh-shots { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.yh-shots-list { display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow-y: auto; }
.yh-shot { display: flex; gap: 9px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-hover); }
.yh-shot-num { flex: none; align-self: flex-start; min-width: 30px; text-align: center; font-size: 11px; font-weight: 700; color: var(--teal, var(--text)); padding: 2px 4px; border-radius: 6px; background: color-mix(in srgb, var(--teal) 12%, transparent); }
.yh-shot-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.yh-shot-scene { font-size: 12.5px; line-height: 1.55; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.yh-shot-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-faint); }
.yh-mplan-prompt {
  display: block; width: 100%; margin-top: 10px; padding: 12px 14px; resize: vertical; min-height: 132px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
  font: inherit; font-size: 13.5px; line-height: 1.7; color: var(--text);
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.yh-mplan-prompt:focus { outline: none; border-color: color-mix(in srgb, var(--text) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 6%, transparent); }
.yh-mplan-prompt::placeholder { color: var(--text-faint); }
.yh-mplan-neg {
  display: block; width: 100%; margin-top: 8px; padding: 9px 14px; resize: vertical; min-height: 52px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
  font: inherit; font-size: 12.5px; line-height: 1.6; color: var(--text);
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.yh-mplan-neg:focus { outline: none; border-color: color-mix(in srgb, var(--text) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 6%, transparent); }
.yh-mplan-neg::placeholder { color: var(--text-faint); }
.yh-mplan-dir-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.yh-mplan-link { display: inline-flex; align-items: center; gap: 5px; border: none; background: none; padding: 0; font: inherit; font-size: 12.5px; color: var(--text-muted); cursor: pointer; transition: color .15s; }
.yh-mplan-link:hover:not(:disabled) { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.yh-mplan-link:disabled { cursor: default; color: var(--text-faint); }
.yh-mplan-link svg.is-spinning { animation: yh-mplan-spin .9s linear infinite; }
@keyframes yh-mplan-spin { to { transform: rotate(360deg); } }
.yh-mplan-ref { margin: 9px 0 0; font-size: 12.5px; color: var(--text-faint); }

/* 参数规格表：左标签右控件，发丝线分行 */
.yh-mplan-grid { margin-top: 6px; display: flex; flex-direction: column; }
.yh-mplan-section { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid var(--border); }
.yh-mplan-grid .yh-mplan-section:first-child { border-top: none; }
.yh-mplan-label { font-size: 11px; font-weight: 600; color: var(--text-faint); letter-spacing: .08em; padding-top: 7px; }

/* 模型选择 */
.yh-mplan-models { display: flex; flex-wrap: wrap; gap: 8px; }
.yh-mplan-model {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: transparent; font-size: 13px; color: var(--text);
  cursor: pointer; transition: border-color .18s var(--ease-out), background .18s var(--ease-out), transform .12s var(--ease-out);
}
.yh-mplan-model:hover { background: var(--bg-hover); }
.yh-mplan-model:active { transform: scale(.97); }
.yh-mplan-model.is-active { border-color: color-mix(in srgb, var(--text) 70%, transparent); background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); font-weight: 600; }
.yh-mplan-reco { font-size: 10px; font-weight: 600; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); }
.yh-mplan-model.is-active .yh-mplan-reco { background: var(--text); border-color: var(--text); color: var(--bg); }

/* 画幅选择 */
.yh-mplan-ratios { display: flex; flex-wrap: wrap; gap: 8px; }
.yh-mplan-ratio {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px;
  min-width: 58px; padding: 10px 9px 7px;
  border: 1px solid var(--border); border-radius: 10px;
  background: transparent; font-size: 11.5px; color: var(--text-muted);
  cursor: pointer; transition: border-color .18s var(--ease-out), background .18s var(--ease-out), color .18s, transform .12s var(--ease-out);
}
.yh-mplan-ratio:hover { background: var(--bg-hover); }
.yh-mplan-ratio:active { transform: scale(.96); }
.yh-mplan-ratio.is-active { border-color: color-mix(in srgb, var(--text) 70%, transparent); background: color-mix(in srgb, var(--text) 4%, transparent); color: var(--text); font-weight: 600; }
.yh-mplan-ratio-shape { height: 26px; max-width: 100%; border: 1.5px solid currentColor; border-radius: 4px; background: transparent; opacity: .45; transition: opacity .18s; }
.yh-mplan-ratio.is-active .yh-mplan-ratio-shape { opacity: 1; }

/* 通用 pills（张数/清晰度/时长） */
.yh-mplan-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.yh-mplan-pill { padding: 7px 18px; border: 1px solid var(--border); border-radius: 999px; background: transparent; font-size: 13px; color: var(--text); cursor: pointer; transition: border-color .18s var(--ease-out), background .18s var(--ease-out), color .18s, transform .12s var(--ease-out); }
.yh-mplan-pill:hover { background: var(--bg-hover); }
.yh-mplan-pill:active { transform: scale(.96); }
.yh-mplan-pill.is-active { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }

/* 声音开关 */
.yh-mplan-switch { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; border: none; background: transparent; padding: 0; font: inherit; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.yh-mplan-switch-knob { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--bg-subtle); border: 1px solid var(--border); transition: background .2s var(--ease-out), border-color .2s var(--ease-out); flex: none; }
.yh-mplan-switch-knob::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-muted); transition: transform .22s var(--ease-out), background .2s; }
.yh-mplan-switch.is-on .yh-mplan-switch-knob { background: var(--text); border-color: var(--text); }
.yh-mplan-switch.is-on .yh-mplan-switch-knob::after { transform: translateX(16px); background: var(--bg); }
.yh-mplan-switch.is-on { color: var(--text); }

/* 底部：摘要 + 生成按钮 */
.yh-mplan-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; padding-top: 16px; border-top: 1px solid var(--border); }
.yh-mplan-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; }
.yh-mplan-sep { color: var(--text-faint); }
.yh-mplan-eta { margin-left: 8px; font-size: 11.5px; color: var(--text-faint); }
.yh-mplan-go {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 26px; border: none; border-radius: 10px;
  background: var(--text); color: var(--bg);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform .15s var(--ease-out), box-shadow .2s var(--ease-out), opacity .15s;
  flex: none;
}
.yh-mplan-go:hover { transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--text) 22%, transparent); }
.yh-mplan-go:active { transform: scale(.97); box-shadow: none; }
.yh-mplan-go svg { transform: rotate(90deg); }

/* Photo studio: a continuous desktop work surface with quiet controls. */
.yh-photo-studio {
  width: 100%; max-width: 820px; padding: 0;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.yh-photo-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 20px 2px;
}
.yh-photo-head-main, .yh-photo-head-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.yh-photo-head-actions { margin-left: auto; }
.yh-photo-mark {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  color: var(--text); background: var(--bg-subtle); border-radius: 6px;
}
.yh-photo-kicker { font-size: 11px; color: var(--text-muted); }
.yh-photo-head h3 { margin: 2px 0 0; font-size: 16px; font-weight: 600; line-height: 1.3; }
.yh-photo-body {
  display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr);
  align-items: start;
}
.yh-photo-script { padding: 8px 20px 5px; min-width: 0; }
.yh-photo-settings {
  display: flex; flex-direction: column;
  align-items: stretch; gap: 10px; padding: 9px 20px 10px 0; min-width: 0;
}
.yh-photo-reference {
  display: flex; align-items: center; gap: 14px; padding: 0 0 16px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border); font-size: 12px; color: var(--text-muted);
}
.yh-photo-reference img {
  display: block; width: 76px; height: 76px; object-fit: contain;
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 4px;
}
.yh-photo-field-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.yh-photo-field-head label, .yh-photo-section-heading {
  display: block; font-size: 12px; font-weight: 600; color: var(--text);
}
.yh-photo-note { margin: 4px 0 6px; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.yh-photo-prompt {
  width: 100%; min-height: 98px; max-height: 180px; resize: vertical; padding: 10px 12px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: var(--bg-window);
  color: var(--text); font: inherit; font-size: 13px; line-height: 1.65;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.yh-photo-prompt:focus, .yh-photo-selects select:focus-visible,
.yh-photo-negative input:focus-visible, .yh-photo-seed input:focus-visible {
  outline: none; border-color: var(--text-muted); box-shadow: 0 0 0 2px color-mix(in srgb, var(--text) 10%, transparent);
}
.yh-photo-edit-row { display: flex; align-items: center; justify-content: space-between; min-height: 24px; font-size: 11px; color: var(--text-faint); }
.yh-photo-templates { margin: 2px 0 10px; }
.yh-photo-template-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.yh-photo-template-chip {
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--bg-window); color: var(--text-muted); font: inherit; font-size: 12px; cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.yh-photo-template-chip:hover { color: var(--text); border-color: var(--text-muted); }
.yh-photo-template-hint { display: block; margin-top: 5px; font-size: 11px; color: var(--text-faint); }
.yh-photo-prompt-error { margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: #c2410c; }
.yh-photo-prompt-warning { margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-muted); }
.yh-photo-direction { padding-top: 6px; margin-top: 2px; }
.yh-photo-selects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 6px; }
.yh-photo-selects label, .yh-photo-negative, .yh-photo-seed {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  font-size: 11px; color: var(--text-muted);
}
.yh-photo-selects select, .yh-photo-negative input, .yh-photo-seed input {
  width: 100%; height: 33px; padding: 0 8px; min-width: 0;
  border: 1px solid var(--border-strong); border-radius: 5px;
  background: var(--bg-window); color: var(--text); font: inherit; font-size: 12px;
}
.yh-photo-preserve { margin: 15px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.yh-photo-negative { margin-top: 17px; }
.yh-photo-setting + .yh-photo-setting { margin: 0; padding: 0; border: 0; }
.yh-photo-model-picker { margin-top: 6px; }
.yh-photo-model-picker .yh-model-select { display: block; width: 100%; }
.yh-photo-model-picker .yh-model-trigger { width: 100%; min-width: 0; }
.yh-photo-model-picker .yh-model-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yh-photo-model-picker .yh-model-menu { right: 0; left: auto; width: min(330px, 75vw); }
.yh-photo-model-picker p { margin: 3px 0 0; color: var(--text-faint); font-size: 11px; line-height: 1.5; }
.yh-photo-quality { display: grid; gap: 8px; margin: 0; font-size: 12px; color: var(--text-muted); }
.yh-photo-quality select { min-width: 0; width: 100%; height: 34px; padding: 0 8px; border: 1px solid var(--border); border-radius: 5px; background: var(--bg-subtle); color: var(--text); font: inherit; }
.yh-photo-model-list { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; }
.yh-photo-model {
  width: 100%; display: flex; align-items: flex-start; gap: 9px; text-align: left;
  padding: 7px 6px; border-radius: 5px; color: var(--text-muted);
  background: transparent; transition: background .15s ease, color .15s ease;
}
.yh-photo-model:hover, .yh-photo-model:focus-visible { background: var(--bg-hover); color: var(--text); }
.yh-photo-model.is-active { color: var(--text); background: var(--bg-subtle); }
.yh-photo-model-dot {
  width: 12px; height: 12px; margin-top: 3px; border: 1px solid var(--border-strong);
  border-radius: 50%; flex: none;
}
.yh-photo-model.is-active .yh-photo-model-dot { border: 4px solid var(--text); }
.yh-photo-model strong, .yh-photo-model small { display: block; line-height: 1.4; }
.yh-photo-model strong { font-size: 12px; font-weight: 600; }
.yh-photo-model small { margin-top: 2px; font-size: 10px; color: var(--text-faint); }
.yh-photo-recommendation { display: block; padding: 6px; color: var(--text-faint); font-size: 10px; line-height: 1.5; }
.yh-photo-ratios { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 6px; }
.yh-photo-ratio {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
  height: 45px; min-width: 0; border: 1px solid var(--border); border-radius: 5px;
  color: var(--text-muted); background: transparent; font-size: 10px;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.yh-photo-ratio:hover, .yh-photo-count button:hover { background: var(--bg-hover); }
.yh-photo-ratio.is-active { border-color: var(--text-muted); color: var(--text); background: var(--bg-subtle); }
.yh-photo-ratio .yh-mplan-ratio-shape { height: 17px; max-width: 26px; }
.yh-photo-setting-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; }
.yh-photo-count { display: flex; gap: 4px; margin-top: 6px; }
.yh-photo-count button {
  width: 28px; height: 33px; flex: none; border: 1px solid var(--border); border-radius: 5px;
  color: var(--text-muted); font-size: 12px;
}
.yh-photo-count button.is-active { background: var(--text); color: var(--bg-window); border-color: var(--text); }
.yh-photo-seed input { margin-top: 7px; }
.yh-photo-seed input[aria-invalid='true'] { border-color: #aa5751; }
.yh-photo-extend { display: flex; align-items: flex-start; gap: 8px; margin: 0; }
.yh-photo-extend input { margin: 2px 0 0; accent-color: var(--text); }
.yh-photo-extend strong, .yh-photo-extend small { display: block; line-height: 1.4; }
.yh-photo-extend strong { font-size: 11px; font-weight: 600; }
.yh-photo-extend small { font-size: 10px; color: var(--text-faint); margin-top: 3px; }
.yh-photo-preview { padding: 6px 20px; color: var(--text-muted); font-size: 12px; }
.yh-photo-preview summary { cursor: pointer; width: fit-content; }
.yh-photo-preview p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; margin: 10px 0 0; }
.yh-photo-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px;
  border-top: 1px solid var(--border); color: var(--text-muted); font-size: 11px;
}
.yh-photo-foot > span { min-width: 0; line-height: 1.4; }
.yh-photo-foot .yh-mplan-go { padding: 9px 15px; border-radius: 5px; font-size: 12px; }
.yh-photo-foot .yh-mplan-go:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.yh-photo-studio :where(button, input, select, textarea, summary):focus-visible { outline-offset: 2px; }
@media (max-width: 1040px) {
  .yh-photo-settings .yh-photo-model-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .yh-photo-body { grid-template-columns: minmax(0, 1fr); }
  .yh-photo-settings { padding: 8px 20px 12px; }
}
@media (max-width: 650px) {
  .yh-photo-settings { gap: 16px; }
  .yh-photo-ratios { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yh-photo-selects { grid-template-columns: minmax(0, 1fr); }
  .yh-photo-settings .yh-photo-model-list { grid-template-columns: minmax(0, 1fr); }
  .yh-photo-foot { flex-wrap: wrap; }
  .yh-photo-foot .yh-mplan-go { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .yh-photo-studio { animation: none; }
  .yh-photo-studio :where(button, select, textarea, input) { transition: none; }
}

/* ---------- 弹出式提问卡（ask_user：模型征询用户决策） ----------
   玻璃浮层：通透底 + 顶部高光线 + 悬浮阴影；对焦入场（位移+微缩放+轻模糊）；
   选项以 40ms 错落显现；作答后选中项落定、其余退隐，稍作停顿再回填。 */
.yh-ask {
  position: relative;
  margin: 10px 0 8px; width: 100%; max-width: 620px;
  border: 1px solid color-mix(in srgb, var(--border-strong) 70%, transparent); border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.15); -webkit-backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: var(--glass-inset), 0 1px 2px rgba(0,0,0,.04), 0 12px 36px rgba(0,0,0,.08);
  padding: 20px 22px 14px;
  animation: yh-ask-in .5s var(--ease-arrive) both;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.yh-ask.is-leaving { transform: translateY(1px); }
@keyframes yh-ask-in {
  from { opacity: 0; transform: translateY(12px) scale(.982); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
.yh-ask-eyebrow { display: flex; align-items: center; gap: 7px; font-size: 9.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--text-faint); }
.yh-ask-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal-accent); animation: yh-breathe 2.4s ease-in-out infinite; }
.yh-ask-title { margin-top: 9px; font-size: 15.5px; font-weight: 650; letter-spacing: .01em; line-height: 1.45; }
.yh-ask-context { margin: 7px 0 0; font-size: 12.5px; line-height: 1.65; color: var(--text-muted); }

.yh-ask-options { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.yh-ask-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 55%, transparent); font: inherit; color: var(--text); cursor: pointer;
  animation: yh-ask-opt-in .42s var(--ease-arrive) both;
  animation-delay: calc(.12s + var(--i, 0) * .05s);
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out), transform .14s var(--ease-out), opacity .28s var(--ease-out), box-shadow .2s var(--ease-out);
}
@keyframes yh-ask-opt-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.yh-ask-opt:hover { border-color: color-mix(in srgb, var(--text) 42%, transparent); background: var(--bg-hover); transform: translateY(-1px); box-shadow: 0 3px 12px rgba(0,0,0,.05); }
.yh-ask-opt:active { transform: scale(.985); }
.yh-ask-opt.is-picked { border-color: color-mix(in srgb, var(--text) 65%, transparent); background: color-mix(in srgb, var(--text) 6%, transparent); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
/* 落定：选中项保留，其余选项与附属操作退隐 */
.yh-ask.is-leaving .yh-ask-opt:not(.is-picked) { opacity: .32; pointer-events: none; }
.yh-ask.is-leaving .yh-ask-opt.is-picked { pointer-events: none; }
.yh-ask.is-leaving .yh-ask-other-toggle, .yh-ask.is-leaving .yh-ask-input-row, .yh-ask.is-leaving .yh-ask-skip, .yh-ask.is-leaving .yh-ask-keys { opacity: 0; pointer-events: none; transition: opacity .22s var(--ease-out); }
.yh-ask-num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border: 1px solid var(--border-strong); border-radius: 6px;
  font-size: 11px; font-weight: 600; color: var(--text-faint);
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out), background .2s var(--ease-out);
}
.yh-ask-opt:hover .yh-ask-num { border-color: color-mix(in srgb, var(--text) 45%, transparent); color: var(--text-muted); }
.yh-ask-opt.is-picked .yh-ask-num { background: var(--text); border-color: var(--text); color: var(--bg); }
.yh-ask-opt-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.yh-ask-opt-label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.yh-ask-rec { font-size: 10px; font-weight: 600; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; background: var(--text); color: var(--bg); flex: none; }
.yh-ask-opt-desc { font-size: 12px; line-height: 1.6; color: var(--text-muted); }
.yh-ask-opt-arrow { flex: none; color: var(--text-faint); opacity: 0; transform: translateX(-4px); transition: opacity .18s var(--ease-out), transform .18s var(--ease-out); }
.yh-ask-opt:hover .yh-ask-opt-arrow { opacity: 1; transform: none; }
.yh-ask-opt-check { flex: none; color: var(--text); animation: yh-pop-check .24s var(--ease-out) both; }

.yh-ask-other-toggle { display: inline-flex; border: none; background: none; padding: 0; margin-top: 12px; font: inherit; font-size: 12.5px; color: var(--text-muted); cursor: pointer; transition: color .15s, opacity .22s var(--ease-out); }
.yh-ask-other-toggle:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.yh-ask-input-row { display: flex; gap: 8px; margin-top: 12px; animation: yh-ask-opt-in .3s var(--ease-out) both; }
.yh-ask-input {
  flex: 1; min-width: 0; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  font: inherit; font-size: 13px; color: var(--text);
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.yh-ask-input:focus { outline: none; border-color: color-mix(in srgb, var(--text) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 6%, transparent); }
.yh-ask-input::placeholder { color: var(--text-faint); }
.yh-ask-send {
  flex: none; padding: 10px 20px; border: none; border-radius: 10px;
  background: var(--text); color: var(--bg); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: opacity .15s, transform .12s var(--ease-out);
}
.yh-ask-send:hover:not(:disabled) { opacity: .86; }
.yh-ask-send:active:not(:disabled) { transform: scale(.96); }
.yh-ask-send:disabled { opacity: .35; cursor: default; }

.yh-ask-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 11px; border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.yh-ask-keys { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-faint); transition: opacity .22s var(--ease-out); }
.yh-ask-keys kbd {
  padding: 1px 5px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px;
  background: color-mix(in srgb, var(--bg-subtle) 70%, transparent); font-size: 10px; color: var(--text-muted);
}
.yh-ask-skip { display: inline-flex; border: none; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--text-faint); cursor: pointer; transition: color .15s, opacity .22s var(--ease-out); }
.yh-ask-skip:hover { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
/* ==========================================================================
   网页版（浅色高级）：白玻璃 + 细灰边 + 深青克制点缀
   ========================================================================== */
.yh-app.is-web {
  --bg-window: #ffffff;
  --bg-subtle: #f4f4f5;
  --bg-hover: rgba(0, 0, 0, .04);
  --bg-accent: rgba(0, 0, 0, .06);
  --border: rgba(0, 0, 0, .08);
  --border-strong: rgba(0, 0, 0, .14);
  --text: #1a1a1d;
  --text-muted: #5f5f66;
  --text-faint: #9b9ba2;
  --shell-background: #f7f7f8;
  --sidebar-glass: rgba(255, 255, 255, .78);
  --chat-glass: transparent;
  --composer-glass: #ffffff;
  --composer-border: rgba(0, 0, 0, .09);
  --shadow-composer: 0 2px 10px rgba(0, 0, 0, .05), 0 12px 32px rgba(0, 0, 0, .06);
  --accent-teal: #171717;
  --accent-teal-hover: #333333;
  color: #1a1a1d;
  background: #f7f7f8;
}

.yh-app.is-web .yh-app-shell { background: transparent; position: relative; z-index: 1; }
.yh-app.is-web .yh-body { height: 100vh; }

/* 浅色极光流光：纯黑白灰低透明度，缓慢漂移 */
.yh-app.is-web::before {
  content: '';
  position: fixed; inset: -12%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 42% at 16% 20%, rgba(0, 0, 0, .07), transparent 70%),
    radial-gradient(34% 40% at 84% 14%, rgba(0, 0, 0, .05), transparent 70%),
    radial-gradient(50% 52% at 50% 112%, rgba(0, 0, 0, .06), transparent 72%),
    radial-gradient(28% 30% at 78% 78%, rgba(0, 0, 0, .045), transparent 70%);
  filter: blur(18px);
  animation: yh-aurora-flow 36s ease-in-out infinite alternate;
}
@keyframes yh-aurora-flow {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  50%  { transform: translate3d(2.5%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(-1%, 3%, 0) scale(1.03); }
}

/* 侧栏：白色毛玻璃 + 右侧细边 */
.yh-sidebar.is-web {
  background: var(--sidebar-glass);
  border-right: 1px solid rgba(0, 0, 0, .07);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}
.yh-sidebar.is-web .yh-sidebar-inner { width: 100%; padding: 0; }

/* 顶部 logo：深黑字 */
.yh-sidebar-web-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 16px; flex: none;
}
.yh-sidebar-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.yh-sidebar-brand svg { filter: none; }
.yh-sidebar-brand-name {
  font-size: 18px; font-weight: 700; letter-spacing: .04em; color: #151518;
}
.yh-sidebar-head-actions { display: flex; align-items: center; gap: 2px; }
.yh-sidebar-head-actions .yh-icon-btn { color: var(--text-muted); }
.yh-sidebar-head-actions .yh-icon-btn:hover { color: var(--text); background: var(--bg-hover); }

/* 新对话按钮：白底细边，hover 浅灰 */
.yh-sidebar.is-web .yh-sidebar-nav { padding: 0 12px 12px; }
.yh-sidebar.is-web .yh-sidebar-nav button {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 500;
  color: var(--text);
  background: rgba(0, 0, 0, .03);
  border: 1px solid rgba(0, 0, 0, .07);
  transition: background .18s ease, border-color .18s ease;
  position: relative; overflow: hidden;
}
.yh-sidebar.is-web .yh-sidebar-nav button::before { content: none; }
.yh-sidebar.is-web .yh-sidebar-nav button:hover {
  border-color: rgba(0, 0, 0, .12);
  background: rgba(0, 0, 0, .05);
  transform: none;
  box-shadow: none;
}

/* 会话列表 */
.yh-sidebar.is-web .yh-conv-list { padding: 0 8px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.yh-sidebar.is-web .yh-conv-group-label { display: none; }
.yh-sidebar.is-web .yh-sidebar-empty {
  margin: auto 0; padding: 0 16px;
  font-size: 13px; color: var(--text-faint);
  text-align: center; line-height: 1.8;
}

/* 底部：下载按钮（深青实心）+ 登录 */
.yh-sidebar-web-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 12px; border-top: 1px solid rgba(0, 0, 0, .07); flex: none;
}
.yh-download-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 10px;
  background: linear-gradient(120deg, #2e2e2e 0%, #0a0a0a 28%, #171717 50%, #0a0a0a 72%, #2e2e2e 100%);
  background-size: 220% 220%;
  animation: yh-download-flow 7s ease infinite;
  color: #fff; font-size: 12.5px; font-weight: 600; text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .16);
  position: relative; overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}
.yh-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .2);
}
/* 扫光 */
.yh-download-btn::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 46%;
  left: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, .32) 50%, transparent 100%);
  transform: translateX(-140%) skewX(-12deg);
  animation: yh-download-shimmer 4.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes yh-download-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes yh-download-shimmer {
  0%, 55% { transform: translateX(-140%) skewX(-12deg); }
  85%, 100% { transform: translateX(320%) skewX(-12deg); }
}
.yh-sidebar-login-btn {
  padding: 8px 18px; border-radius: 10px;
  background: #fff; color: var(--text);
  font-size: 12.5px; font-weight: 500; border: 1px solid rgba(0, 0, 0, .12);
  transition: all .2s ease;
}
.yh-sidebar-login-btn:hover { background: #f4f4f5; border-color: rgba(0, 0, 0, .2); }
.yh-sidebar-web-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.yh-sidebar-settings-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: #fff; color: #52525b;
  border: 1px solid rgba(0, 0, 0, .12);
  transition: all .2s ease;
}
.yh-sidebar-settings-btn:hover { background: #f4f4f5; color: #171717; border-color: rgba(0, 0, 0, .3); }

/* 对话区 */
.yh-app.is-web .yh-chat-content { background: transparent; }
.yh-app.is-web .yh-messages-inner { max-width: 768px; margin: 0 auto; padding: 48px 24px max(calc(var(--dock-height, 180px) + 32px), 200px); }
.yh-app.is-web .yh-dock-inner { max-width: 768px; }
.yh-app.is-web .yh-msg-user .yh-user-bubble-text {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 16px; padding: 10px 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

/* 输入框：白玻璃卡片 + 顶部内高光 + 柔阴影，聚焦时墨色晕 */
.yh-app.is-web .yh-composer {
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 20px;
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 2px 8px rgba(0, 0, 0, .05),
    0 14px 36px rgba(0, 0, 0, .1);
  transition: border-color .2s ease, box-shadow .25s ease;
}
.yh-app.is-web .yh-composer:focus-within {
  border-color: rgba(0, 0, 0, .38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 2px 8px rgba(0, 0, 0, .07),
    0 16px 44px rgba(0, 0, 0, .16);
}
.yh-app.is-web .yh-composer-input {
  padding: 18px 22px 4px;
  font-size: 15px; color: var(--text);
}
.yh-app.is-web .yh-composer-input::placeholder { color: var(--text-faint); }

/* 欢迎页：整组（图标+标题+芯片+输入框）真正垂直居中 */
/* 空态输入框：收窄顶部内边距并上移，与文字组作为整体围绕视口中心 */
.yh-app.is-web .yh-chat-content.is-empty .yh-dock {
  padding: 12px 32px 16px;
  transform: translateY(calc(141px - 44.3vh));
}
/* 空态文本块：绝对定位，精确落在居中输入框的正上方（整体围绕视口中心） */
.yh-app.is-web .yh-chat-content.is-empty .yh-message-region { position: relative; }
.yh-app.is-web .yh-empty-center {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  width: min(720px, 100%);
  margin: 0 auto;
  justify-content: flex-end;
  gap: 20px;
  padding: 0 24px 48.8vh;
}
.yh-app.is-web .yh-empty-center h1 {
  color: #151518;
  -webkit-text-fill-color: #151518;
  background: none;
  font-size: 30px;
  font-weight: 600;
}
.yh-app.is-web .yh-empty-suggest { max-width: 540px; gap: 10px; }
.yh-app.is-web .yh-empty-chip {
  background: rgba(255, 255, 255, .75);
  border-color: rgba(0, 0, 0, .13);
  color: #52525b;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.yh-app.is-web .yh-empty-chip:hover {
  background: #fff;
  border-color: rgba(0, 0, 0, .36);
  color: #171717;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

/* 滚动条 */
.yh-app.is-web ::-webkit-scrollbar { width: 6px; }
.yh-app.is-web ::-webkit-scrollbar-track { background: transparent; }
.yh-app.is-web ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .16); border-radius: 3px;
}
.yh-app.is-web ::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, .28); }

/* ==========================================================================
   终端面板（xterm.js + PTY）：跟随主题的玻璃拟态
   ========================================================================== */
/* 底部面板拖拽调高分隔条：悬停显出发丝线，拖拽中常显 */
.yh-bottom-resizer { position: relative; z-index: 71; height: 8px; margin-bottom: -8px; flex: none; cursor: row-resize; touch-action: none; }
.yh-bottom-resizer::before { content: ''; position: absolute; left: 0; right: 0; top: 3px; height: 1px; background: transparent; transition: background-color .15s ease; }
.yh-bottom-resizer:hover::before, body.yh-resizing-y .yh-bottom-resizer::before { background: var(--text-faint); }
body.yh-resizing-y { cursor: row-resize; user-select: none; -webkit-user-select: none; }
body.yh-resizing-y .yh-terminal-panel, body.yh-resizing-y .yh-files-panel { transition: none; }
body.yh-resizing-y iframe, body.yh-resizing-y .xterm { pointer-events: none; }

.yh-terminal-panel {
  display: flex; flex-direction: column;
  height: var(--bottom-h, 280px); flex: none;
  transition: height .2s var(--ease-out);
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(28px) saturate(125%);
  -webkit-backdrop-filter: blur(28px) saturate(125%);
  border-top: 1px solid rgba(0, 0, 0, .07);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .08);
  animation: yh-term-in .32s var(--ease-morph) both;
}
@keyframes yh-term-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
:root[data-theme='dark'] .yh-terminal-panel {
  background: rgba(22, 22, 25, .62);
  border-top-color: rgba(255, 255, 255, .08);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .4);
}
.yh-terminal-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 36px; padding: 0 10px 0 14px; flex: none;
  border-bottom: 1px solid rgba(0, 0, 0, .07);
}
:root[data-theme='dark'] .yh-terminal-head { border-bottom-color: rgba(255, 255, 255, .06); }
.yh-terminal-tabs { display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.yh-terminal-tabs::-webkit-scrollbar { display: none; }
.yh-terminal-tab {
  display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 8px 0 11px;
  font-size: 12px; color: var(--text-muted); cursor: pointer; user-select: none;
  border-radius: 8px; border: 1px solid transparent; white-space: nowrap; position: relative;
  transition: background .16s var(--ease-out), color .16s var(--ease-out), border-color .16s ease;
  animation: yh-term-tab-in .24s var(--ease-out) both;
}
@keyframes yh-term-tab-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
.yh-terminal-tab:hover { background: var(--bg-hover); color: var(--text); }
.yh-terminal-tab.is-active {
  background: var(--bg-subtle);
  color: var(--text); font-weight: 500;
  border-color: var(--border);
}
.yh-terminal-tab.is-active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); transform: scaleX(.6); transform-origin: center; animation: yh-term-bar .28s var(--ease-morph) forwards; }
@keyframes yh-term-bar { to { transform: scaleX(1); } }
.yh-terminal-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex: none; }
.yh-terminal-tab.is-active .yh-terminal-dot { animation: yh-dot-pulse 2s ease-in-out infinite; }
@keyframes yh-dot-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); } 50% { box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); } }
:root[data-theme='dark'] .yh-terminal-dot { background: #4ade80; }
:root[data-theme='dark'] .yh-terminal-tab.is-active .yh-terminal-dot { animation: yh-dot-pulse-d 2s ease-in-out infinite; }
@keyframes yh-dot-pulse-d { 0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .55); } 50% { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0); } }
.yh-terminal-exited { color: var(--text-faint); font-size: 11px; }
.yh-terminal-tab.is-exited .yh-terminal-dot { background: var(--text-faint); animation: none; }
.yh-terminal-tab-close {
  display: grid; place-items: center; width: 16px; height: 16px; margin-left: 1px;
  border: none; background: transparent; color: var(--text-faint); cursor: pointer;
  border-radius: 4px; opacity: 0; transform: scale(.6); transition: opacity .14s var(--ease-out), transform .14s var(--ease-out), background-color .12s ease, color .12s ease;
}
.yh-terminal-tab:hover .yh-terminal-tab-close,
.yh-terminal-tab.is-active .yh-terminal-tab-close { opacity: .8; transform: scale(1); }
.yh-terminal-tab-close:hover { background: var(--bg-accent); color: var(--text); opacity: 1; }
.yh-terminal-tab-add {
  display: grid; place-items: center; width: 24px; height: 24px; flex: none; margin-left: 4px;
  border: none; background: transparent; color: var(--text-faint); cursor: pointer;
  border-radius: 6px; transition: background-color .15s ease, color .15s ease, transform .2s var(--ease-morph);
}
.yh-terminal-tab-add:hover { background: var(--bg-hover); color: var(--accent); transform: rotate(90deg); }
.yh-terminal-tab-add:active { transform: rotate(90deg) scale(.88); }
.yh-terminal-close {
  display: grid; place-items: center; width: 24px; height: 24px; flex: none;
  border: none; background: transparent; color: var(--text-faint); cursor: pointer;
  border-radius: 6px; transition: background-color .15s ease, color .15s ease, transform .12s var(--ease-out);
}
.yh-terminal-close:hover { background: var(--bg-hover); color: var(--text); transform: scale(1.04); }
.yh-terminal-close:active { transform: scale(.92); }
.yh-terminal-body { flex: 1; padding: 8px 12px 12px; min-height: 0; overflow: hidden; background: transparent; }
/* 终端创建失败空态：一句话说明 + 重试按钮 */
.yh-terminal-error {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  font-size: 12.5px; color: var(--text-muted);
}
.yh-terminal-error-retry {
  padding: 4px 16px; font-size: 12px; color: var(--text);
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; transition: background .16s var(--ease-out);
}
.yh-terminal-error-retry:hover { background: var(--bg-hover); }
.yh-terminal-body .xterm { height: 100%; }
.yh-terminal-body .xterm-viewport { overflow-y: auto !important; }
.yh-terminal-body .xterm-viewport::-webkit-scrollbar { width: 6px; }
.yh-terminal-body .xterm-viewport::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); border-radius: 3px; }
:root[data-theme='dark'] .yh-terminal-body .xterm-viewport::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); }

/* ==========================================================================
   文件树面板
   ========================================================================== */
.yh-files-panel {
  display: flex; flex-direction: column;
  height: var(--bottom-h, 280px); flex: none;
  transition: height .2s var(--ease-out);
  background: rgba(10, 10, 14, .92);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.yh-files-head {
  display: flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 12px; flex: none;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.yh-files-title { font-size: 12px; color: #a0a0b0; font-weight: 500; }
.yh-files-path { font-size: 11px; color: #6b6b80; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.yh-files-body { flex: 1; overflow-y: auto; padding: 4px 0; }

.yh-file-tree { display: flex; flex-direction: column; height: 100%; }
.yh-ft-search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; flex: none;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.yh-ft-search svg { color: #6b6b80; flex: none; }
.yh-ft-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #e0e0e8; font-size: 12px;
}
.yh-ft-search input::placeholder { color: #6b6b80; }
.yh-ft-list { flex: 1; overflow-y: auto; }
.yh-ft-empty { padding: 24px; text-align: center; font-size: 12px; color: #6b6b80; }
.yh-ft-node { user-select: none; }
.yh-ft-item {
  width: 100%; display: flex; align-items: center; gap: 6px;
  padding: 5px 12px; border: none; background: transparent;
  color: #c0c0cc; font-size: 12.5px; cursor: pointer; text-align: left;
  transition: background-color .12s ease;
}
.yh-ft-item:hover { background: rgba(255, 255, 255, .06); }
.yh-ft-caret { transition: transform .15s ease; flex: none; color: #d4d4d4; }
.yh-ft-caret.is-open { transform: rotate(90deg); }
.yh-ft-leaf { width: 15px; height: 15px; flex: none; border-radius: 3px; background: rgba(255, 255, 255, .18); }
.yh-ft-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 内容搜索结果 */
.yh-ft-results { border-top: 1px solid rgba(255, 255, 255, .05); padding: 6px 0; max-height: 180px; overflow-y: auto; }
.yh-ft-results-title { padding: 4px 12px; font-size: 11px; color: #d4d4d4; font-weight: 500; }
.yh-ft-result {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start;
  padding: 6px 12px; border: none; background: transparent; cursor: pointer; text-align: left;
  transition: background-color .12s ease;
}
.yh-ft-result:hover { background: rgba(255, 255, 255, .07); }
.yh-ft-result-file { font-size: 11px; color: #d4d4d4; font-family: monospace; }
.yh-ft-result-line { font-size: 11px; color: #a0a0b0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.yh-ft-spinner {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
  border: 2px solid rgba(255, 255, 255, .2); border-top-color: #ffffff;
  animation: yh-spin .6s linear infinite;
}
@keyframes yh-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   代码查看器（highlight.js）：主题感知 chrome + 深色代码块（聚焦阅读）
   ========================================================================== */
.yh-code-viewer {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  -webkit-app-region: no-drag;
  animation: yh-code-in .26s var(--ease-morph) both;
}
:root[data-theme='dark'] .yh-code-viewer { background: rgba(0, 0, 0, .72); }
@keyframes yh-code-in { from { opacity: 0; } to { opacity: 1; } }
.yh-code-viewer-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 46px; padding: 0 14px 0 18px; flex: none;
  background: var(--bg-window);
  border-bottom: 1px solid var(--border);
}
.yh-code-viewer-title { display: flex; align-items: center; gap: 9px; color: var(--text); font-size: 13px; font-weight: 500; min-width: 0; }
.yh-code-viewer-title > svg { color: var(--text-muted); flex: none; }
.yh-code-viewer-title > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.yh-code-lang { flex: none; font-size: 11px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 2px 8px; border-radius: 5px; letter-spacing: .02em; }
.yh-code-viewer-actions { display: flex; align-items: center; gap: 4px; }
.yh-code-copy { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; color: var(--text-muted); background: var(--bg-subtle); border: 1px solid transparent; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .12s var(--ease-out); }
.yh-code-copy:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border); }
.yh-code-copy:active { transform: scale(.95); }
.yh-code-copy.is-copied { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.yh-code-copy > span { font-weight: 500; }
.yh-code-close { color: var(--text-muted); }
.yh-code-close:hover { background: var(--bg-hover); color: var(--text); }
.yh-code-viewer-body { flex: 1; min-height: 0; overflow: auto; padding: 22px 0 40px; background: var(--bg-window); }
.yh-code-scroll { max-width: 1040px; margin: 0 auto; padding: 0 18px; }
.yh-code-frame { display: flex; align-items: stretch; background: #282c34; border-radius: 14px; box-shadow: 0 4px 24px rgba(0, 0, 0, .12); overflow: hidden; }
:root[data-theme='dark'] .yh-code-frame { box-shadow: 0 4px 24px rgba(0, 0, 0, .36); }
.yh-code-gutter { margin: 0; padding: 18px 14px 18px 18px; flex: none; text-align: right; color: #4b5867; font-family: 'Cascadia Code', 'JetBrains Mono', Consolas, monospace; font-size: 13px; line-height: 1.65; white-space: pre; user-select: none; -webkit-user-select: none; border-right: 1px solid rgba(255, 255, 255, .05); }
.yh-code-pre { margin: 0; padding: 18px 20px; flex: 1; min-width: 0; overflow-x: auto; background: transparent; }
.yh-code-pre code { font-family: 'Cascadia Code', 'JetBrains Mono', Consolas, monospace; font-size: 13px; line-height: 1.65; display: block; white-space: pre; }
.yh-code-truncated { padding: 14px 16px 0; text-align: center; color: var(--text-faint); font-size: 12px; }

/* ==========================================================================
   ����ҳ������ֻ����
   ========================================================================== */
.yh-share {
  min-height: 100vh;
  background: #f7f7f8;
  color: #1a1a1d;
  display: flex;
  justify-content: center;
}
.yh-share-inner {
  width: 100%;
  max-width: 760px;
  padding: 40px 24px 80px;
}
.yh-share-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 36px;
}
.yh-share-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .5px; }
.yh-share-v {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: #171717;
  color: #fff; font-weight: 800; font-size: 16px;
}
.yh-share-open {
  color: #171717; text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 6px 14px; border: 1px solid rgba(0,0,0,.28); border-radius: 8px;
  transition: all .15s ease;
}
.yh-share-open:hover { background: rgba(0,0,0,.07); border-color: rgba(0,0,0,.5); }
.yh-share-title { font-size: 26px; font-weight: 700; margin: 0 0 8px; line-height: 1.3; color: #151518; }
.yh-share-meta { font-size: 13px; color: #8a8a94; margin-bottom: 32px; }
.yh-share-empty {
  text-align: center; padding: 80px 0; color: #8a8a94; font-size: 15px;
}
.yh-share-messages { display: flex; flex-direction: column; gap: 28px; }
.yh-share-msg { display: flex; flex-direction: column; gap: 8px; }
.yh-share-role { font-size: 12px; font-weight: 600; color: #6b6b72; text-transform: uppercase; letter-spacing: .8px; }
.yh-share-msg-assistant .yh-share-role { color: #171717; }
.yh-share-bubble {
  background: #ffffff; border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px; padding: 16px 18px; line-height: 1.7; font-size: 15px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.yh-share-msg-user .yh-share-bubble { background: #f4f4f5; border-color: rgba(0,0,0,.06); }
.yh-share-img { max-width: 100%; border-radius: 8px; margin-bottom: 12px; }
.yh-share-bubble pre { background: #f4f4f5; border: 1px solid rgba(0,0,0,.06); border-radius: 8px; padding: 12px; overflow-x: auto; }
.yh-share-bubble code { background: rgba(0,0,0,.05); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.yh-share-bubble pre code { background: transparent; padding: 0; }

/* ==========================================================================
   �ƶ�����Ӧʽ����ҳ�棩
   ========================================================================== */
/* ── 项目工作台（wb- 前缀）────────────────────────────────
   视觉：纯黑白灰、圆角、颜色仅状态语义色、玻璃仅审批浮层 */

.wb-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 320px;
  height: 100%;
  min-height: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

.wb-shell-empty { display: flex; align-items: center; justify-content: center; grid-template-columns: none; }
.wb-empty-back { position: absolute; top: 14px; left: 14px; }

.wb-empty { text-align: center; max-width: 380px; padding: 32px; }
.wb-empty h1 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.wb-empty p { color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }

/* ── 按钮 ── */
.wb-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
  transition: background .18s var(--ease-out), color .18s var(--ease-out), border-color .18s var(--ease-out), transform .12s var(--ease-out);
}
.wb-btn:active { transform: scale(.97); }
.wb-btn:disabled, .wb-phase-rerun:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.wb-shell :where(button, input, textarea, select):focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.wb-btn-primary { background: var(--text); color: var(--bg); }
.wb-btn-primary:hover { opacity: .88; }
.wb-btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border-strong); }
.wb-btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.wb-btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.wb-btn-danger:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); color: var(--danger); }

.wb-link {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: 0; color: var(--text-muted); font-size: 12px; cursor: pointer;
  padding: 2px 0; transition: color .15s var(--ease-out);
}
.wb-link:hover { color: var(--text); }
.wb-link-danger:hover { color: var(--danger); }

/* ── 徽标 ── */
.wb-badge {
  display: inline-flex; align-items: center; padding: 1px 8px;
  border-radius: var(--radius-sm); font-size: 11px; font-weight: 500; white-space: nowrap;
}
.wb-badge-ok { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
.wb-badge-warn { background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn); }
.wb-badge-bad { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.wb-badge-idle { background: var(--bg-hover); color: var(--text-muted); }
.wb-badge-run { background: var(--bg-accent); color: var(--text); }

/* ── 左栏 ── */
.wb-left {
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0;
  background: var(--bg-sidebar);
}
.wb-left-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 14px 10px;
}
.wb-left-title { flex: 1; font-size: 13px; font-weight: 600; }
.wb-left-sub {
  padding: 10px 14px 6px; font-size: 11px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: .06em;
}

.wb-project-list { overflow-y: auto; padding: 0 8px; }
.wb-project-item {
  display: flex; flex-direction: column; gap: 5px; width: 100%;
  padding: 9px 10px; border-radius: var(--radius); text-align: left;
  transition: background .16s var(--ease-out);
}
.wb-project-item:hover { background: var(--bg-hover); }
.wb-project-item.is-active { background: var(--bg-accent); }
.wb-project-name {
  font-size: 12.5px; font-weight: 500; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wb-project-meta { display: flex; align-items: center; gap: 8px; }
.wb-project-pct { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.wb-phase-nav { border-top: 1px solid var(--border); margin-top: 8px; padding-bottom: 12px; overflow-y: auto; }
.wb-phase-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px;
}
.wb-phase-title {
  font-size: 12.5px; color: var(--text-muted); text-align: left; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .15s var(--ease-out);
}
.wb-phase-title:hover { color: var(--text); }
.wb-phase-count { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.wb-phase-rerun {
  font-size: 11px; color: var(--text-faint); opacity: 0;
  transition: opacity .15s var(--ease-out), color .15s var(--ease-out);
}
.wb-phase-item:hover .wb-phase-rerun { opacity: 1; }
.wb-phase-rerun:hover { color: var(--text); }

.wb-run-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text);
  animation: yh-breathe 1.6s ease-in-out infinite;
}

/* ── 中栏 ── */
.wb-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wb-storage-error { flex: none; padding: 10px 24px; color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--bg)); font-size: 12px; line-height: 1.5; }

.wb-topbar {
  padding: 16px 24px 12px; border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center;
}
.wb-topbar-info { min-width: 0; }
.wb-topbar-name { font-size: 16px; font-weight: 600; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-topbar-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wb-topbar-progress, .wb-topbar-budget { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.wb-topbar-actions { display: flex; align-items: center; gap: 8px; grid-row: span 2; }
.wb-topbar-progressbar {
  grid-column: 1; height: 3px; border-radius: 2px; background: var(--bg-hover); overflow: hidden; align-self: end;
}
.wb-topbar-progressbar span {
  display: block; height: 100%; background: var(--text); border-radius: 2px;
  transition: width .5s var(--ease-flow);
}

.wb-tabs {
  display: flex; flex: none; gap: 2px; padding: 8px 24px 0; border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: thin;
}
.wb-tab {
  position: relative; flex: none; padding: 8px 14px; font-size: 12.5px; color: var(--text-muted);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: color .16s var(--ease-out), background .16s var(--ease-out);
}
.wb-tab:hover { color: var(--text); background: var(--bg-hover); }
.wb-tab.is-active { color: var(--text); font-weight: 500; }
.wb-tab.is-active::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
  background: var(--text); border-radius: 2px;
}
.wb-tab-dot {
  display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%;
  background: var(--warn); vertical-align: 1px;
}

.wb-content { flex: 1; overflow-y: auto; padding: 20px 24px 32px; min-height: 0; }
.wb-page { display: flex; flex-direction: column; gap: 20px; animation: yh-fade-up .3s var(--ease-arrive); }

.wb-block h3 {
  font-size: 12px; font-weight: 600; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px;
}
.wb-text { font-size: 13px; line-height: 1.7; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.wb-text-muted { color: var(--text-muted); margin-top: 6px; }
.wb-text-bad { color: var(--danger); }
.wb-hint { font-size: 12.5px; color: var(--text-faint); }
.wb-hint-center {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 48px 0; color: var(--text-faint); font-size: 13px; text-align: center;
}

.wb-kv-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.wb-kv { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); }

.wb-criteria {
  margin-top: 12px; padding: 10px 14px; border-radius: var(--radius);
  background: var(--bg-subtle); border: 1px solid var(--border);
}
.wb-criteria span { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; }
.wb-criteria p { font-size: 12.5px; line-height: 1.6; margin-top: 4px; }

/* 活动 / 决策 */
.wb-activity { list-style: none; display: flex; flex-direction: column; }
.wb-activity li {
  display: flex; align-items: baseline; gap: 10px; padding: 5px 0;
  border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.wb-activity li:last-child { border-bottom: 0; }
.wb-activity-type { color: var(--text-faint); font-size: 11.5px; white-space: nowrap; }
.wb-activity-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-activity time { color: var(--text-faint); font-size: 11px; font-variant-numeric: tabular-nums; }

.wb-decisions { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.wb-decisions li { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.wb-decision-title { font-weight: 500; white-space: nowrap; }
.wb-decision-reason { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 计划页任务行 */
.wb-task-list { display: flex; flex-direction: column; gap: 2px; }
.wb-task-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 12px; border-radius: var(--radius); text-align: left;
  transition: background .15s var(--ease-out);
}
.wb-task-row:hover { background: var(--bg-hover); }
.wb-task-row.is-selected { background: var(--bg-accent); }
.wb-task-title { flex: 1; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-task-deps { font-size: 11px; color: var(--text-faint); white-space: nowrap; }
.wb-task-priority { font-size: 11px; white-space: nowrap; }
.wb-priority-high { color: var(--text); font-weight: 600; }
.wb-priority-medium { color: var(--text-muted); }
.wb-priority-low { color: var(--text-faint); }

/* 执行页 */
.wb-current { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.wb-event-stream { list-style: none; display: flex; flex-direction: column; }
.wb-event {
  display: flex; align-items: baseline; gap: 10px; padding: 4px 0; font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.wb-event:last-child { border-bottom: 0; }
.wb-event time { color: var(--text-faint); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wb-event-type { color: var(--text-muted); white-space: nowrap; }
.wb-event-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-event-blocked .wb-event-type { color: var(--danger); }
.wb-event-approval_requested .wb-event-type { color: var(--warn); }
.wb-event-verification_passed .wb-event-type, .wb-event-artifact_created .wb-event-type { color: var(--success); }
.wb-event-verification_failed .wb-event-type { color: var(--danger); }

.wb-run-list { display: flex; flex-direction: column; gap: 2px; }
.wb-run-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 12px; border-radius: var(--radius); text-align: left;
  transition: background .15s var(--ease-out); font-size: 12px;
}
.wb-run-row:hover { background: var(--bg-hover); }
.wb-run-task { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-run-model { color: var(--text-faint); white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.wb-run-ms { color: var(--text-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.wb-run-conv { color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.wb-run-conv:hover { color: var(--text); text-decoration: underline; }

/* 产物页 */
.wb-artifact-list { display: flex; flex-direction: column; gap: 2px; }
.wb-artifact-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 12px; border-radius: var(--radius); text-align: left;
  transition: background .15s var(--ease-out);
}
.wb-artifact-row:hover { background: var(--bg-hover); }
.wb-artifact-row.is-selected { background: var(--bg-accent); }
.wb-artifact-name { font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.wb-artifact-meta { flex: 1; font-size: 11px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 验证页 */
.wb-evidence-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.wb-evidence {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: var(--radius); border: 1px solid var(--border); font-size: 12.5px;
}
.wb-evidence.is-pass { border-color: color-mix(in srgb, var(--success) 25%, var(--border)); }
.wb-evidence.is-fail { border-color: color-mix(in srgb, var(--danger) 25%, var(--border)); }
.wb-evidence-check { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-evidence-source { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.wb-evidence time { color: var(--text-faint); font-size: 11px; white-space: nowrap; }

.wb-manual-row { display: flex; gap: 8px; align-items: center; }
.wb-manual-row input {
  flex: 1; padding: 7px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg);
  font-size: 12.5px; outline: none; transition: border-color .15s var(--ease-out);
}
.wb-manual-row input:focus { border-color: var(--text-muted); }

/* 交付页 */
.wb-delivery-artifacts { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.wb-delivery-artifacts li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.wb-delivery-artifacts li > span:first-child { flex: 1; }

/* 引擎页（S+） */
.wb-engine-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.wb-engine-row input[type="range"] { flex: 1; accent-color: var(--text-muted); }
.wb-engine-value { font-size: 13px; font-variant-numeric: tabular-nums; min-width: 20px; text-align: center; }
.wb-engine-toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; cursor: pointer; }
.wb-engine-toggle input { accent-color: var(--text-muted); }
.wb-engine-rank { margin-top: 10px; }
.wb-engine-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ── 右栏 ── */
.wb-right {
  border-left: 1px solid var(--border); overflow-y: auto; min-height: 0;
  background: var(--bg-sidebar); padding: 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.wb-right-empty {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 40px 12px; text-align: center;
}
.wb-right-empty p { font-size: 12px; color: var(--text-faint); line-height: 1.6; }

/* 审批卡片：唯一使用玻璃质感的地方 */
.wb-approval-stack { display: flex; flex-direction: column; gap: 10px; }
.wb-approval-card {
  padding: 12px; border-radius: var(--radius);
  background: var(--composer-glass); border: 1px solid var(--border-strong);
  box-shadow: var(--glass-inset), var(--shadow-menu);
  backdrop-filter: blur(14px);
  display: flex; flex-direction: column; gap: 8px;
  animation: yh-msg-in .35s var(--ease-arrive);
}
.wb-approval-summary { font-size: 12.5px; font-weight: 500; line-height: 1.5; }
.wb-approval-tools { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }
.wb-approval-actions { display: flex; gap: 8px; }

.wb-inspector {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg); overflow: hidden;
  animation: yh-fade-up .25s var(--ease-arrive);
}
.wb-inspector-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.wb-inspector-head h3 { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-inspector-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.wb-kv-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.wb-kv-line > span:first-child { color: var(--text-faint); white-space: nowrap; }
.wb-inspector-sec { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.wb-inspector-sec > span { color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.wb-inspector-sec p, .wb-inspector-sec ol { line-height: 1.6; color: var(--text); }
.wb-inspector-sec ol { padding-left: 18px; }
.wb-inspector-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wb-mono { font-family: var(--mono); font-size: 11.5px; word-break: break-all; }

.wb-artifact-preview {
  margin-top: 4px; padding: 10px 12px; border-radius: var(--radius);
  background: var(--bg-subtle); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 11px; line-height: 1.6;
  max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word;
}

/* ── 新建项目弹窗 ── */
.wb-modal {
  width: min(560px, calc(100vw - 48px)); max-height: calc(100vh - 80px);
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-menu); animation: yh-menu-pop .28s var(--ease-arrive);
}
.wb-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--border);
}
.wb-modal-head h2 { font-size: 15px; font-weight: 600; }
.wb-modal-body { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.wb-modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 20px 16px; border-top: 1px solid var(--border);
}

.wb-field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.wb-field > span { font-size: 11.5px; color: var(--text-muted); }
.wb-field input, .wb-field textarea, .wb-field select {
  padding: 7px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg);
  font-size: 12.5px; outline: none; resize: vertical;
  transition: border-color .15s var(--ease-out);
}
.wb-field input:focus, .wb-field textarea:focus, .wb-field select:focus { border-color: var(--text-muted); }
.wb-field-row { display: flex; gap: 12px; }
.wb-folder-row { display: flex; gap: 8px; }
.wb-folder-row input { flex: 1; }

/* 工作台保持完整的桌面检查器与审批入口。 */
@media (max-width: 1100px) {
  .wb-shell { grid-template-columns: 180px minmax(0, 1fr) 250px; }
  .wb-topbar { padding: 12px; }
  .wb-topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .wb-content { padding: 16px 12px; }
  .wb-tabs { padding: 8px 8px 0; }
  .wb-tab { padding: 8px; }
}
@media (max-width: 900px) {
  .wb-shell { grid-template-columns: 150px minmax(0, 1fr) 230px; }
  .wb-topbar { grid-template-columns: minmax(0, 1fr); }
  .wb-topbar-actions { grid-row: auto; justify-content: flex-start; }
  .wb-run-model, .wb-run-ms { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wb-shell :where(.wb-page, .wb-inspector, .wb-approval-card, .wb-run-dot, .wb-modal) { animation: none; }
  .wb-shell :where(.wb-btn, .wb-tab, .wb-project-item, .wb-task-row, .wb-artifact-row, .wb-topbar-progressbar span) { transition: none; }
}
@media (max-width: 768px) {
  .yh-app.is-web .yh-workspace { --icon-bar-width: 0px; }
  .yh-app.is-web .yh-body { padding: 0; }
  .yh-app.is-web .yh-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    width: 82vw; max-width: 320px;
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    box-shadow: 8px 0 32px rgba(0,0,0,.4);
  }
  .yh-app.is-web .yh-sidebar:not(.is-collapsed) { transform: translateX(0); }
  .yh-app.is-web .yh-sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55;
    animation: yh-fade-in .2s ease;
  }
  .yh-app.is-web .yh-main-col { padding: 0 12px; }
  .yh-app.is-web .yh-messages-inner { padding: 16px 4px max(calc(var(--dock-height, 160px) + 24px), 120px); max-width: 100%; }
  .yh-app.is-web .yh-msg { padding: 0; }
  .yh-app.is-web .yh-msg-bubble { font-size: 14px; padding: 12px 14px; }
  .yh-app.is-web .yh-composer-wrap { padding: 8px 10px 12px; }
  .yh-app.is-web .yh-composer-input { font-size: 15px; padding: 10px 12px; }
  .yh-app.is-web .yh-icon-btn, .yh-app.is-web .yh-send-btn { min-width: 40px; min-height: 40px; }
  .yh-app.is-web .yh-empty-hero h1 { font-size: 22px; }
  .yh-app.is-web .yh-empty-hero p { font-size: 13px; }
  .yh-app.is-web .yh-chat-head { padding: 10px 4px; }
  .yh-app.is-web .yh-chat-title { font-size: 15px; }
  .yh-app.is-web .yh-model-select, .yh-app.is-web .yh-mode-toggle { font-size: 12px; }
  /* 移动端空态：恢复居中 transform 基准，靠基础规则布局 */
  .yh-app.is-web .yh-chat-content.is-empty .yh-dock {
    padding: 32px 14px 12px;
    transform: translateY(calc(50% - 50cqh));
  }
  .yh-app.is-web .yh-empty-center {
    position: static;
    margin: 0 auto;
    padding: 20px 12px calc(50cqh + 60px);
    justify-content: flex-end;
    gap: 16px;
  }
  .yh-app.is-web .yh-empty-center h1 { font-size: 22px; }
}
@media (max-width: 480px) {
  .yh-app.is-web .yh-messages-inner { padding: 12px 2px max(calc(var(--dock-height, 160px) + 24px), 110px); }
  .yh-app.is-web .yh-msg-bubble { padding: 10px 12px; border-radius: 12px; }
}

/* 长会话虚拟渲染：屏外消息跳过布局与绘制，浏览器记住实际高度避免滚动跳动（contain-intrinsic-size: auto） */
.yh-msg-row { content-visibility: auto; contain-intrinsic-size: auto 120px; }
/* 冰清 · 管理员专属空间。
   原则：不新建视觉语言。容器、会话行、按钮全部复用主侧栏既有类（.yh-sidebar / .yh-conv / .yh-sidebar-foot），
   这里只补名字行、语气行与欢迎态三处，配色一律走项目令牌。 */

.yh-bq-mode { flex: 1; display: flex; min-width: 0; min-height: 0; }
.yh-bq-stage { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* ── 侧栏：只比主侧栏多一个名字行与一行语气 ─────────────── */
.yh-bq-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 12px 0 18px;
}
.yh-bq-name {
  flex: 1;
  min-width: 0;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--text);
}
.yh-bq-head .yh-icon-btn { flex: none; color: var(--text-faint); }
.yh-bq-head .yh-icon-btn:hover { color: var(--text); }

.yh-bq-foot-row { font-size: 12px; color: var(--text-faint); }
.yh-bq-sep { padding: 0 5px; opacity: .5; }
.yh-bq-tone { display: inline; font-size: 12px; color: var(--text-faint); transition: color .14s ease; }
.yh-bq-tone:hover { color: var(--text-muted); }
.yh-bq-tone.is-on { color: var(--text); }

.yh-bq-foot-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-faint);
}
.yh-bq-model { font-family: var(--mono); }
.yh-bq-mem::before { content: '· '; opacity: .6; }

/* ── 对话区：两侧都走圆角气泡（只在冰清空间内生效） ─────── */
.yh-bq-stage .yh-user-bubble-text {
  border-radius: 20px;
  border-bottom-right-radius: 8px;
}
.yh-bq-stage .yh-msg-assistant .yh-msg-content {
  max-width: 76%;
  margin: 3px 0;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 20px;
  border-bottom-left-radius: 8px;
}
.yh-bq-stage .yh-msg-assistant.is-busy .yh-msg-content {
  border-radius: 20px;
  border-bottom-left-radius: 8px;
}
/* 气泡里的首个/末尾段落不留额外外边距，贴着圆角走 */
.yh-bq-stage .yh-msg-assistant .yh-md > :first-child { margin-top: 0; }
.yh-bq-stage .yh-msg-assistant .yh-md > :last-child { margin-bottom: 0; }

@media (max-width: 720px) {
  .yh-bq-stage .yh-msg-assistant .yh-msg-content { max-width: 88%; }
}

/* ── 欢迎态：她还没开口时的主区 ─────────────────────────── */
.yh-bq-hello {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 40px 28px 64px;
  overflow-y: auto;
  animation: yh-bq-fade .34s ease both;
}
@keyframes yh-bq-fade { from { opacity: 0 } to { opacity: 1 } }

.yh-bq-hello-inner { width: 100%; max-width: 540px; text-align: center; }
.yh-bq-hello-name {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .5em;
  text-indent: .5em;
  color: var(--text-faint);
}
.yh-bq-hello-line {
  margin-top: 18px;
  font-size: 27px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: .03em;
  color: var(--text);
}
.yh-bq-hello-sub {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.yh-bq-hello-tones {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 26px;
  font-size: 12.5px;
}
.yh-bq-hello-tone {
  color: var(--text-faint);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.yh-bq-hello-tone:hover { color: var(--text-muted); }
.yh-bq-hello-tone.is-on { color: var(--text); border-bottom-color: var(--border-strong); }

.yh-bq-hello-quicks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 30px;
}
.yh-bq-hello-quick {
  padding: 10px 16px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  transition: color .15s ease, background-color .15s ease;
}
.yh-bq-hello-quick:hover { color: var(--text); background: var(--bg-hover); }

@media (max-width: 720px) {
  .yh-bq-hello-line { font-size: 23px; }
}/* ============================================================
   VORA 启动链路：极光背景 / 玻璃 / 开场动画 / 登录 / 引导 / 加载
   黑白灰 + 玻璃磨砂 + 极光流动；与主界面样式隔离（vb- 前缀）
   ============================================================ */

.vb-root {
  position: fixed; inset: 0; overflow: hidden;
  color: #141414;
  font-family: var(--font-sans);
  /* 登录/引导页基底：简洁纯白（用户明确要求，不要米白） */
  background: #ffffff;
  --vb-text: #141414;
  --vb-text-2: #5c5c5c;
  --vb-text-3: #9a9a9a;
  --vb-ease: cubic-bezier(.32, .72, 0, 1);
  --vb-glass: rgba(255, 255, 255, .42);
  --vb-glass-line: rgba(255, 255, 255, .65);
}
.vb-root :where(button) { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
.vb-root :where(input) { font: inherit; color: inherit; background: none; border: none; outline: none; }

/* ---------- 丝带线稿背景视频（登录/注册/引导阶段） ---------- */
.vb-ribbon-video {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none; user-select: none;
  background: #ffffff;
}
/* 中央柔光面纱：让表单/正文区保持可读，丝带在四周透出 */
.vb-ribbon-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 62% 58% at 50% 50%,
    rgba(255,255,255,.78) 0%, rgba(255,255,255,.42) 46%, rgba(255,255,255,0) 74%);
}

/* ---------- 极光背景层 ---------- */
.vb-aurora { position: absolute; inset: 0; overflow: hidden; }
.vb-aurora i { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.vb-a1 { width: 62vmax; height: 62vmax; left: -18vmax; top: -22vmax;
  background: radial-gradient(circle at 35% 35%, #ffffff, rgba(255,255,255,0) 68%);
  animation: vbDrift1 26s var(--vb-ease) infinite alternate; }
.vb-a2 { width: 55vmax; height: 55vmax; right: -16vmax; top: -10vmax;
  background: radial-gradient(circle at 60% 40%, #f4f3f1, rgba(244,243,241,0) 66%);
  animation: vbDrift2 32s var(--vb-ease) infinite alternate; }
.vb-a3 { width: 48vmax; height: 48vmax; left: 8vmax; bottom: -24vmax;
  background: radial-gradient(circle at 50% 50%, #d9d7d3, rgba(217,215,211,0) 66%);
  animation: vbDrift3 24s var(--vb-ease) infinite alternate; }
.vb-a4 { width: 40vmax; height: 40vmax; right: 4vmax; bottom: -14vmax;
  background: radial-gradient(circle at 50% 50%, #c9c7c3, rgba(201,199,195,0) 62%);
  animation: vbDrift1 30s var(--vb-ease) infinite alternate-reverse; opacity: .8; }
.vb-ribbon { position: absolute; width: 130vmax; height: 22vmax; filter: blur(60px); opacity: .55; }
.vb-r1 { left: -15vmax; top: 12vh; transform: rotate(-14deg);
  background: linear-gradient(90deg, transparent, #ffffff 30%, #e4e2de 55%, transparent 80%);
  animation: vbRibbonFlow 20s ease-in-out infinite alternate; }
.vb-r2 { left: -15vmax; top: 58vh; transform: rotate(-10deg); opacity: .4;
  background: linear-gradient(90deg, transparent, #f6f5f3 35%, #d3d1cd 60%, transparent 85%);
  animation: vbRibbonFlow 26s ease-in-out infinite alternate-reverse; }
@keyframes vbDrift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(9vmax,6vmax) scale(1.12); } }
@keyframes vbDrift2 { from { transform: translate(0,0) scale(1.05); } to { transform: translate(-8vmax,7vmax) scale(.94); } }
@keyframes vbDrift3 { from { transform: translate(0,0) scale(.96); } to { transform: translate(7vmax,-6vmax) scale(1.1); } }
@keyframes vbRibbonFlow { from { transform: rotate(-14deg) translateX(-4vmax); opacity: .38; } 50% { opacity: .6; } to { transform: rotate(-11deg) translateX(5vmax); opacity: .42; } }
.vb-grain { position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 无边框窗口：拖拽区与窗控 ---------- */
.vb-drag { position: absolute; top: 0; left: 0; right: 0; height: 40px; -webkit-app-region: drag; z-index: 20; }
.vb-winctl {
  position: absolute; top: 12px; right: 12px; z-index: 30; display: flex; gap: 2px;
  -webkit-app-region: no-drag;
}
.vb-winctl button {
  width: 34px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  color: #7a7a76; transition: color .18s, background-color .18s;
}
.vb-winctl button:hover { color: #141414; background: rgba(20,20,20,.07); }
.vb-winctl button.vb-close:hover { color: #fff; background: #c42b1c; }

/* ---------- 通用玻璃与按钮 ---------- */
.vb-glass {
  background: var(--vb-glass);
  -webkit-backdrop-filter: blur(26px) saturate(1.25); backdrop-filter: blur(26px) saturate(1.25);
  border: 1px solid var(--vb-glass-line);
  box-shadow: 0 1px 0 rgba(255,255,255,.75) inset, 0 24px 60px -16px rgba(20,20,20,.14), 0 2px 10px rgba(20,20,20,.05);
}
.vb-btn-solid {
  width: 100%; height: 48px; margin-top: 8px;
  background: rgba(20,20,20,.92); color: #fff; font-size: 14.5px; font-weight: 550;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 20px rgba(20,20,20,.18);
  transition: opacity .2s, transform .14s var(--vb-ease), box-shadow .25s;
}
.vb-btn-solid:hover:not(:disabled) { opacity: .85; }
.vb-btn-solid:active:not(:disabled) { transform: scale(.98); }
.vb-btn-solid:disabled { opacity: .5; cursor: default; }

@keyframes vbRise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- 开场动画（V 两半构成） ---------- */
.vb-splash { position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; }
.vb-mark { position: relative; width: 150px; height: 150px; }
.vb-piece, .vb-piece svg { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 50% 59.21875%; }
.vb-piece svg { display: block; overflow: visible; }
.vb-piece-left { animation: vbPieceL 2.92s .08s cubic-bezier(.34,0,.12,1) both, vbFadeIn .64s .08s cubic-bezier(.33,0,.3,1) both; }
.vb-piece-right { animation: vbPieceR 2.74s .26s cubic-bezier(.34,0,.12,1) both, vbFadeIn .64s .26s cubic-bezier(.33,0,.3,1) both; }
.vb-piece svg { animation: vbUnfold 2.18s cubic-bezier(.3,0,.16,1) both; }
.vb-piece-left svg { animation-delay: .18s; }
.vb-piece-right svg { animation-delay: .36s; }
@keyframes vbPieceL { from { transform: translate3d(-23%, 11%, 0) rotate(-23deg); } to { transform: none; } }
@keyframes vbPieceR { from { transform: translate3d(23%, -11%, 0) rotate(23deg); } to { transform: none; } }
@keyframes vbUnfold { from { transform: scale3d(.045, .78, 1); } to { transform: none; } }
@keyframes vbFadeIn { from { opacity: 0; } to { opacity: 1; } }
.vb-splash-word {
  position: absolute; bottom: 88px; left: 0; right: 0; text-align: center;
  font-size: 12.5px; letter-spacing: .1em; text-indent: .1em; color: var(--vb-text-2);
  animation: vbWordIn .9s 2.5s var(--vb-ease) both;
}
@keyframes vbWordIn { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.vb-splash-note { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--vb-text-3); z-index: 6; }

/* ---------- 登录页（透明 · 透出丝带背景 · 极简 · 分步） ---------- */
.vb-stage.vb-auth {
  position: absolute; inset: 0; z-index: 5; background: transparent; color-scheme: light;
  animation: vbFadeIn .32s ease both;
  --vb-text: #111; --vb-text-2: #747474; --vb-text-3: #818181;
}
.vb-auth, .vb-auth * { box-sizing: border-box; }
.vb-auth-scroll {
  position: absolute; inset: 64px 0 0; display: flex; flex-direction: column; align-items: center;
  overflow: auto; overscroll-behavior: contain; padding: 24px 28px 52px;
}
.vb-auth-inner { flex: none; width: 420px; max-width: 100%; margin: auto 0; text-align: center; }
.vb-auth-logo { display: block; width: 36px; height: 36px; margin: 0 auto 24px; user-select: none; }
.vb-auth-pages { position: relative; transition: height .36s var(--vb-ease); }
.vb-auth-step { display: flow-root; animation: vbStepIn .34s var(--vb-ease) both; }
.vb-auth-step.is-leaving { animation: vbStepOut .13s ease-in both; pointer-events: none; }
@keyframes vbStepIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes vbStepOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-5px); } }
.vb-auth-headline { font-size: 26px; font-weight: 650; letter-spacing: -.035em; line-height: 1.35; margin: 0 0 10px; }
.vb-auth-sub { font-size: 14px; color: var(--vb-text-2); line-height: 1.7; margin: 0 0 36px; }
.vb-auth .vb-text-link {
  display: inline; padding: 2px 0; color: var(--vb-text); font-size: inherit; font-weight: 500;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
  text-decoration-color: #b4b4b4; border-radius: 2px;
  transition: color .18s, text-decoration-color .18s;
}
.vb-auth .vb-text-link:hover:not(:disabled) { text-decoration-color: #111; }
.vb-auth-emailrow { display: flex; align-items: baseline; justify-content: center; gap: 12px; }
.vb-auth-email { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #626262; }
.vb-auth-emailrow .vb-text-link { flex: none; }
.vb-auth button:focus-visible { outline: 2px solid #333; outline-offset: 4px; }
.vb-auth button:disabled { cursor: default; }

.vb-auth form { text-align: left; }
.vb-auth-fields { min-width: 0; padding: 0; margin: 0; border: 0; }
.vb-field { margin-bottom: 16px; animation: vbFieldIn .3s var(--vb-ease) both; }
@keyframes vbFieldIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.vb-label { display: block; font-size: 13px; font-weight: 600; letter-spacing: .01em; color: var(--vb-text); margin-bottom: 7px; }
.vb-field input {
  width: 100%; height: 44px; padding: 0 14px; box-sizing: border-box;
  font-size: 14px; border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  transition: border-color .18s, box-shadow .18s;
}
.vb-field input::placeholder { color: #a3a3a3; }
.vb-field input:hover { border-color: rgba(0,0,0,.24); }
.vb-field input:focus { border-color: rgba(0,0,0,.55); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.vb-auth .vb-field { margin: 0 0 20px; animation: none; }
.vb-auth .vb-label { font-size: 13.5px; font-weight: 500; letter-spacing: 0; margin-bottom: 9px; line-height: 1.5; }
.vb-auth .vb-field input {
  height: 48px; padding: 0 15px; font-size: 14px; border: 1px solid #dedede; border-radius: 10px;
  background: #fff; color: #111; box-shadow: 0 1px 2px #00000004;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.vb-auth .vb-field input::placeholder { color: #919191; opacity: 1; }
.vb-auth .vb-field input:hover:not(:disabled) { border-color: #b9b9b9; }
.vb-auth .vb-field input:focus { outline: none; border-color: #777; box-shadow: 0 0 0 3px #00000005; }
.vb-auth .vb-field input[aria-invalid="true"] { border-color: #b42318; }
.vb-auth .vb-field input:disabled { color: #747474; }
.vb-auth .vb-field input:-webkit-autofill { -webkit-text-fill-color: #111; -webkit-box-shadow: 0 0 0 100px #fff inset; }
.vb-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.vb-label-row .vb-forgot { font-size: 12px; font-weight: 400; color: #737373; text-decoration: none; padding: 0; }
.vb-label-row .vb-forgot:hover { color: #111; }
.vb-password-wrap { position: relative; }
.vb-auth .vb-password-wrap input { padding-right: 48px; }
.vb-auth .vb-password-toggle {
  position: absolute; right: 4px; top: 4px; width: 40px; height: 40px;
  display: grid; place-items: center; color: #8a8a8a; border-radius: 7px; transition: color .18s, background-color .18s;
}
.vb-password-toggle:hover:not(:disabled) { color: #111; background: #f7f7f7; }
.vb-password-toggle svg { width: 18px; height: 18px; }
.vb-code-row, .vb-captcha-row { display: flex; gap: 12px; }
.vb-code-row input, .vb-captcha-row input { flex: 1; min-width: 0; }
.vb-code-btn {
  flex: none; min-width: 116px; height: 48px; padding: 0 14px; border-radius: 10px;
  font-size: 12.5px; font-weight: 500; color: var(--vb-text); font-variant-numeric: tabular-nums;
  background: #fff; border: 1px solid #dedede;
  transition: background-color .18s, border-color .18s, transform .12s, opacity .18s;
}
.vb-code-btn:hover:not(:disabled) { background: rgba(0,0,0,.035); border-color: rgba(0,0,0,.28); }
.vb-code-btn:active:not(:disabled) { transform: scale(.97); }
.vb-code-btn:disabled { opacity: .5; cursor: default; }
.vb-captcha-img {
  flex: none; width: 116px; height: 48px; padding: 0; border-radius: 10px; overflow: hidden;
  border: 1px solid #dedede; background: #fff;
  display: grid; place-items: center;
  transition: border-color .18s, transform .12s;
}
.vb-captcha-img:hover { border-color: rgba(0,0,0,.32); }
.vb-captcha-img:active { transform: scale(.97); }
.vb-captcha-img > span { display: grid; place-items: center; width: 100%; height: 100%; }
.vb-captcha-img svg { width: 100%; height: 100%; display: block; }
.vb-captcha-retry { font-size: 10.5px; line-height: 1.4; color: var(--vb-text-2); padding: 0 6px; text-align: center; }
.vb-auth-error, .vb-auth-notice { margin: -4px 0 14px; font-size: 12.5px; line-height: 1.6; overflow-wrap: anywhere; }
.vb-auth-error { color: #b42318; }
.vb-auth-notice { color: #626262; }

.vb-auth .vb-btn-solid {
  height: 48px; margin-top: 6px; border-radius: 10px; background: #111; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 14px; font-weight: 550; box-shadow: none;
  transition: background-color .2s, transform .18s var(--vb-ease), opacity .2s;
}
.vb-auth .vb-btn-solid:hover:not(:disabled) { opacity: 1; background: #292929; }
.vb-auth .vb-btn-solid:active:not(:disabled) { transform: scale(.99); }
.vb-auth .vb-btn-solid svg { width: 17px; height: 17px; transition: transform .22s var(--vb-ease); }
.vb-auth .vb-btn-solid:hover:not(:disabled) svg { transform: translateX(3px); }
.vb-auth-fields:disabled .vb-btn-solid { opacity: .55; }
.vb-spin {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: vbSpin .7s linear infinite;
}
@keyframes vbSpin { to { transform: rotate(360deg); } }

.vb-auth-divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 22px; color: var(--vb-text-3); font-size: 12px; line-height: 18px; }
.vb-auth-divider::before, .vb-auth-divider::after { content: ''; flex: 1; height: 1px; background: #e9e9e9; }
.vb-auth-alt-row { display: flex; gap: 12px; }
.vb-btn-outline {
  flex: 1; min-width: 0; height: 46px; padding: 0 12px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 13px; font-weight: 500; color: var(--vb-text); white-space: nowrap;
  background: #fff; border: 1px solid #dedede; box-shadow: 0 1px 2px #00000004;
  transition: background-color .18s, border-color .18s, transform .12s;
}
.vb-btn-outline:hover:not(:disabled) { background: #fafafa; border-color: #b9b9b9; }
.vb-btn-outline:active:not(:disabled) { transform: scale(.985); }
.vb-btn-outline:disabled { opacity: .55; }
.vb-btn-outline svg { flex: none; width: 17px; height: 17px; }
.vb-auth .vb-lang-corner { background: #fff; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.vb-auth .vb-lang-corner button { font-size: 12px; padding: 6px 9px; color: #858585; }
.vb-auth .vb-lang-corner button.on { background: #f4f4f4; color: #171717; }
.vb-auth-foot { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11px; line-height: 1.6; color: #818181; }
.vb-auth-foot-links { display: flex; gap: 12px; font-size: 12px; }
.vb-auth.is-long .vb-auth-scroll { padding-top: 8px; padding-bottom: 32px; }
.vb-auth.is-long .vb-auth-logo { margin-bottom: 18px; }
.vb-auth.is-long .vb-auth-sub { margin-bottom: 26px; }
.vb-auth.is-long .vb-field { margin-bottom: 14px; }
.vb-auth.is-long .vb-auth-divider { margin: 20px 0 16px; }
.vb-auth.is-long .vb-auth-foot { margin-top: 24px; }
@media (max-width: 480px) {
  .vb-auth-scroll { padding: 14px 24px 32px; }
  .vb-auth-headline { font-size: 24px; }
  .vb-auth .vb-field input { font-size: 16px; }
  .vb-auth-alt-row { gap: 10px; }
  .vb-btn-outline { padding: 0 9px; gap: 7px; font-size: 12px; }
}
@media (max-height: 700px) {
  .vb-auth-scroll { padding-top: 8px; padding-bottom: 32px; }
  .vb-auth-logo { margin-bottom: 18px; }
  .vb-auth-sub { margin-bottom: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .vb-stage.vb-auth, .vb-auth *, .vb-auth *::before, .vb-auth *::after {
    animation: none !important; transition: none !important;
  }
}
.vb-lang-corner {
  position: absolute; top: 22px; left: 26px; z-index: 10;
  display: flex; gap: 2px; font-size: 12.5px; color: var(--vb-text-3);
  border: 1px solid rgba(255,255,255,.55); border-radius: 99px; padding: 3px;
  background: rgba(255,255,255,.30); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  -webkit-app-region: no-drag;
}
.vb-lang-corner button { padding: 4px 12px; border-radius: 99px; transition: background-color .2s, color .2s; }
.vb-lang-corner button.on { background: rgba(20,20,20,.9); color: #fff; }
.vb-lang-corner button:not(.on):hover { color: var(--vb-text); }

/* ---------- 注册后引导（编辑式白底 · 去卡片化） ----------
   纯白画布 + 顶部进度轨 + 单列内容流；无玻璃卡片、无阴影堆叠，
   层次靠字号/灰阶/留白，转场用对焦式位移。 */
.vb-onb {
  position: absolute; inset: 0; z-index: 5; background: transparent; color-scheme: light;
  --vb-text: #111; --vb-text-2: #6b6b6b; --vb-text-3: #9a9a9a;
  display: flex; flex-direction: column;
  animation: vbFadeIn .3s ease both;
}
.vb-onb, .vb-onb * { box-sizing: border-box; }
.vb-onb-top {
  flex: none; display: flex; align-items: center; gap: 18px;
  padding: 22px 40px 0; max-width: 760px; width: 100%; margin: 0 auto;
}
.vb-onb-stepno { flex: none; font-size: 11px; letter-spacing: .16em; color: var(--vb-text-3); font-variant-numeric: tabular-nums; }
.vb-onb-track { flex: 1; height: 2px; background: #ececec; border-radius: 2px; overflow: hidden; }
.vb-onb-track i { display: block; height: 100%; background: #111; border-radius: 2px; transition: width .4s var(--vb-ease); }
.vb-onb-skip { flex: none; font-size: 12.5px; color: var(--vb-text-3); padding: 6px 2px; transition: color .18s; }
.vb-onb-skip:hover:not(:disabled) { color: var(--vb-text); }
.vb-onb-skip:disabled { opacity: .5; cursor: default; }

.vb-onb-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; }
.vb-onb-col {
  width: 560px; max-width: calc(100vw - 64px); margin: auto; padding: 44px 0 56px;
  animation: vbOnbIn .38s var(--vb-ease) both;
}
@keyframes vbOnbIn { from { opacity: 0; transform: translateY(12px); filter: blur(3px); } to { opacity: 1; transform: none; filter: blur(0); } }
.vb-onb-title { font-size: 27px; font-weight: 650; letter-spacing: -.03em; line-height: 1.3; color: var(--vb-text); margin-bottom: 10px; }
.vb-onb-sub { font-size: 13.5px; color: var(--vb-text-2); line-height: 1.7; margin-bottom: 30px; }

/* 欢迎步：能力清单用细线分隔的编辑式列表，不用卡片 */
.vb-onb-caps { list-style: none; margin: 0; padding: 0; border-top: 1px solid #ececec; }
.vb-onb-caps li {
  position: relative; padding: 15px 0 15px 22px; border-bottom: 1px solid #ececec;
  font-size: 13.5px; line-height: 1.65; color: var(--vb-text);
  animation: vbOnbItem .4s var(--vb-ease) both;
}
.vb-onb-caps li:nth-child(2) { animation-delay: .06s; }
.vb-onb-caps li:nth-child(3) { animation-delay: .12s; }
@keyframes vbOnbItem { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.vb-onb-caps li::before { content: ''; position: absolute; left: 2px; top: 23px; width: 5px; height: 5px; border-radius: 50%; background: #111; }

/* 场景步：单列单选列表（细边、无阴影堆叠） */
.vb-onb-scenarios { display: flex; flex-direction: column; gap: 9px; }
.vb-onb-sc {
  display: grid; grid-template-columns: 18px 1fr; grid-template-rows: auto auto; column-gap: 13px;
  padding: 13px 16px; text-align: left; border: 1px solid #e4e4e4; border-radius: 12px; background: #fff;
  transition: border-color .18s, background-color .18s, transform .12s var(--vb-ease);
}
.vb-onb-sc:hover { border-color: #c9c9c9; background: #fafafa; }
.vb-onb-sc:active { transform: scale(.99); }
.vb-onb-sc.on { border-color: #111; background: #fff; box-shadow: 0 0 0 1px #111; }
.vb-onb-sc-radio { grid-row: 1 / 3; align-self: center; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c9c9c9; display: grid; place-items: center; transition: border-color .18s; }
.vb-onb-sc.on .vb-onb-sc-radio { border-color: #111; }
.vb-onb-sc.on .vb-onb-sc-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #111; animation: vbPop .22s var(--vb-ease); }
@keyframes vbPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.vb-onb-sc-label { font-size: 14px; font-weight: 600; color: var(--vb-text); line-height: 1.4; }
.vb-onb-sc-sub { font-size: 12px; color: var(--vb-text-3); line-height: 1.5; margin-top: 1px; }

/* 工作空间步：单输入框 */
.vb-onb-field { margin-bottom: 18px; }
.vb-onb-label { display: block; font-size: 13px; font-weight: 500; color: var(--vb-text); margin-bottom: 9px; }
.vb-onb-field input {
  width: 100%; height: 48px; padding: 0 15px; font-size: 14px; color: #111;
  border: 1px solid #dedede; border-radius: 10px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.vb-onb-field input::placeholder { color: #a3a3a3; }
.vb-onb-field input:hover { border-color: #b9b9b9; }
.vb-onb-field input:focus { outline: none; border-color: #777; box-shadow: 0 0 0 3px rgba(0,0,0,.05); }

/* 外观步：三列主题样片（沿用原样片绘制，白底下改细边） */
.vb-ob-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.vb-theme-card {
  display: flex; flex-direction: column; gap: 10px; padding: 10px; text-align: left;
  border: 1px solid #e4e4e4; border-radius: 13px; background: #fff;
  transition: border-color .2s var(--vb-ease), background-color .2s var(--vb-ease), transform .14s var(--vb-ease);
}
.vb-theme-card:hover { background: #fafafa; border-color: #c9c9c9; }
.vb-theme-card:active { transform: scale(.98); }
.vb-theme-card.on { border-color: #111; box-shadow: 0 0 0 1px #111; background: #fff; }
.vb-theme-swatch { height: 64px; border-radius: 9px; overflow: hidden; border: 1px solid rgba(20,20,20,.08); display: flex; flex-direction: column; padding: 8px; gap: 5px; }
.vb-sw-light { background: linear-gradient(160deg, #ffffff, #f1f0ee); }
.vb-sw-dark { background: linear-gradient(160deg, #1c1c1e, #101012); }
.vb-sw-auto { background: linear-gradient(115deg, #ffffff 0 50%, #131315 50% 100%); }
.vb-theme-swatch i { display: block; height: 5px; border-radius: 4px; }
.vb-sw-light i { background: rgba(20,20,20,.14); }
.vb-sw-light i:last-child { width: 55%; background: rgba(20,20,20,.28); }
.vb-sw-dark i { background: rgba(255,255,255,.16); }
.vb-sw-dark i:last-child { width: 55%; background: rgba(255,255,255,.34); }
.vb-sw-auto i { background: rgba(20,20,20,.16); }
.vb-sw-auto i:last-child { width: 55%; background: linear-gradient(90deg, rgba(20,20,20,.3) 50%, rgba(255,255,255,.4) 50%); }
.vb-theme-name { font-size: 13px; font-weight: 550; display: flex; align-items: center; justify-content: space-between; }
.vb-theme-tick { width: 15px; height: 15px; border-radius: 99px; border: 1.5px solid rgba(20,20,20,.25); display: grid; place-items: center; transition: border-color .22s var(--vb-ease); }
.vb-theme-card.on .vb-theme-tick { border-color: var(--vb-text); }
.vb-theme-card.on .vb-theme-tick::after { content: ''; width: 7px; height: 7px; border-radius: 99px; background: var(--vb-text); animation: vbPop .22s var(--vb-ease); }

/* 语言步：两行选项（白底细边） */
.vb-onb-langs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.vb-lang-card {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; min-height: 70px;
  border: 1px solid #e4e4e4; border-radius: 12px; background: #fff;
  transition: border-color .2s var(--vb-ease), background-color .2s var(--vb-ease), transform .14s var(--vb-ease);
}
.vb-lang-card:hover { background: #fafafa; border-color: #c9c9c9; }
.vb-lang-card:active { transform: scale(.99); }
.vb-lang-card.on { border-color: #111; box-shadow: 0 0 0 1px #111; background: #fff; }
.vb-lang-card-name { font-size: 14.5px; font-weight: 600; color: var(--vb-text); }
.vb-lang-card-sub { font-size: 12px; color: var(--vb-text-3); margin-top: 2px; }

/* 测试步：双栏并排（细线分栏，非卡片） */
.vb-onb-test { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #e4e4e4; border-radius: 12px; overflow: hidden; }
.vb-onb-test-col { padding: 14px 16px 16px; min-width: 0; }
.vb-onb-test-col + .vb-onb-test-col { border-left: 1px solid #e4e4e4; }
.vb-onb-test-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.vb-onb-test-model { font-size: 12.5px; font-weight: 600; color: var(--vb-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb-onb-test-ms { flex: none; font-size: 11px; color: var(--vb-text-3); font-variant-numeric: tabular-nums; }
.vb-onb-test-body { font-size: 12.5px; line-height: 1.7; color: var(--vb-text-2); min-height: 64px; overflow-wrap: anywhere; }
.vb-onb-test-err { color: #b42318; }
.vb-onb-test-idle { color: #c9c9c9; }
.vb-onb-test-wait { display: inline-flex; gap: 5px; padding-top: 6px; }
.vb-onb-test-wait i { width: 6px; height: 6px; border-radius: 50%; background: #c9c9c9; animation: vbWaitDot 1.1s ease-in-out infinite; }
.vb-onb-test-wait i:nth-child(2) { animation-delay: .15s; }
.vb-onb-test-wait i:nth-child(3) { animation-delay: .3s; }
@keyframes vbWaitDot { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.vb-onb-test-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.vb-onb-test-run {
  height: 38px; padding: 0 20px; border-radius: 10px; background: #111; color: #fff;
  font-size: 13px; font-weight: 550; transition: background-color .18s, transform .12s var(--vb-ease);
}
.vb-onb-test-run:hover { background: #292929; }
.vb-onb-test-run:active { transform: scale(.98); }
.vb-onb-test-running { font-size: 12.5px; color: var(--vb-text-3); }
.vb-onb-test-note { font-size: 13px; color: var(--vb-text-2); line-height: 1.7; padding: 14px 16px; border: 1px dashed #dedede; border-radius: 10px; }

/* 收尾步：完成清单（对勾 + 细线行） */
.vb-onb-checks { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid #ececec; }
.vb-onb-checks li {
  display: flex; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid #ececec;
  font-size: 13.5px; color: var(--vb-text);
  animation: vbOnbItem .4s var(--vb-ease) both;
}
.vb-onb-checks li:nth-child(2) { animation-delay: .05s; }
.vb-onb-checks li:nth-child(3) { animation-delay: .1s; }
.vb-onb-checks li:nth-child(4) { animation-delay: .15s; }
.vb-onb-checks li:nth-child(5) { animation-delay: .2s; }
.vb-onb-checks li:nth-child(6) { animation-delay: .25s; }
.vb-onb-checks i {
  flex: none; width: 17px; height: 17px; border-radius: 50%; background: #111;
  display: grid; place-items: center;
}
.vb-onb-checks i::after { content: ''; width: 8px; height: 4.5px; border-left: 1.6px solid #fff; border-bottom: 1.6px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.vb-onb-done-hint { font-size: 12.5px; color: var(--vb-text-3); line-height: 1.6; }

/* 资料步：当前昵称提示 + 油画头像选择器（选择器基础样式见 dialogs.css） */
.vb-ob-nick { font-size: 12.5px; color: var(--vb-text-2); margin: -14px 0 16px; }
.vb-ob-nick b { color: var(--vb-text); font-weight: 600; margin-left: 4px; }
.vb-onb .yh-ap { margin: 0 0 18px; }
.vb-onb .yh-ap-label { color: var(--vb-text-3); }
.vb-onb .yh-ap-tile { border-color: #e4e4e4; background: #fafafa; }
.vb-onb .yh-ap-tile.on { border-color: #111; box-shadow: 0 0 0 1px #111; }
.vb-onb .yh-ap-upload { background: #fafafa; }

/* 底部操作行 */
.vb-onb-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 34px; }
.vb-onb-back { font-size: 13px; color: var(--vb-text-3); padding: 8px 4px; transition: color .2s; }
.vb-onb-back:hover:not(:disabled) { color: var(--vb-text); }
.vb-onb-back:disabled { opacity: .5; cursor: default; }
.vb-onb .vb-btn-solid {
  width: auto; padding: 0 28px; height: 44px; margin-top: 0; border-radius: 11px;
  background: #111; color: #fff; font-size: 14px; font-weight: 550; box-shadow: none;
  transition: background-color .2s, transform .14s var(--vb-ease), opacity .2s;
}
.vb-onb .vb-btn-solid:hover:not(:disabled) { opacity: 1; background: #292929; }
.vb-onb .vb-btn-solid:active:not(:disabled) { transform: scale(.985); }
.vb-onb .vb-btn-solid:disabled { opacity: .45; cursor: default; }

@media (max-width: 640px) {
  .vb-onb-top { padding: 18px 22px 0; }
  .vb-onb-col { max-width: calc(100vw - 44px); padding: 32px 0 44px; }
  .vb-onb-title { font-size: 23px; }
  .vb-onb-test { grid-template-columns: 1fr; }
  .vb-onb-test-col + .vb-onb-test-col { border-left: 0; border-top: 1px solid #e4e4e4; }
}
@media (prefers-reduced-motion: reduce) {
  .vb-onb, .vb-onb *, .vb-onb *::before, .vb-onb *::after { animation: none !important; transition: none !important; }
}

/* ---------- 加载动画（居中徽标 + 扫光，安静型） ---------- */
.vb-loader { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 5; }
.vb-loader-mark {
  width: 104px; height: 104px; display: grid; place-items: center;
  animation: vbMarkIn .72s cubic-bezier(.2,.8,.2,1) both;
}
.vb-loader-mark svg {
  width: 100%; height: 100%; overflow: visible; display: block;
  filter: drop-shadow(0 12px 26px rgba(16,16,16,.16));
}
/* 扫光带：按标记轮廓裁剪，只在笔画内部从左向右流过一次，长时间静止 */
.vb-mark-sweep { animation: vbSweep 3.4s cubic-bezier(.45,.05,.35,1) infinite; will-change: transform, opacity; }
@keyframes vbMarkIn { from { opacity: 0; transform: translateY(7px) scale(.965); } to { opacity: 1; transform: none; } }
@keyframes vbSweep {
  0%, 4% { transform: translateX(-18px); opacity: 0; }
  14% { opacity: 1; }
  44% { transform: translateX(80px); opacity: 1; }
  52%, 100% { transform: translateX(80px); opacity: 0; }
}
.vb-loader-text {
  margin-top: 28px; font-size: 12px; color: var(--vb-text-3);
  letter-spacing: .24em; text-indent: .24em;
  animation: vbTextFade 2.8s ease-in-out infinite;
}
@keyframes vbTextFade { 0%, 100% { opacity: .38; } 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  .vb-loader-mark, .vb-mark-sweep, .vb-loader-text { animation: none !important; }
}

/* ---------- 阶段切换过渡 ---------- */
.vb-stage { position: absolute; inset: 0; animation: vbRise .5s var(--vb-ease) both; }
/* Shared desktop/web workbench. Keep product behavior in the existing components. */
:root,
.yh-app.is-web {
  --bg-window: #ffffff;
  --bg-sidebar: #f3f4f7;
  --bg-subtle: #f5f5f5;
  --bg-hover: #e9eaee;
  --bg-accent: #e4e5e9;
  --border: #ebebed;
  --border-strong: #d5d6da;
  --text: #202123;
  --text-muted: #737579;
  --text-faint: #96989c;
  --accent: #202123;
  --accent-contrast: #ffffff;
  --ink: #202123;
  --teal: #202123;
  --teal-hover: #3c3d40;
  --teal-accent: #737579;
  --accent-teal: #202123;
  --accent-teal-hover: #3c3d40;
  --success: #737579;
  --sidebar-glass: var(--bg-sidebar);
  --rail-glass: var(--bg-sidebar);
  --chat-glass: var(--bg-window);
  --composer-glass: var(--bg-window);
  --composer-border: var(--border);
  --shell-background: var(--bg-sidebar);
  --glass-inset: 0 0 transparent;
  --shadow-menu: 0 6px 22px #00000012;
  --shadow-composer: 0 2px 10px #00000006;
  --shadow-composer-scrolled: var(--shadow-composer);
  --glass-underlay: linear-gradient(145deg, #e9ebef 0%, #f8f9fa 48%, #e8eaee 100%);
  --glass-main: rgba(255, 255, 255, .78);
  --glass-side: rgba(244, 246, 249, .72);
  --glass-panel: rgba(255, 255, 255, .68);
  --glass-highlight: rgba(255, 255, 255, .92);
  --glass-flow: rgba(56, 59, 65, .76);
  --glass-flow-soft: rgba(80, 84, 92, .44);
  --radius: 8px;
  --radius-lg: 8px;
  --radius-xl: 24px;
  --sidebar-w: 280px;
  --rail-w: 0px;
}

:root[data-theme='dark'] {
  --bg-window: #202020;
  --bg-sidebar: #181818;
  --bg-subtle: #2a2a2a;
  --bg-hover: #303030;
  --bg-accent: #383838;
  --border: #303030;
  --border-strong: #444444;
  --text: #ededed;
  --text-muted: #a1a1a1;
  --text-faint: #858585;
  --accent: #ededed;
  --accent-contrast: #202020;
  --ink: #ededed;
  --teal: #ededed;
  --teal-hover: #ffffff;
  --teal-accent: #a1a1a1;
  --success: #a1a1a1;
  --sidebar-glass: var(--bg-sidebar);
  --rail-glass: var(--bg-sidebar);
  --chat-glass: var(--bg-window);
  --composer-glass: var(--bg-window);
  --composer-border: var(--border);
  --shell-background: var(--bg-sidebar);
  --shadow-menu: 0 6px 22px #00000040;
  --shadow-composer: 0 2px 10px #00000018;
  --glass-underlay: linear-gradient(145deg, #111214 0%, #292b2f 48%, #151618 100%);
  --glass-main: rgba(31, 31, 33, .76);
  --glass-side: rgba(22, 23, 25, .72);
  --glass-panel: rgba(38, 39, 42, .68);
  --glass-highlight: rgba(255, 255, 255, .16);
  --glass-flow: rgba(255, 255, 255, .9);
  --glass-flow-soft: rgba(255, 255, 255, .42);
}

/* 桌面端：对话输入框/工具卡流光保持中性灰白（不变）；顶栏专用壁纸流光变量跟随顶栏区域色（--wpt-accent，拖动窗口实时变化） */
.yh-app:not(.is-web) {
  --wp-flow: color-mix(in srgb, var(--wpt-accent, var(--wp-accent, #4a4e55)) 52%, #4a4e55);
  --wp-flow-soft: color-mix(in srgb, var(--wpt-accent, var(--wp-accent, #6e727a)) 44%, #6e727a);
}
:root[data-theme='dark'] .yh-app:not(.is-web) {
  --wp-flow: color-mix(in srgb, var(--wpt-accent, var(--wp-accent, #ffffff)) 52%, #ffffff);
  --wp-flow-soft: color-mix(in srgb, var(--wpt-accent, var(--wp-accent, #b9bcc4)) 44%, #b9bcc4);
}
/* 侧边栏/标题栏/顶栏内容叠在壁纸极光之上（极光层 z0，内容 z1；排除极光层自身） */
.yh-sidebar .yh-sidebar-inner,
.yh-titlebar > :not(.yh-aurora),
.yh-topbar > :not(.yh-aurora) { position: relative; z-index: 1; }
/* 拖动窗口期间只暂停"重活"动画（工具卡扫光、下载按钮），合成器压力可控；
   环境流光（aurora / 顶栏扫光）继续跑——一旦冻住再解冻，松手瞬间会有明显跳变，
   让"跟随壁纸变色"看起来是卡顿的。 */
[data-wp-drag='1'] .yh-download-btn::after,
[data-wp-drag='1'] .yh-tool-card.is-running::after,
[data-wp-drag='1'] .yh-tool-card.is-awaiting::after { animation-play-state: paused; }

body { background: var(--glass-underlay); letter-spacing: 0; }
:root body:has(.yh-app:not(.is-web)) { background: transparent; }
body::after,
.yh-app.is-web::before,
.yh-composer::before,
.yh-download-btn::after,
.yh-tool-card.is-running::after,
.yh-tool-card.is-awaiting::after { display: none; }
.yh-app { background: transparent; color: var(--text); }
.yh-app-shell { background: var(--glass-underlay); transition: none; }
.yh-app:not(.is-web) .yh-app-shell { background: transparent; }
.yh-app:has(.yh-modal-overlay, .yh-set-overlay) .yh-app-shell { transform: none; }
.yh-app :where(button, input, textarea, select, h1, h2, h3, span, small, p, a) { letter-spacing: 0; }
.yh-app :where(.yh-icon-btn, .yh-top-action, .yh-rail-btn, .yh-send-btn, .yh-menu-item, .yh-conv, .yh-conv-select, .yh-ws-trigger, .yh-mode-toggle, .yh-voice-mode-btn, .yh-approval-chip):hover,
.yh-app :where(.yh-icon-btn, .yh-top-action, .yh-rail-btn, .yh-menu-item, .yh-conv, .yh-conv-select, .yh-ws-trigger):active { transform: none; }
.yh-app :where(.yh-icon-btn, .yh-top-action, .yh-menu-item, .yh-conv, .yh-conv-select, .yh-ws-trigger) {
  transition: background-color 140ms ease, color 140ms ease, opacity 140ms ease;
}
.yh-app :where(.yh-titlebar, .yh-sidebar, .yh-main-col, .yh-topbar, .yh-composer, .yh-set-side, .yh-set-main, .yh-notif-panel, .yh-approval-menu, .yh-auth-panel) {
  backdrop-filter: blur(var(--glass-blur, 23px)) saturate(135%);
  -webkit-backdrop-filter: blur(var(--glass-blur, 23px)) saturate(135%);
}

/* One navigation column, one continuous canvas. */
.yh-titlebar {
  height: 32px; background: var(--glass-side); border: 0; padding-left: 4px;
  box-shadow: inset 0 1px var(--glass-highlight);
}
/* 标题栏底部扫光条：与对话顶栏同款流光机制（--wp-flow 跟随顶栏壁纸区域色），
   两条顶栏的光带连成一体，侧边栏极光 + 顶栏光带 = 一个整体 */
.yh-titlebar::after {
  content: ''; position: absolute; left: -58%; bottom: -1px; width: 58%; height: 3px; pointer-events: none; z-index: 0;
  background: linear-gradient(90deg, transparent 0%, transparent 9%, var(--wp-flow-soft) 25%, var(--wp-flow) 50%, var(--wp-flow-soft) 75%, transparent 91%, transparent 100%);
  filter: blur(1.2px) drop-shadow(0 0 6px var(--wp-flow-soft)) drop-shadow(0 0 10px color-mix(in srgb, var(--wpt-accent, var(--wp-accent, transparent)) 55%, transparent));
  will-change: transform;
  animation: yh-glass-topbar-flow 6s linear infinite;
  opacity: calc(var(--glass-flow-opacity, .6) * .55);
}
.yh-titlebar-left { padding: 0; gap: 0; }
.yh-titlebar-icon { width: 29px; height: 26px; border-radius: 5px; }
.yh-titlebar-sep { display: none; }
.yh-menu-trigger { padding: 0 10px; font-size: 13px; }
.yh-menu-trigger::after { display: none; }
.yh-win-btn { width: 44px; }
.yh-body, .yh-workspace { min-height: 0; }
.yh-app.is-web .yh-body { height: auto; }
.yh-main-col {
  background: color-mix(in srgb, var(--glass-main) calc(var(--glass-surface-opacity, .6) * 100%), var(--bg-window)); border-radius: 14px 0 0 0; overflow: hidden;
  box-shadow: inset 1px 1px var(--glass-highlight);
}
.yh-chat { background: transparent; }
.yh-sidebar, .yh-sidebar.is-web {
  background: color-mix(in srgb, var(--glass-side) calc(var(--glass-surface-opacity, .6) * 100%), var(--bg-sidebar)); border: 0;
  box-shadow: inset -1px 0 color-mix(in srgb, var(--glass-highlight) 72%, transparent);
}
/* 标题栏与侧栏完全同材质：透明，透出同一片 L 形极光；不加自己的玻璃底色，
   否则会在透明的侧栏上方压出一条更"实"的横带，产生分层感。 */
.yh-app:not(.is-web) .yh-titlebar {
  background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.yh-app:not(.is-web) .yh-sidebar,
.yh-app:not(.is-web) .yh-set-side {
  background: color-mix(in srgb, var(--glass-side) calc(22% + var(--glass-surface-opacity, .6) * 26%), transparent);
}
.yh-app:not(.is-web) .yh-main-col,
.yh-app:not(.is-web) .yh-set-main {
  background: color-mix(in srgb, var(--glass-main) calc(28% + var(--glass-surface-opacity, .6) * 36%), transparent);
}
/* 对话顶栏（"积分"那一行）纯白：与下方对话卡片同色连贯，不参与流光。
   纯白不透明背景必须同时关闭 backdrop-filter，否则 Mica 透明窗口下会渲染成黑屏（1.11.157 教训）。 */
.yh-app:not(.is-web) .yh-topbar {
  background: var(--bg-window);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.yh-app:not(.is-web) .yh-dock {
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--glass-main) 24%, transparent));
}
.yh-app:not(.is-web) .yh-composer,
.yh-app:not(.is-web) .yh-chat-content.is-empty .yh-composer {
  background: color-mix(in srgb, var(--glass-panel) calc(40% + var(--glass-surface-opacity, .6) * 40%), transparent);
}
.yh-app:not(.is-web) .wb-shell {
  flex: 1;
  min-width: 0;
  width: 100%;
  background: transparent;
}
.yh-app:not(.is-web) .wb-left,
.yh-app:not(.is-web) .wb-right {
  background: color-mix(in srgb, var(--glass-side) calc(24% + var(--glass-surface-opacity, .6) * 24%), transparent);
}
.yh-app:not(.is-web) .wb-inspector,
.yh-app:not(.is-web) .wb-modal {
  background: color-mix(in srgb, var(--glass-panel) 82%, transparent);
  backdrop-filter: blur(var(--glass-blur, 23px)) saturate(135%);
  -webkit-backdrop-filter: blur(var(--glass-blur, 23px)) saturate(135%);
}
/* Keep light text surfaces legible over dark wallpapers while retaining native Mica.
   恢复原始磨砂玻璃材质：半透明玻璃色 + backdrop blur（壁纸极光是子元素，画在玻璃之上天然可见）；
   不透明度跟随设置里的"磨砂强度"滑块（--glass-surface-opacity）实时变化 */
:root:not([data-theme='dark']) .yh-app:not(.is-web) :is(.yh-sidebar, .yh-set-side, .wb-left, .wb-right) {
  background: color-mix(in srgb, var(--glass-side) calc(44% + var(--glass-surface-opacity, .6) * 24%), transparent);
}
:root:not([data-theme='dark']) .yh-app:not(.is-web) .yh-titlebar {
  background: transparent;
}
:root:not([data-theme='dark']) .yh-app:not(.is-web) :is(.yh-main-col, .yh-set-main) {
  background: color-mix(in srgb, var(--glass-main) calc(52% + var(--glass-surface-opacity, .6) * 20%), transparent);
}
:root:not([data-theme='dark']) .yh-app:not(.is-web) .yh-topbar {
  background: #ffffff;
}
.yh-sidebar-inner, .yh-sidebar.is-web .yh-sidebar-inner { width: var(--sidebar-w); padding: 0; }
.yh-sidebar-backdrop { display: none; }
.yh-workspace-heading { height: 58px; padding: 0 12px; justify-content: space-between; gap: 6px; }
.yh-workspace-heading-right { gap: 0; }
.yh-workspace-heading-right .yh-icon-btn { width: 28px; height: 30px; }
.yh-sidebar-brand { gap: 8px; }
.yh-sidebar-brand-name { color: var(--text); font-size: 20px; font-weight: 600; }
.yh-ws-switch { margin: 0; flex: 1; min-width: 0; z-index: 80; }
.yh-ws-trigger { width: auto; max-width: 100%; padding: 6px 4px; justify-content: flex-start; gap: 7px; border-radius: 6px; }
.yh-ws-trigger-text { font-size: 20px; font-weight: 600; }
.yh-ws-current { font-size: 11px; color: var(--text-faint); margin-left: 3px; }
.yh-ws-menu { top: calc(100% + 4px); left: 0; right: auto; width: 248px; max-width: calc(100vw - 24px); padding: 5px; border-radius: 8px; }
.yh-ws-option { padding: 10px; animation: none; }
.yh-ws-option-text strong { font-size: 14px; }
.yh-ws-option-text small { font-size: 12px; }
.yh-sidebar-nav, .yh-sidebar.is-web .yh-sidebar-nav { padding: 0 8px 8px; }
.yh-sidebar-nav > button, .yh-sidebar.is-web .yh-sidebar-nav button {
  width: 100%; height: 36px; padding: 0 10px; font-size: 14px; font-weight: 400;
  gap: 9px; border: 0; border-radius: 6px; background: transparent; box-shadow: none;
}
.yh-conv-list, .yh-sidebar.is-web .yh-conv-list { padding: 8px 8px 18px; display: block; overflow-y: auto; }
.yh-conv-group + .yh-conv-group { margin-top: 28px; }
.yh-conv-group-label, .yh-sidebar.is-web .yh-conv-group-label { display: flex; padding: 0 3px 8px; font-size: 12px; font-weight: 500; color: var(--text-faint); }
.yh-group-toggle { gap: 4px; padding: 2px 3px; }
.yh-conv { height: 36px; margin: 1px 0; border-radius: 6px; }
.yh-conv.is-active::before { display: none; }
.yh-conv-select { padding: 0 10px; font-size: 14px; color: var(--text); }
.yh-conv-more { transform: none; margin-right: 3px; }
.yh-project { border-radius: 6px; }
.yh-project-row { height: 36px; border-radius: 6px; }
.yh-project.is-active > .yh-project-row { background: transparent; }
.yh-project-select { font-size: 14px; gap: 8px; }
.yh-project-toggle { width: 20px; }
.yh-project-count { background: transparent; padding: 0 3px; }
.yh-project-convs { padding-left: 22px; gap: 1px; }
.yh-conv.is-indented .yh-conv-select { font-size: 13px; color: var(--text-muted); }
.yh-project-path { display: none; }
.yh-project-add { height: 32px; font-size: 13px; }
.yh-sidebar-empty, .yh-sidebar.is-web .yh-sidebar-empty { margin: 0; padding: 7px 10px; text-align: left; font-size: 12px; }
.yh-projects-add { opacity: .65; }
.yh-projects-add:hover { opacity: 1; }
.yh-sidebar-foot { flex: none; padding: 8px 10px 10px; border-top: 1px solid var(--border); }
.yh-sidebar-utilities { display: flex; align-items: center; justify-content: flex-start; gap: 6px; padding: 0 2px 6px; }
.yh-sidebar-utilities .yh-icon-btn { width: 30px; height: 30px; }
.yh-sidebar-account { display: flex; align-items: center; gap: 4px; }
.yh-sidebar-user { flex: 1; min-width: 0; padding: 6px; height: 36px; text-align: left; }
.yh-sidebar-user .yh-user-name { max-width: none; color: var(--text-muted); }
.yh-sidebar-account > .yh-icon-btn { width: 32px; height: 32px; }
.yh-download-btn {
  display: flex; padding: 5px 7px; margin: 0 0 5px; height: 30px; background: transparent;
  color: var(--text-muted); font-size: 12px; font-weight: 400; border-radius: 6px; box-shadow: none; animation: none;
}
.yh-download-btn:hover { background: var(--bg-hover); box-shadow: none; transform: none; }
.yh-batch-bar { flex-wrap: wrap; margin: 0 8px 8px; padding: 6px; border-radius: 6px; box-shadow: none; }
.yh-batch-count { flex: 1 0 100%; padding: 0 6px; }
.yh-notif-panel { background: var(--bg-window); border-radius: 8px; box-shadow: var(--shadow-menu); }
.yh-notif-list { padding: 4px; }
.yh-notif-item { border: 0; border-radius: 6px; }

/* Header, transcript and composer share a single content axis. */
.yh-topbar {
  height: 54px; padding: 0 22px; border-bottom: 1px solid color-mix(in srgb, var(--border-strong) 72%, transparent);
  gap: 10px; position: relative; overflow: hidden; background: color-mix(in srgb, var(--glass-panel) calc(var(--glass-surface-opacity, .6) * 100%), var(--bg-window));
  box-shadow: inset 0 1px var(--glass-highlight);
}
.yh-topbar::after {
  content: ''; position: absolute; left: -58%; bottom: -2px; width: 58%; height: 4px; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, transparent 9%, var(--wp-flow-soft) 25%, var(--wp-flow) 50%, var(--wp-flow-soft) 75%, transparent 91%, transparent 100%);
  filter: blur(1.2px) drop-shadow(0 0 6px var(--wp-flow-soft)) drop-shadow(0 0 10px color-mix(in srgb, var(--wpt-accent, var(--wp-accent, transparent)) 55%, transparent));
  will-change: transform;
  animation: yh-glass-topbar-flow 6s linear infinite;
  opacity: calc(var(--glass-flow-opacity, .6) * .4);
}
@keyframes yh-glass-topbar-flow {
  from { transform: translateX(0); }
  to { transform: translateX(272%); }
}
.yh-topbar-left { flex: 1; min-width: 0; gap: 10px; }
.yh-chat-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.yh-chat-identity > svg { color: var(--text); }
.yh-chat-heading { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; }
.yh-project-crumb { flex: none; background: transparent; font-size: 11px; height: auto; padding: 0 0 0 10px; max-width: 150px; border-left: 1px solid var(--border); border-radius: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yh-topbar-right { flex: none; gap: 2px; }
.yh-top-credits {
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; flex: none;
  width: 106px; height: 30px; padding: 0 3px; margin-right: 11px;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.yh-top-credits:hover, .yh-top-credits:focus-visible { background: transparent; }
.yh-top-credits:focus-visible { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.yh-top-credits:hover .yh-top-credits-value { text-decoration: underline; text-decoration-color: var(--text-muted); text-underline-offset: 3px; }
.yh-top-credits.is-empty .yh-top-credits-value { color: var(--text-muted); }
.yh-top-credits-value { font-size: 12.5px; font-weight: 500; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yh-top-credits-unit { font-size: 12px; font-weight: 400; line-height: 18px; color: var(--text-muted); }
.yh-top-action { width: 30px; height: 30px; }
.yh-top-action > svg { width: 17px; height: 17px; }
.yh-top-action.yh-top-new { border: 0; background: transparent; }
.yh-topbar-sep { height: 16px; margin: 0 5px; }
.yh-messages-inner, .yh-app.is-web .yh-messages-inner {
  width: min(920px, calc(100% - 80px)); max-width: 920px; padding: 34px 0 28px; margin: 0 auto; gap: 32px;
}
.yh-chat.has-canvas .yh-messages-inner { width: calc(100% - 48px); max-width: 920px; }
.yh-msg-row { animation: yh-workbench-enter 180ms ease both; }
@keyframes yh-workbench-enter { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.yh-msg-content { font-size: 15px; line-height: 1.85; }
.yh-msg-assistant .yh-md > :where(p, h1, h2, h3, h4, ul, ol, blockquote, hr) { max-width: 740px; }
.yh-msg-assistant .yh-md > p { margin-bottom: 16px; text-wrap: wrap; }
.yh-msg-assistant .yh-md :where(h1, h2, h3, h4) { letter-spacing: 0; text-wrap: wrap; }
.yh-msg-assistant .yh-md li { margin: 6px 0; }
.yh-msg-assistant .yh-md > :where(pre, .yh-code, .yh-table-wrap, table) { max-width: 100%; }
.yh-msg-actions:not(.is-expanded) > .yh-act-secondary { display: none; }
.yh-msg-actions.is-expanded { flex-wrap: wrap; }
.yh-msg-actions.is-expanded > .yh-act-secondary { animation: yh-fade-in 140ms ease both; }
.yh-msg-actions .yh-act-more[aria-expanded='true'] { background: var(--bg-hover); color: var(--text); }
.yh-msg-model { font-size: 10px; opacity: .7; }
.yh-user-bubble-text, .yh-app.is-web .yh-msg-user .yh-user-bubble-text {
  max-width: 80%; font-size: 15px; padding: 10px 16px; border: 0; border-radius: 18px; line-height: 1.65;
  background: var(--bg-subtle); box-shadow: none;
}
:root:not([data-theme='dark']) .yh-user-bubble-text { background: #ffffff; }
.yh-msg-assistant { gap: 12px; }
.yh-process-wrap { display: grid; grid-template-rows: auto 1fr; max-width: none; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-anchor: none; }
.yh-process-wrap.is-closed { grid-template-rows: auto 0fr; }
.yh-process-head { display: flex; align-items: center; gap: 6px; max-width: 100%; width: fit-content; padding: 4px 0; border-radius: 4px; font-size: 12px; color: var(--text-faint); }
.yh-process-summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(430px, 42vw); }
.yh-process-title { font-weight: 400; }
.yh-process-body { padding: 8px 0 2px; }
.yh-progress-list { max-width: none; gap: 12px; margin: 0 0 12px; }
.yh-progress-update { color: var(--text-muted); font-size: 14px; line-height: 1.7; grid-template-columns: 8px minmax(0, 1fr); gap: 10px; }
.yh-progress-dot { width: 4px; height: 4px; margin-top: .75em; }
.yh-tool-list { max-width: none; margin: 6px 0; }
.yh-tool-toggle { padding-left: 0; }
.yh-tool-spinner { border-top-color: var(--text-muted); }
.yh-thinking-head { font-size: 13px; color: var(--text-faint); }
.yh-thinking-body { border-left-color: var(--border-strong); }
.yh-msg-stage { font-size: 13px; }
.yh-msg-loading { width: 12px; height: 12px; margin: 0 8px 0 0; border: 1.5px solid var(--border-strong); border-top-color: var(--text-muted); background: transparent; animation: yh-mic-spin 900ms linear infinite; }
.yh-msg-loading::before, .yh-msg-loading::after { display: none; }
.yh-dock, .yh-app.is-web .yh-chat-content.is-empty .yh-dock, .yh-chat-content.is-empty .yh-dock {
  position: relative; left: auto; right: auto; bottom: auto; flex: none; padding: 12px 40px 18px;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--glass-main) 94%, transparent) 36%);
  transform: none; transition: none; will-change: auto; pointer-events: auto;
}
.yh-dock-inner, .yh-app.is-web .yh-dock-inner { max-width: 920px; }
.yh-credit-notice {
  display: flex; align-items: center; gap: 9px; min-height: 38px;
  margin: 0 3px 10px; padding: 8px 9px 8px 12px;
  border-radius: 8px; background: color-mix(in srgb, var(--glass-panel) 85%, var(--bg-window));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 14%, transparent), 0 8px 24px #00000010;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  color: var(--text); font-size: 12.5px; line-height: 1.45;
  animation: yh-credit-notice-in 260ms var(--ease-out) both;
}
.yh-credit-notice > svg { flex: none; color: var(--text-muted); }
.yh-credit-notice > span { flex: 1; min-width: 0; }
.yh-credit-notice-action { flex: none; padding: 5px 2px; font-size: 12px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.yh-credit-notice-action:hover { color: var(--text-muted); }
.yh-credit-notice-close { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--text-muted); }
.yh-credit-notice-close:hover { background: var(--bg-hover); color: var(--text); }
.yh-credit-notice :is(button):focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
@keyframes yh-credit-notice-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.yh-credit-notice.is-leaving { animation: yh-credit-notice-out 200ms var(--ease-out) both; pointer-events: none; }
@keyframes yh-credit-notice-out { to { opacity: 0; transform: translateY(-4px); } }
@media (max-width: 520px) { .yh-credit-notice { flex-wrap: wrap; } .yh-credit-notice > span { flex-basis: calc(100% - 32px); } .yh-credit-notice-action { margin-left: 25px; } }
@media (prefers-reduced-motion: reduce) { .yh-credit-notice, .yh-credit-notice.is-leaving { animation: none; } }
.yh-composer-wrap, .yh-app.is-web .yh-composer-wrap { padding: 0; }
.yh-composer, .yh-chat-content.is-empty .yh-composer, .yh-app.is-web .yh-composer {
  border: 1px solid color-mix(in srgb, var(--border) 74%, var(--glass-highlight)); border-radius: 24px;
  background: color-mix(in srgb, var(--glass-panel) calc(var(--glass-surface-opacity, .6) * 100%), var(--bg-window));
  box-shadow: inset 0 1px var(--glass-highlight), inset 0 -1px #00000007, 0 1px 2px #0000000b, 0 14px 38px #0000000d;
  transition: border-color 140ms ease, box-shadow 180ms ease;
}
.yh-composer::before,
.yh-chat-content.is-empty .yh-composer::before {
  content: ''; display: block; position: absolute; inset: -1px; z-index: 2; border-radius: inherit; padding: 1px;
  pointer-events: none; opacity: var(--glass-flow-opacity, .9);
  background: linear-gradient(105deg, transparent 8%, var(--glass-flow-soft) 28%, var(--glass-flow) 50%, var(--glass-flow-soft) 72%, transparent 92%);
  background-size: 220% 100%; filter: drop-shadow(0 0 7px var(--glass-flow-soft));
  will-change: background-position;
  animation: yh-glass-composer-flow 5s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
@keyframes yh-glass-composer-flow {
  from { background-position: 140% 0; }
  to { background-position: -140% 0; }
}
.yh-composer:focus-within, .yh-chat-content.is-scrolled .yh-composer:focus-within,
.yh-app.is-web .yh-composer:focus-within {
  border-color: color-mix(in srgb, var(--border-strong) 56%, var(--glass-highlight));
  box-shadow: inset 0 1px var(--glass-highlight), 0 0 0 3px color-mix(in srgb, var(--text) 6%, transparent), 0 16px 40px #00000018;
}
.yh-composer:focus-within::before { animation-duration: 4.6s; }
.yh-app[data-glass-flow='off'] .yh-topbar::after,
.yh-app[data-glass-flow='off'] .yh-composer::before,
.yh-app[data-glass-flow='off'] .yh-tool-card.is-running::after,
.yh-app[data-glass-flow='off'] .yh-tool-card.is-awaiting::after,
.yh-app[data-glass-motion='off'] .yh-topbar::after,
.yh-app[data-glass-motion='off'] .yh-composer::before,
.yh-app[data-glass-motion='off'] .yh-tool-card.is-running::after,
.yh-app[data-glass-motion='off'] .yh-tool-card.is-awaiting::after { display: none; }
.yh-composer-input, .yh-app.is-web .yh-composer-input { min-height: 72px; padding: 18px 20px 8px; font-size: 15px; line-height: 1.65; }
.yh-composer-input::placeholder, .yh-app.is-web .yh-composer-input::placeholder { color: var(--text-faint); }
.yh-composer-bar { padding: 4px 12px 12px; gap: 8px; }
.yh-composer-tools, .yh-composer-right { gap: 3px; }
.yh-send-btn { width: 34px; height: 34px; transition: opacity 140ms ease; }
.yh-send-btn:hover:not(:disabled) { transform: none; transition: opacity 140ms ease; }
.yh-send-btn:disabled { background: var(--bg-accent); color: var(--text-faint); }
.yh-model-trigger { font-size: 12px; font-weight: 400; max-width: 240px; padding: 0 7px; }
.yh-model-name { max-width: 200px; }
.yh-model-vendor-logo { display: none; }
.yh-attachments { padding: 0 8px; }
.yh-composer-hint, .yh-composer-error { padding-top: 5px; }
.yh-scroll-bottom { bottom: calc(var(--dock-height, 156px) + 8px); z-index: 35; }
.yh-tool-card.is-running::after,
.yh-tool-card.is-awaiting::after {
  display: block; left: 0; right: 8%; bottom: -2px; height: 2px; opacity: var(--glass-flow-opacity, .9);
  background: linear-gradient(90deg, transparent 0%, var(--glass-flow-soft) 30%, var(--glass-flow) 50%, var(--glass-flow-soft) 70%, transparent 100%);
  background-size: 220% 100%; filter: blur(.6px) drop-shadow(0 0 4px var(--glass-flow-soft));
  animation: yh-tool-flow 3.2s linear infinite;
}
.yh-caret,
.yh-caret-inline {
  background: color-mix(in srgb, var(--text) 76%, var(--text-faint));
  opacity: .9;
  box-shadow: 0 0 7px var(--glass-flow-soft), 0 0 2px var(--glass-flow);
}
.yh-empty-center, .yh-app.is-web .yh-empty-center {
  position: static; inset: auto; width: min(calc(100% - 80px), 920px); flex: 0 1 auto;
  align-self: stretch; align-items: flex-start; justify-content: flex-end;
  margin: 0 auto; padding: 24px 20px clamp(28px, 7cqh, 72px);
}
.yh-empty-center h1, .yh-app.is-web .yh-empty-center h1 {
  font-size: 28px; font-weight: 500; line-height: 1.4; text-align: left;
  color: var(--text); -webkit-text-fill-color: currentColor;
}
.yh-auth-brand-mark { animation: none; filter: none; }
.yh-followup-chip { border-radius: 6px; box-shadow: none; padding: 6px 9px; }
.yh-deliver-card { border-radius: 8px; background: transparent; box-shadow: none; }
.yh-details { border-radius: 8px; }
.yh-app :where(.yh-action-menu, .yh-conv-menu, .yh-menu-pop, .yh-model-menu, .yh-approval-menu, .yh-suggest, .yh-user-menu) { border-radius: 8px; background: var(--bg-window); box-shadow: var(--shadow-menu); }
.yh-app :where(.yh-approval-option, .yh-suggest-item, .yh-action-menu > button) { border-radius: 6px; }
.yh-md :where(h1, h2, h3, h4) { color: var(--text); }
.yh-code, .yh-table-wrap { border-radius: 8px; }

/* Settings: frosted glass stacked group cards, not a flat white work area. */
.yh-set-overlay:has(> .yh-set-panel) { padding: 0; background: var(--glass-underlay); animation: yh-fade-in 140ms ease both; }
.yh-app:not(.is-web) > .yh-set-overlay:has(> .yh-set-panel) { top: 32px; }
.yh-app:not(.is-web) > .yh-set-overlay:has(> .yh-set-panel) { background: transparent; }
.yh-app:not(.is-web):has(> .yh-set-overlay > .yh-set-panel) .yh-app-shell > .yh-body {
  visibility: hidden;
}
.yh-set-panel, :root[data-theme='dark'] .yh-set-panel {
  width: 100%; height: 100%; max-width: none; max-height: none; border: 0; border-radius: 0;
  box-shadow: none; background: transparent; animation: none; flex-direction: row;
}
.yh-set-side {
  width: var(--sidebar-w); padding: 20px 12px; border: 0; background: color-mix(in srgb, var(--glass-side) calc(var(--glass-surface-opacity, .6) * 100%), var(--bg-sidebar));
  box-shadow: inset -1px 0 color-mix(in srgb, var(--glass-highlight) 72%, transparent);
}
.yh-set-side-title { display: block; font-size: 20px; padding: 2px 8px 22px; }
/* 设置总体布局简洁化：去掉导航分组标签行，导航项紧凑排列，不再有多层分组视觉。 */
.yh-set-nav-group-label { display: none; }
.yh-set-side nav { flex-direction: column; min-height: 0; gap: 2px; }
.yh-set-nav-item { height: 36px; font-size: 13px; padding: 0 10px; }
.yh-set-main {
  background: color-mix(in srgb, var(--glass-main) 46%, transparent);
  backdrop-filter: blur(30px) saturate(150%); -webkit-backdrop-filter: blur(30px) saturate(150%);
  border-radius: 14px 0 0 0;
  box-shadow: inset 1px 1px var(--glass-highlight);
}
.yh-set-content { max-width: 860px; margin: 0 auto; padding: 36px 40px 48px; }
.yh-set-page-title { font-size: 22px; font-weight: 600; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
.yh-set-close { position: fixed; top: 16px; right: 20px; width: 32px; height: 32px; color: var(--text-muted); }
.yh-app:not(.is-web) .yh-set-close { top: 46px; }
.yh-cfg-group-wrap { margin-bottom: 22px; }
.yh-cfg-group-label { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.yh-cfg-group {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: color-mix(in srgb, var(--glass-panel) 62%, transparent);
  backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: inset 0 1px var(--glass-highlight);
}
.yh-cfg-row { min-height: 72px; padding: 16px 18px; gap: 24px; }
.yh-cfg-row:hover { background: color-mix(in srgb, var(--glass-panel) 30%, transparent); }
.yh-cfg-row-text { flex: 1; gap: 5px; }
.yh-cfg-row-title { font-size: 14px; font-weight: 400; }
.yh-cfg-row-desc { font-size: 12px; color: var(--text-muted); }
.yh-glass-range { display: flex; align-items: center; gap: 12px; min-width: 180px; }
.yh-glass-range input { width: 146px; accent-color: var(--text); }
.yh-glass-range span { min-width: 38px; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-muted); }
.yh-cfg-field { padding: 14px 0; }
.yh-cfg-input, .yh-cfg-select, .yh-set-textarea { border-radius: 6px; background: var(--bg-window); box-shadow: none; }
.yh-cfg-empty { padding: 14px 0; }
.yh-account-pw { border: 0; border-radius: 0; background: transparent; padding: 0; }
.yh-account-head, .yh-cfg-about { padding: 10px 0; }
.yh-account-collapse { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 14px 0; }
.yh-cfg-about-logo { animation: none; }
.yh-set-search { margin: 0 0 20px; background: transparent; }
.yh-cfg-about-name { font-size: 24px; }
.yh-modal-overlay { background: #00000026; animation-duration: 140ms; }
.yh-app :where(.yh-library, .yh-command-palette, .yh-shortcuts, .yh-cp-dialog, .yh-auth-panel, .yh-whatsnew, .yh-favorites-panel) {
  border-radius: 8px; background: var(--glass-panel); box-shadow: inset 0 1px var(--glass-highlight), var(--shadow-menu);
  backdrop-filter: blur(28px) saturate(140%); -webkit-backdrop-filter: blur(28px) saturate(140%);
}
.yh-auth-field input, .yh-auth-code-row .yh-secondary-btn { background: var(--bg-window); border-color: var(--border-strong); border-radius: 6px; backdrop-filter: none; box-shadow: none; }
.yh-auth-submit { background: var(--text); color: var(--bg-window); border-radius: 6px; box-shadow: none; }
.yh-app :where(.yh-task-card, .yh-template-card) { border-radius: 8px; box-shadow: none; }

@media (max-width: 1100px) {
  :root { --sidebar-w: 250px; }
  .yh-workspace-heading { padding: 0 9px; }
  .yh-ws-current { display: none; }
  .yh-messages-inner, .yh-app.is-web .yh-messages-inner { width: calc(100% - 56px); }
  .yh-dock { padding-right: 28px; padding-left: 28px; }
  .yh-topbar { padding: 0 16px; }
  .yh-project-crumb { display: none; }
}

@media (max-width: 768px) {
  .yh-main-col, .yh-set-main { border-radius: 0; }
  .yh-app.is-web .yh-main-col { padding: 0; }
  .yh-sidebar, .yh-app.is-web .yh-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 90; width: min(300px, 86vw); max-width: none;
    transform: translateX(0); transition: transform 180ms ease; box-shadow: 8px 0 28px #00000012;
  }
  .yh-app:not(.is-web) .yh-sidebar { top: 32px; }
  .yh-sidebar.is-collapsed, .yh-app.is-web .yh-sidebar.is-collapsed { width: min(300px, 86vw); transform: translateX(-100%); box-shadow: none; }
  .yh-sidebar-inner, .yh-sidebar.is-web .yh-sidebar-inner { width: 100%; }
  .yh-sidebar-backdrop, .yh-app.is-web .yh-sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 85; background: #00000026; }
  .yh-app:not(.is-web) .yh-sidebar-backdrop { top: 32px; }
  .yh-topbar { height: 50px; padding: 0 10px; }
  .yh-topbar-left { gap: 6px; }
  .yh-chat-identity { gap: 6px; }
  .yh-chat-heading { font-size: 13px; }
  .yh-topbar-right { gap: 0; }
  .yh-top-credits { width: 86px; margin-right: 4px; padding: 0 2px; }
  .yh-top-action { width: 28px; }
  .yh-topbar-sep { margin: 0 2px; }
  .yh-messages-inner, .yh-app.is-web .yh-messages-inner, .yh-chat.has-canvas .yh-messages-inner { width: calc(100% - 40px); padding: 24px 0; gap: 28px; }
  .yh-dock, .yh-chat-content.is-empty .yh-dock, .yh-app.is-web .yh-chat-content.is-empty .yh-dock { padding: 8px 14px max(12px, env(safe-area-inset-bottom)); }
  .yh-composer, .yh-app.is-web .yh-composer { border-radius: 20px; }
  .yh-composer-input, .yh-app.is-web .yh-composer-input { padding: 14px 16px 6px; min-height: 64px; }
  .yh-composer-tools { gap: 1px; }
  .yh-composer-bar { padding: 4px 8px 8px; }
  .yh-app.is-web .yh-composer-tools .yh-icon-btn { min-width: 34px; min-height: 34px; }
  .yh-empty-center, .yh-app.is-web .yh-empty-center {
    width: calc(100% - 28px); padding: 20px 16px clamp(22px, 6cqh, 54px);
  }
  .yh-empty-center h1, .yh-app.is-web .yh-empty-center h1 { font-size: 24px; }
  .yh-user-bubble-text { max-width: 92%; }
  .yh-activity { left: 2px; }
  .yh-peek { width: min(300px, calc(100% - 34px)); }
  .yh-set-panel { flex-direction: column; }
  .yh-set-side { width: 100%; padding: 14px 16px 10px; flex: none; }
  .yh-set-side-title { padding: 0 0 12px; font-size: 18px; }
  .yh-set-search { margin-bottom: 10px; }
  .yh-set-side nav { flex-direction: row; overflow-x: auto; gap: 0; padding: 0 0 4px; flex: none; }
  .yh-set-nav-group { display: flex; flex: none; }
  .yh-set-nav-group-label { display: none; }
  .yh-set-nav-item { width: auto; flex: none; padding: 0 12px; white-space: nowrap; }
  .yh-set-content { padding: 24px 20px 40px; }
  .yh-set-page-title { font-size: 20px; padding-bottom: 18px; margin-bottom: 24px; }
  .yh-cfg-row { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .yh-cfg-row-text { flex: 1 0 100%; }
  .yh-cfg-row-control { max-width: 100%; }
  .yh-cfg-select { max-width: 100%; }
  .yh-set-close { top: 10px; right: 12px; }
  .yh-app:not(.is-web) .yh-set-close { top: 42px; }
}

/* 桌面端仅一块 L 形 chrome 材质：先一层磨砂，再一层连续的壁纸色。
   旧实现把三处分别画成独立光团，且主列灰底/圆角盖住顶栏，接缝必然断开。 */
.yh-app:not(.is-web) .yh-app-shell { position: relative; isolation: isolate; --chrome-top-height: 86px; }
.yh-app:not(.is-web) .yh-app-shell::before,
.yh-app:not(.is-web) .yh-app-shell::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 100% var(--chrome-top-height), var(--chrome-side-width, var(--sidebar-w)) var(--chrome-top-height), var(--chrome-side-width, var(--sidebar-w)) 100%, 0 100%);
}
.yh-app:not(.is-web) .yh-app-shell::before {
  background: color-mix(in srgb, var(--glass-side) calc(55% + var(--glass-surface-opacity, .6) * 20%), transparent);
  backdrop-filter: blur(var(--glass-blur, 23px)) saturate(135%);
  -webkit-backdrop-filter: blur(var(--glass-blur, 23px)) saturate(135%);
}
/* 壁纸极光整体弱化（默认 .3，用户仍可用滑块 0-100 相对调节）：
   渐变浓度同步降到 44/40/42/36，避免高不透明度下彩色团过饱和刺眼。 */
.yh-app:not(.is-web) .yh-app-shell::after {
  opacity: var(--wp-glow, .3);
  background:
    radial-gradient(ellipse 85% 48% at 15% 17%, color-mix(in srgb, var(--wpc-1, var(--wp-1, #6688a9)) 44%, transparent), transparent 85%),
    radial-gradient(ellipse 65% 75% at 8% 66%, color-mix(in srgb, var(--wpc-2, var(--wp-2, #92b0ad)) 40%, transparent), transparent 88%),
    radial-gradient(ellipse 80% 55% at 78% 5%, color-mix(in srgb, var(--wpc-3, var(--wp-3, #859bb5)) 42%, transparent), transparent 87%),
    radial-gradient(ellipse 55% 70% at 2% 95%, color-mix(in srgb, var(--wpc-4, var(--wp-4, #9aad9b)) 36%, transparent), transparent 88%);
}
.yh-app:not(.is-web) .yh-app-shell > :is(.yh-titlebar, .yh-body, .yh-control-stack) { position: relative; z-index: 1; }
/* 仅侧栏保持透明、透出 L 形流光；标题栏与对话顶栏有自己的白底规则（见下方纯白覆盖）。 */
.yh-app:not(.is-web) .yh-sidebar {
  background: transparent; border: 0; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
/* 历史后置浅色主题覆盖必须一并关掉，否则侧栏又会变回灰白。 */
:root:not([data-theme='dark']) .yh-app:not(.is-web) .yh-sidebar { background: transparent; }
/* 分区处理：标题栏（菜单那行）与侧栏同材质——透明透极光、无扫光条、无自身玻璃底；
   对话顶栏（"积分"那行）纯白，与下方对话卡片同色连贯。 */
.yh-app:not(.is-web) :is(.yh-titlebar, .yh-topbar) {
  border: 0; box-shadow: none;
}
.yh-app:not(.is-web) :is(.yh-sidebar, .yh-titlebar, .yh-topbar) .yh-aurora { display: none; }
.yh-app:not(.is-web) .yh-sidebar { border-right: 0; box-shadow: none; }
.yh-app:not(.is-web) .yh-titlebar { border-bottom: 0; box-shadow: none; }
.yh-app:not(.is-web) .yh-topbar { border-bottom: 0; box-shadow: none; }
/* 主列对话卡片恢复黄金比例圆角（左上 14px）：背景由 .yh-chat-content 自顶栏底边起画，
   main-col 自身保持透明——否则会盖住 L 形 chrome 层伸进顶栏的部分，重新出现断层；
   圆角由 overflow:hidden 裁出，仅保留内侧高光线，不加外侧描边/角影（无灰线）。 */
.yh-app:not(.is-web) .yh-main-col:has(.yh-chat),
:root:not([data-theme='dark']) .yh-app:not(.is-web) .yh-main-col:has(.yh-chat) {
  background: transparent;
  border-radius: 14px 0 0 0;
  overflow: hidden;
  box-shadow: inset 1px 1px var(--glass-highlight);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.yh-app:not(.is-web) .yh-chat-content { background: var(--bg-window); }
:root:not([data-theme='dark']) .yh-app:not(.is-web) .yh-chat-content { background: #ffffff; }
/* 标题栏不加扫光条：那条灰白流动横带正是分层感的来源，去掉后与侧栏连成一体。
   对话顶栏（积分那行）纯白，扫光条同样关闭。 */
.yh-app:not(.is-web) .yh-titlebar::after { display: none; }
.yh-app:not(.is-web) .yh-topbar::after { display: none; }
@media (max-width: 560px) { .yh-app:not(.is-web) .yh-app-shell { --chrome-top-height: 82px; } }

@media (prefers-reduced-motion: reduce) {
  .yh-app .yh-topbar::after, .yh-app .yh-composer::before,
  .yh-app .yh-chat-content.is-empty .yh-composer::before,
  .yh-app .yh-tool-card.is-running::after, .yh-app .yh-tool-card.is-awaiting::after { display: none; }
  .yh-msg-row, .yh-msg-loading, .yh-brand-logo, .yh-caret, .yh-caret-inline,
  .yh-topbar::after, .yh-composer::before, .yh-tool-card.is-running::after, .yh-tool-card.is-awaiting::after { animation: none; }
  .yh-app *, .yh-app *::before, .yh-app *::after { transition-duration: .01ms; animation-duration: .01ms; }
}
.yh-svc-panel { width: 100%; max-width: 780px; color: var(--text); }
.yh-svc-subtitle { margin: 0 0 27px; font-size: 12px; line-height: 1.6; color: var(--text-muted); }
.yh-svc-group-label { margin: 24px 0 9px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.yh-svc-list { border-top: 1px solid var(--border); }
.yh-svc-card { display: flex; align-items: center; min-height: 68px; border-bottom: 1px solid var(--border); }
.yh-svc-main { display: flex; flex: 1; min-width: 0; align-items: center; gap: 13px; padding: 11px 8px 11px 0; text-align: left; }
.yh-svc-main:hover .yh-svc-name { color: var(--teal-accent); }
.yh-svc-badge { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-subtle); }
.yh-svc-info { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
.yh-svc-name-row, .yh-svc-meta { display: flex; min-width: 0; align-items: center; gap: 6px; }
.yh-svc-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 550; }
.yh-svc-tag { flex: none; font-size: 11px; font-weight: 500; color: var(--teal-accent); }
.yh-svc-tag-muted { color: var(--text-faint); }
.yh-svc-name-row { flex-wrap: wrap; }
.yh-svc-proto { max-width: 100%; flex-wrap: wrap; }
.yh-svc-footer-actions .yh-svc-save:disabled { cursor: wait; opacity: .55; }
.yh-svc-meta { overflow: hidden; white-space: nowrap; font-size: 11px; color: var(--text-muted); }
.yh-svc-host { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.yh-svc-dot { color: var(--text-faint); }
.yh-svc-check { flex: none; color: var(--teal-accent); }
.yh-svc-actions { display: flex; flex: none; align-items: center; gap: 2px; padding-left: 6px; }
.yh-svc-icon-btn { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 5px; color: var(--text-muted); }
.yh-svc-icon-btn:hover, .yh-svc-key-toggle:hover, .yh-svc-back:hover, .yh-svc-fetch:hover { background: var(--bg-hover); color: var(--text); }
.yh-svc-icon-btn.is-armed { width: auto; color: var(--danger); }
.yh-svc-armed-text { white-space: nowrap; font-size: 11px; }
.yh-svc-empty { padding: 15px 0; font-size: 12px; line-height: 1.5; color: var(--text-faint); }
.yh-svc-add, .yh-svc-add-model, .yh-svc-fetch, .yh-svc-back { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 12px; }
.yh-svc-add { height: 36px; margin-top: 15px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 6px; }
.yh-svc-add:hover { background: var(--bg-hover); }
.yh-svc-back { height: 32px; margin: 0 0 20px -8px; padding: 0 8px; border-radius: 5px; color: var(--text-muted); }
.yh-svc-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.yh-svc-label { font-size: 12px; font-weight: 600; color: var(--text); }
.yh-svc-optional { font-weight: 400; color: var(--text-faint); }
.yh-svc-input { width: 100%; min-height: 38px; padding: 8px 11px; }
.yh-svc-input-mono { font-family: var(--mono); font-size: 12px; }
.yh-svc-hint { font-size: 11px; line-height: 1.5; color: var(--text-muted); }
.yh-svc-seg { display: inline-flex; width: fit-content; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-subtle); }
.yh-svc-seg button { min-width: 60px; height: 27px; padding: 0 10px; border-radius: 4px; font-size: 11px; color: var(--text-muted); }
.yh-svc-seg button:hover { color: var(--text); }
.yh-svc-seg button.is-active { background: var(--bg-window); box-shadow: 0 1px 3px #00000012; color: var(--text); }
.yh-svc-key-row { display: flex; gap: 7px; align-items: center; }
.yh-svc-key-row .yh-svc-input { flex: 1; min-width: 0; }
.yh-svc-key-toggle { flex: none; min-width: 52px; height: 38px; padding: 0 8px; border: 1px solid var(--border); border-radius: 6px; }
.yh-svc-models-head, .yh-svc-footer, .yh-svc-footer-actions, .yh-svc-test-area { display: flex; align-items: center; gap: 12px; }
.yh-svc-models-head { justify-content: space-between; min-height: 32px; }
.yh-svc-fetch { min-height: 30px; padding: 0 8px; border-radius: 5px; }
.yh-svc-model-list { max-height: 310px; overflow: auto; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.yh-svc-model-list > .yh-svc-empty { padding: 16px 0; }
.yh-svc-model-row { display: grid; grid-template-columns: 126px minmax(0, 1fr) 48px 30px; align-items: center; gap: 8px; min-height: 51px; padding: 6px 0; }
.yh-svc-model-row + .yh-svc-model-row { border-top: 1px solid var(--border); }
.yh-svc-kind button { min-width: 0; padding: 0 9px; }
.yh-svc-model-id { min-width: 0; }
.yh-svc-vision { height: 29px; padding: 0 5px; border: 1px solid var(--border); border-radius: 5px; font-size: 11px; color: var(--text-muted); }
.yh-svc-vision.is-on { color: var(--teal-accent); border-color: var(--teal-accent); }
.yh-svc-add-model { height: 34px; margin-top: 6px; padding: 0 4px; }
.yh-svc-add-model:hover { color: var(--teal-accent); }
.yh-svc-fetch-msg, .yh-svc-error { margin-top: 6px; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; color: var(--danger); }
.yh-svc-fetch-msg.is-ok { color: var(--success); }
.yh-svc-footer { justify-content: space-between; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.yh-svc-test-area { flex: 1; min-width: 0; }
.yh-svc-test-area > button, .yh-svc-footer-actions > button { min-height: 34px; padding: 0 11px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; white-space: nowrap; }
.yh-svc-test-area > button:hover, .yh-svc-footer-actions > button:hover { background: var(--bg-hover); }
.yh-svc-test-ok { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--success); }
.yh-svc-test-fail { min-width: 0; overflow-wrap: anywhere; font-size: 11px; line-height: 1.5; color: var(--danger); }
.yh-svc-footer-actions { margin-left: auto; }
.yh-svc-footer-actions .yh-svc-save { padding: 0 14px; background: var(--text); border-color: var(--text); color: var(--bg-window); }
.yh-svc-footer-actions .yh-svc-save:hover { background: var(--text-muted); color: var(--bg-window); }
@media (max-width: 620px) {
  .yh-svc-model-row { grid-template-columns: minmax(0, 1fr) 48px 30px; row-gap: 5px; }
  .yh-svc-kind { grid-column: 1 / -1; }
  .yh-svc-model-id { grid-column: 1; }
  .yh-svc-footer { align-items: stretch; }
  .yh-svc-test-area { flex: 1 0 100%; }
  .yh-svc-meta { font-size: 10px; }
}
