:root{--bg: #ededed;--bg-page: #f7f7f5;--surface: #ffffff;--surface-2: #f5f5f5;--border: #e5e5e5;--text: #1a1a1a;--text-2: #8a8a8a;--accent: #07c160;--accent-d: #06ad56;--bubble-me: #95ec69;--bubble-ai: #ffffff;--danger: #e64340;--warn: #f5a623;--nav-h: 58px;--safe-b: env(safe-area-inset-bottom, 0px);--safe-t: env(safe-area-inset-top, 0px)}:root[data-theme=dark]{--bg: #111;--bg-page: #1a1a1a;--surface: #232323;--surface-2: #2c2c2c;--border: #333;--text: #e8e8e8;--text-2: #8a8a8a;--accent: #3eb575;--accent-d: #35a065;--bubble-me: #2f7d55;--bubble-ai: #2c2c2c}:root[data-theme=sakura]{--bg: #fdeef2;--bg-page: #fff6f8;--surface: #ffffff;--surface-2: #fdf0f4;--border: #f2dce3;--text: #4a2b36;--text-2: #b08a98;--accent: #e86a92;--accent-d: #d1547c;--bubble-me: #ffc9d8;--bubble-ai: #ffffff}:root[data-theme=ocean]{--bg: #e7f1f6;--bg-page: #f3f8fb;--surface: #ffffff;--surface-2: #eaf3f8;--border: #d7e6ee;--text: #1d3645;--text-2: #7d98a8;--accent: #2b8fb3;--accent-d: #237a99;--bubble-me: #b6e3f0;--bubble-ai: #ffffff}:root[data-theme=amber]{--bg: #f3ead9;--bg-page: #faf4e8;--surface: #fffdf8;--surface-2: #f6eddc;--border: #e6d8bd;--text: #43351f;--text-2: #9c8863;--accent: #b8862f;--accent-d: #9c7125;--bubble-me: #f2ddb0;--bubble-ai: #fffdf8}:root[data-theme=lavender]{--bg: #eeebf7;--bg-page: #f7f5fc;--surface: #ffffff;--surface-2: #f1edfa;--border: #e2dcf0;--text: #332b4a;--text-2: #8a80a5;--accent: #7c6bd1;--accent-d: #6857bd;--bubble-me: #d6cff5;--bubble-ai: #ffffff}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body,#root{height:100%;margin:0}body{font-family:-apple-system,BlinkMacSystemFont,PingFang SC,Microsoft YaHei,Segoe UI,sans-serif;font-size:15px;color:var(--text);background:var(--bg-page);overscroll-behavior:none}button,input,textarea,select{font-family:inherit;font-size:inherit;color:inherit}button{cursor:pointer;border:none;background:none}input,textarea,select{outline:none}.app{display:flex;flex-direction:column;height:100%;max-width:520px;margin:0 auto;background:var(--bg-page);position:relative;overflow:hidden}.page{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}.header{height:calc(var(--nav-h) + var(--safe-t));padding-top:var(--safe-t);display:flex;align-items:center;justify-content:space-between;padding-left:16px;padding-right:16px;background:var(--surface);border-bottom:1px solid var(--border);flex-shrink:0;position:relative;z-index:5}.header h1{font-size:17px;font-weight:600;margin:0}.header .sub{font-size:12px;color:var(--text-2)}.icon-btn{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:8px;font-size:20px}.icon-btn:active{background:var(--surface-2)}.tabbar{height:calc(56px + var(--safe-b));padding-bottom:var(--safe-b);display:flex;background:var(--surface);border-top:1px solid var(--border);flex-shrink:0;z-index:5}.tabbar button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--text-2);font-size:11px}.tabbar button.active{color:var(--accent)}.tabbar .ico{font-size:21px;line-height:1}.session-item{display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--surface);border-bottom:1px solid var(--border)}.session-item:active{background:var(--surface-2)}.avatar{width:48px;height:48px;border-radius:8px;object-fit:cover;background:linear-gradient(135deg,#ffd9b3,#ffb3c1);flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:20px;color:#7a4a2b;overflow:hidden}.avatar.sm{width:36px;height:36px;font-size:15px}.session-main{flex:1;min-width:0}.session-top{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.session-name{font-weight:600;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.session-time{font-size:11px;color:var(--text-2);flex-shrink:0}.session-preview{font-size:13px;color:var(--text-2);margin-top:4px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.badge{background:var(--danger);color:#fff;border-radius:10px;padding:1px 6px;font-size:11px;min-width:18px;text-align:center}.chat-page{display:flex;flex-direction:column;height:100%}.chat-msgs{flex:1;overflow-y:auto;padding:12px 14px;background:var(--bg)}.date-sep{text-align:center;font-size:12px;color:var(--text-2);margin:14px 0}.msg-row{display:flex;gap:10px;margin-bottom:14px;align-items:flex-start}.msg-row.me{flex-direction:row-reverse}.msg-bubble{max-width:74%;padding:9px 12px;border-radius:8px;background:var(--bubble-ai);position:relative;line-height:1.5;word-break:break-word;white-space:pre-wrap;box-shadow:0 1px 1px #0000000a}.msg-row.me .msg-bubble{background:var(--bubble-me)}.msg-meta{font-size:11px;color:var(--text-2);margin-top:3px}.msg-row.me .msg-meta{text-align:right}.msg-name{font-size:11px;color:var(--text-2);margin-bottom:3px}.reasoning{font-size:12px;color:var(--text-2);background:var(--surface-2);border-radius:6px;padding:6px 8px;margin-bottom:6px}.reasoning summary{cursor:pointer}.translation{font-size:13px;color:var(--text-2);border-top:1px dashed var(--border);margin-top:8px;padding-top:6px}.typing{display:inline-flex;gap:3px;align-items:center}.typing i{width:5px;height:5px;background:var(--text-2);border-radius:50%;animation:blink 1.2s infinite}.typing i:nth-child(2){animation-delay:.2s}.typing i:nth-child(3){animation-delay:.4s}@keyframes blink{0%,60%,to{opacity:.3}30%{opacity:1}}.msg-failed{color:var(--danger);font-size:12px;cursor:pointer}.composer{border-top:1px solid var(--border);background:var(--surface);padding:8px 10px calc(8px + var(--safe-b));flex-shrink:0}.composer-row{display:flex;align-items:flex-end;gap:8px}.composer textarea{flex:1;resize:none;border:1px solid var(--border);border-radius:8px;padding:9px 10px;max-height:100px;min-height:40px;background:var(--surface-2)}.tool-btn{width:38px;height:38px;border-radius:8px;background:var(--surface-2);display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}.tool-btn.on{background:var(--accent);color:#fff}.send-btn{height:38px;padding:0 16px;border-radius:8px;background:var(--accent);color:#fff;font-weight:600;flex-shrink:0}.send-btn:disabled{opacity:.5}.composer-hint{font-size:11px;color:var(--text-2);margin-top:4px;display:flex;justify-content:space-between}.card{background:var(--surface);border-radius:10px;margin:12px;padding:4px 14px}.field{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-bottom:1px solid var(--border)}.field:last-child{border-bottom:none}.field label{width:88px;flex-shrink:0;color:var(--text-2);font-size:14px;padding-top:6px}.field input,.field textarea,.field select{flex:1;border:none;background:transparent;padding:4px 0;min-width:0}.field textarea{resize:vertical;min-height:60px}.field .val{flex:1;padding:4px 0}.btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 16px;border-radius:8px;background:var(--accent);color:#fff;font-weight:600}.btn.block{width:100%}.btn.ghost{background:var(--surface-2);color:var(--text)}.btn.danger{background:var(--danger)}.btn:disabled{opacity:.5}.section-title{font-size:13px;color:var(--text-2);margin:18px 16px 6px}.list-row{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;background:var(--surface);border-bottom:1px solid var(--border)}.list-row:active{background:var(--surface-2)}.list-row .label{display:flex;align-items:center;gap:10px}.muted{color:var(--text-2);font-size:13px}.switch{width:44px;height:26px;border-radius:13px;background:#ccc;position:relative;transition:background .2s;flex-shrink:0}.switch.on{background:var(--accent)}.switch:after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .2s}.switch.on:after{transform:translate(18px)}.modal-mask{position:absolute;top:0;right:0;bottom:0;left:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:50;padding:24px}.modal{background:var(--surface);border-radius:14px;padding:20px;width:100%;max-width:380px}.modal h3{margin:0 0 10px;font-size:17px}.modal p{color:var(--text-2);font-size:14px;line-height:1.6}.modal .row{display:flex;gap:10px;margin-top:16px}.modal .row .btn{flex:1}.modal input{width:100%;border:1px solid var(--border);border-radius:8px;padding:10px;background:var(--surface-2)}.toast{position:absolute;left:50%;bottom:90px;transform:translate(-50%);background:#000c;color:#fff;padding:9px 16px;border-radius:20px;font-size:13px;z-index:100;max-width:80%;text-align:center}.empty{text-align:center;color:var(--text-2);padding:60px 20px}.empty .big{font-size:44px;margin-bottom:12px}.empty .btn{margin-top:18px}.placeholder-hero{text-align:center;padding:60px 24px 20px}.placeholder-hero .ico{font-size:56px}.placeholder-hero h2{margin:12px 0 6px;font-size:18px}.placeholder-hero p{color:var(--text-2);font-size:14px;line-height:1.6}.tag{display:inline-block;background:var(--surface-2);color:var(--text-2);font-size:11px;padding:2px 8px;border-radius:10px;margin-right:6px}.char-status-item{display:flex;align-items:center;gap:12px;padding:12px 16px;background:var(--surface);border-bottom:1px solid var(--border)}
