@font-face{font-family:NocturneSerif;src:local('Baskerville'),local('Times New Roman');font-display:swap}
:root{--ink:#422f36;--muted:#aa8793;--rose:#ca708f;--rose-soft:#ebc4d2;--paper:#fcf6f5;--line:rgba(255,255,255,.85);--book-size:20px;color-scheme:light;font-family:Arial,'PingFang SC','Microsoft Yahei',sans-serif;color:var(--ink);background:#efd0da}
*{box-sizing:border-box}body{margin:0;min-height:100svh}button,input,textarea,select{font:inherit;color:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:0;background:none}a{color:inherit;text-decoration:none}button:disabled{cursor:wait;opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #a64c6a;outline-offset:4px}button:active{transform:translateY(1px)}img{max-width:100%;display:block}button img{width:20px;height:20px}h1,h2,h3,p{margin:0}textarea{resize:vertical}input,textarea,select{max-width:100%}[hidden]{display:none!important}.app-backdrop{position:fixed;inset:0;background:#efd0da;z-index:-1}.app-shell{position:relative;max-width:1500px;height:calc(100dvh - 90px);min-height:600px;margin:45px auto;border:5px solid rgba(255,255,255,.96);border-radius:65px;background:rgba(253,246,244,.8);box-shadow:0 16px 40px #9e637b1c,inset 0 0 40px #fff5;overflow:hidden}.shell-top{height:92px;position:absolute;inset:0 0 auto;z-index:5;display:flex;align-items:center;justify-content:space-between;padding:0 38px}.wordmark{font:24px Georgia,serif;color:#b96d88;letter-spacing:-1px}.wordmark span{font-size:29px;vertical-align:-2px}.channel-switch{position:absolute;left:50%;top:-5px;transform:translateX(-50%);height:86px;width:660px;padding:12px 50px 20px;display:flex;align-items:center;justify-content:center;gap:5px;background:rgba(255,253,250,.94);border-radius:0 0 78px 78px}.channel-switch button{display:flex;gap:7px;align-items:center;justify-content:center;border-radius:30px;padding:12px 18px;font-size:12px;color:#917f82;min-height:46px}.channel-switch button img{width:13px;height:13px}.channel-switch button.active{color:#47343b;background:#fff8;box-shadow:0 1px 5px #ba9ca22b,inset 0 0 0 1px #e1d3d655}.round{display:grid;place-items:center;width:44px;height:44px;min-width:44px;border-radius:50%;background:rgba(255,255,255,.72);border:1px solid #fff9;color:#bd7690}.settings-button{margin-left:auto}.settings-button img{width:23px;height:23px}.desktop-dock{position:absolute;left:19px;top:125px;bottom:55px;z-index:6;display:flex;align-items:center;flex-direction:column;gap:9px;width:145px}.dock-link{width:140px;display:flex;align-items:center;gap:14px;color:#ca9dac;font:12px Georgia,serif;text-align:left}.dock-link .round{width:43px;height:43px;min-width:43px;box-shadow:0 2px 10px #bf8f9f08}.dock-link img{width:19px;height:19px;opacity:.8}.dock-link.active{color:#b94f75}.dock-link.active .round{box-shadow:0 0 0 5px #fff5;background:#fff}.dock-link.active img{opacity:1}.dock-link[data-route="chat"] .round{width:51px;height:51px;min-width:51px;margin-left:-4px}.dock-link[data-route="chat"] img{width:32px;height:32px}.dock-link.small{margin-top:7px}.dock-bottom{margin-top:auto;padding:8px 0;display:flex;flex-direction:column;gap:7px;background:#ffffff45;border-radius:28px;align-self:flex-start}.dock-bottom .round{background:#ffffff55}.glass{background:rgba(255,250,249,.58);border:1px solid var(--line);box-shadow:0 7px 22px #af75851a,inset 0 1px 2px #fff;backdrop-filter:blur(23px);-webkit-backdrop-filter:blur(23px)}.view{position:absolute;left:180px;right:258px;top:108px;bottom:36px}.desktop-companion{position:absolute;right:22px;top:112px;bottom:0;width:217px}.nearfield-small{padding:8px 12px 20px;border-bottom:1px solid #d7b0bd66}.nearfield-small .counter{font:20px Georgia,serif}.nearfield-small small{font-size:9px;color:var(--muted)}.nearfield-small h3{font:22px Georgia,serif;margin-top:17px}.nearfield-small p{font:10px Georgia,serif;margin-top:6px;color:var(--muted)}.mini-stat{display:flex;justify-content:space-between;font:9px Georgia,serif;color:var(--muted);margin-top:15px}.mini-track{height:3px;background:#eac5d4;margin-top:6px;border-radius:5px}.mini-track i{display:block;width:43%;height:100%;background:#d38ba3}.cupid-standing{position:absolute;bottom:-6px;right:-11px;width:240px;max-height:65%;object-fit:contain;object-position:bottom}.mobile-nav{display:none}.hero-mode .app-shell{background:transparent}.hero-mode .view{inset:0}.hero-mode .desktop-companion{display:none}.hero-mode .wordmark{visibility:hidden}.hero-mode .dock-link span:last-child{visibility:hidden}.hero-mode .desktop-dock{width:50px}.hero-mode .dock-link{width:45px;gap:0}.hero-mode .app-shell::before{content:'';position:absolute;inset:0;background:url('images/nocturne_desert_columns_bg.jpg') center/cover no-repeat}.hero{height:100%;position:relative;display:flex;align-items:center;justify-content:center}.hero-title{text-align:center;color:#fff6f3;transform:translate(-20px,-8px);text-shadow:0 2px 12px #a96f8a22}.hero-title .orb{font:65px Georgia,serif;line-height:1.2;font-weight:400}.hero-title h1{font:76px Georgia,serif;letter-spacing:1px;font-weight:400}.hero-title .tagline{font-size:25px;font-style:italic;margin-top:15px;font-weight:300}.hero-title .stars{margin-top:25px;font-size:16px;letter-spacing:8px}.hero-title .signature{font:italic 16px Georgia,serif;margin-top:9px}.nearfield-card{position:absolute;right:25px;bottom:96px;width:282px;padding:30px 28px 24px;border-radius:55px;background:#f2d7df99;border-color:#fff5;color:#55414a}.nearfield-card .card-head{display:flex;justify-content:space-between;align-items:center}.nearfield-card h2{font:25px Georgia,serif}.nearfield-card .date{font:10px Georgia,serif;margin-top:10px}.nearfield-card .intro{font-size:11px;line-height:1.8;margin-top:17px}.nearfield-card .formula{font:italic 11px Georgia,serif;margin:18px 0 8px 88px}.nearfield-card .hero-actions{display:flex;justify-content:flex-end;gap:9px}.nearfield-card .round{width:32px;height:32px;min-width:32px}.nearfield-card .round img{width:15px;height:15px}.monogram{position:absolute;bottom:27px;right:270px;background:#c95780dd;color:#fff;border-radius:50%;width:106px;height:106px;font:bold 52px Georgia,serif;box-shadow:0 7px 25px #995d7133}.page-heading{font:22px Georgia,'Songti SC',serif;margin-bottom:18px;font-weight:400}.overline{font-size:10px;text-transform:uppercase;letter-spacing:2px;color:var(--muted);margin-bottom:9px}.quiet{font-size:11px;color:var(--muted);line-height:1.7}.page-scroll{height:100%;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d2a5b6 transparent;padding:9px 12px 20px 0}.section-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:17px}.pill{padding:10px 17px;border-radius:30px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:12px;min-height:39px}.pill img{width:17px;height:17px}.berry{color:#fff;background:linear-gradient(120deg,#c7678a,#cf7e99);box-shadow:0 4px 13px #b86a7e26;border:1px solid #ffffff54}.soft{background:#f5e4e966;border:1px solid #fff8}.diary-list{display:grid;gap:14px}.diary-card{display:flex;align-items:center;gap:18px;padding:14px;border-radius:24px;text-align:left;width:100%;min-width:0}.diary-card img{width:112px;height:112px;object-fit:cover;border-radius:19px;flex-shrink:0}.diary-card h3{font:21px Georgia,'Songti SC',serif;line-height:1.4}.diary-card p{font:14px/1.8 Georgia,'Songti SC',serif;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin-top:7px;overflow-wrap:anywhere}.diary-card small{font-size:10px;color:var(--muted);display:block;margin-top:9px}.mobile-home{display:none}.diary-empty{padding:22px;border-radius:24px}.journal-detail{font:18px/2.1 Georgia,'Songti SC',serif;white-space:pre-wrap;overflow-wrap:anywhere;padding:10px 0 20px}.inline-link{font-size:12px;color:#a45272;text-decoration:underline;text-underline-offset:4px}.editor{display:grid;gap:14px}.editor label,.settings-form label{display:grid;gap:7px;font-size:12px}.editor input,.editor textarea,.settings-form input,.settings-form select,.note-input{width:100%;border:1px solid #d8b5c266;border-radius:14px;padding:12px 14px;background:#fffbfa80;outline-offset:1px}.editor textarea{min-height:240px;line-height:1.9}.actions{display:flex;justify-content:flex-end;gap:9px;align-items:center;margin-top:16px;flex-wrap:wrap}.reading-layout{display:flex;flex-direction:column;height:100%;min-height:0}.reader-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 0 18px;font-size:12px;flex-shrink:0}.reader-top button{padding:8px 2px;min-height:36px}.reader-top .chapter{font:17px Georgia,'Songti SC',serif;text-align:center}.reader-body{overflow:auto;flex:1;min-height:0;padding:20px 28px 60px;scrollbar-width:thin;scrollbar-color:#d9afbd transparent;border-radius:27px;background:#fff8f64a;scroll-behavior:smooth}.reader-body p{font:var(--book-size)/2.05 Georgia,'Songti SC','SimSun',serif;margin-bottom:25px;white-space:pre-wrap;overflow-wrap:anywhere}.reader-body .book-label{font-size:10px;color:#ab8593;text-align:center;letter-spacing:3px;margin:2px 0 25px}.reading-highlight{border:1px solid #fff7fa;border-radius:22px;padding:22px 24px;text-align:center;margin:28px 0 35px;background:radial-gradient(ellipse at 50% 25%,#fff6f9a3,#f4c4d5a6);box-shadow:0 12px 30px #d788a138,0 0 25px #f3b5c94d,inset 0 0 20px #fff8}.reading-highlight p{margin:0 0 14px;font-size:var(--book-size);line-height:1.7}.reader-actions{display:flex;justify-content:center;gap:9px;padding-top:15px;flex-shrink:0}.reader-actions .pill{white-space:nowrap}.liked{color:#b64d77;background:#f3d6e3}.note-badge{min-width:15px;color:#b55e80}.chat-page{height:100%;display:flex;flex-direction:column;position:relative}.chat-heading{display:flex;justify-content:center;align-items:center;gap:8px;min-height:43px;font-size:11px;flex-shrink:0;color:#b98a9b;border-bottom:1px solid #e6ced644;margin:0 10px}.chat-heading img{width:13px;height:13px}.chat-heading span{font-size:9px}.chat-log{flex:1;min-height:0;overflow:auto;padding:22px 18px;scrollbar-width:thin;scrollbar-color:#d6afbc transparent;border-radius:0 0 40px 40px;background:#fffafa60}.message{display:flex;gap:11px;margin-bottom:24px;align-items:flex-start;max-width:92%}.message.ai{margin-left:auto;flex-direction:row-reverse;justify-content:flex-start}.message-avatar{width:31px;height:31px;border-radius:50%;object-fit:cover;flex-shrink:0}.message-name{font-size:9px;color:#b18798;margin-bottom:5px}.message.ai .message-name{text-align:right}.message-bubble{font-size:12px;line-height:1.85;padding:12px 16px;border-radius:10px 10px 10px 3px;background:#cb7597;color:#fffafb;white-space:pre-wrap;overflow-wrap:anywhere}.message.ai .message-bubble{background:#f2e8e7;color:#735d63;border-radius:10px 10px 3px 10px}.message time{display:block;font-size:8px;color:#bc98a7;margin-top:5px}.message.ai time{text-align:right}.chat-date{text-align:center;font:italic 10px Georgia,serif;color:#bd9ca7;margin:8px 0 25px}.composer-wrap{margin:15px 10px 0;flex-shrink:0}.composer{border-radius:35px;display:flex;align-items:center;padding:7px 9px 7px 13px;gap:9px;min-height:53px}.composer textarea{border:0;background:none;resize:none;min-width:0;flex:1;height:32px;max-height:96px;line-height:22px;padding:5px 0;outline:none;font-size:12px}.composer textarea::placeholder{color:#b5a0a5}.composer .round{width:33px;height:33px;min-width:33px}.composer .send{background:#cd7899}.composer .send img{width:19px;height:19px;filter:brightness(0) invert(1)}.composer .mic{background:none;border:0}.composer .mic img{width:18px;height:18px}.composer .attach{font-size:25px;line-height:1;color:#cc8da3}.model-label{font-size:10px;color:#bba2ab;white-space:nowrap}.quote-preview{padding:10px 15px;font-size:11px;line-height:1.6;background:#f8e3eb;border-radius:15px;margin-bottom:8px;display:flex;gap:10px;align-items:center}.quote-preview span{flex:1;max-height:65px;overflow:auto}.chat-local{font-size:9px;text-align:center;color:#b395a0;margin:8px 0 0}.pulse-sheet{position:absolute;bottom:73px;left:-110px;z-index:8;width:310px;border-radius:25px;padding:21px;box-shadow:0 13px 38px #98708025;background:#fdf5f5cc;backdrop-filter:blur(28px);-webkit-backdrop-filter:blur(28px);border:1px solid #fff}.pulse-sheet h2{font:17px Georgia,serif;margin:5px 0 19px}.drag-handle{height:4px;width:37px;border-radius:4px;background:#ceb9c1;margin:-9px auto 17px}.pulse-row{display:grid;grid-template-columns:90px 1fr 42px;align-items:center;gap:9px;margin:16px 0;font-size:11px}.pulse-row small{color:var(--muted);display:block;font-size:10px;margin-top:3px}.pulse-row b{font-weight:400;text-align:right;font-size:11px}.pulse-row .bar{height:5px;background:#e9cdd8;border-radius:6px;overflow:hidden}.pulse-row .bar i{display:block;height:100%;background:#ca819a;border-radius:6px}.pulse-footer{display:flex;justify-content:space-between;font-size:11px;margin-top:18px}.pulse-footnote{color:var(--muted);font-size:9px;margin-top:12px}.note-list{display:grid;gap:12px}.note{border:1px solid #fff;border-radius:20px;background:#fff8f866;padding:15px;font-size:13px;line-height:1.8;overflow-wrap:anywhere}.note blockquote{margin:0 0 11px;padding-left:12px;border-left:2px solid #d9a0b4;font-family:Georgia,'Songti SC',serif}.note small{font-size:10px;color:#a48391}.note .reply{margin:9px 0 0 16px;border-left:1px solid #e2c4d0;padding-left:12px}.note-reply-form{display:flex;gap:8px;margin-top:10px}.note-reply-form input{min-width:0;flex:1;font-size:12px}.note-reply-form button{font-size:12px}.empty{padding:28px 10px;text-align:center;color:#ad8999;line-height:1.9;font-size:12px}.book-tile{border-radius:24px;padding:25px;display:flex;gap:24px;align-items:center;margin-bottom:20px}.book-cover{width:105px;height:145px;padding:24px 10px;background:linear-gradient(110deg,#d4afbc,#f1d2dc);border:1px solid #fff7;box-shadow:5px 7px 12px #9d6e8022;font:19px/1.8 Georgia,'Songti SC',serif;text-align:center;color:#6d495c;flex-shrink:0}.book-tile h3{font:23px Georgia,'Songti SC',serif}.book-tile p{font-size:12px;line-height:1.9;color:#9d7a89;margin:10px 0 16px}.book-tools{display:flex;gap:10px;flex-wrap:wrap}.settings-form{display:grid;gap:15px}.connection-status{font-size:11px;color:#ab7b8f;line-height:1.8;padding:12px;border-radius:12px;background:#f5e3eb77}.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.stat-card{border-radius:22px;padding:25px}.stat-card strong{font:35px Georgia,serif;display:block;margin-bottom:10px}.stat-card span{font-size:11px;color:#a0808e}.diary-tabs{display:flex;gap:10px;margin-bottom:16px}.diary-tabs button{font-size:11px;padding:7px 13px;border-radius:20px}.diary-tabs .active{background:#fff8}.tree-text{width:100%;height:190px;border:1px solid #fff;border-radius:22px;background:#fff7;padding:20px;font-size:15px;line-height:1.9}.mobile-state-button{display:none}dialog{width:min(560px,calc(100vw - 32px));max-height:85dvh;overflow:auto;border:1px solid #fff;border-radius:31px;background:#fbf1f3ed;box-shadow:0 20px 90px #62434d44;padding:26px;color:var(--ink);backdrop-filter:blur(35px);-webkit-backdrop-filter:blur(35px)}dialog::backdrop{background:#70526744;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}.dialog-top{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:23px}.dialog-top h2{font:23px Georgia,'Songti SC',serif}.dialog-top .round{font-size:25px;width:36px;height:36px;min-width:36px}#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 32px);width:max-content;background:#fff5f5f0;box-shadow:0 5px 30px #a2718c30;border:1px solid #fff;border-radius:30px;padding:13px 22px;z-index:20;font-size:12px;color:#7f4a60}.error{color:#9c354f}.install-guide{font-size:13px;line-height:1.9}.danger{color:#9e435e}.site-credit{font-size:10px;color:#ac8a98;margin-top:18px;line-height:1.8}.site-credit a{text-decoration:underline}.mobile-top-tabs{display:none}.skeleton{animation:breathe 1.7s infinite}@keyframes breathe{50%{opacity:.5}}@media(min-width:1550px){.app-shell{height:min(850px,calc(100dvh - 100px));margin-top:max(50px,calc((100dvh - 850px)/2))}}@media(min-width:768px) and (max-width:1150px){.app-shell{margin:24px;height:calc(100dvh - 48px);min-height:530px;border-radius:48px}.shell-top{height:80px;padding:0 22px}.wordmark{font-size:18px}.channel-switch{width:480px;height:72px;padding:10px 25px 15px}.channel-switch button{padding:8px 12px;font-size:10px}.desktop-dock{left:12px;width:56px;top:110px}.dock-link{width:50px;gap:0}.dock-link span:last-child{display:none}.view{left:88px;right:205px;top:95px}.desktop-companion{width:170px;right:14px;top:95px}.cupid-standing{width:190px}.hero-title h1{font-size:58px}.hero-title{transform:translate(-80px,-10px)}.nearfield-card{width:242px;right:20px;padding:22px;border-radius:40px}.monogram{right:240px;width:85px;height:85px;font-size:42px}.pulse-sheet{left:-15px}.reader-body{padding:15px 18px 50px}}
@media(max-width:767px){:root{--book-size:20px}.app-shell{margin:0;border:0;border-radius:0;width:100%;max-width:none;height:100dvh;min-height:0;background:linear-gradient(140deg,#f9eef0c9,#f3dce6cc);box-shadow:none}.app-backdrop{background:url('images/nocturne_desert_columns_bg.jpg') center/cover fixed}.shell-top{height:52px;padding:6px 22px 0;top:env(safe-area-inset-top)}.wordmark{font-size:17px;letter-spacing:0}.wordmark span{font-size:20px}.settings-button{width:32px;height:32px;min-width:32px}.settings-button img{width:19px;height:19px}.channel-switch{display:none}.desktop-dock,.desktop-companion{display:none}.view{left:0;right:0;top:calc(61px + env(safe-area-inset-top));bottom:calc(85px + env(safe-area-inset-bottom));padding:0 22px}.mobile-nav{display:flex;position:absolute;bottom:calc(16px + env(safe-area-inset-bottom));left:22px;right:22px;padding:5px;border-radius:50px;z-index:6;height:55px;justify-content:space-between;align-items:center;background:#fff5f57a;box-shadow:0 6px 20px #a2768b30}.mobile-nav button{height:43px;flex:1;border-radius:40px;font-size:17px;color:#70525f}.mobile-nav button.active{background:#fffbfbdb;box-shadow:0 3px 10px #9f788e30,inset 0 0 0 1px #d4b8c6;color:#321c27}.mobile-top-tabs{display:flex;border-radius:40px;padding:5px;height:55px;justify-content:space-between;align-items:center;margin:3px 0 20px}.mobile-top-tabs button{flex:1;height:43px;border-radius:40px;font-size:16px}.mobile-top-tabs .active{background:#fffbfbdb;box-shadow:0 3px 10px #9f788e30,inset 0 0 0 1px #d4b8c6}.hero-mode .app-shell{background:linear-gradient(140deg,#f9eef0c9,#f3dce6cc)}.hero-mode .app-shell::before{display:none}.hero-mode .wordmark{visibility:visible}.hero{display:none}.hero-mode .view{inset:calc(61px + env(safe-area-inset-top)) 0 calc(85px + env(safe-area-inset-bottom));padding:0 22px}.mobile-home{display:flex;height:100%;flex-direction:column;min-height:0}.mobile-weather{display:flex;align-items:center;justify-content:space-between;min-height:165px;gap:12px;flex-shrink:0}.mobile-weather>img{height:160px;width:125px;object-fit:contain;image-rendering:auto;margin-left:6px}.mobile-weather .weather{border-radius:50px;padding:22px;flex:1;font:23px/1.5 Georgia,serif;position:relative}.mobile-weather .weather img{width:23px;height:23px;position:absolute;right:14px;top:15px;padding:4px;background:white;border-radius:50%}.mobile-weather .weather small{display:block;font:20px/1.5 Arial,sans-serif;margin-top:3px}.home-cards{overflow:auto;flex:1;min-height:0;padding:6px 0 15px;scrollbar-width:none}.diary-card{gap:12px;padding:10px;border-radius:25px;min-height:116px;margin-bottom:12px;background:#fff9f957}.diary-card img{width:88px;height:98px;border-radius:20px}.diary-card h3{font-size:17px}.diary-card p{font-size:12px;line-height:1.7;margin-top:5px}.diary-card small{font-size:9px;margin-top:4px}.page-heading{font-size:23px}.page-scroll{padding:10px 0 20px}.section-row{gap:8px}.section-row .pill{font-size:11px;padding:9px 13px}.diary-list{gap:0}.reading-layout{position:relative;padding-top:3px}.reader-top{padding-bottom:18px;font-size:12px;gap:5px;justify-content:space-between}.reader-top .chapter{font-size:13px;white-space:nowrap}.reader-top button{font-size:12px}.reader-body{background:none;border-radius:0;padding:15px 9px 70px}.reader-body p{line-height:1.95;margin-bottom:22px}.reader-body .book-label{font-size:9px;letter-spacing:1.5px}.reading-highlight{padding:21px 16px;margin:20px 0 30px;border-radius:17px}.reading-highlight p{font-size:19px;line-height:1.65}.reading-highlight .pill{font-size:15px;padding:12px 21px}.reader-actions{position:absolute;bottom:7px;left:0;right:0;padding:6px;gap:5px;border:1px solid #fff;border-radius:50px;background:#fffbf9c9;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);box-shadow:0 8px 25px #a7778e25}.reader-actions .pill{padding:10px 8px;font-size:13px;min-height:41px;flex:1;background:#f4dfe777;border:0;box-shadow:none}.reader-actions .pill img{width:17px;height:17px}.reader-actions .liked{background:#edcadb}.reading-mode .mobile-nav{display:none}.reading-mode .view{bottom:calc(13px + env(safe-area-inset-bottom));top:calc(62px + env(safe-area-inset-top))}.chat-mode .shell-top .wordmark{font-size:16px}.chat-mode .view{bottom:calc(10px + env(safe-area-inset-bottom));padding:0 20px}.chat-mode .mobile-nav{display:none}.chat-heading{height:39px;font-size:14px;background:#fff5f57a;border:1px solid #fff;border-radius:30px;box-shadow:0 6px 20px #ac82971f;margin:0 0 16px}.chat-heading span{font-size:11px}.chat-log{padding:16px 0 30px;background:none;border-radius:0}.message{gap:10px;max-width:100%;margin-bottom:28px}.message-avatar{width:39px;height:39px}.message-bubble{font-size:14px;line-height:1.75;padding:12px 15px;max-width:275px;background:linear-gradient(120deg,#e8bbcb,#dfb0c3);color:#533341;border:1px solid #efcfda;border-radius:16px 16px 16px 4px;box-shadow:0 5px 14px #ad7a8a10}.message.ai .message-bubble{border:1px solid #fff9;border-radius:16px 16px 4px 16px;background:#fff9f9a8}.message-name{font-size:12px;color:#4c3540;margin-bottom:7px}.message time{font-size:9px}.composer-wrap{margin:10px 0 0}.composer{min-height:52px;padding:7px 8px 7px 17px;background:#fff9f9aa}.composer textarea{font-size:16px}.composer .attach{display:none}.model-label{display:none}.composer .send{height:36px;width:36px;min-width:36px}.composer .mic img{height:22px;width:22px}.chat-local{margin-top:6px}.mobile-state-button{display:flex;align-items:center;gap:5px;font-size:10px;margin-right:6px;color:#ad7b8c}.mobile-state-button img{width:15px;height:15px}.pulse-sheet{position:absolute;bottom:90px;left:0;width:100%;padding:24px;z-index:8;border-radius:35px;box-shadow:0 15px 30px #ae748a30;background:#faedf1d9}.pulse-sheet h2{font:21px Georgia,serif;margin-top:10px}.pulse-row{grid-template-columns:88px 1fr 40px;font-size:13px;margin:19px 0}.pulse-row small{font-size:11px}.pulse-row b{font-size:13px}.pulse-row .bar{height:7px}.pulse-footer{font-size:13px;margin-top:23px}.pulse-footnote{font-size:9px}.book-tile{padding:18px;gap:17px}.book-cover{width:85px;height:125px;font-size:17px}.book-tile h3{font-size:19px}.book-tile p{font-size:11px}.book-tools .pill{font-size:11px;padding:8px 12px}.editor textarea{min-height:240px}.journal-detail{font-size:17px;line-height:2}.stat-card{padding:20px}.stats-grid{gap:10px}dialog{padding:22px;border-radius:26px}#toast{bottom:calc(87px + env(safe-area-inset-bottom));font-size:12px}.note-input,.editor input,.editor textarea,.settings-form input,.settings-form select{font-size:16px}.diary-tabs{margin-bottom:16px}.mobile-frame .app-shell{border-radius:0}}
@media(min-width:768px){.mobile-frame{display:flex;align-items:center;justify-content:center;min-height:100dvh;background:url('images/nocturne_desert_columns_bg.jpg') center/cover fixed}.mobile-frame .app-shell{width:430px;height:calc(100dvh - 48px);max-height:932px;min-height:500px;border:2px solid #fff9;border-radius:45px;margin:24px;overflow:hidden}.mobile-frame .app-backdrop{display:none}}
@media(min-width:768px){body{display:flow-root;overflow:hidden}.app-shell{width:calc(100% - 80px)}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* Chat owns the visual viewport; only the log scrolls when iOS opens its keyboard. */
@media(max-width:767px){
 html:has(body.chat-mode){overflow:hidden;overscroll-behavior:none}
 body.chat-mode{position:fixed;inset:0;min-height:0;overflow:hidden;overscroll-behavior:none}
 .chat-mode .app-shell{position:fixed;top:calc(var(--viewport-top,0px) + 10px);left:10px;right:10px;width:calc(100% - 20px);height:calc(var(--visible-height,100dvh) - 20px);min-height:0;margin:0;overflow:hidden}
 .chat-mode .view,.chat-mode .chat-page{min-height:0;overflow:hidden}
 .chat-mode .chat-log{overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;overflow-anchor:none}
 .chat-mode .composer-wrap{flex:0 0 auto;padding-bottom:2px}
 .chat-mode .composer textarea{font-size:16px;max-height:72px}
}
