.max-character{display:inline-flex;flex:none;align-items:center;justify-content:center;contain:layout style;-webkit-user-select:none;user-select:none;max-width:100%}.max-character svg{overflow:visible}.max-character--animated .max-living-body{transform-origin:50% 68%;animation:max-breathe 8.8s ease-in-out infinite}.max-character--animated .max-internal-shimmer{animation:max-shimmer 12s ease-in-out infinite}.max-character--animated .max-hoodie{transform-origin:50% 86%;animation:max-hoodie 8.8s ease-in-out infinite}.max-character--speaking .max-speaking-mouth{transform-box:fill-box;transform-origin:center;animation:max-talk .26s ease-in-out infinite alternate}.max-character--thinking .max-internal-shimmer{animation-duration:4s}.max-character--happy .max-living-body{animation-duration:3.5s}@keyframes max-breathe{0%,to{transform:translateY(0) scale(1)}50%{transform:translateY(calc(-3px * var(--max-intensity))) scaleX(1.006) scaleY(1.004)}}@keyframes max-hoodie{0%,to{transform:translateY(0)}50%{transform:translateY(calc(-1.5px * var(--max-intensity)))}}@keyframes max-shimmer{0%,to{opacity:.48;transform:translate(-6px,2px)}50%{opacity:.92;transform:translate(7px,-4px)}}@keyframes max-blink{0%,43%,45%,to{transform:scaleY(1)}44%{transform:scaleY(.07)}}@keyframes max-talk{0%{transform:scaleY(.5)}to{transform:scaleY(1.4)}}@media (prefers-reduced-motion:reduce){.max-character *{animation:none!important}}.max-character{position:relative;isolation:isolate}.max-fluid-canvas{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;pointer-events:none;z-index:0}.max-character svg{position:relative;z-index:1}.max-character:focus-visible{outline:2px solid #e8b75e;outline-offset:4px}.max-articulated-arms{pointer-events:none}.max-rig-arm{animation:max-rig-enter .26s ease-out both}@keyframes max-rig-enter{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion:reduce){.max-rig-arm{animation:none!important}}.max-character--listening.max-character--animated .max-listening-indicator{animation:max-listen 2.4s ease-in-out infinite}@keyframes max-listen{0%,to{opacity:.25}50%{opacity:.85}}.max-character--animated .max-face--happy{transform-origin:52% 56%;animation:max-happy 3.4s ease-in-out infinite}@keyframes max-happy{0%,to{transform:translateY(0)}50%{transform:translateY(-1.5px)}}@media (prefers-reduced-motion:reduce){.max-listening-indicator,.max-face--happy{animation:none!important}}.max-character--animated.max-character--gesture-wave .max-rig-wave-motion{transform-box:view-box;transform-origin:390px 401px;animation:max-arm-wave 1.15s ease-in-out infinite}@keyframes max-arm-wave{0%,to{transform:rotate(-5deg)}20%{transform:rotate(9deg)}42%{transform:rotate(-8deg)}64%{transform:rotate(10deg)}84%{transform:rotate(-4deg)}}@media (prefers-reduced-motion: reduce){.max-character--animated.max-character--gesture-wave .max-rig-wave-motion{animation:none!important}}.max-character .max-face{transition:opacity .35s ease,transform .55s cubic-bezier(.22,1,.36,1)}.max-character .max-rig-arm{animation:max-rig-enter .38s ease-out both}@media (prefers-reduced-motion:reduce){.max-character .max-face{transition:none!important}.max-character .max-rig-arm{animation:none!important}}.max-character{transform:rotate(var(--max-directed-tilt,0deg));transform-origin:50% 77%;transition:transform .9s cubic-bezier(.22,1,.36,1)}@media (prefers-reduced-motion:reduce){.max-character{transform:none!important;transition:none!important}}.ameeba-auth-dialog .ameeba-auth-instruction{margin:12px auto 0;font-size:14px;line-height:1.5}.ameeba-auth-dialog .ameeba-auth-actions{margin-top:14px}.ameeba-auth-dialog .ameeba-auth-actions button{padding:9px 14px;font-size:13px}.ameeba-auth-dialog .ameeba-auth-download{margin:20px 0 0;padding-top:17px;border-top:1px solid var(--border);font-size:13px}.ameeba-auth-dialog .ameeba-auth-download a{color:var(--text);font-weight:600;text-decoration:underline;text-underline-offset:3px}.ameeba-auth-dialog .ameeba-auth-qr{display:block;width:min(276px,100%);height:auto;aspect-ratio:1;object-fit:contain;image-rendering:auto;background:#fff;padding:0;border-radius:14px;margin:20px auto 0}:root,[data-theme=dark]{--bg: #212121;--bg-sidebar: #171717;--bg-card: #2a2a2a;--bg-input: #2f2f2f;--bg-hover: rgba(255,255,255,.06);--bg-user-bubble: #2f2f2f;--border: rgba(255,255,255,.1);--text: #ececec;--text-2: rgba(236,236,236,.7);--text-3: rgba(236,236,236,.4);--accent: #2ba5ce;--accent-bg: rgba(43,165,206,.12);--accent-border: rgba(43,165,206,.28);--send-bg: #ececec;--send-icon: #171717;--send-bg-disabled: rgba(255,255,255,.1);--send-icon-disabled: rgba(255,255,255,.2);--shadow: 0 2px 8px rgba(0,0,0,.4);--shadow-drawer: -8px 0 40px rgba(0,0,0,.5)}[data-theme=light]{--bg: #ffffff;--bg-sidebar: #f9f9f9;--bg-card: #f4f4f4;--bg-input: #f4f4f4;--bg-hover: rgba(0,0,0,.04);--bg-user-bubble: #f4f4f4;--border: rgba(0,0,0,.08);--text: #0d0d0d;--text-2: rgba(13,13,13,.65);--text-3: rgba(13,13,13,.4);--accent: #1a91b8;--accent-bg: rgba(26,145,184,.08);--accent-border: rgba(26,145,184,.22);--send-bg: #0d0d0d;--send-icon: #ffffff;--send-bg-disabled: rgba(0,0,0,.08);--send-icon-disabled: rgba(0,0,0,.25);--shadow: 0 2px 8px rgba(0,0,0,.08);--shadow-drawer: -8px 0 40px rgba(0,0,0,.12)}[data-theme=ameeba]{--bg: #ffffff;--bg-sidebar: #ffffff;--bg-card: #ffffff;--bg-input: #ffffff;--bg-hover: rgba(60,142,216,.08);--bg-user-bubble: rgba(242,249,255,.97);--border: rgba(24,56,84,.1);--text: #142536;--text-2: rgba(20,37,54,.68);--text-3: rgba(20,37,54,.45);--accent: #3c8ed8;--accent-bg: rgba(60,142,216,.14);--accent-border: rgba(60,142,216,.3);--send-bg: #142536;--send-icon: #ffffff;--send-bg-disabled: rgba(20,37,54,.08);--send-icon-disabled: rgba(20,37,54,.25);--shadow: 0 12px 36px rgba(34,76,111,.075);--shadow-drawer: -18px 0 54px rgba(31,70,105,.1)}*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%;overflow:hidden}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--text);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}button{font-family:inherit;cursor:pointer}.root{display:flex;height:100%;width:100%;background:var(--bg);color:var(--text)}.sidebar{display:flex;flex-direction:column;background:var(--bg-sidebar);border-right:1px solid var(--border);transition:width .22s cubic-bezier(.4,0,.2,1);overflow:hidden;flex-shrink:0}.sidebar.open{width:240px}.sidebar.closed{width:56px}.sidebar-top{flex:1;display:flex;flex-direction:column;gap:4px;padding:12px 8px}.sidebar-logo{display:flex;align-items:center;gap:10px;padding:6px 4px 12px;border-bottom:1px solid var(--border);margin-bottom:8px}.sidebar-logo-text{display:flex;flex-direction:column}.sidebar.closed .sidebar-logo{justify-content:center;padding-left:0;padding-right:0}.sidebar-logo-collapsed{font-size:17px;font-weight:750;line-height:1;color:var(--text)}.logo-name{font-size:15px;font-weight:700;letter-spacing:-.01em;white-space:nowrap}.logo-sub{font-size:11px;color:var(--text-3);white-space:nowrap}.new-chat-btn{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;border:1px solid var(--border);background:transparent;color:var(--text);font-size:13.5px;font-weight:500;transition:background .15s;white-space:nowrap}.new-chat-btn:hover{background:var(--bg-hover)}.sidebar-btn{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;border:none;background:transparent;color:var(--text-2);font-size:13.5px;font-weight:500;transition:background .15s;white-space:nowrap}.sidebar-btn:hover{background:var(--bg-hover);color:var(--text)}.mem-badge{margin-left:auto;background:var(--accent);color:#fff;border-radius:99px;font-size:11px;font-weight:700;padding:1px 6px;min-width:18px;text-align:center}.sidebar-bottom{padding:8px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:4px}.privacy-note{display:flex;align-items:center;gap:6px;font-size:11.5px;color:var(--text-3);padding:4px 6px;white-space:nowrap}.theme-toggle-btn{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:10px;border:none;background:transparent;color:var(--text-2);font-size:13.5px;font-weight:500;transition:background .15s;white-space:nowrap}.theme-toggle-btn:hover{background:var(--bg-hover);color:var(--text)}.theme-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;padding:3px;border:1px solid var(--border);border-radius:10px}.theme-option{display:flex;align-items:center;justify-content:center;gap:5px;padding:6px 4px;border:none;border-radius:7px;background:transparent;color:var(--text-2);font-size:12.5px;font-weight:500;transition:background .15s,color .15s}.theme-option:hover{background:var(--bg-hover);color:var(--text)}.theme-option.active{background:var(--accent-bg);color:var(--accent)}.sidebar-collapse-btn{display:flex;align-items:center;justify-content:center;padding:8px;border-radius:10px;border:none;background:transparent;color:var(--text-3);transition:background .15s,color .15s}.sidebar-collapse-btn:hover{background:var(--bg-hover);color:var(--text)}.collapse-icon{transition:transform .22s ease}.collapse-icon.rotated{transform:rotate(180deg)}.chat-area{position:relative;isolation:isolate;flex:1;display:flex;flex-direction:column;min-width:0;background:var(--bg);overflow:hidden}[data-theme=ameeba] .chat-area:before,[data-theme=ameeba] .chat-area:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}[data-theme=ameeba] .chat-area:before{z-index:-2;background:url(/ameeba-atmosphere.webp) center center / cover no-repeat}[data-theme=ameeba] .chat-area:after{z-index:-1;background:radial-gradient(ellipse at 50% 48%,#ffffffb8,#ffffff8f 34%,#ffffff47,#ffffff1f),linear-gradient(180deg,#fafdff7a,#fafdff4d 42%,#f8fcff7a)}.chat-header{display:flex;align-items:center;justify-content:space-between;padding:12px 20px;border-bottom:1px solid var(--border);background:var(--bg);flex-shrink:0}.chat-header-left,.header-max-info{display:flex;align-items:center;gap:10px}.header-name{font-size:14px;font-weight:700;display:flex;align-items:center;gap:6px}.online-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#1f9c54}.header-sub{font-size:11.5px;color:var(--text-3)}.chat-header-right{display:flex;align-items:center;gap:4px}.icon-btn{position:relative;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:8px;border:none;background:transparent;color:var(--text-2);transition:background .15s,color .15s}.icon-btn:hover{background:var(--bg-hover);color:var(--text)}.icon-badge{position:absolute;top:4px;right:4px;background:var(--accent);color:#fff;border-radius:99px;font-size:9px;font-weight:700;padding:0 3px;min-width:14px;height:14px;line-height:14px;text-align:center}.messages-area{flex:1;overflow-y:auto;padding:0;display:flex;flex-direction:column}.welcome{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 24px;max-width:680px;margin:0 auto;width:100%;text-align:center}.welcome-title{margin-top:20px;font-size:2rem;font-weight:800;letter-spacing:-.03em;color:var(--text)}.welcome-sub{margin-top:10px;font-size:15px;color:var(--text-2);line-height:1.65;max-width:480px}.starters{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:28px;width:100%;max-width:580px}.starter-btn{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 14px;border-radius:14px;border:1px solid var(--border);background:var(--bg-card);color:var(--text);font-size:13.5px;font-weight:500;text-align:left;transition:all .15s}.starter-btn:hover{background:var(--bg-hover);border-color:var(--accent-border);color:var(--accent)}.starter-btn svg{flex-shrink:0;color:var(--text-3)}.messages{padding:20px 0 8px;display:flex;flex-direction:column}.msg-row{display:flex;gap:12px;padding:6px 24px;transition:background .1s}.msg-row:hover{background:var(--bg-hover)}.msg-row.user{flex-direction:row-reverse;justify-content:flex-start}.msg-avatar-wrap{flex-shrink:0;padding-top:2px}.user-avatar{order:1}.user-icon{width:28px;height:28px;border-radius:999px;background:var(--bg-card);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;color:var(--text-2)}.msg-bubble{max-width:min(680px,calc(100% - 56px));font-size:15px;line-height:1.65;word-break:break-word;overflow-wrap:anywhere}.msg-bubble.user{background:var(--bg-user-bubble);border:1px solid var(--border);border-radius:18px 18px 4px;padding:10px 16px}.msg-bubble.assistant{padding:4px 0;color:var(--text)}[data-theme=ameeba] .msg-bubble.assistant{padding:10px 16px;border:1px solid rgba(24,55,82,.1);border-radius:20px 20px 20px 4px;background:#ffffffd1;color:#17283a;box-shadow:0 10px 28px #1f46691a,inset 0 1px #ffffff85}[data-theme=ameeba] .msg-bubble.user{border-color:#ffffff24;background:linear-gradient(180deg,#1c344cf5,#14273afa);color:#fff;box-shadow:0 12px 30px #10253933,inset 0 1px #ffffff24}[data-theme=ameeba] .msg-row:hover{background:transparent}.msg-para{margin-bottom:8px}.msg-para:last-child{margin-bottom:0}.thinking{display:flex;align-items:center;gap:6px;color:var(--text-3);font-size:13px;font-weight:600;padding:6px 0;animation:pulse 2s ease-in-out infinite}@keyframes pulse{0%,to{opacity:.5}50%{opacity:1}}.code-block-wrap{margin:10px 0;border-radius:10px;overflow:hidden;border:1px solid var(--border);background:#0d1117}.code-lang{padding:6px 14px;font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;color:#fff6;background:#ffffff0a;border-bottom:1px solid rgba(255,255,255,.06);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}.code-pre{padding:14px;overflow-x:auto;font-size:13.5px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;color:#e6edf3;line-height:1.55;background:transparent}.ic{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:var(--bg-card);border:1px solid var(--border);padding:1px 5px;border-radius:4px;font-size:.88em;color:var(--accent)}.rate-banner{display:flex;align-items:center;gap:8px;margin:0 24px 8px;padding:10px 14px;border-radius:10px;background:#ef444414;border:1px solid rgba(239,68,68,.2);color:#f87171;font-size:13.5px;flex-shrink:0}.input-area{padding:12px 24px 16px;flex-shrink:0;background:var(--bg)}[data-theme=ameeba] .input-area{background:linear-gradient(180deg,transparent,rgba(255,255,255,.85) 55%)}.input-box{display:flex;align-items:flex-end;gap:8px;background:var(--bg-input);border:1px solid var(--border);border-radius:16px;padding:10px 10px 10px 16px;transition:border-color .2s,box-shadow .2s}.input-box:focus-within{border-color:var(--accent-border);box-shadow:0 0 0 2px var(--accent-bg)}.chat-input{flex:1;background:transparent;border:none;outline:none;color:var(--text);font-family:inherit;font-size:15px;line-height:1.5;resize:none;overflow-y:auto;max-height:160px;min-height:24px}.chat-input::placeholder{color:var(--text-3)}.send-btn{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;border:none;background:var(--send-bg);color:var(--send-icon);flex-shrink:0;transition:opacity .15s,background .15s}.send-btn:not(.disabled):hover{opacity:.85}.send-btn.disabled{background:var(--send-bg-disabled);color:var(--send-icon-disabled);cursor:not-allowed}.input-hint{margin-top:6px;font-size:11.5px;color:var(--text-3);text-align:center}.drawer-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0006;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:100;display:flex;justify-content:flex-end;animation:fadein .18s ease}.drawer{width:min(400px,100%);height:100%;background:var(--bg-sidebar);border-left:1px solid var(--border);box-shadow:var(--shadow-drawer);display:flex;flex-direction:column;animation:slidein .22s cubic-bezier(.16,1,.3,1)}.drawer-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border);flex-shrink:0}.drawer-title{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:700}.close-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;border:none;background:transparent;color:var(--text-2);transition:background .15s}.close-btn:hover{background:var(--bg-hover);color:var(--text)}.drawer-body{flex:1;overflow-y:auto;padding:20px;display:flex;flex-direction:column;gap:12px}.drawer-desc{font-size:13px;color:var(--text-2);line-height:1.6}.mem-card{background:var(--bg-card);border:1px solid var(--border);border-radius:12px;padding:14px}.mem-card-title{display:flex;align-items:center;gap:6px;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--text-2);margin-bottom:10px}.mem-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mem-stat{background:var(--bg);border-radius:8px;padding:10px 12px;display:flex;flex-direction:column;gap:2px}.mem-stat-label{font-size:11px;color:var(--text-3)}.mem-stat-val{font-size:14px;font-weight:700}.mem-stat-val.accent{color:var(--accent)}.mem-list{list-style:none;display:flex;flex-direction:column;gap:6px;font-size:13.5px;color:var(--text-2)}.mem-list li{line-height:1.5}.mem-empty{font-size:13px;color:var(--text-3);font-style:italic;line-height:1.55}.reset-btn{display:flex;align-items:center;justify-content:center;gap:6px;padding:10px;width:100%;border-radius:10px;border:1px solid rgba(239,68,68,.22);background:#ef444412;color:#f87171;font-size:13.5px;font-weight:500;margin-top:auto;transition:background .15s}.reset-btn:hover{background:#ef444424}@keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes slidein{0%{transform:translate(100%)}to{transform:translate(0)}}@media (max-width: 700px){.sidebar{display:none}.msg-row{padding:6px 14px}.input-area{padding:10px 14px 14px}.welcome{padding:32px 16px}.starters{grid-template-columns:1fr}.welcome-title{font-size:1.6rem}.messages{padding:12px 0 8px}}.max-welcome-character{display:flex;align-items:center;justify-content:center;width:min(100%,270px);height:244px;flex-shrink:0}.max-welcome-character .max-character{filter:drop-shadow(0 12px 22px rgba(0,0,0,.12))}.max-visibility-toggle.active{color:var(--accent)}.max-chat-dock{position:relative;display:flex;align-items:center;gap:0;min-height:94px;padding:0 42px 0 12px;background:var(--bg);border-top:1px solid var(--border);flex-shrink:0;overflow:hidden}.max-chat-dock-character{width:124px;height:94px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.max-chat-dock-character .max-character{transform:scale(.88) rotate(var(--max-directed-tilt,0deg));transform-origin:50% 74%}.max-chat-dock-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.max-chat-dock-copy strong{font-size:13px;color:var(--text)}.max-chat-dock-copy span{font-size:12px;color:var(--text-3)}.max-chat-dock-close{position:absolute;top:12px;right:15px;border:0;background:transparent;color:var(--text-3);padding:6px;cursor:pointer;border-radius:8px}.max-chat-dock-close:hover{background:var(--bg-card);color:var(--text)}@media (max-width:700px){.max-welcome-character{height:195px}.max-welcome-character .max-character{transform:scale(.78)}.max-chat-dock{min-height:75px}.max-chat-dock-character{width:92px;height:74px}.max-chat-dock-character .max-character{transform:scale(.65)}}@media (prefers-reduced-motion:reduce){.max-chat-dock-character .max-character{transform:scale(.88)}.max-welcome-character .max-character{animation:none}}.max-chat-workspace{display:flex;flex:1;min-height:0;min-width:0;overflow:hidden}.max-chat-conversation{display:flex;flex:1 1 65%;flex-direction:column;min-width:0;min-height:0}.max-character-panel{display:flex;flex:0 0 clamp(300px,34%,530px);min-width:0;min-height:0;flex-direction:column;background:var(--bg-sidebar);border-left:1px solid var(--border);overflow:hidden}.max-character-panel-header{display:flex;align-items:center;justify-content:space-between;min-height:65px;padding:16px 22px;border-bottom:1px solid var(--border)}.max-character-panel-title{display:flex;align-items:center;gap:9px;color:var(--text);font-size:15px}.max-character-online,.max-character-status-dot{display:inline-block;width:8px;height:8px;flex-shrink:0;border-radius:50%;background:#24c59b;box-shadow:0 0 0 3px #24c59b1a}.max-character-panel-subtitle{font-size:11px;color:var(--text-3);font-weight:400;margin-left:3px}.max-character-panel-close{display:flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:transparent;color:var(--text-3);padding:7px;cursor:pointer}.max-character-panel-close:hover{background:var(--bg-hover);color:var(--text)}.max-character-panel-stage{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;padding:20px 10px;overflow:hidden;background:radial-gradient(ellipse at 50% 58%,rgba(234,171,68,.075),transparent 68%)}.max-character-panel-figure{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:0}.max-character-panel-figure .max-character{max-width:100%;max-height:100%;width:auto;height:auto;filter:drop-shadow(0 22px 24px rgba(0,0,0,.16))}.max-character-panel-footer{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;min-height:72px;padding:14px 18px;border-top:1px solid var(--border)}.max-character-panel-status{display:flex;align-items:center;justify-content:center;gap:10px;font-size:13px;font-weight:600;color:var(--text);text-align:center}.max-character-status-dot.thinking{background:#e6a74d;box-shadow:0 0 0 3px #e6a74d1f}@media (max-width:1100px){.max-character-panel{flex-basis:clamp(270px,37%,390px)}.max-character-panel-figure .max-character{max-width:100%}}@media (max-width:760px){.max-chat-workspace{flex-direction:column}.max-chat-conversation{flex:1 1 auto;min-height:0}.max-character-panel{flex:0 0 auto;height:190px;min-height:190px;flex-direction:row;border-left:0;border-top:1px solid var(--border)}.max-character-panel-header{min-height:0;align-items:flex-start;border-bottom:0;padding:12px}.max-character-panel-title{flex-wrap:wrap;font-size:12px}.max-character-panel-subtitle{display:none}.max-character-panel-stage{flex:1;min-width:0;padding:0}.max-character-panel-figure .max-character{max-height:175px}.max-character-panel-footer{min-height:0;width:115px;border-top:0;padding:10px}.max-character-panel-status{font-size:11px}}@media (max-width:440px){.max-character-panel{height:150px;min-height:150px}.max-character-panel-figure .max-character{max-height:140px}.max-character-panel-header{padding:8px}.max-character-panel-footer{width:90px;padding:5px}}.msg-heading{font-weight:700;line-height:1.4;margin:16px 0 8px;color:var(--text)}.msg-heading:first-child{margin-top:0}.msg-heading-1{font-size:1.4em}.msg-heading-2{font-size:1.25em}.msg-heading-3{font-size:1.12em}.msg-heading-4,.msg-heading-5,.msg-heading-6{font-size:1em}.msg-list{margin:6px 0 14px;padding-left:24px}.msg-list li{padding-left:2px;margin:4px 0}.msg-bubble a{color:var(--accent);text-decoration:underline;text-underline-offset:2px}.messages-area{scrollbar-width:thin;scrollbar-color:#555 transparent}.messages-area::-webkit-scrollbar{width:6px}.messages-area::-webkit-scrollbar-track{background:transparent}.messages-area::-webkit-scrollbar-thumb{background:#555;border-radius:999px}.messages-area::-webkit-scrollbar-thumb:hover{background:#777}.msg-row{position:relative;padding-top:11px;padding-bottom:11px}.msg-bubble{font-size:15px;line-height:1.65}.msg-bubble.assistant{max-width:min(740px,calc(100% - 105px))}.msg-bubble .msg-para{margin-bottom:12px}.msg-bubble .msg-para:last-child{margin-bottom:0}.msg-bubble .msg-heading{margin-top:20px;margin-bottom:10px}.msg-bubble .msg-heading:first-child{margin-top:0}.msg-bubble .msg-list{margin-top:9px;margin-bottom:16px}.msg-bubble .msg-list li{margin:6px 0;line-height:1.6}.msg-copy-btn{align-self:flex-start;flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;margin-top:2px;border:0;border-radius:8px;background:transparent;color:var(--text-3);opacity:0;transition:opacity .15s ease,background .15s ease,color .15s ease}.msg-row.assistant:hover .msg-copy-btn,.msg-copy-btn:focus-visible{opacity:1}.msg-copy-btn:hover{background:var(--bg-hover);color:var(--text)}.msg-copy-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media (hover: none){.msg-copy-btn{opacity:1}}@media (max-width: 700px){.msg-row{padding:10px 14px}.msg-bubble.assistant{max-width:calc(100% - 88px)}}@media (prefers-reduced-motion: reduce){.msg-copy-btn{transition:none}}.max-character-panel-link{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;width:100%;min-width:0;padding:4px 8px;border-radius:8px;text-align:center;text-decoration:none;color:var(--text);transition:background-color .2s ease,color .2s ease}.max-character-panel-link strong{font-size:12px;font-weight:600;line-height:1.4}.max-character-panel-link span{font-size:11px;line-height:1.4;color:var(--text-3)}.max-character-panel-link:hover{background:var(--bg-hover)}.max-character-panel-link:hover span{color:var(--accent)}.max-character-panel-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media (prefers-reduced-motion: reduce){.max-character-panel-link{transition:none}}.max-character-panel-actions{display:flex;align-items:center;gap:3px}.max-character-panel-actions .max-character-panel-close{min-width:31px;min-height:31px}.max-character-panel-actions .max-character-panel-close:focus-visible,.max-input-mic:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.max-character-panel.expanded{flex-basis:min(55%,780px)}.max-input-mic{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:0;border-radius:10px;background:transparent;color:var(--text-3);cursor:pointer;flex-shrink:0}.max-input-mic:hover,.max-input-mic.listening{color:var(--accent);background:var(--bg-hover)}.max-input-mic.listening{animation:max-listening-pulse 1.5s ease-in-out infinite}@keyframes max-listening-pulse{50%{box-shadow:0 0 0 4px var(--accent-bg)}}.max-voice-error{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 14px;color:var(--text);font-size:12px}.max-voice-error button{border:0;background:transparent;color:inherit;cursor:pointer}@media (max-width:760px){.max-character-panel.expanded{flex-basis:auto}.max-character-panel-actions{gap:0}.max-character-panel-actions .max-character-panel-close{min-width:25px;min-height:28px;padding:4px}}@media (prefers-reduced-motion:reduce){.max-input-mic.listening{animation:none}}.mobile-menu-trigger,.mobile-sidebar-backdrop,.mobile-menu-close,.mobile-max-expand{display:none}@media (max-width:760px){html,body,#root{height:100%;height:100dvh;overscroll-behavior:none}.root{height:100%;height:100dvh;min-height:0;overflow:hidden}.chat-area{min-height:0;width:100%}.chat-header{min-height:58px;padding:8px 12px;gap:6px;padding-top:max(8px,env(safe-area-inset-top))}.chat-header-left{min-width:0;gap:6px}.chat-header-right{gap:0}.chat-header-right .icon-btn{width:38px;height:42px}.header-memory-btn,.header-theme-btn{display:none}.mobile-menu-trigger{display:flex;flex:0 0 42px;width:42px;height:42px}.sidebar,.sidebar.open,.sidebar.closed{display:flex;position:fixed;top:0;bottom:0;left:0;z-index:202;width:min(300px,84vw);max-width:84vw;transform:translate(-105%);transition:transform .24s ease;box-shadow:0 20px 70px #0000004d;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}.sidebar.mobile-open{transform:translate(0)}.sidebar.closed .sidebar-logo-text{display:flex}.sidebar-collapse-btn{display:none}.mobile-sidebar-backdrop{display:block;position:fixed;top:0;right:0;bottom:0;left:0;z-index:200;border:0;background:#00000085;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.mobile-menu-close{display:none;position:fixed;z-index:204;top:max(13px,env(safe-area-inset-top));left:min(calc(84vw - 49px),251px);width:38px;height:38px;align-items:center;justify-content:center;border:0;border-radius:10px;background:var(--bg-card);color:var(--text)}.root:has(.sidebar.mobile-open) .mobile-menu-close{display:flex}.max-chat-workspace{flex-direction:column;min-height:0;position:relative}.max-chat-conversation{flex:1 1 auto;min-height:0;min-width:0}.messages-area{min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.messages{padding:12px 0 14px}.msg-row{padding:10px 12px;gap:9px}.msg-bubble,.msg-bubble.assistant{max-width:calc(100% - 66px);font-size:14.5px;line-height:1.58}.msg-bubble.user{padding:9px 12px}.msg-copy-btn{opacity:1;width:28px;height:32px}.welcome{justify-content:flex-start;padding:18px 18px 24px;min-height:min-content}.welcome-title{font-size:clamp(1.45rem,6vw,1.85rem);margin-top:8px}.welcome-sub{font-size:13.5px;line-height:1.5;margin-top:6px}.starters{grid-template-columns:1fr;gap:7px;margin-top:18px}.starter-btn{min-height:43px;padding:10px 13px;font-size:13px}.input-area{padding:9px 12px max(10px,env(safe-area-inset-bottom));background:var(--bg);position:relative;z-index:3}.input-box{padding:7px 7px 7px 13px;border-radius:17px;align-items:center}.chat-input{font-size:16px;min-width:0;line-height:1.4}.send-btn,.max-input-mic{width:40px;height:40px;min-width:40px}.rate-banner{margin:0 12px 6px}.drawer{width:min(400px,100%);padding-bottom:env(safe-area-inset-bottom)}.max-character-panel{position:absolute;z-index:5;right:12px;bottom:90px;top:auto;left:auto;display:flex;flex-direction:column;flex:0 0 auto;width:112px;height:132px;min-height:0;min-width:0;border:1px solid var(--border);border-radius:16px;background:var(--bg-sidebar);box-shadow:0 12px 35px #00000038;overflow:hidden}.max-character-panel-header{min-height:0;height:27px;padding:3px 5px;border:0;align-items:center;flex:0 0 auto}.max-character-panel-title{font-size:11px;gap:5px}.max-character-panel-subtitle,.max-character-panel-footer{display:none}.max-character-panel-actions{gap:0}.max-character-panel-actions .max-character-panel-close{display:none}.max-character-panel-actions .mobile-max-expand{display:flex;min-width:25px;min-height:25px}.max-character-panel-stage{flex:1;min-height:0;padding:0}.max-character-panel-figure{min-height:0;overflow:hidden}.max-character-panel-figure .max-character{max-width:100%;max-height:100%;height:auto;width:auto}.max-character-panel.expanded{flex-basis:auto}.max-character-panel.mobile-expanded{position:absolute;top:10px;right:10px;bottom:80px;left:10px;width:auto;height:auto;min-height:0;max-height:none;border-radius:20px;z-index:10}.max-character-panel.mobile-expanded .max-character-panel-header{height:48px;padding:8px 12px}.max-character-panel.mobile-expanded .max-character-panel-actions .max-character-panel-close{display:flex}.max-character-panel.mobile-expanded .max-character-panel-stage{padding:12px}.max-character-panel.mobile-expanded .max-character-panel-footer{display:flex;min-height:54px;width:100%;padding:8px;border-top:1px solid var(--border)}.is-welcome .max-chat-workspace{overflow-y:auto;display:flex;flex-direction:column}.is-welcome .max-character-panel{position:relative;order:-1;top:auto;right:auto;bottom:auto;left:auto;width:100%;height:clamp(150px,26dvh,235px);min-height:150px;max-height:235px;box-shadow:none;border:0;border-radius:0;background:transparent;flex-shrink:0}.is-welcome .max-character-panel-header,.is-welcome .max-character-panel-footer{display:none}.is-welcome .max-character-panel-stage{padding:0}.is-welcome .max-character-panel.mobile-expanded{position:fixed;top:65px;right:12px;bottom:90px;left:12px;width:auto;height:auto;max-height:none;z-index:20;background:var(--bg-sidebar);border:1px solid var(--border);border-radius:20px}.is-welcome .max-character-panel.mobile-expanded .max-character-panel-header{display:flex}.is-welcome .max-chat-conversation{flex:1 0 auto;overflow:visible}.is-welcome .messages-area{overflow:visible}.is-welcome .welcome{padding-top:0}.is-welcome .input-area{position:sticky;bottom:0;margin-top:auto}}@media (max-width:380px){.chat-header-right .icon-btn{width:34px}.msg-row{padding-inline:9px}.welcome{padding-inline:12px}.max-character-panel:not(.mobile-expanded){width:94px;height:113px}.is-welcome .max-character-panel:not(.mobile-expanded){width:100%;height:150px}}@media (max-width:760px) and (max-height:650px){.is-welcome .max-character-panel{height:125px;min-height:125px}.welcome-sub{font-size:12.5px}.starters{margin-top:10px}}@media (prefers-reduced-motion:reduce){.sidebar{transition:none}}.max-layout-switch{display:flex;align-items:center;gap:3px;margin-right:10px;padding:3px;border:1px solid var(--border);border-radius:12px;background:var(--bg-card)}.max-layout-option{display:flex;align-items:center;justify-content:center;gap:7px;min-height:32px;padding:6px 11px;border:0;border-radius:9px;background:transparent;color:var(--text-2);font-size:12px;font-weight:600;white-space:nowrap}.max-layout-option.selected{background:var(--bg);color:var(--accent);box-shadow:var(--shadow)}.max-layout-option:hover:not(.selected){background:var(--bg-hover);color:var(--text)}.max-layout-option:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@media (min-width:761px){.layout-companion .max-chat-workspace{flex-direction:column;align-items:stretch}.layout-companion .max-character-panel{order:-1;flex:0 0 clamp(240px,42dvh,440px);width:100%;height:auto;min-height:0;border-left:0;border-bottom:1px solid var(--border);background:transparent}.layout-companion .max-character-panel-header{min-height:48px;padding:9px 24px;border-bottom:0}.layout-companion .max-character-panel-stage{padding:0 16px 4px}.layout-companion .max-character-panel-figure .max-character{max-height:100%;max-width:100%}.layout-companion .max-character-panel-footer{display:none}.layout-companion .max-chat-conversation{flex:1 1 auto;min-height:0;width:100%;max-width:980px;margin:0 auto}.layout-companion .messages-area{min-height:0}.layout-companion .welcome{justify-content:flex-start;padding:16px 24px 20px}.layout-companion .welcome-title{margin-top:4px}.layout-companion .starters{margin-top:18px}.layout-companion .max-character-panel.expanded{flex-basis:clamp(300px,56dvh,620px)}.layout-companion.has-messages .max-character-panel{flex-basis:clamp(170px,29dvh,280px)}.layout-companion.has-messages .max-character-panel.expanded{flex-basis:clamp(300px,52dvh,520px)}.layout-companion .input-area{width:100%}}@media (max-width:1050px) and (min-width:761px){.max-layout-option span{display:none}.max-layout-switch{margin-right:5px}.layout-companion .max-character-panel{flex-basis:clamp(220px,36dvh,350px)}}@media (max-width:760px){.max-layout-switch{margin-right:3px;gap:1px;padding:2px;border-radius:10px}.max-layout-option{min-width:35px;min-height:36px;padding:7px}.max-layout-option span{display:none}.layout-companion.has-messages .max-character-panel:not(.mobile-expanded){position:relative;order:-1;inset:auto;width:100%;height:clamp(150px,26dvh,220px);min-height:150px;max-height:220px;flex:0 0 auto;border:0;border-bottom:1px solid var(--border);border-radius:0;box-shadow:none;background:transparent}.layout-companion.has-messages .max-character-panel:not(.mobile-expanded) .max-character-panel-header{height:30px;padding:3px 12px}.layout-companion.has-messages .max-chat-conversation{min-height:0;flex:1 1 auto}.layout-companion.has-messages .max-character-panel.mobile-expanded{top:10px;right:10px;bottom:80px;left:10px;width:auto;height:auto;min-height:0;max-height:none}}@media (max-width:390px){.chat-header-right .max-layout-option{min-width:31px;padding:5px}.chat-header-right .max-layout-switch{margin-right:0}}@media (max-width:760px) and (max-height:620px){.layout-companion.has-messages .max-character-panel:not(.mobile-expanded){height:110px;min-height:110px}}@media (prefers-reduced-motion:reduce){.max-layout-option{transition:none}}.max-companion-status{display:none;align-items:center;justify-content:center;gap:8px;color:var(--text-2);font-size:12px;font-weight:500;flex:0 0 auto}.max-companion-status svg{color:#d7a74d}@media (min-width:761px){.layout-companion .max-chat-workspace{gap:0}.layout-companion .max-character-panel{position:relative;isolation:isolate;flex:0 0 clamp(340px,49dvh,540px);border:0;overflow:hidden;background:transparent;transition:flex-basis .3s ease}.layout-companion .max-character-panel:before{content:"";position:absolute;z-index:-1;top:6%;right:14%;bottom:0;left:14%;background:radial-gradient(ellipse at 50% 58%,rgba(237,177,78,.13),rgba(237,177,78,.035) 36%,transparent 69%);pointer-events:none}.layout-companion .max-character-panel-header{position:absolute;top:12px;left:50%;transform:translate(-50%);width:min(680px,calc(100% - 48px));z-index:2;padding:0 8px;min-height:42px;justify-content:flex-end;border:0}.layout-companion .max-character-panel-title{display:none}.layout-companion .max-character-panel-actions{gap:5px;padding:4px;border:1px solid var(--border);border-radius:12px;background:var(--bg-card)}.layout-companion .max-character-panel-actions .max-character-panel-close{width:34px;height:34px}.layout-companion .max-character-panel-stage{flex:1;min-height:0;padding:44px 12px 0;background:transparent}.layout-companion .max-character-panel-figure{min-height:0}.layout-companion .max-character-panel-figure .max-character{max-height:100%;max-width:100%;filter:drop-shadow(0 18px 22px rgba(0,0,0,.13))}.layout-companion .max-companion-status{display:flex;min-height:38px;padding-bottom:10px}.layout-companion .max-chat-conversation{max-width:1100px}.layout-companion .messages-area{min-height:0}.layout-companion .messages{padding-top:4px}.layout-companion .msg-row{padding-left:24px;padding-right:24px}.layout-companion .input-area{padding-top:10px}.layout-companion.has-messages .max-character-panel{flex-basis:clamp(265px,38dvh,430px)}.layout-companion.has-messages .max-character-panel.expanded{flex-basis:clamp(360px,58dvh,610px)}.layout-companion.is-welcome .max-character-panel{flex-basis:clamp(360px,51dvh,560px)}.layout-companion .max-character-panel.expanded{flex-basis:clamp(400px,60dvh,650px)}.layout-companion.is-welcome .welcome{padding-top:8px;padding-bottom:22px}.layout-companion.is-welcome .welcome-title{margin-top:0}}@media (min-width:761px) and (max-height:720px){.layout-companion .max-character-panel,.layout-companion.is-welcome .max-character-panel{flex-basis:clamp(235px,43dvh,340px)}.layout-companion.has-messages .max-character-panel{flex-basis:clamp(190px,32dvh,270px)}.layout-companion .max-character-panel-stage{padding-top:38px}}@media (max-width:760px){.layout-companion .max-character-panel:not(.mobile-expanded){background:transparent;border:0;box-shadow:none}.layout-companion.is-welcome .max-character-panel:not(.mobile-expanded){height:clamp(210px,33dvh,320px);min-height:210px;max-height:320px}.layout-companion.has-messages .max-character-panel:not(.mobile-expanded){height:clamp(170px,29dvh,245px);min-height:170px;max-height:245px;border-bottom:0}.layout-companion .max-character-panel:not(.mobile-expanded) .max-character-panel-header{position:absolute;z-index:2;right:8px;top:8px;width:auto;padding:0;border:0}.layout-companion .max-character-panel:not(.mobile-expanded) .max-character-panel-title{display:none}.layout-companion .max-character-panel:not(.mobile-expanded) .max-character-panel-actions .mobile-max-expand{display:flex;background:var(--bg-card);border:1px solid var(--border);border-radius:9px}.layout-companion .max-character-panel:not(.mobile-expanded) .max-character-panel-stage{padding:10px 10px 0;background:radial-gradient(ellipse at center,rgba(237,177,78,.1),transparent 66%)}.layout-companion .max-character-panel:not(.mobile-expanded) .max-companion-status{display:flex;min-height:29px;font-size:11px;padding-bottom:4px}.layout-companion .max-character-panel.mobile-expanded .max-companion-status{display:flex;padding:8px}.layout-companion .max-chat-conversation{min-height:0}.layout-companion .messages{padding-top:3px}.layout-companion .input-area{padding-bottom:max(10px,env(safe-area-inset-bottom))}}@media (max-width:760px) and (max-height:620px){.layout-companion.has-messages .max-character-panel:not(.mobile-expanded){height:125px;min-height:125px}.layout-companion.is-welcome .max-character-panel:not(.mobile-expanded){height:155px;min-height:155px}}@media (prefers-reduced-motion:reduce){.layout-companion .max-character-panel{transition:none}}.companion-conversation-heading{display:none}@media (min-width:901px){.layout-companion .max-chat-workspace{flex-direction:row;align-items:stretch;gap:0}.layout-companion .max-character-panel,.layout-companion.has-messages .max-character-panel,.layout-companion.is-welcome .max-character-panel,.layout-companion .max-character-panel.expanded,.layout-companion.has-messages .max-character-panel.expanded{order:0;flex:1 1 0;width:auto;height:100%;min-width:0;min-height:0;border:0;border-radius:0;transition:none}.layout-companion .max-character-panel{display:flex;flex-direction:column}.layout-companion .max-character-panel:before{top:14%;right:2%;bottom:12%;left:2%;background:radial-gradient(ellipse at 50% 48%,rgba(237,177,78,.14),rgba(237,177,78,.04) 42%,transparent 72%)}.layout-companion .max-character-panel-header{top:auto;bottom:76px;left:50%;transform:translate(-50%);width:auto;min-height:0;padding:0;justify-content:center}.layout-companion .max-character-panel-actions{gap:4px}.layout-companion .max-character-panel-stage{flex:1 1 auto;min-height:0;padding:46px 24px 84px}.layout-companion .max-character-panel-figure .max-character{max-width:100%;max-height:min(62dvh,590px)}.layout-companion .max-companion-status{position:absolute;bottom:132px;left:0;right:0;min-height:25px;padding:0;pointer-events:none}.layout-companion .max-character-panel-footer{display:none}.layout-companion .max-chat-conversation{order:1;flex:0 0 clamp(390px,36%,560px);width:clamp(390px,36%,560px);max-width:none;min-width:0;min-height:0;margin:0;border-left:1px solid var(--border);background:var(--bg)}.layout-companion .companion-conversation-heading{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;min-height:56px;padding:0 22px;border-bottom:1px solid var(--border)}.companion-conversation-label{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:650;color:var(--text)}.companion-conversation-label svg{color:var(--accent)}.companion-conversation-hint{font-size:12px;color:var(--text-3)}.layout-companion .messages-area{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}.layout-companion .messages{padding:16px 0 20px}.layout-companion .msg-row{gap:9px;padding:10px 18px}.layout-companion .msg-bubble{font-size:15.5px;line-height:1.65;max-width:calc(100% - 42px)}.layout-companion .msg-bubble.assistant{max-width:calc(100% - 68px)}.layout-companion .msg-avatar-wrap{flex:0 0 auto}.layout-companion .msg-copy-btn{width:28px;height:28px}.layout-companion .input-area{flex:0 0 auto;padding:12px 16px max(16px,env(safe-area-inset-bottom));background:var(--bg)}.layout-companion .input-box{border-radius:16px}.layout-companion .welcome{justify-content:center;padding:20px 22px;max-width:100%}.layout-companion .welcome-title{font-size:1.6rem}.layout-companion .welcome-sub{font-size:14px}.layout-companion .starters{grid-template-columns:1fr;max-width:100%;margin-top:20px}.layout-companion .starter-btn{padding:11px 13px}}@media (min-width:901px) and (max-width:1120px){.layout-companion .max-chat-conversation{flex-basis:clamp(370px,43%,470px);width:clamp(370px,43%,470px)}.layout-companion .max-character-panel-stage{padding-left:10px;padding-right:10px}}@media (max-width:900px) and (min-width:761px){.layout-companion .max-chat-workspace{flex-direction:column}.layout-companion .companion-conversation-heading{display:none}}@media (max-width:760px){.layout-companion .companion-conversation-heading{display:none}}@media (prefers-reduced-motion:reduce){.layout-companion .max-character-panel-stage{transition:none}}.layout-companion .max-character-panel-header,.layout-companion .max-companion-status,.layout-companion .max-character-panel-footer{display:none!important}.layout-companion .max-character-panel-stage{padding:clamp(10px,2.5vh,30px) clamp(8px,2vw,28px)!important;min-height:0;display:flex;align-items:center;justify-content:center}.layout-companion .max-character-panel-figure{width:100%;height:100%;min-height:0;min-width:0;display:flex;align-items:center;justify-content:center;overflow:visible}.layout-companion .max-character-panel-figure .max-character{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}@media (min-width:901px){.layout-companion .max-character-panel-stage{padding:clamp(12px,3vh,34px) clamp(8px,2vw,28px)!important}.layout-companion .max-character-panel-figure .max-character{max-height:calc(100dvh - 125px)}}@media (max-width:900px){.layout-companion .max-character-panel-stage{padding:8px!important}.layout-companion .max-character-panel-figure .max-character{max-height:100%}}.companion-splitter{display:none}@media (min-width:901px){.layout-companion .max-chat-workspace{position:relative}.layout-companion .max-character-panel{order:0;min-width:0}.layout-companion .companion-splitter{display:flex;order:1;position:relative;z-index:5;flex:0 0 9px;align-items:center;justify-content:center;cursor:col-resize;touch-action:none;background:transparent}.layout-companion .companion-splitter:before{content:"";position:absolute;top:0;right:3px;bottom:0;left:3px;background:var(--border);opacity:.65}.layout-companion .companion-splitter:hover:before,.layout-companion .companion-splitter:focus-visible:before{background:var(--accent);opacity:1}.layout-companion .companion-splitter:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.layout-companion .companion-splitter-grip{position:relative;width:4px;height:42px;border-radius:5px;background:var(--text-3);opacity:.55;pointer-events:none}.layout-companion .max-chat-conversation{order:2;flex:0 0 min(var(--companion-chat-width,480px),calc(100% - 329px));width:min(var(--companion-chat-width,480px),calc(100% - 329px));min-width:0;max-width:none;border-left:0}.layout-companion .companion-chat-expanded .max-chat-conversation{flex-basis:min(75%,920px);width:min(75%,920px)}.layout-companion .companion-chat-expanded .companion-splitter{pointer-events:none;opacity:.35}.layout-companion .companion-conversation-heading{min-height:54px;padding:0 20px}.layout-companion .companion-chat-expand{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--text-2);cursor:pointer}.layout-companion .companion-chat-expand:hover{background:var(--bg-hover);border-color:var(--border);color:var(--text)}.layout-companion .messages{padding:18px 0 26px}.layout-companion .msg-row{padding:13px 18px;gap:11px;align-items:flex-start}.layout-companion .msg-bubble{font-size:16px;line-height:1.6;max-width:calc(100% - 48px)}.layout-companion .msg-bubble.user{max-width:min(85%,calc(100% - 48px));padding:11px 15px}.layout-companion .msg-bubble.assistant{max-width:calc(100% - 80px)}.layout-companion .msg-bubble .msg-para{margin-bottom:13px}.layout-companion .msg-bubble pre{max-width:100%;overflow-x:auto}.layout-companion .input-area{padding:14px 18px max(16px,env(safe-area-inset-bottom))}}@media (max-width:900px){.companion-splitter,.companion-chat-expand{display:none!important}}@media (prefers-reduced-motion:reduce){.layout-companion .companion-splitter{transition:none}}.max-auth-entry{display:flex;align-items:center;gap:10px;width:100%;border:1px solid var(--border);border-radius:10px;background:var(--bg-card);color:var(--text);padding:11px 12px;cursor:pointer;margin-bottom:10px;text-align:left}.max-auth-entry:hover{background:var(--bg-hover)}.ameeba-auth-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:5000;background:#000000bf;display:flex;align-items:center;justify-content:center;padding:18px}.ameeba-auth-dialog{position:relative;width:min(440px,100%);max-height:95vh;overflow:auto;border:1px solid var(--border);border-radius:22px;background:var(--bg-sidebar);color:var(--text);padding:30px;text-align:center;box-shadow:0 25px 80px #00000073}.ameeba-auth-dialog h2{margin:5px 0 8px;font-size:24px}.ameeba-auth-dialog p{color:var(--text-2);line-height:1.5}.ameeba-auth-close{position:absolute;right:14px;top:14px;background:none;border:0;color:var(--text);cursor:pointer}.ameeba-auth-qr{display:block;margin:20px auto;background:#fff;border-radius:12px;padding:10px;width:230px;height:230px}.ameeba-auth-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:20px}.ameeba-auth-actions button,.ameeba-auth-actions a{border:1px solid var(--border);border-radius:10px;background:var(--bg-card);color:var(--text);padding:11px 15px;cursor:pointer;text-decoration:none;font:inherit}.ameeba-auth-actions a{background:var(--accent);color:#fff}.ameeba-auth-error{color:#ff9d9d!important;font-size:13px;overflow-wrap:anywhere}.sidebar-btn.max-nav-active{background:var(--surface-hover, rgba(255,255,255,.08))}.max-feature-drawer{max-width:min(440px,100vw)}.max-feature-body{display:flex;flex-direction:column;gap:14px}.max-feature-note{font-size:12px;line-height:1.6;opacity:.7;margin:0}.max-discover-topic{width:100%;display:flex;align-items:center;gap:12px;border:1px solid rgba(128,128,128,.2);border-radius:12px;background:#80808012;color:inherit;padding:14px;text-align:left;cursor:pointer}.max-discover-topic span{flex:1}.max-discover-topic:hover{background:#80808029}.max-task-form{display:flex;gap:8px}.max-task-form input{min-width:0;flex:1;border-radius:10px;border:1px solid rgba(128,128,128,.3);background:#80808014;padding:11px 12px;color:inherit}.max-task-form button{border:1px solid rgba(128,128,128,.3);border-radius:10px;background:#80808021;color:inherit;padding:10px 12px;cursor:pointer}.max-task-form button:disabled{opacity:.4;cursor:default}.max-task-list{display:flex;flex-direction:column;gap:8px}.max-task-row{display:flex;align-items:center;gap:10px;border:1px solid rgba(128,128,128,.16);border-radius:10px;padding:10px}.max-task-row span{flex:1;min-width:0;overflow-wrap:anywhere}.max-task-row button{background:transparent;border:0;color:inherit;cursor:pointer;opacity:.65}.max-task-row button:hover{opacity:1}.max-task-done{text-decoration:line-through;opacity:.55}.ameeba-downloads{display:flex;flex-direction:column;gap:3px;padding:5px 0 10px;margin-bottom:5px;border-bottom:1px solid var(--border)}.ameeba-downloads-heading{display:flex;align-items:center;gap:9px;padding:8px 10px 5px;color:var(--text);font-size:13px;font-weight:600}.ameeba-download-link{display:flex;align-items:center;gap:9px;min-height:35px;padding:6px 10px 6px 20px;border-radius:9px;color:var(--text-2);font-size:12.5px;font-weight:500;text-decoration:none;transition:background .15s,color .15s;white-space:nowrap}.ameeba-download-link:hover,.ameeba-download-link:focus-visible{background:var(--bg-hover);color:var(--text)}.ameeba-download-icon{display:flex;align-items:center;justify-content:center;width:20px;height:20px;flex:0 0 20px}.ameeba-download-icon img{display:block;width:20px;height:20px;object-fit:contain}.ameeba-download-external{margin-left:auto;opacity:0;transition:opacity .15s}.ameeba-download-link:hover .ameeba-download-external,.ameeba-download-link:focus-visible .ameeba-download-external{opacity:.7}.max-feature-drawer:has(.discover-body){width:min(560px,100vw);max-width:100vw}.max-feature-drawer:has(.task-body){width:min(480px,100vw);max-width:100vw}.discover-search{display:flex;align-items:center;gap:10px;padding:9px 11px;background:var(--bg-card);border:1px solid var(--border);border-radius:12px;color:var(--text-2)}.discover-search:focus-within{border-color:var(--accent)}.discover-search input{flex:1;min-width:0;background:transparent;border:0;outline:0;color:var(--text);font:inherit;font-size:13px}.discover-search button,.discover-feed-header button{display:flex;align-items:center;justify-content:center;border:0;border-radius:7px;padding:6px;background:transparent;color:var(--text-2);cursor:pointer}.discover-search button:hover,.discover-feed-header button:hover{background:var(--bg-hover);color:var(--text)}.discover-search button:disabled{opacity:.35;cursor:default}.discover-topics{display:flex;gap:6px;overflow-x:auto;padding-bottom:5px;scrollbar-width:thin}.discover-topics button{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;border:1px solid var(--border);border-radius:20px;background:var(--bg-card);color:var(--text-2);padding:7px 11px;font-size:12px;cursor:pointer}.discover-topics button.selected{color:var(--accent);border-color:var(--accent-border);background:var(--accent-bg)}.discover-feed-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:4px}.discover-feed-header>div{display:flex;flex-direction:column;gap:2px}.discover-feed-header strong{font-size:15px}.discover-feed-header span{font-size:11px;color:var(--text-3)}.discover-empty,.task-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center;padding:34px 18px;border:1px dashed var(--border);border-radius:14px;color:var(--text-2)}.discover-empty strong,.task-empty strong{color:var(--text);font-size:13px}.discover-empty p,.task-empty span{font-size:12px;line-height:1.6;max-width:350px;overflow-wrap:anywhere}.discover-articles{display:flex;flex-direction:column;gap:12px}.discover-article{display:flex;gap:13px;border:1px solid var(--border);border-radius:13px;padding:13px;background:var(--bg-card)}.discover-article>img{width:110px;height:110px;object-fit:cover;border-radius:9px;flex-shrink:0}.discover-article-content{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}.discover-article-source{font-size:10px;color:var(--accent);font-weight:650}.discover-article h3{font-size:14px;line-height:1.4;font-weight:650;overflow-wrap:anywhere}.discover-article p{font-size:12px;color:var(--text-2);line-height:1.5;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.discover-article-actions{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:3px}.discover-article-actions a,.discover-article-actions button{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:6px 8px;border:1px solid var(--border);border-radius:8px;background:transparent;color:var(--text-2);text-decoration:none;font-size:11px;cursor:pointer}.discover-article-actions a:hover,.discover-article-actions button:hover{color:var(--accent);background:var(--accent-bg)}.task-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;padding:4px;background:var(--bg-card);border:1px solid var(--border);border-radius:12px}.task-tabs button{border:0;border-radius:9px;background:transparent;color:var(--text-2);padding:9px;font-size:12px;cursor:pointer}.task-tabs button.selected{background:var(--accent-bg);color:var(--accent);font-weight:650}.task-stats{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.task-stats>div{display:flex;flex-direction:column;gap:3px;padding:13px;background:var(--bg-card);border:1px solid var(--border);border-radius:12px}.task-stats span{font-size:11px;color:var(--text-2)}.task-stats strong{font-size:23px;line-height:1.2}.task-create{display:flex;flex-direction:column;gap:9px;padding:12px;background:var(--bg-card);border:1px solid var(--border);border-radius:12px}.task-create-options{display:flex;gap:7px;flex-wrap:wrap}.task-create-options label{display:flex;align-items:center;gap:6px;min-width:0}.task-create-options input,.task-create-options select,.task-list-heading select{max-width:100%;min-width:0;border:1px solid var(--border);border-radius:8px;background:var(--bg-sidebar);color:var(--text-2);padding:7px;font:inherit;font-size:11px}.task-list-heading{display:flex;align-items:center;justify-content:space-between}.task-list-heading strong{font-size:13px}.task-row-detail{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}.task-row-detail span{font-size:13px;overflow-wrap:anywhere}.task-row-detail small{font-size:11px;color:var(--text-3)}.task-section-heading{display:flex;align-items:center;gap:8px;font-size:13px}.task-schedule-item{display:flex;align-items:center;gap:12px;padding:13px;border:1px solid var(--border);border-radius:12px;background:var(--bg-card)}.task-schedule-item>div{display:flex;flex-direction:column;gap:4px;min-width:0}.task-schedule-item strong{font-size:13px;overflow-wrap:anywhere}.task-schedule-item span{font-size:11px;color:var(--text-2)}.task-notice{display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--accent-border);background:var(--accent-bg);border-radius:10px;font-size:12px}.task-notice span{flex:1}.task-notice button{border:0;background:transparent;color:inherit;cursor:pointer}@media (max-width:520px){.discover-article>img{width:80px;height:80px}.discover-article{padding:10px}.task-create-options{flex-direction:column;align-items:stretch}}.task-create-options{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.task-date-group,.task-priority-group{display:flex;flex-direction:column;gap:7px;min-width:0}.task-field-label{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:650;color:var(--text-2)}.task-quick-dates{display:flex;flex-wrap:wrap;gap:6px}.task-quick-dates button{border:1px solid var(--border);border-radius:999px;background:var(--bg-sidebar);color:var(--text);padding:7px 10px;font-size:12px;cursor:pointer}.task-quick-dates button:hover{background:var(--accent-bg);border-color:var(--accent-border)}.task-date-fields{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:8px}.task-date-fields input,.task-priority-group select{width:100%;min-width:0;min-height:38px;border:1px solid var(--border);border-radius:10px;background:var(--bg-sidebar);color:var(--text);padding:8px;font:inherit;font-size:13px;color-scheme:light dark}[data-theme=light] .task-date-fields input,[data-theme=ameeba] .task-date-fields input{color-scheme:light}.task-date-fields input:disabled{opacity:.5}.task-form-error{margin:0;font-size:12px;color:#e35a58}.task-create :focus-visible{outline:2px solid var(--accent);outline-offset:2px}.max-character-panel.user-floating{position:fixed!important;z-index:70!important;right:16px;bottom:100px;left:auto;top:auto;width:220px;height:260px;min-height:0;max-height:calc(100dvh - 32px);flex:0 0 auto;border:1px solid var(--border);border-radius:18px;box-shadow:0 14px 40px #0000003d;background:var(--bg-sidebar);overflow:hidden}.max-character-panel.user-floating .max-character-panel-header{display:flex;min-height:38px;height:38px;padding:4px 8px;border-bottom:1px solid var(--border)}.max-character-panel.user-floating .max-character-panel-footer{display:none}.max-character-panel.user-floating .max-character-panel-stage{flex:1;min-height:0;padding:2px}.max-character-panel.user-floating .max-character-panel-figure{min-height:0;overflow:hidden}.max-drag-handle{cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;flex:1;min-width:0}.max-drag-handle:active{cursor:grabbing}.max-float-toggle{display:inline-flex}@media (max-width:760px){.max-character-panel.user-floating:not(.mobile-expanded){width:124px;height:155px;min-height:0;max-height:calc(100dvh - 20px);border-radius:16px}.max-character-panel.user-floating:not(.mobile-expanded) .max-character-panel-header{display:flex;height:30px;min-height:30px;padding:2px 5px}.max-character-panel.user-floating:not(.mobile-expanded) .max-character-panel-title{font-size:11px}.max-character-panel.user-floating:not(.mobile-expanded) .max-character-panel-actions .max-character-panel-close:not(.mobile-max-expand):not(.max-float-toggle){display:none}.max-character-panel.user-floating:not(.mobile-expanded) .max-character-panel-stage{flex:1;padding:0}.max-character-panel.user-floating:not(.mobile-expanded) .max-character-panel-footer{display:none}.max-character-panel.user-floating.mobile-expanded{position:fixed!important;top:10px!important;right:10px!important;bottom:80px!important;left:10px!important;width:auto;height:auto;max-height:none}}@media (prefers-reduced-motion:reduce){.max-character-panel.user-floating{transition:none!important}}.max-stage-drag-surface{touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}@media (min-width:761px){.max-character-panel-actions .mobile-max-expand{display:none!important}}@media (max-width:760px){.max-character-panel-actions>button[title="Expand Max panel"],.max-character-panel-actions>button[title="Restore Max panel"]{display:none!important}}@media (max-width:760px){.max-character-panel.user-floating:not(.mobile-expanded) .max-character-panel-actions .max-character-panel-close[aria-label="Play Max voice demo"],.max-character-panel.user-floating:not(.mobile-expanded) .max-character-panel-actions .max-character-panel-close[aria-label="Wave to Max"]{display:flex}}.max-stage-drag-surface,.max-stage-drag-surface *,.max-stage-drag-surface svg,.max-stage-drag-surface canvas{touch-action:none!important;-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important}.max-stage-drag-surface{cursor:grab;overscroll-behavior:contain}.max-stage-drag-surface:active{cursor:grabbing}.max-character-panel.user-floating .max-restore-control{display:flex!important;flex:0 0 auto}@media (max-width:760px){.max-desktop-popout{display:none!important}}.max-popout-error{position:fixed;bottom:18px;left:50%;transform:translate(-50%);z-index:200;max-width:min(92vw,520px);display:flex;align-items:center;gap:12px;padding:12px 16px;border:1px solid var(--border);border-radius:12px;background:var(--bg-card);color:var(--text);box-shadow:0 10px 35px #00000040;font-size:13px}.max-popout-error button{margin-left:auto;border:0;background:transparent;color:inherit;cursor:pointer}.max-popout-root{width:100%;height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--bg-sidebar);color:var(--text)}.max-popout-bar{display:flex;align-items:center;justify-content:space-between;flex:0 0 40px;padding:6px 12px;border-bottom:1px solid var(--border);font-size:13px}.max-popout-bar strong{display:flex;align-items:center;gap:8px}.max-popout-controls{display:flex;gap:6px}.max-popout-controls button{display:grid;place-items:center;width:30px;height:30px;border:0;border-radius:8px;background:transparent;color:var(--text);cursor:pointer}.max-popout-controls button:hover{background:var(--bg-hover)}.max-popout-character{display:flex;align-items:center;justify-content:center;flex:1;min-height:0;overflow:hidden;padding:8px}.max-popout-character .max-character{max-width:100%;max-height:100%;width:auto;height:auto}.max-popout-caption{flex:0 0 auto;text-align:center;font-size:10px;color:var(--text-3);padding:4px 8px 9px}.max-popout-root{box-sizing:border-box;height:100vh;height:100dvh;min-height:0;overflow:hidden}.max-popout-root *{box-sizing:border-box}.max-popout-bar{flex:0 0 44px}.max-popout-status{font-size:10px;font-weight:400;color:var(--text-3);margin-left:4px}.max-popout-character{flex:1 1 auto;min-height:95px;padding:4px 10px;overflow:hidden}.max-popout-character .max-character{max-height:100%;max-width:100%}.max-popout-reply{flex:0 1 auto;max-height:105px;min-height:35px;overflow-y:auto;margin:0 10px 8px;padding:9px 11px;border:1px solid var(--border);border-radius:11px;background:var(--bg-card);font-size:12px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--text)}.max-popout-history{flex:0 1 150px;min-height:55px;overflow-y:auto;margin:0 10px 8px;padding:8px;border:1px solid var(--border);border-radius:11px;background:var(--bg-card);display:flex;flex-direction:column;gap:8px}.max-popout-message{font-size:12px;line-height:1.45;overflow-wrap:anywhere}.max-popout-message span{font-weight:700;color:var(--text-3);font-size:10px}.max-popout-message p{margin:3px 0 0;white-space:pre-wrap}.max-popout-message.is-user{align-self:flex-end;max-width:95%}.max-popout-empty{font-size:12px;color:var(--text-3);margin:0}.max-popout-voice-error{font-size:11px;color:#ef7878;padding:4px 12px;max-height:55px;overflow:auto}.max-popout-composer{display:flex;align-items:flex-end;gap:5px;padding:9px 9px 10px;border-top:1px solid var(--border);flex:0 0 auto;background:var(--bg-sidebar)}.max-popout-composer textarea{flex:1;min-width:0;min-height:37px;max-height:90px;resize:vertical;border:1px solid var(--border);border-radius:10px;padding:10px;background:var(--bg-card);color:var(--text);font:inherit;font-size:12px;line-height:1.35;outline:none}.max-popout-composer textarea:focus{border-color:var(--accent,#4daee9)}.max-popout-composer button{width:36px;height:37px;flex:0 0 36px;display:grid;place-items:center;border:1px solid var(--border);border-radius:10px;background:var(--bg-card);color:var(--text);cursor:pointer}.max-popout-composer button:hover:not(:disabled){background:var(--bg-hover)}.max-popout-composer button:disabled{opacity:.4;cursor:not-allowed}.max-popout-composer button.is-listening{color:#ef5555;border-color:#ef5555}.max-popout-root{--popout-thumb:rgba(159,172,190,.38);--popout-thumb-hover:rgba(182,197,214,.66)}.max-popout-bar{min-height:44px;padding:6px 11px}.max-popout-bar strong{min-width:0;white-space:nowrap}.max-popout-controls{flex-shrink:0;gap:2px}.max-popout-controls button{width:30px;height:30px;border-radius:9px}.max-popout-controls button:focus-visible,.max-popout-composer button:focus-visible{outline:2px solid var(--accent,#59b6e8);outline-offset:2px}.max-popout-character{flex:1 1 48%;min-height:120px;padding:10px 20px 4px}.max-popout-character .max-character{width:auto!important;height:auto!important;max-width:min(100%,270px)!important;max-height:100%!important;object-fit:contain}.max-popout-root.is-history-open .max-popout-character{flex:0 1 34%;min-height:90px;padding:6px 36px 2px}.max-popout-reply,.max-popout-history{scrollbar-width:thin;scrollbar-color:var(--popout-thumb) transparent;overscroll-behavior:contain}.max-popout-reply::-webkit-scrollbar,.max-popout-history::-webkit-scrollbar{width:4px;height:4px}.max-popout-reply::-webkit-scrollbar-track,.max-popout-history::-webkit-scrollbar-track{background:transparent}.max-popout-reply::-webkit-scrollbar-thumb,.max-popout-history::-webkit-scrollbar-thumb{background:var(--popout-thumb);border-radius:10px}.max-popout-reply:hover::-webkit-scrollbar-thumb,.max-popout-history:hover::-webkit-scrollbar-thumb{background:var(--popout-thumb-hover)}.max-popout-reply{flex:0 1 132px;min-height:62px;max-height:145px;margin:0 10px 9px;padding:12px 15px 12px 13px;border-radius:14px;font-size:12.5px;line-height:1.55;overflow-y:auto}.max-popout-reply-label{display:block;margin-bottom:5px;font-size:10px;font-weight:700;letter-spacing:.025em;color:var(--text-3)}.max-popout-reply-text{white-space:pre-wrap;overflow-wrap:anywhere}.max-popout-history{flex:1 1 40%;max-height:none;min-height:105px;margin:0 10px 9px;padding:11px 14px;border-radius:14px;gap:12px}.max-popout-message{padding:8px 10px;border-radius:11px;max-width:95%;background:var(--bg-hover)}.max-popout-message.is-max{align-self:flex-start}.max-popout-message.is-user{align-self:flex-end}.max-popout-message p{line-height:1.55}.max-popout-composer{gap:6px;padding:10px;border-top:1px solid var(--border);align-items:center}.max-popout-composer textarea{resize:none;min-height:40px;max-height:85px;padding:11px 12px;border-radius:12px;font-size:12.5px}.max-popout-composer button{width:36px;height:40px;flex-basis:36px;border-radius:11px}.max-popout-composer button[type=submit]:not(:disabled){background:var(--accent,#2d9ed3);color:#fff;border-color:transparent}@media (max-height:420px){.max-popout-character{min-height:75px;padding:3px 35px}.max-popout-reply{max-height:95px;min-height:44px}.max-popout-root.is-history-open .max-popout-character{min-height:65px}}@media (prefers-reduced-motion:reduce){.max-popout-root *{scroll-behavior:auto!important}}.max-popout-root .max-popout-character,.max-popout-root .max-popout-reply,.max-popout-root .max-popout-history{transition:flex-basis .24s ease,min-height .24s ease,padding .24s ease}.max-popout-controls button[aria-pressed=true]{color:var(--accent);background:var(--accent-bg)}.max-popout-root:not(.is-history-open) .max-popout-character{flex:1 1 auto;min-height:120px}.max-popout-root:not(.is-history-open) .max-popout-reply{flex:0 1 132px;min-height:62px;max-height:145px}.max-popout-root.is-history-open .max-popout-character{flex:0 0 clamp(85px,22%,120px);min-height:65px;padding:3px 42px 0}.max-popout-root.is-history-open .max-popout-history{flex:1 1 auto;min-height:80px;max-height:none}.max-popout-controls button{transition:background-color .15s ease,color .15s ease}.max-popout-composer textarea::placeholder{color:var(--text-2)}@media (max-height:420px){.max-popout-root.is-history-open .max-popout-character{flex-basis:60px;min-height:48px;padding:0 48px}.max-popout-root.is-history-open .max-popout-history{min-height:55px}}@media (prefers-reduced-motion:reduce){.max-popout-root .max-popout-character,.max-popout-root .max-popout-reply,.max-popout-root .max-popout-history{transition:none}}.max-popout-root .max-popout-reply-text,.max-popout-root .max-popout-markdown{white-space:normal;overflow-wrap:anywhere}.max-popout-root .msg-para{margin:0 0 8px;line-height:1.55}.max-popout-root .msg-para:last-child{margin-bottom:0}.max-popout-root .msg-heading{margin:10px 0 5px;line-height:1.35;font-size:13px}.max-popout-root .msg-heading:first-child{margin-top:0}.max-popout-root .msg-heading-1{font-size:15px}.max-popout-root .msg-heading-2{font-size:14px}.max-popout-root .msg-list{margin:5px 0 9px;padding-left:18px}.max-popout-root .msg-list li{margin:3px 0;padding-left:0;line-height:1.5}.max-popout-root .msg-list:last-child{margin-bottom:0}.max-popout-root .ic{font-size:.92em;overflow-wrap:anywhere}.max-popout-root .code-block-wrap{max-width:100%;margin:7px 0;border-radius:8px}.max-popout-root .code-lang{padding:4px 8px;font-size:10px}.max-popout-root .code-pre{padding:8px;font-size:11px;max-width:100%;white-space:pre;overflow-x:auto}.max-popout-root .max-popout-message .max-popout-markdown>:last-child{margin-bottom:0}.max-popout-root .max-popout-reply-text a,.max-popout-root .max-popout-markdown a{color:var(--accent);text-decoration:underline;text-underline-offset:2px}.max-popout-root.is-chat-only .max-popout-history{flex:1 1 auto;min-height:0;max-height:none;margin-top:10px}.max-popout-root.is-chat-only .max-popout-bar{flex-shrink:0}.max-popout-root.is-chat-only .max-popout-composer{margin-top:auto;flex-shrink:0}.max-popout-root .max-popout-history{min-height:0}.max-popout-root .max-popout-message{position:relative;padding-right:30px}.max-popout-copy{position:absolute;top:5px;right:5px;display:flex;align-items:center;justify-content:center;width:25px;height:25px;border:0;border-radius:6px;background:transparent;color:var(--text-3);cursor:pointer;opacity:0;transition:opacity .15s,color .15s,background .15s}.max-popout-message:hover .max-popout-copy,.max-popout-copy:focus-visible{opacity:1}.max-popout-copy:hover{background:var(--bg-hover);color:var(--text)}.max-popout-copy:focus-visible{outline:2px solid var(--accent);outline-offset:1px}@media (hover:none){.max-popout-copy{opacity:1}}.max-popout-root.is-chat-only .max-popout-message{max-width:100%}.max-popout-root.is-chat-only .max-popout-message.is-user{max-width:92%}@media (prefers-reduced-motion:reduce){.max-popout-copy{transition:none}}.max-popout-root{--popout-thumb: rgba(160,160,166,.28);--popout-thumb-hover: rgba(180,180,186,.58)}.max-popout-bar{padding:6px 11px}.max-popout-history{margin:0 8px 8px;padding:10px 10px 12px;gap:11px;background:#252527;border-color:#38383b;scrollbar-width:thin;scrollbar-color:var(--popout-thumb) transparent}.max-popout-root.is-chat-only .max-popout-history{margin-top:8px}.max-popout-message{max-width:94%;padding:9px 10px;border-radius:12px;background:#303033;color:#f3f3f4;line-height:1.55}.max-popout-message.is-user{max-width:85%;background:#363638}.max-popout-root.is-chat-only .max-popout-message{max-width:94%}.max-popout-root.is-chat-only .max-popout-message.is-user{max-width:85%}.max-popout-message>span{color:#e8bd7a}.max-popout-message.is-user>span{color:#a0a0a4}.max-popout-reply-label{color:#e8bd7a}.max-popout-reply{background:#303033;border-color:#38383b}.max-popout-copy:hover{background:#ffffff17}.max-popout-composer{padding:9px 9px 10px}.max-popout-composer textarea{background:#29292b}.max-popout-controls button[aria-pressed=true]{background:#599ab01f;color:#91b8c5}.max-popout-history::-webkit-scrollbar{width:4px}.max-popout-history::-webkit-scrollbar-thumb{background:var(--popout-thumb);border-radius:10px}.max-popout-history:hover::-webkit-scrollbar-thumb{background:var(--popout-thumb-hover)}@media (max-width:760px){.max-layout-switch{display:flex}.max-layout-option{min-width:40px;min-height:38px}.max-character-panel,.max-character-panel.user-floating{touch-action:pan-y}.max-character-panel-stage,.max-stage-drag-surface{touch-action:pan-y;cursor:default}.layout-companion .max-chat-workspace{display:flex;flex-direction:column;overflow:hidden;gap:0}.layout-companion .max-character-panel:not(.mobile-expanded),.layout-companion.has-messages .max-character-panel:not(.mobile-expanded),.layout-companion.is-welcome .max-character-panel:not(.mobile-expanded){position:relative!important;inset:auto!important;order:-1;width:100%!important;height:clamp(210px,39dvh,380px)!important;min-height:170px!important;max-height:46dvh!important;flex:0 0 auto;border:0;border-radius:0;box-shadow:none;background:transparent}.layout-companion .max-character-panel .max-character-panel-header,.layout-companion .max-character-panel .max-character-panel-footer{display:none!important}.layout-companion .max-character-panel-stage{padding:10px 14px 0!important;background:transparent!important}.layout-companion .max-character-panel-figure .max-character{max-height:100%;max-width:100%}.layout-companion.has-messages .max-chat-conversation{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.layout-companion.has-messages .messages-area{flex:1 1 auto;min-height:0;overflow-y:auto;padding:10px 12px}.layout-companion.has-messages .messages{padding:0;min-height:100%}.layout-companion.has-messages .msg-row{display:none}.layout-companion.has-messages .msg-row.mobile-latest-max{display:flex;padding:0;gap:0;justify-content:stretch}.layout-companion.has-messages .msg-row.mobile-latest-max .msg-avatar-wrap{display:none}.layout-companion.has-messages .msg-row.mobile-latest-max .msg-bubble{flex:1;max-width:100%;width:100%;border-radius:14px;padding:14px;background:#303033;color:#f3f3f4;font-size:14px;line-height:1.55}.layout-companion.has-messages .msg-row.mobile-latest-max .msg-bubble:before{content:"Max";display:block;color:#e8bd7a;font-size:11px;font-weight:700;margin-bottom:8px}.layout-companion.has-messages .msg-row.mobile-latest-max .msg-copy-btn{align-self:flex-start;flex:0 0 28px}.layout-companion .input-area,.layout-chat .input-area{flex:0 0 auto;margin-top:auto;padding-bottom:max(10px,env(safe-area-inset-bottom),var(--max-keyboard-inset, 0px))}.layout-chat .max-character-panel{display:none!important}.layout-chat .max-chat-conversation{flex:1 1 auto;min-height:0}.layout-chat .messages-area{flex:1 1 auto;overflow-y:auto}.layout-chat .msg-row.assistant .msg-bubble{background:#303033}.layout-chat .msg-row.user .msg-bubble{background:#363638}}@media (max-width:760px) and (max-height:620px){.layout-companion .max-character-panel:not(.mobile-expanded),.layout-companion.has-messages .max-character-panel:not(.mobile-expanded){height:clamp(120px,27dvh,190px)!important;min-height:110px!important}}@media (max-width:760px){html,body,#root{height:var(--max-visible-height, 100dvh)!important;overflow:hidden}.root{height:var(--max-visible-height, 100dvh)!important;max-height:var(--max-visible-height, 100dvh);overflow:hidden}.chat-area{display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden}.chat-header{flex:0 0 auto}.max-chat-workspace,.layout-companion .max-chat-workspace,.layout-chat .max-chat-workspace,.is-welcome .max-chat-workspace{display:flex;flex:1 1 auto;min-height:0;height:auto;overflow:hidden;flex-direction:column;position:relative}.max-chat-conversation,.is-welcome .max-chat-conversation,.layout-companion .max-chat-conversation{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;height:auto;overflow:hidden}.messages-area,.is-welcome .messages-area,.layout-companion .messages-area,.layout-chat .messages-area{flex:1 1 auto;min-height:0;height:auto;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.input-area,.layout-companion .input-area,.layout-chat .input-area,.is-welcome .input-area{position:relative;bottom:auto;margin-top:0;flex:0 0 auto;padding:9px 12px max(10px,env(safe-area-inset-bottom));z-index:4}.layout-companion .max-character-panel:not(.mobile-expanded),.layout-companion.has-messages .max-character-panel:not(.mobile-expanded),.layout-companion.is-welcome .max-character-panel:not(.mobile-expanded){position:relative!important;inset:auto!important;order:-1;flex:0 0 auto;width:100%!important;height:clamp(150px,32dvh,300px)!important;min-height:0!important;max-height:40%!important;background:transparent;box-shadow:none;border:0}.layout-companion .max-character-panel-stage,.layout-companion .max-stage-drag-surface,.layout-companion .max-stage-drag-surface *{touch-action:pan-y!important;cursor:default}.layout-companion .companion-splitter{display:none!important}.layout-companion.has-messages .messages{min-height:0}.layout-companion.has-messages .msg-row.mobile-latest-max{align-items:flex-start}.layout-companion.has-messages .msg-row.mobile-latest-max .msg-bubble{min-width:0;flex:1 1 auto;max-width:100%}.root[data-theme=ameeba] .msg-bubble,.root.ameeba .msg-bubble,[data-theme=ameeba] .msg-bubble,.layout-chat .msg-bubble,.layout-companion.has-messages .msg-row.mobile-latest-max .msg-bubble{color:#f3f3f4!important}.root.ameeba .msg-bubble.assistant,[data-theme=ameeba] .msg-bubble.assistant,.layout-chat .msg-bubble.assistant{background:#303033!important;border:1px solid #49494d;color:#f3f3f4!important;box-shadow:none}.root.ameeba .msg-bubble.user,[data-theme=ameeba] .msg-bubble.user,.layout-chat .msg-bubble.user{background:#363638!important;border:1px solid #4a4a4d;color:#f3f3f4!important;box-shadow:none}.msg-bubble :is(p,span,div,li,strong,em,h1,h2,h3,h4,blockquote){color:inherit}.layout-chat .messages-area{background:#0d131b7a}.layout-chat .messages{padding:8px 0 22px}.layout-chat .msg-row{padding:9px 12px;gap:7px;align-items:flex-start}.layout-chat .msg-row.user{justify-content:flex-end}.layout-chat .msg-bubble.assistant{max-width:calc(100% - 80px);padding:12px 13px;font-size:14px;line-height:1.55;border-radius:15px 15px 15px 5px}.layout-chat .msg-bubble.user{max-width:82%;padding:10px 13px;font-size:14px;line-height:1.5;border-radius:15px 15px 5px}.layout-chat .max-character-panel:not(.mobile-expanded),.layout-chat .max-character-panel.user-floating:not(.mobile-expanded){display:flex!important;position:fixed!important;z-index:35!important;top:auto;left:auto;right:12px;bottom:calc(88px + env(safe-area-inset-bottom));width:124px!important;height:155px!important;min-height:0!important;max-height:none;flex:0 0 auto;flex-direction:column;background:var(--bg-sidebar);border:1px solid var(--border);border-radius:16px;overflow:hidden;box-shadow:0 12px 35px #0000004d}.layout-chat .max-character-panel.user-floating:not(.mobile-expanded){right:auto;bottom:auto}.layout-chat .max-character-panel-header,.layout-chat .max-character-panel.user-floating .max-character-panel-header{display:flex;flex:0 0 30px;height:30px;min-height:30px;padding:3px 6px;border-bottom:1px solid var(--border)}.layout-chat .max-character-panel-stage{flex:1 1 auto;min-height:0;padding:0}.layout-chat .max-stage-drag-surface,.layout-chat .max-stage-drag-surface *{touch-action:none!important}.layout-chat .max-character-panel-footer{display:none!important}.layout-chat .max-character-panel-figure .max-character{max-height:100%}.layout-chat .max-character-panel-actions .mobile-max-expand{display:none!important}.layout-chat .max-character-panel.user-floating .max-restore-control{display:flex!important}}@media (max-width:760px) and (max-height:620px){.layout-companion .max-character-panel:not(.mobile-expanded),.layout-companion.has-messages .max-character-panel:not(.mobile-expanded){height:clamp(100px,24dvh,160px)!important}}
